Storage Transfer API
GET
storagetransfer.googleServiceAccounts.get
{{baseUrl}}/v1/googleServiceAccounts/:projectId
QUERY PARAMS
projectId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/googleServiceAccounts/:projectId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v1/googleServiceAccounts/:projectId")
require "http/client"
url = "{{baseUrl}}/v1/googleServiceAccounts/:projectId"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/v1/googleServiceAccounts/:projectId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/googleServiceAccounts/:projectId");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/googleServiceAccounts/:projectId"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/v1/googleServiceAccounts/:projectId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1/googleServiceAccounts/:projectId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/googleServiceAccounts/:projectId"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/googleServiceAccounts/:projectId")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1/googleServiceAccounts/:projectId")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/v1/googleServiceAccounts/:projectId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/v1/googleServiceAccounts/:projectId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/googleServiceAccounts/:projectId';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/googleServiceAccounts/:projectId',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1/googleServiceAccounts/:projectId")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/googleServiceAccounts/:projectId',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/v1/googleServiceAccounts/:projectId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v1/googleServiceAccounts/:projectId');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/v1/googleServiceAccounts/:projectId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/googleServiceAccounts/:projectId';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/googleServiceAccounts/:projectId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/googleServiceAccounts/:projectId" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/googleServiceAccounts/:projectId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/v1/googleServiceAccounts/:projectId');
echo $response->getBody();
setUrl('{{baseUrl}}/v1/googleServiceAccounts/:projectId');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/googleServiceAccounts/:projectId');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/googleServiceAccounts/:projectId' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/googleServiceAccounts/:projectId' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v1/googleServiceAccounts/:projectId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/googleServiceAccounts/:projectId"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/googleServiceAccounts/:projectId"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/googleServiceAccounts/:projectId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/v1/googleServiceAccounts/:projectId') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/googleServiceAccounts/:projectId";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/v1/googleServiceAccounts/:projectId
http GET {{baseUrl}}/v1/googleServiceAccounts/:projectId
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v1/googleServiceAccounts/:projectId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/googleServiceAccounts/:projectId")! 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
storagetransfer.projects.agentPools.create
{{baseUrl}}/v1/projects/:projectId/agentPools
QUERY PARAMS
projectId
BODY json
{
"bandwidthLimit": {
"limitMbps": ""
},
"displayName": "",
"name": "",
"state": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/projects/:projectId/agentPools");
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 \"bandwidthLimit\": {\n \"limitMbps\": \"\"\n },\n \"displayName\": \"\",\n \"name\": \"\",\n \"state\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1/projects/:projectId/agentPools" {:content-type :json
:form-params {:bandwidthLimit {:limitMbps ""}
:displayName ""
:name ""
:state ""}})
require "http/client"
url = "{{baseUrl}}/v1/projects/:projectId/agentPools"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"bandwidthLimit\": {\n \"limitMbps\": \"\"\n },\n \"displayName\": \"\",\n \"name\": \"\",\n \"state\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/v1/projects/:projectId/agentPools"),
Content = new StringContent("{\n \"bandwidthLimit\": {\n \"limitMbps\": \"\"\n },\n \"displayName\": \"\",\n \"name\": \"\",\n \"state\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/projects/:projectId/agentPools");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"bandwidthLimit\": {\n \"limitMbps\": \"\"\n },\n \"displayName\": \"\",\n \"name\": \"\",\n \"state\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/projects/:projectId/agentPools"
payload := strings.NewReader("{\n \"bandwidthLimit\": {\n \"limitMbps\": \"\"\n },\n \"displayName\": \"\",\n \"name\": \"\",\n \"state\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/v1/projects/:projectId/agentPools HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 99
{
"bandwidthLimit": {
"limitMbps": ""
},
"displayName": "",
"name": "",
"state": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1/projects/:projectId/agentPools")
.setHeader("content-type", "application/json")
.setBody("{\n \"bandwidthLimit\": {\n \"limitMbps\": \"\"\n },\n \"displayName\": \"\",\n \"name\": \"\",\n \"state\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/projects/:projectId/agentPools"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"bandwidthLimit\": {\n \"limitMbps\": \"\"\n },\n \"displayName\": \"\",\n \"name\": \"\",\n \"state\": \"\"\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 \"bandwidthLimit\": {\n \"limitMbps\": \"\"\n },\n \"displayName\": \"\",\n \"name\": \"\",\n \"state\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/projects/:projectId/agentPools")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1/projects/:projectId/agentPools")
.header("content-type", "application/json")
.body("{\n \"bandwidthLimit\": {\n \"limitMbps\": \"\"\n },\n \"displayName\": \"\",\n \"name\": \"\",\n \"state\": \"\"\n}")
.asString();
const data = JSON.stringify({
bandwidthLimit: {
limitMbps: ''
},
displayName: '',
name: '',
state: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v1/projects/:projectId/agentPools');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/projects/:projectId/agentPools',
headers: {'content-type': 'application/json'},
data: {bandwidthLimit: {limitMbps: ''}, displayName: '', name: '', state: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/projects/:projectId/agentPools';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"bandwidthLimit":{"limitMbps":""},"displayName":"","name":"","state":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/projects/:projectId/agentPools',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "bandwidthLimit": {\n "limitMbps": ""\n },\n "displayName": "",\n "name": "",\n "state": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"bandwidthLimit\": {\n \"limitMbps\": \"\"\n },\n \"displayName\": \"\",\n \"name\": \"\",\n \"state\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1/projects/:projectId/agentPools")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/projects/:projectId/agentPools',
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({bandwidthLimit: {limitMbps: ''}, displayName: '', name: '', state: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/projects/:projectId/agentPools',
headers: {'content-type': 'application/json'},
body: {bandwidthLimit: {limitMbps: ''}, displayName: '', name: '', state: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/v1/projects/:projectId/agentPools');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
bandwidthLimit: {
limitMbps: ''
},
displayName: '',
name: '',
state: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/projects/:projectId/agentPools',
headers: {'content-type': 'application/json'},
data: {bandwidthLimit: {limitMbps: ''}, displayName: '', name: '', state: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/projects/:projectId/agentPools';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"bandwidthLimit":{"limitMbps":""},"displayName":"","name":"","state":""}'
};
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 = @{ @"bandwidthLimit": @{ @"limitMbps": @"" },
@"displayName": @"",
@"name": @"",
@"state": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/projects/:projectId/agentPools"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/projects/:projectId/agentPools" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"bandwidthLimit\": {\n \"limitMbps\": \"\"\n },\n \"displayName\": \"\",\n \"name\": \"\",\n \"state\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/projects/:projectId/agentPools",
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([
'bandwidthLimit' => [
'limitMbps' => ''
],
'displayName' => '',
'name' => '',
'state' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/v1/projects/:projectId/agentPools', [
'body' => '{
"bandwidthLimit": {
"limitMbps": ""
},
"displayName": "",
"name": "",
"state": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1/projects/:projectId/agentPools');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'bandwidthLimit' => [
'limitMbps' => ''
],
'displayName' => '',
'name' => '',
'state' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'bandwidthLimit' => [
'limitMbps' => ''
],
'displayName' => '',
'name' => '',
'state' => ''
]));
$request->setRequestUrl('{{baseUrl}}/v1/projects/:projectId/agentPools');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/projects/:projectId/agentPools' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"bandwidthLimit": {
"limitMbps": ""
},
"displayName": "",
"name": "",
"state": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/projects/:projectId/agentPools' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"bandwidthLimit": {
"limitMbps": ""
},
"displayName": "",
"name": "",
"state": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"bandwidthLimit\": {\n \"limitMbps\": \"\"\n },\n \"displayName\": \"\",\n \"name\": \"\",\n \"state\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1/projects/:projectId/agentPools", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/projects/:projectId/agentPools"
payload = {
"bandwidthLimit": { "limitMbps": "" },
"displayName": "",
"name": "",
"state": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/projects/:projectId/agentPools"
payload <- "{\n \"bandwidthLimit\": {\n \"limitMbps\": \"\"\n },\n \"displayName\": \"\",\n \"name\": \"\",\n \"state\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/projects/:projectId/agentPools")
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 \"bandwidthLimit\": {\n \"limitMbps\": \"\"\n },\n \"displayName\": \"\",\n \"name\": \"\",\n \"state\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/v1/projects/:projectId/agentPools') do |req|
req.body = "{\n \"bandwidthLimit\": {\n \"limitMbps\": \"\"\n },\n \"displayName\": \"\",\n \"name\": \"\",\n \"state\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/projects/:projectId/agentPools";
let payload = json!({
"bandwidthLimit": json!({"limitMbps": ""}),
"displayName": "",
"name": "",
"state": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/v1/projects/:projectId/agentPools \
--header 'content-type: application/json' \
--data '{
"bandwidthLimit": {
"limitMbps": ""
},
"displayName": "",
"name": "",
"state": ""
}'
echo '{
"bandwidthLimit": {
"limitMbps": ""
},
"displayName": "",
"name": "",
"state": ""
}' | \
http POST {{baseUrl}}/v1/projects/:projectId/agentPools \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "bandwidthLimit": {\n "limitMbps": ""\n },\n "displayName": "",\n "name": "",\n "state": ""\n}' \
--output-document \
- {{baseUrl}}/v1/projects/:projectId/agentPools
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"bandwidthLimit": ["limitMbps": ""],
"displayName": "",
"name": "",
"state": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/projects/:projectId/agentPools")! 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
storagetransfer.projects.agentPools.delete
{{baseUrl}}/v1/:name
QUERY PARAMS
name
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:name");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/v1/:name")
require "http/client"
url = "{{baseUrl}}/v1/:name"
response = HTTP::Client.delete url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Delete,
RequestUri = new Uri("{{baseUrl}}/v1/:name"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/:name");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/:name"
req, _ := http.NewRequest("DELETE", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
DELETE /baseUrl/v1/:name HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/v1/:name")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/:name"))
.method("DELETE", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/:name")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/v1/:name")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('DELETE', '{{baseUrl}}/v1/:name');
xhr.send(data);
import axios from 'axios';
const options = {method: 'DELETE', url: '{{baseUrl}}/v1/:name'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/:name';
const options = {method: 'DELETE'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/:name',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1/:name")
.delete(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/:name',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'DELETE', url: '{{baseUrl}}/v1/:name'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/v1/:name');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {method: 'DELETE', url: '{{baseUrl}}/v1/:name'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/:name';
const options = {method: 'DELETE'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:name"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"DELETE"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/:name" in
Client.call `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/:name",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('DELETE', '{{baseUrl}}/v1/:name');
echo $response->getBody();
setUrl('{{baseUrl}}/v1/:name');
$request->setMethod(HTTP_METH_DELETE);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/:name');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:name' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:name' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/v1/:name")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/:name"
response = requests.delete(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/:name"
response <- VERB("DELETE", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/:name")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.delete('/baseUrl/v1/:name') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/:name";
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("DELETE").unwrap(), url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request DELETE \
--url {{baseUrl}}/v1/:name
http DELETE {{baseUrl}}/v1/:name
wget --quiet \
--method DELETE \
--output-document \
- {{baseUrl}}/v1/:name
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:name")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "DELETE"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
storagetransfer.projects.agentPools.list
{{baseUrl}}/v1/projects/:projectId/agentPools
QUERY PARAMS
projectId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/projects/:projectId/agentPools");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v1/projects/:projectId/agentPools")
require "http/client"
url = "{{baseUrl}}/v1/projects/:projectId/agentPools"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/v1/projects/:projectId/agentPools"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/projects/:projectId/agentPools");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/projects/:projectId/agentPools"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/v1/projects/:projectId/agentPools HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1/projects/:projectId/agentPools")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/projects/:projectId/agentPools"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/projects/:projectId/agentPools")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1/projects/:projectId/agentPools")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/v1/projects/:projectId/agentPools');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/v1/projects/:projectId/agentPools'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/projects/:projectId/agentPools';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/projects/:projectId/agentPools',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1/projects/:projectId/agentPools")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/projects/:projectId/agentPools',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/v1/projects/:projectId/agentPools'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v1/projects/:projectId/agentPools');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/v1/projects/:projectId/agentPools'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/projects/:projectId/agentPools';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/projects/:projectId/agentPools"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/projects/:projectId/agentPools" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/projects/:projectId/agentPools",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/v1/projects/:projectId/agentPools');
echo $response->getBody();
setUrl('{{baseUrl}}/v1/projects/:projectId/agentPools');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/projects/:projectId/agentPools');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/projects/:projectId/agentPools' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/projects/:projectId/agentPools' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v1/projects/:projectId/agentPools")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/projects/:projectId/agentPools"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/projects/:projectId/agentPools"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/projects/:projectId/agentPools")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/v1/projects/:projectId/agentPools') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/projects/:projectId/agentPools";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/v1/projects/:projectId/agentPools
http GET {{baseUrl}}/v1/projects/:projectId/agentPools
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v1/projects/:projectId/agentPools
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/projects/:projectId/agentPools")! 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()
PATCH
storagetransfer.projects.agentPools.patch
{{baseUrl}}/v1/:name
QUERY PARAMS
name
BODY json
{
"bandwidthLimit": {
"limitMbps": ""
},
"displayName": "",
"name": "",
"state": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:name");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"bandwidthLimit\": {\n \"limitMbps\": \"\"\n },\n \"displayName\": \"\",\n \"name\": \"\",\n \"state\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/patch "{{baseUrl}}/v1/:name" {:content-type :json
:form-params {:bandwidthLimit {:limitMbps ""}
:displayName ""
:name ""
:state ""}})
require "http/client"
url = "{{baseUrl}}/v1/:name"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"bandwidthLimit\": {\n \"limitMbps\": \"\"\n },\n \"displayName\": \"\",\n \"name\": \"\",\n \"state\": \"\"\n}"
response = HTTP::Client.patch url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Patch,
RequestUri = new Uri("{{baseUrl}}/v1/:name"),
Content = new StringContent("{\n \"bandwidthLimit\": {\n \"limitMbps\": \"\"\n },\n \"displayName\": \"\",\n \"name\": \"\",\n \"state\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/:name");
var request = new RestRequest("", Method.Patch);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"bandwidthLimit\": {\n \"limitMbps\": \"\"\n },\n \"displayName\": \"\",\n \"name\": \"\",\n \"state\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/:name"
payload := strings.NewReader("{\n \"bandwidthLimit\": {\n \"limitMbps\": \"\"\n },\n \"displayName\": \"\",\n \"name\": \"\",\n \"state\": \"\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
PATCH /baseUrl/v1/:name HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 99
{
"bandwidthLimit": {
"limitMbps": ""
},
"displayName": "",
"name": "",
"state": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/v1/:name")
.setHeader("content-type", "application/json")
.setBody("{\n \"bandwidthLimit\": {\n \"limitMbps\": \"\"\n },\n \"displayName\": \"\",\n \"name\": \"\",\n \"state\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/:name"))
.header("content-type", "application/json")
.method("PATCH", HttpRequest.BodyPublishers.ofString("{\n \"bandwidthLimit\": {\n \"limitMbps\": \"\"\n },\n \"displayName\": \"\",\n \"name\": \"\",\n \"state\": \"\"\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 \"bandwidthLimit\": {\n \"limitMbps\": \"\"\n },\n \"displayName\": \"\",\n \"name\": \"\",\n \"state\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/:name")
.patch(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/v1/:name")
.header("content-type", "application/json")
.body("{\n \"bandwidthLimit\": {\n \"limitMbps\": \"\"\n },\n \"displayName\": \"\",\n \"name\": \"\",\n \"state\": \"\"\n}")
.asString();
const data = JSON.stringify({
bandwidthLimit: {
limitMbps: ''
},
displayName: '',
name: '',
state: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PATCH', '{{baseUrl}}/v1/:name');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PATCH',
url: '{{baseUrl}}/v1/:name',
headers: {'content-type': 'application/json'},
data: {bandwidthLimit: {limitMbps: ''}, displayName: '', name: '', state: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/:name';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"bandwidthLimit":{"limitMbps":""},"displayName":"","name":"","state":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/:name',
method: 'PATCH',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "bandwidthLimit": {\n "limitMbps": ""\n },\n "displayName": "",\n "name": "",\n "state": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"bandwidthLimit\": {\n \"limitMbps\": \"\"\n },\n \"displayName\": \"\",\n \"name\": \"\",\n \"state\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1/:name")
.patch(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PATCH',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/:name',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({bandwidthLimit: {limitMbps: ''}, displayName: '', name: '', state: ''}));
req.end();
const request = require('request');
const options = {
method: 'PATCH',
url: '{{baseUrl}}/v1/:name',
headers: {'content-type': 'application/json'},
body: {bandwidthLimit: {limitMbps: ''}, displayName: '', name: '', state: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PATCH', '{{baseUrl}}/v1/:name');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
bandwidthLimit: {
limitMbps: ''
},
displayName: '',
name: '',
state: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PATCH',
url: '{{baseUrl}}/v1/:name',
headers: {'content-type': 'application/json'},
data: {bandwidthLimit: {limitMbps: ''}, displayName: '', name: '', state: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/:name';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"bandwidthLimit":{"limitMbps":""},"displayName":"","name":"","state":""}'
};
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 = @{ @"bandwidthLimit": @{ @"limitMbps": @"" },
@"displayName": @"",
@"name": @"",
@"state": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:name"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PATCH"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/:name" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"bandwidthLimit\": {\n \"limitMbps\": \"\"\n },\n \"displayName\": \"\",\n \"name\": \"\",\n \"state\": \"\"\n}" in
Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/:name",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'bandwidthLimit' => [
'limitMbps' => ''
],
'displayName' => '',
'name' => '',
'state' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PATCH', '{{baseUrl}}/v1/:name', [
'body' => '{
"bandwidthLimit": {
"limitMbps": ""
},
"displayName": "",
"name": "",
"state": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1/:name');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'bandwidthLimit' => [
'limitMbps' => ''
],
'displayName' => '',
'name' => '',
'state' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'bandwidthLimit' => [
'limitMbps' => ''
],
'displayName' => '',
'name' => '',
'state' => ''
]));
$request->setRequestUrl('{{baseUrl}}/v1/:name');
$request->setRequestMethod('PATCH');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:name' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"bandwidthLimit": {
"limitMbps": ""
},
"displayName": "",
"name": "",
"state": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:name' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"bandwidthLimit": {
"limitMbps": ""
},
"displayName": "",
"name": "",
"state": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"bandwidthLimit\": {\n \"limitMbps\": \"\"\n },\n \"displayName\": \"\",\n \"name\": \"\",\n \"state\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("PATCH", "/baseUrl/v1/:name", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/:name"
payload = {
"bandwidthLimit": { "limitMbps": "" },
"displayName": "",
"name": "",
"state": ""
}
headers = {"content-type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/:name"
payload <- "{\n \"bandwidthLimit\": {\n \"limitMbps\": \"\"\n },\n \"displayName\": \"\",\n \"name\": \"\",\n \"state\": \"\"\n}"
encode <- "json"
response <- VERB("PATCH", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/:name")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"bandwidthLimit\": {\n \"limitMbps\": \"\"\n },\n \"displayName\": \"\",\n \"name\": \"\",\n \"state\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.patch('/baseUrl/v1/:name') do |req|
req.body = "{\n \"bandwidthLimit\": {\n \"limitMbps\": \"\"\n },\n \"displayName\": \"\",\n \"name\": \"\",\n \"state\": \"\"\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}}/v1/:name";
let payload = json!({
"bandwidthLimit": json!({"limitMbps": ""}),
"displayName": "",
"name": "",
"state": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PATCH").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PATCH \
--url {{baseUrl}}/v1/:name \
--header 'content-type: application/json' \
--data '{
"bandwidthLimit": {
"limitMbps": ""
},
"displayName": "",
"name": "",
"state": ""
}'
echo '{
"bandwidthLimit": {
"limitMbps": ""
},
"displayName": "",
"name": "",
"state": ""
}' | \
http PATCH {{baseUrl}}/v1/:name \
content-type:application/json
wget --quiet \
--method PATCH \
--header 'content-type: application/json' \
--body-data '{\n "bandwidthLimit": {\n "limitMbps": ""\n },\n "displayName": "",\n "name": "",\n "state": ""\n}' \
--output-document \
- {{baseUrl}}/v1/:name
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"bandwidthLimit": ["limitMbps": ""],
"displayName": "",
"name": "",
"state": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:name")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
storagetransfer.transferJobs.create
{{baseUrl}}/v1/transferJobs
BODY json
{
"creationTime": "",
"deletionTime": "",
"description": "",
"eventStream": {
"eventStreamExpirationTime": "",
"eventStreamStartTime": "",
"name": ""
},
"lastModificationTime": "",
"latestOperationName": "",
"loggingConfig": {
"enableOnpremGcsTransferLogs": false,
"logActionStates": [],
"logActions": []
},
"name": "",
"notificationConfig": {
"eventTypes": [],
"payloadFormat": "",
"pubsubTopic": ""
},
"projectId": "",
"schedule": {
"endTimeOfDay": {
"hours": 0,
"minutes": 0,
"nanos": 0,
"seconds": 0
},
"repeatInterval": "",
"scheduleEndDate": {
"day": 0,
"month": 0,
"year": 0
},
"scheduleStartDate": {},
"startTimeOfDay": {}
},
"status": "",
"transferSpec": {
"awsS3CompatibleDataSource": {
"bucketName": "",
"endpoint": "",
"path": "",
"region": "",
"s3Metadata": {
"authMethod": "",
"listApi": "",
"protocol": "",
"requestModel": ""
}
},
"awsS3DataSource": {
"awsAccessKey": {
"accessKeyId": "",
"secretAccessKey": ""
},
"bucketName": "",
"path": "",
"roleArn": ""
},
"azureBlobStorageDataSource": {
"azureCredentials": {
"sasToken": ""
},
"container": "",
"path": "",
"storageAccount": ""
},
"gcsDataSink": {
"bucketName": "",
"path": ""
},
"gcsDataSource": {},
"gcsIntermediateDataLocation": {},
"httpDataSource": {
"listUrl": ""
},
"objectConditions": {
"excludePrefixes": [],
"includePrefixes": [],
"lastModifiedBefore": "",
"lastModifiedSince": "",
"maxTimeElapsedSinceLastModification": "",
"minTimeElapsedSinceLastModification": ""
},
"posixDataSink": {
"rootDirectory": ""
},
"posixDataSource": {},
"sinkAgentPoolName": "",
"sourceAgentPoolName": "",
"transferManifest": {
"location": ""
},
"transferOptions": {
"deleteObjectsFromSourceAfterTransfer": false,
"deleteObjectsUniqueInSink": false,
"metadataOptions": {
"acl": "",
"gid": "",
"kmsKey": "",
"mode": "",
"storageClass": "",
"symlink": "",
"temporaryHold": "",
"timeCreated": "",
"uid": ""
},
"overwriteObjectsAlreadyExistingInSink": false,
"overwriteWhen": ""
}
}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/transferJobs");
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 \"creationTime\": \"\",\n \"deletionTime\": \"\",\n \"description\": \"\",\n \"eventStream\": {\n \"eventStreamExpirationTime\": \"\",\n \"eventStreamStartTime\": \"\",\n \"name\": \"\"\n },\n \"lastModificationTime\": \"\",\n \"latestOperationName\": \"\",\n \"loggingConfig\": {\n \"enableOnpremGcsTransferLogs\": false,\n \"logActionStates\": [],\n \"logActions\": []\n },\n \"name\": \"\",\n \"notificationConfig\": {\n \"eventTypes\": [],\n \"payloadFormat\": \"\",\n \"pubsubTopic\": \"\"\n },\n \"projectId\": \"\",\n \"schedule\": {\n \"endTimeOfDay\": {\n \"hours\": 0,\n \"minutes\": 0,\n \"nanos\": 0,\n \"seconds\": 0\n },\n \"repeatInterval\": \"\",\n \"scheduleEndDate\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"scheduleStartDate\": {},\n \"startTimeOfDay\": {}\n },\n \"status\": \"\",\n \"transferSpec\": {\n \"awsS3CompatibleDataSource\": {\n \"bucketName\": \"\",\n \"endpoint\": \"\",\n \"path\": \"\",\n \"region\": \"\",\n \"s3Metadata\": {\n \"authMethod\": \"\",\n \"listApi\": \"\",\n \"protocol\": \"\",\n \"requestModel\": \"\"\n }\n },\n \"awsS3DataSource\": {\n \"awsAccessKey\": {\n \"accessKeyId\": \"\",\n \"secretAccessKey\": \"\"\n },\n \"bucketName\": \"\",\n \"path\": \"\",\n \"roleArn\": \"\"\n },\n \"azureBlobStorageDataSource\": {\n \"azureCredentials\": {\n \"sasToken\": \"\"\n },\n \"container\": \"\",\n \"path\": \"\",\n \"storageAccount\": \"\"\n },\n \"gcsDataSink\": {\n \"bucketName\": \"\",\n \"path\": \"\"\n },\n \"gcsDataSource\": {},\n \"gcsIntermediateDataLocation\": {},\n \"httpDataSource\": {\n \"listUrl\": \"\"\n },\n \"objectConditions\": {\n \"excludePrefixes\": [],\n \"includePrefixes\": [],\n \"lastModifiedBefore\": \"\",\n \"lastModifiedSince\": \"\",\n \"maxTimeElapsedSinceLastModification\": \"\",\n \"minTimeElapsedSinceLastModification\": \"\"\n },\n \"posixDataSink\": {\n \"rootDirectory\": \"\"\n },\n \"posixDataSource\": {},\n \"sinkAgentPoolName\": \"\",\n \"sourceAgentPoolName\": \"\",\n \"transferManifest\": {\n \"location\": \"\"\n },\n \"transferOptions\": {\n \"deleteObjectsFromSourceAfterTransfer\": false,\n \"deleteObjectsUniqueInSink\": false,\n \"metadataOptions\": {\n \"acl\": \"\",\n \"gid\": \"\",\n \"kmsKey\": \"\",\n \"mode\": \"\",\n \"storageClass\": \"\",\n \"symlink\": \"\",\n \"temporaryHold\": \"\",\n \"timeCreated\": \"\",\n \"uid\": \"\"\n },\n \"overwriteObjectsAlreadyExistingInSink\": false,\n \"overwriteWhen\": \"\"\n }\n }\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1/transferJobs" {:content-type :json
:form-params {:creationTime ""
:deletionTime ""
:description ""
:eventStream {:eventStreamExpirationTime ""
:eventStreamStartTime ""
:name ""}
:lastModificationTime ""
:latestOperationName ""
:loggingConfig {:enableOnpremGcsTransferLogs false
:logActionStates []
:logActions []}
:name ""
:notificationConfig {:eventTypes []
:payloadFormat ""
:pubsubTopic ""}
:projectId ""
:schedule {:endTimeOfDay {:hours 0
:minutes 0
:nanos 0
:seconds 0}
:repeatInterval ""
:scheduleEndDate {:day 0
:month 0
:year 0}
:scheduleStartDate {}
:startTimeOfDay {}}
:status ""
:transferSpec {:awsS3CompatibleDataSource {:bucketName ""
:endpoint ""
:path ""
:region ""
:s3Metadata {:authMethod ""
:listApi ""
:protocol ""
:requestModel ""}}
:awsS3DataSource {:awsAccessKey {:accessKeyId ""
:secretAccessKey ""}
:bucketName ""
:path ""
:roleArn ""}
:azureBlobStorageDataSource {:azureCredentials {:sasToken ""}
:container ""
:path ""
:storageAccount ""}
:gcsDataSink {:bucketName ""
:path ""}
:gcsDataSource {}
:gcsIntermediateDataLocation {}
:httpDataSource {:listUrl ""}
:objectConditions {:excludePrefixes []
:includePrefixes []
:lastModifiedBefore ""
:lastModifiedSince ""
:maxTimeElapsedSinceLastModification ""
:minTimeElapsedSinceLastModification ""}
:posixDataSink {:rootDirectory ""}
:posixDataSource {}
:sinkAgentPoolName ""
:sourceAgentPoolName ""
:transferManifest {:location ""}
:transferOptions {:deleteObjectsFromSourceAfterTransfer false
:deleteObjectsUniqueInSink false
:metadataOptions {:acl ""
:gid ""
:kmsKey ""
:mode ""
:storageClass ""
:symlink ""
:temporaryHold ""
:timeCreated ""
:uid ""}
:overwriteObjectsAlreadyExistingInSink false
:overwriteWhen ""}}}})
require "http/client"
url = "{{baseUrl}}/v1/transferJobs"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"creationTime\": \"\",\n \"deletionTime\": \"\",\n \"description\": \"\",\n \"eventStream\": {\n \"eventStreamExpirationTime\": \"\",\n \"eventStreamStartTime\": \"\",\n \"name\": \"\"\n },\n \"lastModificationTime\": \"\",\n \"latestOperationName\": \"\",\n \"loggingConfig\": {\n \"enableOnpremGcsTransferLogs\": false,\n \"logActionStates\": [],\n \"logActions\": []\n },\n \"name\": \"\",\n \"notificationConfig\": {\n \"eventTypes\": [],\n \"payloadFormat\": \"\",\n \"pubsubTopic\": \"\"\n },\n \"projectId\": \"\",\n \"schedule\": {\n \"endTimeOfDay\": {\n \"hours\": 0,\n \"minutes\": 0,\n \"nanos\": 0,\n \"seconds\": 0\n },\n \"repeatInterval\": \"\",\n \"scheduleEndDate\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"scheduleStartDate\": {},\n \"startTimeOfDay\": {}\n },\n \"status\": \"\",\n \"transferSpec\": {\n \"awsS3CompatibleDataSource\": {\n \"bucketName\": \"\",\n \"endpoint\": \"\",\n \"path\": \"\",\n \"region\": \"\",\n \"s3Metadata\": {\n \"authMethod\": \"\",\n \"listApi\": \"\",\n \"protocol\": \"\",\n \"requestModel\": \"\"\n }\n },\n \"awsS3DataSource\": {\n \"awsAccessKey\": {\n \"accessKeyId\": \"\",\n \"secretAccessKey\": \"\"\n },\n \"bucketName\": \"\",\n \"path\": \"\",\n \"roleArn\": \"\"\n },\n \"azureBlobStorageDataSource\": {\n \"azureCredentials\": {\n \"sasToken\": \"\"\n },\n \"container\": \"\",\n \"path\": \"\",\n \"storageAccount\": \"\"\n },\n \"gcsDataSink\": {\n \"bucketName\": \"\",\n \"path\": \"\"\n },\n \"gcsDataSource\": {},\n \"gcsIntermediateDataLocation\": {},\n \"httpDataSource\": {\n \"listUrl\": \"\"\n },\n \"objectConditions\": {\n \"excludePrefixes\": [],\n \"includePrefixes\": [],\n \"lastModifiedBefore\": \"\",\n \"lastModifiedSince\": \"\",\n \"maxTimeElapsedSinceLastModification\": \"\",\n \"minTimeElapsedSinceLastModification\": \"\"\n },\n \"posixDataSink\": {\n \"rootDirectory\": \"\"\n },\n \"posixDataSource\": {},\n \"sinkAgentPoolName\": \"\",\n \"sourceAgentPoolName\": \"\",\n \"transferManifest\": {\n \"location\": \"\"\n },\n \"transferOptions\": {\n \"deleteObjectsFromSourceAfterTransfer\": false,\n \"deleteObjectsUniqueInSink\": false,\n \"metadataOptions\": {\n \"acl\": \"\",\n \"gid\": \"\",\n \"kmsKey\": \"\",\n \"mode\": \"\",\n \"storageClass\": \"\",\n \"symlink\": \"\",\n \"temporaryHold\": \"\",\n \"timeCreated\": \"\",\n \"uid\": \"\"\n },\n \"overwriteObjectsAlreadyExistingInSink\": false,\n \"overwriteWhen\": \"\"\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}}/v1/transferJobs"),
Content = new StringContent("{\n \"creationTime\": \"\",\n \"deletionTime\": \"\",\n \"description\": \"\",\n \"eventStream\": {\n \"eventStreamExpirationTime\": \"\",\n \"eventStreamStartTime\": \"\",\n \"name\": \"\"\n },\n \"lastModificationTime\": \"\",\n \"latestOperationName\": \"\",\n \"loggingConfig\": {\n \"enableOnpremGcsTransferLogs\": false,\n \"logActionStates\": [],\n \"logActions\": []\n },\n \"name\": \"\",\n \"notificationConfig\": {\n \"eventTypes\": [],\n \"payloadFormat\": \"\",\n \"pubsubTopic\": \"\"\n },\n \"projectId\": \"\",\n \"schedule\": {\n \"endTimeOfDay\": {\n \"hours\": 0,\n \"minutes\": 0,\n \"nanos\": 0,\n \"seconds\": 0\n },\n \"repeatInterval\": \"\",\n \"scheduleEndDate\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"scheduleStartDate\": {},\n \"startTimeOfDay\": {}\n },\n \"status\": \"\",\n \"transferSpec\": {\n \"awsS3CompatibleDataSource\": {\n \"bucketName\": \"\",\n \"endpoint\": \"\",\n \"path\": \"\",\n \"region\": \"\",\n \"s3Metadata\": {\n \"authMethod\": \"\",\n \"listApi\": \"\",\n \"protocol\": \"\",\n \"requestModel\": \"\"\n }\n },\n \"awsS3DataSource\": {\n \"awsAccessKey\": {\n \"accessKeyId\": \"\",\n \"secretAccessKey\": \"\"\n },\n \"bucketName\": \"\",\n \"path\": \"\",\n \"roleArn\": \"\"\n },\n \"azureBlobStorageDataSource\": {\n \"azureCredentials\": {\n \"sasToken\": \"\"\n },\n \"container\": \"\",\n \"path\": \"\",\n \"storageAccount\": \"\"\n },\n \"gcsDataSink\": {\n \"bucketName\": \"\",\n \"path\": \"\"\n },\n \"gcsDataSource\": {},\n \"gcsIntermediateDataLocation\": {},\n \"httpDataSource\": {\n \"listUrl\": \"\"\n },\n \"objectConditions\": {\n \"excludePrefixes\": [],\n \"includePrefixes\": [],\n \"lastModifiedBefore\": \"\",\n \"lastModifiedSince\": \"\",\n \"maxTimeElapsedSinceLastModification\": \"\",\n \"minTimeElapsedSinceLastModification\": \"\"\n },\n \"posixDataSink\": {\n \"rootDirectory\": \"\"\n },\n \"posixDataSource\": {},\n \"sinkAgentPoolName\": \"\",\n \"sourceAgentPoolName\": \"\",\n \"transferManifest\": {\n \"location\": \"\"\n },\n \"transferOptions\": {\n \"deleteObjectsFromSourceAfterTransfer\": false,\n \"deleteObjectsUniqueInSink\": false,\n \"metadataOptions\": {\n \"acl\": \"\",\n \"gid\": \"\",\n \"kmsKey\": \"\",\n \"mode\": \"\",\n \"storageClass\": \"\",\n \"symlink\": \"\",\n \"temporaryHold\": \"\",\n \"timeCreated\": \"\",\n \"uid\": \"\"\n },\n \"overwriteObjectsAlreadyExistingInSink\": false,\n \"overwriteWhen\": \"\"\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}}/v1/transferJobs");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"creationTime\": \"\",\n \"deletionTime\": \"\",\n \"description\": \"\",\n \"eventStream\": {\n \"eventStreamExpirationTime\": \"\",\n \"eventStreamStartTime\": \"\",\n \"name\": \"\"\n },\n \"lastModificationTime\": \"\",\n \"latestOperationName\": \"\",\n \"loggingConfig\": {\n \"enableOnpremGcsTransferLogs\": false,\n \"logActionStates\": [],\n \"logActions\": []\n },\n \"name\": \"\",\n \"notificationConfig\": {\n \"eventTypes\": [],\n \"payloadFormat\": \"\",\n \"pubsubTopic\": \"\"\n },\n \"projectId\": \"\",\n \"schedule\": {\n \"endTimeOfDay\": {\n \"hours\": 0,\n \"minutes\": 0,\n \"nanos\": 0,\n \"seconds\": 0\n },\n \"repeatInterval\": \"\",\n \"scheduleEndDate\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"scheduleStartDate\": {},\n \"startTimeOfDay\": {}\n },\n \"status\": \"\",\n \"transferSpec\": {\n \"awsS3CompatibleDataSource\": {\n \"bucketName\": \"\",\n \"endpoint\": \"\",\n \"path\": \"\",\n \"region\": \"\",\n \"s3Metadata\": {\n \"authMethod\": \"\",\n \"listApi\": \"\",\n \"protocol\": \"\",\n \"requestModel\": \"\"\n }\n },\n \"awsS3DataSource\": {\n \"awsAccessKey\": {\n \"accessKeyId\": \"\",\n \"secretAccessKey\": \"\"\n },\n \"bucketName\": \"\",\n \"path\": \"\",\n \"roleArn\": \"\"\n },\n \"azureBlobStorageDataSource\": {\n \"azureCredentials\": {\n \"sasToken\": \"\"\n },\n \"container\": \"\",\n \"path\": \"\",\n \"storageAccount\": \"\"\n },\n \"gcsDataSink\": {\n \"bucketName\": \"\",\n \"path\": \"\"\n },\n \"gcsDataSource\": {},\n \"gcsIntermediateDataLocation\": {},\n \"httpDataSource\": {\n \"listUrl\": \"\"\n },\n \"objectConditions\": {\n \"excludePrefixes\": [],\n \"includePrefixes\": [],\n \"lastModifiedBefore\": \"\",\n \"lastModifiedSince\": \"\",\n \"maxTimeElapsedSinceLastModification\": \"\",\n \"minTimeElapsedSinceLastModification\": \"\"\n },\n \"posixDataSink\": {\n \"rootDirectory\": \"\"\n },\n \"posixDataSource\": {},\n \"sinkAgentPoolName\": \"\",\n \"sourceAgentPoolName\": \"\",\n \"transferManifest\": {\n \"location\": \"\"\n },\n \"transferOptions\": {\n \"deleteObjectsFromSourceAfterTransfer\": false,\n \"deleteObjectsUniqueInSink\": false,\n \"metadataOptions\": {\n \"acl\": \"\",\n \"gid\": \"\",\n \"kmsKey\": \"\",\n \"mode\": \"\",\n \"storageClass\": \"\",\n \"symlink\": \"\",\n \"temporaryHold\": \"\",\n \"timeCreated\": \"\",\n \"uid\": \"\"\n },\n \"overwriteObjectsAlreadyExistingInSink\": false,\n \"overwriteWhen\": \"\"\n }\n }\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/transferJobs"
payload := strings.NewReader("{\n \"creationTime\": \"\",\n \"deletionTime\": \"\",\n \"description\": \"\",\n \"eventStream\": {\n \"eventStreamExpirationTime\": \"\",\n \"eventStreamStartTime\": \"\",\n \"name\": \"\"\n },\n \"lastModificationTime\": \"\",\n \"latestOperationName\": \"\",\n \"loggingConfig\": {\n \"enableOnpremGcsTransferLogs\": false,\n \"logActionStates\": [],\n \"logActions\": []\n },\n \"name\": \"\",\n \"notificationConfig\": {\n \"eventTypes\": [],\n \"payloadFormat\": \"\",\n \"pubsubTopic\": \"\"\n },\n \"projectId\": \"\",\n \"schedule\": {\n \"endTimeOfDay\": {\n \"hours\": 0,\n \"minutes\": 0,\n \"nanos\": 0,\n \"seconds\": 0\n },\n \"repeatInterval\": \"\",\n \"scheduleEndDate\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"scheduleStartDate\": {},\n \"startTimeOfDay\": {}\n },\n \"status\": \"\",\n \"transferSpec\": {\n \"awsS3CompatibleDataSource\": {\n \"bucketName\": \"\",\n \"endpoint\": \"\",\n \"path\": \"\",\n \"region\": \"\",\n \"s3Metadata\": {\n \"authMethod\": \"\",\n \"listApi\": \"\",\n \"protocol\": \"\",\n \"requestModel\": \"\"\n }\n },\n \"awsS3DataSource\": {\n \"awsAccessKey\": {\n \"accessKeyId\": \"\",\n \"secretAccessKey\": \"\"\n },\n \"bucketName\": \"\",\n \"path\": \"\",\n \"roleArn\": \"\"\n },\n \"azureBlobStorageDataSource\": {\n \"azureCredentials\": {\n \"sasToken\": \"\"\n },\n \"container\": \"\",\n \"path\": \"\",\n \"storageAccount\": \"\"\n },\n \"gcsDataSink\": {\n \"bucketName\": \"\",\n \"path\": \"\"\n },\n \"gcsDataSource\": {},\n \"gcsIntermediateDataLocation\": {},\n \"httpDataSource\": {\n \"listUrl\": \"\"\n },\n \"objectConditions\": {\n \"excludePrefixes\": [],\n \"includePrefixes\": [],\n \"lastModifiedBefore\": \"\",\n \"lastModifiedSince\": \"\",\n \"maxTimeElapsedSinceLastModification\": \"\",\n \"minTimeElapsedSinceLastModification\": \"\"\n },\n \"posixDataSink\": {\n \"rootDirectory\": \"\"\n },\n \"posixDataSource\": {},\n \"sinkAgentPoolName\": \"\",\n \"sourceAgentPoolName\": \"\",\n \"transferManifest\": {\n \"location\": \"\"\n },\n \"transferOptions\": {\n \"deleteObjectsFromSourceAfterTransfer\": false,\n \"deleteObjectsUniqueInSink\": false,\n \"metadataOptions\": {\n \"acl\": \"\",\n \"gid\": \"\",\n \"kmsKey\": \"\",\n \"mode\": \"\",\n \"storageClass\": \"\",\n \"symlink\": \"\",\n \"temporaryHold\": \"\",\n \"timeCreated\": \"\",\n \"uid\": \"\"\n },\n \"overwriteObjectsAlreadyExistingInSink\": false,\n \"overwriteWhen\": \"\"\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/v1/transferJobs HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 2501
{
"creationTime": "",
"deletionTime": "",
"description": "",
"eventStream": {
"eventStreamExpirationTime": "",
"eventStreamStartTime": "",
"name": ""
},
"lastModificationTime": "",
"latestOperationName": "",
"loggingConfig": {
"enableOnpremGcsTransferLogs": false,
"logActionStates": [],
"logActions": []
},
"name": "",
"notificationConfig": {
"eventTypes": [],
"payloadFormat": "",
"pubsubTopic": ""
},
"projectId": "",
"schedule": {
"endTimeOfDay": {
"hours": 0,
"minutes": 0,
"nanos": 0,
"seconds": 0
},
"repeatInterval": "",
"scheduleEndDate": {
"day": 0,
"month": 0,
"year": 0
},
"scheduleStartDate": {},
"startTimeOfDay": {}
},
"status": "",
"transferSpec": {
"awsS3CompatibleDataSource": {
"bucketName": "",
"endpoint": "",
"path": "",
"region": "",
"s3Metadata": {
"authMethod": "",
"listApi": "",
"protocol": "",
"requestModel": ""
}
},
"awsS3DataSource": {
"awsAccessKey": {
"accessKeyId": "",
"secretAccessKey": ""
},
"bucketName": "",
"path": "",
"roleArn": ""
},
"azureBlobStorageDataSource": {
"azureCredentials": {
"sasToken": ""
},
"container": "",
"path": "",
"storageAccount": ""
},
"gcsDataSink": {
"bucketName": "",
"path": ""
},
"gcsDataSource": {},
"gcsIntermediateDataLocation": {},
"httpDataSource": {
"listUrl": ""
},
"objectConditions": {
"excludePrefixes": [],
"includePrefixes": [],
"lastModifiedBefore": "",
"lastModifiedSince": "",
"maxTimeElapsedSinceLastModification": "",
"minTimeElapsedSinceLastModification": ""
},
"posixDataSink": {
"rootDirectory": ""
},
"posixDataSource": {},
"sinkAgentPoolName": "",
"sourceAgentPoolName": "",
"transferManifest": {
"location": ""
},
"transferOptions": {
"deleteObjectsFromSourceAfterTransfer": false,
"deleteObjectsUniqueInSink": false,
"metadataOptions": {
"acl": "",
"gid": "",
"kmsKey": "",
"mode": "",
"storageClass": "",
"symlink": "",
"temporaryHold": "",
"timeCreated": "",
"uid": ""
},
"overwriteObjectsAlreadyExistingInSink": false,
"overwriteWhen": ""
}
}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1/transferJobs")
.setHeader("content-type", "application/json")
.setBody("{\n \"creationTime\": \"\",\n \"deletionTime\": \"\",\n \"description\": \"\",\n \"eventStream\": {\n \"eventStreamExpirationTime\": \"\",\n \"eventStreamStartTime\": \"\",\n \"name\": \"\"\n },\n \"lastModificationTime\": \"\",\n \"latestOperationName\": \"\",\n \"loggingConfig\": {\n \"enableOnpremGcsTransferLogs\": false,\n \"logActionStates\": [],\n \"logActions\": []\n },\n \"name\": \"\",\n \"notificationConfig\": {\n \"eventTypes\": [],\n \"payloadFormat\": \"\",\n \"pubsubTopic\": \"\"\n },\n \"projectId\": \"\",\n \"schedule\": {\n \"endTimeOfDay\": {\n \"hours\": 0,\n \"minutes\": 0,\n \"nanos\": 0,\n \"seconds\": 0\n },\n \"repeatInterval\": \"\",\n \"scheduleEndDate\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"scheduleStartDate\": {},\n \"startTimeOfDay\": {}\n },\n \"status\": \"\",\n \"transferSpec\": {\n \"awsS3CompatibleDataSource\": {\n \"bucketName\": \"\",\n \"endpoint\": \"\",\n \"path\": \"\",\n \"region\": \"\",\n \"s3Metadata\": {\n \"authMethod\": \"\",\n \"listApi\": \"\",\n \"protocol\": \"\",\n \"requestModel\": \"\"\n }\n },\n \"awsS3DataSource\": {\n \"awsAccessKey\": {\n \"accessKeyId\": \"\",\n \"secretAccessKey\": \"\"\n },\n \"bucketName\": \"\",\n \"path\": \"\",\n \"roleArn\": \"\"\n },\n \"azureBlobStorageDataSource\": {\n \"azureCredentials\": {\n \"sasToken\": \"\"\n },\n \"container\": \"\",\n \"path\": \"\",\n \"storageAccount\": \"\"\n },\n \"gcsDataSink\": {\n \"bucketName\": \"\",\n \"path\": \"\"\n },\n \"gcsDataSource\": {},\n \"gcsIntermediateDataLocation\": {},\n \"httpDataSource\": {\n \"listUrl\": \"\"\n },\n \"objectConditions\": {\n \"excludePrefixes\": [],\n \"includePrefixes\": [],\n \"lastModifiedBefore\": \"\",\n \"lastModifiedSince\": \"\",\n \"maxTimeElapsedSinceLastModification\": \"\",\n \"minTimeElapsedSinceLastModification\": \"\"\n },\n \"posixDataSink\": {\n \"rootDirectory\": \"\"\n },\n \"posixDataSource\": {},\n \"sinkAgentPoolName\": \"\",\n \"sourceAgentPoolName\": \"\",\n \"transferManifest\": {\n \"location\": \"\"\n },\n \"transferOptions\": {\n \"deleteObjectsFromSourceAfterTransfer\": false,\n \"deleteObjectsUniqueInSink\": false,\n \"metadataOptions\": {\n \"acl\": \"\",\n \"gid\": \"\",\n \"kmsKey\": \"\",\n \"mode\": \"\",\n \"storageClass\": \"\",\n \"symlink\": \"\",\n \"temporaryHold\": \"\",\n \"timeCreated\": \"\",\n \"uid\": \"\"\n },\n \"overwriteObjectsAlreadyExistingInSink\": false,\n \"overwriteWhen\": \"\"\n }\n }\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/transferJobs"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"creationTime\": \"\",\n \"deletionTime\": \"\",\n \"description\": \"\",\n \"eventStream\": {\n \"eventStreamExpirationTime\": \"\",\n \"eventStreamStartTime\": \"\",\n \"name\": \"\"\n },\n \"lastModificationTime\": \"\",\n \"latestOperationName\": \"\",\n \"loggingConfig\": {\n \"enableOnpremGcsTransferLogs\": false,\n \"logActionStates\": [],\n \"logActions\": []\n },\n \"name\": \"\",\n \"notificationConfig\": {\n \"eventTypes\": [],\n \"payloadFormat\": \"\",\n \"pubsubTopic\": \"\"\n },\n \"projectId\": \"\",\n \"schedule\": {\n \"endTimeOfDay\": {\n \"hours\": 0,\n \"minutes\": 0,\n \"nanos\": 0,\n \"seconds\": 0\n },\n \"repeatInterval\": \"\",\n \"scheduleEndDate\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"scheduleStartDate\": {},\n \"startTimeOfDay\": {}\n },\n \"status\": \"\",\n \"transferSpec\": {\n \"awsS3CompatibleDataSource\": {\n \"bucketName\": \"\",\n \"endpoint\": \"\",\n \"path\": \"\",\n \"region\": \"\",\n \"s3Metadata\": {\n \"authMethod\": \"\",\n \"listApi\": \"\",\n \"protocol\": \"\",\n \"requestModel\": \"\"\n }\n },\n \"awsS3DataSource\": {\n \"awsAccessKey\": {\n \"accessKeyId\": \"\",\n \"secretAccessKey\": \"\"\n },\n \"bucketName\": \"\",\n \"path\": \"\",\n \"roleArn\": \"\"\n },\n \"azureBlobStorageDataSource\": {\n \"azureCredentials\": {\n \"sasToken\": \"\"\n },\n \"container\": \"\",\n \"path\": \"\",\n \"storageAccount\": \"\"\n },\n \"gcsDataSink\": {\n \"bucketName\": \"\",\n \"path\": \"\"\n },\n \"gcsDataSource\": {},\n \"gcsIntermediateDataLocation\": {},\n \"httpDataSource\": {\n \"listUrl\": \"\"\n },\n \"objectConditions\": {\n \"excludePrefixes\": [],\n \"includePrefixes\": [],\n \"lastModifiedBefore\": \"\",\n \"lastModifiedSince\": \"\",\n \"maxTimeElapsedSinceLastModification\": \"\",\n \"minTimeElapsedSinceLastModification\": \"\"\n },\n \"posixDataSink\": {\n \"rootDirectory\": \"\"\n },\n \"posixDataSource\": {},\n \"sinkAgentPoolName\": \"\",\n \"sourceAgentPoolName\": \"\",\n \"transferManifest\": {\n \"location\": \"\"\n },\n \"transferOptions\": {\n \"deleteObjectsFromSourceAfterTransfer\": false,\n \"deleteObjectsUniqueInSink\": false,\n \"metadataOptions\": {\n \"acl\": \"\",\n \"gid\": \"\",\n \"kmsKey\": \"\",\n \"mode\": \"\",\n \"storageClass\": \"\",\n \"symlink\": \"\",\n \"temporaryHold\": \"\",\n \"timeCreated\": \"\",\n \"uid\": \"\"\n },\n \"overwriteObjectsAlreadyExistingInSink\": false,\n \"overwriteWhen\": \"\"\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 \"creationTime\": \"\",\n \"deletionTime\": \"\",\n \"description\": \"\",\n \"eventStream\": {\n \"eventStreamExpirationTime\": \"\",\n \"eventStreamStartTime\": \"\",\n \"name\": \"\"\n },\n \"lastModificationTime\": \"\",\n \"latestOperationName\": \"\",\n \"loggingConfig\": {\n \"enableOnpremGcsTransferLogs\": false,\n \"logActionStates\": [],\n \"logActions\": []\n },\n \"name\": \"\",\n \"notificationConfig\": {\n \"eventTypes\": [],\n \"payloadFormat\": \"\",\n \"pubsubTopic\": \"\"\n },\n \"projectId\": \"\",\n \"schedule\": {\n \"endTimeOfDay\": {\n \"hours\": 0,\n \"minutes\": 0,\n \"nanos\": 0,\n \"seconds\": 0\n },\n \"repeatInterval\": \"\",\n \"scheduleEndDate\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"scheduleStartDate\": {},\n \"startTimeOfDay\": {}\n },\n \"status\": \"\",\n \"transferSpec\": {\n \"awsS3CompatibleDataSource\": {\n \"bucketName\": \"\",\n \"endpoint\": \"\",\n \"path\": \"\",\n \"region\": \"\",\n \"s3Metadata\": {\n \"authMethod\": \"\",\n \"listApi\": \"\",\n \"protocol\": \"\",\n \"requestModel\": \"\"\n }\n },\n \"awsS3DataSource\": {\n \"awsAccessKey\": {\n \"accessKeyId\": \"\",\n \"secretAccessKey\": \"\"\n },\n \"bucketName\": \"\",\n \"path\": \"\",\n \"roleArn\": \"\"\n },\n \"azureBlobStorageDataSource\": {\n \"azureCredentials\": {\n \"sasToken\": \"\"\n },\n \"container\": \"\",\n \"path\": \"\",\n \"storageAccount\": \"\"\n },\n \"gcsDataSink\": {\n \"bucketName\": \"\",\n \"path\": \"\"\n },\n \"gcsDataSource\": {},\n \"gcsIntermediateDataLocation\": {},\n \"httpDataSource\": {\n \"listUrl\": \"\"\n },\n \"objectConditions\": {\n \"excludePrefixes\": [],\n \"includePrefixes\": [],\n \"lastModifiedBefore\": \"\",\n \"lastModifiedSince\": \"\",\n \"maxTimeElapsedSinceLastModification\": \"\",\n \"minTimeElapsedSinceLastModification\": \"\"\n },\n \"posixDataSink\": {\n \"rootDirectory\": \"\"\n },\n \"posixDataSource\": {},\n \"sinkAgentPoolName\": \"\",\n \"sourceAgentPoolName\": \"\",\n \"transferManifest\": {\n \"location\": \"\"\n },\n \"transferOptions\": {\n \"deleteObjectsFromSourceAfterTransfer\": false,\n \"deleteObjectsUniqueInSink\": false,\n \"metadataOptions\": {\n \"acl\": \"\",\n \"gid\": \"\",\n \"kmsKey\": \"\",\n \"mode\": \"\",\n \"storageClass\": \"\",\n \"symlink\": \"\",\n \"temporaryHold\": \"\",\n \"timeCreated\": \"\",\n \"uid\": \"\"\n },\n \"overwriteObjectsAlreadyExistingInSink\": false,\n \"overwriteWhen\": \"\"\n }\n }\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/transferJobs")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1/transferJobs")
.header("content-type", "application/json")
.body("{\n \"creationTime\": \"\",\n \"deletionTime\": \"\",\n \"description\": \"\",\n \"eventStream\": {\n \"eventStreamExpirationTime\": \"\",\n \"eventStreamStartTime\": \"\",\n \"name\": \"\"\n },\n \"lastModificationTime\": \"\",\n \"latestOperationName\": \"\",\n \"loggingConfig\": {\n \"enableOnpremGcsTransferLogs\": false,\n \"logActionStates\": [],\n \"logActions\": []\n },\n \"name\": \"\",\n \"notificationConfig\": {\n \"eventTypes\": [],\n \"payloadFormat\": \"\",\n \"pubsubTopic\": \"\"\n },\n \"projectId\": \"\",\n \"schedule\": {\n \"endTimeOfDay\": {\n \"hours\": 0,\n \"minutes\": 0,\n \"nanos\": 0,\n \"seconds\": 0\n },\n \"repeatInterval\": \"\",\n \"scheduleEndDate\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"scheduleStartDate\": {},\n \"startTimeOfDay\": {}\n },\n \"status\": \"\",\n \"transferSpec\": {\n \"awsS3CompatibleDataSource\": {\n \"bucketName\": \"\",\n \"endpoint\": \"\",\n \"path\": \"\",\n \"region\": \"\",\n \"s3Metadata\": {\n \"authMethod\": \"\",\n \"listApi\": \"\",\n \"protocol\": \"\",\n \"requestModel\": \"\"\n }\n },\n \"awsS3DataSource\": {\n \"awsAccessKey\": {\n \"accessKeyId\": \"\",\n \"secretAccessKey\": \"\"\n },\n \"bucketName\": \"\",\n \"path\": \"\",\n \"roleArn\": \"\"\n },\n \"azureBlobStorageDataSource\": {\n \"azureCredentials\": {\n \"sasToken\": \"\"\n },\n \"container\": \"\",\n \"path\": \"\",\n \"storageAccount\": \"\"\n },\n \"gcsDataSink\": {\n \"bucketName\": \"\",\n \"path\": \"\"\n },\n \"gcsDataSource\": {},\n \"gcsIntermediateDataLocation\": {},\n \"httpDataSource\": {\n \"listUrl\": \"\"\n },\n \"objectConditions\": {\n \"excludePrefixes\": [],\n \"includePrefixes\": [],\n \"lastModifiedBefore\": \"\",\n \"lastModifiedSince\": \"\",\n \"maxTimeElapsedSinceLastModification\": \"\",\n \"minTimeElapsedSinceLastModification\": \"\"\n },\n \"posixDataSink\": {\n \"rootDirectory\": \"\"\n },\n \"posixDataSource\": {},\n \"sinkAgentPoolName\": \"\",\n \"sourceAgentPoolName\": \"\",\n \"transferManifest\": {\n \"location\": \"\"\n },\n \"transferOptions\": {\n \"deleteObjectsFromSourceAfterTransfer\": false,\n \"deleteObjectsUniqueInSink\": false,\n \"metadataOptions\": {\n \"acl\": \"\",\n \"gid\": \"\",\n \"kmsKey\": \"\",\n \"mode\": \"\",\n \"storageClass\": \"\",\n \"symlink\": \"\",\n \"temporaryHold\": \"\",\n \"timeCreated\": \"\",\n \"uid\": \"\"\n },\n \"overwriteObjectsAlreadyExistingInSink\": false,\n \"overwriteWhen\": \"\"\n }\n }\n}")
.asString();
const data = JSON.stringify({
creationTime: '',
deletionTime: '',
description: '',
eventStream: {
eventStreamExpirationTime: '',
eventStreamStartTime: '',
name: ''
},
lastModificationTime: '',
latestOperationName: '',
loggingConfig: {
enableOnpremGcsTransferLogs: false,
logActionStates: [],
logActions: []
},
name: '',
notificationConfig: {
eventTypes: [],
payloadFormat: '',
pubsubTopic: ''
},
projectId: '',
schedule: {
endTimeOfDay: {
hours: 0,
minutes: 0,
nanos: 0,
seconds: 0
},
repeatInterval: '',
scheduleEndDate: {
day: 0,
month: 0,
year: 0
},
scheduleStartDate: {},
startTimeOfDay: {}
},
status: '',
transferSpec: {
awsS3CompatibleDataSource: {
bucketName: '',
endpoint: '',
path: '',
region: '',
s3Metadata: {
authMethod: '',
listApi: '',
protocol: '',
requestModel: ''
}
},
awsS3DataSource: {
awsAccessKey: {
accessKeyId: '',
secretAccessKey: ''
},
bucketName: '',
path: '',
roleArn: ''
},
azureBlobStorageDataSource: {
azureCredentials: {
sasToken: ''
},
container: '',
path: '',
storageAccount: ''
},
gcsDataSink: {
bucketName: '',
path: ''
},
gcsDataSource: {},
gcsIntermediateDataLocation: {},
httpDataSource: {
listUrl: ''
},
objectConditions: {
excludePrefixes: [],
includePrefixes: [],
lastModifiedBefore: '',
lastModifiedSince: '',
maxTimeElapsedSinceLastModification: '',
minTimeElapsedSinceLastModification: ''
},
posixDataSink: {
rootDirectory: ''
},
posixDataSource: {},
sinkAgentPoolName: '',
sourceAgentPoolName: '',
transferManifest: {
location: ''
},
transferOptions: {
deleteObjectsFromSourceAfterTransfer: false,
deleteObjectsUniqueInSink: false,
metadataOptions: {
acl: '',
gid: '',
kmsKey: '',
mode: '',
storageClass: '',
symlink: '',
temporaryHold: '',
timeCreated: '',
uid: ''
},
overwriteObjectsAlreadyExistingInSink: false,
overwriteWhen: ''
}
}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v1/transferJobs');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/transferJobs',
headers: {'content-type': 'application/json'},
data: {
creationTime: '',
deletionTime: '',
description: '',
eventStream: {eventStreamExpirationTime: '', eventStreamStartTime: '', name: ''},
lastModificationTime: '',
latestOperationName: '',
loggingConfig: {enableOnpremGcsTransferLogs: false, logActionStates: [], logActions: []},
name: '',
notificationConfig: {eventTypes: [], payloadFormat: '', pubsubTopic: ''},
projectId: '',
schedule: {
endTimeOfDay: {hours: 0, minutes: 0, nanos: 0, seconds: 0},
repeatInterval: '',
scheduleEndDate: {day: 0, month: 0, year: 0},
scheduleStartDate: {},
startTimeOfDay: {}
},
status: '',
transferSpec: {
awsS3CompatibleDataSource: {
bucketName: '',
endpoint: '',
path: '',
region: '',
s3Metadata: {authMethod: '', listApi: '', protocol: '', requestModel: ''}
},
awsS3DataSource: {
awsAccessKey: {accessKeyId: '', secretAccessKey: ''},
bucketName: '',
path: '',
roleArn: ''
},
azureBlobStorageDataSource: {azureCredentials: {sasToken: ''}, container: '', path: '', storageAccount: ''},
gcsDataSink: {bucketName: '', path: ''},
gcsDataSource: {},
gcsIntermediateDataLocation: {},
httpDataSource: {listUrl: ''},
objectConditions: {
excludePrefixes: [],
includePrefixes: [],
lastModifiedBefore: '',
lastModifiedSince: '',
maxTimeElapsedSinceLastModification: '',
minTimeElapsedSinceLastModification: ''
},
posixDataSink: {rootDirectory: ''},
posixDataSource: {},
sinkAgentPoolName: '',
sourceAgentPoolName: '',
transferManifest: {location: ''},
transferOptions: {
deleteObjectsFromSourceAfterTransfer: false,
deleteObjectsUniqueInSink: false,
metadataOptions: {
acl: '',
gid: '',
kmsKey: '',
mode: '',
storageClass: '',
symlink: '',
temporaryHold: '',
timeCreated: '',
uid: ''
},
overwriteObjectsAlreadyExistingInSink: false,
overwriteWhen: ''
}
}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/transferJobs';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"creationTime":"","deletionTime":"","description":"","eventStream":{"eventStreamExpirationTime":"","eventStreamStartTime":"","name":""},"lastModificationTime":"","latestOperationName":"","loggingConfig":{"enableOnpremGcsTransferLogs":false,"logActionStates":[],"logActions":[]},"name":"","notificationConfig":{"eventTypes":[],"payloadFormat":"","pubsubTopic":""},"projectId":"","schedule":{"endTimeOfDay":{"hours":0,"minutes":0,"nanos":0,"seconds":0},"repeatInterval":"","scheduleEndDate":{"day":0,"month":0,"year":0},"scheduleStartDate":{},"startTimeOfDay":{}},"status":"","transferSpec":{"awsS3CompatibleDataSource":{"bucketName":"","endpoint":"","path":"","region":"","s3Metadata":{"authMethod":"","listApi":"","protocol":"","requestModel":""}},"awsS3DataSource":{"awsAccessKey":{"accessKeyId":"","secretAccessKey":""},"bucketName":"","path":"","roleArn":""},"azureBlobStorageDataSource":{"azureCredentials":{"sasToken":""},"container":"","path":"","storageAccount":""},"gcsDataSink":{"bucketName":"","path":""},"gcsDataSource":{},"gcsIntermediateDataLocation":{},"httpDataSource":{"listUrl":""},"objectConditions":{"excludePrefixes":[],"includePrefixes":[],"lastModifiedBefore":"","lastModifiedSince":"","maxTimeElapsedSinceLastModification":"","minTimeElapsedSinceLastModification":""},"posixDataSink":{"rootDirectory":""},"posixDataSource":{},"sinkAgentPoolName":"","sourceAgentPoolName":"","transferManifest":{"location":""},"transferOptions":{"deleteObjectsFromSourceAfterTransfer":false,"deleteObjectsUniqueInSink":false,"metadataOptions":{"acl":"","gid":"","kmsKey":"","mode":"","storageClass":"","symlink":"","temporaryHold":"","timeCreated":"","uid":""},"overwriteObjectsAlreadyExistingInSink":false,"overwriteWhen":""}}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/transferJobs',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "creationTime": "",\n "deletionTime": "",\n "description": "",\n "eventStream": {\n "eventStreamExpirationTime": "",\n "eventStreamStartTime": "",\n "name": ""\n },\n "lastModificationTime": "",\n "latestOperationName": "",\n "loggingConfig": {\n "enableOnpremGcsTransferLogs": false,\n "logActionStates": [],\n "logActions": []\n },\n "name": "",\n "notificationConfig": {\n "eventTypes": [],\n "payloadFormat": "",\n "pubsubTopic": ""\n },\n "projectId": "",\n "schedule": {\n "endTimeOfDay": {\n "hours": 0,\n "minutes": 0,\n "nanos": 0,\n "seconds": 0\n },\n "repeatInterval": "",\n "scheduleEndDate": {\n "day": 0,\n "month": 0,\n "year": 0\n },\n "scheduleStartDate": {},\n "startTimeOfDay": {}\n },\n "status": "",\n "transferSpec": {\n "awsS3CompatibleDataSource": {\n "bucketName": "",\n "endpoint": "",\n "path": "",\n "region": "",\n "s3Metadata": {\n "authMethod": "",\n "listApi": "",\n "protocol": "",\n "requestModel": ""\n }\n },\n "awsS3DataSource": {\n "awsAccessKey": {\n "accessKeyId": "",\n "secretAccessKey": ""\n },\n "bucketName": "",\n "path": "",\n "roleArn": ""\n },\n "azureBlobStorageDataSource": {\n "azureCredentials": {\n "sasToken": ""\n },\n "container": "",\n "path": "",\n "storageAccount": ""\n },\n "gcsDataSink": {\n "bucketName": "",\n "path": ""\n },\n "gcsDataSource": {},\n "gcsIntermediateDataLocation": {},\n "httpDataSource": {\n "listUrl": ""\n },\n "objectConditions": {\n "excludePrefixes": [],\n "includePrefixes": [],\n "lastModifiedBefore": "",\n "lastModifiedSince": "",\n "maxTimeElapsedSinceLastModification": "",\n "minTimeElapsedSinceLastModification": ""\n },\n "posixDataSink": {\n "rootDirectory": ""\n },\n "posixDataSource": {},\n "sinkAgentPoolName": "",\n "sourceAgentPoolName": "",\n "transferManifest": {\n "location": ""\n },\n "transferOptions": {\n "deleteObjectsFromSourceAfterTransfer": false,\n "deleteObjectsUniqueInSink": false,\n "metadataOptions": {\n "acl": "",\n "gid": "",\n "kmsKey": "",\n "mode": "",\n "storageClass": "",\n "symlink": "",\n "temporaryHold": "",\n "timeCreated": "",\n "uid": ""\n },\n "overwriteObjectsAlreadyExistingInSink": false,\n "overwriteWhen": ""\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 \"creationTime\": \"\",\n \"deletionTime\": \"\",\n \"description\": \"\",\n \"eventStream\": {\n \"eventStreamExpirationTime\": \"\",\n \"eventStreamStartTime\": \"\",\n \"name\": \"\"\n },\n \"lastModificationTime\": \"\",\n \"latestOperationName\": \"\",\n \"loggingConfig\": {\n \"enableOnpremGcsTransferLogs\": false,\n \"logActionStates\": [],\n \"logActions\": []\n },\n \"name\": \"\",\n \"notificationConfig\": {\n \"eventTypes\": [],\n \"payloadFormat\": \"\",\n \"pubsubTopic\": \"\"\n },\n \"projectId\": \"\",\n \"schedule\": {\n \"endTimeOfDay\": {\n \"hours\": 0,\n \"minutes\": 0,\n \"nanos\": 0,\n \"seconds\": 0\n },\n \"repeatInterval\": \"\",\n \"scheduleEndDate\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"scheduleStartDate\": {},\n \"startTimeOfDay\": {}\n },\n \"status\": \"\",\n \"transferSpec\": {\n \"awsS3CompatibleDataSource\": {\n \"bucketName\": \"\",\n \"endpoint\": \"\",\n \"path\": \"\",\n \"region\": \"\",\n \"s3Metadata\": {\n \"authMethod\": \"\",\n \"listApi\": \"\",\n \"protocol\": \"\",\n \"requestModel\": \"\"\n }\n },\n \"awsS3DataSource\": {\n \"awsAccessKey\": {\n \"accessKeyId\": \"\",\n \"secretAccessKey\": \"\"\n },\n \"bucketName\": \"\",\n \"path\": \"\",\n \"roleArn\": \"\"\n },\n \"azureBlobStorageDataSource\": {\n \"azureCredentials\": {\n \"sasToken\": \"\"\n },\n \"container\": \"\",\n \"path\": \"\",\n \"storageAccount\": \"\"\n },\n \"gcsDataSink\": {\n \"bucketName\": \"\",\n \"path\": \"\"\n },\n \"gcsDataSource\": {},\n \"gcsIntermediateDataLocation\": {},\n \"httpDataSource\": {\n \"listUrl\": \"\"\n },\n \"objectConditions\": {\n \"excludePrefixes\": [],\n \"includePrefixes\": [],\n \"lastModifiedBefore\": \"\",\n \"lastModifiedSince\": \"\",\n \"maxTimeElapsedSinceLastModification\": \"\",\n \"minTimeElapsedSinceLastModification\": \"\"\n },\n \"posixDataSink\": {\n \"rootDirectory\": \"\"\n },\n \"posixDataSource\": {},\n \"sinkAgentPoolName\": \"\",\n \"sourceAgentPoolName\": \"\",\n \"transferManifest\": {\n \"location\": \"\"\n },\n \"transferOptions\": {\n \"deleteObjectsFromSourceAfterTransfer\": false,\n \"deleteObjectsUniqueInSink\": false,\n \"metadataOptions\": {\n \"acl\": \"\",\n \"gid\": \"\",\n \"kmsKey\": \"\",\n \"mode\": \"\",\n \"storageClass\": \"\",\n \"symlink\": \"\",\n \"temporaryHold\": \"\",\n \"timeCreated\": \"\",\n \"uid\": \"\"\n },\n \"overwriteObjectsAlreadyExistingInSink\": false,\n \"overwriteWhen\": \"\"\n }\n }\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1/transferJobs")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/transferJobs',
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({
creationTime: '',
deletionTime: '',
description: '',
eventStream: {eventStreamExpirationTime: '', eventStreamStartTime: '', name: ''},
lastModificationTime: '',
latestOperationName: '',
loggingConfig: {enableOnpremGcsTransferLogs: false, logActionStates: [], logActions: []},
name: '',
notificationConfig: {eventTypes: [], payloadFormat: '', pubsubTopic: ''},
projectId: '',
schedule: {
endTimeOfDay: {hours: 0, minutes: 0, nanos: 0, seconds: 0},
repeatInterval: '',
scheduleEndDate: {day: 0, month: 0, year: 0},
scheduleStartDate: {},
startTimeOfDay: {}
},
status: '',
transferSpec: {
awsS3CompatibleDataSource: {
bucketName: '',
endpoint: '',
path: '',
region: '',
s3Metadata: {authMethod: '', listApi: '', protocol: '', requestModel: ''}
},
awsS3DataSource: {
awsAccessKey: {accessKeyId: '', secretAccessKey: ''},
bucketName: '',
path: '',
roleArn: ''
},
azureBlobStorageDataSource: {azureCredentials: {sasToken: ''}, container: '', path: '', storageAccount: ''},
gcsDataSink: {bucketName: '', path: ''},
gcsDataSource: {},
gcsIntermediateDataLocation: {},
httpDataSource: {listUrl: ''},
objectConditions: {
excludePrefixes: [],
includePrefixes: [],
lastModifiedBefore: '',
lastModifiedSince: '',
maxTimeElapsedSinceLastModification: '',
minTimeElapsedSinceLastModification: ''
},
posixDataSink: {rootDirectory: ''},
posixDataSource: {},
sinkAgentPoolName: '',
sourceAgentPoolName: '',
transferManifest: {location: ''},
transferOptions: {
deleteObjectsFromSourceAfterTransfer: false,
deleteObjectsUniqueInSink: false,
metadataOptions: {
acl: '',
gid: '',
kmsKey: '',
mode: '',
storageClass: '',
symlink: '',
temporaryHold: '',
timeCreated: '',
uid: ''
},
overwriteObjectsAlreadyExistingInSink: false,
overwriteWhen: ''
}
}
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/transferJobs',
headers: {'content-type': 'application/json'},
body: {
creationTime: '',
deletionTime: '',
description: '',
eventStream: {eventStreamExpirationTime: '', eventStreamStartTime: '', name: ''},
lastModificationTime: '',
latestOperationName: '',
loggingConfig: {enableOnpremGcsTransferLogs: false, logActionStates: [], logActions: []},
name: '',
notificationConfig: {eventTypes: [], payloadFormat: '', pubsubTopic: ''},
projectId: '',
schedule: {
endTimeOfDay: {hours: 0, minutes: 0, nanos: 0, seconds: 0},
repeatInterval: '',
scheduleEndDate: {day: 0, month: 0, year: 0},
scheduleStartDate: {},
startTimeOfDay: {}
},
status: '',
transferSpec: {
awsS3CompatibleDataSource: {
bucketName: '',
endpoint: '',
path: '',
region: '',
s3Metadata: {authMethod: '', listApi: '', protocol: '', requestModel: ''}
},
awsS3DataSource: {
awsAccessKey: {accessKeyId: '', secretAccessKey: ''},
bucketName: '',
path: '',
roleArn: ''
},
azureBlobStorageDataSource: {azureCredentials: {sasToken: ''}, container: '', path: '', storageAccount: ''},
gcsDataSink: {bucketName: '', path: ''},
gcsDataSource: {},
gcsIntermediateDataLocation: {},
httpDataSource: {listUrl: ''},
objectConditions: {
excludePrefixes: [],
includePrefixes: [],
lastModifiedBefore: '',
lastModifiedSince: '',
maxTimeElapsedSinceLastModification: '',
minTimeElapsedSinceLastModification: ''
},
posixDataSink: {rootDirectory: ''},
posixDataSource: {},
sinkAgentPoolName: '',
sourceAgentPoolName: '',
transferManifest: {location: ''},
transferOptions: {
deleteObjectsFromSourceAfterTransfer: false,
deleteObjectsUniqueInSink: false,
metadataOptions: {
acl: '',
gid: '',
kmsKey: '',
mode: '',
storageClass: '',
symlink: '',
temporaryHold: '',
timeCreated: '',
uid: ''
},
overwriteObjectsAlreadyExistingInSink: false,
overwriteWhen: ''
}
}
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/v1/transferJobs');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
creationTime: '',
deletionTime: '',
description: '',
eventStream: {
eventStreamExpirationTime: '',
eventStreamStartTime: '',
name: ''
},
lastModificationTime: '',
latestOperationName: '',
loggingConfig: {
enableOnpremGcsTransferLogs: false,
logActionStates: [],
logActions: []
},
name: '',
notificationConfig: {
eventTypes: [],
payloadFormat: '',
pubsubTopic: ''
},
projectId: '',
schedule: {
endTimeOfDay: {
hours: 0,
minutes: 0,
nanos: 0,
seconds: 0
},
repeatInterval: '',
scheduleEndDate: {
day: 0,
month: 0,
year: 0
},
scheduleStartDate: {},
startTimeOfDay: {}
},
status: '',
transferSpec: {
awsS3CompatibleDataSource: {
bucketName: '',
endpoint: '',
path: '',
region: '',
s3Metadata: {
authMethod: '',
listApi: '',
protocol: '',
requestModel: ''
}
},
awsS3DataSource: {
awsAccessKey: {
accessKeyId: '',
secretAccessKey: ''
},
bucketName: '',
path: '',
roleArn: ''
},
azureBlobStorageDataSource: {
azureCredentials: {
sasToken: ''
},
container: '',
path: '',
storageAccount: ''
},
gcsDataSink: {
bucketName: '',
path: ''
},
gcsDataSource: {},
gcsIntermediateDataLocation: {},
httpDataSource: {
listUrl: ''
},
objectConditions: {
excludePrefixes: [],
includePrefixes: [],
lastModifiedBefore: '',
lastModifiedSince: '',
maxTimeElapsedSinceLastModification: '',
minTimeElapsedSinceLastModification: ''
},
posixDataSink: {
rootDirectory: ''
},
posixDataSource: {},
sinkAgentPoolName: '',
sourceAgentPoolName: '',
transferManifest: {
location: ''
},
transferOptions: {
deleteObjectsFromSourceAfterTransfer: false,
deleteObjectsUniqueInSink: false,
metadataOptions: {
acl: '',
gid: '',
kmsKey: '',
mode: '',
storageClass: '',
symlink: '',
temporaryHold: '',
timeCreated: '',
uid: ''
},
overwriteObjectsAlreadyExistingInSink: false,
overwriteWhen: ''
}
}
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/transferJobs',
headers: {'content-type': 'application/json'},
data: {
creationTime: '',
deletionTime: '',
description: '',
eventStream: {eventStreamExpirationTime: '', eventStreamStartTime: '', name: ''},
lastModificationTime: '',
latestOperationName: '',
loggingConfig: {enableOnpremGcsTransferLogs: false, logActionStates: [], logActions: []},
name: '',
notificationConfig: {eventTypes: [], payloadFormat: '', pubsubTopic: ''},
projectId: '',
schedule: {
endTimeOfDay: {hours: 0, minutes: 0, nanos: 0, seconds: 0},
repeatInterval: '',
scheduleEndDate: {day: 0, month: 0, year: 0},
scheduleStartDate: {},
startTimeOfDay: {}
},
status: '',
transferSpec: {
awsS3CompatibleDataSource: {
bucketName: '',
endpoint: '',
path: '',
region: '',
s3Metadata: {authMethod: '', listApi: '', protocol: '', requestModel: ''}
},
awsS3DataSource: {
awsAccessKey: {accessKeyId: '', secretAccessKey: ''},
bucketName: '',
path: '',
roleArn: ''
},
azureBlobStorageDataSource: {azureCredentials: {sasToken: ''}, container: '', path: '', storageAccount: ''},
gcsDataSink: {bucketName: '', path: ''},
gcsDataSource: {},
gcsIntermediateDataLocation: {},
httpDataSource: {listUrl: ''},
objectConditions: {
excludePrefixes: [],
includePrefixes: [],
lastModifiedBefore: '',
lastModifiedSince: '',
maxTimeElapsedSinceLastModification: '',
minTimeElapsedSinceLastModification: ''
},
posixDataSink: {rootDirectory: ''},
posixDataSource: {},
sinkAgentPoolName: '',
sourceAgentPoolName: '',
transferManifest: {location: ''},
transferOptions: {
deleteObjectsFromSourceAfterTransfer: false,
deleteObjectsUniqueInSink: false,
metadataOptions: {
acl: '',
gid: '',
kmsKey: '',
mode: '',
storageClass: '',
symlink: '',
temporaryHold: '',
timeCreated: '',
uid: ''
},
overwriteObjectsAlreadyExistingInSink: false,
overwriteWhen: ''
}
}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/transferJobs';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"creationTime":"","deletionTime":"","description":"","eventStream":{"eventStreamExpirationTime":"","eventStreamStartTime":"","name":""},"lastModificationTime":"","latestOperationName":"","loggingConfig":{"enableOnpremGcsTransferLogs":false,"logActionStates":[],"logActions":[]},"name":"","notificationConfig":{"eventTypes":[],"payloadFormat":"","pubsubTopic":""},"projectId":"","schedule":{"endTimeOfDay":{"hours":0,"minutes":0,"nanos":0,"seconds":0},"repeatInterval":"","scheduleEndDate":{"day":0,"month":0,"year":0},"scheduleStartDate":{},"startTimeOfDay":{}},"status":"","transferSpec":{"awsS3CompatibleDataSource":{"bucketName":"","endpoint":"","path":"","region":"","s3Metadata":{"authMethod":"","listApi":"","protocol":"","requestModel":""}},"awsS3DataSource":{"awsAccessKey":{"accessKeyId":"","secretAccessKey":""},"bucketName":"","path":"","roleArn":""},"azureBlobStorageDataSource":{"azureCredentials":{"sasToken":""},"container":"","path":"","storageAccount":""},"gcsDataSink":{"bucketName":"","path":""},"gcsDataSource":{},"gcsIntermediateDataLocation":{},"httpDataSource":{"listUrl":""},"objectConditions":{"excludePrefixes":[],"includePrefixes":[],"lastModifiedBefore":"","lastModifiedSince":"","maxTimeElapsedSinceLastModification":"","minTimeElapsedSinceLastModification":""},"posixDataSink":{"rootDirectory":""},"posixDataSource":{},"sinkAgentPoolName":"","sourceAgentPoolName":"","transferManifest":{"location":""},"transferOptions":{"deleteObjectsFromSourceAfterTransfer":false,"deleteObjectsUniqueInSink":false,"metadataOptions":{"acl":"","gid":"","kmsKey":"","mode":"","storageClass":"","symlink":"","temporaryHold":"","timeCreated":"","uid":""},"overwriteObjectsAlreadyExistingInSink":false,"overwriteWhen":""}}}'
};
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 = @{ @"creationTime": @"",
@"deletionTime": @"",
@"description": @"",
@"eventStream": @{ @"eventStreamExpirationTime": @"", @"eventStreamStartTime": @"", @"name": @"" },
@"lastModificationTime": @"",
@"latestOperationName": @"",
@"loggingConfig": @{ @"enableOnpremGcsTransferLogs": @NO, @"logActionStates": @[ ], @"logActions": @[ ] },
@"name": @"",
@"notificationConfig": @{ @"eventTypes": @[ ], @"payloadFormat": @"", @"pubsubTopic": @"" },
@"projectId": @"",
@"schedule": @{ @"endTimeOfDay": @{ @"hours": @0, @"minutes": @0, @"nanos": @0, @"seconds": @0 }, @"repeatInterval": @"", @"scheduleEndDate": @{ @"day": @0, @"month": @0, @"year": @0 }, @"scheduleStartDate": @{ }, @"startTimeOfDay": @{ } },
@"status": @"",
@"transferSpec": @{ @"awsS3CompatibleDataSource": @{ @"bucketName": @"", @"endpoint": @"", @"path": @"", @"region": @"", @"s3Metadata": @{ @"authMethod": @"", @"listApi": @"", @"protocol": @"", @"requestModel": @"" } }, @"awsS3DataSource": @{ @"awsAccessKey": @{ @"accessKeyId": @"", @"secretAccessKey": @"" }, @"bucketName": @"", @"path": @"", @"roleArn": @"" }, @"azureBlobStorageDataSource": @{ @"azureCredentials": @{ @"sasToken": @"" }, @"container": @"", @"path": @"", @"storageAccount": @"" }, @"gcsDataSink": @{ @"bucketName": @"", @"path": @"" }, @"gcsDataSource": @{ }, @"gcsIntermediateDataLocation": @{ }, @"httpDataSource": @{ @"listUrl": @"" }, @"objectConditions": @{ @"excludePrefixes": @[ ], @"includePrefixes": @[ ], @"lastModifiedBefore": @"", @"lastModifiedSince": @"", @"maxTimeElapsedSinceLastModification": @"", @"minTimeElapsedSinceLastModification": @"" }, @"posixDataSink": @{ @"rootDirectory": @"" }, @"posixDataSource": @{ }, @"sinkAgentPoolName": @"", @"sourceAgentPoolName": @"", @"transferManifest": @{ @"location": @"" }, @"transferOptions": @{ @"deleteObjectsFromSourceAfterTransfer": @NO, @"deleteObjectsUniqueInSink": @NO, @"metadataOptions": @{ @"acl": @"", @"gid": @"", @"kmsKey": @"", @"mode": @"", @"storageClass": @"", @"symlink": @"", @"temporaryHold": @"", @"timeCreated": @"", @"uid": @"" }, @"overwriteObjectsAlreadyExistingInSink": @NO, @"overwriteWhen": @"" } } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/transferJobs"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/transferJobs" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"creationTime\": \"\",\n \"deletionTime\": \"\",\n \"description\": \"\",\n \"eventStream\": {\n \"eventStreamExpirationTime\": \"\",\n \"eventStreamStartTime\": \"\",\n \"name\": \"\"\n },\n \"lastModificationTime\": \"\",\n \"latestOperationName\": \"\",\n \"loggingConfig\": {\n \"enableOnpremGcsTransferLogs\": false,\n \"logActionStates\": [],\n \"logActions\": []\n },\n \"name\": \"\",\n \"notificationConfig\": {\n \"eventTypes\": [],\n \"payloadFormat\": \"\",\n \"pubsubTopic\": \"\"\n },\n \"projectId\": \"\",\n \"schedule\": {\n \"endTimeOfDay\": {\n \"hours\": 0,\n \"minutes\": 0,\n \"nanos\": 0,\n \"seconds\": 0\n },\n \"repeatInterval\": \"\",\n \"scheduleEndDate\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"scheduleStartDate\": {},\n \"startTimeOfDay\": {}\n },\n \"status\": \"\",\n \"transferSpec\": {\n \"awsS3CompatibleDataSource\": {\n \"bucketName\": \"\",\n \"endpoint\": \"\",\n \"path\": \"\",\n \"region\": \"\",\n \"s3Metadata\": {\n \"authMethod\": \"\",\n \"listApi\": \"\",\n \"protocol\": \"\",\n \"requestModel\": \"\"\n }\n },\n \"awsS3DataSource\": {\n \"awsAccessKey\": {\n \"accessKeyId\": \"\",\n \"secretAccessKey\": \"\"\n },\n \"bucketName\": \"\",\n \"path\": \"\",\n \"roleArn\": \"\"\n },\n \"azureBlobStorageDataSource\": {\n \"azureCredentials\": {\n \"sasToken\": \"\"\n },\n \"container\": \"\",\n \"path\": \"\",\n \"storageAccount\": \"\"\n },\n \"gcsDataSink\": {\n \"bucketName\": \"\",\n \"path\": \"\"\n },\n \"gcsDataSource\": {},\n \"gcsIntermediateDataLocation\": {},\n \"httpDataSource\": {\n \"listUrl\": \"\"\n },\n \"objectConditions\": {\n \"excludePrefixes\": [],\n \"includePrefixes\": [],\n \"lastModifiedBefore\": \"\",\n \"lastModifiedSince\": \"\",\n \"maxTimeElapsedSinceLastModification\": \"\",\n \"minTimeElapsedSinceLastModification\": \"\"\n },\n \"posixDataSink\": {\n \"rootDirectory\": \"\"\n },\n \"posixDataSource\": {},\n \"sinkAgentPoolName\": \"\",\n \"sourceAgentPoolName\": \"\",\n \"transferManifest\": {\n \"location\": \"\"\n },\n \"transferOptions\": {\n \"deleteObjectsFromSourceAfterTransfer\": false,\n \"deleteObjectsUniqueInSink\": false,\n \"metadataOptions\": {\n \"acl\": \"\",\n \"gid\": \"\",\n \"kmsKey\": \"\",\n \"mode\": \"\",\n \"storageClass\": \"\",\n \"symlink\": \"\",\n \"temporaryHold\": \"\",\n \"timeCreated\": \"\",\n \"uid\": \"\"\n },\n \"overwriteObjectsAlreadyExistingInSink\": false,\n \"overwriteWhen\": \"\"\n }\n }\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/transferJobs",
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([
'creationTime' => '',
'deletionTime' => '',
'description' => '',
'eventStream' => [
'eventStreamExpirationTime' => '',
'eventStreamStartTime' => '',
'name' => ''
],
'lastModificationTime' => '',
'latestOperationName' => '',
'loggingConfig' => [
'enableOnpremGcsTransferLogs' => null,
'logActionStates' => [
],
'logActions' => [
]
],
'name' => '',
'notificationConfig' => [
'eventTypes' => [
],
'payloadFormat' => '',
'pubsubTopic' => ''
],
'projectId' => '',
'schedule' => [
'endTimeOfDay' => [
'hours' => 0,
'minutes' => 0,
'nanos' => 0,
'seconds' => 0
],
'repeatInterval' => '',
'scheduleEndDate' => [
'day' => 0,
'month' => 0,
'year' => 0
],
'scheduleStartDate' => [
],
'startTimeOfDay' => [
]
],
'status' => '',
'transferSpec' => [
'awsS3CompatibleDataSource' => [
'bucketName' => '',
'endpoint' => '',
'path' => '',
'region' => '',
's3Metadata' => [
'authMethod' => '',
'listApi' => '',
'protocol' => '',
'requestModel' => ''
]
],
'awsS3DataSource' => [
'awsAccessKey' => [
'accessKeyId' => '',
'secretAccessKey' => ''
],
'bucketName' => '',
'path' => '',
'roleArn' => ''
],
'azureBlobStorageDataSource' => [
'azureCredentials' => [
'sasToken' => ''
],
'container' => '',
'path' => '',
'storageAccount' => ''
],
'gcsDataSink' => [
'bucketName' => '',
'path' => ''
],
'gcsDataSource' => [
],
'gcsIntermediateDataLocation' => [
],
'httpDataSource' => [
'listUrl' => ''
],
'objectConditions' => [
'excludePrefixes' => [
],
'includePrefixes' => [
],
'lastModifiedBefore' => '',
'lastModifiedSince' => '',
'maxTimeElapsedSinceLastModification' => '',
'minTimeElapsedSinceLastModification' => ''
],
'posixDataSink' => [
'rootDirectory' => ''
],
'posixDataSource' => [
],
'sinkAgentPoolName' => '',
'sourceAgentPoolName' => '',
'transferManifest' => [
'location' => ''
],
'transferOptions' => [
'deleteObjectsFromSourceAfterTransfer' => null,
'deleteObjectsUniqueInSink' => null,
'metadataOptions' => [
'acl' => '',
'gid' => '',
'kmsKey' => '',
'mode' => '',
'storageClass' => '',
'symlink' => '',
'temporaryHold' => '',
'timeCreated' => '',
'uid' => ''
],
'overwriteObjectsAlreadyExistingInSink' => null,
'overwriteWhen' => ''
]
]
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/v1/transferJobs', [
'body' => '{
"creationTime": "",
"deletionTime": "",
"description": "",
"eventStream": {
"eventStreamExpirationTime": "",
"eventStreamStartTime": "",
"name": ""
},
"lastModificationTime": "",
"latestOperationName": "",
"loggingConfig": {
"enableOnpremGcsTransferLogs": false,
"logActionStates": [],
"logActions": []
},
"name": "",
"notificationConfig": {
"eventTypes": [],
"payloadFormat": "",
"pubsubTopic": ""
},
"projectId": "",
"schedule": {
"endTimeOfDay": {
"hours": 0,
"minutes": 0,
"nanos": 0,
"seconds": 0
},
"repeatInterval": "",
"scheduleEndDate": {
"day": 0,
"month": 0,
"year": 0
},
"scheduleStartDate": {},
"startTimeOfDay": {}
},
"status": "",
"transferSpec": {
"awsS3CompatibleDataSource": {
"bucketName": "",
"endpoint": "",
"path": "",
"region": "",
"s3Metadata": {
"authMethod": "",
"listApi": "",
"protocol": "",
"requestModel": ""
}
},
"awsS3DataSource": {
"awsAccessKey": {
"accessKeyId": "",
"secretAccessKey": ""
},
"bucketName": "",
"path": "",
"roleArn": ""
},
"azureBlobStorageDataSource": {
"azureCredentials": {
"sasToken": ""
},
"container": "",
"path": "",
"storageAccount": ""
},
"gcsDataSink": {
"bucketName": "",
"path": ""
},
"gcsDataSource": {},
"gcsIntermediateDataLocation": {},
"httpDataSource": {
"listUrl": ""
},
"objectConditions": {
"excludePrefixes": [],
"includePrefixes": [],
"lastModifiedBefore": "",
"lastModifiedSince": "",
"maxTimeElapsedSinceLastModification": "",
"minTimeElapsedSinceLastModification": ""
},
"posixDataSink": {
"rootDirectory": ""
},
"posixDataSource": {},
"sinkAgentPoolName": "",
"sourceAgentPoolName": "",
"transferManifest": {
"location": ""
},
"transferOptions": {
"deleteObjectsFromSourceAfterTransfer": false,
"deleteObjectsUniqueInSink": false,
"metadataOptions": {
"acl": "",
"gid": "",
"kmsKey": "",
"mode": "",
"storageClass": "",
"symlink": "",
"temporaryHold": "",
"timeCreated": "",
"uid": ""
},
"overwriteObjectsAlreadyExistingInSink": false,
"overwriteWhen": ""
}
}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1/transferJobs');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'creationTime' => '',
'deletionTime' => '',
'description' => '',
'eventStream' => [
'eventStreamExpirationTime' => '',
'eventStreamStartTime' => '',
'name' => ''
],
'lastModificationTime' => '',
'latestOperationName' => '',
'loggingConfig' => [
'enableOnpremGcsTransferLogs' => null,
'logActionStates' => [
],
'logActions' => [
]
],
'name' => '',
'notificationConfig' => [
'eventTypes' => [
],
'payloadFormat' => '',
'pubsubTopic' => ''
],
'projectId' => '',
'schedule' => [
'endTimeOfDay' => [
'hours' => 0,
'minutes' => 0,
'nanos' => 0,
'seconds' => 0
],
'repeatInterval' => '',
'scheduleEndDate' => [
'day' => 0,
'month' => 0,
'year' => 0
],
'scheduleStartDate' => [
],
'startTimeOfDay' => [
]
],
'status' => '',
'transferSpec' => [
'awsS3CompatibleDataSource' => [
'bucketName' => '',
'endpoint' => '',
'path' => '',
'region' => '',
's3Metadata' => [
'authMethod' => '',
'listApi' => '',
'protocol' => '',
'requestModel' => ''
]
],
'awsS3DataSource' => [
'awsAccessKey' => [
'accessKeyId' => '',
'secretAccessKey' => ''
],
'bucketName' => '',
'path' => '',
'roleArn' => ''
],
'azureBlobStorageDataSource' => [
'azureCredentials' => [
'sasToken' => ''
],
'container' => '',
'path' => '',
'storageAccount' => ''
],
'gcsDataSink' => [
'bucketName' => '',
'path' => ''
],
'gcsDataSource' => [
],
'gcsIntermediateDataLocation' => [
],
'httpDataSource' => [
'listUrl' => ''
],
'objectConditions' => [
'excludePrefixes' => [
],
'includePrefixes' => [
],
'lastModifiedBefore' => '',
'lastModifiedSince' => '',
'maxTimeElapsedSinceLastModification' => '',
'minTimeElapsedSinceLastModification' => ''
],
'posixDataSink' => [
'rootDirectory' => ''
],
'posixDataSource' => [
],
'sinkAgentPoolName' => '',
'sourceAgentPoolName' => '',
'transferManifest' => [
'location' => ''
],
'transferOptions' => [
'deleteObjectsFromSourceAfterTransfer' => null,
'deleteObjectsUniqueInSink' => null,
'metadataOptions' => [
'acl' => '',
'gid' => '',
'kmsKey' => '',
'mode' => '',
'storageClass' => '',
'symlink' => '',
'temporaryHold' => '',
'timeCreated' => '',
'uid' => ''
],
'overwriteObjectsAlreadyExistingInSink' => null,
'overwriteWhen' => ''
]
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'creationTime' => '',
'deletionTime' => '',
'description' => '',
'eventStream' => [
'eventStreamExpirationTime' => '',
'eventStreamStartTime' => '',
'name' => ''
],
'lastModificationTime' => '',
'latestOperationName' => '',
'loggingConfig' => [
'enableOnpremGcsTransferLogs' => null,
'logActionStates' => [
],
'logActions' => [
]
],
'name' => '',
'notificationConfig' => [
'eventTypes' => [
],
'payloadFormat' => '',
'pubsubTopic' => ''
],
'projectId' => '',
'schedule' => [
'endTimeOfDay' => [
'hours' => 0,
'minutes' => 0,
'nanos' => 0,
'seconds' => 0
],
'repeatInterval' => '',
'scheduleEndDate' => [
'day' => 0,
'month' => 0,
'year' => 0
],
'scheduleStartDate' => [
],
'startTimeOfDay' => [
]
],
'status' => '',
'transferSpec' => [
'awsS3CompatibleDataSource' => [
'bucketName' => '',
'endpoint' => '',
'path' => '',
'region' => '',
's3Metadata' => [
'authMethod' => '',
'listApi' => '',
'protocol' => '',
'requestModel' => ''
]
],
'awsS3DataSource' => [
'awsAccessKey' => [
'accessKeyId' => '',
'secretAccessKey' => ''
],
'bucketName' => '',
'path' => '',
'roleArn' => ''
],
'azureBlobStorageDataSource' => [
'azureCredentials' => [
'sasToken' => ''
],
'container' => '',
'path' => '',
'storageAccount' => ''
],
'gcsDataSink' => [
'bucketName' => '',
'path' => ''
],
'gcsDataSource' => [
],
'gcsIntermediateDataLocation' => [
],
'httpDataSource' => [
'listUrl' => ''
],
'objectConditions' => [
'excludePrefixes' => [
],
'includePrefixes' => [
],
'lastModifiedBefore' => '',
'lastModifiedSince' => '',
'maxTimeElapsedSinceLastModification' => '',
'minTimeElapsedSinceLastModification' => ''
],
'posixDataSink' => [
'rootDirectory' => ''
],
'posixDataSource' => [
],
'sinkAgentPoolName' => '',
'sourceAgentPoolName' => '',
'transferManifest' => [
'location' => ''
],
'transferOptions' => [
'deleteObjectsFromSourceAfterTransfer' => null,
'deleteObjectsUniqueInSink' => null,
'metadataOptions' => [
'acl' => '',
'gid' => '',
'kmsKey' => '',
'mode' => '',
'storageClass' => '',
'symlink' => '',
'temporaryHold' => '',
'timeCreated' => '',
'uid' => ''
],
'overwriteObjectsAlreadyExistingInSink' => null,
'overwriteWhen' => ''
]
]
]));
$request->setRequestUrl('{{baseUrl}}/v1/transferJobs');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/transferJobs' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"creationTime": "",
"deletionTime": "",
"description": "",
"eventStream": {
"eventStreamExpirationTime": "",
"eventStreamStartTime": "",
"name": ""
},
"lastModificationTime": "",
"latestOperationName": "",
"loggingConfig": {
"enableOnpremGcsTransferLogs": false,
"logActionStates": [],
"logActions": []
},
"name": "",
"notificationConfig": {
"eventTypes": [],
"payloadFormat": "",
"pubsubTopic": ""
},
"projectId": "",
"schedule": {
"endTimeOfDay": {
"hours": 0,
"minutes": 0,
"nanos": 0,
"seconds": 0
},
"repeatInterval": "",
"scheduleEndDate": {
"day": 0,
"month": 0,
"year": 0
},
"scheduleStartDate": {},
"startTimeOfDay": {}
},
"status": "",
"transferSpec": {
"awsS3CompatibleDataSource": {
"bucketName": "",
"endpoint": "",
"path": "",
"region": "",
"s3Metadata": {
"authMethod": "",
"listApi": "",
"protocol": "",
"requestModel": ""
}
},
"awsS3DataSource": {
"awsAccessKey": {
"accessKeyId": "",
"secretAccessKey": ""
},
"bucketName": "",
"path": "",
"roleArn": ""
},
"azureBlobStorageDataSource": {
"azureCredentials": {
"sasToken": ""
},
"container": "",
"path": "",
"storageAccount": ""
},
"gcsDataSink": {
"bucketName": "",
"path": ""
},
"gcsDataSource": {},
"gcsIntermediateDataLocation": {},
"httpDataSource": {
"listUrl": ""
},
"objectConditions": {
"excludePrefixes": [],
"includePrefixes": [],
"lastModifiedBefore": "",
"lastModifiedSince": "",
"maxTimeElapsedSinceLastModification": "",
"minTimeElapsedSinceLastModification": ""
},
"posixDataSink": {
"rootDirectory": ""
},
"posixDataSource": {},
"sinkAgentPoolName": "",
"sourceAgentPoolName": "",
"transferManifest": {
"location": ""
},
"transferOptions": {
"deleteObjectsFromSourceAfterTransfer": false,
"deleteObjectsUniqueInSink": false,
"metadataOptions": {
"acl": "",
"gid": "",
"kmsKey": "",
"mode": "",
"storageClass": "",
"symlink": "",
"temporaryHold": "",
"timeCreated": "",
"uid": ""
},
"overwriteObjectsAlreadyExistingInSink": false,
"overwriteWhen": ""
}
}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/transferJobs' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"creationTime": "",
"deletionTime": "",
"description": "",
"eventStream": {
"eventStreamExpirationTime": "",
"eventStreamStartTime": "",
"name": ""
},
"lastModificationTime": "",
"latestOperationName": "",
"loggingConfig": {
"enableOnpremGcsTransferLogs": false,
"logActionStates": [],
"logActions": []
},
"name": "",
"notificationConfig": {
"eventTypes": [],
"payloadFormat": "",
"pubsubTopic": ""
},
"projectId": "",
"schedule": {
"endTimeOfDay": {
"hours": 0,
"minutes": 0,
"nanos": 0,
"seconds": 0
},
"repeatInterval": "",
"scheduleEndDate": {
"day": 0,
"month": 0,
"year": 0
},
"scheduleStartDate": {},
"startTimeOfDay": {}
},
"status": "",
"transferSpec": {
"awsS3CompatibleDataSource": {
"bucketName": "",
"endpoint": "",
"path": "",
"region": "",
"s3Metadata": {
"authMethod": "",
"listApi": "",
"protocol": "",
"requestModel": ""
}
},
"awsS3DataSource": {
"awsAccessKey": {
"accessKeyId": "",
"secretAccessKey": ""
},
"bucketName": "",
"path": "",
"roleArn": ""
},
"azureBlobStorageDataSource": {
"azureCredentials": {
"sasToken": ""
},
"container": "",
"path": "",
"storageAccount": ""
},
"gcsDataSink": {
"bucketName": "",
"path": ""
},
"gcsDataSource": {},
"gcsIntermediateDataLocation": {},
"httpDataSource": {
"listUrl": ""
},
"objectConditions": {
"excludePrefixes": [],
"includePrefixes": [],
"lastModifiedBefore": "",
"lastModifiedSince": "",
"maxTimeElapsedSinceLastModification": "",
"minTimeElapsedSinceLastModification": ""
},
"posixDataSink": {
"rootDirectory": ""
},
"posixDataSource": {},
"sinkAgentPoolName": "",
"sourceAgentPoolName": "",
"transferManifest": {
"location": ""
},
"transferOptions": {
"deleteObjectsFromSourceAfterTransfer": false,
"deleteObjectsUniqueInSink": false,
"metadataOptions": {
"acl": "",
"gid": "",
"kmsKey": "",
"mode": "",
"storageClass": "",
"symlink": "",
"temporaryHold": "",
"timeCreated": "",
"uid": ""
},
"overwriteObjectsAlreadyExistingInSink": false,
"overwriteWhen": ""
}
}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"creationTime\": \"\",\n \"deletionTime\": \"\",\n \"description\": \"\",\n \"eventStream\": {\n \"eventStreamExpirationTime\": \"\",\n \"eventStreamStartTime\": \"\",\n \"name\": \"\"\n },\n \"lastModificationTime\": \"\",\n \"latestOperationName\": \"\",\n \"loggingConfig\": {\n \"enableOnpremGcsTransferLogs\": false,\n \"logActionStates\": [],\n \"logActions\": []\n },\n \"name\": \"\",\n \"notificationConfig\": {\n \"eventTypes\": [],\n \"payloadFormat\": \"\",\n \"pubsubTopic\": \"\"\n },\n \"projectId\": \"\",\n \"schedule\": {\n \"endTimeOfDay\": {\n \"hours\": 0,\n \"minutes\": 0,\n \"nanos\": 0,\n \"seconds\": 0\n },\n \"repeatInterval\": \"\",\n \"scheduleEndDate\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"scheduleStartDate\": {},\n \"startTimeOfDay\": {}\n },\n \"status\": \"\",\n \"transferSpec\": {\n \"awsS3CompatibleDataSource\": {\n \"bucketName\": \"\",\n \"endpoint\": \"\",\n \"path\": \"\",\n \"region\": \"\",\n \"s3Metadata\": {\n \"authMethod\": \"\",\n \"listApi\": \"\",\n \"protocol\": \"\",\n \"requestModel\": \"\"\n }\n },\n \"awsS3DataSource\": {\n \"awsAccessKey\": {\n \"accessKeyId\": \"\",\n \"secretAccessKey\": \"\"\n },\n \"bucketName\": \"\",\n \"path\": \"\",\n \"roleArn\": \"\"\n },\n \"azureBlobStorageDataSource\": {\n \"azureCredentials\": {\n \"sasToken\": \"\"\n },\n \"container\": \"\",\n \"path\": \"\",\n \"storageAccount\": \"\"\n },\n \"gcsDataSink\": {\n \"bucketName\": \"\",\n \"path\": \"\"\n },\n \"gcsDataSource\": {},\n \"gcsIntermediateDataLocation\": {},\n \"httpDataSource\": {\n \"listUrl\": \"\"\n },\n \"objectConditions\": {\n \"excludePrefixes\": [],\n \"includePrefixes\": [],\n \"lastModifiedBefore\": \"\",\n \"lastModifiedSince\": \"\",\n \"maxTimeElapsedSinceLastModification\": \"\",\n \"minTimeElapsedSinceLastModification\": \"\"\n },\n \"posixDataSink\": {\n \"rootDirectory\": \"\"\n },\n \"posixDataSource\": {},\n \"sinkAgentPoolName\": \"\",\n \"sourceAgentPoolName\": \"\",\n \"transferManifest\": {\n \"location\": \"\"\n },\n \"transferOptions\": {\n \"deleteObjectsFromSourceAfterTransfer\": false,\n \"deleteObjectsUniqueInSink\": false,\n \"metadataOptions\": {\n \"acl\": \"\",\n \"gid\": \"\",\n \"kmsKey\": \"\",\n \"mode\": \"\",\n \"storageClass\": \"\",\n \"symlink\": \"\",\n \"temporaryHold\": \"\",\n \"timeCreated\": \"\",\n \"uid\": \"\"\n },\n \"overwriteObjectsAlreadyExistingInSink\": false,\n \"overwriteWhen\": \"\"\n }\n }\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1/transferJobs", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/transferJobs"
payload = {
"creationTime": "",
"deletionTime": "",
"description": "",
"eventStream": {
"eventStreamExpirationTime": "",
"eventStreamStartTime": "",
"name": ""
},
"lastModificationTime": "",
"latestOperationName": "",
"loggingConfig": {
"enableOnpremGcsTransferLogs": False,
"logActionStates": [],
"logActions": []
},
"name": "",
"notificationConfig": {
"eventTypes": [],
"payloadFormat": "",
"pubsubTopic": ""
},
"projectId": "",
"schedule": {
"endTimeOfDay": {
"hours": 0,
"minutes": 0,
"nanos": 0,
"seconds": 0
},
"repeatInterval": "",
"scheduleEndDate": {
"day": 0,
"month": 0,
"year": 0
},
"scheduleStartDate": {},
"startTimeOfDay": {}
},
"status": "",
"transferSpec": {
"awsS3CompatibleDataSource": {
"bucketName": "",
"endpoint": "",
"path": "",
"region": "",
"s3Metadata": {
"authMethod": "",
"listApi": "",
"protocol": "",
"requestModel": ""
}
},
"awsS3DataSource": {
"awsAccessKey": {
"accessKeyId": "",
"secretAccessKey": ""
},
"bucketName": "",
"path": "",
"roleArn": ""
},
"azureBlobStorageDataSource": {
"azureCredentials": { "sasToken": "" },
"container": "",
"path": "",
"storageAccount": ""
},
"gcsDataSink": {
"bucketName": "",
"path": ""
},
"gcsDataSource": {},
"gcsIntermediateDataLocation": {},
"httpDataSource": { "listUrl": "" },
"objectConditions": {
"excludePrefixes": [],
"includePrefixes": [],
"lastModifiedBefore": "",
"lastModifiedSince": "",
"maxTimeElapsedSinceLastModification": "",
"minTimeElapsedSinceLastModification": ""
},
"posixDataSink": { "rootDirectory": "" },
"posixDataSource": {},
"sinkAgentPoolName": "",
"sourceAgentPoolName": "",
"transferManifest": { "location": "" },
"transferOptions": {
"deleteObjectsFromSourceAfterTransfer": False,
"deleteObjectsUniqueInSink": False,
"metadataOptions": {
"acl": "",
"gid": "",
"kmsKey": "",
"mode": "",
"storageClass": "",
"symlink": "",
"temporaryHold": "",
"timeCreated": "",
"uid": ""
},
"overwriteObjectsAlreadyExistingInSink": False,
"overwriteWhen": ""
}
}
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/transferJobs"
payload <- "{\n \"creationTime\": \"\",\n \"deletionTime\": \"\",\n \"description\": \"\",\n \"eventStream\": {\n \"eventStreamExpirationTime\": \"\",\n \"eventStreamStartTime\": \"\",\n \"name\": \"\"\n },\n \"lastModificationTime\": \"\",\n \"latestOperationName\": \"\",\n \"loggingConfig\": {\n \"enableOnpremGcsTransferLogs\": false,\n \"logActionStates\": [],\n \"logActions\": []\n },\n \"name\": \"\",\n \"notificationConfig\": {\n \"eventTypes\": [],\n \"payloadFormat\": \"\",\n \"pubsubTopic\": \"\"\n },\n \"projectId\": \"\",\n \"schedule\": {\n \"endTimeOfDay\": {\n \"hours\": 0,\n \"minutes\": 0,\n \"nanos\": 0,\n \"seconds\": 0\n },\n \"repeatInterval\": \"\",\n \"scheduleEndDate\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"scheduleStartDate\": {},\n \"startTimeOfDay\": {}\n },\n \"status\": \"\",\n \"transferSpec\": {\n \"awsS3CompatibleDataSource\": {\n \"bucketName\": \"\",\n \"endpoint\": \"\",\n \"path\": \"\",\n \"region\": \"\",\n \"s3Metadata\": {\n \"authMethod\": \"\",\n \"listApi\": \"\",\n \"protocol\": \"\",\n \"requestModel\": \"\"\n }\n },\n \"awsS3DataSource\": {\n \"awsAccessKey\": {\n \"accessKeyId\": \"\",\n \"secretAccessKey\": \"\"\n },\n \"bucketName\": \"\",\n \"path\": \"\",\n \"roleArn\": \"\"\n },\n \"azureBlobStorageDataSource\": {\n \"azureCredentials\": {\n \"sasToken\": \"\"\n },\n \"container\": \"\",\n \"path\": \"\",\n \"storageAccount\": \"\"\n },\n \"gcsDataSink\": {\n \"bucketName\": \"\",\n \"path\": \"\"\n },\n \"gcsDataSource\": {},\n \"gcsIntermediateDataLocation\": {},\n \"httpDataSource\": {\n \"listUrl\": \"\"\n },\n \"objectConditions\": {\n \"excludePrefixes\": [],\n \"includePrefixes\": [],\n \"lastModifiedBefore\": \"\",\n \"lastModifiedSince\": \"\",\n \"maxTimeElapsedSinceLastModification\": \"\",\n \"minTimeElapsedSinceLastModification\": \"\"\n },\n \"posixDataSink\": {\n \"rootDirectory\": \"\"\n },\n \"posixDataSource\": {},\n \"sinkAgentPoolName\": \"\",\n \"sourceAgentPoolName\": \"\",\n \"transferManifest\": {\n \"location\": \"\"\n },\n \"transferOptions\": {\n \"deleteObjectsFromSourceAfterTransfer\": false,\n \"deleteObjectsUniqueInSink\": false,\n \"metadataOptions\": {\n \"acl\": \"\",\n \"gid\": \"\",\n \"kmsKey\": \"\",\n \"mode\": \"\",\n \"storageClass\": \"\",\n \"symlink\": \"\",\n \"temporaryHold\": \"\",\n \"timeCreated\": \"\",\n \"uid\": \"\"\n },\n \"overwriteObjectsAlreadyExistingInSink\": false,\n \"overwriteWhen\": \"\"\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}}/v1/transferJobs")
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 \"creationTime\": \"\",\n \"deletionTime\": \"\",\n \"description\": \"\",\n \"eventStream\": {\n \"eventStreamExpirationTime\": \"\",\n \"eventStreamStartTime\": \"\",\n \"name\": \"\"\n },\n \"lastModificationTime\": \"\",\n \"latestOperationName\": \"\",\n \"loggingConfig\": {\n \"enableOnpremGcsTransferLogs\": false,\n \"logActionStates\": [],\n \"logActions\": []\n },\n \"name\": \"\",\n \"notificationConfig\": {\n \"eventTypes\": [],\n \"payloadFormat\": \"\",\n \"pubsubTopic\": \"\"\n },\n \"projectId\": \"\",\n \"schedule\": {\n \"endTimeOfDay\": {\n \"hours\": 0,\n \"minutes\": 0,\n \"nanos\": 0,\n \"seconds\": 0\n },\n \"repeatInterval\": \"\",\n \"scheduleEndDate\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"scheduleStartDate\": {},\n \"startTimeOfDay\": {}\n },\n \"status\": \"\",\n \"transferSpec\": {\n \"awsS3CompatibleDataSource\": {\n \"bucketName\": \"\",\n \"endpoint\": \"\",\n \"path\": \"\",\n \"region\": \"\",\n \"s3Metadata\": {\n \"authMethod\": \"\",\n \"listApi\": \"\",\n \"protocol\": \"\",\n \"requestModel\": \"\"\n }\n },\n \"awsS3DataSource\": {\n \"awsAccessKey\": {\n \"accessKeyId\": \"\",\n \"secretAccessKey\": \"\"\n },\n \"bucketName\": \"\",\n \"path\": \"\",\n \"roleArn\": \"\"\n },\n \"azureBlobStorageDataSource\": {\n \"azureCredentials\": {\n \"sasToken\": \"\"\n },\n \"container\": \"\",\n \"path\": \"\",\n \"storageAccount\": \"\"\n },\n \"gcsDataSink\": {\n \"bucketName\": \"\",\n \"path\": \"\"\n },\n \"gcsDataSource\": {},\n \"gcsIntermediateDataLocation\": {},\n \"httpDataSource\": {\n \"listUrl\": \"\"\n },\n \"objectConditions\": {\n \"excludePrefixes\": [],\n \"includePrefixes\": [],\n \"lastModifiedBefore\": \"\",\n \"lastModifiedSince\": \"\",\n \"maxTimeElapsedSinceLastModification\": \"\",\n \"minTimeElapsedSinceLastModification\": \"\"\n },\n \"posixDataSink\": {\n \"rootDirectory\": \"\"\n },\n \"posixDataSource\": {},\n \"sinkAgentPoolName\": \"\",\n \"sourceAgentPoolName\": \"\",\n \"transferManifest\": {\n \"location\": \"\"\n },\n \"transferOptions\": {\n \"deleteObjectsFromSourceAfterTransfer\": false,\n \"deleteObjectsUniqueInSink\": false,\n \"metadataOptions\": {\n \"acl\": \"\",\n \"gid\": \"\",\n \"kmsKey\": \"\",\n \"mode\": \"\",\n \"storageClass\": \"\",\n \"symlink\": \"\",\n \"temporaryHold\": \"\",\n \"timeCreated\": \"\",\n \"uid\": \"\"\n },\n \"overwriteObjectsAlreadyExistingInSink\": false,\n \"overwriteWhen\": \"\"\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/v1/transferJobs') do |req|
req.body = "{\n \"creationTime\": \"\",\n \"deletionTime\": \"\",\n \"description\": \"\",\n \"eventStream\": {\n \"eventStreamExpirationTime\": \"\",\n \"eventStreamStartTime\": \"\",\n \"name\": \"\"\n },\n \"lastModificationTime\": \"\",\n \"latestOperationName\": \"\",\n \"loggingConfig\": {\n \"enableOnpremGcsTransferLogs\": false,\n \"logActionStates\": [],\n \"logActions\": []\n },\n \"name\": \"\",\n \"notificationConfig\": {\n \"eventTypes\": [],\n \"payloadFormat\": \"\",\n \"pubsubTopic\": \"\"\n },\n \"projectId\": \"\",\n \"schedule\": {\n \"endTimeOfDay\": {\n \"hours\": 0,\n \"minutes\": 0,\n \"nanos\": 0,\n \"seconds\": 0\n },\n \"repeatInterval\": \"\",\n \"scheduleEndDate\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"scheduleStartDate\": {},\n \"startTimeOfDay\": {}\n },\n \"status\": \"\",\n \"transferSpec\": {\n \"awsS3CompatibleDataSource\": {\n \"bucketName\": \"\",\n \"endpoint\": \"\",\n \"path\": \"\",\n \"region\": \"\",\n \"s3Metadata\": {\n \"authMethod\": \"\",\n \"listApi\": \"\",\n \"protocol\": \"\",\n \"requestModel\": \"\"\n }\n },\n \"awsS3DataSource\": {\n \"awsAccessKey\": {\n \"accessKeyId\": \"\",\n \"secretAccessKey\": \"\"\n },\n \"bucketName\": \"\",\n \"path\": \"\",\n \"roleArn\": \"\"\n },\n \"azureBlobStorageDataSource\": {\n \"azureCredentials\": {\n \"sasToken\": \"\"\n },\n \"container\": \"\",\n \"path\": \"\",\n \"storageAccount\": \"\"\n },\n \"gcsDataSink\": {\n \"bucketName\": \"\",\n \"path\": \"\"\n },\n \"gcsDataSource\": {},\n \"gcsIntermediateDataLocation\": {},\n \"httpDataSource\": {\n \"listUrl\": \"\"\n },\n \"objectConditions\": {\n \"excludePrefixes\": [],\n \"includePrefixes\": [],\n \"lastModifiedBefore\": \"\",\n \"lastModifiedSince\": \"\",\n \"maxTimeElapsedSinceLastModification\": \"\",\n \"minTimeElapsedSinceLastModification\": \"\"\n },\n \"posixDataSink\": {\n \"rootDirectory\": \"\"\n },\n \"posixDataSource\": {},\n \"sinkAgentPoolName\": \"\",\n \"sourceAgentPoolName\": \"\",\n \"transferManifest\": {\n \"location\": \"\"\n },\n \"transferOptions\": {\n \"deleteObjectsFromSourceAfterTransfer\": false,\n \"deleteObjectsUniqueInSink\": false,\n \"metadataOptions\": {\n \"acl\": \"\",\n \"gid\": \"\",\n \"kmsKey\": \"\",\n \"mode\": \"\",\n \"storageClass\": \"\",\n \"symlink\": \"\",\n \"temporaryHold\": \"\",\n \"timeCreated\": \"\",\n \"uid\": \"\"\n },\n \"overwriteObjectsAlreadyExistingInSink\": false,\n \"overwriteWhen\": \"\"\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}}/v1/transferJobs";
let payload = json!({
"creationTime": "",
"deletionTime": "",
"description": "",
"eventStream": json!({
"eventStreamExpirationTime": "",
"eventStreamStartTime": "",
"name": ""
}),
"lastModificationTime": "",
"latestOperationName": "",
"loggingConfig": json!({
"enableOnpremGcsTransferLogs": false,
"logActionStates": (),
"logActions": ()
}),
"name": "",
"notificationConfig": json!({
"eventTypes": (),
"payloadFormat": "",
"pubsubTopic": ""
}),
"projectId": "",
"schedule": json!({
"endTimeOfDay": json!({
"hours": 0,
"minutes": 0,
"nanos": 0,
"seconds": 0
}),
"repeatInterval": "",
"scheduleEndDate": json!({
"day": 0,
"month": 0,
"year": 0
}),
"scheduleStartDate": json!({}),
"startTimeOfDay": json!({})
}),
"status": "",
"transferSpec": json!({
"awsS3CompatibleDataSource": json!({
"bucketName": "",
"endpoint": "",
"path": "",
"region": "",
"s3Metadata": json!({
"authMethod": "",
"listApi": "",
"protocol": "",
"requestModel": ""
})
}),
"awsS3DataSource": json!({
"awsAccessKey": json!({
"accessKeyId": "",
"secretAccessKey": ""
}),
"bucketName": "",
"path": "",
"roleArn": ""
}),
"azureBlobStorageDataSource": json!({
"azureCredentials": json!({"sasToken": ""}),
"container": "",
"path": "",
"storageAccount": ""
}),
"gcsDataSink": json!({
"bucketName": "",
"path": ""
}),
"gcsDataSource": json!({}),
"gcsIntermediateDataLocation": json!({}),
"httpDataSource": json!({"listUrl": ""}),
"objectConditions": json!({
"excludePrefixes": (),
"includePrefixes": (),
"lastModifiedBefore": "",
"lastModifiedSince": "",
"maxTimeElapsedSinceLastModification": "",
"minTimeElapsedSinceLastModification": ""
}),
"posixDataSink": json!({"rootDirectory": ""}),
"posixDataSource": json!({}),
"sinkAgentPoolName": "",
"sourceAgentPoolName": "",
"transferManifest": json!({"location": ""}),
"transferOptions": json!({
"deleteObjectsFromSourceAfterTransfer": false,
"deleteObjectsUniqueInSink": false,
"metadataOptions": json!({
"acl": "",
"gid": "",
"kmsKey": "",
"mode": "",
"storageClass": "",
"symlink": "",
"temporaryHold": "",
"timeCreated": "",
"uid": ""
}),
"overwriteObjectsAlreadyExistingInSink": false,
"overwriteWhen": ""
})
})
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/v1/transferJobs \
--header 'content-type: application/json' \
--data '{
"creationTime": "",
"deletionTime": "",
"description": "",
"eventStream": {
"eventStreamExpirationTime": "",
"eventStreamStartTime": "",
"name": ""
},
"lastModificationTime": "",
"latestOperationName": "",
"loggingConfig": {
"enableOnpremGcsTransferLogs": false,
"logActionStates": [],
"logActions": []
},
"name": "",
"notificationConfig": {
"eventTypes": [],
"payloadFormat": "",
"pubsubTopic": ""
},
"projectId": "",
"schedule": {
"endTimeOfDay": {
"hours": 0,
"minutes": 0,
"nanos": 0,
"seconds": 0
},
"repeatInterval": "",
"scheduleEndDate": {
"day": 0,
"month": 0,
"year": 0
},
"scheduleStartDate": {},
"startTimeOfDay": {}
},
"status": "",
"transferSpec": {
"awsS3CompatibleDataSource": {
"bucketName": "",
"endpoint": "",
"path": "",
"region": "",
"s3Metadata": {
"authMethod": "",
"listApi": "",
"protocol": "",
"requestModel": ""
}
},
"awsS3DataSource": {
"awsAccessKey": {
"accessKeyId": "",
"secretAccessKey": ""
},
"bucketName": "",
"path": "",
"roleArn": ""
},
"azureBlobStorageDataSource": {
"azureCredentials": {
"sasToken": ""
},
"container": "",
"path": "",
"storageAccount": ""
},
"gcsDataSink": {
"bucketName": "",
"path": ""
},
"gcsDataSource": {},
"gcsIntermediateDataLocation": {},
"httpDataSource": {
"listUrl": ""
},
"objectConditions": {
"excludePrefixes": [],
"includePrefixes": [],
"lastModifiedBefore": "",
"lastModifiedSince": "",
"maxTimeElapsedSinceLastModification": "",
"minTimeElapsedSinceLastModification": ""
},
"posixDataSink": {
"rootDirectory": ""
},
"posixDataSource": {},
"sinkAgentPoolName": "",
"sourceAgentPoolName": "",
"transferManifest": {
"location": ""
},
"transferOptions": {
"deleteObjectsFromSourceAfterTransfer": false,
"deleteObjectsUniqueInSink": false,
"metadataOptions": {
"acl": "",
"gid": "",
"kmsKey": "",
"mode": "",
"storageClass": "",
"symlink": "",
"temporaryHold": "",
"timeCreated": "",
"uid": ""
},
"overwriteObjectsAlreadyExistingInSink": false,
"overwriteWhen": ""
}
}
}'
echo '{
"creationTime": "",
"deletionTime": "",
"description": "",
"eventStream": {
"eventStreamExpirationTime": "",
"eventStreamStartTime": "",
"name": ""
},
"lastModificationTime": "",
"latestOperationName": "",
"loggingConfig": {
"enableOnpremGcsTransferLogs": false,
"logActionStates": [],
"logActions": []
},
"name": "",
"notificationConfig": {
"eventTypes": [],
"payloadFormat": "",
"pubsubTopic": ""
},
"projectId": "",
"schedule": {
"endTimeOfDay": {
"hours": 0,
"minutes": 0,
"nanos": 0,
"seconds": 0
},
"repeatInterval": "",
"scheduleEndDate": {
"day": 0,
"month": 0,
"year": 0
},
"scheduleStartDate": {},
"startTimeOfDay": {}
},
"status": "",
"transferSpec": {
"awsS3CompatibleDataSource": {
"bucketName": "",
"endpoint": "",
"path": "",
"region": "",
"s3Metadata": {
"authMethod": "",
"listApi": "",
"protocol": "",
"requestModel": ""
}
},
"awsS3DataSource": {
"awsAccessKey": {
"accessKeyId": "",
"secretAccessKey": ""
},
"bucketName": "",
"path": "",
"roleArn": ""
},
"azureBlobStorageDataSource": {
"azureCredentials": {
"sasToken": ""
},
"container": "",
"path": "",
"storageAccount": ""
},
"gcsDataSink": {
"bucketName": "",
"path": ""
},
"gcsDataSource": {},
"gcsIntermediateDataLocation": {},
"httpDataSource": {
"listUrl": ""
},
"objectConditions": {
"excludePrefixes": [],
"includePrefixes": [],
"lastModifiedBefore": "",
"lastModifiedSince": "",
"maxTimeElapsedSinceLastModification": "",
"minTimeElapsedSinceLastModification": ""
},
"posixDataSink": {
"rootDirectory": ""
},
"posixDataSource": {},
"sinkAgentPoolName": "",
"sourceAgentPoolName": "",
"transferManifest": {
"location": ""
},
"transferOptions": {
"deleteObjectsFromSourceAfterTransfer": false,
"deleteObjectsUniqueInSink": false,
"metadataOptions": {
"acl": "",
"gid": "",
"kmsKey": "",
"mode": "",
"storageClass": "",
"symlink": "",
"temporaryHold": "",
"timeCreated": "",
"uid": ""
},
"overwriteObjectsAlreadyExistingInSink": false,
"overwriteWhen": ""
}
}
}' | \
http POST {{baseUrl}}/v1/transferJobs \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "creationTime": "",\n "deletionTime": "",\n "description": "",\n "eventStream": {\n "eventStreamExpirationTime": "",\n "eventStreamStartTime": "",\n "name": ""\n },\n "lastModificationTime": "",\n "latestOperationName": "",\n "loggingConfig": {\n "enableOnpremGcsTransferLogs": false,\n "logActionStates": [],\n "logActions": []\n },\n "name": "",\n "notificationConfig": {\n "eventTypes": [],\n "payloadFormat": "",\n "pubsubTopic": ""\n },\n "projectId": "",\n "schedule": {\n "endTimeOfDay": {\n "hours": 0,\n "minutes": 0,\n "nanos": 0,\n "seconds": 0\n },\n "repeatInterval": "",\n "scheduleEndDate": {\n "day": 0,\n "month": 0,\n "year": 0\n },\n "scheduleStartDate": {},\n "startTimeOfDay": {}\n },\n "status": "",\n "transferSpec": {\n "awsS3CompatibleDataSource": {\n "bucketName": "",\n "endpoint": "",\n "path": "",\n "region": "",\n "s3Metadata": {\n "authMethod": "",\n "listApi": "",\n "protocol": "",\n "requestModel": ""\n }\n },\n "awsS3DataSource": {\n "awsAccessKey": {\n "accessKeyId": "",\n "secretAccessKey": ""\n },\n "bucketName": "",\n "path": "",\n "roleArn": ""\n },\n "azureBlobStorageDataSource": {\n "azureCredentials": {\n "sasToken": ""\n },\n "container": "",\n "path": "",\n "storageAccount": ""\n },\n "gcsDataSink": {\n "bucketName": "",\n "path": ""\n },\n "gcsDataSource": {},\n "gcsIntermediateDataLocation": {},\n "httpDataSource": {\n "listUrl": ""\n },\n "objectConditions": {\n "excludePrefixes": [],\n "includePrefixes": [],\n "lastModifiedBefore": "",\n "lastModifiedSince": "",\n "maxTimeElapsedSinceLastModification": "",\n "minTimeElapsedSinceLastModification": ""\n },\n "posixDataSink": {\n "rootDirectory": ""\n },\n "posixDataSource": {},\n "sinkAgentPoolName": "",\n "sourceAgentPoolName": "",\n "transferManifest": {\n "location": ""\n },\n "transferOptions": {\n "deleteObjectsFromSourceAfterTransfer": false,\n "deleteObjectsUniqueInSink": false,\n "metadataOptions": {\n "acl": "",\n "gid": "",\n "kmsKey": "",\n "mode": "",\n "storageClass": "",\n "symlink": "",\n "temporaryHold": "",\n "timeCreated": "",\n "uid": ""\n },\n "overwriteObjectsAlreadyExistingInSink": false,\n "overwriteWhen": ""\n }\n }\n}' \
--output-document \
- {{baseUrl}}/v1/transferJobs
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"creationTime": "",
"deletionTime": "",
"description": "",
"eventStream": [
"eventStreamExpirationTime": "",
"eventStreamStartTime": "",
"name": ""
],
"lastModificationTime": "",
"latestOperationName": "",
"loggingConfig": [
"enableOnpremGcsTransferLogs": false,
"logActionStates": [],
"logActions": []
],
"name": "",
"notificationConfig": [
"eventTypes": [],
"payloadFormat": "",
"pubsubTopic": ""
],
"projectId": "",
"schedule": [
"endTimeOfDay": [
"hours": 0,
"minutes": 0,
"nanos": 0,
"seconds": 0
],
"repeatInterval": "",
"scheduleEndDate": [
"day": 0,
"month": 0,
"year": 0
],
"scheduleStartDate": [],
"startTimeOfDay": []
],
"status": "",
"transferSpec": [
"awsS3CompatibleDataSource": [
"bucketName": "",
"endpoint": "",
"path": "",
"region": "",
"s3Metadata": [
"authMethod": "",
"listApi": "",
"protocol": "",
"requestModel": ""
]
],
"awsS3DataSource": [
"awsAccessKey": [
"accessKeyId": "",
"secretAccessKey": ""
],
"bucketName": "",
"path": "",
"roleArn": ""
],
"azureBlobStorageDataSource": [
"azureCredentials": ["sasToken": ""],
"container": "",
"path": "",
"storageAccount": ""
],
"gcsDataSink": [
"bucketName": "",
"path": ""
],
"gcsDataSource": [],
"gcsIntermediateDataLocation": [],
"httpDataSource": ["listUrl": ""],
"objectConditions": [
"excludePrefixes": [],
"includePrefixes": [],
"lastModifiedBefore": "",
"lastModifiedSince": "",
"maxTimeElapsedSinceLastModification": "",
"minTimeElapsedSinceLastModification": ""
],
"posixDataSink": ["rootDirectory": ""],
"posixDataSource": [],
"sinkAgentPoolName": "",
"sourceAgentPoolName": "",
"transferManifest": ["location": ""],
"transferOptions": [
"deleteObjectsFromSourceAfterTransfer": false,
"deleteObjectsUniqueInSink": false,
"metadataOptions": [
"acl": "",
"gid": "",
"kmsKey": "",
"mode": "",
"storageClass": "",
"symlink": "",
"temporaryHold": "",
"timeCreated": "",
"uid": ""
],
"overwriteObjectsAlreadyExistingInSink": false,
"overwriteWhen": ""
]
]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/transferJobs")! 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
storagetransfer.transferJobs.delete
{{baseUrl}}/v1/:jobName
QUERY PARAMS
projectId
jobName
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:jobName?projectId=");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/v1/:jobName" {:query-params {:projectId ""}})
require "http/client"
url = "{{baseUrl}}/v1/:jobName?projectId="
response = HTTP::Client.delete url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Delete,
RequestUri = new Uri("{{baseUrl}}/v1/:jobName?projectId="),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/:jobName?projectId=");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/:jobName?projectId="
req, _ := http.NewRequest("DELETE", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
DELETE /baseUrl/v1/:jobName?projectId= HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/v1/:jobName?projectId=")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/:jobName?projectId="))
.method("DELETE", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/:jobName?projectId=")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/v1/:jobName?projectId=")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('DELETE', '{{baseUrl}}/v1/:jobName?projectId=');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'DELETE',
url: '{{baseUrl}}/v1/:jobName',
params: {projectId: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/:jobName?projectId=';
const options = {method: 'DELETE'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/:jobName?projectId=',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1/:jobName?projectId=")
.delete(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/:jobName?projectId=',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'DELETE',
url: '{{baseUrl}}/v1/:jobName',
qs: {projectId: ''}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/v1/:jobName');
req.query({
projectId: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'DELETE',
url: '{{baseUrl}}/v1/:jobName',
params: {projectId: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/:jobName?projectId=';
const options = {method: 'DELETE'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:jobName?projectId="]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"DELETE"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/:jobName?projectId=" in
Client.call `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/:jobName?projectId=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('DELETE', '{{baseUrl}}/v1/:jobName?projectId=');
echo $response->getBody();
setUrl('{{baseUrl}}/v1/:jobName');
$request->setMethod(HTTP_METH_DELETE);
$request->setQueryData([
'projectId' => ''
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/:jobName');
$request->setRequestMethod('DELETE');
$request->setQuery(new http\QueryString([
'projectId' => ''
]));
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:jobName?projectId=' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:jobName?projectId=' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/v1/:jobName?projectId=")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/:jobName"
querystring = {"projectId":""}
response = requests.delete(url, params=querystring)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/:jobName"
queryString <- list(projectId = "")
response <- VERB("DELETE", url, query = queryString, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/:jobName?projectId=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.delete('/baseUrl/v1/:jobName') do |req|
req.params['projectId'] = ''
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/:jobName";
let querystring = [
("projectId", ""),
];
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("DELETE").unwrap(), url)
.query(&querystring)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request DELETE \
--url '{{baseUrl}}/v1/:jobName?projectId='
http DELETE '{{baseUrl}}/v1/:jobName?projectId='
wget --quiet \
--method DELETE \
--output-document \
- '{{baseUrl}}/v1/:jobName?projectId='
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:jobName?projectId=")! 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
storagetransfer.transferJobs.get
{{baseUrl}}/v1/:jobName
QUERY PARAMS
projectId
jobName
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:jobName?projectId=");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v1/:jobName" {:query-params {:projectId ""}})
require "http/client"
url = "{{baseUrl}}/v1/:jobName?projectId="
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/v1/:jobName?projectId="),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/:jobName?projectId=");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/:jobName?projectId="
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/v1/:jobName?projectId= HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1/:jobName?projectId=")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/:jobName?projectId="))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/:jobName?projectId=")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1/:jobName?projectId=")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/v1/:jobName?projectId=');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/v1/:jobName',
params: {projectId: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/:jobName?projectId=';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/:jobName?projectId=',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1/:jobName?projectId=")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/:jobName?projectId=',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/v1/:jobName',
qs: {projectId: ''}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v1/:jobName');
req.query({
projectId: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/v1/:jobName',
params: {projectId: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/:jobName?projectId=';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:jobName?projectId="]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/:jobName?projectId=" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/:jobName?projectId=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/v1/:jobName?projectId=');
echo $response->getBody();
setUrl('{{baseUrl}}/v1/:jobName');
$request->setMethod(HTTP_METH_GET);
$request->setQueryData([
'projectId' => ''
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/:jobName');
$request->setRequestMethod('GET');
$request->setQuery(new http\QueryString([
'projectId' => ''
]));
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:jobName?projectId=' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:jobName?projectId=' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v1/:jobName?projectId=")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/:jobName"
querystring = {"projectId":""}
response = requests.get(url, params=querystring)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/:jobName"
queryString <- list(projectId = "")
response <- VERB("GET", url, query = queryString, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/:jobName?projectId=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/v1/:jobName') do |req|
req.params['projectId'] = ''
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/:jobName";
let querystring = [
("projectId", ""),
];
let client = reqwest::Client::new();
let response = client.get(url)
.query(&querystring)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url '{{baseUrl}}/v1/:jobName?projectId='
http GET '{{baseUrl}}/v1/:jobName?projectId='
wget --quiet \
--method GET \
--output-document \
- '{{baseUrl}}/v1/:jobName?projectId='
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:jobName?projectId=")! 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
storagetransfer.transferJobs.list
{{baseUrl}}/v1/transferJobs
QUERY PARAMS
filter
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/transferJobs?filter=");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v1/transferJobs" {:query-params {:filter ""}})
require "http/client"
url = "{{baseUrl}}/v1/transferJobs?filter="
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/v1/transferJobs?filter="),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/transferJobs?filter=");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/transferJobs?filter="
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/v1/transferJobs?filter= HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1/transferJobs?filter=")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/transferJobs?filter="))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/transferJobs?filter=")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1/transferJobs?filter=")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/v1/transferJobs?filter=');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/v1/transferJobs',
params: {filter: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/transferJobs?filter=';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/transferJobs?filter=',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1/transferJobs?filter=")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/transferJobs?filter=',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/v1/transferJobs',
qs: {filter: ''}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v1/transferJobs');
req.query({
filter: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/v1/transferJobs',
params: {filter: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/transferJobs?filter=';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/transferJobs?filter="]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/transferJobs?filter=" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/transferJobs?filter=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/v1/transferJobs?filter=');
echo $response->getBody();
setUrl('{{baseUrl}}/v1/transferJobs');
$request->setMethod(HTTP_METH_GET);
$request->setQueryData([
'filter' => ''
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/transferJobs');
$request->setRequestMethod('GET');
$request->setQuery(new http\QueryString([
'filter' => ''
]));
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/transferJobs?filter=' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/transferJobs?filter=' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v1/transferJobs?filter=")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/transferJobs"
querystring = {"filter":""}
response = requests.get(url, params=querystring)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/transferJobs"
queryString <- list(filter = "")
response <- VERB("GET", url, query = queryString, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/transferJobs?filter=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/v1/transferJobs') do |req|
req.params['filter'] = ''
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/transferJobs";
let querystring = [
("filter", ""),
];
let client = reqwest::Client::new();
let response = client.get(url)
.query(&querystring)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url '{{baseUrl}}/v1/transferJobs?filter='
http GET '{{baseUrl}}/v1/transferJobs?filter='
wget --quiet \
--method GET \
--output-document \
- '{{baseUrl}}/v1/transferJobs?filter='
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/transferJobs?filter=")! 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()
PATCH
storagetransfer.transferJobs.patch
{{baseUrl}}/v1/:jobName
QUERY PARAMS
jobName
BODY json
{
"projectId": "",
"transferJob": {
"creationTime": "",
"deletionTime": "",
"description": "",
"eventStream": {
"eventStreamExpirationTime": "",
"eventStreamStartTime": "",
"name": ""
},
"lastModificationTime": "",
"latestOperationName": "",
"loggingConfig": {
"enableOnpremGcsTransferLogs": false,
"logActionStates": [],
"logActions": []
},
"name": "",
"notificationConfig": {
"eventTypes": [],
"payloadFormat": "",
"pubsubTopic": ""
},
"projectId": "",
"schedule": {
"endTimeOfDay": {
"hours": 0,
"minutes": 0,
"nanos": 0,
"seconds": 0
},
"repeatInterval": "",
"scheduleEndDate": {
"day": 0,
"month": 0,
"year": 0
},
"scheduleStartDate": {},
"startTimeOfDay": {}
},
"status": "",
"transferSpec": {
"awsS3CompatibleDataSource": {
"bucketName": "",
"endpoint": "",
"path": "",
"region": "",
"s3Metadata": {
"authMethod": "",
"listApi": "",
"protocol": "",
"requestModel": ""
}
},
"awsS3DataSource": {
"awsAccessKey": {
"accessKeyId": "",
"secretAccessKey": ""
},
"bucketName": "",
"path": "",
"roleArn": ""
},
"azureBlobStorageDataSource": {
"azureCredentials": {
"sasToken": ""
},
"container": "",
"path": "",
"storageAccount": ""
},
"gcsDataSink": {
"bucketName": "",
"path": ""
},
"gcsDataSource": {},
"gcsIntermediateDataLocation": {},
"httpDataSource": {
"listUrl": ""
},
"objectConditions": {
"excludePrefixes": [],
"includePrefixes": [],
"lastModifiedBefore": "",
"lastModifiedSince": "",
"maxTimeElapsedSinceLastModification": "",
"minTimeElapsedSinceLastModification": ""
},
"posixDataSink": {
"rootDirectory": ""
},
"posixDataSource": {},
"sinkAgentPoolName": "",
"sourceAgentPoolName": "",
"transferManifest": {
"location": ""
},
"transferOptions": {
"deleteObjectsFromSourceAfterTransfer": false,
"deleteObjectsUniqueInSink": false,
"metadataOptions": {
"acl": "",
"gid": "",
"kmsKey": "",
"mode": "",
"storageClass": "",
"symlink": "",
"temporaryHold": "",
"timeCreated": "",
"uid": ""
},
"overwriteObjectsAlreadyExistingInSink": false,
"overwriteWhen": ""
}
}
},
"updateTransferJobFieldMask": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:jobName");
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 \"projectId\": \"\",\n \"transferJob\": {\n \"creationTime\": \"\",\n \"deletionTime\": \"\",\n \"description\": \"\",\n \"eventStream\": {\n \"eventStreamExpirationTime\": \"\",\n \"eventStreamStartTime\": \"\",\n \"name\": \"\"\n },\n \"lastModificationTime\": \"\",\n \"latestOperationName\": \"\",\n \"loggingConfig\": {\n \"enableOnpremGcsTransferLogs\": false,\n \"logActionStates\": [],\n \"logActions\": []\n },\n \"name\": \"\",\n \"notificationConfig\": {\n \"eventTypes\": [],\n \"payloadFormat\": \"\",\n \"pubsubTopic\": \"\"\n },\n \"projectId\": \"\",\n \"schedule\": {\n \"endTimeOfDay\": {\n \"hours\": 0,\n \"minutes\": 0,\n \"nanos\": 0,\n \"seconds\": 0\n },\n \"repeatInterval\": \"\",\n \"scheduleEndDate\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"scheduleStartDate\": {},\n \"startTimeOfDay\": {}\n },\n \"status\": \"\",\n \"transferSpec\": {\n \"awsS3CompatibleDataSource\": {\n \"bucketName\": \"\",\n \"endpoint\": \"\",\n \"path\": \"\",\n \"region\": \"\",\n \"s3Metadata\": {\n \"authMethod\": \"\",\n \"listApi\": \"\",\n \"protocol\": \"\",\n \"requestModel\": \"\"\n }\n },\n \"awsS3DataSource\": {\n \"awsAccessKey\": {\n \"accessKeyId\": \"\",\n \"secretAccessKey\": \"\"\n },\n \"bucketName\": \"\",\n \"path\": \"\",\n \"roleArn\": \"\"\n },\n \"azureBlobStorageDataSource\": {\n \"azureCredentials\": {\n \"sasToken\": \"\"\n },\n \"container\": \"\",\n \"path\": \"\",\n \"storageAccount\": \"\"\n },\n \"gcsDataSink\": {\n \"bucketName\": \"\",\n \"path\": \"\"\n },\n \"gcsDataSource\": {},\n \"gcsIntermediateDataLocation\": {},\n \"httpDataSource\": {\n \"listUrl\": \"\"\n },\n \"objectConditions\": {\n \"excludePrefixes\": [],\n \"includePrefixes\": [],\n \"lastModifiedBefore\": \"\",\n \"lastModifiedSince\": \"\",\n \"maxTimeElapsedSinceLastModification\": \"\",\n \"minTimeElapsedSinceLastModification\": \"\"\n },\n \"posixDataSink\": {\n \"rootDirectory\": \"\"\n },\n \"posixDataSource\": {},\n \"sinkAgentPoolName\": \"\",\n \"sourceAgentPoolName\": \"\",\n \"transferManifest\": {\n \"location\": \"\"\n },\n \"transferOptions\": {\n \"deleteObjectsFromSourceAfterTransfer\": false,\n \"deleteObjectsUniqueInSink\": false,\n \"metadataOptions\": {\n \"acl\": \"\",\n \"gid\": \"\",\n \"kmsKey\": \"\",\n \"mode\": \"\",\n \"storageClass\": \"\",\n \"symlink\": \"\",\n \"temporaryHold\": \"\",\n \"timeCreated\": \"\",\n \"uid\": \"\"\n },\n \"overwriteObjectsAlreadyExistingInSink\": false,\n \"overwriteWhen\": \"\"\n }\n }\n },\n \"updateTransferJobFieldMask\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/patch "{{baseUrl}}/v1/:jobName" {:content-type :json
:form-params {:projectId ""
:transferJob {:creationTime ""
:deletionTime ""
:description ""
:eventStream {:eventStreamExpirationTime ""
:eventStreamStartTime ""
:name ""}
:lastModificationTime ""
:latestOperationName ""
:loggingConfig {:enableOnpremGcsTransferLogs false
:logActionStates []
:logActions []}
:name ""
:notificationConfig {:eventTypes []
:payloadFormat ""
:pubsubTopic ""}
:projectId ""
:schedule {:endTimeOfDay {:hours 0
:minutes 0
:nanos 0
:seconds 0}
:repeatInterval ""
:scheduleEndDate {:day 0
:month 0
:year 0}
:scheduleStartDate {}
:startTimeOfDay {}}
:status ""
:transferSpec {:awsS3CompatibleDataSource {:bucketName ""
:endpoint ""
:path ""
:region ""
:s3Metadata {:authMethod ""
:listApi ""
:protocol ""
:requestModel ""}}
:awsS3DataSource {:awsAccessKey {:accessKeyId ""
:secretAccessKey ""}
:bucketName ""
:path ""
:roleArn ""}
:azureBlobStorageDataSource {:azureCredentials {:sasToken ""}
:container ""
:path ""
:storageAccount ""}
:gcsDataSink {:bucketName ""
:path ""}
:gcsDataSource {}
:gcsIntermediateDataLocation {}
:httpDataSource {:listUrl ""}
:objectConditions {:excludePrefixes []
:includePrefixes []
:lastModifiedBefore ""
:lastModifiedSince ""
:maxTimeElapsedSinceLastModification ""
:minTimeElapsedSinceLastModification ""}
:posixDataSink {:rootDirectory ""}
:posixDataSource {}
:sinkAgentPoolName ""
:sourceAgentPoolName ""
:transferManifest {:location ""}
:transferOptions {:deleteObjectsFromSourceAfterTransfer false
:deleteObjectsUniqueInSink false
:metadataOptions {:acl ""
:gid ""
:kmsKey ""
:mode ""
:storageClass ""
:symlink ""
:temporaryHold ""
:timeCreated ""
:uid ""}
:overwriteObjectsAlreadyExistingInSink false
:overwriteWhen ""}}}
:updateTransferJobFieldMask ""}})
require "http/client"
url = "{{baseUrl}}/v1/:jobName"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"projectId\": \"\",\n \"transferJob\": {\n \"creationTime\": \"\",\n \"deletionTime\": \"\",\n \"description\": \"\",\n \"eventStream\": {\n \"eventStreamExpirationTime\": \"\",\n \"eventStreamStartTime\": \"\",\n \"name\": \"\"\n },\n \"lastModificationTime\": \"\",\n \"latestOperationName\": \"\",\n \"loggingConfig\": {\n \"enableOnpremGcsTransferLogs\": false,\n \"logActionStates\": [],\n \"logActions\": []\n },\n \"name\": \"\",\n \"notificationConfig\": {\n \"eventTypes\": [],\n \"payloadFormat\": \"\",\n \"pubsubTopic\": \"\"\n },\n \"projectId\": \"\",\n \"schedule\": {\n \"endTimeOfDay\": {\n \"hours\": 0,\n \"minutes\": 0,\n \"nanos\": 0,\n \"seconds\": 0\n },\n \"repeatInterval\": \"\",\n \"scheduleEndDate\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"scheduleStartDate\": {},\n \"startTimeOfDay\": {}\n },\n \"status\": \"\",\n \"transferSpec\": {\n \"awsS3CompatibleDataSource\": {\n \"bucketName\": \"\",\n \"endpoint\": \"\",\n \"path\": \"\",\n \"region\": \"\",\n \"s3Metadata\": {\n \"authMethod\": \"\",\n \"listApi\": \"\",\n \"protocol\": \"\",\n \"requestModel\": \"\"\n }\n },\n \"awsS3DataSource\": {\n \"awsAccessKey\": {\n \"accessKeyId\": \"\",\n \"secretAccessKey\": \"\"\n },\n \"bucketName\": \"\",\n \"path\": \"\",\n \"roleArn\": \"\"\n },\n \"azureBlobStorageDataSource\": {\n \"azureCredentials\": {\n \"sasToken\": \"\"\n },\n \"container\": \"\",\n \"path\": \"\",\n \"storageAccount\": \"\"\n },\n \"gcsDataSink\": {\n \"bucketName\": \"\",\n \"path\": \"\"\n },\n \"gcsDataSource\": {},\n \"gcsIntermediateDataLocation\": {},\n \"httpDataSource\": {\n \"listUrl\": \"\"\n },\n \"objectConditions\": {\n \"excludePrefixes\": [],\n \"includePrefixes\": [],\n \"lastModifiedBefore\": \"\",\n \"lastModifiedSince\": \"\",\n \"maxTimeElapsedSinceLastModification\": \"\",\n \"minTimeElapsedSinceLastModification\": \"\"\n },\n \"posixDataSink\": {\n \"rootDirectory\": \"\"\n },\n \"posixDataSource\": {},\n \"sinkAgentPoolName\": \"\",\n \"sourceAgentPoolName\": \"\",\n \"transferManifest\": {\n \"location\": \"\"\n },\n \"transferOptions\": {\n \"deleteObjectsFromSourceAfterTransfer\": false,\n \"deleteObjectsUniqueInSink\": false,\n \"metadataOptions\": {\n \"acl\": \"\",\n \"gid\": \"\",\n \"kmsKey\": \"\",\n \"mode\": \"\",\n \"storageClass\": \"\",\n \"symlink\": \"\",\n \"temporaryHold\": \"\",\n \"timeCreated\": \"\",\n \"uid\": \"\"\n },\n \"overwriteObjectsAlreadyExistingInSink\": false,\n \"overwriteWhen\": \"\"\n }\n }\n },\n \"updateTransferJobFieldMask\": \"\"\n}"
response = HTTP::Client.patch url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Patch,
RequestUri = new Uri("{{baseUrl}}/v1/:jobName"),
Content = new StringContent("{\n \"projectId\": \"\",\n \"transferJob\": {\n \"creationTime\": \"\",\n \"deletionTime\": \"\",\n \"description\": \"\",\n \"eventStream\": {\n \"eventStreamExpirationTime\": \"\",\n \"eventStreamStartTime\": \"\",\n \"name\": \"\"\n },\n \"lastModificationTime\": \"\",\n \"latestOperationName\": \"\",\n \"loggingConfig\": {\n \"enableOnpremGcsTransferLogs\": false,\n \"logActionStates\": [],\n \"logActions\": []\n },\n \"name\": \"\",\n \"notificationConfig\": {\n \"eventTypes\": [],\n \"payloadFormat\": \"\",\n \"pubsubTopic\": \"\"\n },\n \"projectId\": \"\",\n \"schedule\": {\n \"endTimeOfDay\": {\n \"hours\": 0,\n \"minutes\": 0,\n \"nanos\": 0,\n \"seconds\": 0\n },\n \"repeatInterval\": \"\",\n \"scheduleEndDate\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"scheduleStartDate\": {},\n \"startTimeOfDay\": {}\n },\n \"status\": \"\",\n \"transferSpec\": {\n \"awsS3CompatibleDataSource\": {\n \"bucketName\": \"\",\n \"endpoint\": \"\",\n \"path\": \"\",\n \"region\": \"\",\n \"s3Metadata\": {\n \"authMethod\": \"\",\n \"listApi\": \"\",\n \"protocol\": \"\",\n \"requestModel\": \"\"\n }\n },\n \"awsS3DataSource\": {\n \"awsAccessKey\": {\n \"accessKeyId\": \"\",\n \"secretAccessKey\": \"\"\n },\n \"bucketName\": \"\",\n \"path\": \"\",\n \"roleArn\": \"\"\n },\n \"azureBlobStorageDataSource\": {\n \"azureCredentials\": {\n \"sasToken\": \"\"\n },\n \"container\": \"\",\n \"path\": \"\",\n \"storageAccount\": \"\"\n },\n \"gcsDataSink\": {\n \"bucketName\": \"\",\n \"path\": \"\"\n },\n \"gcsDataSource\": {},\n \"gcsIntermediateDataLocation\": {},\n \"httpDataSource\": {\n \"listUrl\": \"\"\n },\n \"objectConditions\": {\n \"excludePrefixes\": [],\n \"includePrefixes\": [],\n \"lastModifiedBefore\": \"\",\n \"lastModifiedSince\": \"\",\n \"maxTimeElapsedSinceLastModification\": \"\",\n \"minTimeElapsedSinceLastModification\": \"\"\n },\n \"posixDataSink\": {\n \"rootDirectory\": \"\"\n },\n \"posixDataSource\": {},\n \"sinkAgentPoolName\": \"\",\n \"sourceAgentPoolName\": \"\",\n \"transferManifest\": {\n \"location\": \"\"\n },\n \"transferOptions\": {\n \"deleteObjectsFromSourceAfterTransfer\": false,\n \"deleteObjectsUniqueInSink\": false,\n \"metadataOptions\": {\n \"acl\": \"\",\n \"gid\": \"\",\n \"kmsKey\": \"\",\n \"mode\": \"\",\n \"storageClass\": \"\",\n \"symlink\": \"\",\n \"temporaryHold\": \"\",\n \"timeCreated\": \"\",\n \"uid\": \"\"\n },\n \"overwriteObjectsAlreadyExistingInSink\": false,\n \"overwriteWhen\": \"\"\n }\n }\n },\n \"updateTransferJobFieldMask\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/:jobName");
var request = new RestRequest("", Method.Patch);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"projectId\": \"\",\n \"transferJob\": {\n \"creationTime\": \"\",\n \"deletionTime\": \"\",\n \"description\": \"\",\n \"eventStream\": {\n \"eventStreamExpirationTime\": \"\",\n \"eventStreamStartTime\": \"\",\n \"name\": \"\"\n },\n \"lastModificationTime\": \"\",\n \"latestOperationName\": \"\",\n \"loggingConfig\": {\n \"enableOnpremGcsTransferLogs\": false,\n \"logActionStates\": [],\n \"logActions\": []\n },\n \"name\": \"\",\n \"notificationConfig\": {\n \"eventTypes\": [],\n \"payloadFormat\": \"\",\n \"pubsubTopic\": \"\"\n },\n \"projectId\": \"\",\n \"schedule\": {\n \"endTimeOfDay\": {\n \"hours\": 0,\n \"minutes\": 0,\n \"nanos\": 0,\n \"seconds\": 0\n },\n \"repeatInterval\": \"\",\n \"scheduleEndDate\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"scheduleStartDate\": {},\n \"startTimeOfDay\": {}\n },\n \"status\": \"\",\n \"transferSpec\": {\n \"awsS3CompatibleDataSource\": {\n \"bucketName\": \"\",\n \"endpoint\": \"\",\n \"path\": \"\",\n \"region\": \"\",\n \"s3Metadata\": {\n \"authMethod\": \"\",\n \"listApi\": \"\",\n \"protocol\": \"\",\n \"requestModel\": \"\"\n }\n },\n \"awsS3DataSource\": {\n \"awsAccessKey\": {\n \"accessKeyId\": \"\",\n \"secretAccessKey\": \"\"\n },\n \"bucketName\": \"\",\n \"path\": \"\",\n \"roleArn\": \"\"\n },\n \"azureBlobStorageDataSource\": {\n \"azureCredentials\": {\n \"sasToken\": \"\"\n },\n \"container\": \"\",\n \"path\": \"\",\n \"storageAccount\": \"\"\n },\n \"gcsDataSink\": {\n \"bucketName\": \"\",\n \"path\": \"\"\n },\n \"gcsDataSource\": {},\n \"gcsIntermediateDataLocation\": {},\n \"httpDataSource\": {\n \"listUrl\": \"\"\n },\n \"objectConditions\": {\n \"excludePrefixes\": [],\n \"includePrefixes\": [],\n \"lastModifiedBefore\": \"\",\n \"lastModifiedSince\": \"\",\n \"maxTimeElapsedSinceLastModification\": \"\",\n \"minTimeElapsedSinceLastModification\": \"\"\n },\n \"posixDataSink\": {\n \"rootDirectory\": \"\"\n },\n \"posixDataSource\": {},\n \"sinkAgentPoolName\": \"\",\n \"sourceAgentPoolName\": \"\",\n \"transferManifest\": {\n \"location\": \"\"\n },\n \"transferOptions\": {\n \"deleteObjectsFromSourceAfterTransfer\": false,\n \"deleteObjectsUniqueInSink\": false,\n \"metadataOptions\": {\n \"acl\": \"\",\n \"gid\": \"\",\n \"kmsKey\": \"\",\n \"mode\": \"\",\n \"storageClass\": \"\",\n \"symlink\": \"\",\n \"temporaryHold\": \"\",\n \"timeCreated\": \"\",\n \"uid\": \"\"\n },\n \"overwriteObjectsAlreadyExistingInSink\": false,\n \"overwriteWhen\": \"\"\n }\n }\n },\n \"updateTransferJobFieldMask\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/:jobName"
payload := strings.NewReader("{\n \"projectId\": \"\",\n \"transferJob\": {\n \"creationTime\": \"\",\n \"deletionTime\": \"\",\n \"description\": \"\",\n \"eventStream\": {\n \"eventStreamExpirationTime\": \"\",\n \"eventStreamStartTime\": \"\",\n \"name\": \"\"\n },\n \"lastModificationTime\": \"\",\n \"latestOperationName\": \"\",\n \"loggingConfig\": {\n \"enableOnpremGcsTransferLogs\": false,\n \"logActionStates\": [],\n \"logActions\": []\n },\n \"name\": \"\",\n \"notificationConfig\": {\n \"eventTypes\": [],\n \"payloadFormat\": \"\",\n \"pubsubTopic\": \"\"\n },\n \"projectId\": \"\",\n \"schedule\": {\n \"endTimeOfDay\": {\n \"hours\": 0,\n \"minutes\": 0,\n \"nanos\": 0,\n \"seconds\": 0\n },\n \"repeatInterval\": \"\",\n \"scheduleEndDate\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"scheduleStartDate\": {},\n \"startTimeOfDay\": {}\n },\n \"status\": \"\",\n \"transferSpec\": {\n \"awsS3CompatibleDataSource\": {\n \"bucketName\": \"\",\n \"endpoint\": \"\",\n \"path\": \"\",\n \"region\": \"\",\n \"s3Metadata\": {\n \"authMethod\": \"\",\n \"listApi\": \"\",\n \"protocol\": \"\",\n \"requestModel\": \"\"\n }\n },\n \"awsS3DataSource\": {\n \"awsAccessKey\": {\n \"accessKeyId\": \"\",\n \"secretAccessKey\": \"\"\n },\n \"bucketName\": \"\",\n \"path\": \"\",\n \"roleArn\": \"\"\n },\n \"azureBlobStorageDataSource\": {\n \"azureCredentials\": {\n \"sasToken\": \"\"\n },\n \"container\": \"\",\n \"path\": \"\",\n \"storageAccount\": \"\"\n },\n \"gcsDataSink\": {\n \"bucketName\": \"\",\n \"path\": \"\"\n },\n \"gcsDataSource\": {},\n \"gcsIntermediateDataLocation\": {},\n \"httpDataSource\": {\n \"listUrl\": \"\"\n },\n \"objectConditions\": {\n \"excludePrefixes\": [],\n \"includePrefixes\": [],\n \"lastModifiedBefore\": \"\",\n \"lastModifiedSince\": \"\",\n \"maxTimeElapsedSinceLastModification\": \"\",\n \"minTimeElapsedSinceLastModification\": \"\"\n },\n \"posixDataSink\": {\n \"rootDirectory\": \"\"\n },\n \"posixDataSource\": {},\n \"sinkAgentPoolName\": \"\",\n \"sourceAgentPoolName\": \"\",\n \"transferManifest\": {\n \"location\": \"\"\n },\n \"transferOptions\": {\n \"deleteObjectsFromSourceAfterTransfer\": false,\n \"deleteObjectsUniqueInSink\": false,\n \"metadataOptions\": {\n \"acl\": \"\",\n \"gid\": \"\",\n \"kmsKey\": \"\",\n \"mode\": \"\",\n \"storageClass\": \"\",\n \"symlink\": \"\",\n \"temporaryHold\": \"\",\n \"timeCreated\": \"\",\n \"uid\": \"\"\n },\n \"overwriteObjectsAlreadyExistingInSink\": false,\n \"overwriteWhen\": \"\"\n }\n }\n },\n \"updateTransferJobFieldMask\": \"\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
PATCH /baseUrl/v1/:jobName HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 2805
{
"projectId": "",
"transferJob": {
"creationTime": "",
"deletionTime": "",
"description": "",
"eventStream": {
"eventStreamExpirationTime": "",
"eventStreamStartTime": "",
"name": ""
},
"lastModificationTime": "",
"latestOperationName": "",
"loggingConfig": {
"enableOnpremGcsTransferLogs": false,
"logActionStates": [],
"logActions": []
},
"name": "",
"notificationConfig": {
"eventTypes": [],
"payloadFormat": "",
"pubsubTopic": ""
},
"projectId": "",
"schedule": {
"endTimeOfDay": {
"hours": 0,
"minutes": 0,
"nanos": 0,
"seconds": 0
},
"repeatInterval": "",
"scheduleEndDate": {
"day": 0,
"month": 0,
"year": 0
},
"scheduleStartDate": {},
"startTimeOfDay": {}
},
"status": "",
"transferSpec": {
"awsS3CompatibleDataSource": {
"bucketName": "",
"endpoint": "",
"path": "",
"region": "",
"s3Metadata": {
"authMethod": "",
"listApi": "",
"protocol": "",
"requestModel": ""
}
},
"awsS3DataSource": {
"awsAccessKey": {
"accessKeyId": "",
"secretAccessKey": ""
},
"bucketName": "",
"path": "",
"roleArn": ""
},
"azureBlobStorageDataSource": {
"azureCredentials": {
"sasToken": ""
},
"container": "",
"path": "",
"storageAccount": ""
},
"gcsDataSink": {
"bucketName": "",
"path": ""
},
"gcsDataSource": {},
"gcsIntermediateDataLocation": {},
"httpDataSource": {
"listUrl": ""
},
"objectConditions": {
"excludePrefixes": [],
"includePrefixes": [],
"lastModifiedBefore": "",
"lastModifiedSince": "",
"maxTimeElapsedSinceLastModification": "",
"minTimeElapsedSinceLastModification": ""
},
"posixDataSink": {
"rootDirectory": ""
},
"posixDataSource": {},
"sinkAgentPoolName": "",
"sourceAgentPoolName": "",
"transferManifest": {
"location": ""
},
"transferOptions": {
"deleteObjectsFromSourceAfterTransfer": false,
"deleteObjectsUniqueInSink": false,
"metadataOptions": {
"acl": "",
"gid": "",
"kmsKey": "",
"mode": "",
"storageClass": "",
"symlink": "",
"temporaryHold": "",
"timeCreated": "",
"uid": ""
},
"overwriteObjectsAlreadyExistingInSink": false,
"overwriteWhen": ""
}
}
},
"updateTransferJobFieldMask": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/v1/:jobName")
.setHeader("content-type", "application/json")
.setBody("{\n \"projectId\": \"\",\n \"transferJob\": {\n \"creationTime\": \"\",\n \"deletionTime\": \"\",\n \"description\": \"\",\n \"eventStream\": {\n \"eventStreamExpirationTime\": \"\",\n \"eventStreamStartTime\": \"\",\n \"name\": \"\"\n },\n \"lastModificationTime\": \"\",\n \"latestOperationName\": \"\",\n \"loggingConfig\": {\n \"enableOnpremGcsTransferLogs\": false,\n \"logActionStates\": [],\n \"logActions\": []\n },\n \"name\": \"\",\n \"notificationConfig\": {\n \"eventTypes\": [],\n \"payloadFormat\": \"\",\n \"pubsubTopic\": \"\"\n },\n \"projectId\": \"\",\n \"schedule\": {\n \"endTimeOfDay\": {\n \"hours\": 0,\n \"minutes\": 0,\n \"nanos\": 0,\n \"seconds\": 0\n },\n \"repeatInterval\": \"\",\n \"scheduleEndDate\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"scheduleStartDate\": {},\n \"startTimeOfDay\": {}\n },\n \"status\": \"\",\n \"transferSpec\": {\n \"awsS3CompatibleDataSource\": {\n \"bucketName\": \"\",\n \"endpoint\": \"\",\n \"path\": \"\",\n \"region\": \"\",\n \"s3Metadata\": {\n \"authMethod\": \"\",\n \"listApi\": \"\",\n \"protocol\": \"\",\n \"requestModel\": \"\"\n }\n },\n \"awsS3DataSource\": {\n \"awsAccessKey\": {\n \"accessKeyId\": \"\",\n \"secretAccessKey\": \"\"\n },\n \"bucketName\": \"\",\n \"path\": \"\",\n \"roleArn\": \"\"\n },\n \"azureBlobStorageDataSource\": {\n \"azureCredentials\": {\n \"sasToken\": \"\"\n },\n \"container\": \"\",\n \"path\": \"\",\n \"storageAccount\": \"\"\n },\n \"gcsDataSink\": {\n \"bucketName\": \"\",\n \"path\": \"\"\n },\n \"gcsDataSource\": {},\n \"gcsIntermediateDataLocation\": {},\n \"httpDataSource\": {\n \"listUrl\": \"\"\n },\n \"objectConditions\": {\n \"excludePrefixes\": [],\n \"includePrefixes\": [],\n \"lastModifiedBefore\": \"\",\n \"lastModifiedSince\": \"\",\n \"maxTimeElapsedSinceLastModification\": \"\",\n \"minTimeElapsedSinceLastModification\": \"\"\n },\n \"posixDataSink\": {\n \"rootDirectory\": \"\"\n },\n \"posixDataSource\": {},\n \"sinkAgentPoolName\": \"\",\n \"sourceAgentPoolName\": \"\",\n \"transferManifest\": {\n \"location\": \"\"\n },\n \"transferOptions\": {\n \"deleteObjectsFromSourceAfterTransfer\": false,\n \"deleteObjectsUniqueInSink\": false,\n \"metadataOptions\": {\n \"acl\": \"\",\n \"gid\": \"\",\n \"kmsKey\": \"\",\n \"mode\": \"\",\n \"storageClass\": \"\",\n \"symlink\": \"\",\n \"temporaryHold\": \"\",\n \"timeCreated\": \"\",\n \"uid\": \"\"\n },\n \"overwriteObjectsAlreadyExistingInSink\": false,\n \"overwriteWhen\": \"\"\n }\n }\n },\n \"updateTransferJobFieldMask\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/:jobName"))
.header("content-type", "application/json")
.method("PATCH", HttpRequest.BodyPublishers.ofString("{\n \"projectId\": \"\",\n \"transferJob\": {\n \"creationTime\": \"\",\n \"deletionTime\": \"\",\n \"description\": \"\",\n \"eventStream\": {\n \"eventStreamExpirationTime\": \"\",\n \"eventStreamStartTime\": \"\",\n \"name\": \"\"\n },\n \"lastModificationTime\": \"\",\n \"latestOperationName\": \"\",\n \"loggingConfig\": {\n \"enableOnpremGcsTransferLogs\": false,\n \"logActionStates\": [],\n \"logActions\": []\n },\n \"name\": \"\",\n \"notificationConfig\": {\n \"eventTypes\": [],\n \"payloadFormat\": \"\",\n \"pubsubTopic\": \"\"\n },\n \"projectId\": \"\",\n \"schedule\": {\n \"endTimeOfDay\": {\n \"hours\": 0,\n \"minutes\": 0,\n \"nanos\": 0,\n \"seconds\": 0\n },\n \"repeatInterval\": \"\",\n \"scheduleEndDate\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"scheduleStartDate\": {},\n \"startTimeOfDay\": {}\n },\n \"status\": \"\",\n \"transferSpec\": {\n \"awsS3CompatibleDataSource\": {\n \"bucketName\": \"\",\n \"endpoint\": \"\",\n \"path\": \"\",\n \"region\": \"\",\n \"s3Metadata\": {\n \"authMethod\": \"\",\n \"listApi\": \"\",\n \"protocol\": \"\",\n \"requestModel\": \"\"\n }\n },\n \"awsS3DataSource\": {\n \"awsAccessKey\": {\n \"accessKeyId\": \"\",\n \"secretAccessKey\": \"\"\n },\n \"bucketName\": \"\",\n \"path\": \"\",\n \"roleArn\": \"\"\n },\n \"azureBlobStorageDataSource\": {\n \"azureCredentials\": {\n \"sasToken\": \"\"\n },\n \"container\": \"\",\n \"path\": \"\",\n \"storageAccount\": \"\"\n },\n \"gcsDataSink\": {\n \"bucketName\": \"\",\n \"path\": \"\"\n },\n \"gcsDataSource\": {},\n \"gcsIntermediateDataLocation\": {},\n \"httpDataSource\": {\n \"listUrl\": \"\"\n },\n \"objectConditions\": {\n \"excludePrefixes\": [],\n \"includePrefixes\": [],\n \"lastModifiedBefore\": \"\",\n \"lastModifiedSince\": \"\",\n \"maxTimeElapsedSinceLastModification\": \"\",\n \"minTimeElapsedSinceLastModification\": \"\"\n },\n \"posixDataSink\": {\n \"rootDirectory\": \"\"\n },\n \"posixDataSource\": {},\n \"sinkAgentPoolName\": \"\",\n \"sourceAgentPoolName\": \"\",\n \"transferManifest\": {\n \"location\": \"\"\n },\n \"transferOptions\": {\n \"deleteObjectsFromSourceAfterTransfer\": false,\n \"deleteObjectsUniqueInSink\": false,\n \"metadataOptions\": {\n \"acl\": \"\",\n \"gid\": \"\",\n \"kmsKey\": \"\",\n \"mode\": \"\",\n \"storageClass\": \"\",\n \"symlink\": \"\",\n \"temporaryHold\": \"\",\n \"timeCreated\": \"\",\n \"uid\": \"\"\n },\n \"overwriteObjectsAlreadyExistingInSink\": false,\n \"overwriteWhen\": \"\"\n }\n }\n },\n \"updateTransferJobFieldMask\": \"\"\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 \"projectId\": \"\",\n \"transferJob\": {\n \"creationTime\": \"\",\n \"deletionTime\": \"\",\n \"description\": \"\",\n \"eventStream\": {\n \"eventStreamExpirationTime\": \"\",\n \"eventStreamStartTime\": \"\",\n \"name\": \"\"\n },\n \"lastModificationTime\": \"\",\n \"latestOperationName\": \"\",\n \"loggingConfig\": {\n \"enableOnpremGcsTransferLogs\": false,\n \"logActionStates\": [],\n \"logActions\": []\n },\n \"name\": \"\",\n \"notificationConfig\": {\n \"eventTypes\": [],\n \"payloadFormat\": \"\",\n \"pubsubTopic\": \"\"\n },\n \"projectId\": \"\",\n \"schedule\": {\n \"endTimeOfDay\": {\n \"hours\": 0,\n \"minutes\": 0,\n \"nanos\": 0,\n \"seconds\": 0\n },\n \"repeatInterval\": \"\",\n \"scheduleEndDate\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"scheduleStartDate\": {},\n \"startTimeOfDay\": {}\n },\n \"status\": \"\",\n \"transferSpec\": {\n \"awsS3CompatibleDataSource\": {\n \"bucketName\": \"\",\n \"endpoint\": \"\",\n \"path\": \"\",\n \"region\": \"\",\n \"s3Metadata\": {\n \"authMethod\": \"\",\n \"listApi\": \"\",\n \"protocol\": \"\",\n \"requestModel\": \"\"\n }\n },\n \"awsS3DataSource\": {\n \"awsAccessKey\": {\n \"accessKeyId\": \"\",\n \"secretAccessKey\": \"\"\n },\n \"bucketName\": \"\",\n \"path\": \"\",\n \"roleArn\": \"\"\n },\n \"azureBlobStorageDataSource\": {\n \"azureCredentials\": {\n \"sasToken\": \"\"\n },\n \"container\": \"\",\n \"path\": \"\",\n \"storageAccount\": \"\"\n },\n \"gcsDataSink\": {\n \"bucketName\": \"\",\n \"path\": \"\"\n },\n \"gcsDataSource\": {},\n \"gcsIntermediateDataLocation\": {},\n \"httpDataSource\": {\n \"listUrl\": \"\"\n },\n \"objectConditions\": {\n \"excludePrefixes\": [],\n \"includePrefixes\": [],\n \"lastModifiedBefore\": \"\",\n \"lastModifiedSince\": \"\",\n \"maxTimeElapsedSinceLastModification\": \"\",\n \"minTimeElapsedSinceLastModification\": \"\"\n },\n \"posixDataSink\": {\n \"rootDirectory\": \"\"\n },\n \"posixDataSource\": {},\n \"sinkAgentPoolName\": \"\",\n \"sourceAgentPoolName\": \"\",\n \"transferManifest\": {\n \"location\": \"\"\n },\n \"transferOptions\": {\n \"deleteObjectsFromSourceAfterTransfer\": false,\n \"deleteObjectsUniqueInSink\": false,\n \"metadataOptions\": {\n \"acl\": \"\",\n \"gid\": \"\",\n \"kmsKey\": \"\",\n \"mode\": \"\",\n \"storageClass\": \"\",\n \"symlink\": \"\",\n \"temporaryHold\": \"\",\n \"timeCreated\": \"\",\n \"uid\": \"\"\n },\n \"overwriteObjectsAlreadyExistingInSink\": false,\n \"overwriteWhen\": \"\"\n }\n }\n },\n \"updateTransferJobFieldMask\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/:jobName")
.patch(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/v1/:jobName")
.header("content-type", "application/json")
.body("{\n \"projectId\": \"\",\n \"transferJob\": {\n \"creationTime\": \"\",\n \"deletionTime\": \"\",\n \"description\": \"\",\n \"eventStream\": {\n \"eventStreamExpirationTime\": \"\",\n \"eventStreamStartTime\": \"\",\n \"name\": \"\"\n },\n \"lastModificationTime\": \"\",\n \"latestOperationName\": \"\",\n \"loggingConfig\": {\n \"enableOnpremGcsTransferLogs\": false,\n \"logActionStates\": [],\n \"logActions\": []\n },\n \"name\": \"\",\n \"notificationConfig\": {\n \"eventTypes\": [],\n \"payloadFormat\": \"\",\n \"pubsubTopic\": \"\"\n },\n \"projectId\": \"\",\n \"schedule\": {\n \"endTimeOfDay\": {\n \"hours\": 0,\n \"minutes\": 0,\n \"nanos\": 0,\n \"seconds\": 0\n },\n \"repeatInterval\": \"\",\n \"scheduleEndDate\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"scheduleStartDate\": {},\n \"startTimeOfDay\": {}\n },\n \"status\": \"\",\n \"transferSpec\": {\n \"awsS3CompatibleDataSource\": {\n \"bucketName\": \"\",\n \"endpoint\": \"\",\n \"path\": \"\",\n \"region\": \"\",\n \"s3Metadata\": {\n \"authMethod\": \"\",\n \"listApi\": \"\",\n \"protocol\": \"\",\n \"requestModel\": \"\"\n }\n },\n \"awsS3DataSource\": {\n \"awsAccessKey\": {\n \"accessKeyId\": \"\",\n \"secretAccessKey\": \"\"\n },\n \"bucketName\": \"\",\n \"path\": \"\",\n \"roleArn\": \"\"\n },\n \"azureBlobStorageDataSource\": {\n \"azureCredentials\": {\n \"sasToken\": \"\"\n },\n \"container\": \"\",\n \"path\": \"\",\n \"storageAccount\": \"\"\n },\n \"gcsDataSink\": {\n \"bucketName\": \"\",\n \"path\": \"\"\n },\n \"gcsDataSource\": {},\n \"gcsIntermediateDataLocation\": {},\n \"httpDataSource\": {\n \"listUrl\": \"\"\n },\n \"objectConditions\": {\n \"excludePrefixes\": [],\n \"includePrefixes\": [],\n \"lastModifiedBefore\": \"\",\n \"lastModifiedSince\": \"\",\n \"maxTimeElapsedSinceLastModification\": \"\",\n \"minTimeElapsedSinceLastModification\": \"\"\n },\n \"posixDataSink\": {\n \"rootDirectory\": \"\"\n },\n \"posixDataSource\": {},\n \"sinkAgentPoolName\": \"\",\n \"sourceAgentPoolName\": \"\",\n \"transferManifest\": {\n \"location\": \"\"\n },\n \"transferOptions\": {\n \"deleteObjectsFromSourceAfterTransfer\": false,\n \"deleteObjectsUniqueInSink\": false,\n \"metadataOptions\": {\n \"acl\": \"\",\n \"gid\": \"\",\n \"kmsKey\": \"\",\n \"mode\": \"\",\n \"storageClass\": \"\",\n \"symlink\": \"\",\n \"temporaryHold\": \"\",\n \"timeCreated\": \"\",\n \"uid\": \"\"\n },\n \"overwriteObjectsAlreadyExistingInSink\": false,\n \"overwriteWhen\": \"\"\n }\n }\n },\n \"updateTransferJobFieldMask\": \"\"\n}")
.asString();
const data = JSON.stringify({
projectId: '',
transferJob: {
creationTime: '',
deletionTime: '',
description: '',
eventStream: {
eventStreamExpirationTime: '',
eventStreamStartTime: '',
name: ''
},
lastModificationTime: '',
latestOperationName: '',
loggingConfig: {
enableOnpremGcsTransferLogs: false,
logActionStates: [],
logActions: []
},
name: '',
notificationConfig: {
eventTypes: [],
payloadFormat: '',
pubsubTopic: ''
},
projectId: '',
schedule: {
endTimeOfDay: {
hours: 0,
minutes: 0,
nanos: 0,
seconds: 0
},
repeatInterval: '',
scheduleEndDate: {
day: 0,
month: 0,
year: 0
},
scheduleStartDate: {},
startTimeOfDay: {}
},
status: '',
transferSpec: {
awsS3CompatibleDataSource: {
bucketName: '',
endpoint: '',
path: '',
region: '',
s3Metadata: {
authMethod: '',
listApi: '',
protocol: '',
requestModel: ''
}
},
awsS3DataSource: {
awsAccessKey: {
accessKeyId: '',
secretAccessKey: ''
},
bucketName: '',
path: '',
roleArn: ''
},
azureBlobStorageDataSource: {
azureCredentials: {
sasToken: ''
},
container: '',
path: '',
storageAccount: ''
},
gcsDataSink: {
bucketName: '',
path: ''
},
gcsDataSource: {},
gcsIntermediateDataLocation: {},
httpDataSource: {
listUrl: ''
},
objectConditions: {
excludePrefixes: [],
includePrefixes: [],
lastModifiedBefore: '',
lastModifiedSince: '',
maxTimeElapsedSinceLastModification: '',
minTimeElapsedSinceLastModification: ''
},
posixDataSink: {
rootDirectory: ''
},
posixDataSource: {},
sinkAgentPoolName: '',
sourceAgentPoolName: '',
transferManifest: {
location: ''
},
transferOptions: {
deleteObjectsFromSourceAfterTransfer: false,
deleteObjectsUniqueInSink: false,
metadataOptions: {
acl: '',
gid: '',
kmsKey: '',
mode: '',
storageClass: '',
symlink: '',
temporaryHold: '',
timeCreated: '',
uid: ''
},
overwriteObjectsAlreadyExistingInSink: false,
overwriteWhen: ''
}
}
},
updateTransferJobFieldMask: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PATCH', '{{baseUrl}}/v1/:jobName');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PATCH',
url: '{{baseUrl}}/v1/:jobName',
headers: {'content-type': 'application/json'},
data: {
projectId: '',
transferJob: {
creationTime: '',
deletionTime: '',
description: '',
eventStream: {eventStreamExpirationTime: '', eventStreamStartTime: '', name: ''},
lastModificationTime: '',
latestOperationName: '',
loggingConfig: {enableOnpremGcsTransferLogs: false, logActionStates: [], logActions: []},
name: '',
notificationConfig: {eventTypes: [], payloadFormat: '', pubsubTopic: ''},
projectId: '',
schedule: {
endTimeOfDay: {hours: 0, minutes: 0, nanos: 0, seconds: 0},
repeatInterval: '',
scheduleEndDate: {day: 0, month: 0, year: 0},
scheduleStartDate: {},
startTimeOfDay: {}
},
status: '',
transferSpec: {
awsS3CompatibleDataSource: {
bucketName: '',
endpoint: '',
path: '',
region: '',
s3Metadata: {authMethod: '', listApi: '', protocol: '', requestModel: ''}
},
awsS3DataSource: {
awsAccessKey: {accessKeyId: '', secretAccessKey: ''},
bucketName: '',
path: '',
roleArn: ''
},
azureBlobStorageDataSource: {azureCredentials: {sasToken: ''}, container: '', path: '', storageAccount: ''},
gcsDataSink: {bucketName: '', path: ''},
gcsDataSource: {},
gcsIntermediateDataLocation: {},
httpDataSource: {listUrl: ''},
objectConditions: {
excludePrefixes: [],
includePrefixes: [],
lastModifiedBefore: '',
lastModifiedSince: '',
maxTimeElapsedSinceLastModification: '',
minTimeElapsedSinceLastModification: ''
},
posixDataSink: {rootDirectory: ''},
posixDataSource: {},
sinkAgentPoolName: '',
sourceAgentPoolName: '',
transferManifest: {location: ''},
transferOptions: {
deleteObjectsFromSourceAfterTransfer: false,
deleteObjectsUniqueInSink: false,
metadataOptions: {
acl: '',
gid: '',
kmsKey: '',
mode: '',
storageClass: '',
symlink: '',
temporaryHold: '',
timeCreated: '',
uid: ''
},
overwriteObjectsAlreadyExistingInSink: false,
overwriteWhen: ''
}
}
},
updateTransferJobFieldMask: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/:jobName';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"projectId":"","transferJob":{"creationTime":"","deletionTime":"","description":"","eventStream":{"eventStreamExpirationTime":"","eventStreamStartTime":"","name":""},"lastModificationTime":"","latestOperationName":"","loggingConfig":{"enableOnpremGcsTransferLogs":false,"logActionStates":[],"logActions":[]},"name":"","notificationConfig":{"eventTypes":[],"payloadFormat":"","pubsubTopic":""},"projectId":"","schedule":{"endTimeOfDay":{"hours":0,"minutes":0,"nanos":0,"seconds":0},"repeatInterval":"","scheduleEndDate":{"day":0,"month":0,"year":0},"scheduleStartDate":{},"startTimeOfDay":{}},"status":"","transferSpec":{"awsS3CompatibleDataSource":{"bucketName":"","endpoint":"","path":"","region":"","s3Metadata":{"authMethod":"","listApi":"","protocol":"","requestModel":""}},"awsS3DataSource":{"awsAccessKey":{"accessKeyId":"","secretAccessKey":""},"bucketName":"","path":"","roleArn":""},"azureBlobStorageDataSource":{"azureCredentials":{"sasToken":""},"container":"","path":"","storageAccount":""},"gcsDataSink":{"bucketName":"","path":""},"gcsDataSource":{},"gcsIntermediateDataLocation":{},"httpDataSource":{"listUrl":""},"objectConditions":{"excludePrefixes":[],"includePrefixes":[],"lastModifiedBefore":"","lastModifiedSince":"","maxTimeElapsedSinceLastModification":"","minTimeElapsedSinceLastModification":""},"posixDataSink":{"rootDirectory":""},"posixDataSource":{},"sinkAgentPoolName":"","sourceAgentPoolName":"","transferManifest":{"location":""},"transferOptions":{"deleteObjectsFromSourceAfterTransfer":false,"deleteObjectsUniqueInSink":false,"metadataOptions":{"acl":"","gid":"","kmsKey":"","mode":"","storageClass":"","symlink":"","temporaryHold":"","timeCreated":"","uid":""},"overwriteObjectsAlreadyExistingInSink":false,"overwriteWhen":""}}},"updateTransferJobFieldMask":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/:jobName',
method: 'PATCH',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "projectId": "",\n "transferJob": {\n "creationTime": "",\n "deletionTime": "",\n "description": "",\n "eventStream": {\n "eventStreamExpirationTime": "",\n "eventStreamStartTime": "",\n "name": ""\n },\n "lastModificationTime": "",\n "latestOperationName": "",\n "loggingConfig": {\n "enableOnpremGcsTransferLogs": false,\n "logActionStates": [],\n "logActions": []\n },\n "name": "",\n "notificationConfig": {\n "eventTypes": [],\n "payloadFormat": "",\n "pubsubTopic": ""\n },\n "projectId": "",\n "schedule": {\n "endTimeOfDay": {\n "hours": 0,\n "minutes": 0,\n "nanos": 0,\n "seconds": 0\n },\n "repeatInterval": "",\n "scheduleEndDate": {\n "day": 0,\n "month": 0,\n "year": 0\n },\n "scheduleStartDate": {},\n "startTimeOfDay": {}\n },\n "status": "",\n "transferSpec": {\n "awsS3CompatibleDataSource": {\n "bucketName": "",\n "endpoint": "",\n "path": "",\n "region": "",\n "s3Metadata": {\n "authMethod": "",\n "listApi": "",\n "protocol": "",\n "requestModel": ""\n }\n },\n "awsS3DataSource": {\n "awsAccessKey": {\n "accessKeyId": "",\n "secretAccessKey": ""\n },\n "bucketName": "",\n "path": "",\n "roleArn": ""\n },\n "azureBlobStorageDataSource": {\n "azureCredentials": {\n "sasToken": ""\n },\n "container": "",\n "path": "",\n "storageAccount": ""\n },\n "gcsDataSink": {\n "bucketName": "",\n "path": ""\n },\n "gcsDataSource": {},\n "gcsIntermediateDataLocation": {},\n "httpDataSource": {\n "listUrl": ""\n },\n "objectConditions": {\n "excludePrefixes": [],\n "includePrefixes": [],\n "lastModifiedBefore": "",\n "lastModifiedSince": "",\n "maxTimeElapsedSinceLastModification": "",\n "minTimeElapsedSinceLastModification": ""\n },\n "posixDataSink": {\n "rootDirectory": ""\n },\n "posixDataSource": {},\n "sinkAgentPoolName": "",\n "sourceAgentPoolName": "",\n "transferManifest": {\n "location": ""\n },\n "transferOptions": {\n "deleteObjectsFromSourceAfterTransfer": false,\n "deleteObjectsUniqueInSink": false,\n "metadataOptions": {\n "acl": "",\n "gid": "",\n "kmsKey": "",\n "mode": "",\n "storageClass": "",\n "symlink": "",\n "temporaryHold": "",\n "timeCreated": "",\n "uid": ""\n },\n "overwriteObjectsAlreadyExistingInSink": false,\n "overwriteWhen": ""\n }\n }\n },\n "updateTransferJobFieldMask": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"projectId\": \"\",\n \"transferJob\": {\n \"creationTime\": \"\",\n \"deletionTime\": \"\",\n \"description\": \"\",\n \"eventStream\": {\n \"eventStreamExpirationTime\": \"\",\n \"eventStreamStartTime\": \"\",\n \"name\": \"\"\n },\n \"lastModificationTime\": \"\",\n \"latestOperationName\": \"\",\n \"loggingConfig\": {\n \"enableOnpremGcsTransferLogs\": false,\n \"logActionStates\": [],\n \"logActions\": []\n },\n \"name\": \"\",\n \"notificationConfig\": {\n \"eventTypes\": [],\n \"payloadFormat\": \"\",\n \"pubsubTopic\": \"\"\n },\n \"projectId\": \"\",\n \"schedule\": {\n \"endTimeOfDay\": {\n \"hours\": 0,\n \"minutes\": 0,\n \"nanos\": 0,\n \"seconds\": 0\n },\n \"repeatInterval\": \"\",\n \"scheduleEndDate\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"scheduleStartDate\": {},\n \"startTimeOfDay\": {}\n },\n \"status\": \"\",\n \"transferSpec\": {\n \"awsS3CompatibleDataSource\": {\n \"bucketName\": \"\",\n \"endpoint\": \"\",\n \"path\": \"\",\n \"region\": \"\",\n \"s3Metadata\": {\n \"authMethod\": \"\",\n \"listApi\": \"\",\n \"protocol\": \"\",\n \"requestModel\": \"\"\n }\n },\n \"awsS3DataSource\": {\n \"awsAccessKey\": {\n \"accessKeyId\": \"\",\n \"secretAccessKey\": \"\"\n },\n \"bucketName\": \"\",\n \"path\": \"\",\n \"roleArn\": \"\"\n },\n \"azureBlobStorageDataSource\": {\n \"azureCredentials\": {\n \"sasToken\": \"\"\n },\n \"container\": \"\",\n \"path\": \"\",\n \"storageAccount\": \"\"\n },\n \"gcsDataSink\": {\n \"bucketName\": \"\",\n \"path\": \"\"\n },\n \"gcsDataSource\": {},\n \"gcsIntermediateDataLocation\": {},\n \"httpDataSource\": {\n \"listUrl\": \"\"\n },\n \"objectConditions\": {\n \"excludePrefixes\": [],\n \"includePrefixes\": [],\n \"lastModifiedBefore\": \"\",\n \"lastModifiedSince\": \"\",\n \"maxTimeElapsedSinceLastModification\": \"\",\n \"minTimeElapsedSinceLastModification\": \"\"\n },\n \"posixDataSink\": {\n \"rootDirectory\": \"\"\n },\n \"posixDataSource\": {},\n \"sinkAgentPoolName\": \"\",\n \"sourceAgentPoolName\": \"\",\n \"transferManifest\": {\n \"location\": \"\"\n },\n \"transferOptions\": {\n \"deleteObjectsFromSourceAfterTransfer\": false,\n \"deleteObjectsUniqueInSink\": false,\n \"metadataOptions\": {\n \"acl\": \"\",\n \"gid\": \"\",\n \"kmsKey\": \"\",\n \"mode\": \"\",\n \"storageClass\": \"\",\n \"symlink\": \"\",\n \"temporaryHold\": \"\",\n \"timeCreated\": \"\",\n \"uid\": \"\"\n },\n \"overwriteObjectsAlreadyExistingInSink\": false,\n \"overwriteWhen\": \"\"\n }\n }\n },\n \"updateTransferJobFieldMask\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1/:jobName")
.patch(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PATCH',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/:jobName',
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({
projectId: '',
transferJob: {
creationTime: '',
deletionTime: '',
description: '',
eventStream: {eventStreamExpirationTime: '', eventStreamStartTime: '', name: ''},
lastModificationTime: '',
latestOperationName: '',
loggingConfig: {enableOnpremGcsTransferLogs: false, logActionStates: [], logActions: []},
name: '',
notificationConfig: {eventTypes: [], payloadFormat: '', pubsubTopic: ''},
projectId: '',
schedule: {
endTimeOfDay: {hours: 0, minutes: 0, nanos: 0, seconds: 0},
repeatInterval: '',
scheduleEndDate: {day: 0, month: 0, year: 0},
scheduleStartDate: {},
startTimeOfDay: {}
},
status: '',
transferSpec: {
awsS3CompatibleDataSource: {
bucketName: '',
endpoint: '',
path: '',
region: '',
s3Metadata: {authMethod: '', listApi: '', protocol: '', requestModel: ''}
},
awsS3DataSource: {
awsAccessKey: {accessKeyId: '', secretAccessKey: ''},
bucketName: '',
path: '',
roleArn: ''
},
azureBlobStorageDataSource: {azureCredentials: {sasToken: ''}, container: '', path: '', storageAccount: ''},
gcsDataSink: {bucketName: '', path: ''},
gcsDataSource: {},
gcsIntermediateDataLocation: {},
httpDataSource: {listUrl: ''},
objectConditions: {
excludePrefixes: [],
includePrefixes: [],
lastModifiedBefore: '',
lastModifiedSince: '',
maxTimeElapsedSinceLastModification: '',
minTimeElapsedSinceLastModification: ''
},
posixDataSink: {rootDirectory: ''},
posixDataSource: {},
sinkAgentPoolName: '',
sourceAgentPoolName: '',
transferManifest: {location: ''},
transferOptions: {
deleteObjectsFromSourceAfterTransfer: false,
deleteObjectsUniqueInSink: false,
metadataOptions: {
acl: '',
gid: '',
kmsKey: '',
mode: '',
storageClass: '',
symlink: '',
temporaryHold: '',
timeCreated: '',
uid: ''
},
overwriteObjectsAlreadyExistingInSink: false,
overwriteWhen: ''
}
}
},
updateTransferJobFieldMask: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PATCH',
url: '{{baseUrl}}/v1/:jobName',
headers: {'content-type': 'application/json'},
body: {
projectId: '',
transferJob: {
creationTime: '',
deletionTime: '',
description: '',
eventStream: {eventStreamExpirationTime: '', eventStreamStartTime: '', name: ''},
lastModificationTime: '',
latestOperationName: '',
loggingConfig: {enableOnpremGcsTransferLogs: false, logActionStates: [], logActions: []},
name: '',
notificationConfig: {eventTypes: [], payloadFormat: '', pubsubTopic: ''},
projectId: '',
schedule: {
endTimeOfDay: {hours: 0, minutes: 0, nanos: 0, seconds: 0},
repeatInterval: '',
scheduleEndDate: {day: 0, month: 0, year: 0},
scheduleStartDate: {},
startTimeOfDay: {}
},
status: '',
transferSpec: {
awsS3CompatibleDataSource: {
bucketName: '',
endpoint: '',
path: '',
region: '',
s3Metadata: {authMethod: '', listApi: '', protocol: '', requestModel: ''}
},
awsS3DataSource: {
awsAccessKey: {accessKeyId: '', secretAccessKey: ''},
bucketName: '',
path: '',
roleArn: ''
},
azureBlobStorageDataSource: {azureCredentials: {sasToken: ''}, container: '', path: '', storageAccount: ''},
gcsDataSink: {bucketName: '', path: ''},
gcsDataSource: {},
gcsIntermediateDataLocation: {},
httpDataSource: {listUrl: ''},
objectConditions: {
excludePrefixes: [],
includePrefixes: [],
lastModifiedBefore: '',
lastModifiedSince: '',
maxTimeElapsedSinceLastModification: '',
minTimeElapsedSinceLastModification: ''
},
posixDataSink: {rootDirectory: ''},
posixDataSource: {},
sinkAgentPoolName: '',
sourceAgentPoolName: '',
transferManifest: {location: ''},
transferOptions: {
deleteObjectsFromSourceAfterTransfer: false,
deleteObjectsUniqueInSink: false,
metadataOptions: {
acl: '',
gid: '',
kmsKey: '',
mode: '',
storageClass: '',
symlink: '',
temporaryHold: '',
timeCreated: '',
uid: ''
},
overwriteObjectsAlreadyExistingInSink: false,
overwriteWhen: ''
}
}
},
updateTransferJobFieldMask: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PATCH', '{{baseUrl}}/v1/:jobName');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
projectId: '',
transferJob: {
creationTime: '',
deletionTime: '',
description: '',
eventStream: {
eventStreamExpirationTime: '',
eventStreamStartTime: '',
name: ''
},
lastModificationTime: '',
latestOperationName: '',
loggingConfig: {
enableOnpremGcsTransferLogs: false,
logActionStates: [],
logActions: []
},
name: '',
notificationConfig: {
eventTypes: [],
payloadFormat: '',
pubsubTopic: ''
},
projectId: '',
schedule: {
endTimeOfDay: {
hours: 0,
minutes: 0,
nanos: 0,
seconds: 0
},
repeatInterval: '',
scheduleEndDate: {
day: 0,
month: 0,
year: 0
},
scheduleStartDate: {},
startTimeOfDay: {}
},
status: '',
transferSpec: {
awsS3CompatibleDataSource: {
bucketName: '',
endpoint: '',
path: '',
region: '',
s3Metadata: {
authMethod: '',
listApi: '',
protocol: '',
requestModel: ''
}
},
awsS3DataSource: {
awsAccessKey: {
accessKeyId: '',
secretAccessKey: ''
},
bucketName: '',
path: '',
roleArn: ''
},
azureBlobStorageDataSource: {
azureCredentials: {
sasToken: ''
},
container: '',
path: '',
storageAccount: ''
},
gcsDataSink: {
bucketName: '',
path: ''
},
gcsDataSource: {},
gcsIntermediateDataLocation: {},
httpDataSource: {
listUrl: ''
},
objectConditions: {
excludePrefixes: [],
includePrefixes: [],
lastModifiedBefore: '',
lastModifiedSince: '',
maxTimeElapsedSinceLastModification: '',
minTimeElapsedSinceLastModification: ''
},
posixDataSink: {
rootDirectory: ''
},
posixDataSource: {},
sinkAgentPoolName: '',
sourceAgentPoolName: '',
transferManifest: {
location: ''
},
transferOptions: {
deleteObjectsFromSourceAfterTransfer: false,
deleteObjectsUniqueInSink: false,
metadataOptions: {
acl: '',
gid: '',
kmsKey: '',
mode: '',
storageClass: '',
symlink: '',
temporaryHold: '',
timeCreated: '',
uid: ''
},
overwriteObjectsAlreadyExistingInSink: false,
overwriteWhen: ''
}
}
},
updateTransferJobFieldMask: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PATCH',
url: '{{baseUrl}}/v1/:jobName',
headers: {'content-type': 'application/json'},
data: {
projectId: '',
transferJob: {
creationTime: '',
deletionTime: '',
description: '',
eventStream: {eventStreamExpirationTime: '', eventStreamStartTime: '', name: ''},
lastModificationTime: '',
latestOperationName: '',
loggingConfig: {enableOnpremGcsTransferLogs: false, logActionStates: [], logActions: []},
name: '',
notificationConfig: {eventTypes: [], payloadFormat: '', pubsubTopic: ''},
projectId: '',
schedule: {
endTimeOfDay: {hours: 0, minutes: 0, nanos: 0, seconds: 0},
repeatInterval: '',
scheduleEndDate: {day: 0, month: 0, year: 0},
scheduleStartDate: {},
startTimeOfDay: {}
},
status: '',
transferSpec: {
awsS3CompatibleDataSource: {
bucketName: '',
endpoint: '',
path: '',
region: '',
s3Metadata: {authMethod: '', listApi: '', protocol: '', requestModel: ''}
},
awsS3DataSource: {
awsAccessKey: {accessKeyId: '', secretAccessKey: ''},
bucketName: '',
path: '',
roleArn: ''
},
azureBlobStorageDataSource: {azureCredentials: {sasToken: ''}, container: '', path: '', storageAccount: ''},
gcsDataSink: {bucketName: '', path: ''},
gcsDataSource: {},
gcsIntermediateDataLocation: {},
httpDataSource: {listUrl: ''},
objectConditions: {
excludePrefixes: [],
includePrefixes: [],
lastModifiedBefore: '',
lastModifiedSince: '',
maxTimeElapsedSinceLastModification: '',
minTimeElapsedSinceLastModification: ''
},
posixDataSink: {rootDirectory: ''},
posixDataSource: {},
sinkAgentPoolName: '',
sourceAgentPoolName: '',
transferManifest: {location: ''},
transferOptions: {
deleteObjectsFromSourceAfterTransfer: false,
deleteObjectsUniqueInSink: false,
metadataOptions: {
acl: '',
gid: '',
kmsKey: '',
mode: '',
storageClass: '',
symlink: '',
temporaryHold: '',
timeCreated: '',
uid: ''
},
overwriteObjectsAlreadyExistingInSink: false,
overwriteWhen: ''
}
}
},
updateTransferJobFieldMask: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/:jobName';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"projectId":"","transferJob":{"creationTime":"","deletionTime":"","description":"","eventStream":{"eventStreamExpirationTime":"","eventStreamStartTime":"","name":""},"lastModificationTime":"","latestOperationName":"","loggingConfig":{"enableOnpremGcsTransferLogs":false,"logActionStates":[],"logActions":[]},"name":"","notificationConfig":{"eventTypes":[],"payloadFormat":"","pubsubTopic":""},"projectId":"","schedule":{"endTimeOfDay":{"hours":0,"minutes":0,"nanos":0,"seconds":0},"repeatInterval":"","scheduleEndDate":{"day":0,"month":0,"year":0},"scheduleStartDate":{},"startTimeOfDay":{}},"status":"","transferSpec":{"awsS3CompatibleDataSource":{"bucketName":"","endpoint":"","path":"","region":"","s3Metadata":{"authMethod":"","listApi":"","protocol":"","requestModel":""}},"awsS3DataSource":{"awsAccessKey":{"accessKeyId":"","secretAccessKey":""},"bucketName":"","path":"","roleArn":""},"azureBlobStorageDataSource":{"azureCredentials":{"sasToken":""},"container":"","path":"","storageAccount":""},"gcsDataSink":{"bucketName":"","path":""},"gcsDataSource":{},"gcsIntermediateDataLocation":{},"httpDataSource":{"listUrl":""},"objectConditions":{"excludePrefixes":[],"includePrefixes":[],"lastModifiedBefore":"","lastModifiedSince":"","maxTimeElapsedSinceLastModification":"","minTimeElapsedSinceLastModification":""},"posixDataSink":{"rootDirectory":""},"posixDataSource":{},"sinkAgentPoolName":"","sourceAgentPoolName":"","transferManifest":{"location":""},"transferOptions":{"deleteObjectsFromSourceAfterTransfer":false,"deleteObjectsUniqueInSink":false,"metadataOptions":{"acl":"","gid":"","kmsKey":"","mode":"","storageClass":"","symlink":"","temporaryHold":"","timeCreated":"","uid":""},"overwriteObjectsAlreadyExistingInSink":false,"overwriteWhen":""}}},"updateTransferJobFieldMask":""}'
};
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 = @{ @"projectId": @"",
@"transferJob": @{ @"creationTime": @"", @"deletionTime": @"", @"description": @"", @"eventStream": @{ @"eventStreamExpirationTime": @"", @"eventStreamStartTime": @"", @"name": @"" }, @"lastModificationTime": @"", @"latestOperationName": @"", @"loggingConfig": @{ @"enableOnpremGcsTransferLogs": @NO, @"logActionStates": @[ ], @"logActions": @[ ] }, @"name": @"", @"notificationConfig": @{ @"eventTypes": @[ ], @"payloadFormat": @"", @"pubsubTopic": @"" }, @"projectId": @"", @"schedule": @{ @"endTimeOfDay": @{ @"hours": @0, @"minutes": @0, @"nanos": @0, @"seconds": @0 }, @"repeatInterval": @"", @"scheduleEndDate": @{ @"day": @0, @"month": @0, @"year": @0 }, @"scheduleStartDate": @{ }, @"startTimeOfDay": @{ } }, @"status": @"", @"transferSpec": @{ @"awsS3CompatibleDataSource": @{ @"bucketName": @"", @"endpoint": @"", @"path": @"", @"region": @"", @"s3Metadata": @{ @"authMethod": @"", @"listApi": @"", @"protocol": @"", @"requestModel": @"" } }, @"awsS3DataSource": @{ @"awsAccessKey": @{ @"accessKeyId": @"", @"secretAccessKey": @"" }, @"bucketName": @"", @"path": @"", @"roleArn": @"" }, @"azureBlobStorageDataSource": @{ @"azureCredentials": @{ @"sasToken": @"" }, @"container": @"", @"path": @"", @"storageAccount": @"" }, @"gcsDataSink": @{ @"bucketName": @"", @"path": @"" }, @"gcsDataSource": @{ }, @"gcsIntermediateDataLocation": @{ }, @"httpDataSource": @{ @"listUrl": @"" }, @"objectConditions": @{ @"excludePrefixes": @[ ], @"includePrefixes": @[ ], @"lastModifiedBefore": @"", @"lastModifiedSince": @"", @"maxTimeElapsedSinceLastModification": @"", @"minTimeElapsedSinceLastModification": @"" }, @"posixDataSink": @{ @"rootDirectory": @"" }, @"posixDataSource": @{ }, @"sinkAgentPoolName": @"", @"sourceAgentPoolName": @"", @"transferManifest": @{ @"location": @"" }, @"transferOptions": @{ @"deleteObjectsFromSourceAfterTransfer": @NO, @"deleteObjectsUniqueInSink": @NO, @"metadataOptions": @{ @"acl": @"", @"gid": @"", @"kmsKey": @"", @"mode": @"", @"storageClass": @"", @"symlink": @"", @"temporaryHold": @"", @"timeCreated": @"", @"uid": @"" }, @"overwriteObjectsAlreadyExistingInSink": @NO, @"overwriteWhen": @"" } } },
@"updateTransferJobFieldMask": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:jobName"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PATCH"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/:jobName" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"projectId\": \"\",\n \"transferJob\": {\n \"creationTime\": \"\",\n \"deletionTime\": \"\",\n \"description\": \"\",\n \"eventStream\": {\n \"eventStreamExpirationTime\": \"\",\n \"eventStreamStartTime\": \"\",\n \"name\": \"\"\n },\n \"lastModificationTime\": \"\",\n \"latestOperationName\": \"\",\n \"loggingConfig\": {\n \"enableOnpremGcsTransferLogs\": false,\n \"logActionStates\": [],\n \"logActions\": []\n },\n \"name\": \"\",\n \"notificationConfig\": {\n \"eventTypes\": [],\n \"payloadFormat\": \"\",\n \"pubsubTopic\": \"\"\n },\n \"projectId\": \"\",\n \"schedule\": {\n \"endTimeOfDay\": {\n \"hours\": 0,\n \"minutes\": 0,\n \"nanos\": 0,\n \"seconds\": 0\n },\n \"repeatInterval\": \"\",\n \"scheduleEndDate\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"scheduleStartDate\": {},\n \"startTimeOfDay\": {}\n },\n \"status\": \"\",\n \"transferSpec\": {\n \"awsS3CompatibleDataSource\": {\n \"bucketName\": \"\",\n \"endpoint\": \"\",\n \"path\": \"\",\n \"region\": \"\",\n \"s3Metadata\": {\n \"authMethod\": \"\",\n \"listApi\": \"\",\n \"protocol\": \"\",\n \"requestModel\": \"\"\n }\n },\n \"awsS3DataSource\": {\n \"awsAccessKey\": {\n \"accessKeyId\": \"\",\n \"secretAccessKey\": \"\"\n },\n \"bucketName\": \"\",\n \"path\": \"\",\n \"roleArn\": \"\"\n },\n \"azureBlobStorageDataSource\": {\n \"azureCredentials\": {\n \"sasToken\": \"\"\n },\n \"container\": \"\",\n \"path\": \"\",\n \"storageAccount\": \"\"\n },\n \"gcsDataSink\": {\n \"bucketName\": \"\",\n \"path\": \"\"\n },\n \"gcsDataSource\": {},\n \"gcsIntermediateDataLocation\": {},\n \"httpDataSource\": {\n \"listUrl\": \"\"\n },\n \"objectConditions\": {\n \"excludePrefixes\": [],\n \"includePrefixes\": [],\n \"lastModifiedBefore\": \"\",\n \"lastModifiedSince\": \"\",\n \"maxTimeElapsedSinceLastModification\": \"\",\n \"minTimeElapsedSinceLastModification\": \"\"\n },\n \"posixDataSink\": {\n \"rootDirectory\": \"\"\n },\n \"posixDataSource\": {},\n \"sinkAgentPoolName\": \"\",\n \"sourceAgentPoolName\": \"\",\n \"transferManifest\": {\n \"location\": \"\"\n },\n \"transferOptions\": {\n \"deleteObjectsFromSourceAfterTransfer\": false,\n \"deleteObjectsUniqueInSink\": false,\n \"metadataOptions\": {\n \"acl\": \"\",\n \"gid\": \"\",\n \"kmsKey\": \"\",\n \"mode\": \"\",\n \"storageClass\": \"\",\n \"symlink\": \"\",\n \"temporaryHold\": \"\",\n \"timeCreated\": \"\",\n \"uid\": \"\"\n },\n \"overwriteObjectsAlreadyExistingInSink\": false,\n \"overwriteWhen\": \"\"\n }\n }\n },\n \"updateTransferJobFieldMask\": \"\"\n}" in
Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/:jobName",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'projectId' => '',
'transferJob' => [
'creationTime' => '',
'deletionTime' => '',
'description' => '',
'eventStream' => [
'eventStreamExpirationTime' => '',
'eventStreamStartTime' => '',
'name' => ''
],
'lastModificationTime' => '',
'latestOperationName' => '',
'loggingConfig' => [
'enableOnpremGcsTransferLogs' => null,
'logActionStates' => [
],
'logActions' => [
]
],
'name' => '',
'notificationConfig' => [
'eventTypes' => [
],
'payloadFormat' => '',
'pubsubTopic' => ''
],
'projectId' => '',
'schedule' => [
'endTimeOfDay' => [
'hours' => 0,
'minutes' => 0,
'nanos' => 0,
'seconds' => 0
],
'repeatInterval' => '',
'scheduleEndDate' => [
'day' => 0,
'month' => 0,
'year' => 0
],
'scheduleStartDate' => [
],
'startTimeOfDay' => [
]
],
'status' => '',
'transferSpec' => [
'awsS3CompatibleDataSource' => [
'bucketName' => '',
'endpoint' => '',
'path' => '',
'region' => '',
's3Metadata' => [
'authMethod' => '',
'listApi' => '',
'protocol' => '',
'requestModel' => ''
]
],
'awsS3DataSource' => [
'awsAccessKey' => [
'accessKeyId' => '',
'secretAccessKey' => ''
],
'bucketName' => '',
'path' => '',
'roleArn' => ''
],
'azureBlobStorageDataSource' => [
'azureCredentials' => [
'sasToken' => ''
],
'container' => '',
'path' => '',
'storageAccount' => ''
],
'gcsDataSink' => [
'bucketName' => '',
'path' => ''
],
'gcsDataSource' => [
],
'gcsIntermediateDataLocation' => [
],
'httpDataSource' => [
'listUrl' => ''
],
'objectConditions' => [
'excludePrefixes' => [
],
'includePrefixes' => [
],
'lastModifiedBefore' => '',
'lastModifiedSince' => '',
'maxTimeElapsedSinceLastModification' => '',
'minTimeElapsedSinceLastModification' => ''
],
'posixDataSink' => [
'rootDirectory' => ''
],
'posixDataSource' => [
],
'sinkAgentPoolName' => '',
'sourceAgentPoolName' => '',
'transferManifest' => [
'location' => ''
],
'transferOptions' => [
'deleteObjectsFromSourceAfterTransfer' => null,
'deleteObjectsUniqueInSink' => null,
'metadataOptions' => [
'acl' => '',
'gid' => '',
'kmsKey' => '',
'mode' => '',
'storageClass' => '',
'symlink' => '',
'temporaryHold' => '',
'timeCreated' => '',
'uid' => ''
],
'overwriteObjectsAlreadyExistingInSink' => null,
'overwriteWhen' => ''
]
]
],
'updateTransferJobFieldMask' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PATCH', '{{baseUrl}}/v1/:jobName', [
'body' => '{
"projectId": "",
"transferJob": {
"creationTime": "",
"deletionTime": "",
"description": "",
"eventStream": {
"eventStreamExpirationTime": "",
"eventStreamStartTime": "",
"name": ""
},
"lastModificationTime": "",
"latestOperationName": "",
"loggingConfig": {
"enableOnpremGcsTransferLogs": false,
"logActionStates": [],
"logActions": []
},
"name": "",
"notificationConfig": {
"eventTypes": [],
"payloadFormat": "",
"pubsubTopic": ""
},
"projectId": "",
"schedule": {
"endTimeOfDay": {
"hours": 0,
"minutes": 0,
"nanos": 0,
"seconds": 0
},
"repeatInterval": "",
"scheduleEndDate": {
"day": 0,
"month": 0,
"year": 0
},
"scheduleStartDate": {},
"startTimeOfDay": {}
},
"status": "",
"transferSpec": {
"awsS3CompatibleDataSource": {
"bucketName": "",
"endpoint": "",
"path": "",
"region": "",
"s3Metadata": {
"authMethod": "",
"listApi": "",
"protocol": "",
"requestModel": ""
}
},
"awsS3DataSource": {
"awsAccessKey": {
"accessKeyId": "",
"secretAccessKey": ""
},
"bucketName": "",
"path": "",
"roleArn": ""
},
"azureBlobStorageDataSource": {
"azureCredentials": {
"sasToken": ""
},
"container": "",
"path": "",
"storageAccount": ""
},
"gcsDataSink": {
"bucketName": "",
"path": ""
},
"gcsDataSource": {},
"gcsIntermediateDataLocation": {},
"httpDataSource": {
"listUrl": ""
},
"objectConditions": {
"excludePrefixes": [],
"includePrefixes": [],
"lastModifiedBefore": "",
"lastModifiedSince": "",
"maxTimeElapsedSinceLastModification": "",
"minTimeElapsedSinceLastModification": ""
},
"posixDataSink": {
"rootDirectory": ""
},
"posixDataSource": {},
"sinkAgentPoolName": "",
"sourceAgentPoolName": "",
"transferManifest": {
"location": ""
},
"transferOptions": {
"deleteObjectsFromSourceAfterTransfer": false,
"deleteObjectsUniqueInSink": false,
"metadataOptions": {
"acl": "",
"gid": "",
"kmsKey": "",
"mode": "",
"storageClass": "",
"symlink": "",
"temporaryHold": "",
"timeCreated": "",
"uid": ""
},
"overwriteObjectsAlreadyExistingInSink": false,
"overwriteWhen": ""
}
}
},
"updateTransferJobFieldMask": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1/:jobName');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'projectId' => '',
'transferJob' => [
'creationTime' => '',
'deletionTime' => '',
'description' => '',
'eventStream' => [
'eventStreamExpirationTime' => '',
'eventStreamStartTime' => '',
'name' => ''
],
'lastModificationTime' => '',
'latestOperationName' => '',
'loggingConfig' => [
'enableOnpremGcsTransferLogs' => null,
'logActionStates' => [
],
'logActions' => [
]
],
'name' => '',
'notificationConfig' => [
'eventTypes' => [
],
'payloadFormat' => '',
'pubsubTopic' => ''
],
'projectId' => '',
'schedule' => [
'endTimeOfDay' => [
'hours' => 0,
'minutes' => 0,
'nanos' => 0,
'seconds' => 0
],
'repeatInterval' => '',
'scheduleEndDate' => [
'day' => 0,
'month' => 0,
'year' => 0
],
'scheduleStartDate' => [
],
'startTimeOfDay' => [
]
],
'status' => '',
'transferSpec' => [
'awsS3CompatibleDataSource' => [
'bucketName' => '',
'endpoint' => '',
'path' => '',
'region' => '',
's3Metadata' => [
'authMethod' => '',
'listApi' => '',
'protocol' => '',
'requestModel' => ''
]
],
'awsS3DataSource' => [
'awsAccessKey' => [
'accessKeyId' => '',
'secretAccessKey' => ''
],
'bucketName' => '',
'path' => '',
'roleArn' => ''
],
'azureBlobStorageDataSource' => [
'azureCredentials' => [
'sasToken' => ''
],
'container' => '',
'path' => '',
'storageAccount' => ''
],
'gcsDataSink' => [
'bucketName' => '',
'path' => ''
],
'gcsDataSource' => [
],
'gcsIntermediateDataLocation' => [
],
'httpDataSource' => [
'listUrl' => ''
],
'objectConditions' => [
'excludePrefixes' => [
],
'includePrefixes' => [
],
'lastModifiedBefore' => '',
'lastModifiedSince' => '',
'maxTimeElapsedSinceLastModification' => '',
'minTimeElapsedSinceLastModification' => ''
],
'posixDataSink' => [
'rootDirectory' => ''
],
'posixDataSource' => [
],
'sinkAgentPoolName' => '',
'sourceAgentPoolName' => '',
'transferManifest' => [
'location' => ''
],
'transferOptions' => [
'deleteObjectsFromSourceAfterTransfer' => null,
'deleteObjectsUniqueInSink' => null,
'metadataOptions' => [
'acl' => '',
'gid' => '',
'kmsKey' => '',
'mode' => '',
'storageClass' => '',
'symlink' => '',
'temporaryHold' => '',
'timeCreated' => '',
'uid' => ''
],
'overwriteObjectsAlreadyExistingInSink' => null,
'overwriteWhen' => ''
]
]
],
'updateTransferJobFieldMask' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'projectId' => '',
'transferJob' => [
'creationTime' => '',
'deletionTime' => '',
'description' => '',
'eventStream' => [
'eventStreamExpirationTime' => '',
'eventStreamStartTime' => '',
'name' => ''
],
'lastModificationTime' => '',
'latestOperationName' => '',
'loggingConfig' => [
'enableOnpremGcsTransferLogs' => null,
'logActionStates' => [
],
'logActions' => [
]
],
'name' => '',
'notificationConfig' => [
'eventTypes' => [
],
'payloadFormat' => '',
'pubsubTopic' => ''
],
'projectId' => '',
'schedule' => [
'endTimeOfDay' => [
'hours' => 0,
'minutes' => 0,
'nanos' => 0,
'seconds' => 0
],
'repeatInterval' => '',
'scheduleEndDate' => [
'day' => 0,
'month' => 0,
'year' => 0
],
'scheduleStartDate' => [
],
'startTimeOfDay' => [
]
],
'status' => '',
'transferSpec' => [
'awsS3CompatibleDataSource' => [
'bucketName' => '',
'endpoint' => '',
'path' => '',
'region' => '',
's3Metadata' => [
'authMethod' => '',
'listApi' => '',
'protocol' => '',
'requestModel' => ''
]
],
'awsS3DataSource' => [
'awsAccessKey' => [
'accessKeyId' => '',
'secretAccessKey' => ''
],
'bucketName' => '',
'path' => '',
'roleArn' => ''
],
'azureBlobStorageDataSource' => [
'azureCredentials' => [
'sasToken' => ''
],
'container' => '',
'path' => '',
'storageAccount' => ''
],
'gcsDataSink' => [
'bucketName' => '',
'path' => ''
],
'gcsDataSource' => [
],
'gcsIntermediateDataLocation' => [
],
'httpDataSource' => [
'listUrl' => ''
],
'objectConditions' => [
'excludePrefixes' => [
],
'includePrefixes' => [
],
'lastModifiedBefore' => '',
'lastModifiedSince' => '',
'maxTimeElapsedSinceLastModification' => '',
'minTimeElapsedSinceLastModification' => ''
],
'posixDataSink' => [
'rootDirectory' => ''
],
'posixDataSource' => [
],
'sinkAgentPoolName' => '',
'sourceAgentPoolName' => '',
'transferManifest' => [
'location' => ''
],
'transferOptions' => [
'deleteObjectsFromSourceAfterTransfer' => null,
'deleteObjectsUniqueInSink' => null,
'metadataOptions' => [
'acl' => '',
'gid' => '',
'kmsKey' => '',
'mode' => '',
'storageClass' => '',
'symlink' => '',
'temporaryHold' => '',
'timeCreated' => '',
'uid' => ''
],
'overwriteObjectsAlreadyExistingInSink' => null,
'overwriteWhen' => ''
]
]
],
'updateTransferJobFieldMask' => ''
]));
$request->setRequestUrl('{{baseUrl}}/v1/:jobName');
$request->setRequestMethod('PATCH');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:jobName' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"projectId": "",
"transferJob": {
"creationTime": "",
"deletionTime": "",
"description": "",
"eventStream": {
"eventStreamExpirationTime": "",
"eventStreamStartTime": "",
"name": ""
},
"lastModificationTime": "",
"latestOperationName": "",
"loggingConfig": {
"enableOnpremGcsTransferLogs": false,
"logActionStates": [],
"logActions": []
},
"name": "",
"notificationConfig": {
"eventTypes": [],
"payloadFormat": "",
"pubsubTopic": ""
},
"projectId": "",
"schedule": {
"endTimeOfDay": {
"hours": 0,
"minutes": 0,
"nanos": 0,
"seconds": 0
},
"repeatInterval": "",
"scheduleEndDate": {
"day": 0,
"month": 0,
"year": 0
},
"scheduleStartDate": {},
"startTimeOfDay": {}
},
"status": "",
"transferSpec": {
"awsS3CompatibleDataSource": {
"bucketName": "",
"endpoint": "",
"path": "",
"region": "",
"s3Metadata": {
"authMethod": "",
"listApi": "",
"protocol": "",
"requestModel": ""
}
},
"awsS3DataSource": {
"awsAccessKey": {
"accessKeyId": "",
"secretAccessKey": ""
},
"bucketName": "",
"path": "",
"roleArn": ""
},
"azureBlobStorageDataSource": {
"azureCredentials": {
"sasToken": ""
},
"container": "",
"path": "",
"storageAccount": ""
},
"gcsDataSink": {
"bucketName": "",
"path": ""
},
"gcsDataSource": {},
"gcsIntermediateDataLocation": {},
"httpDataSource": {
"listUrl": ""
},
"objectConditions": {
"excludePrefixes": [],
"includePrefixes": [],
"lastModifiedBefore": "",
"lastModifiedSince": "",
"maxTimeElapsedSinceLastModification": "",
"minTimeElapsedSinceLastModification": ""
},
"posixDataSink": {
"rootDirectory": ""
},
"posixDataSource": {},
"sinkAgentPoolName": "",
"sourceAgentPoolName": "",
"transferManifest": {
"location": ""
},
"transferOptions": {
"deleteObjectsFromSourceAfterTransfer": false,
"deleteObjectsUniqueInSink": false,
"metadataOptions": {
"acl": "",
"gid": "",
"kmsKey": "",
"mode": "",
"storageClass": "",
"symlink": "",
"temporaryHold": "",
"timeCreated": "",
"uid": ""
},
"overwriteObjectsAlreadyExistingInSink": false,
"overwriteWhen": ""
}
}
},
"updateTransferJobFieldMask": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:jobName' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"projectId": "",
"transferJob": {
"creationTime": "",
"deletionTime": "",
"description": "",
"eventStream": {
"eventStreamExpirationTime": "",
"eventStreamStartTime": "",
"name": ""
},
"lastModificationTime": "",
"latestOperationName": "",
"loggingConfig": {
"enableOnpremGcsTransferLogs": false,
"logActionStates": [],
"logActions": []
},
"name": "",
"notificationConfig": {
"eventTypes": [],
"payloadFormat": "",
"pubsubTopic": ""
},
"projectId": "",
"schedule": {
"endTimeOfDay": {
"hours": 0,
"minutes": 0,
"nanos": 0,
"seconds": 0
},
"repeatInterval": "",
"scheduleEndDate": {
"day": 0,
"month": 0,
"year": 0
},
"scheduleStartDate": {},
"startTimeOfDay": {}
},
"status": "",
"transferSpec": {
"awsS3CompatibleDataSource": {
"bucketName": "",
"endpoint": "",
"path": "",
"region": "",
"s3Metadata": {
"authMethod": "",
"listApi": "",
"protocol": "",
"requestModel": ""
}
},
"awsS3DataSource": {
"awsAccessKey": {
"accessKeyId": "",
"secretAccessKey": ""
},
"bucketName": "",
"path": "",
"roleArn": ""
},
"azureBlobStorageDataSource": {
"azureCredentials": {
"sasToken": ""
},
"container": "",
"path": "",
"storageAccount": ""
},
"gcsDataSink": {
"bucketName": "",
"path": ""
},
"gcsDataSource": {},
"gcsIntermediateDataLocation": {},
"httpDataSource": {
"listUrl": ""
},
"objectConditions": {
"excludePrefixes": [],
"includePrefixes": [],
"lastModifiedBefore": "",
"lastModifiedSince": "",
"maxTimeElapsedSinceLastModification": "",
"minTimeElapsedSinceLastModification": ""
},
"posixDataSink": {
"rootDirectory": ""
},
"posixDataSource": {},
"sinkAgentPoolName": "",
"sourceAgentPoolName": "",
"transferManifest": {
"location": ""
},
"transferOptions": {
"deleteObjectsFromSourceAfterTransfer": false,
"deleteObjectsUniqueInSink": false,
"metadataOptions": {
"acl": "",
"gid": "",
"kmsKey": "",
"mode": "",
"storageClass": "",
"symlink": "",
"temporaryHold": "",
"timeCreated": "",
"uid": ""
},
"overwriteObjectsAlreadyExistingInSink": false,
"overwriteWhen": ""
}
}
},
"updateTransferJobFieldMask": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"projectId\": \"\",\n \"transferJob\": {\n \"creationTime\": \"\",\n \"deletionTime\": \"\",\n \"description\": \"\",\n \"eventStream\": {\n \"eventStreamExpirationTime\": \"\",\n \"eventStreamStartTime\": \"\",\n \"name\": \"\"\n },\n \"lastModificationTime\": \"\",\n \"latestOperationName\": \"\",\n \"loggingConfig\": {\n \"enableOnpremGcsTransferLogs\": false,\n \"logActionStates\": [],\n \"logActions\": []\n },\n \"name\": \"\",\n \"notificationConfig\": {\n \"eventTypes\": [],\n \"payloadFormat\": \"\",\n \"pubsubTopic\": \"\"\n },\n \"projectId\": \"\",\n \"schedule\": {\n \"endTimeOfDay\": {\n \"hours\": 0,\n \"minutes\": 0,\n \"nanos\": 0,\n \"seconds\": 0\n },\n \"repeatInterval\": \"\",\n \"scheduleEndDate\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"scheduleStartDate\": {},\n \"startTimeOfDay\": {}\n },\n \"status\": \"\",\n \"transferSpec\": {\n \"awsS3CompatibleDataSource\": {\n \"bucketName\": \"\",\n \"endpoint\": \"\",\n \"path\": \"\",\n \"region\": \"\",\n \"s3Metadata\": {\n \"authMethod\": \"\",\n \"listApi\": \"\",\n \"protocol\": \"\",\n \"requestModel\": \"\"\n }\n },\n \"awsS3DataSource\": {\n \"awsAccessKey\": {\n \"accessKeyId\": \"\",\n \"secretAccessKey\": \"\"\n },\n \"bucketName\": \"\",\n \"path\": \"\",\n \"roleArn\": \"\"\n },\n \"azureBlobStorageDataSource\": {\n \"azureCredentials\": {\n \"sasToken\": \"\"\n },\n \"container\": \"\",\n \"path\": \"\",\n \"storageAccount\": \"\"\n },\n \"gcsDataSink\": {\n \"bucketName\": \"\",\n \"path\": \"\"\n },\n \"gcsDataSource\": {},\n \"gcsIntermediateDataLocation\": {},\n \"httpDataSource\": {\n \"listUrl\": \"\"\n },\n \"objectConditions\": {\n \"excludePrefixes\": [],\n \"includePrefixes\": [],\n \"lastModifiedBefore\": \"\",\n \"lastModifiedSince\": \"\",\n \"maxTimeElapsedSinceLastModification\": \"\",\n \"minTimeElapsedSinceLastModification\": \"\"\n },\n \"posixDataSink\": {\n \"rootDirectory\": \"\"\n },\n \"posixDataSource\": {},\n \"sinkAgentPoolName\": \"\",\n \"sourceAgentPoolName\": \"\",\n \"transferManifest\": {\n \"location\": \"\"\n },\n \"transferOptions\": {\n \"deleteObjectsFromSourceAfterTransfer\": false,\n \"deleteObjectsUniqueInSink\": false,\n \"metadataOptions\": {\n \"acl\": \"\",\n \"gid\": \"\",\n \"kmsKey\": \"\",\n \"mode\": \"\",\n \"storageClass\": \"\",\n \"symlink\": \"\",\n \"temporaryHold\": \"\",\n \"timeCreated\": \"\",\n \"uid\": \"\"\n },\n \"overwriteObjectsAlreadyExistingInSink\": false,\n \"overwriteWhen\": \"\"\n }\n }\n },\n \"updateTransferJobFieldMask\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("PATCH", "/baseUrl/v1/:jobName", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/:jobName"
payload = {
"projectId": "",
"transferJob": {
"creationTime": "",
"deletionTime": "",
"description": "",
"eventStream": {
"eventStreamExpirationTime": "",
"eventStreamStartTime": "",
"name": ""
},
"lastModificationTime": "",
"latestOperationName": "",
"loggingConfig": {
"enableOnpremGcsTransferLogs": False,
"logActionStates": [],
"logActions": []
},
"name": "",
"notificationConfig": {
"eventTypes": [],
"payloadFormat": "",
"pubsubTopic": ""
},
"projectId": "",
"schedule": {
"endTimeOfDay": {
"hours": 0,
"minutes": 0,
"nanos": 0,
"seconds": 0
},
"repeatInterval": "",
"scheduleEndDate": {
"day": 0,
"month": 0,
"year": 0
},
"scheduleStartDate": {},
"startTimeOfDay": {}
},
"status": "",
"transferSpec": {
"awsS3CompatibleDataSource": {
"bucketName": "",
"endpoint": "",
"path": "",
"region": "",
"s3Metadata": {
"authMethod": "",
"listApi": "",
"protocol": "",
"requestModel": ""
}
},
"awsS3DataSource": {
"awsAccessKey": {
"accessKeyId": "",
"secretAccessKey": ""
},
"bucketName": "",
"path": "",
"roleArn": ""
},
"azureBlobStorageDataSource": {
"azureCredentials": { "sasToken": "" },
"container": "",
"path": "",
"storageAccount": ""
},
"gcsDataSink": {
"bucketName": "",
"path": ""
},
"gcsDataSource": {},
"gcsIntermediateDataLocation": {},
"httpDataSource": { "listUrl": "" },
"objectConditions": {
"excludePrefixes": [],
"includePrefixes": [],
"lastModifiedBefore": "",
"lastModifiedSince": "",
"maxTimeElapsedSinceLastModification": "",
"minTimeElapsedSinceLastModification": ""
},
"posixDataSink": { "rootDirectory": "" },
"posixDataSource": {},
"sinkAgentPoolName": "",
"sourceAgentPoolName": "",
"transferManifest": { "location": "" },
"transferOptions": {
"deleteObjectsFromSourceAfterTransfer": False,
"deleteObjectsUniqueInSink": False,
"metadataOptions": {
"acl": "",
"gid": "",
"kmsKey": "",
"mode": "",
"storageClass": "",
"symlink": "",
"temporaryHold": "",
"timeCreated": "",
"uid": ""
},
"overwriteObjectsAlreadyExistingInSink": False,
"overwriteWhen": ""
}
}
},
"updateTransferJobFieldMask": ""
}
headers = {"content-type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/:jobName"
payload <- "{\n \"projectId\": \"\",\n \"transferJob\": {\n \"creationTime\": \"\",\n \"deletionTime\": \"\",\n \"description\": \"\",\n \"eventStream\": {\n \"eventStreamExpirationTime\": \"\",\n \"eventStreamStartTime\": \"\",\n \"name\": \"\"\n },\n \"lastModificationTime\": \"\",\n \"latestOperationName\": \"\",\n \"loggingConfig\": {\n \"enableOnpremGcsTransferLogs\": false,\n \"logActionStates\": [],\n \"logActions\": []\n },\n \"name\": \"\",\n \"notificationConfig\": {\n \"eventTypes\": [],\n \"payloadFormat\": \"\",\n \"pubsubTopic\": \"\"\n },\n \"projectId\": \"\",\n \"schedule\": {\n \"endTimeOfDay\": {\n \"hours\": 0,\n \"minutes\": 0,\n \"nanos\": 0,\n \"seconds\": 0\n },\n \"repeatInterval\": \"\",\n \"scheduleEndDate\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"scheduleStartDate\": {},\n \"startTimeOfDay\": {}\n },\n \"status\": \"\",\n \"transferSpec\": {\n \"awsS3CompatibleDataSource\": {\n \"bucketName\": \"\",\n \"endpoint\": \"\",\n \"path\": \"\",\n \"region\": \"\",\n \"s3Metadata\": {\n \"authMethod\": \"\",\n \"listApi\": \"\",\n \"protocol\": \"\",\n \"requestModel\": \"\"\n }\n },\n \"awsS3DataSource\": {\n \"awsAccessKey\": {\n \"accessKeyId\": \"\",\n \"secretAccessKey\": \"\"\n },\n \"bucketName\": \"\",\n \"path\": \"\",\n \"roleArn\": \"\"\n },\n \"azureBlobStorageDataSource\": {\n \"azureCredentials\": {\n \"sasToken\": \"\"\n },\n \"container\": \"\",\n \"path\": \"\",\n \"storageAccount\": \"\"\n },\n \"gcsDataSink\": {\n \"bucketName\": \"\",\n \"path\": \"\"\n },\n \"gcsDataSource\": {},\n \"gcsIntermediateDataLocation\": {},\n \"httpDataSource\": {\n \"listUrl\": \"\"\n },\n \"objectConditions\": {\n \"excludePrefixes\": [],\n \"includePrefixes\": [],\n \"lastModifiedBefore\": \"\",\n \"lastModifiedSince\": \"\",\n \"maxTimeElapsedSinceLastModification\": \"\",\n \"minTimeElapsedSinceLastModification\": \"\"\n },\n \"posixDataSink\": {\n \"rootDirectory\": \"\"\n },\n \"posixDataSource\": {},\n \"sinkAgentPoolName\": \"\",\n \"sourceAgentPoolName\": \"\",\n \"transferManifest\": {\n \"location\": \"\"\n },\n \"transferOptions\": {\n \"deleteObjectsFromSourceAfterTransfer\": false,\n \"deleteObjectsUniqueInSink\": false,\n \"metadataOptions\": {\n \"acl\": \"\",\n \"gid\": \"\",\n \"kmsKey\": \"\",\n \"mode\": \"\",\n \"storageClass\": \"\",\n \"symlink\": \"\",\n \"temporaryHold\": \"\",\n \"timeCreated\": \"\",\n \"uid\": \"\"\n },\n \"overwriteObjectsAlreadyExistingInSink\": false,\n \"overwriteWhen\": \"\"\n }\n }\n },\n \"updateTransferJobFieldMask\": \"\"\n}"
encode <- "json"
response <- VERB("PATCH", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/:jobName")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"projectId\": \"\",\n \"transferJob\": {\n \"creationTime\": \"\",\n \"deletionTime\": \"\",\n \"description\": \"\",\n \"eventStream\": {\n \"eventStreamExpirationTime\": \"\",\n \"eventStreamStartTime\": \"\",\n \"name\": \"\"\n },\n \"lastModificationTime\": \"\",\n \"latestOperationName\": \"\",\n \"loggingConfig\": {\n \"enableOnpremGcsTransferLogs\": false,\n \"logActionStates\": [],\n \"logActions\": []\n },\n \"name\": \"\",\n \"notificationConfig\": {\n \"eventTypes\": [],\n \"payloadFormat\": \"\",\n \"pubsubTopic\": \"\"\n },\n \"projectId\": \"\",\n \"schedule\": {\n \"endTimeOfDay\": {\n \"hours\": 0,\n \"minutes\": 0,\n \"nanos\": 0,\n \"seconds\": 0\n },\n \"repeatInterval\": \"\",\n \"scheduleEndDate\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"scheduleStartDate\": {},\n \"startTimeOfDay\": {}\n },\n \"status\": \"\",\n \"transferSpec\": {\n \"awsS3CompatibleDataSource\": {\n \"bucketName\": \"\",\n \"endpoint\": \"\",\n \"path\": \"\",\n \"region\": \"\",\n \"s3Metadata\": {\n \"authMethod\": \"\",\n \"listApi\": \"\",\n \"protocol\": \"\",\n \"requestModel\": \"\"\n }\n },\n \"awsS3DataSource\": {\n \"awsAccessKey\": {\n \"accessKeyId\": \"\",\n \"secretAccessKey\": \"\"\n },\n \"bucketName\": \"\",\n \"path\": \"\",\n \"roleArn\": \"\"\n },\n \"azureBlobStorageDataSource\": {\n \"azureCredentials\": {\n \"sasToken\": \"\"\n },\n \"container\": \"\",\n \"path\": \"\",\n \"storageAccount\": \"\"\n },\n \"gcsDataSink\": {\n \"bucketName\": \"\",\n \"path\": \"\"\n },\n \"gcsDataSource\": {},\n \"gcsIntermediateDataLocation\": {},\n \"httpDataSource\": {\n \"listUrl\": \"\"\n },\n \"objectConditions\": {\n \"excludePrefixes\": [],\n \"includePrefixes\": [],\n \"lastModifiedBefore\": \"\",\n \"lastModifiedSince\": \"\",\n \"maxTimeElapsedSinceLastModification\": \"\",\n \"minTimeElapsedSinceLastModification\": \"\"\n },\n \"posixDataSink\": {\n \"rootDirectory\": \"\"\n },\n \"posixDataSource\": {},\n \"sinkAgentPoolName\": \"\",\n \"sourceAgentPoolName\": \"\",\n \"transferManifest\": {\n \"location\": \"\"\n },\n \"transferOptions\": {\n \"deleteObjectsFromSourceAfterTransfer\": false,\n \"deleteObjectsUniqueInSink\": false,\n \"metadataOptions\": {\n \"acl\": \"\",\n \"gid\": \"\",\n \"kmsKey\": \"\",\n \"mode\": \"\",\n \"storageClass\": \"\",\n \"symlink\": \"\",\n \"temporaryHold\": \"\",\n \"timeCreated\": \"\",\n \"uid\": \"\"\n },\n \"overwriteObjectsAlreadyExistingInSink\": false,\n \"overwriteWhen\": \"\"\n }\n }\n },\n \"updateTransferJobFieldMask\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.patch('/baseUrl/v1/:jobName') do |req|
req.body = "{\n \"projectId\": \"\",\n \"transferJob\": {\n \"creationTime\": \"\",\n \"deletionTime\": \"\",\n \"description\": \"\",\n \"eventStream\": {\n \"eventStreamExpirationTime\": \"\",\n \"eventStreamStartTime\": \"\",\n \"name\": \"\"\n },\n \"lastModificationTime\": \"\",\n \"latestOperationName\": \"\",\n \"loggingConfig\": {\n \"enableOnpremGcsTransferLogs\": false,\n \"logActionStates\": [],\n \"logActions\": []\n },\n \"name\": \"\",\n \"notificationConfig\": {\n \"eventTypes\": [],\n \"payloadFormat\": \"\",\n \"pubsubTopic\": \"\"\n },\n \"projectId\": \"\",\n \"schedule\": {\n \"endTimeOfDay\": {\n \"hours\": 0,\n \"minutes\": 0,\n \"nanos\": 0,\n \"seconds\": 0\n },\n \"repeatInterval\": \"\",\n \"scheduleEndDate\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"scheduleStartDate\": {},\n \"startTimeOfDay\": {}\n },\n \"status\": \"\",\n \"transferSpec\": {\n \"awsS3CompatibleDataSource\": {\n \"bucketName\": \"\",\n \"endpoint\": \"\",\n \"path\": \"\",\n \"region\": \"\",\n \"s3Metadata\": {\n \"authMethod\": \"\",\n \"listApi\": \"\",\n \"protocol\": \"\",\n \"requestModel\": \"\"\n }\n },\n \"awsS3DataSource\": {\n \"awsAccessKey\": {\n \"accessKeyId\": \"\",\n \"secretAccessKey\": \"\"\n },\n \"bucketName\": \"\",\n \"path\": \"\",\n \"roleArn\": \"\"\n },\n \"azureBlobStorageDataSource\": {\n \"azureCredentials\": {\n \"sasToken\": \"\"\n },\n \"container\": \"\",\n \"path\": \"\",\n \"storageAccount\": \"\"\n },\n \"gcsDataSink\": {\n \"bucketName\": \"\",\n \"path\": \"\"\n },\n \"gcsDataSource\": {},\n \"gcsIntermediateDataLocation\": {},\n \"httpDataSource\": {\n \"listUrl\": \"\"\n },\n \"objectConditions\": {\n \"excludePrefixes\": [],\n \"includePrefixes\": [],\n \"lastModifiedBefore\": \"\",\n \"lastModifiedSince\": \"\",\n \"maxTimeElapsedSinceLastModification\": \"\",\n \"minTimeElapsedSinceLastModification\": \"\"\n },\n \"posixDataSink\": {\n \"rootDirectory\": \"\"\n },\n \"posixDataSource\": {},\n \"sinkAgentPoolName\": \"\",\n \"sourceAgentPoolName\": \"\",\n \"transferManifest\": {\n \"location\": \"\"\n },\n \"transferOptions\": {\n \"deleteObjectsFromSourceAfterTransfer\": false,\n \"deleteObjectsUniqueInSink\": false,\n \"metadataOptions\": {\n \"acl\": \"\",\n \"gid\": \"\",\n \"kmsKey\": \"\",\n \"mode\": \"\",\n \"storageClass\": \"\",\n \"symlink\": \"\",\n \"temporaryHold\": \"\",\n \"timeCreated\": \"\",\n \"uid\": \"\"\n },\n \"overwriteObjectsAlreadyExistingInSink\": false,\n \"overwriteWhen\": \"\"\n }\n }\n },\n \"updateTransferJobFieldMask\": \"\"\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}}/v1/:jobName";
let payload = json!({
"projectId": "",
"transferJob": json!({
"creationTime": "",
"deletionTime": "",
"description": "",
"eventStream": json!({
"eventStreamExpirationTime": "",
"eventStreamStartTime": "",
"name": ""
}),
"lastModificationTime": "",
"latestOperationName": "",
"loggingConfig": json!({
"enableOnpremGcsTransferLogs": false,
"logActionStates": (),
"logActions": ()
}),
"name": "",
"notificationConfig": json!({
"eventTypes": (),
"payloadFormat": "",
"pubsubTopic": ""
}),
"projectId": "",
"schedule": json!({
"endTimeOfDay": json!({
"hours": 0,
"minutes": 0,
"nanos": 0,
"seconds": 0
}),
"repeatInterval": "",
"scheduleEndDate": json!({
"day": 0,
"month": 0,
"year": 0
}),
"scheduleStartDate": json!({}),
"startTimeOfDay": json!({})
}),
"status": "",
"transferSpec": json!({
"awsS3CompatibleDataSource": json!({
"bucketName": "",
"endpoint": "",
"path": "",
"region": "",
"s3Metadata": json!({
"authMethod": "",
"listApi": "",
"protocol": "",
"requestModel": ""
})
}),
"awsS3DataSource": json!({
"awsAccessKey": json!({
"accessKeyId": "",
"secretAccessKey": ""
}),
"bucketName": "",
"path": "",
"roleArn": ""
}),
"azureBlobStorageDataSource": json!({
"azureCredentials": json!({"sasToken": ""}),
"container": "",
"path": "",
"storageAccount": ""
}),
"gcsDataSink": json!({
"bucketName": "",
"path": ""
}),
"gcsDataSource": json!({}),
"gcsIntermediateDataLocation": json!({}),
"httpDataSource": json!({"listUrl": ""}),
"objectConditions": json!({
"excludePrefixes": (),
"includePrefixes": (),
"lastModifiedBefore": "",
"lastModifiedSince": "",
"maxTimeElapsedSinceLastModification": "",
"minTimeElapsedSinceLastModification": ""
}),
"posixDataSink": json!({"rootDirectory": ""}),
"posixDataSource": json!({}),
"sinkAgentPoolName": "",
"sourceAgentPoolName": "",
"transferManifest": json!({"location": ""}),
"transferOptions": json!({
"deleteObjectsFromSourceAfterTransfer": false,
"deleteObjectsUniqueInSink": false,
"metadataOptions": json!({
"acl": "",
"gid": "",
"kmsKey": "",
"mode": "",
"storageClass": "",
"symlink": "",
"temporaryHold": "",
"timeCreated": "",
"uid": ""
}),
"overwriteObjectsAlreadyExistingInSink": false,
"overwriteWhen": ""
})
})
}),
"updateTransferJobFieldMask": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PATCH").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PATCH \
--url {{baseUrl}}/v1/:jobName \
--header 'content-type: application/json' \
--data '{
"projectId": "",
"transferJob": {
"creationTime": "",
"deletionTime": "",
"description": "",
"eventStream": {
"eventStreamExpirationTime": "",
"eventStreamStartTime": "",
"name": ""
},
"lastModificationTime": "",
"latestOperationName": "",
"loggingConfig": {
"enableOnpremGcsTransferLogs": false,
"logActionStates": [],
"logActions": []
},
"name": "",
"notificationConfig": {
"eventTypes": [],
"payloadFormat": "",
"pubsubTopic": ""
},
"projectId": "",
"schedule": {
"endTimeOfDay": {
"hours": 0,
"minutes": 0,
"nanos": 0,
"seconds": 0
},
"repeatInterval": "",
"scheduleEndDate": {
"day": 0,
"month": 0,
"year": 0
},
"scheduleStartDate": {},
"startTimeOfDay": {}
},
"status": "",
"transferSpec": {
"awsS3CompatibleDataSource": {
"bucketName": "",
"endpoint": "",
"path": "",
"region": "",
"s3Metadata": {
"authMethod": "",
"listApi": "",
"protocol": "",
"requestModel": ""
}
},
"awsS3DataSource": {
"awsAccessKey": {
"accessKeyId": "",
"secretAccessKey": ""
},
"bucketName": "",
"path": "",
"roleArn": ""
},
"azureBlobStorageDataSource": {
"azureCredentials": {
"sasToken": ""
},
"container": "",
"path": "",
"storageAccount": ""
},
"gcsDataSink": {
"bucketName": "",
"path": ""
},
"gcsDataSource": {},
"gcsIntermediateDataLocation": {},
"httpDataSource": {
"listUrl": ""
},
"objectConditions": {
"excludePrefixes": [],
"includePrefixes": [],
"lastModifiedBefore": "",
"lastModifiedSince": "",
"maxTimeElapsedSinceLastModification": "",
"minTimeElapsedSinceLastModification": ""
},
"posixDataSink": {
"rootDirectory": ""
},
"posixDataSource": {},
"sinkAgentPoolName": "",
"sourceAgentPoolName": "",
"transferManifest": {
"location": ""
},
"transferOptions": {
"deleteObjectsFromSourceAfterTransfer": false,
"deleteObjectsUniqueInSink": false,
"metadataOptions": {
"acl": "",
"gid": "",
"kmsKey": "",
"mode": "",
"storageClass": "",
"symlink": "",
"temporaryHold": "",
"timeCreated": "",
"uid": ""
},
"overwriteObjectsAlreadyExistingInSink": false,
"overwriteWhen": ""
}
}
},
"updateTransferJobFieldMask": ""
}'
echo '{
"projectId": "",
"transferJob": {
"creationTime": "",
"deletionTime": "",
"description": "",
"eventStream": {
"eventStreamExpirationTime": "",
"eventStreamStartTime": "",
"name": ""
},
"lastModificationTime": "",
"latestOperationName": "",
"loggingConfig": {
"enableOnpremGcsTransferLogs": false,
"logActionStates": [],
"logActions": []
},
"name": "",
"notificationConfig": {
"eventTypes": [],
"payloadFormat": "",
"pubsubTopic": ""
},
"projectId": "",
"schedule": {
"endTimeOfDay": {
"hours": 0,
"minutes": 0,
"nanos": 0,
"seconds": 0
},
"repeatInterval": "",
"scheduleEndDate": {
"day": 0,
"month": 0,
"year": 0
},
"scheduleStartDate": {},
"startTimeOfDay": {}
},
"status": "",
"transferSpec": {
"awsS3CompatibleDataSource": {
"bucketName": "",
"endpoint": "",
"path": "",
"region": "",
"s3Metadata": {
"authMethod": "",
"listApi": "",
"protocol": "",
"requestModel": ""
}
},
"awsS3DataSource": {
"awsAccessKey": {
"accessKeyId": "",
"secretAccessKey": ""
},
"bucketName": "",
"path": "",
"roleArn": ""
},
"azureBlobStorageDataSource": {
"azureCredentials": {
"sasToken": ""
},
"container": "",
"path": "",
"storageAccount": ""
},
"gcsDataSink": {
"bucketName": "",
"path": ""
},
"gcsDataSource": {},
"gcsIntermediateDataLocation": {},
"httpDataSource": {
"listUrl": ""
},
"objectConditions": {
"excludePrefixes": [],
"includePrefixes": [],
"lastModifiedBefore": "",
"lastModifiedSince": "",
"maxTimeElapsedSinceLastModification": "",
"minTimeElapsedSinceLastModification": ""
},
"posixDataSink": {
"rootDirectory": ""
},
"posixDataSource": {},
"sinkAgentPoolName": "",
"sourceAgentPoolName": "",
"transferManifest": {
"location": ""
},
"transferOptions": {
"deleteObjectsFromSourceAfterTransfer": false,
"deleteObjectsUniqueInSink": false,
"metadataOptions": {
"acl": "",
"gid": "",
"kmsKey": "",
"mode": "",
"storageClass": "",
"symlink": "",
"temporaryHold": "",
"timeCreated": "",
"uid": ""
},
"overwriteObjectsAlreadyExistingInSink": false,
"overwriteWhen": ""
}
}
},
"updateTransferJobFieldMask": ""
}' | \
http PATCH {{baseUrl}}/v1/:jobName \
content-type:application/json
wget --quiet \
--method PATCH \
--header 'content-type: application/json' \
--body-data '{\n "projectId": "",\n "transferJob": {\n "creationTime": "",\n "deletionTime": "",\n "description": "",\n "eventStream": {\n "eventStreamExpirationTime": "",\n "eventStreamStartTime": "",\n "name": ""\n },\n "lastModificationTime": "",\n "latestOperationName": "",\n "loggingConfig": {\n "enableOnpremGcsTransferLogs": false,\n "logActionStates": [],\n "logActions": []\n },\n "name": "",\n "notificationConfig": {\n "eventTypes": [],\n "payloadFormat": "",\n "pubsubTopic": ""\n },\n "projectId": "",\n "schedule": {\n "endTimeOfDay": {\n "hours": 0,\n "minutes": 0,\n "nanos": 0,\n "seconds": 0\n },\n "repeatInterval": "",\n "scheduleEndDate": {\n "day": 0,\n "month": 0,\n "year": 0\n },\n "scheduleStartDate": {},\n "startTimeOfDay": {}\n },\n "status": "",\n "transferSpec": {\n "awsS3CompatibleDataSource": {\n "bucketName": "",\n "endpoint": "",\n "path": "",\n "region": "",\n "s3Metadata": {\n "authMethod": "",\n "listApi": "",\n "protocol": "",\n "requestModel": ""\n }\n },\n "awsS3DataSource": {\n "awsAccessKey": {\n "accessKeyId": "",\n "secretAccessKey": ""\n },\n "bucketName": "",\n "path": "",\n "roleArn": ""\n },\n "azureBlobStorageDataSource": {\n "azureCredentials": {\n "sasToken": ""\n },\n "container": "",\n "path": "",\n "storageAccount": ""\n },\n "gcsDataSink": {\n "bucketName": "",\n "path": ""\n },\n "gcsDataSource": {},\n "gcsIntermediateDataLocation": {},\n "httpDataSource": {\n "listUrl": ""\n },\n "objectConditions": {\n "excludePrefixes": [],\n "includePrefixes": [],\n "lastModifiedBefore": "",\n "lastModifiedSince": "",\n "maxTimeElapsedSinceLastModification": "",\n "minTimeElapsedSinceLastModification": ""\n },\n "posixDataSink": {\n "rootDirectory": ""\n },\n "posixDataSource": {},\n "sinkAgentPoolName": "",\n "sourceAgentPoolName": "",\n "transferManifest": {\n "location": ""\n },\n "transferOptions": {\n "deleteObjectsFromSourceAfterTransfer": false,\n "deleteObjectsUniqueInSink": false,\n "metadataOptions": {\n "acl": "",\n "gid": "",\n "kmsKey": "",\n "mode": "",\n "storageClass": "",\n "symlink": "",\n "temporaryHold": "",\n "timeCreated": "",\n "uid": ""\n },\n "overwriteObjectsAlreadyExistingInSink": false,\n "overwriteWhen": ""\n }\n }\n },\n "updateTransferJobFieldMask": ""\n}' \
--output-document \
- {{baseUrl}}/v1/:jobName
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"projectId": "",
"transferJob": [
"creationTime": "",
"deletionTime": "",
"description": "",
"eventStream": [
"eventStreamExpirationTime": "",
"eventStreamStartTime": "",
"name": ""
],
"lastModificationTime": "",
"latestOperationName": "",
"loggingConfig": [
"enableOnpremGcsTransferLogs": false,
"logActionStates": [],
"logActions": []
],
"name": "",
"notificationConfig": [
"eventTypes": [],
"payloadFormat": "",
"pubsubTopic": ""
],
"projectId": "",
"schedule": [
"endTimeOfDay": [
"hours": 0,
"minutes": 0,
"nanos": 0,
"seconds": 0
],
"repeatInterval": "",
"scheduleEndDate": [
"day": 0,
"month": 0,
"year": 0
],
"scheduleStartDate": [],
"startTimeOfDay": []
],
"status": "",
"transferSpec": [
"awsS3CompatibleDataSource": [
"bucketName": "",
"endpoint": "",
"path": "",
"region": "",
"s3Metadata": [
"authMethod": "",
"listApi": "",
"protocol": "",
"requestModel": ""
]
],
"awsS3DataSource": [
"awsAccessKey": [
"accessKeyId": "",
"secretAccessKey": ""
],
"bucketName": "",
"path": "",
"roleArn": ""
],
"azureBlobStorageDataSource": [
"azureCredentials": ["sasToken": ""],
"container": "",
"path": "",
"storageAccount": ""
],
"gcsDataSink": [
"bucketName": "",
"path": ""
],
"gcsDataSource": [],
"gcsIntermediateDataLocation": [],
"httpDataSource": ["listUrl": ""],
"objectConditions": [
"excludePrefixes": [],
"includePrefixes": [],
"lastModifiedBefore": "",
"lastModifiedSince": "",
"maxTimeElapsedSinceLastModification": "",
"minTimeElapsedSinceLastModification": ""
],
"posixDataSink": ["rootDirectory": ""],
"posixDataSource": [],
"sinkAgentPoolName": "",
"sourceAgentPoolName": "",
"transferManifest": ["location": ""],
"transferOptions": [
"deleteObjectsFromSourceAfterTransfer": false,
"deleteObjectsUniqueInSink": false,
"metadataOptions": [
"acl": "",
"gid": "",
"kmsKey": "",
"mode": "",
"storageClass": "",
"symlink": "",
"temporaryHold": "",
"timeCreated": "",
"uid": ""
],
"overwriteObjectsAlreadyExistingInSink": false,
"overwriteWhen": ""
]
]
],
"updateTransferJobFieldMask": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:jobName")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
storagetransfer.transferJobs.run
{{baseUrl}}/v1/:jobName:run
QUERY PARAMS
jobName
BODY json
{
"projectId": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:jobName:run");
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 \"projectId\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1/:jobName:run" {:content-type :json
:form-params {:projectId ""}})
require "http/client"
url = "{{baseUrl}}/v1/:jobName:run"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"projectId\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/v1/:jobName:run"),
Content = new StringContent("{\n \"projectId\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/:jobName:run");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"projectId\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/:jobName:run"
payload := strings.NewReader("{\n \"projectId\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/v1/:jobName:run HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 21
{
"projectId": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1/:jobName:run")
.setHeader("content-type", "application/json")
.setBody("{\n \"projectId\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/:jobName:run"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"projectId\": \"\"\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 \"projectId\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/:jobName:run")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1/:jobName:run")
.header("content-type", "application/json")
.body("{\n \"projectId\": \"\"\n}")
.asString();
const data = JSON.stringify({
projectId: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v1/:jobName:run');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:jobName:run',
headers: {'content-type': 'application/json'},
data: {projectId: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/:jobName:run';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"projectId":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/:jobName:run',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "projectId": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"projectId\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1/:jobName:run")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/:jobName:run',
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({projectId: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:jobName:run',
headers: {'content-type': 'application/json'},
body: {projectId: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/v1/:jobName:run');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
projectId: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:jobName:run',
headers: {'content-type': 'application/json'},
data: {projectId: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/:jobName:run';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"projectId":""}'
};
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 = @{ @"projectId": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:jobName:run"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/:jobName:run" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"projectId\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/:jobName:run",
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([
'projectId' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/v1/:jobName:run', [
'body' => '{
"projectId": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1/:jobName:run');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'projectId' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'projectId' => ''
]));
$request->setRequestUrl('{{baseUrl}}/v1/:jobName:run');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:jobName:run' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"projectId": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:jobName:run' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"projectId": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"projectId\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1/:jobName:run", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/:jobName:run"
payload = { "projectId": "" }
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/:jobName:run"
payload <- "{\n \"projectId\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/:jobName:run")
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 \"projectId\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/v1/:jobName:run') do |req|
req.body = "{\n \"projectId\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/:jobName:run";
let payload = json!({"projectId": ""});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/v1/:jobName:run \
--header 'content-type: application/json' \
--data '{
"projectId": ""
}'
echo '{
"projectId": ""
}' | \
http POST {{baseUrl}}/v1/:jobName:run \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "projectId": ""\n}' \
--output-document \
- {{baseUrl}}/v1/:jobName:run
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["projectId": ""] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:jobName:run")! 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
storagetransfer.transferOperations.cancel
{{baseUrl}}/v1/:name:cancel
QUERY PARAMS
name
BODY json
{}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:name:cancel");
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, "{}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1/:name:cancel" {:content-type :json})
require "http/client"
url = "{{baseUrl}}/v1/:name:cancel"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/v1/:name:cancel"),
Content = new StringContent("{}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/:name:cancel");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/:name:cancel"
payload := strings.NewReader("{}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/v1/:name:cancel HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 2
{}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1/:name:cancel")
.setHeader("content-type", "application/json")
.setBody("{}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/:name:cancel"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{}"))
.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, "{}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/:name:cancel")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1/:name:cancel")
.header("content-type", "application/json")
.body("{}")
.asString();
const data = JSON.stringify({});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v1/:name:cancel');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:name:cancel',
headers: {'content-type': 'application/json'},
data: {}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/:name:cancel';
const options = {method: 'POST', headers: {'content-type': 'application/json'}, body: '{}'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/:name:cancel',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{}")
val request = Request.Builder()
.url("{{baseUrl}}/v1/:name:cancel")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/:name:cancel',
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({}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:name:cancel',
headers: {'content-type': 'application/json'},
body: {},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/v1/:name:cancel');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:name:cancel',
headers: {'content-type': 'application/json'},
data: {}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/:name:cancel';
const options = {method: 'POST', headers: {'content-type': 'application/json'}, body: '{}'};
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 = @{ };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:name:cancel"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/:name:cancel" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/:name:cancel",
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([
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/v1/:name:cancel', [
'body' => '{}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1/:name:cancel');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
]));
$request->setRequestUrl('{{baseUrl}}/v1/:name:cancel');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:name:cancel' -Method POST -Headers $headers -ContentType 'application/json' -Body '{}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:name:cancel' -Method POST -Headers $headers -ContentType 'application/json' -Body '{}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1/:name:cancel", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/:name:cancel"
payload = {}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/:name:cancel"
payload <- "{}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/:name:cancel")
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 = "{}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/v1/:name:cancel') do |req|
req.body = "{}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/:name:cancel";
let payload = json!({});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/v1/:name:cancel \
--header 'content-type: application/json' \
--data '{}'
echo '{}' | \
http POST {{baseUrl}}/v1/:name:cancel \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{}' \
--output-document \
- {{baseUrl}}/v1/:name:cancel
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:name:cancel")! 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
storagetransfer.transferOperations.list
{{baseUrl}}/v1/:name
QUERY PARAMS
filter
name
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:name?filter=");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v1/:name" {:query-params {:filter ""}})
require "http/client"
url = "{{baseUrl}}/v1/:name?filter="
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/v1/:name?filter="),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/:name?filter=");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/:name?filter="
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/v1/:name?filter= HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1/:name?filter=")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/:name?filter="))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/:name?filter=")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1/:name?filter=")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/v1/:name?filter=');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/v1/:name',
params: {filter: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/:name?filter=';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/:name?filter=',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1/:name?filter=")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/:name?filter=',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'GET', url: '{{baseUrl}}/v1/:name', qs: {filter: ''}};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v1/:name');
req.query({
filter: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/v1/:name',
params: {filter: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/:name?filter=';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:name?filter="]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/:name?filter=" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/:name?filter=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/v1/:name?filter=');
echo $response->getBody();
setUrl('{{baseUrl}}/v1/:name');
$request->setMethod(HTTP_METH_GET);
$request->setQueryData([
'filter' => ''
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/:name');
$request->setRequestMethod('GET');
$request->setQuery(new http\QueryString([
'filter' => ''
]));
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:name?filter=' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:name?filter=' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v1/:name?filter=")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/:name"
querystring = {"filter":""}
response = requests.get(url, params=querystring)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/:name"
queryString <- list(filter = "")
response <- VERB("GET", url, query = queryString, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/:name?filter=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/v1/:name') do |req|
req.params['filter'] = ''
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/:name";
let querystring = [
("filter", ""),
];
let client = reqwest::Client::new();
let response = client.get(url)
.query(&querystring)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url '{{baseUrl}}/v1/:name?filter='
http GET '{{baseUrl}}/v1/:name?filter='
wget --quiet \
--method GET \
--output-document \
- '{{baseUrl}}/v1/:name?filter='
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:name?filter=")! 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
storagetransfer.transferOperations.pause
{{baseUrl}}/v1/:name:pause
QUERY PARAMS
name
BODY json
{}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:name:pause");
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, "{}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1/:name:pause" {:content-type :json})
require "http/client"
url = "{{baseUrl}}/v1/:name:pause"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/v1/:name:pause"),
Content = new StringContent("{}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/:name:pause");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/:name:pause"
payload := strings.NewReader("{}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/v1/:name:pause HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 2
{}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1/:name:pause")
.setHeader("content-type", "application/json")
.setBody("{}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/:name:pause"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{}"))
.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, "{}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/:name:pause")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1/:name:pause")
.header("content-type", "application/json")
.body("{}")
.asString();
const data = JSON.stringify({});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v1/:name:pause');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:name:pause',
headers: {'content-type': 'application/json'},
data: {}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/:name:pause';
const options = {method: 'POST', headers: {'content-type': 'application/json'}, body: '{}'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/:name:pause',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{}")
val request = Request.Builder()
.url("{{baseUrl}}/v1/:name:pause")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/:name:pause',
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({}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:name:pause',
headers: {'content-type': 'application/json'},
body: {},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/v1/:name:pause');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:name:pause',
headers: {'content-type': 'application/json'},
data: {}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/:name:pause';
const options = {method: 'POST', headers: {'content-type': 'application/json'}, body: '{}'};
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 = @{ };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:name:pause"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/:name:pause" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/:name:pause",
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([
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/v1/:name:pause', [
'body' => '{}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1/:name:pause');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
]));
$request->setRequestUrl('{{baseUrl}}/v1/:name:pause');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:name:pause' -Method POST -Headers $headers -ContentType 'application/json' -Body '{}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:name:pause' -Method POST -Headers $headers -ContentType 'application/json' -Body '{}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1/:name:pause", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/:name:pause"
payload = {}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/:name:pause"
payload <- "{}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/:name:pause")
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 = "{}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/v1/:name:pause') do |req|
req.body = "{}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/:name:pause";
let payload = json!({});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/v1/:name:pause \
--header 'content-type: application/json' \
--data '{}'
echo '{}' | \
http POST {{baseUrl}}/v1/:name:pause \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{}' \
--output-document \
- {{baseUrl}}/v1/:name:pause
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:name:pause")! 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
storagetransfer.transferOperations.resume
{{baseUrl}}/v1/:name:resume
QUERY PARAMS
name
BODY json
{}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:name:resume");
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, "{}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1/:name:resume" {:content-type :json})
require "http/client"
url = "{{baseUrl}}/v1/:name:resume"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/v1/:name:resume"),
Content = new StringContent("{}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/:name:resume");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/:name:resume"
payload := strings.NewReader("{}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/v1/:name:resume HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 2
{}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1/:name:resume")
.setHeader("content-type", "application/json")
.setBody("{}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/:name:resume"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{}"))
.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, "{}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/:name:resume")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1/:name:resume")
.header("content-type", "application/json")
.body("{}")
.asString();
const data = JSON.stringify({});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v1/:name:resume');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:name:resume',
headers: {'content-type': 'application/json'},
data: {}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/:name:resume';
const options = {method: 'POST', headers: {'content-type': 'application/json'}, body: '{}'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/:name:resume',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{}")
val request = Request.Builder()
.url("{{baseUrl}}/v1/:name:resume")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/:name:resume',
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({}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:name:resume',
headers: {'content-type': 'application/json'},
body: {},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/v1/:name:resume');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:name:resume',
headers: {'content-type': 'application/json'},
data: {}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/:name:resume';
const options = {method: 'POST', headers: {'content-type': 'application/json'}, body: '{}'};
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 = @{ };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:name:resume"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/:name:resume" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/:name:resume",
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([
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/v1/:name:resume', [
'body' => '{}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1/:name:resume');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
]));
$request->setRequestUrl('{{baseUrl}}/v1/:name:resume');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:name:resume' -Method POST -Headers $headers -ContentType 'application/json' -Body '{}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:name:resume' -Method POST -Headers $headers -ContentType 'application/json' -Body '{}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1/:name:resume", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/:name:resume"
payload = {}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/:name:resume"
payload <- "{}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/:name:resume")
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 = "{}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/v1/:name:resume') do |req|
req.body = "{}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/:name:resume";
let payload = json!({});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/v1/:name:resume \
--header 'content-type: application/json' \
--data '{}'
echo '{}' | \
http POST {{baseUrl}}/v1/:name:resume \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{}' \
--output-document \
- {{baseUrl}}/v1/:name:resume
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:name:resume")! 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()