Cloud AutoML API
POST
automl.projects.locations.datasets.create
{{baseUrl}}/v1beta1/:parent/datasets
QUERY PARAMS
parent
BODY json
{
"createTime": "",
"description": "",
"displayName": "",
"etag": "",
"exampleCount": 0,
"imageClassificationDatasetMetadata": {
"classificationType": ""
},
"imageObjectDetectionDatasetMetadata": {},
"name": "",
"tablesDatasetMetadata": {
"mlUseColumnSpecId": "",
"primaryTableSpecId": "",
"statsUpdateTime": "",
"targetColumnCorrelations": {},
"targetColumnSpecId": "",
"weightColumnSpecId": ""
},
"textClassificationDatasetMetadata": {
"classificationType": ""
},
"textExtractionDatasetMetadata": {},
"textSentimentDatasetMetadata": {
"sentimentMax": 0
},
"translationDatasetMetadata": {
"sourceLanguageCode": "",
"targetLanguageCode": ""
},
"videoClassificationDatasetMetadata": {},
"videoObjectTrackingDatasetMetadata": {}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1beta1/:parent/datasets");
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 \"createTime\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"etag\": \"\",\n \"exampleCount\": 0,\n \"imageClassificationDatasetMetadata\": {\n \"classificationType\": \"\"\n },\n \"imageObjectDetectionDatasetMetadata\": {},\n \"name\": \"\",\n \"tablesDatasetMetadata\": {\n \"mlUseColumnSpecId\": \"\",\n \"primaryTableSpecId\": \"\",\n \"statsUpdateTime\": \"\",\n \"targetColumnCorrelations\": {},\n \"targetColumnSpecId\": \"\",\n \"weightColumnSpecId\": \"\"\n },\n \"textClassificationDatasetMetadata\": {\n \"classificationType\": \"\"\n },\n \"textExtractionDatasetMetadata\": {},\n \"textSentimentDatasetMetadata\": {\n \"sentimentMax\": 0\n },\n \"translationDatasetMetadata\": {\n \"sourceLanguageCode\": \"\",\n \"targetLanguageCode\": \"\"\n },\n \"videoClassificationDatasetMetadata\": {},\n \"videoObjectTrackingDatasetMetadata\": {}\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1beta1/:parent/datasets" {:content-type :json
:form-params {:createTime ""
:description ""
:displayName ""
:etag ""
:exampleCount 0
:imageClassificationDatasetMetadata {:classificationType ""}
:imageObjectDetectionDatasetMetadata {}
:name ""
:tablesDatasetMetadata {:mlUseColumnSpecId ""
:primaryTableSpecId ""
:statsUpdateTime ""
:targetColumnCorrelations {}
:targetColumnSpecId ""
:weightColumnSpecId ""}
:textClassificationDatasetMetadata {:classificationType ""}
:textExtractionDatasetMetadata {}
:textSentimentDatasetMetadata {:sentimentMax 0}
:translationDatasetMetadata {:sourceLanguageCode ""
:targetLanguageCode ""}
:videoClassificationDatasetMetadata {}
:videoObjectTrackingDatasetMetadata {}}})
require "http/client"
url = "{{baseUrl}}/v1beta1/:parent/datasets"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"createTime\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"etag\": \"\",\n \"exampleCount\": 0,\n \"imageClassificationDatasetMetadata\": {\n \"classificationType\": \"\"\n },\n \"imageObjectDetectionDatasetMetadata\": {},\n \"name\": \"\",\n \"tablesDatasetMetadata\": {\n \"mlUseColumnSpecId\": \"\",\n \"primaryTableSpecId\": \"\",\n \"statsUpdateTime\": \"\",\n \"targetColumnCorrelations\": {},\n \"targetColumnSpecId\": \"\",\n \"weightColumnSpecId\": \"\"\n },\n \"textClassificationDatasetMetadata\": {\n \"classificationType\": \"\"\n },\n \"textExtractionDatasetMetadata\": {},\n \"textSentimentDatasetMetadata\": {\n \"sentimentMax\": 0\n },\n \"translationDatasetMetadata\": {\n \"sourceLanguageCode\": \"\",\n \"targetLanguageCode\": \"\"\n },\n \"videoClassificationDatasetMetadata\": {},\n \"videoObjectTrackingDatasetMetadata\": {}\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}}/v1beta1/:parent/datasets"),
Content = new StringContent("{\n \"createTime\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"etag\": \"\",\n \"exampleCount\": 0,\n \"imageClassificationDatasetMetadata\": {\n \"classificationType\": \"\"\n },\n \"imageObjectDetectionDatasetMetadata\": {},\n \"name\": \"\",\n \"tablesDatasetMetadata\": {\n \"mlUseColumnSpecId\": \"\",\n \"primaryTableSpecId\": \"\",\n \"statsUpdateTime\": \"\",\n \"targetColumnCorrelations\": {},\n \"targetColumnSpecId\": \"\",\n \"weightColumnSpecId\": \"\"\n },\n \"textClassificationDatasetMetadata\": {\n \"classificationType\": \"\"\n },\n \"textExtractionDatasetMetadata\": {},\n \"textSentimentDatasetMetadata\": {\n \"sentimentMax\": 0\n },\n \"translationDatasetMetadata\": {\n \"sourceLanguageCode\": \"\",\n \"targetLanguageCode\": \"\"\n },\n \"videoClassificationDatasetMetadata\": {},\n \"videoObjectTrackingDatasetMetadata\": {}\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}}/v1beta1/:parent/datasets");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"createTime\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"etag\": \"\",\n \"exampleCount\": 0,\n \"imageClassificationDatasetMetadata\": {\n \"classificationType\": \"\"\n },\n \"imageObjectDetectionDatasetMetadata\": {},\n \"name\": \"\",\n \"tablesDatasetMetadata\": {\n \"mlUseColumnSpecId\": \"\",\n \"primaryTableSpecId\": \"\",\n \"statsUpdateTime\": \"\",\n \"targetColumnCorrelations\": {},\n \"targetColumnSpecId\": \"\",\n \"weightColumnSpecId\": \"\"\n },\n \"textClassificationDatasetMetadata\": {\n \"classificationType\": \"\"\n },\n \"textExtractionDatasetMetadata\": {},\n \"textSentimentDatasetMetadata\": {\n \"sentimentMax\": 0\n },\n \"translationDatasetMetadata\": {\n \"sourceLanguageCode\": \"\",\n \"targetLanguageCode\": \"\"\n },\n \"videoClassificationDatasetMetadata\": {},\n \"videoObjectTrackingDatasetMetadata\": {}\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1beta1/:parent/datasets"
payload := strings.NewReader("{\n \"createTime\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"etag\": \"\",\n \"exampleCount\": 0,\n \"imageClassificationDatasetMetadata\": {\n \"classificationType\": \"\"\n },\n \"imageObjectDetectionDatasetMetadata\": {},\n \"name\": \"\",\n \"tablesDatasetMetadata\": {\n \"mlUseColumnSpecId\": \"\",\n \"primaryTableSpecId\": \"\",\n \"statsUpdateTime\": \"\",\n \"targetColumnCorrelations\": {},\n \"targetColumnSpecId\": \"\",\n \"weightColumnSpecId\": \"\"\n },\n \"textClassificationDatasetMetadata\": {\n \"classificationType\": \"\"\n },\n \"textExtractionDatasetMetadata\": {},\n \"textSentimentDatasetMetadata\": {\n \"sentimentMax\": 0\n },\n \"translationDatasetMetadata\": {\n \"sourceLanguageCode\": \"\",\n \"targetLanguageCode\": \"\"\n },\n \"videoClassificationDatasetMetadata\": {},\n \"videoObjectTrackingDatasetMetadata\": {}\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/v1beta1/:parent/datasets HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 812
{
"createTime": "",
"description": "",
"displayName": "",
"etag": "",
"exampleCount": 0,
"imageClassificationDatasetMetadata": {
"classificationType": ""
},
"imageObjectDetectionDatasetMetadata": {},
"name": "",
"tablesDatasetMetadata": {
"mlUseColumnSpecId": "",
"primaryTableSpecId": "",
"statsUpdateTime": "",
"targetColumnCorrelations": {},
"targetColumnSpecId": "",
"weightColumnSpecId": ""
},
"textClassificationDatasetMetadata": {
"classificationType": ""
},
"textExtractionDatasetMetadata": {},
"textSentimentDatasetMetadata": {
"sentimentMax": 0
},
"translationDatasetMetadata": {
"sourceLanguageCode": "",
"targetLanguageCode": ""
},
"videoClassificationDatasetMetadata": {},
"videoObjectTrackingDatasetMetadata": {}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1beta1/:parent/datasets")
.setHeader("content-type", "application/json")
.setBody("{\n \"createTime\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"etag\": \"\",\n \"exampleCount\": 0,\n \"imageClassificationDatasetMetadata\": {\n \"classificationType\": \"\"\n },\n \"imageObjectDetectionDatasetMetadata\": {},\n \"name\": \"\",\n \"tablesDatasetMetadata\": {\n \"mlUseColumnSpecId\": \"\",\n \"primaryTableSpecId\": \"\",\n \"statsUpdateTime\": \"\",\n \"targetColumnCorrelations\": {},\n \"targetColumnSpecId\": \"\",\n \"weightColumnSpecId\": \"\"\n },\n \"textClassificationDatasetMetadata\": {\n \"classificationType\": \"\"\n },\n \"textExtractionDatasetMetadata\": {},\n \"textSentimentDatasetMetadata\": {\n \"sentimentMax\": 0\n },\n \"translationDatasetMetadata\": {\n \"sourceLanguageCode\": \"\",\n \"targetLanguageCode\": \"\"\n },\n \"videoClassificationDatasetMetadata\": {},\n \"videoObjectTrackingDatasetMetadata\": {}\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1beta1/:parent/datasets"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"createTime\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"etag\": \"\",\n \"exampleCount\": 0,\n \"imageClassificationDatasetMetadata\": {\n \"classificationType\": \"\"\n },\n \"imageObjectDetectionDatasetMetadata\": {},\n \"name\": \"\",\n \"tablesDatasetMetadata\": {\n \"mlUseColumnSpecId\": \"\",\n \"primaryTableSpecId\": \"\",\n \"statsUpdateTime\": \"\",\n \"targetColumnCorrelations\": {},\n \"targetColumnSpecId\": \"\",\n \"weightColumnSpecId\": \"\"\n },\n \"textClassificationDatasetMetadata\": {\n \"classificationType\": \"\"\n },\n \"textExtractionDatasetMetadata\": {},\n \"textSentimentDatasetMetadata\": {\n \"sentimentMax\": 0\n },\n \"translationDatasetMetadata\": {\n \"sourceLanguageCode\": \"\",\n \"targetLanguageCode\": \"\"\n },\n \"videoClassificationDatasetMetadata\": {},\n \"videoObjectTrackingDatasetMetadata\": {}\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 \"createTime\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"etag\": \"\",\n \"exampleCount\": 0,\n \"imageClassificationDatasetMetadata\": {\n \"classificationType\": \"\"\n },\n \"imageObjectDetectionDatasetMetadata\": {},\n \"name\": \"\",\n \"tablesDatasetMetadata\": {\n \"mlUseColumnSpecId\": \"\",\n \"primaryTableSpecId\": \"\",\n \"statsUpdateTime\": \"\",\n \"targetColumnCorrelations\": {},\n \"targetColumnSpecId\": \"\",\n \"weightColumnSpecId\": \"\"\n },\n \"textClassificationDatasetMetadata\": {\n \"classificationType\": \"\"\n },\n \"textExtractionDatasetMetadata\": {},\n \"textSentimentDatasetMetadata\": {\n \"sentimentMax\": 0\n },\n \"translationDatasetMetadata\": {\n \"sourceLanguageCode\": \"\",\n \"targetLanguageCode\": \"\"\n },\n \"videoClassificationDatasetMetadata\": {},\n \"videoObjectTrackingDatasetMetadata\": {}\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1beta1/:parent/datasets")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1beta1/:parent/datasets")
.header("content-type", "application/json")
.body("{\n \"createTime\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"etag\": \"\",\n \"exampleCount\": 0,\n \"imageClassificationDatasetMetadata\": {\n \"classificationType\": \"\"\n },\n \"imageObjectDetectionDatasetMetadata\": {},\n \"name\": \"\",\n \"tablesDatasetMetadata\": {\n \"mlUseColumnSpecId\": \"\",\n \"primaryTableSpecId\": \"\",\n \"statsUpdateTime\": \"\",\n \"targetColumnCorrelations\": {},\n \"targetColumnSpecId\": \"\",\n \"weightColumnSpecId\": \"\"\n },\n \"textClassificationDatasetMetadata\": {\n \"classificationType\": \"\"\n },\n \"textExtractionDatasetMetadata\": {},\n \"textSentimentDatasetMetadata\": {\n \"sentimentMax\": 0\n },\n \"translationDatasetMetadata\": {\n \"sourceLanguageCode\": \"\",\n \"targetLanguageCode\": \"\"\n },\n \"videoClassificationDatasetMetadata\": {},\n \"videoObjectTrackingDatasetMetadata\": {}\n}")
.asString();
const data = JSON.stringify({
createTime: '',
description: '',
displayName: '',
etag: '',
exampleCount: 0,
imageClassificationDatasetMetadata: {
classificationType: ''
},
imageObjectDetectionDatasetMetadata: {},
name: '',
tablesDatasetMetadata: {
mlUseColumnSpecId: '',
primaryTableSpecId: '',
statsUpdateTime: '',
targetColumnCorrelations: {},
targetColumnSpecId: '',
weightColumnSpecId: ''
},
textClassificationDatasetMetadata: {
classificationType: ''
},
textExtractionDatasetMetadata: {},
textSentimentDatasetMetadata: {
sentimentMax: 0
},
translationDatasetMetadata: {
sourceLanguageCode: '',
targetLanguageCode: ''
},
videoClassificationDatasetMetadata: {},
videoObjectTrackingDatasetMetadata: {}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v1beta1/:parent/datasets');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1beta1/:parent/datasets',
headers: {'content-type': 'application/json'},
data: {
createTime: '',
description: '',
displayName: '',
etag: '',
exampleCount: 0,
imageClassificationDatasetMetadata: {classificationType: ''},
imageObjectDetectionDatasetMetadata: {},
name: '',
tablesDatasetMetadata: {
mlUseColumnSpecId: '',
primaryTableSpecId: '',
statsUpdateTime: '',
targetColumnCorrelations: {},
targetColumnSpecId: '',
weightColumnSpecId: ''
},
textClassificationDatasetMetadata: {classificationType: ''},
textExtractionDatasetMetadata: {},
textSentimentDatasetMetadata: {sentimentMax: 0},
translationDatasetMetadata: {sourceLanguageCode: '', targetLanguageCode: ''},
videoClassificationDatasetMetadata: {},
videoObjectTrackingDatasetMetadata: {}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1beta1/:parent/datasets';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"createTime":"","description":"","displayName":"","etag":"","exampleCount":0,"imageClassificationDatasetMetadata":{"classificationType":""},"imageObjectDetectionDatasetMetadata":{},"name":"","tablesDatasetMetadata":{"mlUseColumnSpecId":"","primaryTableSpecId":"","statsUpdateTime":"","targetColumnCorrelations":{},"targetColumnSpecId":"","weightColumnSpecId":""},"textClassificationDatasetMetadata":{"classificationType":""},"textExtractionDatasetMetadata":{},"textSentimentDatasetMetadata":{"sentimentMax":0},"translationDatasetMetadata":{"sourceLanguageCode":"","targetLanguageCode":""},"videoClassificationDatasetMetadata":{},"videoObjectTrackingDatasetMetadata":{}}'
};
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}}/v1beta1/:parent/datasets',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "createTime": "",\n "description": "",\n "displayName": "",\n "etag": "",\n "exampleCount": 0,\n "imageClassificationDatasetMetadata": {\n "classificationType": ""\n },\n "imageObjectDetectionDatasetMetadata": {},\n "name": "",\n "tablesDatasetMetadata": {\n "mlUseColumnSpecId": "",\n "primaryTableSpecId": "",\n "statsUpdateTime": "",\n "targetColumnCorrelations": {},\n "targetColumnSpecId": "",\n "weightColumnSpecId": ""\n },\n "textClassificationDatasetMetadata": {\n "classificationType": ""\n },\n "textExtractionDatasetMetadata": {},\n "textSentimentDatasetMetadata": {\n "sentimentMax": 0\n },\n "translationDatasetMetadata": {\n "sourceLanguageCode": "",\n "targetLanguageCode": ""\n },\n "videoClassificationDatasetMetadata": {},\n "videoObjectTrackingDatasetMetadata": {}\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"createTime\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"etag\": \"\",\n \"exampleCount\": 0,\n \"imageClassificationDatasetMetadata\": {\n \"classificationType\": \"\"\n },\n \"imageObjectDetectionDatasetMetadata\": {},\n \"name\": \"\",\n \"tablesDatasetMetadata\": {\n \"mlUseColumnSpecId\": \"\",\n \"primaryTableSpecId\": \"\",\n \"statsUpdateTime\": \"\",\n \"targetColumnCorrelations\": {},\n \"targetColumnSpecId\": \"\",\n \"weightColumnSpecId\": \"\"\n },\n \"textClassificationDatasetMetadata\": {\n \"classificationType\": \"\"\n },\n \"textExtractionDatasetMetadata\": {},\n \"textSentimentDatasetMetadata\": {\n \"sentimentMax\": 0\n },\n \"translationDatasetMetadata\": {\n \"sourceLanguageCode\": \"\",\n \"targetLanguageCode\": \"\"\n },\n \"videoClassificationDatasetMetadata\": {},\n \"videoObjectTrackingDatasetMetadata\": {}\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1beta1/:parent/datasets")
.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/v1beta1/:parent/datasets',
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({
createTime: '',
description: '',
displayName: '',
etag: '',
exampleCount: 0,
imageClassificationDatasetMetadata: {classificationType: ''},
imageObjectDetectionDatasetMetadata: {},
name: '',
tablesDatasetMetadata: {
mlUseColumnSpecId: '',
primaryTableSpecId: '',
statsUpdateTime: '',
targetColumnCorrelations: {},
targetColumnSpecId: '',
weightColumnSpecId: ''
},
textClassificationDatasetMetadata: {classificationType: ''},
textExtractionDatasetMetadata: {},
textSentimentDatasetMetadata: {sentimentMax: 0},
translationDatasetMetadata: {sourceLanguageCode: '', targetLanguageCode: ''},
videoClassificationDatasetMetadata: {},
videoObjectTrackingDatasetMetadata: {}
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1beta1/:parent/datasets',
headers: {'content-type': 'application/json'},
body: {
createTime: '',
description: '',
displayName: '',
etag: '',
exampleCount: 0,
imageClassificationDatasetMetadata: {classificationType: ''},
imageObjectDetectionDatasetMetadata: {},
name: '',
tablesDatasetMetadata: {
mlUseColumnSpecId: '',
primaryTableSpecId: '',
statsUpdateTime: '',
targetColumnCorrelations: {},
targetColumnSpecId: '',
weightColumnSpecId: ''
},
textClassificationDatasetMetadata: {classificationType: ''},
textExtractionDatasetMetadata: {},
textSentimentDatasetMetadata: {sentimentMax: 0},
translationDatasetMetadata: {sourceLanguageCode: '', targetLanguageCode: ''},
videoClassificationDatasetMetadata: {},
videoObjectTrackingDatasetMetadata: {}
},
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}}/v1beta1/:parent/datasets');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
createTime: '',
description: '',
displayName: '',
etag: '',
exampleCount: 0,
imageClassificationDatasetMetadata: {
classificationType: ''
},
imageObjectDetectionDatasetMetadata: {},
name: '',
tablesDatasetMetadata: {
mlUseColumnSpecId: '',
primaryTableSpecId: '',
statsUpdateTime: '',
targetColumnCorrelations: {},
targetColumnSpecId: '',
weightColumnSpecId: ''
},
textClassificationDatasetMetadata: {
classificationType: ''
},
textExtractionDatasetMetadata: {},
textSentimentDatasetMetadata: {
sentimentMax: 0
},
translationDatasetMetadata: {
sourceLanguageCode: '',
targetLanguageCode: ''
},
videoClassificationDatasetMetadata: {},
videoObjectTrackingDatasetMetadata: {}
});
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}}/v1beta1/:parent/datasets',
headers: {'content-type': 'application/json'},
data: {
createTime: '',
description: '',
displayName: '',
etag: '',
exampleCount: 0,
imageClassificationDatasetMetadata: {classificationType: ''},
imageObjectDetectionDatasetMetadata: {},
name: '',
tablesDatasetMetadata: {
mlUseColumnSpecId: '',
primaryTableSpecId: '',
statsUpdateTime: '',
targetColumnCorrelations: {},
targetColumnSpecId: '',
weightColumnSpecId: ''
},
textClassificationDatasetMetadata: {classificationType: ''},
textExtractionDatasetMetadata: {},
textSentimentDatasetMetadata: {sentimentMax: 0},
translationDatasetMetadata: {sourceLanguageCode: '', targetLanguageCode: ''},
videoClassificationDatasetMetadata: {},
videoObjectTrackingDatasetMetadata: {}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1beta1/:parent/datasets';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"createTime":"","description":"","displayName":"","etag":"","exampleCount":0,"imageClassificationDatasetMetadata":{"classificationType":""},"imageObjectDetectionDatasetMetadata":{},"name":"","tablesDatasetMetadata":{"mlUseColumnSpecId":"","primaryTableSpecId":"","statsUpdateTime":"","targetColumnCorrelations":{},"targetColumnSpecId":"","weightColumnSpecId":""},"textClassificationDatasetMetadata":{"classificationType":""},"textExtractionDatasetMetadata":{},"textSentimentDatasetMetadata":{"sentimentMax":0},"translationDatasetMetadata":{"sourceLanguageCode":"","targetLanguageCode":""},"videoClassificationDatasetMetadata":{},"videoObjectTrackingDatasetMetadata":{}}'
};
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 = @{ @"createTime": @"",
@"description": @"",
@"displayName": @"",
@"etag": @"",
@"exampleCount": @0,
@"imageClassificationDatasetMetadata": @{ @"classificationType": @"" },
@"imageObjectDetectionDatasetMetadata": @{ },
@"name": @"",
@"tablesDatasetMetadata": @{ @"mlUseColumnSpecId": @"", @"primaryTableSpecId": @"", @"statsUpdateTime": @"", @"targetColumnCorrelations": @{ }, @"targetColumnSpecId": @"", @"weightColumnSpecId": @"" },
@"textClassificationDatasetMetadata": @{ @"classificationType": @"" },
@"textExtractionDatasetMetadata": @{ },
@"textSentimentDatasetMetadata": @{ @"sentimentMax": @0 },
@"translationDatasetMetadata": @{ @"sourceLanguageCode": @"", @"targetLanguageCode": @"" },
@"videoClassificationDatasetMetadata": @{ },
@"videoObjectTrackingDatasetMetadata": @{ } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1beta1/:parent/datasets"]
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}}/v1beta1/:parent/datasets" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"createTime\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"etag\": \"\",\n \"exampleCount\": 0,\n \"imageClassificationDatasetMetadata\": {\n \"classificationType\": \"\"\n },\n \"imageObjectDetectionDatasetMetadata\": {},\n \"name\": \"\",\n \"tablesDatasetMetadata\": {\n \"mlUseColumnSpecId\": \"\",\n \"primaryTableSpecId\": \"\",\n \"statsUpdateTime\": \"\",\n \"targetColumnCorrelations\": {},\n \"targetColumnSpecId\": \"\",\n \"weightColumnSpecId\": \"\"\n },\n \"textClassificationDatasetMetadata\": {\n \"classificationType\": \"\"\n },\n \"textExtractionDatasetMetadata\": {},\n \"textSentimentDatasetMetadata\": {\n \"sentimentMax\": 0\n },\n \"translationDatasetMetadata\": {\n \"sourceLanguageCode\": \"\",\n \"targetLanguageCode\": \"\"\n },\n \"videoClassificationDatasetMetadata\": {},\n \"videoObjectTrackingDatasetMetadata\": {}\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1beta1/:parent/datasets",
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([
'createTime' => '',
'description' => '',
'displayName' => '',
'etag' => '',
'exampleCount' => 0,
'imageClassificationDatasetMetadata' => [
'classificationType' => ''
],
'imageObjectDetectionDatasetMetadata' => [
],
'name' => '',
'tablesDatasetMetadata' => [
'mlUseColumnSpecId' => '',
'primaryTableSpecId' => '',
'statsUpdateTime' => '',
'targetColumnCorrelations' => [
],
'targetColumnSpecId' => '',
'weightColumnSpecId' => ''
],
'textClassificationDatasetMetadata' => [
'classificationType' => ''
],
'textExtractionDatasetMetadata' => [
],
'textSentimentDatasetMetadata' => [
'sentimentMax' => 0
],
'translationDatasetMetadata' => [
'sourceLanguageCode' => '',
'targetLanguageCode' => ''
],
'videoClassificationDatasetMetadata' => [
],
'videoObjectTrackingDatasetMetadata' => [
]
]),
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}}/v1beta1/:parent/datasets', [
'body' => '{
"createTime": "",
"description": "",
"displayName": "",
"etag": "",
"exampleCount": 0,
"imageClassificationDatasetMetadata": {
"classificationType": ""
},
"imageObjectDetectionDatasetMetadata": {},
"name": "",
"tablesDatasetMetadata": {
"mlUseColumnSpecId": "",
"primaryTableSpecId": "",
"statsUpdateTime": "",
"targetColumnCorrelations": {},
"targetColumnSpecId": "",
"weightColumnSpecId": ""
},
"textClassificationDatasetMetadata": {
"classificationType": ""
},
"textExtractionDatasetMetadata": {},
"textSentimentDatasetMetadata": {
"sentimentMax": 0
},
"translationDatasetMetadata": {
"sourceLanguageCode": "",
"targetLanguageCode": ""
},
"videoClassificationDatasetMetadata": {},
"videoObjectTrackingDatasetMetadata": {}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1beta1/:parent/datasets');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'createTime' => '',
'description' => '',
'displayName' => '',
'etag' => '',
'exampleCount' => 0,
'imageClassificationDatasetMetadata' => [
'classificationType' => ''
],
'imageObjectDetectionDatasetMetadata' => [
],
'name' => '',
'tablesDatasetMetadata' => [
'mlUseColumnSpecId' => '',
'primaryTableSpecId' => '',
'statsUpdateTime' => '',
'targetColumnCorrelations' => [
],
'targetColumnSpecId' => '',
'weightColumnSpecId' => ''
],
'textClassificationDatasetMetadata' => [
'classificationType' => ''
],
'textExtractionDatasetMetadata' => [
],
'textSentimentDatasetMetadata' => [
'sentimentMax' => 0
],
'translationDatasetMetadata' => [
'sourceLanguageCode' => '',
'targetLanguageCode' => ''
],
'videoClassificationDatasetMetadata' => [
],
'videoObjectTrackingDatasetMetadata' => [
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'createTime' => '',
'description' => '',
'displayName' => '',
'etag' => '',
'exampleCount' => 0,
'imageClassificationDatasetMetadata' => [
'classificationType' => ''
],
'imageObjectDetectionDatasetMetadata' => [
],
'name' => '',
'tablesDatasetMetadata' => [
'mlUseColumnSpecId' => '',
'primaryTableSpecId' => '',
'statsUpdateTime' => '',
'targetColumnCorrelations' => [
],
'targetColumnSpecId' => '',
'weightColumnSpecId' => ''
],
'textClassificationDatasetMetadata' => [
'classificationType' => ''
],
'textExtractionDatasetMetadata' => [
],
'textSentimentDatasetMetadata' => [
'sentimentMax' => 0
],
'translationDatasetMetadata' => [
'sourceLanguageCode' => '',
'targetLanguageCode' => ''
],
'videoClassificationDatasetMetadata' => [
],
'videoObjectTrackingDatasetMetadata' => [
]
]));
$request->setRequestUrl('{{baseUrl}}/v1beta1/:parent/datasets');
$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}}/v1beta1/:parent/datasets' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"createTime": "",
"description": "",
"displayName": "",
"etag": "",
"exampleCount": 0,
"imageClassificationDatasetMetadata": {
"classificationType": ""
},
"imageObjectDetectionDatasetMetadata": {},
"name": "",
"tablesDatasetMetadata": {
"mlUseColumnSpecId": "",
"primaryTableSpecId": "",
"statsUpdateTime": "",
"targetColumnCorrelations": {},
"targetColumnSpecId": "",
"weightColumnSpecId": ""
},
"textClassificationDatasetMetadata": {
"classificationType": ""
},
"textExtractionDatasetMetadata": {},
"textSentimentDatasetMetadata": {
"sentimentMax": 0
},
"translationDatasetMetadata": {
"sourceLanguageCode": "",
"targetLanguageCode": ""
},
"videoClassificationDatasetMetadata": {},
"videoObjectTrackingDatasetMetadata": {}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1beta1/:parent/datasets' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"createTime": "",
"description": "",
"displayName": "",
"etag": "",
"exampleCount": 0,
"imageClassificationDatasetMetadata": {
"classificationType": ""
},
"imageObjectDetectionDatasetMetadata": {},
"name": "",
"tablesDatasetMetadata": {
"mlUseColumnSpecId": "",
"primaryTableSpecId": "",
"statsUpdateTime": "",
"targetColumnCorrelations": {},
"targetColumnSpecId": "",
"weightColumnSpecId": ""
},
"textClassificationDatasetMetadata": {
"classificationType": ""
},
"textExtractionDatasetMetadata": {},
"textSentimentDatasetMetadata": {
"sentimentMax": 0
},
"translationDatasetMetadata": {
"sourceLanguageCode": "",
"targetLanguageCode": ""
},
"videoClassificationDatasetMetadata": {},
"videoObjectTrackingDatasetMetadata": {}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"createTime\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"etag\": \"\",\n \"exampleCount\": 0,\n \"imageClassificationDatasetMetadata\": {\n \"classificationType\": \"\"\n },\n \"imageObjectDetectionDatasetMetadata\": {},\n \"name\": \"\",\n \"tablesDatasetMetadata\": {\n \"mlUseColumnSpecId\": \"\",\n \"primaryTableSpecId\": \"\",\n \"statsUpdateTime\": \"\",\n \"targetColumnCorrelations\": {},\n \"targetColumnSpecId\": \"\",\n \"weightColumnSpecId\": \"\"\n },\n \"textClassificationDatasetMetadata\": {\n \"classificationType\": \"\"\n },\n \"textExtractionDatasetMetadata\": {},\n \"textSentimentDatasetMetadata\": {\n \"sentimentMax\": 0\n },\n \"translationDatasetMetadata\": {\n \"sourceLanguageCode\": \"\",\n \"targetLanguageCode\": \"\"\n },\n \"videoClassificationDatasetMetadata\": {},\n \"videoObjectTrackingDatasetMetadata\": {}\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1beta1/:parent/datasets", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1beta1/:parent/datasets"
payload = {
"createTime": "",
"description": "",
"displayName": "",
"etag": "",
"exampleCount": 0,
"imageClassificationDatasetMetadata": { "classificationType": "" },
"imageObjectDetectionDatasetMetadata": {},
"name": "",
"tablesDatasetMetadata": {
"mlUseColumnSpecId": "",
"primaryTableSpecId": "",
"statsUpdateTime": "",
"targetColumnCorrelations": {},
"targetColumnSpecId": "",
"weightColumnSpecId": ""
},
"textClassificationDatasetMetadata": { "classificationType": "" },
"textExtractionDatasetMetadata": {},
"textSentimentDatasetMetadata": { "sentimentMax": 0 },
"translationDatasetMetadata": {
"sourceLanguageCode": "",
"targetLanguageCode": ""
},
"videoClassificationDatasetMetadata": {},
"videoObjectTrackingDatasetMetadata": {}
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1beta1/:parent/datasets"
payload <- "{\n \"createTime\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"etag\": \"\",\n \"exampleCount\": 0,\n \"imageClassificationDatasetMetadata\": {\n \"classificationType\": \"\"\n },\n \"imageObjectDetectionDatasetMetadata\": {},\n \"name\": \"\",\n \"tablesDatasetMetadata\": {\n \"mlUseColumnSpecId\": \"\",\n \"primaryTableSpecId\": \"\",\n \"statsUpdateTime\": \"\",\n \"targetColumnCorrelations\": {},\n \"targetColumnSpecId\": \"\",\n \"weightColumnSpecId\": \"\"\n },\n \"textClassificationDatasetMetadata\": {\n \"classificationType\": \"\"\n },\n \"textExtractionDatasetMetadata\": {},\n \"textSentimentDatasetMetadata\": {\n \"sentimentMax\": 0\n },\n \"translationDatasetMetadata\": {\n \"sourceLanguageCode\": \"\",\n \"targetLanguageCode\": \"\"\n },\n \"videoClassificationDatasetMetadata\": {},\n \"videoObjectTrackingDatasetMetadata\": {}\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}}/v1beta1/:parent/datasets")
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 \"createTime\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"etag\": \"\",\n \"exampleCount\": 0,\n \"imageClassificationDatasetMetadata\": {\n \"classificationType\": \"\"\n },\n \"imageObjectDetectionDatasetMetadata\": {},\n \"name\": \"\",\n \"tablesDatasetMetadata\": {\n \"mlUseColumnSpecId\": \"\",\n \"primaryTableSpecId\": \"\",\n \"statsUpdateTime\": \"\",\n \"targetColumnCorrelations\": {},\n \"targetColumnSpecId\": \"\",\n \"weightColumnSpecId\": \"\"\n },\n \"textClassificationDatasetMetadata\": {\n \"classificationType\": \"\"\n },\n \"textExtractionDatasetMetadata\": {},\n \"textSentimentDatasetMetadata\": {\n \"sentimentMax\": 0\n },\n \"translationDatasetMetadata\": {\n \"sourceLanguageCode\": \"\",\n \"targetLanguageCode\": \"\"\n },\n \"videoClassificationDatasetMetadata\": {},\n \"videoObjectTrackingDatasetMetadata\": {}\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/v1beta1/:parent/datasets') do |req|
req.body = "{\n \"createTime\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"etag\": \"\",\n \"exampleCount\": 0,\n \"imageClassificationDatasetMetadata\": {\n \"classificationType\": \"\"\n },\n \"imageObjectDetectionDatasetMetadata\": {},\n \"name\": \"\",\n \"tablesDatasetMetadata\": {\n \"mlUseColumnSpecId\": \"\",\n \"primaryTableSpecId\": \"\",\n \"statsUpdateTime\": \"\",\n \"targetColumnCorrelations\": {},\n \"targetColumnSpecId\": \"\",\n \"weightColumnSpecId\": \"\"\n },\n \"textClassificationDatasetMetadata\": {\n \"classificationType\": \"\"\n },\n \"textExtractionDatasetMetadata\": {},\n \"textSentimentDatasetMetadata\": {\n \"sentimentMax\": 0\n },\n \"translationDatasetMetadata\": {\n \"sourceLanguageCode\": \"\",\n \"targetLanguageCode\": \"\"\n },\n \"videoClassificationDatasetMetadata\": {},\n \"videoObjectTrackingDatasetMetadata\": {}\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1beta1/:parent/datasets";
let payload = json!({
"createTime": "",
"description": "",
"displayName": "",
"etag": "",
"exampleCount": 0,
"imageClassificationDatasetMetadata": json!({"classificationType": ""}),
"imageObjectDetectionDatasetMetadata": json!({}),
"name": "",
"tablesDatasetMetadata": json!({
"mlUseColumnSpecId": "",
"primaryTableSpecId": "",
"statsUpdateTime": "",
"targetColumnCorrelations": json!({}),
"targetColumnSpecId": "",
"weightColumnSpecId": ""
}),
"textClassificationDatasetMetadata": json!({"classificationType": ""}),
"textExtractionDatasetMetadata": json!({}),
"textSentimentDatasetMetadata": json!({"sentimentMax": 0}),
"translationDatasetMetadata": json!({
"sourceLanguageCode": "",
"targetLanguageCode": ""
}),
"videoClassificationDatasetMetadata": json!({}),
"videoObjectTrackingDatasetMetadata": 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}}/v1beta1/:parent/datasets \
--header 'content-type: application/json' \
--data '{
"createTime": "",
"description": "",
"displayName": "",
"etag": "",
"exampleCount": 0,
"imageClassificationDatasetMetadata": {
"classificationType": ""
},
"imageObjectDetectionDatasetMetadata": {},
"name": "",
"tablesDatasetMetadata": {
"mlUseColumnSpecId": "",
"primaryTableSpecId": "",
"statsUpdateTime": "",
"targetColumnCorrelations": {},
"targetColumnSpecId": "",
"weightColumnSpecId": ""
},
"textClassificationDatasetMetadata": {
"classificationType": ""
},
"textExtractionDatasetMetadata": {},
"textSentimentDatasetMetadata": {
"sentimentMax": 0
},
"translationDatasetMetadata": {
"sourceLanguageCode": "",
"targetLanguageCode": ""
},
"videoClassificationDatasetMetadata": {},
"videoObjectTrackingDatasetMetadata": {}
}'
echo '{
"createTime": "",
"description": "",
"displayName": "",
"etag": "",
"exampleCount": 0,
"imageClassificationDatasetMetadata": {
"classificationType": ""
},
"imageObjectDetectionDatasetMetadata": {},
"name": "",
"tablesDatasetMetadata": {
"mlUseColumnSpecId": "",
"primaryTableSpecId": "",
"statsUpdateTime": "",
"targetColumnCorrelations": {},
"targetColumnSpecId": "",
"weightColumnSpecId": ""
},
"textClassificationDatasetMetadata": {
"classificationType": ""
},
"textExtractionDatasetMetadata": {},
"textSentimentDatasetMetadata": {
"sentimentMax": 0
},
"translationDatasetMetadata": {
"sourceLanguageCode": "",
"targetLanguageCode": ""
},
"videoClassificationDatasetMetadata": {},
"videoObjectTrackingDatasetMetadata": {}
}' | \
http POST {{baseUrl}}/v1beta1/:parent/datasets \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "createTime": "",\n "description": "",\n "displayName": "",\n "etag": "",\n "exampleCount": 0,\n "imageClassificationDatasetMetadata": {\n "classificationType": ""\n },\n "imageObjectDetectionDatasetMetadata": {},\n "name": "",\n "tablesDatasetMetadata": {\n "mlUseColumnSpecId": "",\n "primaryTableSpecId": "",\n "statsUpdateTime": "",\n "targetColumnCorrelations": {},\n "targetColumnSpecId": "",\n "weightColumnSpecId": ""\n },\n "textClassificationDatasetMetadata": {\n "classificationType": ""\n },\n "textExtractionDatasetMetadata": {},\n "textSentimentDatasetMetadata": {\n "sentimentMax": 0\n },\n "translationDatasetMetadata": {\n "sourceLanguageCode": "",\n "targetLanguageCode": ""\n },\n "videoClassificationDatasetMetadata": {},\n "videoObjectTrackingDatasetMetadata": {}\n}' \
--output-document \
- {{baseUrl}}/v1beta1/:parent/datasets
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"createTime": "",
"description": "",
"displayName": "",
"etag": "",
"exampleCount": 0,
"imageClassificationDatasetMetadata": ["classificationType": ""],
"imageObjectDetectionDatasetMetadata": [],
"name": "",
"tablesDatasetMetadata": [
"mlUseColumnSpecId": "",
"primaryTableSpecId": "",
"statsUpdateTime": "",
"targetColumnCorrelations": [],
"targetColumnSpecId": "",
"weightColumnSpecId": ""
],
"textClassificationDatasetMetadata": ["classificationType": ""],
"textExtractionDatasetMetadata": [],
"textSentimentDatasetMetadata": ["sentimentMax": 0],
"translationDatasetMetadata": [
"sourceLanguageCode": "",
"targetLanguageCode": ""
],
"videoClassificationDatasetMetadata": [],
"videoObjectTrackingDatasetMetadata": []
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1beta1/:parent/datasets")! 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
automl.projects.locations.datasets.exportData
{{baseUrl}}/v1beta1/:name:exportData
QUERY PARAMS
name
BODY json
{
"outputConfig": {
"bigqueryDestination": {
"outputUri": ""
},
"gcsDestination": {
"outputUriPrefix": ""
}
}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1beta1/:name:exportData");
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 \"outputConfig\": {\n \"bigqueryDestination\": {\n \"outputUri\": \"\"\n },\n \"gcsDestination\": {\n \"outputUriPrefix\": \"\"\n }\n }\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1beta1/:name:exportData" {:content-type :json
:form-params {:outputConfig {:bigqueryDestination {:outputUri ""}
:gcsDestination {:outputUriPrefix ""}}}})
require "http/client"
url = "{{baseUrl}}/v1beta1/:name:exportData"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"outputConfig\": {\n \"bigqueryDestination\": {\n \"outputUri\": \"\"\n },\n \"gcsDestination\": {\n \"outputUriPrefix\": \"\"\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}}/v1beta1/:name:exportData"),
Content = new StringContent("{\n \"outputConfig\": {\n \"bigqueryDestination\": {\n \"outputUri\": \"\"\n },\n \"gcsDestination\": {\n \"outputUriPrefix\": \"\"\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}}/v1beta1/:name:exportData");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"outputConfig\": {\n \"bigqueryDestination\": {\n \"outputUri\": \"\"\n },\n \"gcsDestination\": {\n \"outputUriPrefix\": \"\"\n }\n }\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1beta1/:name:exportData"
payload := strings.NewReader("{\n \"outputConfig\": {\n \"bigqueryDestination\": {\n \"outputUri\": \"\"\n },\n \"gcsDestination\": {\n \"outputUriPrefix\": \"\"\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/v1beta1/:name:exportData HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 143
{
"outputConfig": {
"bigqueryDestination": {
"outputUri": ""
},
"gcsDestination": {
"outputUriPrefix": ""
}
}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1beta1/:name:exportData")
.setHeader("content-type", "application/json")
.setBody("{\n \"outputConfig\": {\n \"bigqueryDestination\": {\n \"outputUri\": \"\"\n },\n \"gcsDestination\": {\n \"outputUriPrefix\": \"\"\n }\n }\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1beta1/:name:exportData"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"outputConfig\": {\n \"bigqueryDestination\": {\n \"outputUri\": \"\"\n },\n \"gcsDestination\": {\n \"outputUriPrefix\": \"\"\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 \"outputConfig\": {\n \"bigqueryDestination\": {\n \"outputUri\": \"\"\n },\n \"gcsDestination\": {\n \"outputUriPrefix\": \"\"\n }\n }\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1beta1/:name:exportData")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1beta1/:name:exportData")
.header("content-type", "application/json")
.body("{\n \"outputConfig\": {\n \"bigqueryDestination\": {\n \"outputUri\": \"\"\n },\n \"gcsDestination\": {\n \"outputUriPrefix\": \"\"\n }\n }\n}")
.asString();
const data = JSON.stringify({
outputConfig: {
bigqueryDestination: {
outputUri: ''
},
gcsDestination: {
outputUriPrefix: ''
}
}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v1beta1/:name:exportData');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1beta1/:name:exportData',
headers: {'content-type': 'application/json'},
data: {
outputConfig: {bigqueryDestination: {outputUri: ''}, gcsDestination: {outputUriPrefix: ''}}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1beta1/:name:exportData';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"outputConfig":{"bigqueryDestination":{"outputUri":""},"gcsDestination":{"outputUriPrefix":""}}}'
};
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}}/v1beta1/:name:exportData',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "outputConfig": {\n "bigqueryDestination": {\n "outputUri": ""\n },\n "gcsDestination": {\n "outputUriPrefix": ""\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 \"outputConfig\": {\n \"bigqueryDestination\": {\n \"outputUri\": \"\"\n },\n \"gcsDestination\": {\n \"outputUriPrefix\": \"\"\n }\n }\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1beta1/:name:exportData")
.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/v1beta1/:name:exportData',
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({
outputConfig: {bigqueryDestination: {outputUri: ''}, gcsDestination: {outputUriPrefix: ''}}
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1beta1/:name:exportData',
headers: {'content-type': 'application/json'},
body: {
outputConfig: {bigqueryDestination: {outputUri: ''}, gcsDestination: {outputUriPrefix: ''}}
},
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}}/v1beta1/:name:exportData');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
outputConfig: {
bigqueryDestination: {
outputUri: ''
},
gcsDestination: {
outputUriPrefix: ''
}
}
});
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}}/v1beta1/:name:exportData',
headers: {'content-type': 'application/json'},
data: {
outputConfig: {bigqueryDestination: {outputUri: ''}, gcsDestination: {outputUriPrefix: ''}}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1beta1/:name:exportData';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"outputConfig":{"bigqueryDestination":{"outputUri":""},"gcsDestination":{"outputUriPrefix":""}}}'
};
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 = @{ @"outputConfig": @{ @"bigqueryDestination": @{ @"outputUri": @"" }, @"gcsDestination": @{ @"outputUriPrefix": @"" } } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1beta1/:name:exportData"]
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}}/v1beta1/:name:exportData" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"outputConfig\": {\n \"bigqueryDestination\": {\n \"outputUri\": \"\"\n },\n \"gcsDestination\": {\n \"outputUriPrefix\": \"\"\n }\n }\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1beta1/:name:exportData",
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([
'outputConfig' => [
'bigqueryDestination' => [
'outputUri' => ''
],
'gcsDestination' => [
'outputUriPrefix' => ''
]
]
]),
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}}/v1beta1/:name:exportData', [
'body' => '{
"outputConfig": {
"bigqueryDestination": {
"outputUri": ""
},
"gcsDestination": {
"outputUriPrefix": ""
}
}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1beta1/:name:exportData');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'outputConfig' => [
'bigqueryDestination' => [
'outputUri' => ''
],
'gcsDestination' => [
'outputUriPrefix' => ''
]
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'outputConfig' => [
'bigqueryDestination' => [
'outputUri' => ''
],
'gcsDestination' => [
'outputUriPrefix' => ''
]
]
]));
$request->setRequestUrl('{{baseUrl}}/v1beta1/:name:exportData');
$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}}/v1beta1/:name:exportData' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"outputConfig": {
"bigqueryDestination": {
"outputUri": ""
},
"gcsDestination": {
"outputUriPrefix": ""
}
}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1beta1/:name:exportData' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"outputConfig": {
"bigqueryDestination": {
"outputUri": ""
},
"gcsDestination": {
"outputUriPrefix": ""
}
}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"outputConfig\": {\n \"bigqueryDestination\": {\n \"outputUri\": \"\"\n },\n \"gcsDestination\": {\n \"outputUriPrefix\": \"\"\n }\n }\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1beta1/:name:exportData", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1beta1/:name:exportData"
payload = { "outputConfig": {
"bigqueryDestination": { "outputUri": "" },
"gcsDestination": { "outputUriPrefix": "" }
} }
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1beta1/:name:exportData"
payload <- "{\n \"outputConfig\": {\n \"bigqueryDestination\": {\n \"outputUri\": \"\"\n },\n \"gcsDestination\": {\n \"outputUriPrefix\": \"\"\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}}/v1beta1/:name:exportData")
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 \"outputConfig\": {\n \"bigqueryDestination\": {\n \"outputUri\": \"\"\n },\n \"gcsDestination\": {\n \"outputUriPrefix\": \"\"\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/v1beta1/:name:exportData') do |req|
req.body = "{\n \"outputConfig\": {\n \"bigqueryDestination\": {\n \"outputUri\": \"\"\n },\n \"gcsDestination\": {\n \"outputUriPrefix\": \"\"\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}}/v1beta1/:name:exportData";
let payload = json!({"outputConfig": json!({
"bigqueryDestination": json!({"outputUri": ""}),
"gcsDestination": json!({"outputUriPrefix": ""})
})});
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}}/v1beta1/:name:exportData \
--header 'content-type: application/json' \
--data '{
"outputConfig": {
"bigqueryDestination": {
"outputUri": ""
},
"gcsDestination": {
"outputUriPrefix": ""
}
}
}'
echo '{
"outputConfig": {
"bigqueryDestination": {
"outputUri": ""
},
"gcsDestination": {
"outputUriPrefix": ""
}
}
}' | \
http POST {{baseUrl}}/v1beta1/:name:exportData \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "outputConfig": {\n "bigqueryDestination": {\n "outputUri": ""\n },\n "gcsDestination": {\n "outputUriPrefix": ""\n }\n }\n}' \
--output-document \
- {{baseUrl}}/v1beta1/:name:exportData
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["outputConfig": [
"bigqueryDestination": ["outputUri": ""],
"gcsDestination": ["outputUriPrefix": ""]
]] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1beta1/:name:exportData")! 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
automl.projects.locations.datasets.importData
{{baseUrl}}/v1beta1/:name:importData
QUERY PARAMS
name
BODY json
{
"inputConfig": {
"bigquerySource": {
"inputUri": ""
},
"gcsSource": {
"inputUris": []
},
"params": {}
}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1beta1/:name:importData");
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 \"inputConfig\": {\n \"bigquerySource\": {\n \"inputUri\": \"\"\n },\n \"gcsSource\": {\n \"inputUris\": []\n },\n \"params\": {}\n }\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1beta1/:name:importData" {:content-type :json
:form-params {:inputConfig {:bigquerySource {:inputUri ""}
:gcsSource {:inputUris []}
:params {}}}})
require "http/client"
url = "{{baseUrl}}/v1beta1/:name:importData"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"inputConfig\": {\n \"bigquerySource\": {\n \"inputUri\": \"\"\n },\n \"gcsSource\": {\n \"inputUris\": []\n },\n \"params\": {}\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}}/v1beta1/:name:importData"),
Content = new StringContent("{\n \"inputConfig\": {\n \"bigquerySource\": {\n \"inputUri\": \"\"\n },\n \"gcsSource\": {\n \"inputUris\": []\n },\n \"params\": {}\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}}/v1beta1/:name:importData");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"inputConfig\": {\n \"bigquerySource\": {\n \"inputUri\": \"\"\n },\n \"gcsSource\": {\n \"inputUris\": []\n },\n \"params\": {}\n }\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1beta1/:name:importData"
payload := strings.NewReader("{\n \"inputConfig\": {\n \"bigquerySource\": {\n \"inputUri\": \"\"\n },\n \"gcsSource\": {\n \"inputUris\": []\n },\n \"params\": {}\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/v1beta1/:name:importData HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 143
{
"inputConfig": {
"bigquerySource": {
"inputUri": ""
},
"gcsSource": {
"inputUris": []
},
"params": {}
}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1beta1/:name:importData")
.setHeader("content-type", "application/json")
.setBody("{\n \"inputConfig\": {\n \"bigquerySource\": {\n \"inputUri\": \"\"\n },\n \"gcsSource\": {\n \"inputUris\": []\n },\n \"params\": {}\n }\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1beta1/:name:importData"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"inputConfig\": {\n \"bigquerySource\": {\n \"inputUri\": \"\"\n },\n \"gcsSource\": {\n \"inputUris\": []\n },\n \"params\": {}\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 \"inputConfig\": {\n \"bigquerySource\": {\n \"inputUri\": \"\"\n },\n \"gcsSource\": {\n \"inputUris\": []\n },\n \"params\": {}\n }\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1beta1/:name:importData")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1beta1/:name:importData")
.header("content-type", "application/json")
.body("{\n \"inputConfig\": {\n \"bigquerySource\": {\n \"inputUri\": \"\"\n },\n \"gcsSource\": {\n \"inputUris\": []\n },\n \"params\": {}\n }\n}")
.asString();
const data = JSON.stringify({
inputConfig: {
bigquerySource: {
inputUri: ''
},
gcsSource: {
inputUris: []
},
params: {}
}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v1beta1/:name:importData');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1beta1/:name:importData',
headers: {'content-type': 'application/json'},
data: {
inputConfig: {bigquerySource: {inputUri: ''}, gcsSource: {inputUris: []}, params: {}}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1beta1/:name:importData';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"inputConfig":{"bigquerySource":{"inputUri":""},"gcsSource":{"inputUris":[]},"params":{}}}'
};
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}}/v1beta1/:name:importData',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "inputConfig": {\n "bigquerySource": {\n "inputUri": ""\n },\n "gcsSource": {\n "inputUris": []\n },\n "params": {}\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 \"inputConfig\": {\n \"bigquerySource\": {\n \"inputUri\": \"\"\n },\n \"gcsSource\": {\n \"inputUris\": []\n },\n \"params\": {}\n }\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1beta1/:name:importData")
.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/v1beta1/:name:importData',
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({
inputConfig: {bigquerySource: {inputUri: ''}, gcsSource: {inputUris: []}, params: {}}
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1beta1/:name:importData',
headers: {'content-type': 'application/json'},
body: {
inputConfig: {bigquerySource: {inputUri: ''}, gcsSource: {inputUris: []}, params: {}}
},
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}}/v1beta1/:name:importData');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
inputConfig: {
bigquerySource: {
inputUri: ''
},
gcsSource: {
inputUris: []
},
params: {}
}
});
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}}/v1beta1/:name:importData',
headers: {'content-type': 'application/json'},
data: {
inputConfig: {bigquerySource: {inputUri: ''}, gcsSource: {inputUris: []}, params: {}}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1beta1/:name:importData';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"inputConfig":{"bigquerySource":{"inputUri":""},"gcsSource":{"inputUris":[]},"params":{}}}'
};
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 = @{ @"inputConfig": @{ @"bigquerySource": @{ @"inputUri": @"" }, @"gcsSource": @{ @"inputUris": @[ ] }, @"params": @{ } } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1beta1/:name:importData"]
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}}/v1beta1/:name:importData" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"inputConfig\": {\n \"bigquerySource\": {\n \"inputUri\": \"\"\n },\n \"gcsSource\": {\n \"inputUris\": []\n },\n \"params\": {}\n }\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1beta1/:name:importData",
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([
'inputConfig' => [
'bigquerySource' => [
'inputUri' => ''
],
'gcsSource' => [
'inputUris' => [
]
],
'params' => [
]
]
]),
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}}/v1beta1/:name:importData', [
'body' => '{
"inputConfig": {
"bigquerySource": {
"inputUri": ""
},
"gcsSource": {
"inputUris": []
},
"params": {}
}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1beta1/:name:importData');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'inputConfig' => [
'bigquerySource' => [
'inputUri' => ''
],
'gcsSource' => [
'inputUris' => [
]
],
'params' => [
]
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'inputConfig' => [
'bigquerySource' => [
'inputUri' => ''
],
'gcsSource' => [
'inputUris' => [
]
],
'params' => [
]
]
]));
$request->setRequestUrl('{{baseUrl}}/v1beta1/:name:importData');
$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}}/v1beta1/:name:importData' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"inputConfig": {
"bigquerySource": {
"inputUri": ""
},
"gcsSource": {
"inputUris": []
},
"params": {}
}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1beta1/:name:importData' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"inputConfig": {
"bigquerySource": {
"inputUri": ""
},
"gcsSource": {
"inputUris": []
},
"params": {}
}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"inputConfig\": {\n \"bigquerySource\": {\n \"inputUri\": \"\"\n },\n \"gcsSource\": {\n \"inputUris\": []\n },\n \"params\": {}\n }\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1beta1/:name:importData", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1beta1/:name:importData"
payload = { "inputConfig": {
"bigquerySource": { "inputUri": "" },
"gcsSource": { "inputUris": [] },
"params": {}
} }
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1beta1/:name:importData"
payload <- "{\n \"inputConfig\": {\n \"bigquerySource\": {\n \"inputUri\": \"\"\n },\n \"gcsSource\": {\n \"inputUris\": []\n },\n \"params\": {}\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}}/v1beta1/:name:importData")
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 \"inputConfig\": {\n \"bigquerySource\": {\n \"inputUri\": \"\"\n },\n \"gcsSource\": {\n \"inputUris\": []\n },\n \"params\": {}\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/v1beta1/:name:importData') do |req|
req.body = "{\n \"inputConfig\": {\n \"bigquerySource\": {\n \"inputUri\": \"\"\n },\n \"gcsSource\": {\n \"inputUris\": []\n },\n \"params\": {}\n }\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1beta1/:name:importData";
let payload = json!({"inputConfig": json!({
"bigquerySource": json!({"inputUri": ""}),
"gcsSource": json!({"inputUris": ()}),
"params": 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}}/v1beta1/:name:importData \
--header 'content-type: application/json' \
--data '{
"inputConfig": {
"bigquerySource": {
"inputUri": ""
},
"gcsSource": {
"inputUris": []
},
"params": {}
}
}'
echo '{
"inputConfig": {
"bigquerySource": {
"inputUri": ""
},
"gcsSource": {
"inputUris": []
},
"params": {}
}
}' | \
http POST {{baseUrl}}/v1beta1/:name:importData \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "inputConfig": {\n "bigquerySource": {\n "inputUri": ""\n },\n "gcsSource": {\n "inputUris": []\n },\n "params": {}\n }\n}' \
--output-document \
- {{baseUrl}}/v1beta1/:name:importData
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["inputConfig": [
"bigquerySource": ["inputUri": ""],
"gcsSource": ["inputUris": []],
"params": []
]] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1beta1/:name:importData")! 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
automl.projects.locations.datasets.list
{{baseUrl}}/v1beta1/:parent/datasets
QUERY PARAMS
parent
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1beta1/:parent/datasets");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v1beta1/:parent/datasets")
require "http/client"
url = "{{baseUrl}}/v1beta1/:parent/datasets"
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}}/v1beta1/:parent/datasets"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1beta1/:parent/datasets");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1beta1/:parent/datasets"
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/v1beta1/:parent/datasets HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1beta1/:parent/datasets")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1beta1/:parent/datasets"))
.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}}/v1beta1/:parent/datasets")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1beta1/:parent/datasets")
.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}}/v1beta1/:parent/datasets');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/v1beta1/:parent/datasets'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1beta1/:parent/datasets';
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}}/v1beta1/:parent/datasets',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1beta1/:parent/datasets")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1beta1/:parent/datasets',
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}}/v1beta1/:parent/datasets'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v1beta1/:parent/datasets');
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}}/v1beta1/:parent/datasets'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1beta1/:parent/datasets';
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}}/v1beta1/:parent/datasets"]
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}}/v1beta1/:parent/datasets" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1beta1/:parent/datasets",
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}}/v1beta1/:parent/datasets');
echo $response->getBody();
setUrl('{{baseUrl}}/v1beta1/:parent/datasets');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1beta1/:parent/datasets');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1beta1/:parent/datasets' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1beta1/:parent/datasets' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v1beta1/:parent/datasets")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1beta1/:parent/datasets"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1beta1/:parent/datasets"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1beta1/:parent/datasets")
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/v1beta1/:parent/datasets') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1beta1/:parent/datasets";
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}}/v1beta1/:parent/datasets
http GET {{baseUrl}}/v1beta1/:parent/datasets
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v1beta1/:parent/datasets
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1beta1/:parent/datasets")! 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
automl.projects.locations.datasets.tableSpecs.columnSpecs.list
{{baseUrl}}/v1beta1/:parent/columnSpecs
QUERY PARAMS
parent
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1beta1/:parent/columnSpecs");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v1beta1/:parent/columnSpecs")
require "http/client"
url = "{{baseUrl}}/v1beta1/:parent/columnSpecs"
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}}/v1beta1/:parent/columnSpecs"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1beta1/:parent/columnSpecs");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1beta1/:parent/columnSpecs"
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/v1beta1/:parent/columnSpecs HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1beta1/:parent/columnSpecs")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1beta1/:parent/columnSpecs"))
.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}}/v1beta1/:parent/columnSpecs")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1beta1/:parent/columnSpecs")
.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}}/v1beta1/:parent/columnSpecs');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/v1beta1/:parent/columnSpecs'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1beta1/:parent/columnSpecs';
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}}/v1beta1/:parent/columnSpecs',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1beta1/:parent/columnSpecs")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1beta1/:parent/columnSpecs',
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}}/v1beta1/:parent/columnSpecs'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v1beta1/:parent/columnSpecs');
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}}/v1beta1/:parent/columnSpecs'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1beta1/:parent/columnSpecs';
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}}/v1beta1/:parent/columnSpecs"]
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}}/v1beta1/:parent/columnSpecs" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1beta1/:parent/columnSpecs",
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}}/v1beta1/:parent/columnSpecs');
echo $response->getBody();
setUrl('{{baseUrl}}/v1beta1/:parent/columnSpecs');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1beta1/:parent/columnSpecs');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1beta1/:parent/columnSpecs' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1beta1/:parent/columnSpecs' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v1beta1/:parent/columnSpecs")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1beta1/:parent/columnSpecs"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1beta1/:parent/columnSpecs"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1beta1/:parent/columnSpecs")
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/v1beta1/:parent/columnSpecs') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1beta1/:parent/columnSpecs";
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}}/v1beta1/:parent/columnSpecs
http GET {{baseUrl}}/v1beta1/:parent/columnSpecs
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v1beta1/:parent/columnSpecs
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1beta1/:parent/columnSpecs")! 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
automl.projects.locations.datasets.tableSpecs.columnSpecs.patch
{{baseUrl}}/v1beta1/:name
QUERY PARAMS
name
BODY json
{
"dataStats": {
"arrayStats": {
"memberStats": ""
},
"categoryStats": {
"topCategoryStats": [
{
"count": "",
"value": ""
}
]
},
"distinctValueCount": "",
"float64Stats": {
"histogramBuckets": [
{
"count": "",
"max": "",
"min": ""
}
],
"mean": "",
"quantiles": [],
"standardDeviation": ""
},
"nullValueCount": "",
"stringStats": {
"topUnigramStats": [
{
"count": "",
"value": ""
}
]
},
"structStats": {
"fieldStats": {}
},
"timestampStats": {
"granularStats": {}
},
"validValueCount": ""
},
"dataType": {
"listElementType": "",
"nullable": false,
"structType": {
"fields": {}
},
"timeFormat": "",
"typeCode": ""
},
"displayName": "",
"etag": "",
"name": "",
"topCorrelatedColumns": [
{
"columnSpecId": "",
"correlationStats": {
"cramersV": ""
}
}
]
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1beta1/: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 \"dataStats\": {\n \"arrayStats\": {\n \"memberStats\": \"\"\n },\n \"categoryStats\": {\n \"topCategoryStats\": [\n {\n \"count\": \"\",\n \"value\": \"\"\n }\n ]\n },\n \"distinctValueCount\": \"\",\n \"float64Stats\": {\n \"histogramBuckets\": [\n {\n \"count\": \"\",\n \"max\": \"\",\n \"min\": \"\"\n }\n ],\n \"mean\": \"\",\n \"quantiles\": [],\n \"standardDeviation\": \"\"\n },\n \"nullValueCount\": \"\",\n \"stringStats\": {\n \"topUnigramStats\": [\n {\n \"count\": \"\",\n \"value\": \"\"\n }\n ]\n },\n \"structStats\": {\n \"fieldStats\": {}\n },\n \"timestampStats\": {\n \"granularStats\": {}\n },\n \"validValueCount\": \"\"\n },\n \"dataType\": {\n \"listElementType\": \"\",\n \"nullable\": false,\n \"structType\": {\n \"fields\": {}\n },\n \"timeFormat\": \"\",\n \"typeCode\": \"\"\n },\n \"displayName\": \"\",\n \"etag\": \"\",\n \"name\": \"\",\n \"topCorrelatedColumns\": [\n {\n \"columnSpecId\": \"\",\n \"correlationStats\": {\n \"cramersV\": \"\"\n }\n }\n ]\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/patch "{{baseUrl}}/v1beta1/:name" {:content-type :json
:form-params {:dataStats {:arrayStats {:memberStats ""}
:categoryStats {:topCategoryStats [{:count ""
:value ""}]}
:distinctValueCount ""
:float64Stats {:histogramBuckets [{:count ""
:max ""
:min ""}]
:mean ""
:quantiles []
:standardDeviation ""}
:nullValueCount ""
:stringStats {:topUnigramStats [{:count ""
:value ""}]}
:structStats {:fieldStats {}}
:timestampStats {:granularStats {}}
:validValueCount ""}
:dataType {:listElementType ""
:nullable false
:structType {:fields {}}
:timeFormat ""
:typeCode ""}
:displayName ""
:etag ""
:name ""
:topCorrelatedColumns [{:columnSpecId ""
:correlationStats {:cramersV ""}}]}})
require "http/client"
url = "{{baseUrl}}/v1beta1/:name"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"dataStats\": {\n \"arrayStats\": {\n \"memberStats\": \"\"\n },\n \"categoryStats\": {\n \"topCategoryStats\": [\n {\n \"count\": \"\",\n \"value\": \"\"\n }\n ]\n },\n \"distinctValueCount\": \"\",\n \"float64Stats\": {\n \"histogramBuckets\": [\n {\n \"count\": \"\",\n \"max\": \"\",\n \"min\": \"\"\n }\n ],\n \"mean\": \"\",\n \"quantiles\": [],\n \"standardDeviation\": \"\"\n },\n \"nullValueCount\": \"\",\n \"stringStats\": {\n \"topUnigramStats\": [\n {\n \"count\": \"\",\n \"value\": \"\"\n }\n ]\n },\n \"structStats\": {\n \"fieldStats\": {}\n },\n \"timestampStats\": {\n \"granularStats\": {}\n },\n \"validValueCount\": \"\"\n },\n \"dataType\": {\n \"listElementType\": \"\",\n \"nullable\": false,\n \"structType\": {\n \"fields\": {}\n },\n \"timeFormat\": \"\",\n \"typeCode\": \"\"\n },\n \"displayName\": \"\",\n \"etag\": \"\",\n \"name\": \"\",\n \"topCorrelatedColumns\": [\n {\n \"columnSpecId\": \"\",\n \"correlationStats\": {\n \"cramersV\": \"\"\n }\n }\n ]\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}}/v1beta1/:name"),
Content = new StringContent("{\n \"dataStats\": {\n \"arrayStats\": {\n \"memberStats\": \"\"\n },\n \"categoryStats\": {\n \"topCategoryStats\": [\n {\n \"count\": \"\",\n \"value\": \"\"\n }\n ]\n },\n \"distinctValueCount\": \"\",\n \"float64Stats\": {\n \"histogramBuckets\": [\n {\n \"count\": \"\",\n \"max\": \"\",\n \"min\": \"\"\n }\n ],\n \"mean\": \"\",\n \"quantiles\": [],\n \"standardDeviation\": \"\"\n },\n \"nullValueCount\": \"\",\n \"stringStats\": {\n \"topUnigramStats\": [\n {\n \"count\": \"\",\n \"value\": \"\"\n }\n ]\n },\n \"structStats\": {\n \"fieldStats\": {}\n },\n \"timestampStats\": {\n \"granularStats\": {}\n },\n \"validValueCount\": \"\"\n },\n \"dataType\": {\n \"listElementType\": \"\",\n \"nullable\": false,\n \"structType\": {\n \"fields\": {}\n },\n \"timeFormat\": \"\",\n \"typeCode\": \"\"\n },\n \"displayName\": \"\",\n \"etag\": \"\",\n \"name\": \"\",\n \"topCorrelatedColumns\": [\n {\n \"columnSpecId\": \"\",\n \"correlationStats\": {\n \"cramersV\": \"\"\n }\n }\n ]\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1beta1/:name");
var request = new RestRequest("", Method.Patch);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"dataStats\": {\n \"arrayStats\": {\n \"memberStats\": \"\"\n },\n \"categoryStats\": {\n \"topCategoryStats\": [\n {\n \"count\": \"\",\n \"value\": \"\"\n }\n ]\n },\n \"distinctValueCount\": \"\",\n \"float64Stats\": {\n \"histogramBuckets\": [\n {\n \"count\": \"\",\n \"max\": \"\",\n \"min\": \"\"\n }\n ],\n \"mean\": \"\",\n \"quantiles\": [],\n \"standardDeviation\": \"\"\n },\n \"nullValueCount\": \"\",\n \"stringStats\": {\n \"topUnigramStats\": [\n {\n \"count\": \"\",\n \"value\": \"\"\n }\n ]\n },\n \"structStats\": {\n \"fieldStats\": {}\n },\n \"timestampStats\": {\n \"granularStats\": {}\n },\n \"validValueCount\": \"\"\n },\n \"dataType\": {\n \"listElementType\": \"\",\n \"nullable\": false,\n \"structType\": {\n \"fields\": {}\n },\n \"timeFormat\": \"\",\n \"typeCode\": \"\"\n },\n \"displayName\": \"\",\n \"etag\": \"\",\n \"name\": \"\",\n \"topCorrelatedColumns\": [\n {\n \"columnSpecId\": \"\",\n \"correlationStats\": {\n \"cramersV\": \"\"\n }\n }\n ]\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1beta1/:name"
payload := strings.NewReader("{\n \"dataStats\": {\n \"arrayStats\": {\n \"memberStats\": \"\"\n },\n \"categoryStats\": {\n \"topCategoryStats\": [\n {\n \"count\": \"\",\n \"value\": \"\"\n }\n ]\n },\n \"distinctValueCount\": \"\",\n \"float64Stats\": {\n \"histogramBuckets\": [\n {\n \"count\": \"\",\n \"max\": \"\",\n \"min\": \"\"\n }\n ],\n \"mean\": \"\",\n \"quantiles\": [],\n \"standardDeviation\": \"\"\n },\n \"nullValueCount\": \"\",\n \"stringStats\": {\n \"topUnigramStats\": [\n {\n \"count\": \"\",\n \"value\": \"\"\n }\n ]\n },\n \"structStats\": {\n \"fieldStats\": {}\n },\n \"timestampStats\": {\n \"granularStats\": {}\n },\n \"validValueCount\": \"\"\n },\n \"dataType\": {\n \"listElementType\": \"\",\n \"nullable\": false,\n \"structType\": {\n \"fields\": {}\n },\n \"timeFormat\": \"\",\n \"typeCode\": \"\"\n },\n \"displayName\": \"\",\n \"etag\": \"\",\n \"name\": \"\",\n \"topCorrelatedColumns\": [\n {\n \"columnSpecId\": \"\",\n \"correlationStats\": {\n \"cramersV\": \"\"\n }\n }\n ]\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/v1beta1/:name HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 1082
{
"dataStats": {
"arrayStats": {
"memberStats": ""
},
"categoryStats": {
"topCategoryStats": [
{
"count": "",
"value": ""
}
]
},
"distinctValueCount": "",
"float64Stats": {
"histogramBuckets": [
{
"count": "",
"max": "",
"min": ""
}
],
"mean": "",
"quantiles": [],
"standardDeviation": ""
},
"nullValueCount": "",
"stringStats": {
"topUnigramStats": [
{
"count": "",
"value": ""
}
]
},
"structStats": {
"fieldStats": {}
},
"timestampStats": {
"granularStats": {}
},
"validValueCount": ""
},
"dataType": {
"listElementType": "",
"nullable": false,
"structType": {
"fields": {}
},
"timeFormat": "",
"typeCode": ""
},
"displayName": "",
"etag": "",
"name": "",
"topCorrelatedColumns": [
{
"columnSpecId": "",
"correlationStats": {
"cramersV": ""
}
}
]
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/v1beta1/:name")
.setHeader("content-type", "application/json")
.setBody("{\n \"dataStats\": {\n \"arrayStats\": {\n \"memberStats\": \"\"\n },\n \"categoryStats\": {\n \"topCategoryStats\": [\n {\n \"count\": \"\",\n \"value\": \"\"\n }\n ]\n },\n \"distinctValueCount\": \"\",\n \"float64Stats\": {\n \"histogramBuckets\": [\n {\n \"count\": \"\",\n \"max\": \"\",\n \"min\": \"\"\n }\n ],\n \"mean\": \"\",\n \"quantiles\": [],\n \"standardDeviation\": \"\"\n },\n \"nullValueCount\": \"\",\n \"stringStats\": {\n \"topUnigramStats\": [\n {\n \"count\": \"\",\n \"value\": \"\"\n }\n ]\n },\n \"structStats\": {\n \"fieldStats\": {}\n },\n \"timestampStats\": {\n \"granularStats\": {}\n },\n \"validValueCount\": \"\"\n },\n \"dataType\": {\n \"listElementType\": \"\",\n \"nullable\": false,\n \"structType\": {\n \"fields\": {}\n },\n \"timeFormat\": \"\",\n \"typeCode\": \"\"\n },\n \"displayName\": \"\",\n \"etag\": \"\",\n \"name\": \"\",\n \"topCorrelatedColumns\": [\n {\n \"columnSpecId\": \"\",\n \"correlationStats\": {\n \"cramersV\": \"\"\n }\n }\n ]\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1beta1/:name"))
.header("content-type", "application/json")
.method("PATCH", HttpRequest.BodyPublishers.ofString("{\n \"dataStats\": {\n \"arrayStats\": {\n \"memberStats\": \"\"\n },\n \"categoryStats\": {\n \"topCategoryStats\": [\n {\n \"count\": \"\",\n \"value\": \"\"\n }\n ]\n },\n \"distinctValueCount\": \"\",\n \"float64Stats\": {\n \"histogramBuckets\": [\n {\n \"count\": \"\",\n \"max\": \"\",\n \"min\": \"\"\n }\n ],\n \"mean\": \"\",\n \"quantiles\": [],\n \"standardDeviation\": \"\"\n },\n \"nullValueCount\": \"\",\n \"stringStats\": {\n \"topUnigramStats\": [\n {\n \"count\": \"\",\n \"value\": \"\"\n }\n ]\n },\n \"structStats\": {\n \"fieldStats\": {}\n },\n \"timestampStats\": {\n \"granularStats\": {}\n },\n \"validValueCount\": \"\"\n },\n \"dataType\": {\n \"listElementType\": \"\",\n \"nullable\": false,\n \"structType\": {\n \"fields\": {}\n },\n \"timeFormat\": \"\",\n \"typeCode\": \"\"\n },\n \"displayName\": \"\",\n \"etag\": \"\",\n \"name\": \"\",\n \"topCorrelatedColumns\": [\n {\n \"columnSpecId\": \"\",\n \"correlationStats\": {\n \"cramersV\": \"\"\n }\n }\n ]\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"dataStats\": {\n \"arrayStats\": {\n \"memberStats\": \"\"\n },\n \"categoryStats\": {\n \"topCategoryStats\": [\n {\n \"count\": \"\",\n \"value\": \"\"\n }\n ]\n },\n \"distinctValueCount\": \"\",\n \"float64Stats\": {\n \"histogramBuckets\": [\n {\n \"count\": \"\",\n \"max\": \"\",\n \"min\": \"\"\n }\n ],\n \"mean\": \"\",\n \"quantiles\": [],\n \"standardDeviation\": \"\"\n },\n \"nullValueCount\": \"\",\n \"stringStats\": {\n \"topUnigramStats\": [\n {\n \"count\": \"\",\n \"value\": \"\"\n }\n ]\n },\n \"structStats\": {\n \"fieldStats\": {}\n },\n \"timestampStats\": {\n \"granularStats\": {}\n },\n \"validValueCount\": \"\"\n },\n \"dataType\": {\n \"listElementType\": \"\",\n \"nullable\": false,\n \"structType\": {\n \"fields\": {}\n },\n \"timeFormat\": \"\",\n \"typeCode\": \"\"\n },\n \"displayName\": \"\",\n \"etag\": \"\",\n \"name\": \"\",\n \"topCorrelatedColumns\": [\n {\n \"columnSpecId\": \"\",\n \"correlationStats\": {\n \"cramersV\": \"\"\n }\n }\n ]\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1beta1/:name")
.patch(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/v1beta1/:name")
.header("content-type", "application/json")
.body("{\n \"dataStats\": {\n \"arrayStats\": {\n \"memberStats\": \"\"\n },\n \"categoryStats\": {\n \"topCategoryStats\": [\n {\n \"count\": \"\",\n \"value\": \"\"\n }\n ]\n },\n \"distinctValueCount\": \"\",\n \"float64Stats\": {\n \"histogramBuckets\": [\n {\n \"count\": \"\",\n \"max\": \"\",\n \"min\": \"\"\n }\n ],\n \"mean\": \"\",\n \"quantiles\": [],\n \"standardDeviation\": \"\"\n },\n \"nullValueCount\": \"\",\n \"stringStats\": {\n \"topUnigramStats\": [\n {\n \"count\": \"\",\n \"value\": \"\"\n }\n ]\n },\n \"structStats\": {\n \"fieldStats\": {}\n },\n \"timestampStats\": {\n \"granularStats\": {}\n },\n \"validValueCount\": \"\"\n },\n \"dataType\": {\n \"listElementType\": \"\",\n \"nullable\": false,\n \"structType\": {\n \"fields\": {}\n },\n \"timeFormat\": \"\",\n \"typeCode\": \"\"\n },\n \"displayName\": \"\",\n \"etag\": \"\",\n \"name\": \"\",\n \"topCorrelatedColumns\": [\n {\n \"columnSpecId\": \"\",\n \"correlationStats\": {\n \"cramersV\": \"\"\n }\n }\n ]\n}")
.asString();
const data = JSON.stringify({
dataStats: {
arrayStats: {
memberStats: ''
},
categoryStats: {
topCategoryStats: [
{
count: '',
value: ''
}
]
},
distinctValueCount: '',
float64Stats: {
histogramBuckets: [
{
count: '',
max: '',
min: ''
}
],
mean: '',
quantiles: [],
standardDeviation: ''
},
nullValueCount: '',
stringStats: {
topUnigramStats: [
{
count: '',
value: ''
}
]
},
structStats: {
fieldStats: {}
},
timestampStats: {
granularStats: {}
},
validValueCount: ''
},
dataType: {
listElementType: '',
nullable: false,
structType: {
fields: {}
},
timeFormat: '',
typeCode: ''
},
displayName: '',
etag: '',
name: '',
topCorrelatedColumns: [
{
columnSpecId: '',
correlationStats: {
cramersV: ''
}
}
]
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PATCH', '{{baseUrl}}/v1beta1/:name');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PATCH',
url: '{{baseUrl}}/v1beta1/:name',
headers: {'content-type': 'application/json'},
data: {
dataStats: {
arrayStats: {memberStats: ''},
categoryStats: {topCategoryStats: [{count: '', value: ''}]},
distinctValueCount: '',
float64Stats: {
histogramBuckets: [{count: '', max: '', min: ''}],
mean: '',
quantiles: [],
standardDeviation: ''
},
nullValueCount: '',
stringStats: {topUnigramStats: [{count: '', value: ''}]},
structStats: {fieldStats: {}},
timestampStats: {granularStats: {}},
validValueCount: ''
},
dataType: {
listElementType: '',
nullable: false,
structType: {fields: {}},
timeFormat: '',
typeCode: ''
},
displayName: '',
etag: '',
name: '',
topCorrelatedColumns: [{columnSpecId: '', correlationStats: {cramersV: ''}}]
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1beta1/:name';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"dataStats":{"arrayStats":{"memberStats":""},"categoryStats":{"topCategoryStats":[{"count":"","value":""}]},"distinctValueCount":"","float64Stats":{"histogramBuckets":[{"count":"","max":"","min":""}],"mean":"","quantiles":[],"standardDeviation":""},"nullValueCount":"","stringStats":{"topUnigramStats":[{"count":"","value":""}]},"structStats":{"fieldStats":{}},"timestampStats":{"granularStats":{}},"validValueCount":""},"dataType":{"listElementType":"","nullable":false,"structType":{"fields":{}},"timeFormat":"","typeCode":""},"displayName":"","etag":"","name":"","topCorrelatedColumns":[{"columnSpecId":"","correlationStats":{"cramersV":""}}]}'
};
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}}/v1beta1/:name',
method: 'PATCH',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "dataStats": {\n "arrayStats": {\n "memberStats": ""\n },\n "categoryStats": {\n "topCategoryStats": [\n {\n "count": "",\n "value": ""\n }\n ]\n },\n "distinctValueCount": "",\n "float64Stats": {\n "histogramBuckets": [\n {\n "count": "",\n "max": "",\n "min": ""\n }\n ],\n "mean": "",\n "quantiles": [],\n "standardDeviation": ""\n },\n "nullValueCount": "",\n "stringStats": {\n "topUnigramStats": [\n {\n "count": "",\n "value": ""\n }\n ]\n },\n "structStats": {\n "fieldStats": {}\n },\n "timestampStats": {\n "granularStats": {}\n },\n "validValueCount": ""\n },\n "dataType": {\n "listElementType": "",\n "nullable": false,\n "structType": {\n "fields": {}\n },\n "timeFormat": "",\n "typeCode": ""\n },\n "displayName": "",\n "etag": "",\n "name": "",\n "topCorrelatedColumns": [\n {\n "columnSpecId": "",\n "correlationStats": {\n "cramersV": ""\n }\n }\n ]\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"dataStats\": {\n \"arrayStats\": {\n \"memberStats\": \"\"\n },\n \"categoryStats\": {\n \"topCategoryStats\": [\n {\n \"count\": \"\",\n \"value\": \"\"\n }\n ]\n },\n \"distinctValueCount\": \"\",\n \"float64Stats\": {\n \"histogramBuckets\": [\n {\n \"count\": \"\",\n \"max\": \"\",\n \"min\": \"\"\n }\n ],\n \"mean\": \"\",\n \"quantiles\": [],\n \"standardDeviation\": \"\"\n },\n \"nullValueCount\": \"\",\n \"stringStats\": {\n \"topUnigramStats\": [\n {\n \"count\": \"\",\n \"value\": \"\"\n }\n ]\n },\n \"structStats\": {\n \"fieldStats\": {}\n },\n \"timestampStats\": {\n \"granularStats\": {}\n },\n \"validValueCount\": \"\"\n },\n \"dataType\": {\n \"listElementType\": \"\",\n \"nullable\": false,\n \"structType\": {\n \"fields\": {}\n },\n \"timeFormat\": \"\",\n \"typeCode\": \"\"\n },\n \"displayName\": \"\",\n \"etag\": \"\",\n \"name\": \"\",\n \"topCorrelatedColumns\": [\n {\n \"columnSpecId\": \"\",\n \"correlationStats\": {\n \"cramersV\": \"\"\n }\n }\n ]\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1beta1/: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/v1beta1/: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({
dataStats: {
arrayStats: {memberStats: ''},
categoryStats: {topCategoryStats: [{count: '', value: ''}]},
distinctValueCount: '',
float64Stats: {
histogramBuckets: [{count: '', max: '', min: ''}],
mean: '',
quantiles: [],
standardDeviation: ''
},
nullValueCount: '',
stringStats: {topUnigramStats: [{count: '', value: ''}]},
structStats: {fieldStats: {}},
timestampStats: {granularStats: {}},
validValueCount: ''
},
dataType: {
listElementType: '',
nullable: false,
structType: {fields: {}},
timeFormat: '',
typeCode: ''
},
displayName: '',
etag: '',
name: '',
topCorrelatedColumns: [{columnSpecId: '', correlationStats: {cramersV: ''}}]
}));
req.end();
const request = require('request');
const options = {
method: 'PATCH',
url: '{{baseUrl}}/v1beta1/:name',
headers: {'content-type': 'application/json'},
body: {
dataStats: {
arrayStats: {memberStats: ''},
categoryStats: {topCategoryStats: [{count: '', value: ''}]},
distinctValueCount: '',
float64Stats: {
histogramBuckets: [{count: '', max: '', min: ''}],
mean: '',
quantiles: [],
standardDeviation: ''
},
nullValueCount: '',
stringStats: {topUnigramStats: [{count: '', value: ''}]},
structStats: {fieldStats: {}},
timestampStats: {granularStats: {}},
validValueCount: ''
},
dataType: {
listElementType: '',
nullable: false,
structType: {fields: {}},
timeFormat: '',
typeCode: ''
},
displayName: '',
etag: '',
name: '',
topCorrelatedColumns: [{columnSpecId: '', correlationStats: {cramersV: ''}}]
},
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}}/v1beta1/:name');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
dataStats: {
arrayStats: {
memberStats: ''
},
categoryStats: {
topCategoryStats: [
{
count: '',
value: ''
}
]
},
distinctValueCount: '',
float64Stats: {
histogramBuckets: [
{
count: '',
max: '',
min: ''
}
],
mean: '',
quantiles: [],
standardDeviation: ''
},
nullValueCount: '',
stringStats: {
topUnigramStats: [
{
count: '',
value: ''
}
]
},
structStats: {
fieldStats: {}
},
timestampStats: {
granularStats: {}
},
validValueCount: ''
},
dataType: {
listElementType: '',
nullable: false,
structType: {
fields: {}
},
timeFormat: '',
typeCode: ''
},
displayName: '',
etag: '',
name: '',
topCorrelatedColumns: [
{
columnSpecId: '',
correlationStats: {
cramersV: ''
}
}
]
});
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}}/v1beta1/:name',
headers: {'content-type': 'application/json'},
data: {
dataStats: {
arrayStats: {memberStats: ''},
categoryStats: {topCategoryStats: [{count: '', value: ''}]},
distinctValueCount: '',
float64Stats: {
histogramBuckets: [{count: '', max: '', min: ''}],
mean: '',
quantiles: [],
standardDeviation: ''
},
nullValueCount: '',
stringStats: {topUnigramStats: [{count: '', value: ''}]},
structStats: {fieldStats: {}},
timestampStats: {granularStats: {}},
validValueCount: ''
},
dataType: {
listElementType: '',
nullable: false,
structType: {fields: {}},
timeFormat: '',
typeCode: ''
},
displayName: '',
etag: '',
name: '',
topCorrelatedColumns: [{columnSpecId: '', correlationStats: {cramersV: ''}}]
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1beta1/:name';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"dataStats":{"arrayStats":{"memberStats":""},"categoryStats":{"topCategoryStats":[{"count":"","value":""}]},"distinctValueCount":"","float64Stats":{"histogramBuckets":[{"count":"","max":"","min":""}],"mean":"","quantiles":[],"standardDeviation":""},"nullValueCount":"","stringStats":{"topUnigramStats":[{"count":"","value":""}]},"structStats":{"fieldStats":{}},"timestampStats":{"granularStats":{}},"validValueCount":""},"dataType":{"listElementType":"","nullable":false,"structType":{"fields":{}},"timeFormat":"","typeCode":""},"displayName":"","etag":"","name":"","topCorrelatedColumns":[{"columnSpecId":"","correlationStats":{"cramersV":""}}]}'
};
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 = @{ @"dataStats": @{ @"arrayStats": @{ @"memberStats": @"" }, @"categoryStats": @{ @"topCategoryStats": @[ @{ @"count": @"", @"value": @"" } ] }, @"distinctValueCount": @"", @"float64Stats": @{ @"histogramBuckets": @[ @{ @"count": @"", @"max": @"", @"min": @"" } ], @"mean": @"", @"quantiles": @[ ], @"standardDeviation": @"" }, @"nullValueCount": @"", @"stringStats": @{ @"topUnigramStats": @[ @{ @"count": @"", @"value": @"" } ] }, @"structStats": @{ @"fieldStats": @{ } }, @"timestampStats": @{ @"granularStats": @{ } }, @"validValueCount": @"" },
@"dataType": @{ @"listElementType": @"", @"nullable": @NO, @"structType": @{ @"fields": @{ } }, @"timeFormat": @"", @"typeCode": @"" },
@"displayName": @"",
@"etag": @"",
@"name": @"",
@"topCorrelatedColumns": @[ @{ @"columnSpecId": @"", @"correlationStats": @{ @"cramersV": @"" } } ] };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1beta1/: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}}/v1beta1/:name" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"dataStats\": {\n \"arrayStats\": {\n \"memberStats\": \"\"\n },\n \"categoryStats\": {\n \"topCategoryStats\": [\n {\n \"count\": \"\",\n \"value\": \"\"\n }\n ]\n },\n \"distinctValueCount\": \"\",\n \"float64Stats\": {\n \"histogramBuckets\": [\n {\n \"count\": \"\",\n \"max\": \"\",\n \"min\": \"\"\n }\n ],\n \"mean\": \"\",\n \"quantiles\": [],\n \"standardDeviation\": \"\"\n },\n \"nullValueCount\": \"\",\n \"stringStats\": {\n \"topUnigramStats\": [\n {\n \"count\": \"\",\n \"value\": \"\"\n }\n ]\n },\n \"structStats\": {\n \"fieldStats\": {}\n },\n \"timestampStats\": {\n \"granularStats\": {}\n },\n \"validValueCount\": \"\"\n },\n \"dataType\": {\n \"listElementType\": \"\",\n \"nullable\": false,\n \"structType\": {\n \"fields\": {}\n },\n \"timeFormat\": \"\",\n \"typeCode\": \"\"\n },\n \"displayName\": \"\",\n \"etag\": \"\",\n \"name\": \"\",\n \"topCorrelatedColumns\": [\n {\n \"columnSpecId\": \"\",\n \"correlationStats\": {\n \"cramersV\": \"\"\n }\n }\n ]\n}" in
Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1beta1/: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([
'dataStats' => [
'arrayStats' => [
'memberStats' => ''
],
'categoryStats' => [
'topCategoryStats' => [
[
'count' => '',
'value' => ''
]
]
],
'distinctValueCount' => '',
'float64Stats' => [
'histogramBuckets' => [
[
'count' => '',
'max' => '',
'min' => ''
]
],
'mean' => '',
'quantiles' => [
],
'standardDeviation' => ''
],
'nullValueCount' => '',
'stringStats' => [
'topUnigramStats' => [
[
'count' => '',
'value' => ''
]
]
],
'structStats' => [
'fieldStats' => [
]
],
'timestampStats' => [
'granularStats' => [
]
],
'validValueCount' => ''
],
'dataType' => [
'listElementType' => '',
'nullable' => null,
'structType' => [
'fields' => [
]
],
'timeFormat' => '',
'typeCode' => ''
],
'displayName' => '',
'etag' => '',
'name' => '',
'topCorrelatedColumns' => [
[
'columnSpecId' => '',
'correlationStats' => [
'cramersV' => ''
]
]
]
]),
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}}/v1beta1/:name', [
'body' => '{
"dataStats": {
"arrayStats": {
"memberStats": ""
},
"categoryStats": {
"topCategoryStats": [
{
"count": "",
"value": ""
}
]
},
"distinctValueCount": "",
"float64Stats": {
"histogramBuckets": [
{
"count": "",
"max": "",
"min": ""
}
],
"mean": "",
"quantiles": [],
"standardDeviation": ""
},
"nullValueCount": "",
"stringStats": {
"topUnigramStats": [
{
"count": "",
"value": ""
}
]
},
"structStats": {
"fieldStats": {}
},
"timestampStats": {
"granularStats": {}
},
"validValueCount": ""
},
"dataType": {
"listElementType": "",
"nullable": false,
"structType": {
"fields": {}
},
"timeFormat": "",
"typeCode": ""
},
"displayName": "",
"etag": "",
"name": "",
"topCorrelatedColumns": [
{
"columnSpecId": "",
"correlationStats": {
"cramersV": ""
}
}
]
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1beta1/:name');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'dataStats' => [
'arrayStats' => [
'memberStats' => ''
],
'categoryStats' => [
'topCategoryStats' => [
[
'count' => '',
'value' => ''
]
]
],
'distinctValueCount' => '',
'float64Stats' => [
'histogramBuckets' => [
[
'count' => '',
'max' => '',
'min' => ''
]
],
'mean' => '',
'quantiles' => [
],
'standardDeviation' => ''
],
'nullValueCount' => '',
'stringStats' => [
'topUnigramStats' => [
[
'count' => '',
'value' => ''
]
]
],
'structStats' => [
'fieldStats' => [
]
],
'timestampStats' => [
'granularStats' => [
]
],
'validValueCount' => ''
],
'dataType' => [
'listElementType' => '',
'nullable' => null,
'structType' => [
'fields' => [
]
],
'timeFormat' => '',
'typeCode' => ''
],
'displayName' => '',
'etag' => '',
'name' => '',
'topCorrelatedColumns' => [
[
'columnSpecId' => '',
'correlationStats' => [
'cramersV' => ''
]
]
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'dataStats' => [
'arrayStats' => [
'memberStats' => ''
],
'categoryStats' => [
'topCategoryStats' => [
[
'count' => '',
'value' => ''
]
]
],
'distinctValueCount' => '',
'float64Stats' => [
'histogramBuckets' => [
[
'count' => '',
'max' => '',
'min' => ''
]
],
'mean' => '',
'quantiles' => [
],
'standardDeviation' => ''
],
'nullValueCount' => '',
'stringStats' => [
'topUnigramStats' => [
[
'count' => '',
'value' => ''
]
]
],
'structStats' => [
'fieldStats' => [
]
],
'timestampStats' => [
'granularStats' => [
]
],
'validValueCount' => ''
],
'dataType' => [
'listElementType' => '',
'nullable' => null,
'structType' => [
'fields' => [
]
],
'timeFormat' => '',
'typeCode' => ''
],
'displayName' => '',
'etag' => '',
'name' => '',
'topCorrelatedColumns' => [
[
'columnSpecId' => '',
'correlationStats' => [
'cramersV' => ''
]
]
]
]));
$request->setRequestUrl('{{baseUrl}}/v1beta1/: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}}/v1beta1/:name' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"dataStats": {
"arrayStats": {
"memberStats": ""
},
"categoryStats": {
"topCategoryStats": [
{
"count": "",
"value": ""
}
]
},
"distinctValueCount": "",
"float64Stats": {
"histogramBuckets": [
{
"count": "",
"max": "",
"min": ""
}
],
"mean": "",
"quantiles": [],
"standardDeviation": ""
},
"nullValueCount": "",
"stringStats": {
"topUnigramStats": [
{
"count": "",
"value": ""
}
]
},
"structStats": {
"fieldStats": {}
},
"timestampStats": {
"granularStats": {}
},
"validValueCount": ""
},
"dataType": {
"listElementType": "",
"nullable": false,
"structType": {
"fields": {}
},
"timeFormat": "",
"typeCode": ""
},
"displayName": "",
"etag": "",
"name": "",
"topCorrelatedColumns": [
{
"columnSpecId": "",
"correlationStats": {
"cramersV": ""
}
}
]
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1beta1/:name' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"dataStats": {
"arrayStats": {
"memberStats": ""
},
"categoryStats": {
"topCategoryStats": [
{
"count": "",
"value": ""
}
]
},
"distinctValueCount": "",
"float64Stats": {
"histogramBuckets": [
{
"count": "",
"max": "",
"min": ""
}
],
"mean": "",
"quantiles": [],
"standardDeviation": ""
},
"nullValueCount": "",
"stringStats": {
"topUnigramStats": [
{
"count": "",
"value": ""
}
]
},
"structStats": {
"fieldStats": {}
},
"timestampStats": {
"granularStats": {}
},
"validValueCount": ""
},
"dataType": {
"listElementType": "",
"nullable": false,
"structType": {
"fields": {}
},
"timeFormat": "",
"typeCode": ""
},
"displayName": "",
"etag": "",
"name": "",
"topCorrelatedColumns": [
{
"columnSpecId": "",
"correlationStats": {
"cramersV": ""
}
}
]
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"dataStats\": {\n \"arrayStats\": {\n \"memberStats\": \"\"\n },\n \"categoryStats\": {\n \"topCategoryStats\": [\n {\n \"count\": \"\",\n \"value\": \"\"\n }\n ]\n },\n \"distinctValueCount\": \"\",\n \"float64Stats\": {\n \"histogramBuckets\": [\n {\n \"count\": \"\",\n \"max\": \"\",\n \"min\": \"\"\n }\n ],\n \"mean\": \"\",\n \"quantiles\": [],\n \"standardDeviation\": \"\"\n },\n \"nullValueCount\": \"\",\n \"stringStats\": {\n \"topUnigramStats\": [\n {\n \"count\": \"\",\n \"value\": \"\"\n }\n ]\n },\n \"structStats\": {\n \"fieldStats\": {}\n },\n \"timestampStats\": {\n \"granularStats\": {}\n },\n \"validValueCount\": \"\"\n },\n \"dataType\": {\n \"listElementType\": \"\",\n \"nullable\": false,\n \"structType\": {\n \"fields\": {}\n },\n \"timeFormat\": \"\",\n \"typeCode\": \"\"\n },\n \"displayName\": \"\",\n \"etag\": \"\",\n \"name\": \"\",\n \"topCorrelatedColumns\": [\n {\n \"columnSpecId\": \"\",\n \"correlationStats\": {\n \"cramersV\": \"\"\n }\n }\n ]\n}"
headers = { 'content-type': "application/json" }
conn.request("PATCH", "/baseUrl/v1beta1/:name", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1beta1/:name"
payload = {
"dataStats": {
"arrayStats": { "memberStats": "" },
"categoryStats": { "topCategoryStats": [
{
"count": "",
"value": ""
}
] },
"distinctValueCount": "",
"float64Stats": {
"histogramBuckets": [
{
"count": "",
"max": "",
"min": ""
}
],
"mean": "",
"quantiles": [],
"standardDeviation": ""
},
"nullValueCount": "",
"stringStats": { "topUnigramStats": [
{
"count": "",
"value": ""
}
] },
"structStats": { "fieldStats": {} },
"timestampStats": { "granularStats": {} },
"validValueCount": ""
},
"dataType": {
"listElementType": "",
"nullable": False,
"structType": { "fields": {} },
"timeFormat": "",
"typeCode": ""
},
"displayName": "",
"etag": "",
"name": "",
"topCorrelatedColumns": [
{
"columnSpecId": "",
"correlationStats": { "cramersV": "" }
}
]
}
headers = {"content-type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1beta1/:name"
payload <- "{\n \"dataStats\": {\n \"arrayStats\": {\n \"memberStats\": \"\"\n },\n \"categoryStats\": {\n \"topCategoryStats\": [\n {\n \"count\": \"\",\n \"value\": \"\"\n }\n ]\n },\n \"distinctValueCount\": \"\",\n \"float64Stats\": {\n \"histogramBuckets\": [\n {\n \"count\": \"\",\n \"max\": \"\",\n \"min\": \"\"\n }\n ],\n \"mean\": \"\",\n \"quantiles\": [],\n \"standardDeviation\": \"\"\n },\n \"nullValueCount\": \"\",\n \"stringStats\": {\n \"topUnigramStats\": [\n {\n \"count\": \"\",\n \"value\": \"\"\n }\n ]\n },\n \"structStats\": {\n \"fieldStats\": {}\n },\n \"timestampStats\": {\n \"granularStats\": {}\n },\n \"validValueCount\": \"\"\n },\n \"dataType\": {\n \"listElementType\": \"\",\n \"nullable\": false,\n \"structType\": {\n \"fields\": {}\n },\n \"timeFormat\": \"\",\n \"typeCode\": \"\"\n },\n \"displayName\": \"\",\n \"etag\": \"\",\n \"name\": \"\",\n \"topCorrelatedColumns\": [\n {\n \"columnSpecId\": \"\",\n \"correlationStats\": {\n \"cramersV\": \"\"\n }\n }\n ]\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}}/v1beta1/: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 \"dataStats\": {\n \"arrayStats\": {\n \"memberStats\": \"\"\n },\n \"categoryStats\": {\n \"topCategoryStats\": [\n {\n \"count\": \"\",\n \"value\": \"\"\n }\n ]\n },\n \"distinctValueCount\": \"\",\n \"float64Stats\": {\n \"histogramBuckets\": [\n {\n \"count\": \"\",\n \"max\": \"\",\n \"min\": \"\"\n }\n ],\n \"mean\": \"\",\n \"quantiles\": [],\n \"standardDeviation\": \"\"\n },\n \"nullValueCount\": \"\",\n \"stringStats\": {\n \"topUnigramStats\": [\n {\n \"count\": \"\",\n \"value\": \"\"\n }\n ]\n },\n \"structStats\": {\n \"fieldStats\": {}\n },\n \"timestampStats\": {\n \"granularStats\": {}\n },\n \"validValueCount\": \"\"\n },\n \"dataType\": {\n \"listElementType\": \"\",\n \"nullable\": false,\n \"structType\": {\n \"fields\": {}\n },\n \"timeFormat\": \"\",\n \"typeCode\": \"\"\n },\n \"displayName\": \"\",\n \"etag\": \"\",\n \"name\": \"\",\n \"topCorrelatedColumns\": [\n {\n \"columnSpecId\": \"\",\n \"correlationStats\": {\n \"cramersV\": \"\"\n }\n }\n ]\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.patch('/baseUrl/v1beta1/:name') do |req|
req.body = "{\n \"dataStats\": {\n \"arrayStats\": {\n \"memberStats\": \"\"\n },\n \"categoryStats\": {\n \"topCategoryStats\": [\n {\n \"count\": \"\",\n \"value\": \"\"\n }\n ]\n },\n \"distinctValueCount\": \"\",\n \"float64Stats\": {\n \"histogramBuckets\": [\n {\n \"count\": \"\",\n \"max\": \"\",\n \"min\": \"\"\n }\n ],\n \"mean\": \"\",\n \"quantiles\": [],\n \"standardDeviation\": \"\"\n },\n \"nullValueCount\": \"\",\n \"stringStats\": {\n \"topUnigramStats\": [\n {\n \"count\": \"\",\n \"value\": \"\"\n }\n ]\n },\n \"structStats\": {\n \"fieldStats\": {}\n },\n \"timestampStats\": {\n \"granularStats\": {}\n },\n \"validValueCount\": \"\"\n },\n \"dataType\": {\n \"listElementType\": \"\",\n \"nullable\": false,\n \"structType\": {\n \"fields\": {}\n },\n \"timeFormat\": \"\",\n \"typeCode\": \"\"\n },\n \"displayName\": \"\",\n \"etag\": \"\",\n \"name\": \"\",\n \"topCorrelatedColumns\": [\n {\n \"columnSpecId\": \"\",\n \"correlationStats\": {\n \"cramersV\": \"\"\n }\n }\n ]\n}"
end
puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1beta1/:name";
let payload = json!({
"dataStats": json!({
"arrayStats": json!({"memberStats": ""}),
"categoryStats": json!({"topCategoryStats": (
json!({
"count": "",
"value": ""
})
)}),
"distinctValueCount": "",
"float64Stats": json!({
"histogramBuckets": (
json!({
"count": "",
"max": "",
"min": ""
})
),
"mean": "",
"quantiles": (),
"standardDeviation": ""
}),
"nullValueCount": "",
"stringStats": json!({"topUnigramStats": (
json!({
"count": "",
"value": ""
})
)}),
"structStats": json!({"fieldStats": json!({})}),
"timestampStats": json!({"granularStats": json!({})}),
"validValueCount": ""
}),
"dataType": json!({
"listElementType": "",
"nullable": false,
"structType": json!({"fields": json!({})}),
"timeFormat": "",
"typeCode": ""
}),
"displayName": "",
"etag": "",
"name": "",
"topCorrelatedColumns": (
json!({
"columnSpecId": "",
"correlationStats": json!({"cramersV": ""})
})
)
});
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}}/v1beta1/:name \
--header 'content-type: application/json' \
--data '{
"dataStats": {
"arrayStats": {
"memberStats": ""
},
"categoryStats": {
"topCategoryStats": [
{
"count": "",
"value": ""
}
]
},
"distinctValueCount": "",
"float64Stats": {
"histogramBuckets": [
{
"count": "",
"max": "",
"min": ""
}
],
"mean": "",
"quantiles": [],
"standardDeviation": ""
},
"nullValueCount": "",
"stringStats": {
"topUnigramStats": [
{
"count": "",
"value": ""
}
]
},
"structStats": {
"fieldStats": {}
},
"timestampStats": {
"granularStats": {}
},
"validValueCount": ""
},
"dataType": {
"listElementType": "",
"nullable": false,
"structType": {
"fields": {}
},
"timeFormat": "",
"typeCode": ""
},
"displayName": "",
"etag": "",
"name": "",
"topCorrelatedColumns": [
{
"columnSpecId": "",
"correlationStats": {
"cramersV": ""
}
}
]
}'
echo '{
"dataStats": {
"arrayStats": {
"memberStats": ""
},
"categoryStats": {
"topCategoryStats": [
{
"count": "",
"value": ""
}
]
},
"distinctValueCount": "",
"float64Stats": {
"histogramBuckets": [
{
"count": "",
"max": "",
"min": ""
}
],
"mean": "",
"quantiles": [],
"standardDeviation": ""
},
"nullValueCount": "",
"stringStats": {
"topUnigramStats": [
{
"count": "",
"value": ""
}
]
},
"structStats": {
"fieldStats": {}
},
"timestampStats": {
"granularStats": {}
},
"validValueCount": ""
},
"dataType": {
"listElementType": "",
"nullable": false,
"structType": {
"fields": {}
},
"timeFormat": "",
"typeCode": ""
},
"displayName": "",
"etag": "",
"name": "",
"topCorrelatedColumns": [
{
"columnSpecId": "",
"correlationStats": {
"cramersV": ""
}
}
]
}' | \
http PATCH {{baseUrl}}/v1beta1/:name \
content-type:application/json
wget --quiet \
--method PATCH \
--header 'content-type: application/json' \
--body-data '{\n "dataStats": {\n "arrayStats": {\n "memberStats": ""\n },\n "categoryStats": {\n "topCategoryStats": [\n {\n "count": "",\n "value": ""\n }\n ]\n },\n "distinctValueCount": "",\n "float64Stats": {\n "histogramBuckets": [\n {\n "count": "",\n "max": "",\n "min": ""\n }\n ],\n "mean": "",\n "quantiles": [],\n "standardDeviation": ""\n },\n "nullValueCount": "",\n "stringStats": {\n "topUnigramStats": [\n {\n "count": "",\n "value": ""\n }\n ]\n },\n "structStats": {\n "fieldStats": {}\n },\n "timestampStats": {\n "granularStats": {}\n },\n "validValueCount": ""\n },\n "dataType": {\n "listElementType": "",\n "nullable": false,\n "structType": {\n "fields": {}\n },\n "timeFormat": "",\n "typeCode": ""\n },\n "displayName": "",\n "etag": "",\n "name": "",\n "topCorrelatedColumns": [\n {\n "columnSpecId": "",\n "correlationStats": {\n "cramersV": ""\n }\n }\n ]\n}' \
--output-document \
- {{baseUrl}}/v1beta1/:name
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"dataStats": [
"arrayStats": ["memberStats": ""],
"categoryStats": ["topCategoryStats": [
[
"count": "",
"value": ""
]
]],
"distinctValueCount": "",
"float64Stats": [
"histogramBuckets": [
[
"count": "",
"max": "",
"min": ""
]
],
"mean": "",
"quantiles": [],
"standardDeviation": ""
],
"nullValueCount": "",
"stringStats": ["topUnigramStats": [
[
"count": "",
"value": ""
]
]],
"structStats": ["fieldStats": []],
"timestampStats": ["granularStats": []],
"validValueCount": ""
],
"dataType": [
"listElementType": "",
"nullable": false,
"structType": ["fields": []],
"timeFormat": "",
"typeCode": ""
],
"displayName": "",
"etag": "",
"name": "",
"topCorrelatedColumns": [
[
"columnSpecId": "",
"correlationStats": ["cramersV": ""]
]
]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1beta1/: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()
GET
automl.projects.locations.datasets.tableSpecs.list
{{baseUrl}}/v1beta1/:parent/tableSpecs
QUERY PARAMS
parent
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1beta1/:parent/tableSpecs");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v1beta1/:parent/tableSpecs")
require "http/client"
url = "{{baseUrl}}/v1beta1/:parent/tableSpecs"
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}}/v1beta1/:parent/tableSpecs"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1beta1/:parent/tableSpecs");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1beta1/:parent/tableSpecs"
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/v1beta1/:parent/tableSpecs HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1beta1/:parent/tableSpecs")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1beta1/:parent/tableSpecs"))
.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}}/v1beta1/:parent/tableSpecs")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1beta1/:parent/tableSpecs")
.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}}/v1beta1/:parent/tableSpecs');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/v1beta1/:parent/tableSpecs'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1beta1/:parent/tableSpecs';
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}}/v1beta1/:parent/tableSpecs',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1beta1/:parent/tableSpecs")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1beta1/:parent/tableSpecs',
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}}/v1beta1/:parent/tableSpecs'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v1beta1/:parent/tableSpecs');
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}}/v1beta1/:parent/tableSpecs'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1beta1/:parent/tableSpecs';
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}}/v1beta1/:parent/tableSpecs"]
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}}/v1beta1/:parent/tableSpecs" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1beta1/:parent/tableSpecs",
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}}/v1beta1/:parent/tableSpecs');
echo $response->getBody();
setUrl('{{baseUrl}}/v1beta1/:parent/tableSpecs');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1beta1/:parent/tableSpecs');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1beta1/:parent/tableSpecs' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1beta1/:parent/tableSpecs' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v1beta1/:parent/tableSpecs")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1beta1/:parent/tableSpecs"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1beta1/:parent/tableSpecs"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1beta1/:parent/tableSpecs")
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/v1beta1/:parent/tableSpecs') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1beta1/:parent/tableSpecs";
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}}/v1beta1/:parent/tableSpecs
http GET {{baseUrl}}/v1beta1/:parent/tableSpecs
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v1beta1/:parent/tableSpecs
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1beta1/:parent/tableSpecs")! 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
automl.projects.locations.list
{{baseUrl}}/v1beta1/:name/locations
QUERY PARAMS
name
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1beta1/:name/locations");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v1beta1/:name/locations")
require "http/client"
url = "{{baseUrl}}/v1beta1/:name/locations"
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}}/v1beta1/:name/locations"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1beta1/:name/locations");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1beta1/:name/locations"
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/v1beta1/:name/locations HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1beta1/:name/locations")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1beta1/:name/locations"))
.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}}/v1beta1/:name/locations")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1beta1/:name/locations")
.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}}/v1beta1/:name/locations');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/v1beta1/:name/locations'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1beta1/:name/locations';
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}}/v1beta1/:name/locations',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1beta1/:name/locations")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1beta1/:name/locations',
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}}/v1beta1/:name/locations'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v1beta1/:name/locations');
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}}/v1beta1/:name/locations'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1beta1/:name/locations';
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}}/v1beta1/:name/locations"]
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}}/v1beta1/:name/locations" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1beta1/:name/locations",
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}}/v1beta1/:name/locations');
echo $response->getBody();
setUrl('{{baseUrl}}/v1beta1/:name/locations');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1beta1/:name/locations');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1beta1/:name/locations' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1beta1/:name/locations' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v1beta1/:name/locations")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1beta1/:name/locations"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1beta1/:name/locations"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1beta1/:name/locations")
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/v1beta1/:name/locations') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1beta1/:name/locations";
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}}/v1beta1/:name/locations
http GET {{baseUrl}}/v1beta1/:name/locations
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v1beta1/:name/locations
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1beta1/:name/locations")! 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
automl.projects.locations.models.batchPredict
{{baseUrl}}/v1beta1/:name:batchPredict
QUERY PARAMS
name
BODY json
{
"inputConfig": {
"bigquerySource": {
"inputUri": ""
},
"gcsSource": {
"inputUris": []
}
},
"outputConfig": {
"bigqueryDestination": {
"outputUri": ""
},
"gcsDestination": {
"outputUriPrefix": ""
}
},
"params": {}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1beta1/:name:batchPredict");
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 \"inputConfig\": {\n \"bigquerySource\": {\n \"inputUri\": \"\"\n },\n \"gcsSource\": {\n \"inputUris\": []\n }\n },\n \"outputConfig\": {\n \"bigqueryDestination\": {\n \"outputUri\": \"\"\n },\n \"gcsDestination\": {\n \"outputUriPrefix\": \"\"\n }\n },\n \"params\": {}\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1beta1/:name:batchPredict" {:content-type :json
:form-params {:inputConfig {:bigquerySource {:inputUri ""}
:gcsSource {:inputUris []}}
:outputConfig {:bigqueryDestination {:outputUri ""}
:gcsDestination {:outputUriPrefix ""}}
:params {}}})
require "http/client"
url = "{{baseUrl}}/v1beta1/:name:batchPredict"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"inputConfig\": {\n \"bigquerySource\": {\n \"inputUri\": \"\"\n },\n \"gcsSource\": {\n \"inputUris\": []\n }\n },\n \"outputConfig\": {\n \"bigqueryDestination\": {\n \"outputUri\": \"\"\n },\n \"gcsDestination\": {\n \"outputUriPrefix\": \"\"\n }\n },\n \"params\": {}\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}}/v1beta1/:name:batchPredict"),
Content = new StringContent("{\n \"inputConfig\": {\n \"bigquerySource\": {\n \"inputUri\": \"\"\n },\n \"gcsSource\": {\n \"inputUris\": []\n }\n },\n \"outputConfig\": {\n \"bigqueryDestination\": {\n \"outputUri\": \"\"\n },\n \"gcsDestination\": {\n \"outputUriPrefix\": \"\"\n }\n },\n \"params\": {}\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}}/v1beta1/:name:batchPredict");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"inputConfig\": {\n \"bigquerySource\": {\n \"inputUri\": \"\"\n },\n \"gcsSource\": {\n \"inputUris\": []\n }\n },\n \"outputConfig\": {\n \"bigqueryDestination\": {\n \"outputUri\": \"\"\n },\n \"gcsDestination\": {\n \"outputUriPrefix\": \"\"\n }\n },\n \"params\": {}\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1beta1/:name:batchPredict"
payload := strings.NewReader("{\n \"inputConfig\": {\n \"bigquerySource\": {\n \"inputUri\": \"\"\n },\n \"gcsSource\": {\n \"inputUris\": []\n }\n },\n \"outputConfig\": {\n \"bigqueryDestination\": {\n \"outputUri\": \"\"\n },\n \"gcsDestination\": {\n \"outputUriPrefix\": \"\"\n }\n },\n \"params\": {}\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/v1beta1/:name:batchPredict HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 282
{
"inputConfig": {
"bigquerySource": {
"inputUri": ""
},
"gcsSource": {
"inputUris": []
}
},
"outputConfig": {
"bigqueryDestination": {
"outputUri": ""
},
"gcsDestination": {
"outputUriPrefix": ""
}
},
"params": {}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1beta1/:name:batchPredict")
.setHeader("content-type", "application/json")
.setBody("{\n \"inputConfig\": {\n \"bigquerySource\": {\n \"inputUri\": \"\"\n },\n \"gcsSource\": {\n \"inputUris\": []\n }\n },\n \"outputConfig\": {\n \"bigqueryDestination\": {\n \"outputUri\": \"\"\n },\n \"gcsDestination\": {\n \"outputUriPrefix\": \"\"\n }\n },\n \"params\": {}\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1beta1/:name:batchPredict"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"inputConfig\": {\n \"bigquerySource\": {\n \"inputUri\": \"\"\n },\n \"gcsSource\": {\n \"inputUris\": []\n }\n },\n \"outputConfig\": {\n \"bigqueryDestination\": {\n \"outputUri\": \"\"\n },\n \"gcsDestination\": {\n \"outputUriPrefix\": \"\"\n }\n },\n \"params\": {}\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 \"inputConfig\": {\n \"bigquerySource\": {\n \"inputUri\": \"\"\n },\n \"gcsSource\": {\n \"inputUris\": []\n }\n },\n \"outputConfig\": {\n \"bigqueryDestination\": {\n \"outputUri\": \"\"\n },\n \"gcsDestination\": {\n \"outputUriPrefix\": \"\"\n }\n },\n \"params\": {}\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1beta1/:name:batchPredict")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1beta1/:name:batchPredict")
.header("content-type", "application/json")
.body("{\n \"inputConfig\": {\n \"bigquerySource\": {\n \"inputUri\": \"\"\n },\n \"gcsSource\": {\n \"inputUris\": []\n }\n },\n \"outputConfig\": {\n \"bigqueryDestination\": {\n \"outputUri\": \"\"\n },\n \"gcsDestination\": {\n \"outputUriPrefix\": \"\"\n }\n },\n \"params\": {}\n}")
.asString();
const data = JSON.stringify({
inputConfig: {
bigquerySource: {
inputUri: ''
},
gcsSource: {
inputUris: []
}
},
outputConfig: {
bigqueryDestination: {
outputUri: ''
},
gcsDestination: {
outputUriPrefix: ''
}
},
params: {}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v1beta1/:name:batchPredict');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1beta1/:name:batchPredict',
headers: {'content-type': 'application/json'},
data: {
inputConfig: {bigquerySource: {inputUri: ''}, gcsSource: {inputUris: []}},
outputConfig: {bigqueryDestination: {outputUri: ''}, gcsDestination: {outputUriPrefix: ''}},
params: {}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1beta1/:name:batchPredict';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"inputConfig":{"bigquerySource":{"inputUri":""},"gcsSource":{"inputUris":[]}},"outputConfig":{"bigqueryDestination":{"outputUri":""},"gcsDestination":{"outputUriPrefix":""}},"params":{}}'
};
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}}/v1beta1/:name:batchPredict',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "inputConfig": {\n "bigquerySource": {\n "inputUri": ""\n },\n "gcsSource": {\n "inputUris": []\n }\n },\n "outputConfig": {\n "bigqueryDestination": {\n "outputUri": ""\n },\n "gcsDestination": {\n "outputUriPrefix": ""\n }\n },\n "params": {}\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"inputConfig\": {\n \"bigquerySource\": {\n \"inputUri\": \"\"\n },\n \"gcsSource\": {\n \"inputUris\": []\n }\n },\n \"outputConfig\": {\n \"bigqueryDestination\": {\n \"outputUri\": \"\"\n },\n \"gcsDestination\": {\n \"outputUriPrefix\": \"\"\n }\n },\n \"params\": {}\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1beta1/:name:batchPredict")
.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/v1beta1/:name:batchPredict',
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({
inputConfig: {bigquerySource: {inputUri: ''}, gcsSource: {inputUris: []}},
outputConfig: {bigqueryDestination: {outputUri: ''}, gcsDestination: {outputUriPrefix: ''}},
params: {}
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1beta1/:name:batchPredict',
headers: {'content-type': 'application/json'},
body: {
inputConfig: {bigquerySource: {inputUri: ''}, gcsSource: {inputUris: []}},
outputConfig: {bigqueryDestination: {outputUri: ''}, gcsDestination: {outputUriPrefix: ''}},
params: {}
},
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}}/v1beta1/:name:batchPredict');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
inputConfig: {
bigquerySource: {
inputUri: ''
},
gcsSource: {
inputUris: []
}
},
outputConfig: {
bigqueryDestination: {
outputUri: ''
},
gcsDestination: {
outputUriPrefix: ''
}
},
params: {}
});
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}}/v1beta1/:name:batchPredict',
headers: {'content-type': 'application/json'},
data: {
inputConfig: {bigquerySource: {inputUri: ''}, gcsSource: {inputUris: []}},
outputConfig: {bigqueryDestination: {outputUri: ''}, gcsDestination: {outputUriPrefix: ''}},
params: {}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1beta1/:name:batchPredict';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"inputConfig":{"bigquerySource":{"inputUri":""},"gcsSource":{"inputUris":[]}},"outputConfig":{"bigqueryDestination":{"outputUri":""},"gcsDestination":{"outputUriPrefix":""}},"params":{}}'
};
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 = @{ @"inputConfig": @{ @"bigquerySource": @{ @"inputUri": @"" }, @"gcsSource": @{ @"inputUris": @[ ] } },
@"outputConfig": @{ @"bigqueryDestination": @{ @"outputUri": @"" }, @"gcsDestination": @{ @"outputUriPrefix": @"" } },
@"params": @{ } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1beta1/:name:batchPredict"]
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}}/v1beta1/:name:batchPredict" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"inputConfig\": {\n \"bigquerySource\": {\n \"inputUri\": \"\"\n },\n \"gcsSource\": {\n \"inputUris\": []\n }\n },\n \"outputConfig\": {\n \"bigqueryDestination\": {\n \"outputUri\": \"\"\n },\n \"gcsDestination\": {\n \"outputUriPrefix\": \"\"\n }\n },\n \"params\": {}\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1beta1/:name:batchPredict",
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([
'inputConfig' => [
'bigquerySource' => [
'inputUri' => ''
],
'gcsSource' => [
'inputUris' => [
]
]
],
'outputConfig' => [
'bigqueryDestination' => [
'outputUri' => ''
],
'gcsDestination' => [
'outputUriPrefix' => ''
]
],
'params' => [
]
]),
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}}/v1beta1/:name:batchPredict', [
'body' => '{
"inputConfig": {
"bigquerySource": {
"inputUri": ""
},
"gcsSource": {
"inputUris": []
}
},
"outputConfig": {
"bigqueryDestination": {
"outputUri": ""
},
"gcsDestination": {
"outputUriPrefix": ""
}
},
"params": {}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1beta1/:name:batchPredict');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'inputConfig' => [
'bigquerySource' => [
'inputUri' => ''
],
'gcsSource' => [
'inputUris' => [
]
]
],
'outputConfig' => [
'bigqueryDestination' => [
'outputUri' => ''
],
'gcsDestination' => [
'outputUriPrefix' => ''
]
],
'params' => [
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'inputConfig' => [
'bigquerySource' => [
'inputUri' => ''
],
'gcsSource' => [
'inputUris' => [
]
]
],
'outputConfig' => [
'bigqueryDestination' => [
'outputUri' => ''
],
'gcsDestination' => [
'outputUriPrefix' => ''
]
],
'params' => [
]
]));
$request->setRequestUrl('{{baseUrl}}/v1beta1/:name:batchPredict');
$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}}/v1beta1/:name:batchPredict' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"inputConfig": {
"bigquerySource": {
"inputUri": ""
},
"gcsSource": {
"inputUris": []
}
},
"outputConfig": {
"bigqueryDestination": {
"outputUri": ""
},
"gcsDestination": {
"outputUriPrefix": ""
}
},
"params": {}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1beta1/:name:batchPredict' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"inputConfig": {
"bigquerySource": {
"inputUri": ""
},
"gcsSource": {
"inputUris": []
}
},
"outputConfig": {
"bigqueryDestination": {
"outputUri": ""
},
"gcsDestination": {
"outputUriPrefix": ""
}
},
"params": {}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"inputConfig\": {\n \"bigquerySource\": {\n \"inputUri\": \"\"\n },\n \"gcsSource\": {\n \"inputUris\": []\n }\n },\n \"outputConfig\": {\n \"bigqueryDestination\": {\n \"outputUri\": \"\"\n },\n \"gcsDestination\": {\n \"outputUriPrefix\": \"\"\n }\n },\n \"params\": {}\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1beta1/:name:batchPredict", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1beta1/:name:batchPredict"
payload = {
"inputConfig": {
"bigquerySource": { "inputUri": "" },
"gcsSource": { "inputUris": [] }
},
"outputConfig": {
"bigqueryDestination": { "outputUri": "" },
"gcsDestination": { "outputUriPrefix": "" }
},
"params": {}
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1beta1/:name:batchPredict"
payload <- "{\n \"inputConfig\": {\n \"bigquerySource\": {\n \"inputUri\": \"\"\n },\n \"gcsSource\": {\n \"inputUris\": []\n }\n },\n \"outputConfig\": {\n \"bigqueryDestination\": {\n \"outputUri\": \"\"\n },\n \"gcsDestination\": {\n \"outputUriPrefix\": \"\"\n }\n },\n \"params\": {}\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}}/v1beta1/:name:batchPredict")
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 \"inputConfig\": {\n \"bigquerySource\": {\n \"inputUri\": \"\"\n },\n \"gcsSource\": {\n \"inputUris\": []\n }\n },\n \"outputConfig\": {\n \"bigqueryDestination\": {\n \"outputUri\": \"\"\n },\n \"gcsDestination\": {\n \"outputUriPrefix\": \"\"\n }\n },\n \"params\": {}\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/v1beta1/:name:batchPredict') do |req|
req.body = "{\n \"inputConfig\": {\n \"bigquerySource\": {\n \"inputUri\": \"\"\n },\n \"gcsSource\": {\n \"inputUris\": []\n }\n },\n \"outputConfig\": {\n \"bigqueryDestination\": {\n \"outputUri\": \"\"\n },\n \"gcsDestination\": {\n \"outputUriPrefix\": \"\"\n }\n },\n \"params\": {}\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1beta1/:name:batchPredict";
let payload = json!({
"inputConfig": json!({
"bigquerySource": json!({"inputUri": ""}),
"gcsSource": json!({"inputUris": ()})
}),
"outputConfig": json!({
"bigqueryDestination": json!({"outputUri": ""}),
"gcsDestination": json!({"outputUriPrefix": ""})
}),
"params": 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}}/v1beta1/:name:batchPredict \
--header 'content-type: application/json' \
--data '{
"inputConfig": {
"bigquerySource": {
"inputUri": ""
},
"gcsSource": {
"inputUris": []
}
},
"outputConfig": {
"bigqueryDestination": {
"outputUri": ""
},
"gcsDestination": {
"outputUriPrefix": ""
}
},
"params": {}
}'
echo '{
"inputConfig": {
"bigquerySource": {
"inputUri": ""
},
"gcsSource": {
"inputUris": []
}
},
"outputConfig": {
"bigqueryDestination": {
"outputUri": ""
},
"gcsDestination": {
"outputUriPrefix": ""
}
},
"params": {}
}' | \
http POST {{baseUrl}}/v1beta1/:name:batchPredict \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "inputConfig": {\n "bigquerySource": {\n "inputUri": ""\n },\n "gcsSource": {\n "inputUris": []\n }\n },\n "outputConfig": {\n "bigqueryDestination": {\n "outputUri": ""\n },\n "gcsDestination": {\n "outputUriPrefix": ""\n }\n },\n "params": {}\n}' \
--output-document \
- {{baseUrl}}/v1beta1/:name:batchPredict
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"inputConfig": [
"bigquerySource": ["inputUri": ""],
"gcsSource": ["inputUris": []]
],
"outputConfig": [
"bigqueryDestination": ["outputUri": ""],
"gcsDestination": ["outputUriPrefix": ""]
],
"params": []
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1beta1/:name:batchPredict")! 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
automl.projects.locations.models.create
{{baseUrl}}/v1beta1/:parent/models
QUERY PARAMS
parent
BODY json
{
"createTime": "",
"datasetId": "",
"deploymentState": "",
"displayName": "",
"imageClassificationModelMetadata": {
"baseModelId": "",
"modelType": "",
"nodeCount": "",
"nodeQps": "",
"stopReason": "",
"trainBudget": "",
"trainCost": ""
},
"imageObjectDetectionModelMetadata": {
"modelType": "",
"nodeCount": "",
"nodeQps": "",
"stopReason": "",
"trainBudgetMilliNodeHours": "",
"trainCostMilliNodeHours": ""
},
"name": "",
"tablesModelMetadata": {
"disableEarlyStopping": false,
"inputFeatureColumnSpecs": [
{
"dataStats": {
"arrayStats": {
"memberStats": ""
},
"categoryStats": {
"topCategoryStats": [
{
"count": "",
"value": ""
}
]
},
"distinctValueCount": "",
"float64Stats": {
"histogramBuckets": [
{
"count": "",
"max": "",
"min": ""
}
],
"mean": "",
"quantiles": [],
"standardDeviation": ""
},
"nullValueCount": "",
"stringStats": {
"topUnigramStats": [
{
"count": "",
"value": ""
}
]
},
"structStats": {
"fieldStats": {}
},
"timestampStats": {
"granularStats": {}
},
"validValueCount": ""
},
"dataType": {
"listElementType": "",
"nullable": false,
"structType": {
"fields": {}
},
"timeFormat": "",
"typeCode": ""
},
"displayName": "",
"etag": "",
"name": "",
"topCorrelatedColumns": [
{
"columnSpecId": "",
"correlationStats": {
"cramersV": ""
}
}
]
}
],
"optimizationObjective": "",
"optimizationObjectivePrecisionValue": "",
"optimizationObjectiveRecallValue": "",
"tablesModelColumnInfo": [
{
"columnDisplayName": "",
"columnSpecName": "",
"featureImportance": ""
}
],
"targetColumnSpec": {},
"trainBudgetMilliNodeHours": "",
"trainCostMilliNodeHours": ""
},
"textClassificationModelMetadata": {
"classificationType": ""
},
"textExtractionModelMetadata": {
"modelHint": ""
},
"textSentimentModelMetadata": {},
"trainExampleCount": 0,
"translationModelMetadata": {
"baseModel": "",
"sourceLanguageCode": "",
"targetLanguageCode": ""
},
"updateTime": "",
"validateExampleCount": 0,
"videoClassificationModelMetadata": {},
"videoObjectTrackingModelMetadata": {}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1beta1/:parent/models");
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 \"createTime\": \"\",\n \"datasetId\": \"\",\n \"deploymentState\": \"\",\n \"displayName\": \"\",\n \"imageClassificationModelMetadata\": {\n \"baseModelId\": \"\",\n \"modelType\": \"\",\n \"nodeCount\": \"\",\n \"nodeQps\": \"\",\n \"stopReason\": \"\",\n \"trainBudget\": \"\",\n \"trainCost\": \"\"\n },\n \"imageObjectDetectionModelMetadata\": {\n \"modelType\": \"\",\n \"nodeCount\": \"\",\n \"nodeQps\": \"\",\n \"stopReason\": \"\",\n \"trainBudgetMilliNodeHours\": \"\",\n \"trainCostMilliNodeHours\": \"\"\n },\n \"name\": \"\",\n \"tablesModelMetadata\": {\n \"disableEarlyStopping\": false,\n \"inputFeatureColumnSpecs\": [\n {\n \"dataStats\": {\n \"arrayStats\": {\n \"memberStats\": \"\"\n },\n \"categoryStats\": {\n \"topCategoryStats\": [\n {\n \"count\": \"\",\n \"value\": \"\"\n }\n ]\n },\n \"distinctValueCount\": \"\",\n \"float64Stats\": {\n \"histogramBuckets\": [\n {\n \"count\": \"\",\n \"max\": \"\",\n \"min\": \"\"\n }\n ],\n \"mean\": \"\",\n \"quantiles\": [],\n \"standardDeviation\": \"\"\n },\n \"nullValueCount\": \"\",\n \"stringStats\": {\n \"topUnigramStats\": [\n {\n \"count\": \"\",\n \"value\": \"\"\n }\n ]\n },\n \"structStats\": {\n \"fieldStats\": {}\n },\n \"timestampStats\": {\n \"granularStats\": {}\n },\n \"validValueCount\": \"\"\n },\n \"dataType\": {\n \"listElementType\": \"\",\n \"nullable\": false,\n \"structType\": {\n \"fields\": {}\n },\n \"timeFormat\": \"\",\n \"typeCode\": \"\"\n },\n \"displayName\": \"\",\n \"etag\": \"\",\n \"name\": \"\",\n \"topCorrelatedColumns\": [\n {\n \"columnSpecId\": \"\",\n \"correlationStats\": {\n \"cramersV\": \"\"\n }\n }\n ]\n }\n ],\n \"optimizationObjective\": \"\",\n \"optimizationObjectivePrecisionValue\": \"\",\n \"optimizationObjectiveRecallValue\": \"\",\n \"tablesModelColumnInfo\": [\n {\n \"columnDisplayName\": \"\",\n \"columnSpecName\": \"\",\n \"featureImportance\": \"\"\n }\n ],\n \"targetColumnSpec\": {},\n \"trainBudgetMilliNodeHours\": \"\",\n \"trainCostMilliNodeHours\": \"\"\n },\n \"textClassificationModelMetadata\": {\n \"classificationType\": \"\"\n },\n \"textExtractionModelMetadata\": {\n \"modelHint\": \"\"\n },\n \"textSentimentModelMetadata\": {},\n \"trainExampleCount\": 0,\n \"translationModelMetadata\": {\n \"baseModel\": \"\",\n \"sourceLanguageCode\": \"\",\n \"targetLanguageCode\": \"\"\n },\n \"updateTime\": \"\",\n \"validateExampleCount\": 0,\n \"videoClassificationModelMetadata\": {},\n \"videoObjectTrackingModelMetadata\": {}\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1beta1/:parent/models" {:content-type :json
:form-params {:createTime ""
:datasetId ""
:deploymentState ""
:displayName ""
:imageClassificationModelMetadata {:baseModelId ""
:modelType ""
:nodeCount ""
:nodeQps ""
:stopReason ""
:trainBudget ""
:trainCost ""}
:imageObjectDetectionModelMetadata {:modelType ""
:nodeCount ""
:nodeQps ""
:stopReason ""
:trainBudgetMilliNodeHours ""
:trainCostMilliNodeHours ""}
:name ""
:tablesModelMetadata {:disableEarlyStopping false
:inputFeatureColumnSpecs [{:dataStats {:arrayStats {:memberStats ""}
:categoryStats {:topCategoryStats [{:count ""
:value ""}]}
:distinctValueCount ""
:float64Stats {:histogramBuckets [{:count ""
:max ""
:min ""}]
:mean ""
:quantiles []
:standardDeviation ""}
:nullValueCount ""
:stringStats {:topUnigramStats [{:count ""
:value ""}]}
:structStats {:fieldStats {}}
:timestampStats {:granularStats {}}
:validValueCount ""}
:dataType {:listElementType ""
:nullable false
:structType {:fields {}}
:timeFormat ""
:typeCode ""}
:displayName ""
:etag ""
:name ""
:topCorrelatedColumns [{:columnSpecId ""
:correlationStats {:cramersV ""}}]}]
:optimizationObjective ""
:optimizationObjectivePrecisionValue ""
:optimizationObjectiveRecallValue ""
:tablesModelColumnInfo [{:columnDisplayName ""
:columnSpecName ""
:featureImportance ""}]
:targetColumnSpec {}
:trainBudgetMilliNodeHours ""
:trainCostMilliNodeHours ""}
:textClassificationModelMetadata {:classificationType ""}
:textExtractionModelMetadata {:modelHint ""}
:textSentimentModelMetadata {}
:trainExampleCount 0
:translationModelMetadata {:baseModel ""
:sourceLanguageCode ""
:targetLanguageCode ""}
:updateTime ""
:validateExampleCount 0
:videoClassificationModelMetadata {}
:videoObjectTrackingModelMetadata {}}})
require "http/client"
url = "{{baseUrl}}/v1beta1/:parent/models"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"createTime\": \"\",\n \"datasetId\": \"\",\n \"deploymentState\": \"\",\n \"displayName\": \"\",\n \"imageClassificationModelMetadata\": {\n \"baseModelId\": \"\",\n \"modelType\": \"\",\n \"nodeCount\": \"\",\n \"nodeQps\": \"\",\n \"stopReason\": \"\",\n \"trainBudget\": \"\",\n \"trainCost\": \"\"\n },\n \"imageObjectDetectionModelMetadata\": {\n \"modelType\": \"\",\n \"nodeCount\": \"\",\n \"nodeQps\": \"\",\n \"stopReason\": \"\",\n \"trainBudgetMilliNodeHours\": \"\",\n \"trainCostMilliNodeHours\": \"\"\n },\n \"name\": \"\",\n \"tablesModelMetadata\": {\n \"disableEarlyStopping\": false,\n \"inputFeatureColumnSpecs\": [\n {\n \"dataStats\": {\n \"arrayStats\": {\n \"memberStats\": \"\"\n },\n \"categoryStats\": {\n \"topCategoryStats\": [\n {\n \"count\": \"\",\n \"value\": \"\"\n }\n ]\n },\n \"distinctValueCount\": \"\",\n \"float64Stats\": {\n \"histogramBuckets\": [\n {\n \"count\": \"\",\n \"max\": \"\",\n \"min\": \"\"\n }\n ],\n \"mean\": \"\",\n \"quantiles\": [],\n \"standardDeviation\": \"\"\n },\n \"nullValueCount\": \"\",\n \"stringStats\": {\n \"topUnigramStats\": [\n {\n \"count\": \"\",\n \"value\": \"\"\n }\n ]\n },\n \"structStats\": {\n \"fieldStats\": {}\n },\n \"timestampStats\": {\n \"granularStats\": {}\n },\n \"validValueCount\": \"\"\n },\n \"dataType\": {\n \"listElementType\": \"\",\n \"nullable\": false,\n \"structType\": {\n \"fields\": {}\n },\n \"timeFormat\": \"\",\n \"typeCode\": \"\"\n },\n \"displayName\": \"\",\n \"etag\": \"\",\n \"name\": \"\",\n \"topCorrelatedColumns\": [\n {\n \"columnSpecId\": \"\",\n \"correlationStats\": {\n \"cramersV\": \"\"\n }\n }\n ]\n }\n ],\n \"optimizationObjective\": \"\",\n \"optimizationObjectivePrecisionValue\": \"\",\n \"optimizationObjectiveRecallValue\": \"\",\n \"tablesModelColumnInfo\": [\n {\n \"columnDisplayName\": \"\",\n \"columnSpecName\": \"\",\n \"featureImportance\": \"\"\n }\n ],\n \"targetColumnSpec\": {},\n \"trainBudgetMilliNodeHours\": \"\",\n \"trainCostMilliNodeHours\": \"\"\n },\n \"textClassificationModelMetadata\": {\n \"classificationType\": \"\"\n },\n \"textExtractionModelMetadata\": {\n \"modelHint\": \"\"\n },\n \"textSentimentModelMetadata\": {},\n \"trainExampleCount\": 0,\n \"translationModelMetadata\": {\n \"baseModel\": \"\",\n \"sourceLanguageCode\": \"\",\n \"targetLanguageCode\": \"\"\n },\n \"updateTime\": \"\",\n \"validateExampleCount\": 0,\n \"videoClassificationModelMetadata\": {},\n \"videoObjectTrackingModelMetadata\": {}\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}}/v1beta1/:parent/models"),
Content = new StringContent("{\n \"createTime\": \"\",\n \"datasetId\": \"\",\n \"deploymentState\": \"\",\n \"displayName\": \"\",\n \"imageClassificationModelMetadata\": {\n \"baseModelId\": \"\",\n \"modelType\": \"\",\n \"nodeCount\": \"\",\n \"nodeQps\": \"\",\n \"stopReason\": \"\",\n \"trainBudget\": \"\",\n \"trainCost\": \"\"\n },\n \"imageObjectDetectionModelMetadata\": {\n \"modelType\": \"\",\n \"nodeCount\": \"\",\n \"nodeQps\": \"\",\n \"stopReason\": \"\",\n \"trainBudgetMilliNodeHours\": \"\",\n \"trainCostMilliNodeHours\": \"\"\n },\n \"name\": \"\",\n \"tablesModelMetadata\": {\n \"disableEarlyStopping\": false,\n \"inputFeatureColumnSpecs\": [\n {\n \"dataStats\": {\n \"arrayStats\": {\n \"memberStats\": \"\"\n },\n \"categoryStats\": {\n \"topCategoryStats\": [\n {\n \"count\": \"\",\n \"value\": \"\"\n }\n ]\n },\n \"distinctValueCount\": \"\",\n \"float64Stats\": {\n \"histogramBuckets\": [\n {\n \"count\": \"\",\n \"max\": \"\",\n \"min\": \"\"\n }\n ],\n \"mean\": \"\",\n \"quantiles\": [],\n \"standardDeviation\": \"\"\n },\n \"nullValueCount\": \"\",\n \"stringStats\": {\n \"topUnigramStats\": [\n {\n \"count\": \"\",\n \"value\": \"\"\n }\n ]\n },\n \"structStats\": {\n \"fieldStats\": {}\n },\n \"timestampStats\": {\n \"granularStats\": {}\n },\n \"validValueCount\": \"\"\n },\n \"dataType\": {\n \"listElementType\": \"\",\n \"nullable\": false,\n \"structType\": {\n \"fields\": {}\n },\n \"timeFormat\": \"\",\n \"typeCode\": \"\"\n },\n \"displayName\": \"\",\n \"etag\": \"\",\n \"name\": \"\",\n \"topCorrelatedColumns\": [\n {\n \"columnSpecId\": \"\",\n \"correlationStats\": {\n \"cramersV\": \"\"\n }\n }\n ]\n }\n ],\n \"optimizationObjective\": \"\",\n \"optimizationObjectivePrecisionValue\": \"\",\n \"optimizationObjectiveRecallValue\": \"\",\n \"tablesModelColumnInfo\": [\n {\n \"columnDisplayName\": \"\",\n \"columnSpecName\": \"\",\n \"featureImportance\": \"\"\n }\n ],\n \"targetColumnSpec\": {},\n \"trainBudgetMilliNodeHours\": \"\",\n \"trainCostMilliNodeHours\": \"\"\n },\n \"textClassificationModelMetadata\": {\n \"classificationType\": \"\"\n },\n \"textExtractionModelMetadata\": {\n \"modelHint\": \"\"\n },\n \"textSentimentModelMetadata\": {},\n \"trainExampleCount\": 0,\n \"translationModelMetadata\": {\n \"baseModel\": \"\",\n \"sourceLanguageCode\": \"\",\n \"targetLanguageCode\": \"\"\n },\n \"updateTime\": \"\",\n \"validateExampleCount\": 0,\n \"videoClassificationModelMetadata\": {},\n \"videoObjectTrackingModelMetadata\": {}\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}}/v1beta1/:parent/models");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"createTime\": \"\",\n \"datasetId\": \"\",\n \"deploymentState\": \"\",\n \"displayName\": \"\",\n \"imageClassificationModelMetadata\": {\n \"baseModelId\": \"\",\n \"modelType\": \"\",\n \"nodeCount\": \"\",\n \"nodeQps\": \"\",\n \"stopReason\": \"\",\n \"trainBudget\": \"\",\n \"trainCost\": \"\"\n },\n \"imageObjectDetectionModelMetadata\": {\n \"modelType\": \"\",\n \"nodeCount\": \"\",\n \"nodeQps\": \"\",\n \"stopReason\": \"\",\n \"trainBudgetMilliNodeHours\": \"\",\n \"trainCostMilliNodeHours\": \"\"\n },\n \"name\": \"\",\n \"tablesModelMetadata\": {\n \"disableEarlyStopping\": false,\n \"inputFeatureColumnSpecs\": [\n {\n \"dataStats\": {\n \"arrayStats\": {\n \"memberStats\": \"\"\n },\n \"categoryStats\": {\n \"topCategoryStats\": [\n {\n \"count\": \"\",\n \"value\": \"\"\n }\n ]\n },\n \"distinctValueCount\": \"\",\n \"float64Stats\": {\n \"histogramBuckets\": [\n {\n \"count\": \"\",\n \"max\": \"\",\n \"min\": \"\"\n }\n ],\n \"mean\": \"\",\n \"quantiles\": [],\n \"standardDeviation\": \"\"\n },\n \"nullValueCount\": \"\",\n \"stringStats\": {\n \"topUnigramStats\": [\n {\n \"count\": \"\",\n \"value\": \"\"\n }\n ]\n },\n \"structStats\": {\n \"fieldStats\": {}\n },\n \"timestampStats\": {\n \"granularStats\": {}\n },\n \"validValueCount\": \"\"\n },\n \"dataType\": {\n \"listElementType\": \"\",\n \"nullable\": false,\n \"structType\": {\n \"fields\": {}\n },\n \"timeFormat\": \"\",\n \"typeCode\": \"\"\n },\n \"displayName\": \"\",\n \"etag\": \"\",\n \"name\": \"\",\n \"topCorrelatedColumns\": [\n {\n \"columnSpecId\": \"\",\n \"correlationStats\": {\n \"cramersV\": \"\"\n }\n }\n ]\n }\n ],\n \"optimizationObjective\": \"\",\n \"optimizationObjectivePrecisionValue\": \"\",\n \"optimizationObjectiveRecallValue\": \"\",\n \"tablesModelColumnInfo\": [\n {\n \"columnDisplayName\": \"\",\n \"columnSpecName\": \"\",\n \"featureImportance\": \"\"\n }\n ],\n \"targetColumnSpec\": {},\n \"trainBudgetMilliNodeHours\": \"\",\n \"trainCostMilliNodeHours\": \"\"\n },\n \"textClassificationModelMetadata\": {\n \"classificationType\": \"\"\n },\n \"textExtractionModelMetadata\": {\n \"modelHint\": \"\"\n },\n \"textSentimentModelMetadata\": {},\n \"trainExampleCount\": 0,\n \"translationModelMetadata\": {\n \"baseModel\": \"\",\n \"sourceLanguageCode\": \"\",\n \"targetLanguageCode\": \"\"\n },\n \"updateTime\": \"\",\n \"validateExampleCount\": 0,\n \"videoClassificationModelMetadata\": {},\n \"videoObjectTrackingModelMetadata\": {}\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1beta1/:parent/models"
payload := strings.NewReader("{\n \"createTime\": \"\",\n \"datasetId\": \"\",\n \"deploymentState\": \"\",\n \"displayName\": \"\",\n \"imageClassificationModelMetadata\": {\n \"baseModelId\": \"\",\n \"modelType\": \"\",\n \"nodeCount\": \"\",\n \"nodeQps\": \"\",\n \"stopReason\": \"\",\n \"trainBudget\": \"\",\n \"trainCost\": \"\"\n },\n \"imageObjectDetectionModelMetadata\": {\n \"modelType\": \"\",\n \"nodeCount\": \"\",\n \"nodeQps\": \"\",\n \"stopReason\": \"\",\n \"trainBudgetMilliNodeHours\": \"\",\n \"trainCostMilliNodeHours\": \"\"\n },\n \"name\": \"\",\n \"tablesModelMetadata\": {\n \"disableEarlyStopping\": false,\n \"inputFeatureColumnSpecs\": [\n {\n \"dataStats\": {\n \"arrayStats\": {\n \"memberStats\": \"\"\n },\n \"categoryStats\": {\n \"topCategoryStats\": [\n {\n \"count\": \"\",\n \"value\": \"\"\n }\n ]\n },\n \"distinctValueCount\": \"\",\n \"float64Stats\": {\n \"histogramBuckets\": [\n {\n \"count\": \"\",\n \"max\": \"\",\n \"min\": \"\"\n }\n ],\n \"mean\": \"\",\n \"quantiles\": [],\n \"standardDeviation\": \"\"\n },\n \"nullValueCount\": \"\",\n \"stringStats\": {\n \"topUnigramStats\": [\n {\n \"count\": \"\",\n \"value\": \"\"\n }\n ]\n },\n \"structStats\": {\n \"fieldStats\": {}\n },\n \"timestampStats\": {\n \"granularStats\": {}\n },\n \"validValueCount\": \"\"\n },\n \"dataType\": {\n \"listElementType\": \"\",\n \"nullable\": false,\n \"structType\": {\n \"fields\": {}\n },\n \"timeFormat\": \"\",\n \"typeCode\": \"\"\n },\n \"displayName\": \"\",\n \"etag\": \"\",\n \"name\": \"\",\n \"topCorrelatedColumns\": [\n {\n \"columnSpecId\": \"\",\n \"correlationStats\": {\n \"cramersV\": \"\"\n }\n }\n ]\n }\n ],\n \"optimizationObjective\": \"\",\n \"optimizationObjectivePrecisionValue\": \"\",\n \"optimizationObjectiveRecallValue\": \"\",\n \"tablesModelColumnInfo\": [\n {\n \"columnDisplayName\": \"\",\n \"columnSpecName\": \"\",\n \"featureImportance\": \"\"\n }\n ],\n \"targetColumnSpec\": {},\n \"trainBudgetMilliNodeHours\": \"\",\n \"trainCostMilliNodeHours\": \"\"\n },\n \"textClassificationModelMetadata\": {\n \"classificationType\": \"\"\n },\n \"textExtractionModelMetadata\": {\n \"modelHint\": \"\"\n },\n \"textSentimentModelMetadata\": {},\n \"trainExampleCount\": 0,\n \"translationModelMetadata\": {\n \"baseModel\": \"\",\n \"sourceLanguageCode\": \"\",\n \"targetLanguageCode\": \"\"\n },\n \"updateTime\": \"\",\n \"validateExampleCount\": 0,\n \"videoClassificationModelMetadata\": {},\n \"videoObjectTrackingModelMetadata\": {}\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/v1beta1/:parent/models HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 2886
{
"createTime": "",
"datasetId": "",
"deploymentState": "",
"displayName": "",
"imageClassificationModelMetadata": {
"baseModelId": "",
"modelType": "",
"nodeCount": "",
"nodeQps": "",
"stopReason": "",
"trainBudget": "",
"trainCost": ""
},
"imageObjectDetectionModelMetadata": {
"modelType": "",
"nodeCount": "",
"nodeQps": "",
"stopReason": "",
"trainBudgetMilliNodeHours": "",
"trainCostMilliNodeHours": ""
},
"name": "",
"tablesModelMetadata": {
"disableEarlyStopping": false,
"inputFeatureColumnSpecs": [
{
"dataStats": {
"arrayStats": {
"memberStats": ""
},
"categoryStats": {
"topCategoryStats": [
{
"count": "",
"value": ""
}
]
},
"distinctValueCount": "",
"float64Stats": {
"histogramBuckets": [
{
"count": "",
"max": "",
"min": ""
}
],
"mean": "",
"quantiles": [],
"standardDeviation": ""
},
"nullValueCount": "",
"stringStats": {
"topUnigramStats": [
{
"count": "",
"value": ""
}
]
},
"structStats": {
"fieldStats": {}
},
"timestampStats": {
"granularStats": {}
},
"validValueCount": ""
},
"dataType": {
"listElementType": "",
"nullable": false,
"structType": {
"fields": {}
},
"timeFormat": "",
"typeCode": ""
},
"displayName": "",
"etag": "",
"name": "",
"topCorrelatedColumns": [
{
"columnSpecId": "",
"correlationStats": {
"cramersV": ""
}
}
]
}
],
"optimizationObjective": "",
"optimizationObjectivePrecisionValue": "",
"optimizationObjectiveRecallValue": "",
"tablesModelColumnInfo": [
{
"columnDisplayName": "",
"columnSpecName": "",
"featureImportance": ""
}
],
"targetColumnSpec": {},
"trainBudgetMilliNodeHours": "",
"trainCostMilliNodeHours": ""
},
"textClassificationModelMetadata": {
"classificationType": ""
},
"textExtractionModelMetadata": {
"modelHint": ""
},
"textSentimentModelMetadata": {},
"trainExampleCount": 0,
"translationModelMetadata": {
"baseModel": "",
"sourceLanguageCode": "",
"targetLanguageCode": ""
},
"updateTime": "",
"validateExampleCount": 0,
"videoClassificationModelMetadata": {},
"videoObjectTrackingModelMetadata": {}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1beta1/:parent/models")
.setHeader("content-type", "application/json")
.setBody("{\n \"createTime\": \"\",\n \"datasetId\": \"\",\n \"deploymentState\": \"\",\n \"displayName\": \"\",\n \"imageClassificationModelMetadata\": {\n \"baseModelId\": \"\",\n \"modelType\": \"\",\n \"nodeCount\": \"\",\n \"nodeQps\": \"\",\n \"stopReason\": \"\",\n \"trainBudget\": \"\",\n \"trainCost\": \"\"\n },\n \"imageObjectDetectionModelMetadata\": {\n \"modelType\": \"\",\n \"nodeCount\": \"\",\n \"nodeQps\": \"\",\n \"stopReason\": \"\",\n \"trainBudgetMilliNodeHours\": \"\",\n \"trainCostMilliNodeHours\": \"\"\n },\n \"name\": \"\",\n \"tablesModelMetadata\": {\n \"disableEarlyStopping\": false,\n \"inputFeatureColumnSpecs\": [\n {\n \"dataStats\": {\n \"arrayStats\": {\n \"memberStats\": \"\"\n },\n \"categoryStats\": {\n \"topCategoryStats\": [\n {\n \"count\": \"\",\n \"value\": \"\"\n }\n ]\n },\n \"distinctValueCount\": \"\",\n \"float64Stats\": {\n \"histogramBuckets\": [\n {\n \"count\": \"\",\n \"max\": \"\",\n \"min\": \"\"\n }\n ],\n \"mean\": \"\",\n \"quantiles\": [],\n \"standardDeviation\": \"\"\n },\n \"nullValueCount\": \"\",\n \"stringStats\": {\n \"topUnigramStats\": [\n {\n \"count\": \"\",\n \"value\": \"\"\n }\n ]\n },\n \"structStats\": {\n \"fieldStats\": {}\n },\n \"timestampStats\": {\n \"granularStats\": {}\n },\n \"validValueCount\": \"\"\n },\n \"dataType\": {\n \"listElementType\": \"\",\n \"nullable\": false,\n \"structType\": {\n \"fields\": {}\n },\n \"timeFormat\": \"\",\n \"typeCode\": \"\"\n },\n \"displayName\": \"\",\n \"etag\": \"\",\n \"name\": \"\",\n \"topCorrelatedColumns\": [\n {\n \"columnSpecId\": \"\",\n \"correlationStats\": {\n \"cramersV\": \"\"\n }\n }\n ]\n }\n ],\n \"optimizationObjective\": \"\",\n \"optimizationObjectivePrecisionValue\": \"\",\n \"optimizationObjectiveRecallValue\": \"\",\n \"tablesModelColumnInfo\": [\n {\n \"columnDisplayName\": \"\",\n \"columnSpecName\": \"\",\n \"featureImportance\": \"\"\n }\n ],\n \"targetColumnSpec\": {},\n \"trainBudgetMilliNodeHours\": \"\",\n \"trainCostMilliNodeHours\": \"\"\n },\n \"textClassificationModelMetadata\": {\n \"classificationType\": \"\"\n },\n \"textExtractionModelMetadata\": {\n \"modelHint\": \"\"\n },\n \"textSentimentModelMetadata\": {},\n \"trainExampleCount\": 0,\n \"translationModelMetadata\": {\n \"baseModel\": \"\",\n \"sourceLanguageCode\": \"\",\n \"targetLanguageCode\": \"\"\n },\n \"updateTime\": \"\",\n \"validateExampleCount\": 0,\n \"videoClassificationModelMetadata\": {},\n \"videoObjectTrackingModelMetadata\": {}\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1beta1/:parent/models"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"createTime\": \"\",\n \"datasetId\": \"\",\n \"deploymentState\": \"\",\n \"displayName\": \"\",\n \"imageClassificationModelMetadata\": {\n \"baseModelId\": \"\",\n \"modelType\": \"\",\n \"nodeCount\": \"\",\n \"nodeQps\": \"\",\n \"stopReason\": \"\",\n \"trainBudget\": \"\",\n \"trainCost\": \"\"\n },\n \"imageObjectDetectionModelMetadata\": {\n \"modelType\": \"\",\n \"nodeCount\": \"\",\n \"nodeQps\": \"\",\n \"stopReason\": \"\",\n \"trainBudgetMilliNodeHours\": \"\",\n \"trainCostMilliNodeHours\": \"\"\n },\n \"name\": \"\",\n \"tablesModelMetadata\": {\n \"disableEarlyStopping\": false,\n \"inputFeatureColumnSpecs\": [\n {\n \"dataStats\": {\n \"arrayStats\": {\n \"memberStats\": \"\"\n },\n \"categoryStats\": {\n \"topCategoryStats\": [\n {\n \"count\": \"\",\n \"value\": \"\"\n }\n ]\n },\n \"distinctValueCount\": \"\",\n \"float64Stats\": {\n \"histogramBuckets\": [\n {\n \"count\": \"\",\n \"max\": \"\",\n \"min\": \"\"\n }\n ],\n \"mean\": \"\",\n \"quantiles\": [],\n \"standardDeviation\": \"\"\n },\n \"nullValueCount\": \"\",\n \"stringStats\": {\n \"topUnigramStats\": [\n {\n \"count\": \"\",\n \"value\": \"\"\n }\n ]\n },\n \"structStats\": {\n \"fieldStats\": {}\n },\n \"timestampStats\": {\n \"granularStats\": {}\n },\n \"validValueCount\": \"\"\n },\n \"dataType\": {\n \"listElementType\": \"\",\n \"nullable\": false,\n \"structType\": {\n \"fields\": {}\n },\n \"timeFormat\": \"\",\n \"typeCode\": \"\"\n },\n \"displayName\": \"\",\n \"etag\": \"\",\n \"name\": \"\",\n \"topCorrelatedColumns\": [\n {\n \"columnSpecId\": \"\",\n \"correlationStats\": {\n \"cramersV\": \"\"\n }\n }\n ]\n }\n ],\n \"optimizationObjective\": \"\",\n \"optimizationObjectivePrecisionValue\": \"\",\n \"optimizationObjectiveRecallValue\": \"\",\n \"tablesModelColumnInfo\": [\n {\n \"columnDisplayName\": \"\",\n \"columnSpecName\": \"\",\n \"featureImportance\": \"\"\n }\n ],\n \"targetColumnSpec\": {},\n \"trainBudgetMilliNodeHours\": \"\",\n \"trainCostMilliNodeHours\": \"\"\n },\n \"textClassificationModelMetadata\": {\n \"classificationType\": \"\"\n },\n \"textExtractionModelMetadata\": {\n \"modelHint\": \"\"\n },\n \"textSentimentModelMetadata\": {},\n \"trainExampleCount\": 0,\n \"translationModelMetadata\": {\n \"baseModel\": \"\",\n \"sourceLanguageCode\": \"\",\n \"targetLanguageCode\": \"\"\n },\n \"updateTime\": \"\",\n \"validateExampleCount\": 0,\n \"videoClassificationModelMetadata\": {},\n \"videoObjectTrackingModelMetadata\": {}\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 \"createTime\": \"\",\n \"datasetId\": \"\",\n \"deploymentState\": \"\",\n \"displayName\": \"\",\n \"imageClassificationModelMetadata\": {\n \"baseModelId\": \"\",\n \"modelType\": \"\",\n \"nodeCount\": \"\",\n \"nodeQps\": \"\",\n \"stopReason\": \"\",\n \"trainBudget\": \"\",\n \"trainCost\": \"\"\n },\n \"imageObjectDetectionModelMetadata\": {\n \"modelType\": \"\",\n \"nodeCount\": \"\",\n \"nodeQps\": \"\",\n \"stopReason\": \"\",\n \"trainBudgetMilliNodeHours\": \"\",\n \"trainCostMilliNodeHours\": \"\"\n },\n \"name\": \"\",\n \"tablesModelMetadata\": {\n \"disableEarlyStopping\": false,\n \"inputFeatureColumnSpecs\": [\n {\n \"dataStats\": {\n \"arrayStats\": {\n \"memberStats\": \"\"\n },\n \"categoryStats\": {\n \"topCategoryStats\": [\n {\n \"count\": \"\",\n \"value\": \"\"\n }\n ]\n },\n \"distinctValueCount\": \"\",\n \"float64Stats\": {\n \"histogramBuckets\": [\n {\n \"count\": \"\",\n \"max\": \"\",\n \"min\": \"\"\n }\n ],\n \"mean\": \"\",\n \"quantiles\": [],\n \"standardDeviation\": \"\"\n },\n \"nullValueCount\": \"\",\n \"stringStats\": {\n \"topUnigramStats\": [\n {\n \"count\": \"\",\n \"value\": \"\"\n }\n ]\n },\n \"structStats\": {\n \"fieldStats\": {}\n },\n \"timestampStats\": {\n \"granularStats\": {}\n },\n \"validValueCount\": \"\"\n },\n \"dataType\": {\n \"listElementType\": \"\",\n \"nullable\": false,\n \"structType\": {\n \"fields\": {}\n },\n \"timeFormat\": \"\",\n \"typeCode\": \"\"\n },\n \"displayName\": \"\",\n \"etag\": \"\",\n \"name\": \"\",\n \"topCorrelatedColumns\": [\n {\n \"columnSpecId\": \"\",\n \"correlationStats\": {\n \"cramersV\": \"\"\n }\n }\n ]\n }\n ],\n \"optimizationObjective\": \"\",\n \"optimizationObjectivePrecisionValue\": \"\",\n \"optimizationObjectiveRecallValue\": \"\",\n \"tablesModelColumnInfo\": [\n {\n \"columnDisplayName\": \"\",\n \"columnSpecName\": \"\",\n \"featureImportance\": \"\"\n }\n ],\n \"targetColumnSpec\": {},\n \"trainBudgetMilliNodeHours\": \"\",\n \"trainCostMilliNodeHours\": \"\"\n },\n \"textClassificationModelMetadata\": {\n \"classificationType\": \"\"\n },\n \"textExtractionModelMetadata\": {\n \"modelHint\": \"\"\n },\n \"textSentimentModelMetadata\": {},\n \"trainExampleCount\": 0,\n \"translationModelMetadata\": {\n \"baseModel\": \"\",\n \"sourceLanguageCode\": \"\",\n \"targetLanguageCode\": \"\"\n },\n \"updateTime\": \"\",\n \"validateExampleCount\": 0,\n \"videoClassificationModelMetadata\": {},\n \"videoObjectTrackingModelMetadata\": {}\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1beta1/:parent/models")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1beta1/:parent/models")
.header("content-type", "application/json")
.body("{\n \"createTime\": \"\",\n \"datasetId\": \"\",\n \"deploymentState\": \"\",\n \"displayName\": \"\",\n \"imageClassificationModelMetadata\": {\n \"baseModelId\": \"\",\n \"modelType\": \"\",\n \"nodeCount\": \"\",\n \"nodeQps\": \"\",\n \"stopReason\": \"\",\n \"trainBudget\": \"\",\n \"trainCost\": \"\"\n },\n \"imageObjectDetectionModelMetadata\": {\n \"modelType\": \"\",\n \"nodeCount\": \"\",\n \"nodeQps\": \"\",\n \"stopReason\": \"\",\n \"trainBudgetMilliNodeHours\": \"\",\n \"trainCostMilliNodeHours\": \"\"\n },\n \"name\": \"\",\n \"tablesModelMetadata\": {\n \"disableEarlyStopping\": false,\n \"inputFeatureColumnSpecs\": [\n {\n \"dataStats\": {\n \"arrayStats\": {\n \"memberStats\": \"\"\n },\n \"categoryStats\": {\n \"topCategoryStats\": [\n {\n \"count\": \"\",\n \"value\": \"\"\n }\n ]\n },\n \"distinctValueCount\": \"\",\n \"float64Stats\": {\n \"histogramBuckets\": [\n {\n \"count\": \"\",\n \"max\": \"\",\n \"min\": \"\"\n }\n ],\n \"mean\": \"\",\n \"quantiles\": [],\n \"standardDeviation\": \"\"\n },\n \"nullValueCount\": \"\",\n \"stringStats\": {\n \"topUnigramStats\": [\n {\n \"count\": \"\",\n \"value\": \"\"\n }\n ]\n },\n \"structStats\": {\n \"fieldStats\": {}\n },\n \"timestampStats\": {\n \"granularStats\": {}\n },\n \"validValueCount\": \"\"\n },\n \"dataType\": {\n \"listElementType\": \"\",\n \"nullable\": false,\n \"structType\": {\n \"fields\": {}\n },\n \"timeFormat\": \"\",\n \"typeCode\": \"\"\n },\n \"displayName\": \"\",\n \"etag\": \"\",\n \"name\": \"\",\n \"topCorrelatedColumns\": [\n {\n \"columnSpecId\": \"\",\n \"correlationStats\": {\n \"cramersV\": \"\"\n }\n }\n ]\n }\n ],\n \"optimizationObjective\": \"\",\n \"optimizationObjectivePrecisionValue\": \"\",\n \"optimizationObjectiveRecallValue\": \"\",\n \"tablesModelColumnInfo\": [\n {\n \"columnDisplayName\": \"\",\n \"columnSpecName\": \"\",\n \"featureImportance\": \"\"\n }\n ],\n \"targetColumnSpec\": {},\n \"trainBudgetMilliNodeHours\": \"\",\n \"trainCostMilliNodeHours\": \"\"\n },\n \"textClassificationModelMetadata\": {\n \"classificationType\": \"\"\n },\n \"textExtractionModelMetadata\": {\n \"modelHint\": \"\"\n },\n \"textSentimentModelMetadata\": {},\n \"trainExampleCount\": 0,\n \"translationModelMetadata\": {\n \"baseModel\": \"\",\n \"sourceLanguageCode\": \"\",\n \"targetLanguageCode\": \"\"\n },\n \"updateTime\": \"\",\n \"validateExampleCount\": 0,\n \"videoClassificationModelMetadata\": {},\n \"videoObjectTrackingModelMetadata\": {}\n}")
.asString();
const data = JSON.stringify({
createTime: '',
datasetId: '',
deploymentState: '',
displayName: '',
imageClassificationModelMetadata: {
baseModelId: '',
modelType: '',
nodeCount: '',
nodeQps: '',
stopReason: '',
trainBudget: '',
trainCost: ''
},
imageObjectDetectionModelMetadata: {
modelType: '',
nodeCount: '',
nodeQps: '',
stopReason: '',
trainBudgetMilliNodeHours: '',
trainCostMilliNodeHours: ''
},
name: '',
tablesModelMetadata: {
disableEarlyStopping: false,
inputFeatureColumnSpecs: [
{
dataStats: {
arrayStats: {
memberStats: ''
},
categoryStats: {
topCategoryStats: [
{
count: '',
value: ''
}
]
},
distinctValueCount: '',
float64Stats: {
histogramBuckets: [
{
count: '',
max: '',
min: ''
}
],
mean: '',
quantiles: [],
standardDeviation: ''
},
nullValueCount: '',
stringStats: {
topUnigramStats: [
{
count: '',
value: ''
}
]
},
structStats: {
fieldStats: {}
},
timestampStats: {
granularStats: {}
},
validValueCount: ''
},
dataType: {
listElementType: '',
nullable: false,
structType: {
fields: {}
},
timeFormat: '',
typeCode: ''
},
displayName: '',
etag: '',
name: '',
topCorrelatedColumns: [
{
columnSpecId: '',
correlationStats: {
cramersV: ''
}
}
]
}
],
optimizationObjective: '',
optimizationObjectivePrecisionValue: '',
optimizationObjectiveRecallValue: '',
tablesModelColumnInfo: [
{
columnDisplayName: '',
columnSpecName: '',
featureImportance: ''
}
],
targetColumnSpec: {},
trainBudgetMilliNodeHours: '',
trainCostMilliNodeHours: ''
},
textClassificationModelMetadata: {
classificationType: ''
},
textExtractionModelMetadata: {
modelHint: ''
},
textSentimentModelMetadata: {},
trainExampleCount: 0,
translationModelMetadata: {
baseModel: '',
sourceLanguageCode: '',
targetLanguageCode: ''
},
updateTime: '',
validateExampleCount: 0,
videoClassificationModelMetadata: {},
videoObjectTrackingModelMetadata: {}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v1beta1/:parent/models');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1beta1/:parent/models',
headers: {'content-type': 'application/json'},
data: {
createTime: '',
datasetId: '',
deploymentState: '',
displayName: '',
imageClassificationModelMetadata: {
baseModelId: '',
modelType: '',
nodeCount: '',
nodeQps: '',
stopReason: '',
trainBudget: '',
trainCost: ''
},
imageObjectDetectionModelMetadata: {
modelType: '',
nodeCount: '',
nodeQps: '',
stopReason: '',
trainBudgetMilliNodeHours: '',
trainCostMilliNodeHours: ''
},
name: '',
tablesModelMetadata: {
disableEarlyStopping: false,
inputFeatureColumnSpecs: [
{
dataStats: {
arrayStats: {memberStats: ''},
categoryStats: {topCategoryStats: [{count: '', value: ''}]},
distinctValueCount: '',
float64Stats: {
histogramBuckets: [{count: '', max: '', min: ''}],
mean: '',
quantiles: [],
standardDeviation: ''
},
nullValueCount: '',
stringStats: {topUnigramStats: [{count: '', value: ''}]},
structStats: {fieldStats: {}},
timestampStats: {granularStats: {}},
validValueCount: ''
},
dataType: {
listElementType: '',
nullable: false,
structType: {fields: {}},
timeFormat: '',
typeCode: ''
},
displayName: '',
etag: '',
name: '',
topCorrelatedColumns: [{columnSpecId: '', correlationStats: {cramersV: ''}}]
}
],
optimizationObjective: '',
optimizationObjectivePrecisionValue: '',
optimizationObjectiveRecallValue: '',
tablesModelColumnInfo: [{columnDisplayName: '', columnSpecName: '', featureImportance: ''}],
targetColumnSpec: {},
trainBudgetMilliNodeHours: '',
trainCostMilliNodeHours: ''
},
textClassificationModelMetadata: {classificationType: ''},
textExtractionModelMetadata: {modelHint: ''},
textSentimentModelMetadata: {},
trainExampleCount: 0,
translationModelMetadata: {baseModel: '', sourceLanguageCode: '', targetLanguageCode: ''},
updateTime: '',
validateExampleCount: 0,
videoClassificationModelMetadata: {},
videoObjectTrackingModelMetadata: {}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1beta1/:parent/models';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"createTime":"","datasetId":"","deploymentState":"","displayName":"","imageClassificationModelMetadata":{"baseModelId":"","modelType":"","nodeCount":"","nodeQps":"","stopReason":"","trainBudget":"","trainCost":""},"imageObjectDetectionModelMetadata":{"modelType":"","nodeCount":"","nodeQps":"","stopReason":"","trainBudgetMilliNodeHours":"","trainCostMilliNodeHours":""},"name":"","tablesModelMetadata":{"disableEarlyStopping":false,"inputFeatureColumnSpecs":[{"dataStats":{"arrayStats":{"memberStats":""},"categoryStats":{"topCategoryStats":[{"count":"","value":""}]},"distinctValueCount":"","float64Stats":{"histogramBuckets":[{"count":"","max":"","min":""}],"mean":"","quantiles":[],"standardDeviation":""},"nullValueCount":"","stringStats":{"topUnigramStats":[{"count":"","value":""}]},"structStats":{"fieldStats":{}},"timestampStats":{"granularStats":{}},"validValueCount":""},"dataType":{"listElementType":"","nullable":false,"structType":{"fields":{}},"timeFormat":"","typeCode":""},"displayName":"","etag":"","name":"","topCorrelatedColumns":[{"columnSpecId":"","correlationStats":{"cramersV":""}}]}],"optimizationObjective":"","optimizationObjectivePrecisionValue":"","optimizationObjectiveRecallValue":"","tablesModelColumnInfo":[{"columnDisplayName":"","columnSpecName":"","featureImportance":""}],"targetColumnSpec":{},"trainBudgetMilliNodeHours":"","trainCostMilliNodeHours":""},"textClassificationModelMetadata":{"classificationType":""},"textExtractionModelMetadata":{"modelHint":""},"textSentimentModelMetadata":{},"trainExampleCount":0,"translationModelMetadata":{"baseModel":"","sourceLanguageCode":"","targetLanguageCode":""},"updateTime":"","validateExampleCount":0,"videoClassificationModelMetadata":{},"videoObjectTrackingModelMetadata":{}}'
};
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}}/v1beta1/:parent/models',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "createTime": "",\n "datasetId": "",\n "deploymentState": "",\n "displayName": "",\n "imageClassificationModelMetadata": {\n "baseModelId": "",\n "modelType": "",\n "nodeCount": "",\n "nodeQps": "",\n "stopReason": "",\n "trainBudget": "",\n "trainCost": ""\n },\n "imageObjectDetectionModelMetadata": {\n "modelType": "",\n "nodeCount": "",\n "nodeQps": "",\n "stopReason": "",\n "trainBudgetMilliNodeHours": "",\n "trainCostMilliNodeHours": ""\n },\n "name": "",\n "tablesModelMetadata": {\n "disableEarlyStopping": false,\n "inputFeatureColumnSpecs": [\n {\n "dataStats": {\n "arrayStats": {\n "memberStats": ""\n },\n "categoryStats": {\n "topCategoryStats": [\n {\n "count": "",\n "value": ""\n }\n ]\n },\n "distinctValueCount": "",\n "float64Stats": {\n "histogramBuckets": [\n {\n "count": "",\n "max": "",\n "min": ""\n }\n ],\n "mean": "",\n "quantiles": [],\n "standardDeviation": ""\n },\n "nullValueCount": "",\n "stringStats": {\n "topUnigramStats": [\n {\n "count": "",\n "value": ""\n }\n ]\n },\n "structStats": {\n "fieldStats": {}\n },\n "timestampStats": {\n "granularStats": {}\n },\n "validValueCount": ""\n },\n "dataType": {\n "listElementType": "",\n "nullable": false,\n "structType": {\n "fields": {}\n },\n "timeFormat": "",\n "typeCode": ""\n },\n "displayName": "",\n "etag": "",\n "name": "",\n "topCorrelatedColumns": [\n {\n "columnSpecId": "",\n "correlationStats": {\n "cramersV": ""\n }\n }\n ]\n }\n ],\n "optimizationObjective": "",\n "optimizationObjectivePrecisionValue": "",\n "optimizationObjectiveRecallValue": "",\n "tablesModelColumnInfo": [\n {\n "columnDisplayName": "",\n "columnSpecName": "",\n "featureImportance": ""\n }\n ],\n "targetColumnSpec": {},\n "trainBudgetMilliNodeHours": "",\n "trainCostMilliNodeHours": ""\n },\n "textClassificationModelMetadata": {\n "classificationType": ""\n },\n "textExtractionModelMetadata": {\n "modelHint": ""\n },\n "textSentimentModelMetadata": {},\n "trainExampleCount": 0,\n "translationModelMetadata": {\n "baseModel": "",\n "sourceLanguageCode": "",\n "targetLanguageCode": ""\n },\n "updateTime": "",\n "validateExampleCount": 0,\n "videoClassificationModelMetadata": {},\n "videoObjectTrackingModelMetadata": {}\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"createTime\": \"\",\n \"datasetId\": \"\",\n \"deploymentState\": \"\",\n \"displayName\": \"\",\n \"imageClassificationModelMetadata\": {\n \"baseModelId\": \"\",\n \"modelType\": \"\",\n \"nodeCount\": \"\",\n \"nodeQps\": \"\",\n \"stopReason\": \"\",\n \"trainBudget\": \"\",\n \"trainCost\": \"\"\n },\n \"imageObjectDetectionModelMetadata\": {\n \"modelType\": \"\",\n \"nodeCount\": \"\",\n \"nodeQps\": \"\",\n \"stopReason\": \"\",\n \"trainBudgetMilliNodeHours\": \"\",\n \"trainCostMilliNodeHours\": \"\"\n },\n \"name\": \"\",\n \"tablesModelMetadata\": {\n \"disableEarlyStopping\": false,\n \"inputFeatureColumnSpecs\": [\n {\n \"dataStats\": {\n \"arrayStats\": {\n \"memberStats\": \"\"\n },\n \"categoryStats\": {\n \"topCategoryStats\": [\n {\n \"count\": \"\",\n \"value\": \"\"\n }\n ]\n },\n \"distinctValueCount\": \"\",\n \"float64Stats\": {\n \"histogramBuckets\": [\n {\n \"count\": \"\",\n \"max\": \"\",\n \"min\": \"\"\n }\n ],\n \"mean\": \"\",\n \"quantiles\": [],\n \"standardDeviation\": \"\"\n },\n \"nullValueCount\": \"\",\n \"stringStats\": {\n \"topUnigramStats\": [\n {\n \"count\": \"\",\n \"value\": \"\"\n }\n ]\n },\n \"structStats\": {\n \"fieldStats\": {}\n },\n \"timestampStats\": {\n \"granularStats\": {}\n },\n \"validValueCount\": \"\"\n },\n \"dataType\": {\n \"listElementType\": \"\",\n \"nullable\": false,\n \"structType\": {\n \"fields\": {}\n },\n \"timeFormat\": \"\",\n \"typeCode\": \"\"\n },\n \"displayName\": \"\",\n \"etag\": \"\",\n \"name\": \"\",\n \"topCorrelatedColumns\": [\n {\n \"columnSpecId\": \"\",\n \"correlationStats\": {\n \"cramersV\": \"\"\n }\n }\n ]\n }\n ],\n \"optimizationObjective\": \"\",\n \"optimizationObjectivePrecisionValue\": \"\",\n \"optimizationObjectiveRecallValue\": \"\",\n \"tablesModelColumnInfo\": [\n {\n \"columnDisplayName\": \"\",\n \"columnSpecName\": \"\",\n \"featureImportance\": \"\"\n }\n ],\n \"targetColumnSpec\": {},\n \"trainBudgetMilliNodeHours\": \"\",\n \"trainCostMilliNodeHours\": \"\"\n },\n \"textClassificationModelMetadata\": {\n \"classificationType\": \"\"\n },\n \"textExtractionModelMetadata\": {\n \"modelHint\": \"\"\n },\n \"textSentimentModelMetadata\": {},\n \"trainExampleCount\": 0,\n \"translationModelMetadata\": {\n \"baseModel\": \"\",\n \"sourceLanguageCode\": \"\",\n \"targetLanguageCode\": \"\"\n },\n \"updateTime\": \"\",\n \"validateExampleCount\": 0,\n \"videoClassificationModelMetadata\": {},\n \"videoObjectTrackingModelMetadata\": {}\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1beta1/:parent/models")
.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/v1beta1/:parent/models',
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({
createTime: '',
datasetId: '',
deploymentState: '',
displayName: '',
imageClassificationModelMetadata: {
baseModelId: '',
modelType: '',
nodeCount: '',
nodeQps: '',
stopReason: '',
trainBudget: '',
trainCost: ''
},
imageObjectDetectionModelMetadata: {
modelType: '',
nodeCount: '',
nodeQps: '',
stopReason: '',
trainBudgetMilliNodeHours: '',
trainCostMilliNodeHours: ''
},
name: '',
tablesModelMetadata: {
disableEarlyStopping: false,
inputFeatureColumnSpecs: [
{
dataStats: {
arrayStats: {memberStats: ''},
categoryStats: {topCategoryStats: [{count: '', value: ''}]},
distinctValueCount: '',
float64Stats: {
histogramBuckets: [{count: '', max: '', min: ''}],
mean: '',
quantiles: [],
standardDeviation: ''
},
nullValueCount: '',
stringStats: {topUnigramStats: [{count: '', value: ''}]},
structStats: {fieldStats: {}},
timestampStats: {granularStats: {}},
validValueCount: ''
},
dataType: {
listElementType: '',
nullable: false,
structType: {fields: {}},
timeFormat: '',
typeCode: ''
},
displayName: '',
etag: '',
name: '',
topCorrelatedColumns: [{columnSpecId: '', correlationStats: {cramersV: ''}}]
}
],
optimizationObjective: '',
optimizationObjectivePrecisionValue: '',
optimizationObjectiveRecallValue: '',
tablesModelColumnInfo: [{columnDisplayName: '', columnSpecName: '', featureImportance: ''}],
targetColumnSpec: {},
trainBudgetMilliNodeHours: '',
trainCostMilliNodeHours: ''
},
textClassificationModelMetadata: {classificationType: ''},
textExtractionModelMetadata: {modelHint: ''},
textSentimentModelMetadata: {},
trainExampleCount: 0,
translationModelMetadata: {baseModel: '', sourceLanguageCode: '', targetLanguageCode: ''},
updateTime: '',
validateExampleCount: 0,
videoClassificationModelMetadata: {},
videoObjectTrackingModelMetadata: {}
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1beta1/:parent/models',
headers: {'content-type': 'application/json'},
body: {
createTime: '',
datasetId: '',
deploymentState: '',
displayName: '',
imageClassificationModelMetadata: {
baseModelId: '',
modelType: '',
nodeCount: '',
nodeQps: '',
stopReason: '',
trainBudget: '',
trainCost: ''
},
imageObjectDetectionModelMetadata: {
modelType: '',
nodeCount: '',
nodeQps: '',
stopReason: '',
trainBudgetMilliNodeHours: '',
trainCostMilliNodeHours: ''
},
name: '',
tablesModelMetadata: {
disableEarlyStopping: false,
inputFeatureColumnSpecs: [
{
dataStats: {
arrayStats: {memberStats: ''},
categoryStats: {topCategoryStats: [{count: '', value: ''}]},
distinctValueCount: '',
float64Stats: {
histogramBuckets: [{count: '', max: '', min: ''}],
mean: '',
quantiles: [],
standardDeviation: ''
},
nullValueCount: '',
stringStats: {topUnigramStats: [{count: '', value: ''}]},
structStats: {fieldStats: {}},
timestampStats: {granularStats: {}},
validValueCount: ''
},
dataType: {
listElementType: '',
nullable: false,
structType: {fields: {}},
timeFormat: '',
typeCode: ''
},
displayName: '',
etag: '',
name: '',
topCorrelatedColumns: [{columnSpecId: '', correlationStats: {cramersV: ''}}]
}
],
optimizationObjective: '',
optimizationObjectivePrecisionValue: '',
optimizationObjectiveRecallValue: '',
tablesModelColumnInfo: [{columnDisplayName: '', columnSpecName: '', featureImportance: ''}],
targetColumnSpec: {},
trainBudgetMilliNodeHours: '',
trainCostMilliNodeHours: ''
},
textClassificationModelMetadata: {classificationType: ''},
textExtractionModelMetadata: {modelHint: ''},
textSentimentModelMetadata: {},
trainExampleCount: 0,
translationModelMetadata: {baseModel: '', sourceLanguageCode: '', targetLanguageCode: ''},
updateTime: '',
validateExampleCount: 0,
videoClassificationModelMetadata: {},
videoObjectTrackingModelMetadata: {}
},
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}}/v1beta1/:parent/models');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
createTime: '',
datasetId: '',
deploymentState: '',
displayName: '',
imageClassificationModelMetadata: {
baseModelId: '',
modelType: '',
nodeCount: '',
nodeQps: '',
stopReason: '',
trainBudget: '',
trainCost: ''
},
imageObjectDetectionModelMetadata: {
modelType: '',
nodeCount: '',
nodeQps: '',
stopReason: '',
trainBudgetMilliNodeHours: '',
trainCostMilliNodeHours: ''
},
name: '',
tablesModelMetadata: {
disableEarlyStopping: false,
inputFeatureColumnSpecs: [
{
dataStats: {
arrayStats: {
memberStats: ''
},
categoryStats: {
topCategoryStats: [
{
count: '',
value: ''
}
]
},
distinctValueCount: '',
float64Stats: {
histogramBuckets: [
{
count: '',
max: '',
min: ''
}
],
mean: '',
quantiles: [],
standardDeviation: ''
},
nullValueCount: '',
stringStats: {
topUnigramStats: [
{
count: '',
value: ''
}
]
},
structStats: {
fieldStats: {}
},
timestampStats: {
granularStats: {}
},
validValueCount: ''
},
dataType: {
listElementType: '',
nullable: false,
structType: {
fields: {}
},
timeFormat: '',
typeCode: ''
},
displayName: '',
etag: '',
name: '',
topCorrelatedColumns: [
{
columnSpecId: '',
correlationStats: {
cramersV: ''
}
}
]
}
],
optimizationObjective: '',
optimizationObjectivePrecisionValue: '',
optimizationObjectiveRecallValue: '',
tablesModelColumnInfo: [
{
columnDisplayName: '',
columnSpecName: '',
featureImportance: ''
}
],
targetColumnSpec: {},
trainBudgetMilliNodeHours: '',
trainCostMilliNodeHours: ''
},
textClassificationModelMetadata: {
classificationType: ''
},
textExtractionModelMetadata: {
modelHint: ''
},
textSentimentModelMetadata: {},
trainExampleCount: 0,
translationModelMetadata: {
baseModel: '',
sourceLanguageCode: '',
targetLanguageCode: ''
},
updateTime: '',
validateExampleCount: 0,
videoClassificationModelMetadata: {},
videoObjectTrackingModelMetadata: {}
});
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}}/v1beta1/:parent/models',
headers: {'content-type': 'application/json'},
data: {
createTime: '',
datasetId: '',
deploymentState: '',
displayName: '',
imageClassificationModelMetadata: {
baseModelId: '',
modelType: '',
nodeCount: '',
nodeQps: '',
stopReason: '',
trainBudget: '',
trainCost: ''
},
imageObjectDetectionModelMetadata: {
modelType: '',
nodeCount: '',
nodeQps: '',
stopReason: '',
trainBudgetMilliNodeHours: '',
trainCostMilliNodeHours: ''
},
name: '',
tablesModelMetadata: {
disableEarlyStopping: false,
inputFeatureColumnSpecs: [
{
dataStats: {
arrayStats: {memberStats: ''},
categoryStats: {topCategoryStats: [{count: '', value: ''}]},
distinctValueCount: '',
float64Stats: {
histogramBuckets: [{count: '', max: '', min: ''}],
mean: '',
quantiles: [],
standardDeviation: ''
},
nullValueCount: '',
stringStats: {topUnigramStats: [{count: '', value: ''}]},
structStats: {fieldStats: {}},
timestampStats: {granularStats: {}},
validValueCount: ''
},
dataType: {
listElementType: '',
nullable: false,
structType: {fields: {}},
timeFormat: '',
typeCode: ''
},
displayName: '',
etag: '',
name: '',
topCorrelatedColumns: [{columnSpecId: '', correlationStats: {cramersV: ''}}]
}
],
optimizationObjective: '',
optimizationObjectivePrecisionValue: '',
optimizationObjectiveRecallValue: '',
tablesModelColumnInfo: [{columnDisplayName: '', columnSpecName: '', featureImportance: ''}],
targetColumnSpec: {},
trainBudgetMilliNodeHours: '',
trainCostMilliNodeHours: ''
},
textClassificationModelMetadata: {classificationType: ''},
textExtractionModelMetadata: {modelHint: ''},
textSentimentModelMetadata: {},
trainExampleCount: 0,
translationModelMetadata: {baseModel: '', sourceLanguageCode: '', targetLanguageCode: ''},
updateTime: '',
validateExampleCount: 0,
videoClassificationModelMetadata: {},
videoObjectTrackingModelMetadata: {}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1beta1/:parent/models';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"createTime":"","datasetId":"","deploymentState":"","displayName":"","imageClassificationModelMetadata":{"baseModelId":"","modelType":"","nodeCount":"","nodeQps":"","stopReason":"","trainBudget":"","trainCost":""},"imageObjectDetectionModelMetadata":{"modelType":"","nodeCount":"","nodeQps":"","stopReason":"","trainBudgetMilliNodeHours":"","trainCostMilliNodeHours":""},"name":"","tablesModelMetadata":{"disableEarlyStopping":false,"inputFeatureColumnSpecs":[{"dataStats":{"arrayStats":{"memberStats":""},"categoryStats":{"topCategoryStats":[{"count":"","value":""}]},"distinctValueCount":"","float64Stats":{"histogramBuckets":[{"count":"","max":"","min":""}],"mean":"","quantiles":[],"standardDeviation":""},"nullValueCount":"","stringStats":{"topUnigramStats":[{"count":"","value":""}]},"structStats":{"fieldStats":{}},"timestampStats":{"granularStats":{}},"validValueCount":""},"dataType":{"listElementType":"","nullable":false,"structType":{"fields":{}},"timeFormat":"","typeCode":""},"displayName":"","etag":"","name":"","topCorrelatedColumns":[{"columnSpecId":"","correlationStats":{"cramersV":""}}]}],"optimizationObjective":"","optimizationObjectivePrecisionValue":"","optimizationObjectiveRecallValue":"","tablesModelColumnInfo":[{"columnDisplayName":"","columnSpecName":"","featureImportance":""}],"targetColumnSpec":{},"trainBudgetMilliNodeHours":"","trainCostMilliNodeHours":""},"textClassificationModelMetadata":{"classificationType":""},"textExtractionModelMetadata":{"modelHint":""},"textSentimentModelMetadata":{},"trainExampleCount":0,"translationModelMetadata":{"baseModel":"","sourceLanguageCode":"","targetLanguageCode":""},"updateTime":"","validateExampleCount":0,"videoClassificationModelMetadata":{},"videoObjectTrackingModelMetadata":{}}'
};
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 = @{ @"createTime": @"",
@"datasetId": @"",
@"deploymentState": @"",
@"displayName": @"",
@"imageClassificationModelMetadata": @{ @"baseModelId": @"", @"modelType": @"", @"nodeCount": @"", @"nodeQps": @"", @"stopReason": @"", @"trainBudget": @"", @"trainCost": @"" },
@"imageObjectDetectionModelMetadata": @{ @"modelType": @"", @"nodeCount": @"", @"nodeQps": @"", @"stopReason": @"", @"trainBudgetMilliNodeHours": @"", @"trainCostMilliNodeHours": @"" },
@"name": @"",
@"tablesModelMetadata": @{ @"disableEarlyStopping": @NO, @"inputFeatureColumnSpecs": @[ @{ @"dataStats": @{ @"arrayStats": @{ @"memberStats": @"" }, @"categoryStats": @{ @"topCategoryStats": @[ @{ @"count": @"", @"value": @"" } ] }, @"distinctValueCount": @"", @"float64Stats": @{ @"histogramBuckets": @[ @{ @"count": @"", @"max": @"", @"min": @"" } ], @"mean": @"", @"quantiles": @[ ], @"standardDeviation": @"" }, @"nullValueCount": @"", @"stringStats": @{ @"topUnigramStats": @[ @{ @"count": @"", @"value": @"" } ] }, @"structStats": @{ @"fieldStats": @{ } }, @"timestampStats": @{ @"granularStats": @{ } }, @"validValueCount": @"" }, @"dataType": @{ @"listElementType": @"", @"nullable": @NO, @"structType": @{ @"fields": @{ } }, @"timeFormat": @"", @"typeCode": @"" }, @"displayName": @"", @"etag": @"", @"name": @"", @"topCorrelatedColumns": @[ @{ @"columnSpecId": @"", @"correlationStats": @{ @"cramersV": @"" } } ] } ], @"optimizationObjective": @"", @"optimizationObjectivePrecisionValue": @"", @"optimizationObjectiveRecallValue": @"", @"tablesModelColumnInfo": @[ @{ @"columnDisplayName": @"", @"columnSpecName": @"", @"featureImportance": @"" } ], @"targetColumnSpec": @{ }, @"trainBudgetMilliNodeHours": @"", @"trainCostMilliNodeHours": @"" },
@"textClassificationModelMetadata": @{ @"classificationType": @"" },
@"textExtractionModelMetadata": @{ @"modelHint": @"" },
@"textSentimentModelMetadata": @{ },
@"trainExampleCount": @0,
@"translationModelMetadata": @{ @"baseModel": @"", @"sourceLanguageCode": @"", @"targetLanguageCode": @"" },
@"updateTime": @"",
@"validateExampleCount": @0,
@"videoClassificationModelMetadata": @{ },
@"videoObjectTrackingModelMetadata": @{ } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1beta1/:parent/models"]
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}}/v1beta1/:parent/models" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"createTime\": \"\",\n \"datasetId\": \"\",\n \"deploymentState\": \"\",\n \"displayName\": \"\",\n \"imageClassificationModelMetadata\": {\n \"baseModelId\": \"\",\n \"modelType\": \"\",\n \"nodeCount\": \"\",\n \"nodeQps\": \"\",\n \"stopReason\": \"\",\n \"trainBudget\": \"\",\n \"trainCost\": \"\"\n },\n \"imageObjectDetectionModelMetadata\": {\n \"modelType\": \"\",\n \"nodeCount\": \"\",\n \"nodeQps\": \"\",\n \"stopReason\": \"\",\n \"trainBudgetMilliNodeHours\": \"\",\n \"trainCostMilliNodeHours\": \"\"\n },\n \"name\": \"\",\n \"tablesModelMetadata\": {\n \"disableEarlyStopping\": false,\n \"inputFeatureColumnSpecs\": [\n {\n \"dataStats\": {\n \"arrayStats\": {\n \"memberStats\": \"\"\n },\n \"categoryStats\": {\n \"topCategoryStats\": [\n {\n \"count\": \"\",\n \"value\": \"\"\n }\n ]\n },\n \"distinctValueCount\": \"\",\n \"float64Stats\": {\n \"histogramBuckets\": [\n {\n \"count\": \"\",\n \"max\": \"\",\n \"min\": \"\"\n }\n ],\n \"mean\": \"\",\n \"quantiles\": [],\n \"standardDeviation\": \"\"\n },\n \"nullValueCount\": \"\",\n \"stringStats\": {\n \"topUnigramStats\": [\n {\n \"count\": \"\",\n \"value\": \"\"\n }\n ]\n },\n \"structStats\": {\n \"fieldStats\": {}\n },\n \"timestampStats\": {\n \"granularStats\": {}\n },\n \"validValueCount\": \"\"\n },\n \"dataType\": {\n \"listElementType\": \"\",\n \"nullable\": false,\n \"structType\": {\n \"fields\": {}\n },\n \"timeFormat\": \"\",\n \"typeCode\": \"\"\n },\n \"displayName\": \"\",\n \"etag\": \"\",\n \"name\": \"\",\n \"topCorrelatedColumns\": [\n {\n \"columnSpecId\": \"\",\n \"correlationStats\": {\n \"cramersV\": \"\"\n }\n }\n ]\n }\n ],\n \"optimizationObjective\": \"\",\n \"optimizationObjectivePrecisionValue\": \"\",\n \"optimizationObjectiveRecallValue\": \"\",\n \"tablesModelColumnInfo\": [\n {\n \"columnDisplayName\": \"\",\n \"columnSpecName\": \"\",\n \"featureImportance\": \"\"\n }\n ],\n \"targetColumnSpec\": {},\n \"trainBudgetMilliNodeHours\": \"\",\n \"trainCostMilliNodeHours\": \"\"\n },\n \"textClassificationModelMetadata\": {\n \"classificationType\": \"\"\n },\n \"textExtractionModelMetadata\": {\n \"modelHint\": \"\"\n },\n \"textSentimentModelMetadata\": {},\n \"trainExampleCount\": 0,\n \"translationModelMetadata\": {\n \"baseModel\": \"\",\n \"sourceLanguageCode\": \"\",\n \"targetLanguageCode\": \"\"\n },\n \"updateTime\": \"\",\n \"validateExampleCount\": 0,\n \"videoClassificationModelMetadata\": {},\n \"videoObjectTrackingModelMetadata\": {}\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1beta1/:parent/models",
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([
'createTime' => '',
'datasetId' => '',
'deploymentState' => '',
'displayName' => '',
'imageClassificationModelMetadata' => [
'baseModelId' => '',
'modelType' => '',
'nodeCount' => '',
'nodeQps' => '',
'stopReason' => '',
'trainBudget' => '',
'trainCost' => ''
],
'imageObjectDetectionModelMetadata' => [
'modelType' => '',
'nodeCount' => '',
'nodeQps' => '',
'stopReason' => '',
'trainBudgetMilliNodeHours' => '',
'trainCostMilliNodeHours' => ''
],
'name' => '',
'tablesModelMetadata' => [
'disableEarlyStopping' => null,
'inputFeatureColumnSpecs' => [
[
'dataStats' => [
'arrayStats' => [
'memberStats' => ''
],
'categoryStats' => [
'topCategoryStats' => [
[
'count' => '',
'value' => ''
]
]
],
'distinctValueCount' => '',
'float64Stats' => [
'histogramBuckets' => [
[
'count' => '',
'max' => '',
'min' => ''
]
],
'mean' => '',
'quantiles' => [
],
'standardDeviation' => ''
],
'nullValueCount' => '',
'stringStats' => [
'topUnigramStats' => [
[
'count' => '',
'value' => ''
]
]
],
'structStats' => [
'fieldStats' => [
]
],
'timestampStats' => [
'granularStats' => [
]
],
'validValueCount' => ''
],
'dataType' => [
'listElementType' => '',
'nullable' => null,
'structType' => [
'fields' => [
]
],
'timeFormat' => '',
'typeCode' => ''
],
'displayName' => '',
'etag' => '',
'name' => '',
'topCorrelatedColumns' => [
[
'columnSpecId' => '',
'correlationStats' => [
'cramersV' => ''
]
]
]
]
],
'optimizationObjective' => '',
'optimizationObjectivePrecisionValue' => '',
'optimizationObjectiveRecallValue' => '',
'tablesModelColumnInfo' => [
[
'columnDisplayName' => '',
'columnSpecName' => '',
'featureImportance' => ''
]
],
'targetColumnSpec' => [
],
'trainBudgetMilliNodeHours' => '',
'trainCostMilliNodeHours' => ''
],
'textClassificationModelMetadata' => [
'classificationType' => ''
],
'textExtractionModelMetadata' => [
'modelHint' => ''
],
'textSentimentModelMetadata' => [
],
'trainExampleCount' => 0,
'translationModelMetadata' => [
'baseModel' => '',
'sourceLanguageCode' => '',
'targetLanguageCode' => ''
],
'updateTime' => '',
'validateExampleCount' => 0,
'videoClassificationModelMetadata' => [
],
'videoObjectTrackingModelMetadata' => [
]
]),
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}}/v1beta1/:parent/models', [
'body' => '{
"createTime": "",
"datasetId": "",
"deploymentState": "",
"displayName": "",
"imageClassificationModelMetadata": {
"baseModelId": "",
"modelType": "",
"nodeCount": "",
"nodeQps": "",
"stopReason": "",
"trainBudget": "",
"trainCost": ""
},
"imageObjectDetectionModelMetadata": {
"modelType": "",
"nodeCount": "",
"nodeQps": "",
"stopReason": "",
"trainBudgetMilliNodeHours": "",
"trainCostMilliNodeHours": ""
},
"name": "",
"tablesModelMetadata": {
"disableEarlyStopping": false,
"inputFeatureColumnSpecs": [
{
"dataStats": {
"arrayStats": {
"memberStats": ""
},
"categoryStats": {
"topCategoryStats": [
{
"count": "",
"value": ""
}
]
},
"distinctValueCount": "",
"float64Stats": {
"histogramBuckets": [
{
"count": "",
"max": "",
"min": ""
}
],
"mean": "",
"quantiles": [],
"standardDeviation": ""
},
"nullValueCount": "",
"stringStats": {
"topUnigramStats": [
{
"count": "",
"value": ""
}
]
},
"structStats": {
"fieldStats": {}
},
"timestampStats": {
"granularStats": {}
},
"validValueCount": ""
},
"dataType": {
"listElementType": "",
"nullable": false,
"structType": {
"fields": {}
},
"timeFormat": "",
"typeCode": ""
},
"displayName": "",
"etag": "",
"name": "",
"topCorrelatedColumns": [
{
"columnSpecId": "",
"correlationStats": {
"cramersV": ""
}
}
]
}
],
"optimizationObjective": "",
"optimizationObjectivePrecisionValue": "",
"optimizationObjectiveRecallValue": "",
"tablesModelColumnInfo": [
{
"columnDisplayName": "",
"columnSpecName": "",
"featureImportance": ""
}
],
"targetColumnSpec": {},
"trainBudgetMilliNodeHours": "",
"trainCostMilliNodeHours": ""
},
"textClassificationModelMetadata": {
"classificationType": ""
},
"textExtractionModelMetadata": {
"modelHint": ""
},
"textSentimentModelMetadata": {},
"trainExampleCount": 0,
"translationModelMetadata": {
"baseModel": "",
"sourceLanguageCode": "",
"targetLanguageCode": ""
},
"updateTime": "",
"validateExampleCount": 0,
"videoClassificationModelMetadata": {},
"videoObjectTrackingModelMetadata": {}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1beta1/:parent/models');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'createTime' => '',
'datasetId' => '',
'deploymentState' => '',
'displayName' => '',
'imageClassificationModelMetadata' => [
'baseModelId' => '',
'modelType' => '',
'nodeCount' => '',
'nodeQps' => '',
'stopReason' => '',
'trainBudget' => '',
'trainCost' => ''
],
'imageObjectDetectionModelMetadata' => [
'modelType' => '',
'nodeCount' => '',
'nodeQps' => '',
'stopReason' => '',
'trainBudgetMilliNodeHours' => '',
'trainCostMilliNodeHours' => ''
],
'name' => '',
'tablesModelMetadata' => [
'disableEarlyStopping' => null,
'inputFeatureColumnSpecs' => [
[
'dataStats' => [
'arrayStats' => [
'memberStats' => ''
],
'categoryStats' => [
'topCategoryStats' => [
[
'count' => '',
'value' => ''
]
]
],
'distinctValueCount' => '',
'float64Stats' => [
'histogramBuckets' => [
[
'count' => '',
'max' => '',
'min' => ''
]
],
'mean' => '',
'quantiles' => [
],
'standardDeviation' => ''
],
'nullValueCount' => '',
'stringStats' => [
'topUnigramStats' => [
[
'count' => '',
'value' => ''
]
]
],
'structStats' => [
'fieldStats' => [
]
],
'timestampStats' => [
'granularStats' => [
]
],
'validValueCount' => ''
],
'dataType' => [
'listElementType' => '',
'nullable' => null,
'structType' => [
'fields' => [
]
],
'timeFormat' => '',
'typeCode' => ''
],
'displayName' => '',
'etag' => '',
'name' => '',
'topCorrelatedColumns' => [
[
'columnSpecId' => '',
'correlationStats' => [
'cramersV' => ''
]
]
]
]
],
'optimizationObjective' => '',
'optimizationObjectivePrecisionValue' => '',
'optimizationObjectiveRecallValue' => '',
'tablesModelColumnInfo' => [
[
'columnDisplayName' => '',
'columnSpecName' => '',
'featureImportance' => ''
]
],
'targetColumnSpec' => [
],
'trainBudgetMilliNodeHours' => '',
'trainCostMilliNodeHours' => ''
],
'textClassificationModelMetadata' => [
'classificationType' => ''
],
'textExtractionModelMetadata' => [
'modelHint' => ''
],
'textSentimentModelMetadata' => [
],
'trainExampleCount' => 0,
'translationModelMetadata' => [
'baseModel' => '',
'sourceLanguageCode' => '',
'targetLanguageCode' => ''
],
'updateTime' => '',
'validateExampleCount' => 0,
'videoClassificationModelMetadata' => [
],
'videoObjectTrackingModelMetadata' => [
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'createTime' => '',
'datasetId' => '',
'deploymentState' => '',
'displayName' => '',
'imageClassificationModelMetadata' => [
'baseModelId' => '',
'modelType' => '',
'nodeCount' => '',
'nodeQps' => '',
'stopReason' => '',
'trainBudget' => '',
'trainCost' => ''
],
'imageObjectDetectionModelMetadata' => [
'modelType' => '',
'nodeCount' => '',
'nodeQps' => '',
'stopReason' => '',
'trainBudgetMilliNodeHours' => '',
'trainCostMilliNodeHours' => ''
],
'name' => '',
'tablesModelMetadata' => [
'disableEarlyStopping' => null,
'inputFeatureColumnSpecs' => [
[
'dataStats' => [
'arrayStats' => [
'memberStats' => ''
],
'categoryStats' => [
'topCategoryStats' => [
[
'count' => '',
'value' => ''
]
]
],
'distinctValueCount' => '',
'float64Stats' => [
'histogramBuckets' => [
[
'count' => '',
'max' => '',
'min' => ''
]
],
'mean' => '',
'quantiles' => [
],
'standardDeviation' => ''
],
'nullValueCount' => '',
'stringStats' => [
'topUnigramStats' => [
[
'count' => '',
'value' => ''
]
]
],
'structStats' => [
'fieldStats' => [
]
],
'timestampStats' => [
'granularStats' => [
]
],
'validValueCount' => ''
],
'dataType' => [
'listElementType' => '',
'nullable' => null,
'structType' => [
'fields' => [
]
],
'timeFormat' => '',
'typeCode' => ''
],
'displayName' => '',
'etag' => '',
'name' => '',
'topCorrelatedColumns' => [
[
'columnSpecId' => '',
'correlationStats' => [
'cramersV' => ''
]
]
]
]
],
'optimizationObjective' => '',
'optimizationObjectivePrecisionValue' => '',
'optimizationObjectiveRecallValue' => '',
'tablesModelColumnInfo' => [
[
'columnDisplayName' => '',
'columnSpecName' => '',
'featureImportance' => ''
]
],
'targetColumnSpec' => [
],
'trainBudgetMilliNodeHours' => '',
'trainCostMilliNodeHours' => ''
],
'textClassificationModelMetadata' => [
'classificationType' => ''
],
'textExtractionModelMetadata' => [
'modelHint' => ''
],
'textSentimentModelMetadata' => [
],
'trainExampleCount' => 0,
'translationModelMetadata' => [
'baseModel' => '',
'sourceLanguageCode' => '',
'targetLanguageCode' => ''
],
'updateTime' => '',
'validateExampleCount' => 0,
'videoClassificationModelMetadata' => [
],
'videoObjectTrackingModelMetadata' => [
]
]));
$request->setRequestUrl('{{baseUrl}}/v1beta1/:parent/models');
$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}}/v1beta1/:parent/models' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"createTime": "",
"datasetId": "",
"deploymentState": "",
"displayName": "",
"imageClassificationModelMetadata": {
"baseModelId": "",
"modelType": "",
"nodeCount": "",
"nodeQps": "",
"stopReason": "",
"trainBudget": "",
"trainCost": ""
},
"imageObjectDetectionModelMetadata": {
"modelType": "",
"nodeCount": "",
"nodeQps": "",
"stopReason": "",
"trainBudgetMilliNodeHours": "",
"trainCostMilliNodeHours": ""
},
"name": "",
"tablesModelMetadata": {
"disableEarlyStopping": false,
"inputFeatureColumnSpecs": [
{
"dataStats": {
"arrayStats": {
"memberStats": ""
},
"categoryStats": {
"topCategoryStats": [
{
"count": "",
"value": ""
}
]
},
"distinctValueCount": "",
"float64Stats": {
"histogramBuckets": [
{
"count": "",
"max": "",
"min": ""
}
],
"mean": "",
"quantiles": [],
"standardDeviation": ""
},
"nullValueCount": "",
"stringStats": {
"topUnigramStats": [
{
"count": "",
"value": ""
}
]
},
"structStats": {
"fieldStats": {}
},
"timestampStats": {
"granularStats": {}
},
"validValueCount": ""
},
"dataType": {
"listElementType": "",
"nullable": false,
"structType": {
"fields": {}
},
"timeFormat": "",
"typeCode": ""
},
"displayName": "",
"etag": "",
"name": "",
"topCorrelatedColumns": [
{
"columnSpecId": "",
"correlationStats": {
"cramersV": ""
}
}
]
}
],
"optimizationObjective": "",
"optimizationObjectivePrecisionValue": "",
"optimizationObjectiveRecallValue": "",
"tablesModelColumnInfo": [
{
"columnDisplayName": "",
"columnSpecName": "",
"featureImportance": ""
}
],
"targetColumnSpec": {},
"trainBudgetMilliNodeHours": "",
"trainCostMilliNodeHours": ""
},
"textClassificationModelMetadata": {
"classificationType": ""
},
"textExtractionModelMetadata": {
"modelHint": ""
},
"textSentimentModelMetadata": {},
"trainExampleCount": 0,
"translationModelMetadata": {
"baseModel": "",
"sourceLanguageCode": "",
"targetLanguageCode": ""
},
"updateTime": "",
"validateExampleCount": 0,
"videoClassificationModelMetadata": {},
"videoObjectTrackingModelMetadata": {}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1beta1/:parent/models' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"createTime": "",
"datasetId": "",
"deploymentState": "",
"displayName": "",
"imageClassificationModelMetadata": {
"baseModelId": "",
"modelType": "",
"nodeCount": "",
"nodeQps": "",
"stopReason": "",
"trainBudget": "",
"trainCost": ""
},
"imageObjectDetectionModelMetadata": {
"modelType": "",
"nodeCount": "",
"nodeQps": "",
"stopReason": "",
"trainBudgetMilliNodeHours": "",
"trainCostMilliNodeHours": ""
},
"name": "",
"tablesModelMetadata": {
"disableEarlyStopping": false,
"inputFeatureColumnSpecs": [
{
"dataStats": {
"arrayStats": {
"memberStats": ""
},
"categoryStats": {
"topCategoryStats": [
{
"count": "",
"value": ""
}
]
},
"distinctValueCount": "",
"float64Stats": {
"histogramBuckets": [
{
"count": "",
"max": "",
"min": ""
}
],
"mean": "",
"quantiles": [],
"standardDeviation": ""
},
"nullValueCount": "",
"stringStats": {
"topUnigramStats": [
{
"count": "",
"value": ""
}
]
},
"structStats": {
"fieldStats": {}
},
"timestampStats": {
"granularStats": {}
},
"validValueCount": ""
},
"dataType": {
"listElementType": "",
"nullable": false,
"structType": {
"fields": {}
},
"timeFormat": "",
"typeCode": ""
},
"displayName": "",
"etag": "",
"name": "",
"topCorrelatedColumns": [
{
"columnSpecId": "",
"correlationStats": {
"cramersV": ""
}
}
]
}
],
"optimizationObjective": "",
"optimizationObjectivePrecisionValue": "",
"optimizationObjectiveRecallValue": "",
"tablesModelColumnInfo": [
{
"columnDisplayName": "",
"columnSpecName": "",
"featureImportance": ""
}
],
"targetColumnSpec": {},
"trainBudgetMilliNodeHours": "",
"trainCostMilliNodeHours": ""
},
"textClassificationModelMetadata": {
"classificationType": ""
},
"textExtractionModelMetadata": {
"modelHint": ""
},
"textSentimentModelMetadata": {},
"trainExampleCount": 0,
"translationModelMetadata": {
"baseModel": "",
"sourceLanguageCode": "",
"targetLanguageCode": ""
},
"updateTime": "",
"validateExampleCount": 0,
"videoClassificationModelMetadata": {},
"videoObjectTrackingModelMetadata": {}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"createTime\": \"\",\n \"datasetId\": \"\",\n \"deploymentState\": \"\",\n \"displayName\": \"\",\n \"imageClassificationModelMetadata\": {\n \"baseModelId\": \"\",\n \"modelType\": \"\",\n \"nodeCount\": \"\",\n \"nodeQps\": \"\",\n \"stopReason\": \"\",\n \"trainBudget\": \"\",\n \"trainCost\": \"\"\n },\n \"imageObjectDetectionModelMetadata\": {\n \"modelType\": \"\",\n \"nodeCount\": \"\",\n \"nodeQps\": \"\",\n \"stopReason\": \"\",\n \"trainBudgetMilliNodeHours\": \"\",\n \"trainCostMilliNodeHours\": \"\"\n },\n \"name\": \"\",\n \"tablesModelMetadata\": {\n \"disableEarlyStopping\": false,\n \"inputFeatureColumnSpecs\": [\n {\n \"dataStats\": {\n \"arrayStats\": {\n \"memberStats\": \"\"\n },\n \"categoryStats\": {\n \"topCategoryStats\": [\n {\n \"count\": \"\",\n \"value\": \"\"\n }\n ]\n },\n \"distinctValueCount\": \"\",\n \"float64Stats\": {\n \"histogramBuckets\": [\n {\n \"count\": \"\",\n \"max\": \"\",\n \"min\": \"\"\n }\n ],\n \"mean\": \"\",\n \"quantiles\": [],\n \"standardDeviation\": \"\"\n },\n \"nullValueCount\": \"\",\n \"stringStats\": {\n \"topUnigramStats\": [\n {\n \"count\": \"\",\n \"value\": \"\"\n }\n ]\n },\n \"structStats\": {\n \"fieldStats\": {}\n },\n \"timestampStats\": {\n \"granularStats\": {}\n },\n \"validValueCount\": \"\"\n },\n \"dataType\": {\n \"listElementType\": \"\",\n \"nullable\": false,\n \"structType\": {\n \"fields\": {}\n },\n \"timeFormat\": \"\",\n \"typeCode\": \"\"\n },\n \"displayName\": \"\",\n \"etag\": \"\",\n \"name\": \"\",\n \"topCorrelatedColumns\": [\n {\n \"columnSpecId\": \"\",\n \"correlationStats\": {\n \"cramersV\": \"\"\n }\n }\n ]\n }\n ],\n \"optimizationObjective\": \"\",\n \"optimizationObjectivePrecisionValue\": \"\",\n \"optimizationObjectiveRecallValue\": \"\",\n \"tablesModelColumnInfo\": [\n {\n \"columnDisplayName\": \"\",\n \"columnSpecName\": \"\",\n \"featureImportance\": \"\"\n }\n ],\n \"targetColumnSpec\": {},\n \"trainBudgetMilliNodeHours\": \"\",\n \"trainCostMilliNodeHours\": \"\"\n },\n \"textClassificationModelMetadata\": {\n \"classificationType\": \"\"\n },\n \"textExtractionModelMetadata\": {\n \"modelHint\": \"\"\n },\n \"textSentimentModelMetadata\": {},\n \"trainExampleCount\": 0,\n \"translationModelMetadata\": {\n \"baseModel\": \"\",\n \"sourceLanguageCode\": \"\",\n \"targetLanguageCode\": \"\"\n },\n \"updateTime\": \"\",\n \"validateExampleCount\": 0,\n \"videoClassificationModelMetadata\": {},\n \"videoObjectTrackingModelMetadata\": {}\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1beta1/:parent/models", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1beta1/:parent/models"
payload = {
"createTime": "",
"datasetId": "",
"deploymentState": "",
"displayName": "",
"imageClassificationModelMetadata": {
"baseModelId": "",
"modelType": "",
"nodeCount": "",
"nodeQps": "",
"stopReason": "",
"trainBudget": "",
"trainCost": ""
},
"imageObjectDetectionModelMetadata": {
"modelType": "",
"nodeCount": "",
"nodeQps": "",
"stopReason": "",
"trainBudgetMilliNodeHours": "",
"trainCostMilliNodeHours": ""
},
"name": "",
"tablesModelMetadata": {
"disableEarlyStopping": False,
"inputFeatureColumnSpecs": [
{
"dataStats": {
"arrayStats": { "memberStats": "" },
"categoryStats": { "topCategoryStats": [
{
"count": "",
"value": ""
}
] },
"distinctValueCount": "",
"float64Stats": {
"histogramBuckets": [
{
"count": "",
"max": "",
"min": ""
}
],
"mean": "",
"quantiles": [],
"standardDeviation": ""
},
"nullValueCount": "",
"stringStats": { "topUnigramStats": [
{
"count": "",
"value": ""
}
] },
"structStats": { "fieldStats": {} },
"timestampStats": { "granularStats": {} },
"validValueCount": ""
},
"dataType": {
"listElementType": "",
"nullable": False,
"structType": { "fields": {} },
"timeFormat": "",
"typeCode": ""
},
"displayName": "",
"etag": "",
"name": "",
"topCorrelatedColumns": [
{
"columnSpecId": "",
"correlationStats": { "cramersV": "" }
}
]
}
],
"optimizationObjective": "",
"optimizationObjectivePrecisionValue": "",
"optimizationObjectiveRecallValue": "",
"tablesModelColumnInfo": [
{
"columnDisplayName": "",
"columnSpecName": "",
"featureImportance": ""
}
],
"targetColumnSpec": {},
"trainBudgetMilliNodeHours": "",
"trainCostMilliNodeHours": ""
},
"textClassificationModelMetadata": { "classificationType": "" },
"textExtractionModelMetadata": { "modelHint": "" },
"textSentimentModelMetadata": {},
"trainExampleCount": 0,
"translationModelMetadata": {
"baseModel": "",
"sourceLanguageCode": "",
"targetLanguageCode": ""
},
"updateTime": "",
"validateExampleCount": 0,
"videoClassificationModelMetadata": {},
"videoObjectTrackingModelMetadata": {}
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1beta1/:parent/models"
payload <- "{\n \"createTime\": \"\",\n \"datasetId\": \"\",\n \"deploymentState\": \"\",\n \"displayName\": \"\",\n \"imageClassificationModelMetadata\": {\n \"baseModelId\": \"\",\n \"modelType\": \"\",\n \"nodeCount\": \"\",\n \"nodeQps\": \"\",\n \"stopReason\": \"\",\n \"trainBudget\": \"\",\n \"trainCost\": \"\"\n },\n \"imageObjectDetectionModelMetadata\": {\n \"modelType\": \"\",\n \"nodeCount\": \"\",\n \"nodeQps\": \"\",\n \"stopReason\": \"\",\n \"trainBudgetMilliNodeHours\": \"\",\n \"trainCostMilliNodeHours\": \"\"\n },\n \"name\": \"\",\n \"tablesModelMetadata\": {\n \"disableEarlyStopping\": false,\n \"inputFeatureColumnSpecs\": [\n {\n \"dataStats\": {\n \"arrayStats\": {\n \"memberStats\": \"\"\n },\n \"categoryStats\": {\n \"topCategoryStats\": [\n {\n \"count\": \"\",\n \"value\": \"\"\n }\n ]\n },\n \"distinctValueCount\": \"\",\n \"float64Stats\": {\n \"histogramBuckets\": [\n {\n \"count\": \"\",\n \"max\": \"\",\n \"min\": \"\"\n }\n ],\n \"mean\": \"\",\n \"quantiles\": [],\n \"standardDeviation\": \"\"\n },\n \"nullValueCount\": \"\",\n \"stringStats\": {\n \"topUnigramStats\": [\n {\n \"count\": \"\",\n \"value\": \"\"\n }\n ]\n },\n \"structStats\": {\n \"fieldStats\": {}\n },\n \"timestampStats\": {\n \"granularStats\": {}\n },\n \"validValueCount\": \"\"\n },\n \"dataType\": {\n \"listElementType\": \"\",\n \"nullable\": false,\n \"structType\": {\n \"fields\": {}\n },\n \"timeFormat\": \"\",\n \"typeCode\": \"\"\n },\n \"displayName\": \"\",\n \"etag\": \"\",\n \"name\": \"\",\n \"topCorrelatedColumns\": [\n {\n \"columnSpecId\": \"\",\n \"correlationStats\": {\n \"cramersV\": \"\"\n }\n }\n ]\n }\n ],\n \"optimizationObjective\": \"\",\n \"optimizationObjectivePrecisionValue\": \"\",\n \"optimizationObjectiveRecallValue\": \"\",\n \"tablesModelColumnInfo\": [\n {\n \"columnDisplayName\": \"\",\n \"columnSpecName\": \"\",\n \"featureImportance\": \"\"\n }\n ],\n \"targetColumnSpec\": {},\n \"trainBudgetMilliNodeHours\": \"\",\n \"trainCostMilliNodeHours\": \"\"\n },\n \"textClassificationModelMetadata\": {\n \"classificationType\": \"\"\n },\n \"textExtractionModelMetadata\": {\n \"modelHint\": \"\"\n },\n \"textSentimentModelMetadata\": {},\n \"trainExampleCount\": 0,\n \"translationModelMetadata\": {\n \"baseModel\": \"\",\n \"sourceLanguageCode\": \"\",\n \"targetLanguageCode\": \"\"\n },\n \"updateTime\": \"\",\n \"validateExampleCount\": 0,\n \"videoClassificationModelMetadata\": {},\n \"videoObjectTrackingModelMetadata\": {}\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}}/v1beta1/:parent/models")
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 \"createTime\": \"\",\n \"datasetId\": \"\",\n \"deploymentState\": \"\",\n \"displayName\": \"\",\n \"imageClassificationModelMetadata\": {\n \"baseModelId\": \"\",\n \"modelType\": \"\",\n \"nodeCount\": \"\",\n \"nodeQps\": \"\",\n \"stopReason\": \"\",\n \"trainBudget\": \"\",\n \"trainCost\": \"\"\n },\n \"imageObjectDetectionModelMetadata\": {\n \"modelType\": \"\",\n \"nodeCount\": \"\",\n \"nodeQps\": \"\",\n \"stopReason\": \"\",\n \"trainBudgetMilliNodeHours\": \"\",\n \"trainCostMilliNodeHours\": \"\"\n },\n \"name\": \"\",\n \"tablesModelMetadata\": {\n \"disableEarlyStopping\": false,\n \"inputFeatureColumnSpecs\": [\n {\n \"dataStats\": {\n \"arrayStats\": {\n \"memberStats\": \"\"\n },\n \"categoryStats\": {\n \"topCategoryStats\": [\n {\n \"count\": \"\",\n \"value\": \"\"\n }\n ]\n },\n \"distinctValueCount\": \"\",\n \"float64Stats\": {\n \"histogramBuckets\": [\n {\n \"count\": \"\",\n \"max\": \"\",\n \"min\": \"\"\n }\n ],\n \"mean\": \"\",\n \"quantiles\": [],\n \"standardDeviation\": \"\"\n },\n \"nullValueCount\": \"\",\n \"stringStats\": {\n \"topUnigramStats\": [\n {\n \"count\": \"\",\n \"value\": \"\"\n }\n ]\n },\n \"structStats\": {\n \"fieldStats\": {}\n },\n \"timestampStats\": {\n \"granularStats\": {}\n },\n \"validValueCount\": \"\"\n },\n \"dataType\": {\n \"listElementType\": \"\",\n \"nullable\": false,\n \"structType\": {\n \"fields\": {}\n },\n \"timeFormat\": \"\",\n \"typeCode\": \"\"\n },\n \"displayName\": \"\",\n \"etag\": \"\",\n \"name\": \"\",\n \"topCorrelatedColumns\": [\n {\n \"columnSpecId\": \"\",\n \"correlationStats\": {\n \"cramersV\": \"\"\n }\n }\n ]\n }\n ],\n \"optimizationObjective\": \"\",\n \"optimizationObjectivePrecisionValue\": \"\",\n \"optimizationObjectiveRecallValue\": \"\",\n \"tablesModelColumnInfo\": [\n {\n \"columnDisplayName\": \"\",\n \"columnSpecName\": \"\",\n \"featureImportance\": \"\"\n }\n ],\n \"targetColumnSpec\": {},\n \"trainBudgetMilliNodeHours\": \"\",\n \"trainCostMilliNodeHours\": \"\"\n },\n \"textClassificationModelMetadata\": {\n \"classificationType\": \"\"\n },\n \"textExtractionModelMetadata\": {\n \"modelHint\": \"\"\n },\n \"textSentimentModelMetadata\": {},\n \"trainExampleCount\": 0,\n \"translationModelMetadata\": {\n \"baseModel\": \"\",\n \"sourceLanguageCode\": \"\",\n \"targetLanguageCode\": \"\"\n },\n \"updateTime\": \"\",\n \"validateExampleCount\": 0,\n \"videoClassificationModelMetadata\": {},\n \"videoObjectTrackingModelMetadata\": {}\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/v1beta1/:parent/models') do |req|
req.body = "{\n \"createTime\": \"\",\n \"datasetId\": \"\",\n \"deploymentState\": \"\",\n \"displayName\": \"\",\n \"imageClassificationModelMetadata\": {\n \"baseModelId\": \"\",\n \"modelType\": \"\",\n \"nodeCount\": \"\",\n \"nodeQps\": \"\",\n \"stopReason\": \"\",\n \"trainBudget\": \"\",\n \"trainCost\": \"\"\n },\n \"imageObjectDetectionModelMetadata\": {\n \"modelType\": \"\",\n \"nodeCount\": \"\",\n \"nodeQps\": \"\",\n \"stopReason\": \"\",\n \"trainBudgetMilliNodeHours\": \"\",\n \"trainCostMilliNodeHours\": \"\"\n },\n \"name\": \"\",\n \"tablesModelMetadata\": {\n \"disableEarlyStopping\": false,\n \"inputFeatureColumnSpecs\": [\n {\n \"dataStats\": {\n \"arrayStats\": {\n \"memberStats\": \"\"\n },\n \"categoryStats\": {\n \"topCategoryStats\": [\n {\n \"count\": \"\",\n \"value\": \"\"\n }\n ]\n },\n \"distinctValueCount\": \"\",\n \"float64Stats\": {\n \"histogramBuckets\": [\n {\n \"count\": \"\",\n \"max\": \"\",\n \"min\": \"\"\n }\n ],\n \"mean\": \"\",\n \"quantiles\": [],\n \"standardDeviation\": \"\"\n },\n \"nullValueCount\": \"\",\n \"stringStats\": {\n \"topUnigramStats\": [\n {\n \"count\": \"\",\n \"value\": \"\"\n }\n ]\n },\n \"structStats\": {\n \"fieldStats\": {}\n },\n \"timestampStats\": {\n \"granularStats\": {}\n },\n \"validValueCount\": \"\"\n },\n \"dataType\": {\n \"listElementType\": \"\",\n \"nullable\": false,\n \"structType\": {\n \"fields\": {}\n },\n \"timeFormat\": \"\",\n \"typeCode\": \"\"\n },\n \"displayName\": \"\",\n \"etag\": \"\",\n \"name\": \"\",\n \"topCorrelatedColumns\": [\n {\n \"columnSpecId\": \"\",\n \"correlationStats\": {\n \"cramersV\": \"\"\n }\n }\n ]\n }\n ],\n \"optimizationObjective\": \"\",\n \"optimizationObjectivePrecisionValue\": \"\",\n \"optimizationObjectiveRecallValue\": \"\",\n \"tablesModelColumnInfo\": [\n {\n \"columnDisplayName\": \"\",\n \"columnSpecName\": \"\",\n \"featureImportance\": \"\"\n }\n ],\n \"targetColumnSpec\": {},\n \"trainBudgetMilliNodeHours\": \"\",\n \"trainCostMilliNodeHours\": \"\"\n },\n \"textClassificationModelMetadata\": {\n \"classificationType\": \"\"\n },\n \"textExtractionModelMetadata\": {\n \"modelHint\": \"\"\n },\n \"textSentimentModelMetadata\": {},\n \"trainExampleCount\": 0,\n \"translationModelMetadata\": {\n \"baseModel\": \"\",\n \"sourceLanguageCode\": \"\",\n \"targetLanguageCode\": \"\"\n },\n \"updateTime\": \"\",\n \"validateExampleCount\": 0,\n \"videoClassificationModelMetadata\": {},\n \"videoObjectTrackingModelMetadata\": {}\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1beta1/:parent/models";
let payload = json!({
"createTime": "",
"datasetId": "",
"deploymentState": "",
"displayName": "",
"imageClassificationModelMetadata": json!({
"baseModelId": "",
"modelType": "",
"nodeCount": "",
"nodeQps": "",
"stopReason": "",
"trainBudget": "",
"trainCost": ""
}),
"imageObjectDetectionModelMetadata": json!({
"modelType": "",
"nodeCount": "",
"nodeQps": "",
"stopReason": "",
"trainBudgetMilliNodeHours": "",
"trainCostMilliNodeHours": ""
}),
"name": "",
"tablesModelMetadata": json!({
"disableEarlyStopping": false,
"inputFeatureColumnSpecs": (
json!({
"dataStats": json!({
"arrayStats": json!({"memberStats": ""}),
"categoryStats": json!({"topCategoryStats": (
json!({
"count": "",
"value": ""
})
)}),
"distinctValueCount": "",
"float64Stats": json!({
"histogramBuckets": (
json!({
"count": "",
"max": "",
"min": ""
})
),
"mean": "",
"quantiles": (),
"standardDeviation": ""
}),
"nullValueCount": "",
"stringStats": json!({"topUnigramStats": (
json!({
"count": "",
"value": ""
})
)}),
"structStats": json!({"fieldStats": json!({})}),
"timestampStats": json!({"granularStats": json!({})}),
"validValueCount": ""
}),
"dataType": json!({
"listElementType": "",
"nullable": false,
"structType": json!({"fields": json!({})}),
"timeFormat": "",
"typeCode": ""
}),
"displayName": "",
"etag": "",
"name": "",
"topCorrelatedColumns": (
json!({
"columnSpecId": "",
"correlationStats": json!({"cramersV": ""})
})
)
})
),
"optimizationObjective": "",
"optimizationObjectivePrecisionValue": "",
"optimizationObjectiveRecallValue": "",
"tablesModelColumnInfo": (
json!({
"columnDisplayName": "",
"columnSpecName": "",
"featureImportance": ""
})
),
"targetColumnSpec": json!({}),
"trainBudgetMilliNodeHours": "",
"trainCostMilliNodeHours": ""
}),
"textClassificationModelMetadata": json!({"classificationType": ""}),
"textExtractionModelMetadata": json!({"modelHint": ""}),
"textSentimentModelMetadata": json!({}),
"trainExampleCount": 0,
"translationModelMetadata": json!({
"baseModel": "",
"sourceLanguageCode": "",
"targetLanguageCode": ""
}),
"updateTime": "",
"validateExampleCount": 0,
"videoClassificationModelMetadata": json!({}),
"videoObjectTrackingModelMetadata": 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}}/v1beta1/:parent/models \
--header 'content-type: application/json' \
--data '{
"createTime": "",
"datasetId": "",
"deploymentState": "",
"displayName": "",
"imageClassificationModelMetadata": {
"baseModelId": "",
"modelType": "",
"nodeCount": "",
"nodeQps": "",
"stopReason": "",
"trainBudget": "",
"trainCost": ""
},
"imageObjectDetectionModelMetadata": {
"modelType": "",
"nodeCount": "",
"nodeQps": "",
"stopReason": "",
"trainBudgetMilliNodeHours": "",
"trainCostMilliNodeHours": ""
},
"name": "",
"tablesModelMetadata": {
"disableEarlyStopping": false,
"inputFeatureColumnSpecs": [
{
"dataStats": {
"arrayStats": {
"memberStats": ""
},
"categoryStats": {
"topCategoryStats": [
{
"count": "",
"value": ""
}
]
},
"distinctValueCount": "",
"float64Stats": {
"histogramBuckets": [
{
"count": "",
"max": "",
"min": ""
}
],
"mean": "",
"quantiles": [],
"standardDeviation": ""
},
"nullValueCount": "",
"stringStats": {
"topUnigramStats": [
{
"count": "",
"value": ""
}
]
},
"structStats": {
"fieldStats": {}
},
"timestampStats": {
"granularStats": {}
},
"validValueCount": ""
},
"dataType": {
"listElementType": "",
"nullable": false,
"structType": {
"fields": {}
},
"timeFormat": "",
"typeCode": ""
},
"displayName": "",
"etag": "",
"name": "",
"topCorrelatedColumns": [
{
"columnSpecId": "",
"correlationStats": {
"cramersV": ""
}
}
]
}
],
"optimizationObjective": "",
"optimizationObjectivePrecisionValue": "",
"optimizationObjectiveRecallValue": "",
"tablesModelColumnInfo": [
{
"columnDisplayName": "",
"columnSpecName": "",
"featureImportance": ""
}
],
"targetColumnSpec": {},
"trainBudgetMilliNodeHours": "",
"trainCostMilliNodeHours": ""
},
"textClassificationModelMetadata": {
"classificationType": ""
},
"textExtractionModelMetadata": {
"modelHint": ""
},
"textSentimentModelMetadata": {},
"trainExampleCount": 0,
"translationModelMetadata": {
"baseModel": "",
"sourceLanguageCode": "",
"targetLanguageCode": ""
},
"updateTime": "",
"validateExampleCount": 0,
"videoClassificationModelMetadata": {},
"videoObjectTrackingModelMetadata": {}
}'
echo '{
"createTime": "",
"datasetId": "",
"deploymentState": "",
"displayName": "",
"imageClassificationModelMetadata": {
"baseModelId": "",
"modelType": "",
"nodeCount": "",
"nodeQps": "",
"stopReason": "",
"trainBudget": "",
"trainCost": ""
},
"imageObjectDetectionModelMetadata": {
"modelType": "",
"nodeCount": "",
"nodeQps": "",
"stopReason": "",
"trainBudgetMilliNodeHours": "",
"trainCostMilliNodeHours": ""
},
"name": "",
"tablesModelMetadata": {
"disableEarlyStopping": false,
"inputFeatureColumnSpecs": [
{
"dataStats": {
"arrayStats": {
"memberStats": ""
},
"categoryStats": {
"topCategoryStats": [
{
"count": "",
"value": ""
}
]
},
"distinctValueCount": "",
"float64Stats": {
"histogramBuckets": [
{
"count": "",
"max": "",
"min": ""
}
],
"mean": "",
"quantiles": [],
"standardDeviation": ""
},
"nullValueCount": "",
"stringStats": {
"topUnigramStats": [
{
"count": "",
"value": ""
}
]
},
"structStats": {
"fieldStats": {}
},
"timestampStats": {
"granularStats": {}
},
"validValueCount": ""
},
"dataType": {
"listElementType": "",
"nullable": false,
"structType": {
"fields": {}
},
"timeFormat": "",
"typeCode": ""
},
"displayName": "",
"etag": "",
"name": "",
"topCorrelatedColumns": [
{
"columnSpecId": "",
"correlationStats": {
"cramersV": ""
}
}
]
}
],
"optimizationObjective": "",
"optimizationObjectivePrecisionValue": "",
"optimizationObjectiveRecallValue": "",
"tablesModelColumnInfo": [
{
"columnDisplayName": "",
"columnSpecName": "",
"featureImportance": ""
}
],
"targetColumnSpec": {},
"trainBudgetMilliNodeHours": "",
"trainCostMilliNodeHours": ""
},
"textClassificationModelMetadata": {
"classificationType": ""
},
"textExtractionModelMetadata": {
"modelHint": ""
},
"textSentimentModelMetadata": {},
"trainExampleCount": 0,
"translationModelMetadata": {
"baseModel": "",
"sourceLanguageCode": "",
"targetLanguageCode": ""
},
"updateTime": "",
"validateExampleCount": 0,
"videoClassificationModelMetadata": {},
"videoObjectTrackingModelMetadata": {}
}' | \
http POST {{baseUrl}}/v1beta1/:parent/models \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "createTime": "",\n "datasetId": "",\n "deploymentState": "",\n "displayName": "",\n "imageClassificationModelMetadata": {\n "baseModelId": "",\n "modelType": "",\n "nodeCount": "",\n "nodeQps": "",\n "stopReason": "",\n "trainBudget": "",\n "trainCost": ""\n },\n "imageObjectDetectionModelMetadata": {\n "modelType": "",\n "nodeCount": "",\n "nodeQps": "",\n "stopReason": "",\n "trainBudgetMilliNodeHours": "",\n "trainCostMilliNodeHours": ""\n },\n "name": "",\n "tablesModelMetadata": {\n "disableEarlyStopping": false,\n "inputFeatureColumnSpecs": [\n {\n "dataStats": {\n "arrayStats": {\n "memberStats": ""\n },\n "categoryStats": {\n "topCategoryStats": [\n {\n "count": "",\n "value": ""\n }\n ]\n },\n "distinctValueCount": "",\n "float64Stats": {\n "histogramBuckets": [\n {\n "count": "",\n "max": "",\n "min": ""\n }\n ],\n "mean": "",\n "quantiles": [],\n "standardDeviation": ""\n },\n "nullValueCount": "",\n "stringStats": {\n "topUnigramStats": [\n {\n "count": "",\n "value": ""\n }\n ]\n },\n "structStats": {\n "fieldStats": {}\n },\n "timestampStats": {\n "granularStats": {}\n },\n "validValueCount": ""\n },\n "dataType": {\n "listElementType": "",\n "nullable": false,\n "structType": {\n "fields": {}\n },\n "timeFormat": "",\n "typeCode": ""\n },\n "displayName": "",\n "etag": "",\n "name": "",\n "topCorrelatedColumns": [\n {\n "columnSpecId": "",\n "correlationStats": {\n "cramersV": ""\n }\n }\n ]\n }\n ],\n "optimizationObjective": "",\n "optimizationObjectivePrecisionValue": "",\n "optimizationObjectiveRecallValue": "",\n "tablesModelColumnInfo": [\n {\n "columnDisplayName": "",\n "columnSpecName": "",\n "featureImportance": ""\n }\n ],\n "targetColumnSpec": {},\n "trainBudgetMilliNodeHours": "",\n "trainCostMilliNodeHours": ""\n },\n "textClassificationModelMetadata": {\n "classificationType": ""\n },\n "textExtractionModelMetadata": {\n "modelHint": ""\n },\n "textSentimentModelMetadata": {},\n "trainExampleCount": 0,\n "translationModelMetadata": {\n "baseModel": "",\n "sourceLanguageCode": "",\n "targetLanguageCode": ""\n },\n "updateTime": "",\n "validateExampleCount": 0,\n "videoClassificationModelMetadata": {},\n "videoObjectTrackingModelMetadata": {}\n}' \
--output-document \
- {{baseUrl}}/v1beta1/:parent/models
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"createTime": "",
"datasetId": "",
"deploymentState": "",
"displayName": "",
"imageClassificationModelMetadata": [
"baseModelId": "",
"modelType": "",
"nodeCount": "",
"nodeQps": "",
"stopReason": "",
"trainBudget": "",
"trainCost": ""
],
"imageObjectDetectionModelMetadata": [
"modelType": "",
"nodeCount": "",
"nodeQps": "",
"stopReason": "",
"trainBudgetMilliNodeHours": "",
"trainCostMilliNodeHours": ""
],
"name": "",
"tablesModelMetadata": [
"disableEarlyStopping": false,
"inputFeatureColumnSpecs": [
[
"dataStats": [
"arrayStats": ["memberStats": ""],
"categoryStats": ["topCategoryStats": [
[
"count": "",
"value": ""
]
]],
"distinctValueCount": "",
"float64Stats": [
"histogramBuckets": [
[
"count": "",
"max": "",
"min": ""
]
],
"mean": "",
"quantiles": [],
"standardDeviation": ""
],
"nullValueCount": "",
"stringStats": ["topUnigramStats": [
[
"count": "",
"value": ""
]
]],
"structStats": ["fieldStats": []],
"timestampStats": ["granularStats": []],
"validValueCount": ""
],
"dataType": [
"listElementType": "",
"nullable": false,
"structType": ["fields": []],
"timeFormat": "",
"typeCode": ""
],
"displayName": "",
"etag": "",
"name": "",
"topCorrelatedColumns": [
[
"columnSpecId": "",
"correlationStats": ["cramersV": ""]
]
]
]
],
"optimizationObjective": "",
"optimizationObjectivePrecisionValue": "",
"optimizationObjectiveRecallValue": "",
"tablesModelColumnInfo": [
[
"columnDisplayName": "",
"columnSpecName": "",
"featureImportance": ""
]
],
"targetColumnSpec": [],
"trainBudgetMilliNodeHours": "",
"trainCostMilliNodeHours": ""
],
"textClassificationModelMetadata": ["classificationType": ""],
"textExtractionModelMetadata": ["modelHint": ""],
"textSentimentModelMetadata": [],
"trainExampleCount": 0,
"translationModelMetadata": [
"baseModel": "",
"sourceLanguageCode": "",
"targetLanguageCode": ""
],
"updateTime": "",
"validateExampleCount": 0,
"videoClassificationModelMetadata": [],
"videoObjectTrackingModelMetadata": []
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1beta1/:parent/models")! 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
automl.projects.locations.models.deploy
{{baseUrl}}/v1beta1/:name:deploy
QUERY PARAMS
name
BODY json
{
"imageClassificationModelDeploymentMetadata": {
"nodeCount": ""
},
"imageObjectDetectionModelDeploymentMetadata": {
"nodeCount": ""
}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1beta1/:name:deploy");
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 \"imageClassificationModelDeploymentMetadata\": {\n \"nodeCount\": \"\"\n },\n \"imageObjectDetectionModelDeploymentMetadata\": {\n \"nodeCount\": \"\"\n }\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1beta1/:name:deploy" {:content-type :json
:form-params {:imageClassificationModelDeploymentMetadata {:nodeCount ""}
:imageObjectDetectionModelDeploymentMetadata {:nodeCount ""}}})
require "http/client"
url = "{{baseUrl}}/v1beta1/:name:deploy"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"imageClassificationModelDeploymentMetadata\": {\n \"nodeCount\": \"\"\n },\n \"imageObjectDetectionModelDeploymentMetadata\": {\n \"nodeCount\": \"\"\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}}/v1beta1/:name:deploy"),
Content = new StringContent("{\n \"imageClassificationModelDeploymentMetadata\": {\n \"nodeCount\": \"\"\n },\n \"imageObjectDetectionModelDeploymentMetadata\": {\n \"nodeCount\": \"\"\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}}/v1beta1/:name:deploy");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"imageClassificationModelDeploymentMetadata\": {\n \"nodeCount\": \"\"\n },\n \"imageObjectDetectionModelDeploymentMetadata\": {\n \"nodeCount\": \"\"\n }\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1beta1/:name:deploy"
payload := strings.NewReader("{\n \"imageClassificationModelDeploymentMetadata\": {\n \"nodeCount\": \"\"\n },\n \"imageObjectDetectionModelDeploymentMetadata\": {\n \"nodeCount\": \"\"\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/v1beta1/:name:deploy HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 153
{
"imageClassificationModelDeploymentMetadata": {
"nodeCount": ""
},
"imageObjectDetectionModelDeploymentMetadata": {
"nodeCount": ""
}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1beta1/:name:deploy")
.setHeader("content-type", "application/json")
.setBody("{\n \"imageClassificationModelDeploymentMetadata\": {\n \"nodeCount\": \"\"\n },\n \"imageObjectDetectionModelDeploymentMetadata\": {\n \"nodeCount\": \"\"\n }\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1beta1/:name:deploy"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"imageClassificationModelDeploymentMetadata\": {\n \"nodeCount\": \"\"\n },\n \"imageObjectDetectionModelDeploymentMetadata\": {\n \"nodeCount\": \"\"\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 \"imageClassificationModelDeploymentMetadata\": {\n \"nodeCount\": \"\"\n },\n \"imageObjectDetectionModelDeploymentMetadata\": {\n \"nodeCount\": \"\"\n }\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1beta1/:name:deploy")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1beta1/:name:deploy")
.header("content-type", "application/json")
.body("{\n \"imageClassificationModelDeploymentMetadata\": {\n \"nodeCount\": \"\"\n },\n \"imageObjectDetectionModelDeploymentMetadata\": {\n \"nodeCount\": \"\"\n }\n}")
.asString();
const data = JSON.stringify({
imageClassificationModelDeploymentMetadata: {
nodeCount: ''
},
imageObjectDetectionModelDeploymentMetadata: {
nodeCount: ''
}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v1beta1/:name:deploy');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1beta1/:name:deploy',
headers: {'content-type': 'application/json'},
data: {
imageClassificationModelDeploymentMetadata: {nodeCount: ''},
imageObjectDetectionModelDeploymentMetadata: {nodeCount: ''}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1beta1/:name:deploy';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"imageClassificationModelDeploymentMetadata":{"nodeCount":""},"imageObjectDetectionModelDeploymentMetadata":{"nodeCount":""}}'
};
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}}/v1beta1/:name:deploy',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "imageClassificationModelDeploymentMetadata": {\n "nodeCount": ""\n },\n "imageObjectDetectionModelDeploymentMetadata": {\n "nodeCount": ""\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 \"imageClassificationModelDeploymentMetadata\": {\n \"nodeCount\": \"\"\n },\n \"imageObjectDetectionModelDeploymentMetadata\": {\n \"nodeCount\": \"\"\n }\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1beta1/:name:deploy")
.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/v1beta1/:name:deploy',
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({
imageClassificationModelDeploymentMetadata: {nodeCount: ''},
imageObjectDetectionModelDeploymentMetadata: {nodeCount: ''}
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1beta1/:name:deploy',
headers: {'content-type': 'application/json'},
body: {
imageClassificationModelDeploymentMetadata: {nodeCount: ''},
imageObjectDetectionModelDeploymentMetadata: {nodeCount: ''}
},
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}}/v1beta1/:name:deploy');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
imageClassificationModelDeploymentMetadata: {
nodeCount: ''
},
imageObjectDetectionModelDeploymentMetadata: {
nodeCount: ''
}
});
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}}/v1beta1/:name:deploy',
headers: {'content-type': 'application/json'},
data: {
imageClassificationModelDeploymentMetadata: {nodeCount: ''},
imageObjectDetectionModelDeploymentMetadata: {nodeCount: ''}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1beta1/:name:deploy';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"imageClassificationModelDeploymentMetadata":{"nodeCount":""},"imageObjectDetectionModelDeploymentMetadata":{"nodeCount":""}}'
};
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 = @{ @"imageClassificationModelDeploymentMetadata": @{ @"nodeCount": @"" },
@"imageObjectDetectionModelDeploymentMetadata": @{ @"nodeCount": @"" } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1beta1/:name:deploy"]
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}}/v1beta1/:name:deploy" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"imageClassificationModelDeploymentMetadata\": {\n \"nodeCount\": \"\"\n },\n \"imageObjectDetectionModelDeploymentMetadata\": {\n \"nodeCount\": \"\"\n }\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1beta1/:name:deploy",
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([
'imageClassificationModelDeploymentMetadata' => [
'nodeCount' => ''
],
'imageObjectDetectionModelDeploymentMetadata' => [
'nodeCount' => ''
]
]),
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}}/v1beta1/:name:deploy', [
'body' => '{
"imageClassificationModelDeploymentMetadata": {
"nodeCount": ""
},
"imageObjectDetectionModelDeploymentMetadata": {
"nodeCount": ""
}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1beta1/:name:deploy');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'imageClassificationModelDeploymentMetadata' => [
'nodeCount' => ''
],
'imageObjectDetectionModelDeploymentMetadata' => [
'nodeCount' => ''
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'imageClassificationModelDeploymentMetadata' => [
'nodeCount' => ''
],
'imageObjectDetectionModelDeploymentMetadata' => [
'nodeCount' => ''
]
]));
$request->setRequestUrl('{{baseUrl}}/v1beta1/:name:deploy');
$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}}/v1beta1/:name:deploy' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"imageClassificationModelDeploymentMetadata": {
"nodeCount": ""
},
"imageObjectDetectionModelDeploymentMetadata": {
"nodeCount": ""
}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1beta1/:name:deploy' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"imageClassificationModelDeploymentMetadata": {
"nodeCount": ""
},
"imageObjectDetectionModelDeploymentMetadata": {
"nodeCount": ""
}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"imageClassificationModelDeploymentMetadata\": {\n \"nodeCount\": \"\"\n },\n \"imageObjectDetectionModelDeploymentMetadata\": {\n \"nodeCount\": \"\"\n }\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1beta1/:name:deploy", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1beta1/:name:deploy"
payload = {
"imageClassificationModelDeploymentMetadata": { "nodeCount": "" },
"imageObjectDetectionModelDeploymentMetadata": { "nodeCount": "" }
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1beta1/:name:deploy"
payload <- "{\n \"imageClassificationModelDeploymentMetadata\": {\n \"nodeCount\": \"\"\n },\n \"imageObjectDetectionModelDeploymentMetadata\": {\n \"nodeCount\": \"\"\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}}/v1beta1/:name:deploy")
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 \"imageClassificationModelDeploymentMetadata\": {\n \"nodeCount\": \"\"\n },\n \"imageObjectDetectionModelDeploymentMetadata\": {\n \"nodeCount\": \"\"\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/v1beta1/:name:deploy') do |req|
req.body = "{\n \"imageClassificationModelDeploymentMetadata\": {\n \"nodeCount\": \"\"\n },\n \"imageObjectDetectionModelDeploymentMetadata\": {\n \"nodeCount\": \"\"\n }\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1beta1/:name:deploy";
let payload = json!({
"imageClassificationModelDeploymentMetadata": json!({"nodeCount": ""}),
"imageObjectDetectionModelDeploymentMetadata": json!({"nodeCount": ""})
});
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}}/v1beta1/:name:deploy \
--header 'content-type: application/json' \
--data '{
"imageClassificationModelDeploymentMetadata": {
"nodeCount": ""
},
"imageObjectDetectionModelDeploymentMetadata": {
"nodeCount": ""
}
}'
echo '{
"imageClassificationModelDeploymentMetadata": {
"nodeCount": ""
},
"imageObjectDetectionModelDeploymentMetadata": {
"nodeCount": ""
}
}' | \
http POST {{baseUrl}}/v1beta1/:name:deploy \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "imageClassificationModelDeploymentMetadata": {\n "nodeCount": ""\n },\n "imageObjectDetectionModelDeploymentMetadata": {\n "nodeCount": ""\n }\n}' \
--output-document \
- {{baseUrl}}/v1beta1/:name:deploy
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"imageClassificationModelDeploymentMetadata": ["nodeCount": ""],
"imageObjectDetectionModelDeploymentMetadata": ["nodeCount": ""]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1beta1/:name:deploy")! 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
automl.projects.locations.models.export
{{baseUrl}}/v1beta1/:name:export
QUERY PARAMS
name
BODY json
{
"outputConfig": {
"gcrDestination": {
"outputUri": ""
},
"gcsDestination": {
"outputUriPrefix": ""
},
"modelFormat": "",
"params": {}
}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1beta1/:name:export");
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 \"outputConfig\": {\n \"gcrDestination\": {\n \"outputUri\": \"\"\n },\n \"gcsDestination\": {\n \"outputUriPrefix\": \"\"\n },\n \"modelFormat\": \"\",\n \"params\": {}\n }\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1beta1/:name:export" {:content-type :json
:form-params {:outputConfig {:gcrDestination {:outputUri ""}
:gcsDestination {:outputUriPrefix ""}
:modelFormat ""
:params {}}}})
require "http/client"
url = "{{baseUrl}}/v1beta1/:name:export"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"outputConfig\": {\n \"gcrDestination\": {\n \"outputUri\": \"\"\n },\n \"gcsDestination\": {\n \"outputUriPrefix\": \"\"\n },\n \"modelFormat\": \"\",\n \"params\": {}\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}}/v1beta1/:name:export"),
Content = new StringContent("{\n \"outputConfig\": {\n \"gcrDestination\": {\n \"outputUri\": \"\"\n },\n \"gcsDestination\": {\n \"outputUriPrefix\": \"\"\n },\n \"modelFormat\": \"\",\n \"params\": {}\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}}/v1beta1/:name:export");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"outputConfig\": {\n \"gcrDestination\": {\n \"outputUri\": \"\"\n },\n \"gcsDestination\": {\n \"outputUriPrefix\": \"\"\n },\n \"modelFormat\": \"\",\n \"params\": {}\n }\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1beta1/:name:export"
payload := strings.NewReader("{\n \"outputConfig\": {\n \"gcrDestination\": {\n \"outputUri\": \"\"\n },\n \"gcsDestination\": {\n \"outputUriPrefix\": \"\"\n },\n \"modelFormat\": \"\",\n \"params\": {}\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/v1beta1/:name:export HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 179
{
"outputConfig": {
"gcrDestination": {
"outputUri": ""
},
"gcsDestination": {
"outputUriPrefix": ""
},
"modelFormat": "",
"params": {}
}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1beta1/:name:export")
.setHeader("content-type", "application/json")
.setBody("{\n \"outputConfig\": {\n \"gcrDestination\": {\n \"outputUri\": \"\"\n },\n \"gcsDestination\": {\n \"outputUriPrefix\": \"\"\n },\n \"modelFormat\": \"\",\n \"params\": {}\n }\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1beta1/:name:export"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"outputConfig\": {\n \"gcrDestination\": {\n \"outputUri\": \"\"\n },\n \"gcsDestination\": {\n \"outputUriPrefix\": \"\"\n },\n \"modelFormat\": \"\",\n \"params\": {}\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 \"outputConfig\": {\n \"gcrDestination\": {\n \"outputUri\": \"\"\n },\n \"gcsDestination\": {\n \"outputUriPrefix\": \"\"\n },\n \"modelFormat\": \"\",\n \"params\": {}\n }\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1beta1/:name:export")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1beta1/:name:export")
.header("content-type", "application/json")
.body("{\n \"outputConfig\": {\n \"gcrDestination\": {\n \"outputUri\": \"\"\n },\n \"gcsDestination\": {\n \"outputUriPrefix\": \"\"\n },\n \"modelFormat\": \"\",\n \"params\": {}\n }\n}")
.asString();
const data = JSON.stringify({
outputConfig: {
gcrDestination: {
outputUri: ''
},
gcsDestination: {
outputUriPrefix: ''
},
modelFormat: '',
params: {}
}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v1beta1/:name:export');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1beta1/:name:export',
headers: {'content-type': 'application/json'},
data: {
outputConfig: {
gcrDestination: {outputUri: ''},
gcsDestination: {outputUriPrefix: ''},
modelFormat: '',
params: {}
}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1beta1/:name:export';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"outputConfig":{"gcrDestination":{"outputUri":""},"gcsDestination":{"outputUriPrefix":""},"modelFormat":"","params":{}}}'
};
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}}/v1beta1/:name:export',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "outputConfig": {\n "gcrDestination": {\n "outputUri": ""\n },\n "gcsDestination": {\n "outputUriPrefix": ""\n },\n "modelFormat": "",\n "params": {}\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 \"outputConfig\": {\n \"gcrDestination\": {\n \"outputUri\": \"\"\n },\n \"gcsDestination\": {\n \"outputUriPrefix\": \"\"\n },\n \"modelFormat\": \"\",\n \"params\": {}\n }\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1beta1/:name:export")
.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/v1beta1/:name:export',
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({
outputConfig: {
gcrDestination: {outputUri: ''},
gcsDestination: {outputUriPrefix: ''},
modelFormat: '',
params: {}
}
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1beta1/:name:export',
headers: {'content-type': 'application/json'},
body: {
outputConfig: {
gcrDestination: {outputUri: ''},
gcsDestination: {outputUriPrefix: ''},
modelFormat: '',
params: {}
}
},
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}}/v1beta1/:name:export');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
outputConfig: {
gcrDestination: {
outputUri: ''
},
gcsDestination: {
outputUriPrefix: ''
},
modelFormat: '',
params: {}
}
});
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}}/v1beta1/:name:export',
headers: {'content-type': 'application/json'},
data: {
outputConfig: {
gcrDestination: {outputUri: ''},
gcsDestination: {outputUriPrefix: ''},
modelFormat: '',
params: {}
}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1beta1/:name:export';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"outputConfig":{"gcrDestination":{"outputUri":""},"gcsDestination":{"outputUriPrefix":""},"modelFormat":"","params":{}}}'
};
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 = @{ @"outputConfig": @{ @"gcrDestination": @{ @"outputUri": @"" }, @"gcsDestination": @{ @"outputUriPrefix": @"" }, @"modelFormat": @"", @"params": @{ } } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1beta1/:name:export"]
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}}/v1beta1/:name:export" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"outputConfig\": {\n \"gcrDestination\": {\n \"outputUri\": \"\"\n },\n \"gcsDestination\": {\n \"outputUriPrefix\": \"\"\n },\n \"modelFormat\": \"\",\n \"params\": {}\n }\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1beta1/:name:export",
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([
'outputConfig' => [
'gcrDestination' => [
'outputUri' => ''
],
'gcsDestination' => [
'outputUriPrefix' => ''
],
'modelFormat' => '',
'params' => [
]
]
]),
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}}/v1beta1/:name:export', [
'body' => '{
"outputConfig": {
"gcrDestination": {
"outputUri": ""
},
"gcsDestination": {
"outputUriPrefix": ""
},
"modelFormat": "",
"params": {}
}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1beta1/:name:export');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'outputConfig' => [
'gcrDestination' => [
'outputUri' => ''
],
'gcsDestination' => [
'outputUriPrefix' => ''
],
'modelFormat' => '',
'params' => [
]
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'outputConfig' => [
'gcrDestination' => [
'outputUri' => ''
],
'gcsDestination' => [
'outputUriPrefix' => ''
],
'modelFormat' => '',
'params' => [
]
]
]));
$request->setRequestUrl('{{baseUrl}}/v1beta1/:name:export');
$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}}/v1beta1/:name:export' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"outputConfig": {
"gcrDestination": {
"outputUri": ""
},
"gcsDestination": {
"outputUriPrefix": ""
},
"modelFormat": "",
"params": {}
}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1beta1/:name:export' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"outputConfig": {
"gcrDestination": {
"outputUri": ""
},
"gcsDestination": {
"outputUriPrefix": ""
},
"modelFormat": "",
"params": {}
}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"outputConfig\": {\n \"gcrDestination\": {\n \"outputUri\": \"\"\n },\n \"gcsDestination\": {\n \"outputUriPrefix\": \"\"\n },\n \"modelFormat\": \"\",\n \"params\": {}\n }\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1beta1/:name:export", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1beta1/:name:export"
payload = { "outputConfig": {
"gcrDestination": { "outputUri": "" },
"gcsDestination": { "outputUriPrefix": "" },
"modelFormat": "",
"params": {}
} }
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1beta1/:name:export"
payload <- "{\n \"outputConfig\": {\n \"gcrDestination\": {\n \"outputUri\": \"\"\n },\n \"gcsDestination\": {\n \"outputUriPrefix\": \"\"\n },\n \"modelFormat\": \"\",\n \"params\": {}\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}}/v1beta1/:name:export")
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 \"outputConfig\": {\n \"gcrDestination\": {\n \"outputUri\": \"\"\n },\n \"gcsDestination\": {\n \"outputUriPrefix\": \"\"\n },\n \"modelFormat\": \"\",\n \"params\": {}\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/v1beta1/:name:export') do |req|
req.body = "{\n \"outputConfig\": {\n \"gcrDestination\": {\n \"outputUri\": \"\"\n },\n \"gcsDestination\": {\n \"outputUriPrefix\": \"\"\n },\n \"modelFormat\": \"\",\n \"params\": {}\n }\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1beta1/:name:export";
let payload = json!({"outputConfig": json!({
"gcrDestination": json!({"outputUri": ""}),
"gcsDestination": json!({"outputUriPrefix": ""}),
"modelFormat": "",
"params": 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}}/v1beta1/:name:export \
--header 'content-type: application/json' \
--data '{
"outputConfig": {
"gcrDestination": {
"outputUri": ""
},
"gcsDestination": {
"outputUriPrefix": ""
},
"modelFormat": "",
"params": {}
}
}'
echo '{
"outputConfig": {
"gcrDestination": {
"outputUri": ""
},
"gcsDestination": {
"outputUriPrefix": ""
},
"modelFormat": "",
"params": {}
}
}' | \
http POST {{baseUrl}}/v1beta1/:name:export \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "outputConfig": {\n "gcrDestination": {\n "outputUri": ""\n },\n "gcsDestination": {\n "outputUriPrefix": ""\n },\n "modelFormat": "",\n "params": {}\n }\n}' \
--output-document \
- {{baseUrl}}/v1beta1/:name:export
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["outputConfig": [
"gcrDestination": ["outputUri": ""],
"gcsDestination": ["outputUriPrefix": ""],
"modelFormat": "",
"params": []
]] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1beta1/:name:export")! 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
automl.projects.locations.models.exportEvaluatedExamples
{{baseUrl}}/v1beta1/:name:exportEvaluatedExamples
QUERY PARAMS
name
BODY json
{
"outputConfig": {
"bigqueryDestination": {
"outputUri": ""
}
}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1beta1/:name:exportEvaluatedExamples");
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 \"outputConfig\": {\n \"bigqueryDestination\": {\n \"outputUri\": \"\"\n }\n }\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1beta1/:name:exportEvaluatedExamples" {:content-type :json
:form-params {:outputConfig {:bigqueryDestination {:outputUri ""}}}})
require "http/client"
url = "{{baseUrl}}/v1beta1/:name:exportEvaluatedExamples"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"outputConfig\": {\n \"bigqueryDestination\": {\n \"outputUri\": \"\"\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}}/v1beta1/:name:exportEvaluatedExamples"),
Content = new StringContent("{\n \"outputConfig\": {\n \"bigqueryDestination\": {\n \"outputUri\": \"\"\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}}/v1beta1/:name:exportEvaluatedExamples");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"outputConfig\": {\n \"bigqueryDestination\": {\n \"outputUri\": \"\"\n }\n }\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1beta1/:name:exportEvaluatedExamples"
payload := strings.NewReader("{\n \"outputConfig\": {\n \"bigqueryDestination\": {\n \"outputUri\": \"\"\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/v1beta1/:name:exportEvaluatedExamples HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 84
{
"outputConfig": {
"bigqueryDestination": {
"outputUri": ""
}
}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1beta1/:name:exportEvaluatedExamples")
.setHeader("content-type", "application/json")
.setBody("{\n \"outputConfig\": {\n \"bigqueryDestination\": {\n \"outputUri\": \"\"\n }\n }\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1beta1/:name:exportEvaluatedExamples"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"outputConfig\": {\n \"bigqueryDestination\": {\n \"outputUri\": \"\"\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 \"outputConfig\": {\n \"bigqueryDestination\": {\n \"outputUri\": \"\"\n }\n }\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1beta1/:name:exportEvaluatedExamples")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1beta1/:name:exportEvaluatedExamples")
.header("content-type", "application/json")
.body("{\n \"outputConfig\": {\n \"bigqueryDestination\": {\n \"outputUri\": \"\"\n }\n }\n}")
.asString();
const data = JSON.stringify({
outputConfig: {
bigqueryDestination: {
outputUri: ''
}
}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v1beta1/:name:exportEvaluatedExamples');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1beta1/:name:exportEvaluatedExamples',
headers: {'content-type': 'application/json'},
data: {outputConfig: {bigqueryDestination: {outputUri: ''}}}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1beta1/:name:exportEvaluatedExamples';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"outputConfig":{"bigqueryDestination":{"outputUri":""}}}'
};
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}}/v1beta1/:name:exportEvaluatedExamples',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "outputConfig": {\n "bigqueryDestination": {\n "outputUri": ""\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 \"outputConfig\": {\n \"bigqueryDestination\": {\n \"outputUri\": \"\"\n }\n }\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1beta1/:name:exportEvaluatedExamples")
.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/v1beta1/:name:exportEvaluatedExamples',
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({outputConfig: {bigqueryDestination: {outputUri: ''}}}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1beta1/:name:exportEvaluatedExamples',
headers: {'content-type': 'application/json'},
body: {outputConfig: {bigqueryDestination: {outputUri: ''}}},
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}}/v1beta1/:name:exportEvaluatedExamples');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
outputConfig: {
bigqueryDestination: {
outputUri: ''
}
}
});
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}}/v1beta1/:name:exportEvaluatedExamples',
headers: {'content-type': 'application/json'},
data: {outputConfig: {bigqueryDestination: {outputUri: ''}}}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1beta1/:name:exportEvaluatedExamples';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"outputConfig":{"bigqueryDestination":{"outputUri":""}}}'
};
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 = @{ @"outputConfig": @{ @"bigqueryDestination": @{ @"outputUri": @"" } } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1beta1/:name:exportEvaluatedExamples"]
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}}/v1beta1/:name:exportEvaluatedExamples" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"outputConfig\": {\n \"bigqueryDestination\": {\n \"outputUri\": \"\"\n }\n }\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1beta1/:name:exportEvaluatedExamples",
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([
'outputConfig' => [
'bigqueryDestination' => [
'outputUri' => ''
]
]
]),
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}}/v1beta1/:name:exportEvaluatedExamples', [
'body' => '{
"outputConfig": {
"bigqueryDestination": {
"outputUri": ""
}
}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1beta1/:name:exportEvaluatedExamples');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'outputConfig' => [
'bigqueryDestination' => [
'outputUri' => ''
]
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'outputConfig' => [
'bigqueryDestination' => [
'outputUri' => ''
]
]
]));
$request->setRequestUrl('{{baseUrl}}/v1beta1/:name:exportEvaluatedExamples');
$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}}/v1beta1/:name:exportEvaluatedExamples' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"outputConfig": {
"bigqueryDestination": {
"outputUri": ""
}
}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1beta1/:name:exportEvaluatedExamples' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"outputConfig": {
"bigqueryDestination": {
"outputUri": ""
}
}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"outputConfig\": {\n \"bigqueryDestination\": {\n \"outputUri\": \"\"\n }\n }\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1beta1/:name:exportEvaluatedExamples", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1beta1/:name:exportEvaluatedExamples"
payload = { "outputConfig": { "bigqueryDestination": { "outputUri": "" } } }
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1beta1/:name:exportEvaluatedExamples"
payload <- "{\n \"outputConfig\": {\n \"bigqueryDestination\": {\n \"outputUri\": \"\"\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}}/v1beta1/:name:exportEvaluatedExamples")
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 \"outputConfig\": {\n \"bigqueryDestination\": {\n \"outputUri\": \"\"\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/v1beta1/:name:exportEvaluatedExamples') do |req|
req.body = "{\n \"outputConfig\": {\n \"bigqueryDestination\": {\n \"outputUri\": \"\"\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}}/v1beta1/:name:exportEvaluatedExamples";
let payload = json!({"outputConfig": json!({"bigqueryDestination": json!({"outputUri": ""})})});
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}}/v1beta1/:name:exportEvaluatedExamples \
--header 'content-type: application/json' \
--data '{
"outputConfig": {
"bigqueryDestination": {
"outputUri": ""
}
}
}'
echo '{
"outputConfig": {
"bigqueryDestination": {
"outputUri": ""
}
}
}' | \
http POST {{baseUrl}}/v1beta1/:name:exportEvaluatedExamples \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "outputConfig": {\n "bigqueryDestination": {\n "outputUri": ""\n }\n }\n}' \
--output-document \
- {{baseUrl}}/v1beta1/:name:exportEvaluatedExamples
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["outputConfig": ["bigqueryDestination": ["outputUri": ""]]] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1beta1/:name:exportEvaluatedExamples")! 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
automl.projects.locations.models.getIamPolicy
{{baseUrl}}/v1beta1/:resource:getIamPolicy
QUERY PARAMS
resource
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1beta1/:resource:getIamPolicy");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v1beta1/:resource:getIamPolicy")
require "http/client"
url = "{{baseUrl}}/v1beta1/:resource:getIamPolicy"
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}}/v1beta1/:resource:getIamPolicy"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1beta1/:resource:getIamPolicy");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1beta1/:resource:getIamPolicy"
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/v1beta1/:resource:getIamPolicy HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1beta1/:resource:getIamPolicy")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1beta1/:resource:getIamPolicy"))
.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}}/v1beta1/:resource:getIamPolicy")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1beta1/:resource:getIamPolicy")
.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}}/v1beta1/:resource:getIamPolicy');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/v1beta1/:resource:getIamPolicy'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1beta1/:resource:getIamPolicy';
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}}/v1beta1/:resource:getIamPolicy',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1beta1/:resource:getIamPolicy")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1beta1/:resource:getIamPolicy',
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}}/v1beta1/:resource:getIamPolicy'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v1beta1/:resource:getIamPolicy');
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}}/v1beta1/:resource:getIamPolicy'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1beta1/:resource:getIamPolicy';
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}}/v1beta1/:resource:getIamPolicy"]
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}}/v1beta1/:resource:getIamPolicy" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1beta1/:resource:getIamPolicy",
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}}/v1beta1/:resource:getIamPolicy');
echo $response->getBody();
setUrl('{{baseUrl}}/v1beta1/:resource:getIamPolicy');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1beta1/:resource:getIamPolicy');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1beta1/:resource:getIamPolicy' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1beta1/:resource:getIamPolicy' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v1beta1/:resource:getIamPolicy")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1beta1/:resource:getIamPolicy"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1beta1/:resource:getIamPolicy"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1beta1/:resource:getIamPolicy")
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/v1beta1/:resource:getIamPolicy') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1beta1/:resource:getIamPolicy";
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}}/v1beta1/:resource:getIamPolicy
http GET {{baseUrl}}/v1beta1/:resource:getIamPolicy
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v1beta1/:resource:getIamPolicy
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1beta1/:resource:getIamPolicy")! 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
automl.projects.locations.models.list
{{baseUrl}}/v1beta1/:parent/models
QUERY PARAMS
parent
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1beta1/:parent/models");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v1beta1/:parent/models")
require "http/client"
url = "{{baseUrl}}/v1beta1/:parent/models"
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}}/v1beta1/:parent/models"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1beta1/:parent/models");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1beta1/:parent/models"
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/v1beta1/:parent/models HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1beta1/:parent/models")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1beta1/:parent/models"))
.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}}/v1beta1/:parent/models")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1beta1/:parent/models")
.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}}/v1beta1/:parent/models');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/v1beta1/:parent/models'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1beta1/:parent/models';
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}}/v1beta1/:parent/models',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1beta1/:parent/models")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1beta1/:parent/models',
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}}/v1beta1/:parent/models'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v1beta1/:parent/models');
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}}/v1beta1/:parent/models'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1beta1/:parent/models';
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}}/v1beta1/:parent/models"]
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}}/v1beta1/:parent/models" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1beta1/:parent/models",
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}}/v1beta1/:parent/models');
echo $response->getBody();
setUrl('{{baseUrl}}/v1beta1/:parent/models');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1beta1/:parent/models');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1beta1/:parent/models' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1beta1/:parent/models' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v1beta1/:parent/models")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1beta1/:parent/models"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1beta1/:parent/models"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1beta1/:parent/models")
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/v1beta1/:parent/models') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1beta1/:parent/models";
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}}/v1beta1/:parent/models
http GET {{baseUrl}}/v1beta1/:parent/models
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v1beta1/:parent/models
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1beta1/:parent/models")! 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
automl.projects.locations.models.modelEvaluations.list
{{baseUrl}}/v1beta1/:parent/modelEvaluations
QUERY PARAMS
parent
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1beta1/:parent/modelEvaluations");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v1beta1/:parent/modelEvaluations")
require "http/client"
url = "{{baseUrl}}/v1beta1/:parent/modelEvaluations"
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}}/v1beta1/:parent/modelEvaluations"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1beta1/:parent/modelEvaluations");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1beta1/:parent/modelEvaluations"
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/v1beta1/:parent/modelEvaluations HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1beta1/:parent/modelEvaluations")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1beta1/:parent/modelEvaluations"))
.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}}/v1beta1/:parent/modelEvaluations")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1beta1/:parent/modelEvaluations")
.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}}/v1beta1/:parent/modelEvaluations');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/v1beta1/:parent/modelEvaluations'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1beta1/:parent/modelEvaluations';
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}}/v1beta1/:parent/modelEvaluations',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1beta1/:parent/modelEvaluations")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1beta1/:parent/modelEvaluations',
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}}/v1beta1/:parent/modelEvaluations'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v1beta1/:parent/modelEvaluations');
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}}/v1beta1/:parent/modelEvaluations'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1beta1/:parent/modelEvaluations';
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}}/v1beta1/:parent/modelEvaluations"]
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}}/v1beta1/:parent/modelEvaluations" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1beta1/:parent/modelEvaluations",
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}}/v1beta1/:parent/modelEvaluations');
echo $response->getBody();
setUrl('{{baseUrl}}/v1beta1/:parent/modelEvaluations');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1beta1/:parent/modelEvaluations');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1beta1/:parent/modelEvaluations' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1beta1/:parent/modelEvaluations' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v1beta1/:parent/modelEvaluations")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1beta1/:parent/modelEvaluations"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1beta1/:parent/modelEvaluations"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1beta1/:parent/modelEvaluations")
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/v1beta1/:parent/modelEvaluations') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1beta1/:parent/modelEvaluations";
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}}/v1beta1/:parent/modelEvaluations
http GET {{baseUrl}}/v1beta1/:parent/modelEvaluations
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v1beta1/:parent/modelEvaluations
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1beta1/:parent/modelEvaluations")! 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
automl.projects.locations.models.predict
{{baseUrl}}/v1beta1/:name:predict
QUERY PARAMS
name
BODY json
{
"params": {},
"payload": {
"document": {
"documentDimensions": {
"height": "",
"unit": "",
"width": ""
},
"documentText": {
"content": "",
"contentUri": "",
"mimeType": ""
},
"inputConfig": {
"gcsSource": {
"inputUris": []
}
},
"layout": [
{
"boundingPoly": {
"normalizedVertices": [
{
"x": "",
"y": ""
}
]
},
"pageNumber": 0,
"textSegment": {
"content": "",
"endOffset": "",
"startOffset": ""
},
"textSegmentType": ""
}
],
"pageCount": 0
},
"image": {
"imageBytes": "",
"inputConfig": {
"bigquerySource": {
"inputUri": ""
},
"gcsSource": {},
"params": {}
},
"thumbnailUri": ""
},
"row": {
"columnSpecIds": [],
"values": []
},
"textSnippet": {}
}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1beta1/:name:predict");
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 \"params\": {},\n \"payload\": {\n \"document\": {\n \"documentDimensions\": {\n \"height\": \"\",\n \"unit\": \"\",\n \"width\": \"\"\n },\n \"documentText\": {\n \"content\": \"\",\n \"contentUri\": \"\",\n \"mimeType\": \"\"\n },\n \"inputConfig\": {\n \"gcsSource\": {\n \"inputUris\": []\n }\n },\n \"layout\": [\n {\n \"boundingPoly\": {\n \"normalizedVertices\": [\n {\n \"x\": \"\",\n \"y\": \"\"\n }\n ]\n },\n \"pageNumber\": 0,\n \"textSegment\": {\n \"content\": \"\",\n \"endOffset\": \"\",\n \"startOffset\": \"\"\n },\n \"textSegmentType\": \"\"\n }\n ],\n \"pageCount\": 0\n },\n \"image\": {\n \"imageBytes\": \"\",\n \"inputConfig\": {\n \"bigquerySource\": {\n \"inputUri\": \"\"\n },\n \"gcsSource\": {},\n \"params\": {}\n },\n \"thumbnailUri\": \"\"\n },\n \"row\": {\n \"columnSpecIds\": [],\n \"values\": []\n },\n \"textSnippet\": {}\n }\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1beta1/:name:predict" {:content-type :json
:form-params {:params {}
:payload {:document {:documentDimensions {:height ""
:unit ""
:width ""}
:documentText {:content ""
:contentUri ""
:mimeType ""}
:inputConfig {:gcsSource {:inputUris []}}
:layout [{:boundingPoly {:normalizedVertices [{:x ""
:y ""}]}
:pageNumber 0
:textSegment {:content ""
:endOffset ""
:startOffset ""}
:textSegmentType ""}]
:pageCount 0}
:image {:imageBytes ""
:inputConfig {:bigquerySource {:inputUri ""}
:gcsSource {}
:params {}}
:thumbnailUri ""}
:row {:columnSpecIds []
:values []}
:textSnippet {}}}})
require "http/client"
url = "{{baseUrl}}/v1beta1/:name:predict"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"params\": {},\n \"payload\": {\n \"document\": {\n \"documentDimensions\": {\n \"height\": \"\",\n \"unit\": \"\",\n \"width\": \"\"\n },\n \"documentText\": {\n \"content\": \"\",\n \"contentUri\": \"\",\n \"mimeType\": \"\"\n },\n \"inputConfig\": {\n \"gcsSource\": {\n \"inputUris\": []\n }\n },\n \"layout\": [\n {\n \"boundingPoly\": {\n \"normalizedVertices\": [\n {\n \"x\": \"\",\n \"y\": \"\"\n }\n ]\n },\n \"pageNumber\": 0,\n \"textSegment\": {\n \"content\": \"\",\n \"endOffset\": \"\",\n \"startOffset\": \"\"\n },\n \"textSegmentType\": \"\"\n }\n ],\n \"pageCount\": 0\n },\n \"image\": {\n \"imageBytes\": \"\",\n \"inputConfig\": {\n \"bigquerySource\": {\n \"inputUri\": \"\"\n },\n \"gcsSource\": {},\n \"params\": {}\n },\n \"thumbnailUri\": \"\"\n },\n \"row\": {\n \"columnSpecIds\": [],\n \"values\": []\n },\n \"textSnippet\": {}\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}}/v1beta1/:name:predict"),
Content = new StringContent("{\n \"params\": {},\n \"payload\": {\n \"document\": {\n \"documentDimensions\": {\n \"height\": \"\",\n \"unit\": \"\",\n \"width\": \"\"\n },\n \"documentText\": {\n \"content\": \"\",\n \"contentUri\": \"\",\n \"mimeType\": \"\"\n },\n \"inputConfig\": {\n \"gcsSource\": {\n \"inputUris\": []\n }\n },\n \"layout\": [\n {\n \"boundingPoly\": {\n \"normalizedVertices\": [\n {\n \"x\": \"\",\n \"y\": \"\"\n }\n ]\n },\n \"pageNumber\": 0,\n \"textSegment\": {\n \"content\": \"\",\n \"endOffset\": \"\",\n \"startOffset\": \"\"\n },\n \"textSegmentType\": \"\"\n }\n ],\n \"pageCount\": 0\n },\n \"image\": {\n \"imageBytes\": \"\",\n \"inputConfig\": {\n \"bigquerySource\": {\n \"inputUri\": \"\"\n },\n \"gcsSource\": {},\n \"params\": {}\n },\n \"thumbnailUri\": \"\"\n },\n \"row\": {\n \"columnSpecIds\": [],\n \"values\": []\n },\n \"textSnippet\": {}\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}}/v1beta1/:name:predict");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"params\": {},\n \"payload\": {\n \"document\": {\n \"documentDimensions\": {\n \"height\": \"\",\n \"unit\": \"\",\n \"width\": \"\"\n },\n \"documentText\": {\n \"content\": \"\",\n \"contentUri\": \"\",\n \"mimeType\": \"\"\n },\n \"inputConfig\": {\n \"gcsSource\": {\n \"inputUris\": []\n }\n },\n \"layout\": [\n {\n \"boundingPoly\": {\n \"normalizedVertices\": [\n {\n \"x\": \"\",\n \"y\": \"\"\n }\n ]\n },\n \"pageNumber\": 0,\n \"textSegment\": {\n \"content\": \"\",\n \"endOffset\": \"\",\n \"startOffset\": \"\"\n },\n \"textSegmentType\": \"\"\n }\n ],\n \"pageCount\": 0\n },\n \"image\": {\n \"imageBytes\": \"\",\n \"inputConfig\": {\n \"bigquerySource\": {\n \"inputUri\": \"\"\n },\n \"gcsSource\": {},\n \"params\": {}\n },\n \"thumbnailUri\": \"\"\n },\n \"row\": {\n \"columnSpecIds\": [],\n \"values\": []\n },\n \"textSnippet\": {}\n }\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1beta1/:name:predict"
payload := strings.NewReader("{\n \"params\": {},\n \"payload\": {\n \"document\": {\n \"documentDimensions\": {\n \"height\": \"\",\n \"unit\": \"\",\n \"width\": \"\"\n },\n \"documentText\": {\n \"content\": \"\",\n \"contentUri\": \"\",\n \"mimeType\": \"\"\n },\n \"inputConfig\": {\n \"gcsSource\": {\n \"inputUris\": []\n }\n },\n \"layout\": [\n {\n \"boundingPoly\": {\n \"normalizedVertices\": [\n {\n \"x\": \"\",\n \"y\": \"\"\n }\n ]\n },\n \"pageNumber\": 0,\n \"textSegment\": {\n \"content\": \"\",\n \"endOffset\": \"\",\n \"startOffset\": \"\"\n },\n \"textSegmentType\": \"\"\n }\n ],\n \"pageCount\": 0\n },\n \"image\": {\n \"imageBytes\": \"\",\n \"inputConfig\": {\n \"bigquerySource\": {\n \"inputUri\": \"\"\n },\n \"gcsSource\": {},\n \"params\": {}\n },\n \"thumbnailUri\": \"\"\n },\n \"row\": {\n \"columnSpecIds\": [],\n \"values\": []\n },\n \"textSnippet\": {}\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/v1beta1/:name:predict HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 1086
{
"params": {},
"payload": {
"document": {
"documentDimensions": {
"height": "",
"unit": "",
"width": ""
},
"documentText": {
"content": "",
"contentUri": "",
"mimeType": ""
},
"inputConfig": {
"gcsSource": {
"inputUris": []
}
},
"layout": [
{
"boundingPoly": {
"normalizedVertices": [
{
"x": "",
"y": ""
}
]
},
"pageNumber": 0,
"textSegment": {
"content": "",
"endOffset": "",
"startOffset": ""
},
"textSegmentType": ""
}
],
"pageCount": 0
},
"image": {
"imageBytes": "",
"inputConfig": {
"bigquerySource": {
"inputUri": ""
},
"gcsSource": {},
"params": {}
},
"thumbnailUri": ""
},
"row": {
"columnSpecIds": [],
"values": []
},
"textSnippet": {}
}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1beta1/:name:predict")
.setHeader("content-type", "application/json")
.setBody("{\n \"params\": {},\n \"payload\": {\n \"document\": {\n \"documentDimensions\": {\n \"height\": \"\",\n \"unit\": \"\",\n \"width\": \"\"\n },\n \"documentText\": {\n \"content\": \"\",\n \"contentUri\": \"\",\n \"mimeType\": \"\"\n },\n \"inputConfig\": {\n \"gcsSource\": {\n \"inputUris\": []\n }\n },\n \"layout\": [\n {\n \"boundingPoly\": {\n \"normalizedVertices\": [\n {\n \"x\": \"\",\n \"y\": \"\"\n }\n ]\n },\n \"pageNumber\": 0,\n \"textSegment\": {\n \"content\": \"\",\n \"endOffset\": \"\",\n \"startOffset\": \"\"\n },\n \"textSegmentType\": \"\"\n }\n ],\n \"pageCount\": 0\n },\n \"image\": {\n \"imageBytes\": \"\",\n \"inputConfig\": {\n \"bigquerySource\": {\n \"inputUri\": \"\"\n },\n \"gcsSource\": {},\n \"params\": {}\n },\n \"thumbnailUri\": \"\"\n },\n \"row\": {\n \"columnSpecIds\": [],\n \"values\": []\n },\n \"textSnippet\": {}\n }\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1beta1/:name:predict"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"params\": {},\n \"payload\": {\n \"document\": {\n \"documentDimensions\": {\n \"height\": \"\",\n \"unit\": \"\",\n \"width\": \"\"\n },\n \"documentText\": {\n \"content\": \"\",\n \"contentUri\": \"\",\n \"mimeType\": \"\"\n },\n \"inputConfig\": {\n \"gcsSource\": {\n \"inputUris\": []\n }\n },\n \"layout\": [\n {\n \"boundingPoly\": {\n \"normalizedVertices\": [\n {\n \"x\": \"\",\n \"y\": \"\"\n }\n ]\n },\n \"pageNumber\": 0,\n \"textSegment\": {\n \"content\": \"\",\n \"endOffset\": \"\",\n \"startOffset\": \"\"\n },\n \"textSegmentType\": \"\"\n }\n ],\n \"pageCount\": 0\n },\n \"image\": {\n \"imageBytes\": \"\",\n \"inputConfig\": {\n \"bigquerySource\": {\n \"inputUri\": \"\"\n },\n \"gcsSource\": {},\n \"params\": {}\n },\n \"thumbnailUri\": \"\"\n },\n \"row\": {\n \"columnSpecIds\": [],\n \"values\": []\n },\n \"textSnippet\": {}\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 \"params\": {},\n \"payload\": {\n \"document\": {\n \"documentDimensions\": {\n \"height\": \"\",\n \"unit\": \"\",\n \"width\": \"\"\n },\n \"documentText\": {\n \"content\": \"\",\n \"contentUri\": \"\",\n \"mimeType\": \"\"\n },\n \"inputConfig\": {\n \"gcsSource\": {\n \"inputUris\": []\n }\n },\n \"layout\": [\n {\n \"boundingPoly\": {\n \"normalizedVertices\": [\n {\n \"x\": \"\",\n \"y\": \"\"\n }\n ]\n },\n \"pageNumber\": 0,\n \"textSegment\": {\n \"content\": \"\",\n \"endOffset\": \"\",\n \"startOffset\": \"\"\n },\n \"textSegmentType\": \"\"\n }\n ],\n \"pageCount\": 0\n },\n \"image\": {\n \"imageBytes\": \"\",\n \"inputConfig\": {\n \"bigquerySource\": {\n \"inputUri\": \"\"\n },\n \"gcsSource\": {},\n \"params\": {}\n },\n \"thumbnailUri\": \"\"\n },\n \"row\": {\n \"columnSpecIds\": [],\n \"values\": []\n },\n \"textSnippet\": {}\n }\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1beta1/:name:predict")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1beta1/:name:predict")
.header("content-type", "application/json")
.body("{\n \"params\": {},\n \"payload\": {\n \"document\": {\n \"documentDimensions\": {\n \"height\": \"\",\n \"unit\": \"\",\n \"width\": \"\"\n },\n \"documentText\": {\n \"content\": \"\",\n \"contentUri\": \"\",\n \"mimeType\": \"\"\n },\n \"inputConfig\": {\n \"gcsSource\": {\n \"inputUris\": []\n }\n },\n \"layout\": [\n {\n \"boundingPoly\": {\n \"normalizedVertices\": [\n {\n \"x\": \"\",\n \"y\": \"\"\n }\n ]\n },\n \"pageNumber\": 0,\n \"textSegment\": {\n \"content\": \"\",\n \"endOffset\": \"\",\n \"startOffset\": \"\"\n },\n \"textSegmentType\": \"\"\n }\n ],\n \"pageCount\": 0\n },\n \"image\": {\n \"imageBytes\": \"\",\n \"inputConfig\": {\n \"bigquerySource\": {\n \"inputUri\": \"\"\n },\n \"gcsSource\": {},\n \"params\": {}\n },\n \"thumbnailUri\": \"\"\n },\n \"row\": {\n \"columnSpecIds\": [],\n \"values\": []\n },\n \"textSnippet\": {}\n }\n}")
.asString();
const data = JSON.stringify({
params: {},
payload: {
document: {
documentDimensions: {
height: '',
unit: '',
width: ''
},
documentText: {
content: '',
contentUri: '',
mimeType: ''
},
inputConfig: {
gcsSource: {
inputUris: []
}
},
layout: [
{
boundingPoly: {
normalizedVertices: [
{
x: '',
y: ''
}
]
},
pageNumber: 0,
textSegment: {
content: '',
endOffset: '',
startOffset: ''
},
textSegmentType: ''
}
],
pageCount: 0
},
image: {
imageBytes: '',
inputConfig: {
bigquerySource: {
inputUri: ''
},
gcsSource: {},
params: {}
},
thumbnailUri: ''
},
row: {
columnSpecIds: [],
values: []
},
textSnippet: {}
}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v1beta1/:name:predict');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1beta1/:name:predict',
headers: {'content-type': 'application/json'},
data: {
params: {},
payload: {
document: {
documentDimensions: {height: '', unit: '', width: ''},
documentText: {content: '', contentUri: '', mimeType: ''},
inputConfig: {gcsSource: {inputUris: []}},
layout: [
{
boundingPoly: {normalizedVertices: [{x: '', y: ''}]},
pageNumber: 0,
textSegment: {content: '', endOffset: '', startOffset: ''},
textSegmentType: ''
}
],
pageCount: 0
},
image: {
imageBytes: '',
inputConfig: {bigquerySource: {inputUri: ''}, gcsSource: {}, params: {}},
thumbnailUri: ''
},
row: {columnSpecIds: [], values: []},
textSnippet: {}
}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1beta1/:name:predict';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"params":{},"payload":{"document":{"documentDimensions":{"height":"","unit":"","width":""},"documentText":{"content":"","contentUri":"","mimeType":""},"inputConfig":{"gcsSource":{"inputUris":[]}},"layout":[{"boundingPoly":{"normalizedVertices":[{"x":"","y":""}]},"pageNumber":0,"textSegment":{"content":"","endOffset":"","startOffset":""},"textSegmentType":""}],"pageCount":0},"image":{"imageBytes":"","inputConfig":{"bigquerySource":{"inputUri":""},"gcsSource":{},"params":{}},"thumbnailUri":""},"row":{"columnSpecIds":[],"values":[]},"textSnippet":{}}}'
};
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}}/v1beta1/:name:predict',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "params": {},\n "payload": {\n "document": {\n "documentDimensions": {\n "height": "",\n "unit": "",\n "width": ""\n },\n "documentText": {\n "content": "",\n "contentUri": "",\n "mimeType": ""\n },\n "inputConfig": {\n "gcsSource": {\n "inputUris": []\n }\n },\n "layout": [\n {\n "boundingPoly": {\n "normalizedVertices": [\n {\n "x": "",\n "y": ""\n }\n ]\n },\n "pageNumber": 0,\n "textSegment": {\n "content": "",\n "endOffset": "",\n "startOffset": ""\n },\n "textSegmentType": ""\n }\n ],\n "pageCount": 0\n },\n "image": {\n "imageBytes": "",\n "inputConfig": {\n "bigquerySource": {\n "inputUri": ""\n },\n "gcsSource": {},\n "params": {}\n },\n "thumbnailUri": ""\n },\n "row": {\n "columnSpecIds": [],\n "values": []\n },\n "textSnippet": {}\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 \"params\": {},\n \"payload\": {\n \"document\": {\n \"documentDimensions\": {\n \"height\": \"\",\n \"unit\": \"\",\n \"width\": \"\"\n },\n \"documentText\": {\n \"content\": \"\",\n \"contentUri\": \"\",\n \"mimeType\": \"\"\n },\n \"inputConfig\": {\n \"gcsSource\": {\n \"inputUris\": []\n }\n },\n \"layout\": [\n {\n \"boundingPoly\": {\n \"normalizedVertices\": [\n {\n \"x\": \"\",\n \"y\": \"\"\n }\n ]\n },\n \"pageNumber\": 0,\n \"textSegment\": {\n \"content\": \"\",\n \"endOffset\": \"\",\n \"startOffset\": \"\"\n },\n \"textSegmentType\": \"\"\n }\n ],\n \"pageCount\": 0\n },\n \"image\": {\n \"imageBytes\": \"\",\n \"inputConfig\": {\n \"bigquerySource\": {\n \"inputUri\": \"\"\n },\n \"gcsSource\": {},\n \"params\": {}\n },\n \"thumbnailUri\": \"\"\n },\n \"row\": {\n \"columnSpecIds\": [],\n \"values\": []\n },\n \"textSnippet\": {}\n }\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1beta1/:name:predict")
.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/v1beta1/:name:predict',
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({
params: {},
payload: {
document: {
documentDimensions: {height: '', unit: '', width: ''},
documentText: {content: '', contentUri: '', mimeType: ''},
inputConfig: {gcsSource: {inputUris: []}},
layout: [
{
boundingPoly: {normalizedVertices: [{x: '', y: ''}]},
pageNumber: 0,
textSegment: {content: '', endOffset: '', startOffset: ''},
textSegmentType: ''
}
],
pageCount: 0
},
image: {
imageBytes: '',
inputConfig: {bigquerySource: {inputUri: ''}, gcsSource: {}, params: {}},
thumbnailUri: ''
},
row: {columnSpecIds: [], values: []},
textSnippet: {}
}
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1beta1/:name:predict',
headers: {'content-type': 'application/json'},
body: {
params: {},
payload: {
document: {
documentDimensions: {height: '', unit: '', width: ''},
documentText: {content: '', contentUri: '', mimeType: ''},
inputConfig: {gcsSource: {inputUris: []}},
layout: [
{
boundingPoly: {normalizedVertices: [{x: '', y: ''}]},
pageNumber: 0,
textSegment: {content: '', endOffset: '', startOffset: ''},
textSegmentType: ''
}
],
pageCount: 0
},
image: {
imageBytes: '',
inputConfig: {bigquerySource: {inputUri: ''}, gcsSource: {}, params: {}},
thumbnailUri: ''
},
row: {columnSpecIds: [], values: []},
textSnippet: {}
}
},
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}}/v1beta1/:name:predict');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
params: {},
payload: {
document: {
documentDimensions: {
height: '',
unit: '',
width: ''
},
documentText: {
content: '',
contentUri: '',
mimeType: ''
},
inputConfig: {
gcsSource: {
inputUris: []
}
},
layout: [
{
boundingPoly: {
normalizedVertices: [
{
x: '',
y: ''
}
]
},
pageNumber: 0,
textSegment: {
content: '',
endOffset: '',
startOffset: ''
},
textSegmentType: ''
}
],
pageCount: 0
},
image: {
imageBytes: '',
inputConfig: {
bigquerySource: {
inputUri: ''
},
gcsSource: {},
params: {}
},
thumbnailUri: ''
},
row: {
columnSpecIds: [],
values: []
},
textSnippet: {}
}
});
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}}/v1beta1/:name:predict',
headers: {'content-type': 'application/json'},
data: {
params: {},
payload: {
document: {
documentDimensions: {height: '', unit: '', width: ''},
documentText: {content: '', contentUri: '', mimeType: ''},
inputConfig: {gcsSource: {inputUris: []}},
layout: [
{
boundingPoly: {normalizedVertices: [{x: '', y: ''}]},
pageNumber: 0,
textSegment: {content: '', endOffset: '', startOffset: ''},
textSegmentType: ''
}
],
pageCount: 0
},
image: {
imageBytes: '',
inputConfig: {bigquerySource: {inputUri: ''}, gcsSource: {}, params: {}},
thumbnailUri: ''
},
row: {columnSpecIds: [], values: []},
textSnippet: {}
}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1beta1/:name:predict';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"params":{},"payload":{"document":{"documentDimensions":{"height":"","unit":"","width":""},"documentText":{"content":"","contentUri":"","mimeType":""},"inputConfig":{"gcsSource":{"inputUris":[]}},"layout":[{"boundingPoly":{"normalizedVertices":[{"x":"","y":""}]},"pageNumber":0,"textSegment":{"content":"","endOffset":"","startOffset":""},"textSegmentType":""}],"pageCount":0},"image":{"imageBytes":"","inputConfig":{"bigquerySource":{"inputUri":""},"gcsSource":{},"params":{}},"thumbnailUri":""},"row":{"columnSpecIds":[],"values":[]},"textSnippet":{}}}'
};
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 = @{ @"params": @{ },
@"payload": @{ @"document": @{ @"documentDimensions": @{ @"height": @"", @"unit": @"", @"width": @"" }, @"documentText": @{ @"content": @"", @"contentUri": @"", @"mimeType": @"" }, @"inputConfig": @{ @"gcsSource": @{ @"inputUris": @[ ] } }, @"layout": @[ @{ @"boundingPoly": @{ @"normalizedVertices": @[ @{ @"x": @"", @"y": @"" } ] }, @"pageNumber": @0, @"textSegment": @{ @"content": @"", @"endOffset": @"", @"startOffset": @"" }, @"textSegmentType": @"" } ], @"pageCount": @0 }, @"image": @{ @"imageBytes": @"", @"inputConfig": @{ @"bigquerySource": @{ @"inputUri": @"" }, @"gcsSource": @{ }, @"params": @{ } }, @"thumbnailUri": @"" }, @"row": @{ @"columnSpecIds": @[ ], @"values": @[ ] }, @"textSnippet": @{ } } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1beta1/:name:predict"]
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}}/v1beta1/:name:predict" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"params\": {},\n \"payload\": {\n \"document\": {\n \"documentDimensions\": {\n \"height\": \"\",\n \"unit\": \"\",\n \"width\": \"\"\n },\n \"documentText\": {\n \"content\": \"\",\n \"contentUri\": \"\",\n \"mimeType\": \"\"\n },\n \"inputConfig\": {\n \"gcsSource\": {\n \"inputUris\": []\n }\n },\n \"layout\": [\n {\n \"boundingPoly\": {\n \"normalizedVertices\": [\n {\n \"x\": \"\",\n \"y\": \"\"\n }\n ]\n },\n \"pageNumber\": 0,\n \"textSegment\": {\n \"content\": \"\",\n \"endOffset\": \"\",\n \"startOffset\": \"\"\n },\n \"textSegmentType\": \"\"\n }\n ],\n \"pageCount\": 0\n },\n \"image\": {\n \"imageBytes\": \"\",\n \"inputConfig\": {\n \"bigquerySource\": {\n \"inputUri\": \"\"\n },\n \"gcsSource\": {},\n \"params\": {}\n },\n \"thumbnailUri\": \"\"\n },\n \"row\": {\n \"columnSpecIds\": [],\n \"values\": []\n },\n \"textSnippet\": {}\n }\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1beta1/:name:predict",
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([
'params' => [
],
'payload' => [
'document' => [
'documentDimensions' => [
'height' => '',
'unit' => '',
'width' => ''
],
'documentText' => [
'content' => '',
'contentUri' => '',
'mimeType' => ''
],
'inputConfig' => [
'gcsSource' => [
'inputUris' => [
]
]
],
'layout' => [
[
'boundingPoly' => [
'normalizedVertices' => [
[
'x' => '',
'y' => ''
]
]
],
'pageNumber' => 0,
'textSegment' => [
'content' => '',
'endOffset' => '',
'startOffset' => ''
],
'textSegmentType' => ''
]
],
'pageCount' => 0
],
'image' => [
'imageBytes' => '',
'inputConfig' => [
'bigquerySource' => [
'inputUri' => ''
],
'gcsSource' => [
],
'params' => [
]
],
'thumbnailUri' => ''
],
'row' => [
'columnSpecIds' => [
],
'values' => [
]
],
'textSnippet' => [
]
]
]),
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}}/v1beta1/:name:predict', [
'body' => '{
"params": {},
"payload": {
"document": {
"documentDimensions": {
"height": "",
"unit": "",
"width": ""
},
"documentText": {
"content": "",
"contentUri": "",
"mimeType": ""
},
"inputConfig": {
"gcsSource": {
"inputUris": []
}
},
"layout": [
{
"boundingPoly": {
"normalizedVertices": [
{
"x": "",
"y": ""
}
]
},
"pageNumber": 0,
"textSegment": {
"content": "",
"endOffset": "",
"startOffset": ""
},
"textSegmentType": ""
}
],
"pageCount": 0
},
"image": {
"imageBytes": "",
"inputConfig": {
"bigquerySource": {
"inputUri": ""
},
"gcsSource": {},
"params": {}
},
"thumbnailUri": ""
},
"row": {
"columnSpecIds": [],
"values": []
},
"textSnippet": {}
}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1beta1/:name:predict');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'params' => [
],
'payload' => [
'document' => [
'documentDimensions' => [
'height' => '',
'unit' => '',
'width' => ''
],
'documentText' => [
'content' => '',
'contentUri' => '',
'mimeType' => ''
],
'inputConfig' => [
'gcsSource' => [
'inputUris' => [
]
]
],
'layout' => [
[
'boundingPoly' => [
'normalizedVertices' => [
[
'x' => '',
'y' => ''
]
]
],
'pageNumber' => 0,
'textSegment' => [
'content' => '',
'endOffset' => '',
'startOffset' => ''
],
'textSegmentType' => ''
]
],
'pageCount' => 0
],
'image' => [
'imageBytes' => '',
'inputConfig' => [
'bigquerySource' => [
'inputUri' => ''
],
'gcsSource' => [
],
'params' => [
]
],
'thumbnailUri' => ''
],
'row' => [
'columnSpecIds' => [
],
'values' => [
]
],
'textSnippet' => [
]
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'params' => [
],
'payload' => [
'document' => [
'documentDimensions' => [
'height' => '',
'unit' => '',
'width' => ''
],
'documentText' => [
'content' => '',
'contentUri' => '',
'mimeType' => ''
],
'inputConfig' => [
'gcsSource' => [
'inputUris' => [
]
]
],
'layout' => [
[
'boundingPoly' => [
'normalizedVertices' => [
[
'x' => '',
'y' => ''
]
]
],
'pageNumber' => 0,
'textSegment' => [
'content' => '',
'endOffset' => '',
'startOffset' => ''
],
'textSegmentType' => ''
]
],
'pageCount' => 0
],
'image' => [
'imageBytes' => '',
'inputConfig' => [
'bigquerySource' => [
'inputUri' => ''
],
'gcsSource' => [
],
'params' => [
]
],
'thumbnailUri' => ''
],
'row' => [
'columnSpecIds' => [
],
'values' => [
]
],
'textSnippet' => [
]
]
]));
$request->setRequestUrl('{{baseUrl}}/v1beta1/:name:predict');
$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}}/v1beta1/:name:predict' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"params": {},
"payload": {
"document": {
"documentDimensions": {
"height": "",
"unit": "",
"width": ""
},
"documentText": {
"content": "",
"contentUri": "",
"mimeType": ""
},
"inputConfig": {
"gcsSource": {
"inputUris": []
}
},
"layout": [
{
"boundingPoly": {
"normalizedVertices": [
{
"x": "",
"y": ""
}
]
},
"pageNumber": 0,
"textSegment": {
"content": "",
"endOffset": "",
"startOffset": ""
},
"textSegmentType": ""
}
],
"pageCount": 0
},
"image": {
"imageBytes": "",
"inputConfig": {
"bigquerySource": {
"inputUri": ""
},
"gcsSource": {},
"params": {}
},
"thumbnailUri": ""
},
"row": {
"columnSpecIds": [],
"values": []
},
"textSnippet": {}
}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1beta1/:name:predict' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"params": {},
"payload": {
"document": {
"documentDimensions": {
"height": "",
"unit": "",
"width": ""
},
"documentText": {
"content": "",
"contentUri": "",
"mimeType": ""
},
"inputConfig": {
"gcsSource": {
"inputUris": []
}
},
"layout": [
{
"boundingPoly": {
"normalizedVertices": [
{
"x": "",
"y": ""
}
]
},
"pageNumber": 0,
"textSegment": {
"content": "",
"endOffset": "",
"startOffset": ""
},
"textSegmentType": ""
}
],
"pageCount": 0
},
"image": {
"imageBytes": "",
"inputConfig": {
"bigquerySource": {
"inputUri": ""
},
"gcsSource": {},
"params": {}
},
"thumbnailUri": ""
},
"row": {
"columnSpecIds": [],
"values": []
},
"textSnippet": {}
}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"params\": {},\n \"payload\": {\n \"document\": {\n \"documentDimensions\": {\n \"height\": \"\",\n \"unit\": \"\",\n \"width\": \"\"\n },\n \"documentText\": {\n \"content\": \"\",\n \"contentUri\": \"\",\n \"mimeType\": \"\"\n },\n \"inputConfig\": {\n \"gcsSource\": {\n \"inputUris\": []\n }\n },\n \"layout\": [\n {\n \"boundingPoly\": {\n \"normalizedVertices\": [\n {\n \"x\": \"\",\n \"y\": \"\"\n }\n ]\n },\n \"pageNumber\": 0,\n \"textSegment\": {\n \"content\": \"\",\n \"endOffset\": \"\",\n \"startOffset\": \"\"\n },\n \"textSegmentType\": \"\"\n }\n ],\n \"pageCount\": 0\n },\n \"image\": {\n \"imageBytes\": \"\",\n \"inputConfig\": {\n \"bigquerySource\": {\n \"inputUri\": \"\"\n },\n \"gcsSource\": {},\n \"params\": {}\n },\n \"thumbnailUri\": \"\"\n },\n \"row\": {\n \"columnSpecIds\": [],\n \"values\": []\n },\n \"textSnippet\": {}\n }\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1beta1/:name:predict", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1beta1/:name:predict"
payload = {
"params": {},
"payload": {
"document": {
"documentDimensions": {
"height": "",
"unit": "",
"width": ""
},
"documentText": {
"content": "",
"contentUri": "",
"mimeType": ""
},
"inputConfig": { "gcsSource": { "inputUris": [] } },
"layout": [
{
"boundingPoly": { "normalizedVertices": [
{
"x": "",
"y": ""
}
] },
"pageNumber": 0,
"textSegment": {
"content": "",
"endOffset": "",
"startOffset": ""
},
"textSegmentType": ""
}
],
"pageCount": 0
},
"image": {
"imageBytes": "",
"inputConfig": {
"bigquerySource": { "inputUri": "" },
"gcsSource": {},
"params": {}
},
"thumbnailUri": ""
},
"row": {
"columnSpecIds": [],
"values": []
},
"textSnippet": {}
}
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1beta1/:name:predict"
payload <- "{\n \"params\": {},\n \"payload\": {\n \"document\": {\n \"documentDimensions\": {\n \"height\": \"\",\n \"unit\": \"\",\n \"width\": \"\"\n },\n \"documentText\": {\n \"content\": \"\",\n \"contentUri\": \"\",\n \"mimeType\": \"\"\n },\n \"inputConfig\": {\n \"gcsSource\": {\n \"inputUris\": []\n }\n },\n \"layout\": [\n {\n \"boundingPoly\": {\n \"normalizedVertices\": [\n {\n \"x\": \"\",\n \"y\": \"\"\n }\n ]\n },\n \"pageNumber\": 0,\n \"textSegment\": {\n \"content\": \"\",\n \"endOffset\": \"\",\n \"startOffset\": \"\"\n },\n \"textSegmentType\": \"\"\n }\n ],\n \"pageCount\": 0\n },\n \"image\": {\n \"imageBytes\": \"\",\n \"inputConfig\": {\n \"bigquerySource\": {\n \"inputUri\": \"\"\n },\n \"gcsSource\": {},\n \"params\": {}\n },\n \"thumbnailUri\": \"\"\n },\n \"row\": {\n \"columnSpecIds\": [],\n \"values\": []\n },\n \"textSnippet\": {}\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}}/v1beta1/:name:predict")
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 \"params\": {},\n \"payload\": {\n \"document\": {\n \"documentDimensions\": {\n \"height\": \"\",\n \"unit\": \"\",\n \"width\": \"\"\n },\n \"documentText\": {\n \"content\": \"\",\n \"contentUri\": \"\",\n \"mimeType\": \"\"\n },\n \"inputConfig\": {\n \"gcsSource\": {\n \"inputUris\": []\n }\n },\n \"layout\": [\n {\n \"boundingPoly\": {\n \"normalizedVertices\": [\n {\n \"x\": \"\",\n \"y\": \"\"\n }\n ]\n },\n \"pageNumber\": 0,\n \"textSegment\": {\n \"content\": \"\",\n \"endOffset\": \"\",\n \"startOffset\": \"\"\n },\n \"textSegmentType\": \"\"\n }\n ],\n \"pageCount\": 0\n },\n \"image\": {\n \"imageBytes\": \"\",\n \"inputConfig\": {\n \"bigquerySource\": {\n \"inputUri\": \"\"\n },\n \"gcsSource\": {},\n \"params\": {}\n },\n \"thumbnailUri\": \"\"\n },\n \"row\": {\n \"columnSpecIds\": [],\n \"values\": []\n },\n \"textSnippet\": {}\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/v1beta1/:name:predict') do |req|
req.body = "{\n \"params\": {},\n \"payload\": {\n \"document\": {\n \"documentDimensions\": {\n \"height\": \"\",\n \"unit\": \"\",\n \"width\": \"\"\n },\n \"documentText\": {\n \"content\": \"\",\n \"contentUri\": \"\",\n \"mimeType\": \"\"\n },\n \"inputConfig\": {\n \"gcsSource\": {\n \"inputUris\": []\n }\n },\n \"layout\": [\n {\n \"boundingPoly\": {\n \"normalizedVertices\": [\n {\n \"x\": \"\",\n \"y\": \"\"\n }\n ]\n },\n \"pageNumber\": 0,\n \"textSegment\": {\n \"content\": \"\",\n \"endOffset\": \"\",\n \"startOffset\": \"\"\n },\n \"textSegmentType\": \"\"\n }\n ],\n \"pageCount\": 0\n },\n \"image\": {\n \"imageBytes\": \"\",\n \"inputConfig\": {\n \"bigquerySource\": {\n \"inputUri\": \"\"\n },\n \"gcsSource\": {},\n \"params\": {}\n },\n \"thumbnailUri\": \"\"\n },\n \"row\": {\n \"columnSpecIds\": [],\n \"values\": []\n },\n \"textSnippet\": {}\n }\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1beta1/:name:predict";
let payload = json!({
"params": json!({}),
"payload": json!({
"document": json!({
"documentDimensions": json!({
"height": "",
"unit": "",
"width": ""
}),
"documentText": json!({
"content": "",
"contentUri": "",
"mimeType": ""
}),
"inputConfig": json!({"gcsSource": json!({"inputUris": ()})}),
"layout": (
json!({
"boundingPoly": json!({"normalizedVertices": (
json!({
"x": "",
"y": ""
})
)}),
"pageNumber": 0,
"textSegment": json!({
"content": "",
"endOffset": "",
"startOffset": ""
}),
"textSegmentType": ""
})
),
"pageCount": 0
}),
"image": json!({
"imageBytes": "",
"inputConfig": json!({
"bigquerySource": json!({"inputUri": ""}),
"gcsSource": json!({}),
"params": json!({})
}),
"thumbnailUri": ""
}),
"row": json!({
"columnSpecIds": (),
"values": ()
}),
"textSnippet": 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}}/v1beta1/:name:predict \
--header 'content-type: application/json' \
--data '{
"params": {},
"payload": {
"document": {
"documentDimensions": {
"height": "",
"unit": "",
"width": ""
},
"documentText": {
"content": "",
"contentUri": "",
"mimeType": ""
},
"inputConfig": {
"gcsSource": {
"inputUris": []
}
},
"layout": [
{
"boundingPoly": {
"normalizedVertices": [
{
"x": "",
"y": ""
}
]
},
"pageNumber": 0,
"textSegment": {
"content": "",
"endOffset": "",
"startOffset": ""
},
"textSegmentType": ""
}
],
"pageCount": 0
},
"image": {
"imageBytes": "",
"inputConfig": {
"bigquerySource": {
"inputUri": ""
},
"gcsSource": {},
"params": {}
},
"thumbnailUri": ""
},
"row": {
"columnSpecIds": [],
"values": []
},
"textSnippet": {}
}
}'
echo '{
"params": {},
"payload": {
"document": {
"documentDimensions": {
"height": "",
"unit": "",
"width": ""
},
"documentText": {
"content": "",
"contentUri": "",
"mimeType": ""
},
"inputConfig": {
"gcsSource": {
"inputUris": []
}
},
"layout": [
{
"boundingPoly": {
"normalizedVertices": [
{
"x": "",
"y": ""
}
]
},
"pageNumber": 0,
"textSegment": {
"content": "",
"endOffset": "",
"startOffset": ""
},
"textSegmentType": ""
}
],
"pageCount": 0
},
"image": {
"imageBytes": "",
"inputConfig": {
"bigquerySource": {
"inputUri": ""
},
"gcsSource": {},
"params": {}
},
"thumbnailUri": ""
},
"row": {
"columnSpecIds": [],
"values": []
},
"textSnippet": {}
}
}' | \
http POST {{baseUrl}}/v1beta1/:name:predict \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "params": {},\n "payload": {\n "document": {\n "documentDimensions": {\n "height": "",\n "unit": "",\n "width": ""\n },\n "documentText": {\n "content": "",\n "contentUri": "",\n "mimeType": ""\n },\n "inputConfig": {\n "gcsSource": {\n "inputUris": []\n }\n },\n "layout": [\n {\n "boundingPoly": {\n "normalizedVertices": [\n {\n "x": "",\n "y": ""\n }\n ]\n },\n "pageNumber": 0,\n "textSegment": {\n "content": "",\n "endOffset": "",\n "startOffset": ""\n },\n "textSegmentType": ""\n }\n ],\n "pageCount": 0\n },\n "image": {\n "imageBytes": "",\n "inputConfig": {\n "bigquerySource": {\n "inputUri": ""\n },\n "gcsSource": {},\n "params": {}\n },\n "thumbnailUri": ""\n },\n "row": {\n "columnSpecIds": [],\n "values": []\n },\n "textSnippet": {}\n }\n}' \
--output-document \
- {{baseUrl}}/v1beta1/:name:predict
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"params": [],
"payload": [
"document": [
"documentDimensions": [
"height": "",
"unit": "",
"width": ""
],
"documentText": [
"content": "",
"contentUri": "",
"mimeType": ""
],
"inputConfig": ["gcsSource": ["inputUris": []]],
"layout": [
[
"boundingPoly": ["normalizedVertices": [
[
"x": "",
"y": ""
]
]],
"pageNumber": 0,
"textSegment": [
"content": "",
"endOffset": "",
"startOffset": ""
],
"textSegmentType": ""
]
],
"pageCount": 0
],
"image": [
"imageBytes": "",
"inputConfig": [
"bigquerySource": ["inputUri": ""],
"gcsSource": [],
"params": []
],
"thumbnailUri": ""
],
"row": [
"columnSpecIds": [],
"values": []
],
"textSnippet": []
]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1beta1/:name:predict")! 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
automl.projects.locations.models.setIamPolicy
{{baseUrl}}/v1beta1/:resource:setIamPolicy
QUERY PARAMS
resource
BODY json
{
"policy": {
"bindings": [
{
"condition": {
"description": "",
"expression": "",
"location": "",
"title": ""
},
"members": [],
"role": ""
}
],
"etag": "",
"version": 0
}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1beta1/:resource:setIamPolicy");
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 \"policy\": {\n \"bindings\": [\n {\n \"condition\": {\n \"description\": \"\",\n \"expression\": \"\",\n \"location\": \"\",\n \"title\": \"\"\n },\n \"members\": [],\n \"role\": \"\"\n }\n ],\n \"etag\": \"\",\n \"version\": 0\n }\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1beta1/:resource:setIamPolicy" {:content-type :json
:form-params {:policy {:bindings [{:condition {:description ""
:expression ""
:location ""
:title ""}
:members []
:role ""}]
:etag ""
:version 0}}})
require "http/client"
url = "{{baseUrl}}/v1beta1/:resource:setIamPolicy"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"policy\": {\n \"bindings\": [\n {\n \"condition\": {\n \"description\": \"\",\n \"expression\": \"\",\n \"location\": \"\",\n \"title\": \"\"\n },\n \"members\": [],\n \"role\": \"\"\n }\n ],\n \"etag\": \"\",\n \"version\": 0\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}}/v1beta1/:resource:setIamPolicy"),
Content = new StringContent("{\n \"policy\": {\n \"bindings\": [\n {\n \"condition\": {\n \"description\": \"\",\n \"expression\": \"\",\n \"location\": \"\",\n \"title\": \"\"\n },\n \"members\": [],\n \"role\": \"\"\n }\n ],\n \"etag\": \"\",\n \"version\": 0\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}}/v1beta1/:resource:setIamPolicy");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"policy\": {\n \"bindings\": [\n {\n \"condition\": {\n \"description\": \"\",\n \"expression\": \"\",\n \"location\": \"\",\n \"title\": \"\"\n },\n \"members\": [],\n \"role\": \"\"\n }\n ],\n \"etag\": \"\",\n \"version\": 0\n }\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1beta1/:resource:setIamPolicy"
payload := strings.NewReader("{\n \"policy\": {\n \"bindings\": [\n {\n \"condition\": {\n \"description\": \"\",\n \"expression\": \"\",\n \"location\": \"\",\n \"title\": \"\"\n },\n \"members\": [],\n \"role\": \"\"\n }\n ],\n \"etag\": \"\",\n \"version\": 0\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/v1beta1/:resource:setIamPolicy HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 276
{
"policy": {
"bindings": [
{
"condition": {
"description": "",
"expression": "",
"location": "",
"title": ""
},
"members": [],
"role": ""
}
],
"etag": "",
"version": 0
}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1beta1/:resource:setIamPolicy")
.setHeader("content-type", "application/json")
.setBody("{\n \"policy\": {\n \"bindings\": [\n {\n \"condition\": {\n \"description\": \"\",\n \"expression\": \"\",\n \"location\": \"\",\n \"title\": \"\"\n },\n \"members\": [],\n \"role\": \"\"\n }\n ],\n \"etag\": \"\",\n \"version\": 0\n }\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1beta1/:resource:setIamPolicy"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"policy\": {\n \"bindings\": [\n {\n \"condition\": {\n \"description\": \"\",\n \"expression\": \"\",\n \"location\": \"\",\n \"title\": \"\"\n },\n \"members\": [],\n \"role\": \"\"\n }\n ],\n \"etag\": \"\",\n \"version\": 0\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 \"policy\": {\n \"bindings\": [\n {\n \"condition\": {\n \"description\": \"\",\n \"expression\": \"\",\n \"location\": \"\",\n \"title\": \"\"\n },\n \"members\": [],\n \"role\": \"\"\n }\n ],\n \"etag\": \"\",\n \"version\": 0\n }\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1beta1/:resource:setIamPolicy")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1beta1/:resource:setIamPolicy")
.header("content-type", "application/json")
.body("{\n \"policy\": {\n \"bindings\": [\n {\n \"condition\": {\n \"description\": \"\",\n \"expression\": \"\",\n \"location\": \"\",\n \"title\": \"\"\n },\n \"members\": [],\n \"role\": \"\"\n }\n ],\n \"etag\": \"\",\n \"version\": 0\n }\n}")
.asString();
const data = JSON.stringify({
policy: {
bindings: [
{
condition: {
description: '',
expression: '',
location: '',
title: ''
},
members: [],
role: ''
}
],
etag: '',
version: 0
}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v1beta1/:resource:setIamPolicy');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1beta1/:resource:setIamPolicy',
headers: {'content-type': 'application/json'},
data: {
policy: {
bindings: [
{
condition: {description: '', expression: '', location: '', title: ''},
members: [],
role: ''
}
],
etag: '',
version: 0
}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1beta1/:resource:setIamPolicy';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"policy":{"bindings":[{"condition":{"description":"","expression":"","location":"","title":""},"members":[],"role":""}],"etag":"","version":0}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1beta1/:resource:setIamPolicy',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "policy": {\n "bindings": [\n {\n "condition": {\n "description": "",\n "expression": "",\n "location": "",\n "title": ""\n },\n "members": [],\n "role": ""\n }\n ],\n "etag": "",\n "version": 0\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 \"policy\": {\n \"bindings\": [\n {\n \"condition\": {\n \"description\": \"\",\n \"expression\": \"\",\n \"location\": \"\",\n \"title\": \"\"\n },\n \"members\": [],\n \"role\": \"\"\n }\n ],\n \"etag\": \"\",\n \"version\": 0\n }\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1beta1/:resource:setIamPolicy")
.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/v1beta1/:resource:setIamPolicy',
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({
policy: {
bindings: [
{
condition: {description: '', expression: '', location: '', title: ''},
members: [],
role: ''
}
],
etag: '',
version: 0
}
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1beta1/:resource:setIamPolicy',
headers: {'content-type': 'application/json'},
body: {
policy: {
bindings: [
{
condition: {description: '', expression: '', location: '', title: ''},
members: [],
role: ''
}
],
etag: '',
version: 0
}
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/v1beta1/:resource:setIamPolicy');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
policy: {
bindings: [
{
condition: {
description: '',
expression: '',
location: '',
title: ''
},
members: [],
role: ''
}
],
etag: '',
version: 0
}
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/v1beta1/:resource:setIamPolicy',
headers: {'content-type': 'application/json'},
data: {
policy: {
bindings: [
{
condition: {description: '', expression: '', location: '', title: ''},
members: [],
role: ''
}
],
etag: '',
version: 0
}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1beta1/:resource:setIamPolicy';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"policy":{"bindings":[{"condition":{"description":"","expression":"","location":"","title":""},"members":[],"role":""}],"etag":"","version":0}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"policy": @{ @"bindings": @[ @{ @"condition": @{ @"description": @"", @"expression": @"", @"location": @"", @"title": @"" }, @"members": @[ ], @"role": @"" } ], @"etag": @"", @"version": @0 } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1beta1/:resource:setIamPolicy"]
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}}/v1beta1/:resource:setIamPolicy" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"policy\": {\n \"bindings\": [\n {\n \"condition\": {\n \"description\": \"\",\n \"expression\": \"\",\n \"location\": \"\",\n \"title\": \"\"\n },\n \"members\": [],\n \"role\": \"\"\n }\n ],\n \"etag\": \"\",\n \"version\": 0\n }\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1beta1/:resource:setIamPolicy",
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([
'policy' => [
'bindings' => [
[
'condition' => [
'description' => '',
'expression' => '',
'location' => '',
'title' => ''
],
'members' => [
],
'role' => ''
]
],
'etag' => '',
'version' => 0
]
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/v1beta1/:resource:setIamPolicy', [
'body' => '{
"policy": {
"bindings": [
{
"condition": {
"description": "",
"expression": "",
"location": "",
"title": ""
},
"members": [],
"role": ""
}
],
"etag": "",
"version": 0
}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1beta1/:resource:setIamPolicy');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'policy' => [
'bindings' => [
[
'condition' => [
'description' => '',
'expression' => '',
'location' => '',
'title' => ''
],
'members' => [
],
'role' => ''
]
],
'etag' => '',
'version' => 0
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'policy' => [
'bindings' => [
[
'condition' => [
'description' => '',
'expression' => '',
'location' => '',
'title' => ''
],
'members' => [
],
'role' => ''
]
],
'etag' => '',
'version' => 0
]
]));
$request->setRequestUrl('{{baseUrl}}/v1beta1/:resource:setIamPolicy');
$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}}/v1beta1/:resource:setIamPolicy' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"policy": {
"bindings": [
{
"condition": {
"description": "",
"expression": "",
"location": "",
"title": ""
},
"members": [],
"role": ""
}
],
"etag": "",
"version": 0
}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1beta1/:resource:setIamPolicy' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"policy": {
"bindings": [
{
"condition": {
"description": "",
"expression": "",
"location": "",
"title": ""
},
"members": [],
"role": ""
}
],
"etag": "",
"version": 0
}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"policy\": {\n \"bindings\": [\n {\n \"condition\": {\n \"description\": \"\",\n \"expression\": \"\",\n \"location\": \"\",\n \"title\": \"\"\n },\n \"members\": [],\n \"role\": \"\"\n }\n ],\n \"etag\": \"\",\n \"version\": 0\n }\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1beta1/:resource:setIamPolicy", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1beta1/:resource:setIamPolicy"
payload = { "policy": {
"bindings": [
{
"condition": {
"description": "",
"expression": "",
"location": "",
"title": ""
},
"members": [],
"role": ""
}
],
"etag": "",
"version": 0
} }
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1beta1/:resource:setIamPolicy"
payload <- "{\n \"policy\": {\n \"bindings\": [\n {\n \"condition\": {\n \"description\": \"\",\n \"expression\": \"\",\n \"location\": \"\",\n \"title\": \"\"\n },\n \"members\": [],\n \"role\": \"\"\n }\n ],\n \"etag\": \"\",\n \"version\": 0\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}}/v1beta1/:resource:setIamPolicy")
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 \"policy\": {\n \"bindings\": [\n {\n \"condition\": {\n \"description\": \"\",\n \"expression\": \"\",\n \"location\": \"\",\n \"title\": \"\"\n },\n \"members\": [],\n \"role\": \"\"\n }\n ],\n \"etag\": \"\",\n \"version\": 0\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/v1beta1/:resource:setIamPolicy') do |req|
req.body = "{\n \"policy\": {\n \"bindings\": [\n {\n \"condition\": {\n \"description\": \"\",\n \"expression\": \"\",\n \"location\": \"\",\n \"title\": \"\"\n },\n \"members\": [],\n \"role\": \"\"\n }\n ],\n \"etag\": \"\",\n \"version\": 0\n }\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1beta1/:resource:setIamPolicy";
let payload = json!({"policy": json!({
"bindings": (
json!({
"condition": json!({
"description": "",
"expression": "",
"location": "",
"title": ""
}),
"members": (),
"role": ""
})
),
"etag": "",
"version": 0
})});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/v1beta1/:resource:setIamPolicy \
--header 'content-type: application/json' \
--data '{
"policy": {
"bindings": [
{
"condition": {
"description": "",
"expression": "",
"location": "",
"title": ""
},
"members": [],
"role": ""
}
],
"etag": "",
"version": 0
}
}'
echo '{
"policy": {
"bindings": [
{
"condition": {
"description": "",
"expression": "",
"location": "",
"title": ""
},
"members": [],
"role": ""
}
],
"etag": "",
"version": 0
}
}' | \
http POST {{baseUrl}}/v1beta1/:resource:setIamPolicy \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "policy": {\n "bindings": [\n {\n "condition": {\n "description": "",\n "expression": "",\n "location": "",\n "title": ""\n },\n "members": [],\n "role": ""\n }\n ],\n "etag": "",\n "version": 0\n }\n}' \
--output-document \
- {{baseUrl}}/v1beta1/:resource:setIamPolicy
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["policy": [
"bindings": [
[
"condition": [
"description": "",
"expression": "",
"location": "",
"title": ""
],
"members": [],
"role": ""
]
],
"etag": "",
"version": 0
]] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1beta1/:resource:setIamPolicy")! 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
automl.projects.locations.models.undeploy
{{baseUrl}}/v1beta1/:name:undeploy
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}}/v1beta1/:name:undeploy");
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}}/v1beta1/:name:undeploy" {:content-type :json})
require "http/client"
url = "{{baseUrl}}/v1beta1/:name:undeploy"
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}}/v1beta1/:name:undeploy"),
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}}/v1beta1/:name:undeploy");
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}}/v1beta1/:name:undeploy"
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/v1beta1/:name:undeploy HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 2
{}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1beta1/:name:undeploy")
.setHeader("content-type", "application/json")
.setBody("{}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1beta1/:name:undeploy"))
.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}}/v1beta1/:name:undeploy")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1beta1/:name:undeploy")
.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}}/v1beta1/:name:undeploy');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1beta1/:name:undeploy',
headers: {'content-type': 'application/json'},
data: {}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1beta1/:name:undeploy';
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}}/v1beta1/:name:undeploy',
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}}/v1beta1/:name:undeploy")
.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/v1beta1/:name:undeploy',
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}}/v1beta1/:name:undeploy',
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}}/v1beta1/:name:undeploy');
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}}/v1beta1/:name:undeploy',
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}}/v1beta1/:name:undeploy';
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}}/v1beta1/:name:undeploy"]
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}}/v1beta1/:name:undeploy" 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}}/v1beta1/:name:undeploy",
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}}/v1beta1/:name:undeploy', [
'body' => '{}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1beta1/:name:undeploy');
$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}}/v1beta1/:name:undeploy');
$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}}/v1beta1/:name:undeploy' -Method POST -Headers $headers -ContentType 'application/json' -Body '{}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1beta1/:name:undeploy' -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/v1beta1/:name:undeploy", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1beta1/:name:undeploy"
payload = {}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1beta1/:name:undeploy"
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}}/v1beta1/:name:undeploy")
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/v1beta1/:name:undeploy') 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}}/v1beta1/:name:undeploy";
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}}/v1beta1/:name:undeploy \
--header 'content-type: application/json' \
--data '{}'
echo '{}' | \
http POST {{baseUrl}}/v1beta1/:name:undeploy \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{}' \
--output-document \
- {{baseUrl}}/v1beta1/:name:undeploy
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}}/v1beta1/:name:undeploy")! 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
automl.projects.locations.operations.cancel
{{baseUrl}}/v1beta1/: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}}/v1beta1/: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}}/v1beta1/:name:cancel" {:content-type :json})
require "http/client"
url = "{{baseUrl}}/v1beta1/: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}}/v1beta1/: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}}/v1beta1/: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}}/v1beta1/: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/v1beta1/:name:cancel HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 2
{}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1beta1/: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}}/v1beta1/: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}}/v1beta1/:name:cancel")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1beta1/: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}}/v1beta1/:name:cancel');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1beta1/: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}}/v1beta1/: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}}/v1beta1/: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}}/v1beta1/: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/v1beta1/: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}}/v1beta1/: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}}/v1beta1/: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}}/v1beta1/: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}}/v1beta1/: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}}/v1beta1/: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}}/v1beta1/: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}}/v1beta1/: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}}/v1beta1/:name:cancel', [
'body' => '{}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1beta1/: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}}/v1beta1/: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}}/v1beta1/:name:cancel' -Method POST -Headers $headers -ContentType 'application/json' -Body '{}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1beta1/: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/v1beta1/:name:cancel", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1beta1/:name:cancel"
payload = {}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1beta1/: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}}/v1beta1/: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/v1beta1/: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}}/v1beta1/: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}}/v1beta1/:name:cancel \
--header 'content-type: application/json' \
--data '{}'
echo '{}' | \
http POST {{baseUrl}}/v1beta1/:name:cancel \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{}' \
--output-document \
- {{baseUrl}}/v1beta1/: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}}/v1beta1/: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()
DELETE
automl.projects.locations.operations.delete
{{baseUrl}}/v1beta1/: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}}/v1beta1/:name");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/v1beta1/:name")
require "http/client"
url = "{{baseUrl}}/v1beta1/: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}}/v1beta1/:name"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1beta1/:name");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1beta1/: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/v1beta1/:name HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/v1beta1/:name")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1beta1/: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}}/v1beta1/:name")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/v1beta1/: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}}/v1beta1/:name');
xhr.send(data);
import axios from 'axios';
const options = {method: 'DELETE', url: '{{baseUrl}}/v1beta1/:name'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1beta1/: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}}/v1beta1/:name',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1beta1/: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/v1beta1/: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}}/v1beta1/: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}}/v1beta1/: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}}/v1beta1/:name'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1beta1/: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}}/v1beta1/: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}}/v1beta1/:name" in
Client.call `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1beta1/: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}}/v1beta1/:name');
echo $response->getBody();
setUrl('{{baseUrl}}/v1beta1/:name');
$request->setMethod(HTTP_METH_DELETE);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1beta1/:name');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1beta1/:name' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1beta1/:name' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/v1beta1/:name")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1beta1/:name"
response = requests.delete(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1beta1/:name"
response <- VERB("DELETE", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1beta1/: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/v1beta1/: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}}/v1beta1/: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}}/v1beta1/:name
http DELETE {{baseUrl}}/v1beta1/:name
wget --quiet \
--method DELETE \
--output-document \
- {{baseUrl}}/v1beta1/:name
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1beta1/: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
automl.projects.locations.operations.get
{{baseUrl}}/v1beta1/:name
QUERY PARAMS
name
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1beta1/:name");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v1beta1/:name")
require "http/client"
url = "{{baseUrl}}/v1beta1/:name"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/v1beta1/:name"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1beta1/:name");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1beta1/:name"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/v1beta1/:name HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1beta1/:name")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1beta1/:name"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/v1beta1/:name")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1beta1/:name")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/v1beta1/:name');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/v1beta1/:name'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1beta1/:name';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1beta1/:name',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1beta1/:name")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1beta1/:name',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'GET', url: '{{baseUrl}}/v1beta1/:name'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v1beta1/:name');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {method: 'GET', url: '{{baseUrl}}/v1beta1/:name'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1beta1/:name';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1beta1/:name"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1beta1/:name" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1beta1/:name",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/v1beta1/:name');
echo $response->getBody();
setUrl('{{baseUrl}}/v1beta1/:name');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1beta1/:name');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1beta1/:name' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1beta1/:name' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v1beta1/:name")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1beta1/:name"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1beta1/:name"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1beta1/:name")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/v1beta1/:name') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1beta1/:name";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/v1beta1/:name
http GET {{baseUrl}}/v1beta1/:name
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v1beta1/:name
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1beta1/:name")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
automl.projects.locations.operations.list
{{baseUrl}}/v1beta1/:name/operations
QUERY PARAMS
name
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1beta1/:name/operations");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v1beta1/:name/operations")
require "http/client"
url = "{{baseUrl}}/v1beta1/:name/operations"
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}}/v1beta1/:name/operations"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1beta1/:name/operations");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1beta1/:name/operations"
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/v1beta1/:name/operations HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1beta1/:name/operations")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1beta1/:name/operations"))
.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}}/v1beta1/:name/operations")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1beta1/:name/operations")
.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}}/v1beta1/:name/operations');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/v1beta1/:name/operations'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1beta1/:name/operations';
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}}/v1beta1/:name/operations',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1beta1/:name/operations")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1beta1/:name/operations',
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}}/v1beta1/:name/operations'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v1beta1/:name/operations');
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}}/v1beta1/:name/operations'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1beta1/:name/operations';
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}}/v1beta1/:name/operations"]
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}}/v1beta1/:name/operations" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1beta1/:name/operations",
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}}/v1beta1/:name/operations');
echo $response->getBody();
setUrl('{{baseUrl}}/v1beta1/:name/operations');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1beta1/:name/operations');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1beta1/:name/operations' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1beta1/:name/operations' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v1beta1/:name/operations")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1beta1/:name/operations"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1beta1/:name/operations"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1beta1/:name/operations")
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/v1beta1/:name/operations') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1beta1/:name/operations";
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}}/v1beta1/:name/operations
http GET {{baseUrl}}/v1beta1/:name/operations
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v1beta1/:name/operations
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1beta1/:name/operations")! 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
automl.projects.locations.operations.wait
{{baseUrl}}/v1beta1/:name:wait
QUERY PARAMS
name
BODY json
{
"timeout": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1beta1/:name:wait");
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 \"timeout\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1beta1/:name:wait" {:content-type :json
:form-params {:timeout ""}})
require "http/client"
url = "{{baseUrl}}/v1beta1/:name:wait"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"timeout\": \"\"\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}}/v1beta1/:name:wait"),
Content = new StringContent("{\n \"timeout\": \"\"\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}}/v1beta1/:name:wait");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"timeout\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1beta1/:name:wait"
payload := strings.NewReader("{\n \"timeout\": \"\"\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/v1beta1/:name:wait HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 19
{
"timeout": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1beta1/:name:wait")
.setHeader("content-type", "application/json")
.setBody("{\n \"timeout\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1beta1/:name:wait"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"timeout\": \"\"\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 \"timeout\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1beta1/:name:wait")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1beta1/:name:wait")
.header("content-type", "application/json")
.body("{\n \"timeout\": \"\"\n}")
.asString();
const data = JSON.stringify({
timeout: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v1beta1/:name:wait');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1beta1/:name:wait',
headers: {'content-type': 'application/json'},
data: {timeout: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1beta1/:name:wait';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"timeout":""}'
};
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}}/v1beta1/:name:wait',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "timeout": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"timeout\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1beta1/:name:wait")
.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/v1beta1/:name:wait',
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({timeout: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1beta1/:name:wait',
headers: {'content-type': 'application/json'},
body: {timeout: ''},
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}}/v1beta1/:name:wait');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
timeout: ''
});
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}}/v1beta1/:name:wait',
headers: {'content-type': 'application/json'},
data: {timeout: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1beta1/:name:wait';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"timeout":""}'
};
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 = @{ @"timeout": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1beta1/:name:wait"]
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}}/v1beta1/:name:wait" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"timeout\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1beta1/:name:wait",
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([
'timeout' => ''
]),
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}}/v1beta1/:name:wait', [
'body' => '{
"timeout": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1beta1/:name:wait');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'timeout' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'timeout' => ''
]));
$request->setRequestUrl('{{baseUrl}}/v1beta1/:name:wait');
$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}}/v1beta1/:name:wait' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"timeout": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1beta1/:name:wait' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"timeout": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"timeout\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1beta1/:name:wait", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1beta1/:name:wait"
payload = { "timeout": "" }
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1beta1/:name:wait"
payload <- "{\n \"timeout\": \"\"\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}}/v1beta1/:name:wait")
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 \"timeout\": \"\"\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/v1beta1/:name:wait') do |req|
req.body = "{\n \"timeout\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1beta1/:name:wait";
let payload = json!({"timeout": ""});
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}}/v1beta1/:name:wait \
--header 'content-type: application/json' \
--data '{
"timeout": ""
}'
echo '{
"timeout": ""
}' | \
http POST {{baseUrl}}/v1beta1/:name:wait \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "timeout": ""\n}' \
--output-document \
- {{baseUrl}}/v1beta1/:name:wait
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["timeout": ""] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1beta1/:name:wait")! 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
automl.projects.locations.testIamPermissions
{{baseUrl}}/v1beta1/:resource:testIamPermissions
QUERY PARAMS
resource
BODY json
{
"permissions": []
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1beta1/:resource:testIamPermissions");
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 \"permissions\": []\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1beta1/:resource:testIamPermissions" {:content-type :json
:form-params {:permissions []}})
require "http/client"
url = "{{baseUrl}}/v1beta1/:resource:testIamPermissions"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"permissions\": []\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}}/v1beta1/:resource:testIamPermissions"),
Content = new StringContent("{\n \"permissions\": []\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}}/v1beta1/:resource:testIamPermissions");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"permissions\": []\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1beta1/:resource:testIamPermissions"
payload := strings.NewReader("{\n \"permissions\": []\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/v1beta1/:resource:testIamPermissions HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 23
{
"permissions": []
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1beta1/:resource:testIamPermissions")
.setHeader("content-type", "application/json")
.setBody("{\n \"permissions\": []\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1beta1/:resource:testIamPermissions"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"permissions\": []\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 \"permissions\": []\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1beta1/:resource:testIamPermissions")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1beta1/:resource:testIamPermissions")
.header("content-type", "application/json")
.body("{\n \"permissions\": []\n}")
.asString();
const data = JSON.stringify({
permissions: []
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v1beta1/:resource:testIamPermissions');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1beta1/:resource:testIamPermissions',
headers: {'content-type': 'application/json'},
data: {permissions: []}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1beta1/:resource:testIamPermissions';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"permissions":[]}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1beta1/:resource:testIamPermissions',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "permissions": []\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"permissions\": []\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1beta1/:resource:testIamPermissions")
.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/v1beta1/:resource:testIamPermissions',
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({permissions: []}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1beta1/:resource:testIamPermissions',
headers: {'content-type': 'application/json'},
body: {permissions: []},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/v1beta1/:resource:testIamPermissions');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
permissions: []
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/v1beta1/:resource:testIamPermissions',
headers: {'content-type': 'application/json'},
data: {permissions: []}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1beta1/:resource:testIamPermissions';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"permissions":[]}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"permissions": @[ ] };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1beta1/:resource:testIamPermissions"]
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}}/v1beta1/:resource:testIamPermissions" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"permissions\": []\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1beta1/:resource:testIamPermissions",
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([
'permissions' => [
]
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/v1beta1/:resource:testIamPermissions', [
'body' => '{
"permissions": []
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1beta1/:resource:testIamPermissions');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'permissions' => [
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'permissions' => [
]
]));
$request->setRequestUrl('{{baseUrl}}/v1beta1/:resource:testIamPermissions');
$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}}/v1beta1/:resource:testIamPermissions' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"permissions": []
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1beta1/:resource:testIamPermissions' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"permissions": []
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"permissions\": []\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1beta1/:resource:testIamPermissions", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1beta1/:resource:testIamPermissions"
payload = { "permissions": [] }
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1beta1/:resource:testIamPermissions"
payload <- "{\n \"permissions\": []\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}}/v1beta1/:resource:testIamPermissions")
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 \"permissions\": []\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/v1beta1/:resource:testIamPermissions') do |req|
req.body = "{\n \"permissions\": []\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1beta1/:resource:testIamPermissions";
let payload = json!({"permissions": ()});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/v1beta1/:resource:testIamPermissions \
--header 'content-type: application/json' \
--data '{
"permissions": []
}'
echo '{
"permissions": []
}' | \
http POST {{baseUrl}}/v1beta1/:resource:testIamPermissions \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "permissions": []\n}' \
--output-document \
- {{baseUrl}}/v1beta1/:resource:testIamPermissions
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["permissions": []] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1beta1/:resource:testIamPermissions")! 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()