Google Cloud Data Catalog API
POST
datacatalog.catalog.search
{{baseUrl}}/v1beta1/catalog:search
BODY json
{
"orderBy": "",
"pageSize": 0,
"pageToken": "",
"query": "",
"scope": {
"includeGcpPublicDatasets": false,
"includeOrgIds": [],
"includeProjectIds": [],
"restrictedLocations": []
}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1beta1/catalog:search");
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 \"orderBy\": \"\",\n \"pageSize\": 0,\n \"pageToken\": \"\",\n \"query\": \"\",\n \"scope\": {\n \"includeGcpPublicDatasets\": false,\n \"includeOrgIds\": [],\n \"includeProjectIds\": [],\n \"restrictedLocations\": []\n }\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1beta1/catalog:search" {:content-type :json
:form-params {:orderBy ""
:pageSize 0
:pageToken ""
:query ""
:scope {:includeGcpPublicDatasets false
:includeOrgIds []
:includeProjectIds []
:restrictedLocations []}}})
require "http/client"
url = "{{baseUrl}}/v1beta1/catalog:search"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"orderBy\": \"\",\n \"pageSize\": 0,\n \"pageToken\": \"\",\n \"query\": \"\",\n \"scope\": {\n \"includeGcpPublicDatasets\": false,\n \"includeOrgIds\": [],\n \"includeProjectIds\": [],\n \"restrictedLocations\": []\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/catalog:search"),
Content = new StringContent("{\n \"orderBy\": \"\",\n \"pageSize\": 0,\n \"pageToken\": \"\",\n \"query\": \"\",\n \"scope\": {\n \"includeGcpPublicDatasets\": false,\n \"includeOrgIds\": [],\n \"includeProjectIds\": [],\n \"restrictedLocations\": []\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/catalog:search");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"orderBy\": \"\",\n \"pageSize\": 0,\n \"pageToken\": \"\",\n \"query\": \"\",\n \"scope\": {\n \"includeGcpPublicDatasets\": false,\n \"includeOrgIds\": [],\n \"includeProjectIds\": [],\n \"restrictedLocations\": []\n }\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1beta1/catalog:search"
payload := strings.NewReader("{\n \"orderBy\": \"\",\n \"pageSize\": 0,\n \"pageToken\": \"\",\n \"query\": \"\",\n \"scope\": {\n \"includeGcpPublicDatasets\": false,\n \"includeOrgIds\": [],\n \"includeProjectIds\": [],\n \"restrictedLocations\": []\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/catalog:search HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 211
{
"orderBy": "",
"pageSize": 0,
"pageToken": "",
"query": "",
"scope": {
"includeGcpPublicDatasets": false,
"includeOrgIds": [],
"includeProjectIds": [],
"restrictedLocations": []
}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1beta1/catalog:search")
.setHeader("content-type", "application/json")
.setBody("{\n \"orderBy\": \"\",\n \"pageSize\": 0,\n \"pageToken\": \"\",\n \"query\": \"\",\n \"scope\": {\n \"includeGcpPublicDatasets\": false,\n \"includeOrgIds\": [],\n \"includeProjectIds\": [],\n \"restrictedLocations\": []\n }\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1beta1/catalog:search"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"orderBy\": \"\",\n \"pageSize\": 0,\n \"pageToken\": \"\",\n \"query\": \"\",\n \"scope\": {\n \"includeGcpPublicDatasets\": false,\n \"includeOrgIds\": [],\n \"includeProjectIds\": [],\n \"restrictedLocations\": []\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 \"orderBy\": \"\",\n \"pageSize\": 0,\n \"pageToken\": \"\",\n \"query\": \"\",\n \"scope\": {\n \"includeGcpPublicDatasets\": false,\n \"includeOrgIds\": [],\n \"includeProjectIds\": [],\n \"restrictedLocations\": []\n }\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1beta1/catalog:search")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1beta1/catalog:search")
.header("content-type", "application/json")
.body("{\n \"orderBy\": \"\",\n \"pageSize\": 0,\n \"pageToken\": \"\",\n \"query\": \"\",\n \"scope\": {\n \"includeGcpPublicDatasets\": false,\n \"includeOrgIds\": [],\n \"includeProjectIds\": [],\n \"restrictedLocations\": []\n }\n}")
.asString();
const data = JSON.stringify({
orderBy: '',
pageSize: 0,
pageToken: '',
query: '',
scope: {
includeGcpPublicDatasets: false,
includeOrgIds: [],
includeProjectIds: [],
restrictedLocations: []
}
});
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/catalog:search');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1beta1/catalog:search',
headers: {'content-type': 'application/json'},
data: {
orderBy: '',
pageSize: 0,
pageToken: '',
query: '',
scope: {
includeGcpPublicDatasets: false,
includeOrgIds: [],
includeProjectIds: [],
restrictedLocations: []
}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1beta1/catalog:search';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"orderBy":"","pageSize":0,"pageToken":"","query":"","scope":{"includeGcpPublicDatasets":false,"includeOrgIds":[],"includeProjectIds":[],"restrictedLocations":[]}}'
};
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/catalog:search',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "orderBy": "",\n "pageSize": 0,\n "pageToken": "",\n "query": "",\n "scope": {\n "includeGcpPublicDatasets": false,\n "includeOrgIds": [],\n "includeProjectIds": [],\n "restrictedLocations": []\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 \"orderBy\": \"\",\n \"pageSize\": 0,\n \"pageToken\": \"\",\n \"query\": \"\",\n \"scope\": {\n \"includeGcpPublicDatasets\": false,\n \"includeOrgIds\": [],\n \"includeProjectIds\": [],\n \"restrictedLocations\": []\n }\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1beta1/catalog:search")
.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/catalog:search',
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({
orderBy: '',
pageSize: 0,
pageToken: '',
query: '',
scope: {
includeGcpPublicDatasets: false,
includeOrgIds: [],
includeProjectIds: [],
restrictedLocations: []
}
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1beta1/catalog:search',
headers: {'content-type': 'application/json'},
body: {
orderBy: '',
pageSize: 0,
pageToken: '',
query: '',
scope: {
includeGcpPublicDatasets: false,
includeOrgIds: [],
includeProjectIds: [],
restrictedLocations: []
}
},
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/catalog:search');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
orderBy: '',
pageSize: 0,
pageToken: '',
query: '',
scope: {
includeGcpPublicDatasets: false,
includeOrgIds: [],
includeProjectIds: [],
restrictedLocations: []
}
});
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/catalog:search',
headers: {'content-type': 'application/json'},
data: {
orderBy: '',
pageSize: 0,
pageToken: '',
query: '',
scope: {
includeGcpPublicDatasets: false,
includeOrgIds: [],
includeProjectIds: [],
restrictedLocations: []
}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1beta1/catalog:search';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"orderBy":"","pageSize":0,"pageToken":"","query":"","scope":{"includeGcpPublicDatasets":false,"includeOrgIds":[],"includeProjectIds":[],"restrictedLocations":[]}}'
};
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 = @{ @"orderBy": @"",
@"pageSize": @0,
@"pageToken": @"",
@"query": @"",
@"scope": @{ @"includeGcpPublicDatasets": @NO, @"includeOrgIds": @[ ], @"includeProjectIds": @[ ], @"restrictedLocations": @[ ] } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1beta1/catalog:search"]
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/catalog:search" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"orderBy\": \"\",\n \"pageSize\": 0,\n \"pageToken\": \"\",\n \"query\": \"\",\n \"scope\": {\n \"includeGcpPublicDatasets\": false,\n \"includeOrgIds\": [],\n \"includeProjectIds\": [],\n \"restrictedLocations\": []\n }\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1beta1/catalog:search",
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([
'orderBy' => '',
'pageSize' => 0,
'pageToken' => '',
'query' => '',
'scope' => [
'includeGcpPublicDatasets' => null,
'includeOrgIds' => [
],
'includeProjectIds' => [
],
'restrictedLocations' => [
]
]
]),
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/catalog:search', [
'body' => '{
"orderBy": "",
"pageSize": 0,
"pageToken": "",
"query": "",
"scope": {
"includeGcpPublicDatasets": false,
"includeOrgIds": [],
"includeProjectIds": [],
"restrictedLocations": []
}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1beta1/catalog:search');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'orderBy' => '',
'pageSize' => 0,
'pageToken' => '',
'query' => '',
'scope' => [
'includeGcpPublicDatasets' => null,
'includeOrgIds' => [
],
'includeProjectIds' => [
],
'restrictedLocations' => [
]
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'orderBy' => '',
'pageSize' => 0,
'pageToken' => '',
'query' => '',
'scope' => [
'includeGcpPublicDatasets' => null,
'includeOrgIds' => [
],
'includeProjectIds' => [
],
'restrictedLocations' => [
]
]
]));
$request->setRequestUrl('{{baseUrl}}/v1beta1/catalog:search');
$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/catalog:search' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"orderBy": "",
"pageSize": 0,
"pageToken": "",
"query": "",
"scope": {
"includeGcpPublicDatasets": false,
"includeOrgIds": [],
"includeProjectIds": [],
"restrictedLocations": []
}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1beta1/catalog:search' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"orderBy": "",
"pageSize": 0,
"pageToken": "",
"query": "",
"scope": {
"includeGcpPublicDatasets": false,
"includeOrgIds": [],
"includeProjectIds": [],
"restrictedLocations": []
}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"orderBy\": \"\",\n \"pageSize\": 0,\n \"pageToken\": \"\",\n \"query\": \"\",\n \"scope\": {\n \"includeGcpPublicDatasets\": false,\n \"includeOrgIds\": [],\n \"includeProjectIds\": [],\n \"restrictedLocations\": []\n }\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1beta1/catalog:search", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1beta1/catalog:search"
payload = {
"orderBy": "",
"pageSize": 0,
"pageToken": "",
"query": "",
"scope": {
"includeGcpPublicDatasets": False,
"includeOrgIds": [],
"includeProjectIds": [],
"restrictedLocations": []
}
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1beta1/catalog:search"
payload <- "{\n \"orderBy\": \"\",\n \"pageSize\": 0,\n \"pageToken\": \"\",\n \"query\": \"\",\n \"scope\": {\n \"includeGcpPublicDatasets\": false,\n \"includeOrgIds\": [],\n \"includeProjectIds\": [],\n \"restrictedLocations\": []\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/catalog:search")
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 \"orderBy\": \"\",\n \"pageSize\": 0,\n \"pageToken\": \"\",\n \"query\": \"\",\n \"scope\": {\n \"includeGcpPublicDatasets\": false,\n \"includeOrgIds\": [],\n \"includeProjectIds\": [],\n \"restrictedLocations\": []\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/catalog:search') do |req|
req.body = "{\n \"orderBy\": \"\",\n \"pageSize\": 0,\n \"pageToken\": \"\",\n \"query\": \"\",\n \"scope\": {\n \"includeGcpPublicDatasets\": false,\n \"includeOrgIds\": [],\n \"includeProjectIds\": [],\n \"restrictedLocations\": []\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/catalog:search";
let payload = json!({
"orderBy": "",
"pageSize": 0,
"pageToken": "",
"query": "",
"scope": json!({
"includeGcpPublicDatasets": false,
"includeOrgIds": (),
"includeProjectIds": (),
"restrictedLocations": ()
})
});
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/catalog:search \
--header 'content-type: application/json' \
--data '{
"orderBy": "",
"pageSize": 0,
"pageToken": "",
"query": "",
"scope": {
"includeGcpPublicDatasets": false,
"includeOrgIds": [],
"includeProjectIds": [],
"restrictedLocations": []
}
}'
echo '{
"orderBy": "",
"pageSize": 0,
"pageToken": "",
"query": "",
"scope": {
"includeGcpPublicDatasets": false,
"includeOrgIds": [],
"includeProjectIds": [],
"restrictedLocations": []
}
}' | \
http POST {{baseUrl}}/v1beta1/catalog:search \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "orderBy": "",\n "pageSize": 0,\n "pageToken": "",\n "query": "",\n "scope": {\n "includeGcpPublicDatasets": false,\n "includeOrgIds": [],\n "includeProjectIds": [],\n "restrictedLocations": []\n }\n}' \
--output-document \
- {{baseUrl}}/v1beta1/catalog:search
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"orderBy": "",
"pageSize": 0,
"pageToken": "",
"query": "",
"scope": [
"includeGcpPublicDatasets": false,
"includeOrgIds": [],
"includeProjectIds": [],
"restrictedLocations": []
]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1beta1/catalog:search")! 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
datacatalog.entries.lookup
{{baseUrl}}/v1beta1/entries:lookup
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1beta1/entries:lookup");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v1beta1/entries:lookup")
require "http/client"
url = "{{baseUrl}}/v1beta1/entries:lookup"
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/entries:lookup"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1beta1/entries:lookup");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1beta1/entries:lookup"
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/entries:lookup HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1beta1/entries:lookup")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1beta1/entries:lookup"))
.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/entries:lookup")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1beta1/entries:lookup")
.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/entries:lookup');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/v1beta1/entries:lookup'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1beta1/entries:lookup';
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/entries:lookup',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1beta1/entries:lookup")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1beta1/entries:lookup',
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/entries:lookup'};
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/entries:lookup');
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/entries:lookup'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1beta1/entries:lookup';
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/entries:lookup"]
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/entries:lookup" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1beta1/entries:lookup",
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/entries:lookup');
echo $response->getBody();
setUrl('{{baseUrl}}/v1beta1/entries:lookup');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1beta1/entries:lookup');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1beta1/entries:lookup' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1beta1/entries:lookup' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v1beta1/entries:lookup")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1beta1/entries:lookup"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1beta1/entries:lookup"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1beta1/entries:lookup")
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/entries:lookup') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1beta1/entries:lookup";
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/entries:lookup
http GET {{baseUrl}}/v1beta1/entries:lookup
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v1beta1/entries:lookup
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1beta1/entries:lookup")! 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
datacatalog.projects.locations.entryGroups.create
{{baseUrl}}/v1beta1/:parent/entryGroups
QUERY PARAMS
parent
BODY json
{
"dataCatalogTimestamps": {
"createTime": "",
"expireTime": "",
"updateTime": ""
},
"description": "",
"displayName": "",
"name": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1beta1/:parent/entryGroups");
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 \"dataCatalogTimestamps\": {\n \"createTime\": \"\",\n \"expireTime\": \"\",\n \"updateTime\": \"\"\n },\n \"description\": \"\",\n \"displayName\": \"\",\n \"name\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1beta1/:parent/entryGroups" {:content-type :json
:form-params {:dataCatalogTimestamps {:createTime ""
:expireTime ""
:updateTime ""}
:description ""
:displayName ""
:name ""}})
require "http/client"
url = "{{baseUrl}}/v1beta1/:parent/entryGroups"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"dataCatalogTimestamps\": {\n \"createTime\": \"\",\n \"expireTime\": \"\",\n \"updateTime\": \"\"\n },\n \"description\": \"\",\n \"displayName\": \"\",\n \"name\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/v1beta1/:parent/entryGroups"),
Content = new StringContent("{\n \"dataCatalogTimestamps\": {\n \"createTime\": \"\",\n \"expireTime\": \"\",\n \"updateTime\": \"\"\n },\n \"description\": \"\",\n \"displayName\": \"\",\n \"name\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1beta1/:parent/entryGroups");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"dataCatalogTimestamps\": {\n \"createTime\": \"\",\n \"expireTime\": \"\",\n \"updateTime\": \"\"\n },\n \"description\": \"\",\n \"displayName\": \"\",\n \"name\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1beta1/:parent/entryGroups"
payload := strings.NewReader("{\n \"dataCatalogTimestamps\": {\n \"createTime\": \"\",\n \"expireTime\": \"\",\n \"updateTime\": \"\"\n },\n \"description\": \"\",\n \"displayName\": \"\",\n \"name\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/v1beta1/:parent/entryGroups HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 157
{
"dataCatalogTimestamps": {
"createTime": "",
"expireTime": "",
"updateTime": ""
},
"description": "",
"displayName": "",
"name": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1beta1/:parent/entryGroups")
.setHeader("content-type", "application/json")
.setBody("{\n \"dataCatalogTimestamps\": {\n \"createTime\": \"\",\n \"expireTime\": \"\",\n \"updateTime\": \"\"\n },\n \"description\": \"\",\n \"displayName\": \"\",\n \"name\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1beta1/:parent/entryGroups"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"dataCatalogTimestamps\": {\n \"createTime\": \"\",\n \"expireTime\": \"\",\n \"updateTime\": \"\"\n },\n \"description\": \"\",\n \"displayName\": \"\",\n \"name\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"dataCatalogTimestamps\": {\n \"createTime\": \"\",\n \"expireTime\": \"\",\n \"updateTime\": \"\"\n },\n \"description\": \"\",\n \"displayName\": \"\",\n \"name\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1beta1/:parent/entryGroups")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1beta1/:parent/entryGroups")
.header("content-type", "application/json")
.body("{\n \"dataCatalogTimestamps\": {\n \"createTime\": \"\",\n \"expireTime\": \"\",\n \"updateTime\": \"\"\n },\n \"description\": \"\",\n \"displayName\": \"\",\n \"name\": \"\"\n}")
.asString();
const data = JSON.stringify({
dataCatalogTimestamps: {
createTime: '',
expireTime: '',
updateTime: ''
},
description: '',
displayName: '',
name: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v1beta1/:parent/entryGroups');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1beta1/:parent/entryGroups',
headers: {'content-type': 'application/json'},
data: {
dataCatalogTimestamps: {createTime: '', expireTime: '', updateTime: ''},
description: '',
displayName: '',
name: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1beta1/:parent/entryGroups';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"dataCatalogTimestamps":{"createTime":"","expireTime":"","updateTime":""},"description":"","displayName":"","name":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1beta1/:parent/entryGroups',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "dataCatalogTimestamps": {\n "createTime": "",\n "expireTime": "",\n "updateTime": ""\n },\n "description": "",\n "displayName": "",\n "name": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"dataCatalogTimestamps\": {\n \"createTime\": \"\",\n \"expireTime\": \"\",\n \"updateTime\": \"\"\n },\n \"description\": \"\",\n \"displayName\": \"\",\n \"name\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1beta1/:parent/entryGroups")
.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/entryGroups',
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({
dataCatalogTimestamps: {createTime: '', expireTime: '', updateTime: ''},
description: '',
displayName: '',
name: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1beta1/:parent/entryGroups',
headers: {'content-type': 'application/json'},
body: {
dataCatalogTimestamps: {createTime: '', expireTime: '', updateTime: ''},
description: '',
displayName: '',
name: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/v1beta1/:parent/entryGroups');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
dataCatalogTimestamps: {
createTime: '',
expireTime: '',
updateTime: ''
},
description: '',
displayName: '',
name: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/v1beta1/:parent/entryGroups',
headers: {'content-type': 'application/json'},
data: {
dataCatalogTimestamps: {createTime: '', expireTime: '', updateTime: ''},
description: '',
displayName: '',
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/:parent/entryGroups';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"dataCatalogTimestamps":{"createTime":"","expireTime":"","updateTime":""},"description":"","displayName":"","name":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"dataCatalogTimestamps": @{ @"createTime": @"", @"expireTime": @"", @"updateTime": @"" },
@"description": @"",
@"displayName": @"",
@"name": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1beta1/:parent/entryGroups"]
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/entryGroups" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"dataCatalogTimestamps\": {\n \"createTime\": \"\",\n \"expireTime\": \"\",\n \"updateTime\": \"\"\n },\n \"description\": \"\",\n \"displayName\": \"\",\n \"name\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1beta1/:parent/entryGroups",
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([
'dataCatalogTimestamps' => [
'createTime' => '',
'expireTime' => '',
'updateTime' => ''
],
'description' => '',
'displayName' => '',
'name' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/v1beta1/:parent/entryGroups', [
'body' => '{
"dataCatalogTimestamps": {
"createTime": "",
"expireTime": "",
"updateTime": ""
},
"description": "",
"displayName": "",
"name": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1beta1/:parent/entryGroups');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'dataCatalogTimestamps' => [
'createTime' => '',
'expireTime' => '',
'updateTime' => ''
],
'description' => '',
'displayName' => '',
'name' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'dataCatalogTimestamps' => [
'createTime' => '',
'expireTime' => '',
'updateTime' => ''
],
'description' => '',
'displayName' => '',
'name' => ''
]));
$request->setRequestUrl('{{baseUrl}}/v1beta1/:parent/entryGroups');
$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/entryGroups' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"dataCatalogTimestamps": {
"createTime": "",
"expireTime": "",
"updateTime": ""
},
"description": "",
"displayName": "",
"name": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1beta1/:parent/entryGroups' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"dataCatalogTimestamps": {
"createTime": "",
"expireTime": "",
"updateTime": ""
},
"description": "",
"displayName": "",
"name": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"dataCatalogTimestamps\": {\n \"createTime\": \"\",\n \"expireTime\": \"\",\n \"updateTime\": \"\"\n },\n \"description\": \"\",\n \"displayName\": \"\",\n \"name\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1beta1/:parent/entryGroups", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1beta1/:parent/entryGroups"
payload = {
"dataCatalogTimestamps": {
"createTime": "",
"expireTime": "",
"updateTime": ""
},
"description": "",
"displayName": "",
"name": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1beta1/:parent/entryGroups"
payload <- "{\n \"dataCatalogTimestamps\": {\n \"createTime\": \"\",\n \"expireTime\": \"\",\n \"updateTime\": \"\"\n },\n \"description\": \"\",\n \"displayName\": \"\",\n \"name\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1beta1/:parent/entryGroups")
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 \"dataCatalogTimestamps\": {\n \"createTime\": \"\",\n \"expireTime\": \"\",\n \"updateTime\": \"\"\n },\n \"description\": \"\",\n \"displayName\": \"\",\n \"name\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/v1beta1/:parent/entryGroups') do |req|
req.body = "{\n \"dataCatalogTimestamps\": {\n \"createTime\": \"\",\n \"expireTime\": \"\",\n \"updateTime\": \"\"\n },\n \"description\": \"\",\n \"displayName\": \"\",\n \"name\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1beta1/:parent/entryGroups";
let payload = json!({
"dataCatalogTimestamps": json!({
"createTime": "",
"expireTime": "",
"updateTime": ""
}),
"description": "",
"displayName": "",
"name": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/v1beta1/:parent/entryGroups \
--header 'content-type: application/json' \
--data '{
"dataCatalogTimestamps": {
"createTime": "",
"expireTime": "",
"updateTime": ""
},
"description": "",
"displayName": "",
"name": ""
}'
echo '{
"dataCatalogTimestamps": {
"createTime": "",
"expireTime": "",
"updateTime": ""
},
"description": "",
"displayName": "",
"name": ""
}' | \
http POST {{baseUrl}}/v1beta1/:parent/entryGroups \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "dataCatalogTimestamps": {\n "createTime": "",\n "expireTime": "",\n "updateTime": ""\n },\n "description": "",\n "displayName": "",\n "name": ""\n}' \
--output-document \
- {{baseUrl}}/v1beta1/:parent/entryGroups
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"dataCatalogTimestamps": [
"createTime": "",
"expireTime": "",
"updateTime": ""
],
"description": "",
"displayName": "",
"name": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1beta1/:parent/entryGroups")! 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
datacatalog.projects.locations.entryGroups.entries.create
{{baseUrl}}/v1beta1/:parent/entries
QUERY PARAMS
parent
BODY json
{
"bigqueryDateShardedSpec": {
"dataset": "",
"shardCount": "",
"tablePrefix": ""
},
"bigqueryTableSpec": {
"tableSourceType": "",
"tableSpec": {
"groupedEntry": ""
},
"viewSpec": {
"viewQuery": ""
}
},
"description": "",
"displayName": "",
"gcsFilesetSpec": {
"filePatterns": [],
"sampleGcsFileSpecs": [
{
"filePath": "",
"gcsTimestamps": {
"createTime": "",
"expireTime": "",
"updateTime": ""
},
"sizeBytes": ""
}
]
},
"integratedSystem": "",
"linkedResource": "",
"name": "",
"schema": {
"columns": [
{
"column": "",
"description": "",
"mode": "",
"subcolumns": [],
"type": ""
}
]
},
"sourceSystemTimestamps": {},
"type": "",
"usageSignal": {
"updateTime": "",
"usageWithinTimeRange": {}
},
"userSpecifiedSystem": "",
"userSpecifiedType": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1beta1/:parent/entries");
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 \"bigqueryDateShardedSpec\": {\n \"dataset\": \"\",\n \"shardCount\": \"\",\n \"tablePrefix\": \"\"\n },\n \"bigqueryTableSpec\": {\n \"tableSourceType\": \"\",\n \"tableSpec\": {\n \"groupedEntry\": \"\"\n },\n \"viewSpec\": {\n \"viewQuery\": \"\"\n }\n },\n \"description\": \"\",\n \"displayName\": \"\",\n \"gcsFilesetSpec\": {\n \"filePatterns\": [],\n \"sampleGcsFileSpecs\": [\n {\n \"filePath\": \"\",\n \"gcsTimestamps\": {\n \"createTime\": \"\",\n \"expireTime\": \"\",\n \"updateTime\": \"\"\n },\n \"sizeBytes\": \"\"\n }\n ]\n },\n \"integratedSystem\": \"\",\n \"linkedResource\": \"\",\n \"name\": \"\",\n \"schema\": {\n \"columns\": [\n {\n \"column\": \"\",\n \"description\": \"\",\n \"mode\": \"\",\n \"subcolumns\": [],\n \"type\": \"\"\n }\n ]\n },\n \"sourceSystemTimestamps\": {},\n \"type\": \"\",\n \"usageSignal\": {\n \"updateTime\": \"\",\n \"usageWithinTimeRange\": {}\n },\n \"userSpecifiedSystem\": \"\",\n \"userSpecifiedType\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1beta1/:parent/entries" {:content-type :json
:form-params {:bigqueryDateShardedSpec {:dataset ""
:shardCount ""
:tablePrefix ""}
:bigqueryTableSpec {:tableSourceType ""
:tableSpec {:groupedEntry ""}
:viewSpec {:viewQuery ""}}
:description ""
:displayName ""
:gcsFilesetSpec {:filePatterns []
:sampleGcsFileSpecs [{:filePath ""
:gcsTimestamps {:createTime ""
:expireTime ""
:updateTime ""}
:sizeBytes ""}]}
:integratedSystem ""
:linkedResource ""
:name ""
:schema {:columns [{:column ""
:description ""
:mode ""
:subcolumns []
:type ""}]}
:sourceSystemTimestamps {}
:type ""
:usageSignal {:updateTime ""
:usageWithinTimeRange {}}
:userSpecifiedSystem ""
:userSpecifiedType ""}})
require "http/client"
url = "{{baseUrl}}/v1beta1/:parent/entries"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"bigqueryDateShardedSpec\": {\n \"dataset\": \"\",\n \"shardCount\": \"\",\n \"tablePrefix\": \"\"\n },\n \"bigqueryTableSpec\": {\n \"tableSourceType\": \"\",\n \"tableSpec\": {\n \"groupedEntry\": \"\"\n },\n \"viewSpec\": {\n \"viewQuery\": \"\"\n }\n },\n \"description\": \"\",\n \"displayName\": \"\",\n \"gcsFilesetSpec\": {\n \"filePatterns\": [],\n \"sampleGcsFileSpecs\": [\n {\n \"filePath\": \"\",\n \"gcsTimestamps\": {\n \"createTime\": \"\",\n \"expireTime\": \"\",\n \"updateTime\": \"\"\n },\n \"sizeBytes\": \"\"\n }\n ]\n },\n \"integratedSystem\": \"\",\n \"linkedResource\": \"\",\n \"name\": \"\",\n \"schema\": {\n \"columns\": [\n {\n \"column\": \"\",\n \"description\": \"\",\n \"mode\": \"\",\n \"subcolumns\": [],\n \"type\": \"\"\n }\n ]\n },\n \"sourceSystemTimestamps\": {},\n \"type\": \"\",\n \"usageSignal\": {\n \"updateTime\": \"\",\n \"usageWithinTimeRange\": {}\n },\n \"userSpecifiedSystem\": \"\",\n \"userSpecifiedType\": \"\"\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/entries"),
Content = new StringContent("{\n \"bigqueryDateShardedSpec\": {\n \"dataset\": \"\",\n \"shardCount\": \"\",\n \"tablePrefix\": \"\"\n },\n \"bigqueryTableSpec\": {\n \"tableSourceType\": \"\",\n \"tableSpec\": {\n \"groupedEntry\": \"\"\n },\n \"viewSpec\": {\n \"viewQuery\": \"\"\n }\n },\n \"description\": \"\",\n \"displayName\": \"\",\n \"gcsFilesetSpec\": {\n \"filePatterns\": [],\n \"sampleGcsFileSpecs\": [\n {\n \"filePath\": \"\",\n \"gcsTimestamps\": {\n \"createTime\": \"\",\n \"expireTime\": \"\",\n \"updateTime\": \"\"\n },\n \"sizeBytes\": \"\"\n }\n ]\n },\n \"integratedSystem\": \"\",\n \"linkedResource\": \"\",\n \"name\": \"\",\n \"schema\": {\n \"columns\": [\n {\n \"column\": \"\",\n \"description\": \"\",\n \"mode\": \"\",\n \"subcolumns\": [],\n \"type\": \"\"\n }\n ]\n },\n \"sourceSystemTimestamps\": {},\n \"type\": \"\",\n \"usageSignal\": {\n \"updateTime\": \"\",\n \"usageWithinTimeRange\": {}\n },\n \"userSpecifiedSystem\": \"\",\n \"userSpecifiedType\": \"\"\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/entries");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"bigqueryDateShardedSpec\": {\n \"dataset\": \"\",\n \"shardCount\": \"\",\n \"tablePrefix\": \"\"\n },\n \"bigqueryTableSpec\": {\n \"tableSourceType\": \"\",\n \"tableSpec\": {\n \"groupedEntry\": \"\"\n },\n \"viewSpec\": {\n \"viewQuery\": \"\"\n }\n },\n \"description\": \"\",\n \"displayName\": \"\",\n \"gcsFilesetSpec\": {\n \"filePatterns\": [],\n \"sampleGcsFileSpecs\": [\n {\n \"filePath\": \"\",\n \"gcsTimestamps\": {\n \"createTime\": \"\",\n \"expireTime\": \"\",\n \"updateTime\": \"\"\n },\n \"sizeBytes\": \"\"\n }\n ]\n },\n \"integratedSystem\": \"\",\n \"linkedResource\": \"\",\n \"name\": \"\",\n \"schema\": {\n \"columns\": [\n {\n \"column\": \"\",\n \"description\": \"\",\n \"mode\": \"\",\n \"subcolumns\": [],\n \"type\": \"\"\n }\n ]\n },\n \"sourceSystemTimestamps\": {},\n \"type\": \"\",\n \"usageSignal\": {\n \"updateTime\": \"\",\n \"usageWithinTimeRange\": {}\n },\n \"userSpecifiedSystem\": \"\",\n \"userSpecifiedType\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1beta1/:parent/entries"
payload := strings.NewReader("{\n \"bigqueryDateShardedSpec\": {\n \"dataset\": \"\",\n \"shardCount\": \"\",\n \"tablePrefix\": \"\"\n },\n \"bigqueryTableSpec\": {\n \"tableSourceType\": \"\",\n \"tableSpec\": {\n \"groupedEntry\": \"\"\n },\n \"viewSpec\": {\n \"viewQuery\": \"\"\n }\n },\n \"description\": \"\",\n \"displayName\": \"\",\n \"gcsFilesetSpec\": {\n \"filePatterns\": [],\n \"sampleGcsFileSpecs\": [\n {\n \"filePath\": \"\",\n \"gcsTimestamps\": {\n \"createTime\": \"\",\n \"expireTime\": \"\",\n \"updateTime\": \"\"\n },\n \"sizeBytes\": \"\"\n }\n ]\n },\n \"integratedSystem\": \"\",\n \"linkedResource\": \"\",\n \"name\": \"\",\n \"schema\": {\n \"columns\": [\n {\n \"column\": \"\",\n \"description\": \"\",\n \"mode\": \"\",\n \"subcolumns\": [],\n \"type\": \"\"\n }\n ]\n },\n \"sourceSystemTimestamps\": {},\n \"type\": \"\",\n \"usageSignal\": {\n \"updateTime\": \"\",\n \"usageWithinTimeRange\": {}\n },\n \"userSpecifiedSystem\": \"\",\n \"userSpecifiedType\": \"\"\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/entries HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 982
{
"bigqueryDateShardedSpec": {
"dataset": "",
"shardCount": "",
"tablePrefix": ""
},
"bigqueryTableSpec": {
"tableSourceType": "",
"tableSpec": {
"groupedEntry": ""
},
"viewSpec": {
"viewQuery": ""
}
},
"description": "",
"displayName": "",
"gcsFilesetSpec": {
"filePatterns": [],
"sampleGcsFileSpecs": [
{
"filePath": "",
"gcsTimestamps": {
"createTime": "",
"expireTime": "",
"updateTime": ""
},
"sizeBytes": ""
}
]
},
"integratedSystem": "",
"linkedResource": "",
"name": "",
"schema": {
"columns": [
{
"column": "",
"description": "",
"mode": "",
"subcolumns": [],
"type": ""
}
]
},
"sourceSystemTimestamps": {},
"type": "",
"usageSignal": {
"updateTime": "",
"usageWithinTimeRange": {}
},
"userSpecifiedSystem": "",
"userSpecifiedType": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1beta1/:parent/entries")
.setHeader("content-type", "application/json")
.setBody("{\n \"bigqueryDateShardedSpec\": {\n \"dataset\": \"\",\n \"shardCount\": \"\",\n \"tablePrefix\": \"\"\n },\n \"bigqueryTableSpec\": {\n \"tableSourceType\": \"\",\n \"tableSpec\": {\n \"groupedEntry\": \"\"\n },\n \"viewSpec\": {\n \"viewQuery\": \"\"\n }\n },\n \"description\": \"\",\n \"displayName\": \"\",\n \"gcsFilesetSpec\": {\n \"filePatterns\": [],\n \"sampleGcsFileSpecs\": [\n {\n \"filePath\": \"\",\n \"gcsTimestamps\": {\n \"createTime\": \"\",\n \"expireTime\": \"\",\n \"updateTime\": \"\"\n },\n \"sizeBytes\": \"\"\n }\n ]\n },\n \"integratedSystem\": \"\",\n \"linkedResource\": \"\",\n \"name\": \"\",\n \"schema\": {\n \"columns\": [\n {\n \"column\": \"\",\n \"description\": \"\",\n \"mode\": \"\",\n \"subcolumns\": [],\n \"type\": \"\"\n }\n ]\n },\n \"sourceSystemTimestamps\": {},\n \"type\": \"\",\n \"usageSignal\": {\n \"updateTime\": \"\",\n \"usageWithinTimeRange\": {}\n },\n \"userSpecifiedSystem\": \"\",\n \"userSpecifiedType\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1beta1/:parent/entries"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"bigqueryDateShardedSpec\": {\n \"dataset\": \"\",\n \"shardCount\": \"\",\n \"tablePrefix\": \"\"\n },\n \"bigqueryTableSpec\": {\n \"tableSourceType\": \"\",\n \"tableSpec\": {\n \"groupedEntry\": \"\"\n },\n \"viewSpec\": {\n \"viewQuery\": \"\"\n }\n },\n \"description\": \"\",\n \"displayName\": \"\",\n \"gcsFilesetSpec\": {\n \"filePatterns\": [],\n \"sampleGcsFileSpecs\": [\n {\n \"filePath\": \"\",\n \"gcsTimestamps\": {\n \"createTime\": \"\",\n \"expireTime\": \"\",\n \"updateTime\": \"\"\n },\n \"sizeBytes\": \"\"\n }\n ]\n },\n \"integratedSystem\": \"\",\n \"linkedResource\": \"\",\n \"name\": \"\",\n \"schema\": {\n \"columns\": [\n {\n \"column\": \"\",\n \"description\": \"\",\n \"mode\": \"\",\n \"subcolumns\": [],\n \"type\": \"\"\n }\n ]\n },\n \"sourceSystemTimestamps\": {},\n \"type\": \"\",\n \"usageSignal\": {\n \"updateTime\": \"\",\n \"usageWithinTimeRange\": {}\n },\n \"userSpecifiedSystem\": \"\",\n \"userSpecifiedType\": \"\"\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 \"bigqueryDateShardedSpec\": {\n \"dataset\": \"\",\n \"shardCount\": \"\",\n \"tablePrefix\": \"\"\n },\n \"bigqueryTableSpec\": {\n \"tableSourceType\": \"\",\n \"tableSpec\": {\n \"groupedEntry\": \"\"\n },\n \"viewSpec\": {\n \"viewQuery\": \"\"\n }\n },\n \"description\": \"\",\n \"displayName\": \"\",\n \"gcsFilesetSpec\": {\n \"filePatterns\": [],\n \"sampleGcsFileSpecs\": [\n {\n \"filePath\": \"\",\n \"gcsTimestamps\": {\n \"createTime\": \"\",\n \"expireTime\": \"\",\n \"updateTime\": \"\"\n },\n \"sizeBytes\": \"\"\n }\n ]\n },\n \"integratedSystem\": \"\",\n \"linkedResource\": \"\",\n \"name\": \"\",\n \"schema\": {\n \"columns\": [\n {\n \"column\": \"\",\n \"description\": \"\",\n \"mode\": \"\",\n \"subcolumns\": [],\n \"type\": \"\"\n }\n ]\n },\n \"sourceSystemTimestamps\": {},\n \"type\": \"\",\n \"usageSignal\": {\n \"updateTime\": \"\",\n \"usageWithinTimeRange\": {}\n },\n \"userSpecifiedSystem\": \"\",\n \"userSpecifiedType\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1beta1/:parent/entries")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1beta1/:parent/entries")
.header("content-type", "application/json")
.body("{\n \"bigqueryDateShardedSpec\": {\n \"dataset\": \"\",\n \"shardCount\": \"\",\n \"tablePrefix\": \"\"\n },\n \"bigqueryTableSpec\": {\n \"tableSourceType\": \"\",\n \"tableSpec\": {\n \"groupedEntry\": \"\"\n },\n \"viewSpec\": {\n \"viewQuery\": \"\"\n }\n },\n \"description\": \"\",\n \"displayName\": \"\",\n \"gcsFilesetSpec\": {\n \"filePatterns\": [],\n \"sampleGcsFileSpecs\": [\n {\n \"filePath\": \"\",\n \"gcsTimestamps\": {\n \"createTime\": \"\",\n \"expireTime\": \"\",\n \"updateTime\": \"\"\n },\n \"sizeBytes\": \"\"\n }\n ]\n },\n \"integratedSystem\": \"\",\n \"linkedResource\": \"\",\n \"name\": \"\",\n \"schema\": {\n \"columns\": [\n {\n \"column\": \"\",\n \"description\": \"\",\n \"mode\": \"\",\n \"subcolumns\": [],\n \"type\": \"\"\n }\n ]\n },\n \"sourceSystemTimestamps\": {},\n \"type\": \"\",\n \"usageSignal\": {\n \"updateTime\": \"\",\n \"usageWithinTimeRange\": {}\n },\n \"userSpecifiedSystem\": \"\",\n \"userSpecifiedType\": \"\"\n}")
.asString();
const data = JSON.stringify({
bigqueryDateShardedSpec: {
dataset: '',
shardCount: '',
tablePrefix: ''
},
bigqueryTableSpec: {
tableSourceType: '',
tableSpec: {
groupedEntry: ''
},
viewSpec: {
viewQuery: ''
}
},
description: '',
displayName: '',
gcsFilesetSpec: {
filePatterns: [],
sampleGcsFileSpecs: [
{
filePath: '',
gcsTimestamps: {
createTime: '',
expireTime: '',
updateTime: ''
},
sizeBytes: ''
}
]
},
integratedSystem: '',
linkedResource: '',
name: '',
schema: {
columns: [
{
column: '',
description: '',
mode: '',
subcolumns: [],
type: ''
}
]
},
sourceSystemTimestamps: {},
type: '',
usageSignal: {
updateTime: '',
usageWithinTimeRange: {}
},
userSpecifiedSystem: '',
userSpecifiedType: ''
});
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/entries');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1beta1/:parent/entries',
headers: {'content-type': 'application/json'},
data: {
bigqueryDateShardedSpec: {dataset: '', shardCount: '', tablePrefix: ''},
bigqueryTableSpec: {tableSourceType: '', tableSpec: {groupedEntry: ''}, viewSpec: {viewQuery: ''}},
description: '',
displayName: '',
gcsFilesetSpec: {
filePatterns: [],
sampleGcsFileSpecs: [
{
filePath: '',
gcsTimestamps: {createTime: '', expireTime: '', updateTime: ''},
sizeBytes: ''
}
]
},
integratedSystem: '',
linkedResource: '',
name: '',
schema: {columns: [{column: '', description: '', mode: '', subcolumns: [], type: ''}]},
sourceSystemTimestamps: {},
type: '',
usageSignal: {updateTime: '', usageWithinTimeRange: {}},
userSpecifiedSystem: '',
userSpecifiedType: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1beta1/:parent/entries';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"bigqueryDateShardedSpec":{"dataset":"","shardCount":"","tablePrefix":""},"bigqueryTableSpec":{"tableSourceType":"","tableSpec":{"groupedEntry":""},"viewSpec":{"viewQuery":""}},"description":"","displayName":"","gcsFilesetSpec":{"filePatterns":[],"sampleGcsFileSpecs":[{"filePath":"","gcsTimestamps":{"createTime":"","expireTime":"","updateTime":""},"sizeBytes":""}]},"integratedSystem":"","linkedResource":"","name":"","schema":{"columns":[{"column":"","description":"","mode":"","subcolumns":[],"type":""}]},"sourceSystemTimestamps":{},"type":"","usageSignal":{"updateTime":"","usageWithinTimeRange":{}},"userSpecifiedSystem":"","userSpecifiedType":""}'
};
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/entries',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "bigqueryDateShardedSpec": {\n "dataset": "",\n "shardCount": "",\n "tablePrefix": ""\n },\n "bigqueryTableSpec": {\n "tableSourceType": "",\n "tableSpec": {\n "groupedEntry": ""\n },\n "viewSpec": {\n "viewQuery": ""\n }\n },\n "description": "",\n "displayName": "",\n "gcsFilesetSpec": {\n "filePatterns": [],\n "sampleGcsFileSpecs": [\n {\n "filePath": "",\n "gcsTimestamps": {\n "createTime": "",\n "expireTime": "",\n "updateTime": ""\n },\n "sizeBytes": ""\n }\n ]\n },\n "integratedSystem": "",\n "linkedResource": "",\n "name": "",\n "schema": {\n "columns": [\n {\n "column": "",\n "description": "",\n "mode": "",\n "subcolumns": [],\n "type": ""\n }\n ]\n },\n "sourceSystemTimestamps": {},\n "type": "",\n "usageSignal": {\n "updateTime": "",\n "usageWithinTimeRange": {}\n },\n "userSpecifiedSystem": "",\n "userSpecifiedType": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"bigqueryDateShardedSpec\": {\n \"dataset\": \"\",\n \"shardCount\": \"\",\n \"tablePrefix\": \"\"\n },\n \"bigqueryTableSpec\": {\n \"tableSourceType\": \"\",\n \"tableSpec\": {\n \"groupedEntry\": \"\"\n },\n \"viewSpec\": {\n \"viewQuery\": \"\"\n }\n },\n \"description\": \"\",\n \"displayName\": \"\",\n \"gcsFilesetSpec\": {\n \"filePatterns\": [],\n \"sampleGcsFileSpecs\": [\n {\n \"filePath\": \"\",\n \"gcsTimestamps\": {\n \"createTime\": \"\",\n \"expireTime\": \"\",\n \"updateTime\": \"\"\n },\n \"sizeBytes\": \"\"\n }\n ]\n },\n \"integratedSystem\": \"\",\n \"linkedResource\": \"\",\n \"name\": \"\",\n \"schema\": {\n \"columns\": [\n {\n \"column\": \"\",\n \"description\": \"\",\n \"mode\": \"\",\n \"subcolumns\": [],\n \"type\": \"\"\n }\n ]\n },\n \"sourceSystemTimestamps\": {},\n \"type\": \"\",\n \"usageSignal\": {\n \"updateTime\": \"\",\n \"usageWithinTimeRange\": {}\n },\n \"userSpecifiedSystem\": \"\",\n \"userSpecifiedType\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1beta1/:parent/entries")
.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/entries',
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({
bigqueryDateShardedSpec: {dataset: '', shardCount: '', tablePrefix: ''},
bigqueryTableSpec: {tableSourceType: '', tableSpec: {groupedEntry: ''}, viewSpec: {viewQuery: ''}},
description: '',
displayName: '',
gcsFilesetSpec: {
filePatterns: [],
sampleGcsFileSpecs: [
{
filePath: '',
gcsTimestamps: {createTime: '', expireTime: '', updateTime: ''},
sizeBytes: ''
}
]
},
integratedSystem: '',
linkedResource: '',
name: '',
schema: {columns: [{column: '', description: '', mode: '', subcolumns: [], type: ''}]},
sourceSystemTimestamps: {},
type: '',
usageSignal: {updateTime: '', usageWithinTimeRange: {}},
userSpecifiedSystem: '',
userSpecifiedType: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1beta1/:parent/entries',
headers: {'content-type': 'application/json'},
body: {
bigqueryDateShardedSpec: {dataset: '', shardCount: '', tablePrefix: ''},
bigqueryTableSpec: {tableSourceType: '', tableSpec: {groupedEntry: ''}, viewSpec: {viewQuery: ''}},
description: '',
displayName: '',
gcsFilesetSpec: {
filePatterns: [],
sampleGcsFileSpecs: [
{
filePath: '',
gcsTimestamps: {createTime: '', expireTime: '', updateTime: ''},
sizeBytes: ''
}
]
},
integratedSystem: '',
linkedResource: '',
name: '',
schema: {columns: [{column: '', description: '', mode: '', subcolumns: [], type: ''}]},
sourceSystemTimestamps: {},
type: '',
usageSignal: {updateTime: '', usageWithinTimeRange: {}},
userSpecifiedSystem: '',
userSpecifiedType: ''
},
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/entries');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
bigqueryDateShardedSpec: {
dataset: '',
shardCount: '',
tablePrefix: ''
},
bigqueryTableSpec: {
tableSourceType: '',
tableSpec: {
groupedEntry: ''
},
viewSpec: {
viewQuery: ''
}
},
description: '',
displayName: '',
gcsFilesetSpec: {
filePatterns: [],
sampleGcsFileSpecs: [
{
filePath: '',
gcsTimestamps: {
createTime: '',
expireTime: '',
updateTime: ''
},
sizeBytes: ''
}
]
},
integratedSystem: '',
linkedResource: '',
name: '',
schema: {
columns: [
{
column: '',
description: '',
mode: '',
subcolumns: [],
type: ''
}
]
},
sourceSystemTimestamps: {},
type: '',
usageSignal: {
updateTime: '',
usageWithinTimeRange: {}
},
userSpecifiedSystem: '',
userSpecifiedType: ''
});
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/entries',
headers: {'content-type': 'application/json'},
data: {
bigqueryDateShardedSpec: {dataset: '', shardCount: '', tablePrefix: ''},
bigqueryTableSpec: {tableSourceType: '', tableSpec: {groupedEntry: ''}, viewSpec: {viewQuery: ''}},
description: '',
displayName: '',
gcsFilesetSpec: {
filePatterns: [],
sampleGcsFileSpecs: [
{
filePath: '',
gcsTimestamps: {createTime: '', expireTime: '', updateTime: ''},
sizeBytes: ''
}
]
},
integratedSystem: '',
linkedResource: '',
name: '',
schema: {columns: [{column: '', description: '', mode: '', subcolumns: [], type: ''}]},
sourceSystemTimestamps: {},
type: '',
usageSignal: {updateTime: '', usageWithinTimeRange: {}},
userSpecifiedSystem: '',
userSpecifiedType: ''
}
};
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/entries';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"bigqueryDateShardedSpec":{"dataset":"","shardCount":"","tablePrefix":""},"bigqueryTableSpec":{"tableSourceType":"","tableSpec":{"groupedEntry":""},"viewSpec":{"viewQuery":""}},"description":"","displayName":"","gcsFilesetSpec":{"filePatterns":[],"sampleGcsFileSpecs":[{"filePath":"","gcsTimestamps":{"createTime":"","expireTime":"","updateTime":""},"sizeBytes":""}]},"integratedSystem":"","linkedResource":"","name":"","schema":{"columns":[{"column":"","description":"","mode":"","subcolumns":[],"type":""}]},"sourceSystemTimestamps":{},"type":"","usageSignal":{"updateTime":"","usageWithinTimeRange":{}},"userSpecifiedSystem":"","userSpecifiedType":""}'
};
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 = @{ @"bigqueryDateShardedSpec": @{ @"dataset": @"", @"shardCount": @"", @"tablePrefix": @"" },
@"bigqueryTableSpec": @{ @"tableSourceType": @"", @"tableSpec": @{ @"groupedEntry": @"" }, @"viewSpec": @{ @"viewQuery": @"" } },
@"description": @"",
@"displayName": @"",
@"gcsFilesetSpec": @{ @"filePatterns": @[ ], @"sampleGcsFileSpecs": @[ @{ @"filePath": @"", @"gcsTimestamps": @{ @"createTime": @"", @"expireTime": @"", @"updateTime": @"" }, @"sizeBytes": @"" } ] },
@"integratedSystem": @"",
@"linkedResource": @"",
@"name": @"",
@"schema": @{ @"columns": @[ @{ @"column": @"", @"description": @"", @"mode": @"", @"subcolumns": @[ ], @"type": @"" } ] },
@"sourceSystemTimestamps": @{ },
@"type": @"",
@"usageSignal": @{ @"updateTime": @"", @"usageWithinTimeRange": @{ } },
@"userSpecifiedSystem": @"",
@"userSpecifiedType": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1beta1/:parent/entries"]
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/entries" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"bigqueryDateShardedSpec\": {\n \"dataset\": \"\",\n \"shardCount\": \"\",\n \"tablePrefix\": \"\"\n },\n \"bigqueryTableSpec\": {\n \"tableSourceType\": \"\",\n \"tableSpec\": {\n \"groupedEntry\": \"\"\n },\n \"viewSpec\": {\n \"viewQuery\": \"\"\n }\n },\n \"description\": \"\",\n \"displayName\": \"\",\n \"gcsFilesetSpec\": {\n \"filePatterns\": [],\n \"sampleGcsFileSpecs\": [\n {\n \"filePath\": \"\",\n \"gcsTimestamps\": {\n \"createTime\": \"\",\n \"expireTime\": \"\",\n \"updateTime\": \"\"\n },\n \"sizeBytes\": \"\"\n }\n ]\n },\n \"integratedSystem\": \"\",\n \"linkedResource\": \"\",\n \"name\": \"\",\n \"schema\": {\n \"columns\": [\n {\n \"column\": \"\",\n \"description\": \"\",\n \"mode\": \"\",\n \"subcolumns\": [],\n \"type\": \"\"\n }\n ]\n },\n \"sourceSystemTimestamps\": {},\n \"type\": \"\",\n \"usageSignal\": {\n \"updateTime\": \"\",\n \"usageWithinTimeRange\": {}\n },\n \"userSpecifiedSystem\": \"\",\n \"userSpecifiedType\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1beta1/:parent/entries",
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([
'bigqueryDateShardedSpec' => [
'dataset' => '',
'shardCount' => '',
'tablePrefix' => ''
],
'bigqueryTableSpec' => [
'tableSourceType' => '',
'tableSpec' => [
'groupedEntry' => ''
],
'viewSpec' => [
'viewQuery' => ''
]
],
'description' => '',
'displayName' => '',
'gcsFilesetSpec' => [
'filePatterns' => [
],
'sampleGcsFileSpecs' => [
[
'filePath' => '',
'gcsTimestamps' => [
'createTime' => '',
'expireTime' => '',
'updateTime' => ''
],
'sizeBytes' => ''
]
]
],
'integratedSystem' => '',
'linkedResource' => '',
'name' => '',
'schema' => [
'columns' => [
[
'column' => '',
'description' => '',
'mode' => '',
'subcolumns' => [
],
'type' => ''
]
]
],
'sourceSystemTimestamps' => [
],
'type' => '',
'usageSignal' => [
'updateTime' => '',
'usageWithinTimeRange' => [
]
],
'userSpecifiedSystem' => '',
'userSpecifiedType' => ''
]),
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/entries', [
'body' => '{
"bigqueryDateShardedSpec": {
"dataset": "",
"shardCount": "",
"tablePrefix": ""
},
"bigqueryTableSpec": {
"tableSourceType": "",
"tableSpec": {
"groupedEntry": ""
},
"viewSpec": {
"viewQuery": ""
}
},
"description": "",
"displayName": "",
"gcsFilesetSpec": {
"filePatterns": [],
"sampleGcsFileSpecs": [
{
"filePath": "",
"gcsTimestamps": {
"createTime": "",
"expireTime": "",
"updateTime": ""
},
"sizeBytes": ""
}
]
},
"integratedSystem": "",
"linkedResource": "",
"name": "",
"schema": {
"columns": [
{
"column": "",
"description": "",
"mode": "",
"subcolumns": [],
"type": ""
}
]
},
"sourceSystemTimestamps": {},
"type": "",
"usageSignal": {
"updateTime": "",
"usageWithinTimeRange": {}
},
"userSpecifiedSystem": "",
"userSpecifiedType": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1beta1/:parent/entries');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'bigqueryDateShardedSpec' => [
'dataset' => '',
'shardCount' => '',
'tablePrefix' => ''
],
'bigqueryTableSpec' => [
'tableSourceType' => '',
'tableSpec' => [
'groupedEntry' => ''
],
'viewSpec' => [
'viewQuery' => ''
]
],
'description' => '',
'displayName' => '',
'gcsFilesetSpec' => [
'filePatterns' => [
],
'sampleGcsFileSpecs' => [
[
'filePath' => '',
'gcsTimestamps' => [
'createTime' => '',
'expireTime' => '',
'updateTime' => ''
],
'sizeBytes' => ''
]
]
],
'integratedSystem' => '',
'linkedResource' => '',
'name' => '',
'schema' => [
'columns' => [
[
'column' => '',
'description' => '',
'mode' => '',
'subcolumns' => [
],
'type' => ''
]
]
],
'sourceSystemTimestamps' => [
],
'type' => '',
'usageSignal' => [
'updateTime' => '',
'usageWithinTimeRange' => [
]
],
'userSpecifiedSystem' => '',
'userSpecifiedType' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'bigqueryDateShardedSpec' => [
'dataset' => '',
'shardCount' => '',
'tablePrefix' => ''
],
'bigqueryTableSpec' => [
'tableSourceType' => '',
'tableSpec' => [
'groupedEntry' => ''
],
'viewSpec' => [
'viewQuery' => ''
]
],
'description' => '',
'displayName' => '',
'gcsFilesetSpec' => [
'filePatterns' => [
],
'sampleGcsFileSpecs' => [
[
'filePath' => '',
'gcsTimestamps' => [
'createTime' => '',
'expireTime' => '',
'updateTime' => ''
],
'sizeBytes' => ''
]
]
],
'integratedSystem' => '',
'linkedResource' => '',
'name' => '',
'schema' => [
'columns' => [
[
'column' => '',
'description' => '',
'mode' => '',
'subcolumns' => [
],
'type' => ''
]
]
],
'sourceSystemTimestamps' => [
],
'type' => '',
'usageSignal' => [
'updateTime' => '',
'usageWithinTimeRange' => [
]
],
'userSpecifiedSystem' => '',
'userSpecifiedType' => ''
]));
$request->setRequestUrl('{{baseUrl}}/v1beta1/:parent/entries');
$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/entries' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"bigqueryDateShardedSpec": {
"dataset": "",
"shardCount": "",
"tablePrefix": ""
},
"bigqueryTableSpec": {
"tableSourceType": "",
"tableSpec": {
"groupedEntry": ""
},
"viewSpec": {
"viewQuery": ""
}
},
"description": "",
"displayName": "",
"gcsFilesetSpec": {
"filePatterns": [],
"sampleGcsFileSpecs": [
{
"filePath": "",
"gcsTimestamps": {
"createTime": "",
"expireTime": "",
"updateTime": ""
},
"sizeBytes": ""
}
]
},
"integratedSystem": "",
"linkedResource": "",
"name": "",
"schema": {
"columns": [
{
"column": "",
"description": "",
"mode": "",
"subcolumns": [],
"type": ""
}
]
},
"sourceSystemTimestamps": {},
"type": "",
"usageSignal": {
"updateTime": "",
"usageWithinTimeRange": {}
},
"userSpecifiedSystem": "",
"userSpecifiedType": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1beta1/:parent/entries' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"bigqueryDateShardedSpec": {
"dataset": "",
"shardCount": "",
"tablePrefix": ""
},
"bigqueryTableSpec": {
"tableSourceType": "",
"tableSpec": {
"groupedEntry": ""
},
"viewSpec": {
"viewQuery": ""
}
},
"description": "",
"displayName": "",
"gcsFilesetSpec": {
"filePatterns": [],
"sampleGcsFileSpecs": [
{
"filePath": "",
"gcsTimestamps": {
"createTime": "",
"expireTime": "",
"updateTime": ""
},
"sizeBytes": ""
}
]
},
"integratedSystem": "",
"linkedResource": "",
"name": "",
"schema": {
"columns": [
{
"column": "",
"description": "",
"mode": "",
"subcolumns": [],
"type": ""
}
]
},
"sourceSystemTimestamps": {},
"type": "",
"usageSignal": {
"updateTime": "",
"usageWithinTimeRange": {}
},
"userSpecifiedSystem": "",
"userSpecifiedType": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"bigqueryDateShardedSpec\": {\n \"dataset\": \"\",\n \"shardCount\": \"\",\n \"tablePrefix\": \"\"\n },\n \"bigqueryTableSpec\": {\n \"tableSourceType\": \"\",\n \"tableSpec\": {\n \"groupedEntry\": \"\"\n },\n \"viewSpec\": {\n \"viewQuery\": \"\"\n }\n },\n \"description\": \"\",\n \"displayName\": \"\",\n \"gcsFilesetSpec\": {\n \"filePatterns\": [],\n \"sampleGcsFileSpecs\": [\n {\n \"filePath\": \"\",\n \"gcsTimestamps\": {\n \"createTime\": \"\",\n \"expireTime\": \"\",\n \"updateTime\": \"\"\n },\n \"sizeBytes\": \"\"\n }\n ]\n },\n \"integratedSystem\": \"\",\n \"linkedResource\": \"\",\n \"name\": \"\",\n \"schema\": {\n \"columns\": [\n {\n \"column\": \"\",\n \"description\": \"\",\n \"mode\": \"\",\n \"subcolumns\": [],\n \"type\": \"\"\n }\n ]\n },\n \"sourceSystemTimestamps\": {},\n \"type\": \"\",\n \"usageSignal\": {\n \"updateTime\": \"\",\n \"usageWithinTimeRange\": {}\n },\n \"userSpecifiedSystem\": \"\",\n \"userSpecifiedType\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1beta1/:parent/entries", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1beta1/:parent/entries"
payload = {
"bigqueryDateShardedSpec": {
"dataset": "",
"shardCount": "",
"tablePrefix": ""
},
"bigqueryTableSpec": {
"tableSourceType": "",
"tableSpec": { "groupedEntry": "" },
"viewSpec": { "viewQuery": "" }
},
"description": "",
"displayName": "",
"gcsFilesetSpec": {
"filePatterns": [],
"sampleGcsFileSpecs": [
{
"filePath": "",
"gcsTimestamps": {
"createTime": "",
"expireTime": "",
"updateTime": ""
},
"sizeBytes": ""
}
]
},
"integratedSystem": "",
"linkedResource": "",
"name": "",
"schema": { "columns": [
{
"column": "",
"description": "",
"mode": "",
"subcolumns": [],
"type": ""
}
] },
"sourceSystemTimestamps": {},
"type": "",
"usageSignal": {
"updateTime": "",
"usageWithinTimeRange": {}
},
"userSpecifiedSystem": "",
"userSpecifiedType": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1beta1/:parent/entries"
payload <- "{\n \"bigqueryDateShardedSpec\": {\n \"dataset\": \"\",\n \"shardCount\": \"\",\n \"tablePrefix\": \"\"\n },\n \"bigqueryTableSpec\": {\n \"tableSourceType\": \"\",\n \"tableSpec\": {\n \"groupedEntry\": \"\"\n },\n \"viewSpec\": {\n \"viewQuery\": \"\"\n }\n },\n \"description\": \"\",\n \"displayName\": \"\",\n \"gcsFilesetSpec\": {\n \"filePatterns\": [],\n \"sampleGcsFileSpecs\": [\n {\n \"filePath\": \"\",\n \"gcsTimestamps\": {\n \"createTime\": \"\",\n \"expireTime\": \"\",\n \"updateTime\": \"\"\n },\n \"sizeBytes\": \"\"\n }\n ]\n },\n \"integratedSystem\": \"\",\n \"linkedResource\": \"\",\n \"name\": \"\",\n \"schema\": {\n \"columns\": [\n {\n \"column\": \"\",\n \"description\": \"\",\n \"mode\": \"\",\n \"subcolumns\": [],\n \"type\": \"\"\n }\n ]\n },\n \"sourceSystemTimestamps\": {},\n \"type\": \"\",\n \"usageSignal\": {\n \"updateTime\": \"\",\n \"usageWithinTimeRange\": {}\n },\n \"userSpecifiedSystem\": \"\",\n \"userSpecifiedType\": \"\"\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/entries")
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 \"bigqueryDateShardedSpec\": {\n \"dataset\": \"\",\n \"shardCount\": \"\",\n \"tablePrefix\": \"\"\n },\n \"bigqueryTableSpec\": {\n \"tableSourceType\": \"\",\n \"tableSpec\": {\n \"groupedEntry\": \"\"\n },\n \"viewSpec\": {\n \"viewQuery\": \"\"\n }\n },\n \"description\": \"\",\n \"displayName\": \"\",\n \"gcsFilesetSpec\": {\n \"filePatterns\": [],\n \"sampleGcsFileSpecs\": [\n {\n \"filePath\": \"\",\n \"gcsTimestamps\": {\n \"createTime\": \"\",\n \"expireTime\": \"\",\n \"updateTime\": \"\"\n },\n \"sizeBytes\": \"\"\n }\n ]\n },\n \"integratedSystem\": \"\",\n \"linkedResource\": \"\",\n \"name\": \"\",\n \"schema\": {\n \"columns\": [\n {\n \"column\": \"\",\n \"description\": \"\",\n \"mode\": \"\",\n \"subcolumns\": [],\n \"type\": \"\"\n }\n ]\n },\n \"sourceSystemTimestamps\": {},\n \"type\": \"\",\n \"usageSignal\": {\n \"updateTime\": \"\",\n \"usageWithinTimeRange\": {}\n },\n \"userSpecifiedSystem\": \"\",\n \"userSpecifiedType\": \"\"\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/entries') do |req|
req.body = "{\n \"bigqueryDateShardedSpec\": {\n \"dataset\": \"\",\n \"shardCount\": \"\",\n \"tablePrefix\": \"\"\n },\n \"bigqueryTableSpec\": {\n \"tableSourceType\": \"\",\n \"tableSpec\": {\n \"groupedEntry\": \"\"\n },\n \"viewSpec\": {\n \"viewQuery\": \"\"\n }\n },\n \"description\": \"\",\n \"displayName\": \"\",\n \"gcsFilesetSpec\": {\n \"filePatterns\": [],\n \"sampleGcsFileSpecs\": [\n {\n \"filePath\": \"\",\n \"gcsTimestamps\": {\n \"createTime\": \"\",\n \"expireTime\": \"\",\n \"updateTime\": \"\"\n },\n \"sizeBytes\": \"\"\n }\n ]\n },\n \"integratedSystem\": \"\",\n \"linkedResource\": \"\",\n \"name\": \"\",\n \"schema\": {\n \"columns\": [\n {\n \"column\": \"\",\n \"description\": \"\",\n \"mode\": \"\",\n \"subcolumns\": [],\n \"type\": \"\"\n }\n ]\n },\n \"sourceSystemTimestamps\": {},\n \"type\": \"\",\n \"usageSignal\": {\n \"updateTime\": \"\",\n \"usageWithinTimeRange\": {}\n },\n \"userSpecifiedSystem\": \"\",\n \"userSpecifiedType\": \"\"\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/entries";
let payload = json!({
"bigqueryDateShardedSpec": json!({
"dataset": "",
"shardCount": "",
"tablePrefix": ""
}),
"bigqueryTableSpec": json!({
"tableSourceType": "",
"tableSpec": json!({"groupedEntry": ""}),
"viewSpec": json!({"viewQuery": ""})
}),
"description": "",
"displayName": "",
"gcsFilesetSpec": json!({
"filePatterns": (),
"sampleGcsFileSpecs": (
json!({
"filePath": "",
"gcsTimestamps": json!({
"createTime": "",
"expireTime": "",
"updateTime": ""
}),
"sizeBytes": ""
})
)
}),
"integratedSystem": "",
"linkedResource": "",
"name": "",
"schema": json!({"columns": (
json!({
"column": "",
"description": "",
"mode": "",
"subcolumns": (),
"type": ""
})
)}),
"sourceSystemTimestamps": json!({}),
"type": "",
"usageSignal": json!({
"updateTime": "",
"usageWithinTimeRange": json!({})
}),
"userSpecifiedSystem": "",
"userSpecifiedType": ""
});
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/entries \
--header 'content-type: application/json' \
--data '{
"bigqueryDateShardedSpec": {
"dataset": "",
"shardCount": "",
"tablePrefix": ""
},
"bigqueryTableSpec": {
"tableSourceType": "",
"tableSpec": {
"groupedEntry": ""
},
"viewSpec": {
"viewQuery": ""
}
},
"description": "",
"displayName": "",
"gcsFilesetSpec": {
"filePatterns": [],
"sampleGcsFileSpecs": [
{
"filePath": "",
"gcsTimestamps": {
"createTime": "",
"expireTime": "",
"updateTime": ""
},
"sizeBytes": ""
}
]
},
"integratedSystem": "",
"linkedResource": "",
"name": "",
"schema": {
"columns": [
{
"column": "",
"description": "",
"mode": "",
"subcolumns": [],
"type": ""
}
]
},
"sourceSystemTimestamps": {},
"type": "",
"usageSignal": {
"updateTime": "",
"usageWithinTimeRange": {}
},
"userSpecifiedSystem": "",
"userSpecifiedType": ""
}'
echo '{
"bigqueryDateShardedSpec": {
"dataset": "",
"shardCount": "",
"tablePrefix": ""
},
"bigqueryTableSpec": {
"tableSourceType": "",
"tableSpec": {
"groupedEntry": ""
},
"viewSpec": {
"viewQuery": ""
}
},
"description": "",
"displayName": "",
"gcsFilesetSpec": {
"filePatterns": [],
"sampleGcsFileSpecs": [
{
"filePath": "",
"gcsTimestamps": {
"createTime": "",
"expireTime": "",
"updateTime": ""
},
"sizeBytes": ""
}
]
},
"integratedSystem": "",
"linkedResource": "",
"name": "",
"schema": {
"columns": [
{
"column": "",
"description": "",
"mode": "",
"subcolumns": [],
"type": ""
}
]
},
"sourceSystemTimestamps": {},
"type": "",
"usageSignal": {
"updateTime": "",
"usageWithinTimeRange": {}
},
"userSpecifiedSystem": "",
"userSpecifiedType": ""
}' | \
http POST {{baseUrl}}/v1beta1/:parent/entries \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "bigqueryDateShardedSpec": {\n "dataset": "",\n "shardCount": "",\n "tablePrefix": ""\n },\n "bigqueryTableSpec": {\n "tableSourceType": "",\n "tableSpec": {\n "groupedEntry": ""\n },\n "viewSpec": {\n "viewQuery": ""\n }\n },\n "description": "",\n "displayName": "",\n "gcsFilesetSpec": {\n "filePatterns": [],\n "sampleGcsFileSpecs": [\n {\n "filePath": "",\n "gcsTimestamps": {\n "createTime": "",\n "expireTime": "",\n "updateTime": ""\n },\n "sizeBytes": ""\n }\n ]\n },\n "integratedSystem": "",\n "linkedResource": "",\n "name": "",\n "schema": {\n "columns": [\n {\n "column": "",\n "description": "",\n "mode": "",\n "subcolumns": [],\n "type": ""\n }\n ]\n },\n "sourceSystemTimestamps": {},\n "type": "",\n "usageSignal": {\n "updateTime": "",\n "usageWithinTimeRange": {}\n },\n "userSpecifiedSystem": "",\n "userSpecifiedType": ""\n}' \
--output-document \
- {{baseUrl}}/v1beta1/:parent/entries
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"bigqueryDateShardedSpec": [
"dataset": "",
"shardCount": "",
"tablePrefix": ""
],
"bigqueryTableSpec": [
"tableSourceType": "",
"tableSpec": ["groupedEntry": ""],
"viewSpec": ["viewQuery": ""]
],
"description": "",
"displayName": "",
"gcsFilesetSpec": [
"filePatterns": [],
"sampleGcsFileSpecs": [
[
"filePath": "",
"gcsTimestamps": [
"createTime": "",
"expireTime": "",
"updateTime": ""
],
"sizeBytes": ""
]
]
],
"integratedSystem": "",
"linkedResource": "",
"name": "",
"schema": ["columns": [
[
"column": "",
"description": "",
"mode": "",
"subcolumns": [],
"type": ""
]
]],
"sourceSystemTimestamps": [],
"type": "",
"usageSignal": [
"updateTime": "",
"usageWithinTimeRange": []
],
"userSpecifiedSystem": "",
"userSpecifiedType": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1beta1/:parent/entries")! 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
datacatalog.projects.locations.entryGroups.entries.list
{{baseUrl}}/v1beta1/:parent/entries
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/entries");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v1beta1/:parent/entries")
require "http/client"
url = "{{baseUrl}}/v1beta1/:parent/entries"
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/entries"),
};
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/entries");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1beta1/:parent/entries"
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/entries HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1beta1/:parent/entries")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1beta1/:parent/entries"))
.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/entries")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1beta1/:parent/entries")
.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/entries');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/v1beta1/:parent/entries'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1beta1/:parent/entries';
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/entries',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1beta1/:parent/entries")
.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/entries',
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/entries'};
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/entries');
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/entries'};
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/entries';
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/entries"]
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/entries" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1beta1/:parent/entries",
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/entries');
echo $response->getBody();
setUrl('{{baseUrl}}/v1beta1/:parent/entries');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1beta1/:parent/entries');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1beta1/:parent/entries' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1beta1/:parent/entries' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v1beta1/:parent/entries")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1beta1/:parent/entries"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1beta1/:parent/entries"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1beta1/:parent/entries")
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/entries') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1beta1/:parent/entries";
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/entries
http GET {{baseUrl}}/v1beta1/:parent/entries
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v1beta1/:parent/entries
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1beta1/:parent/entries")! 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
datacatalog.projects.locations.entryGroups.list
{{baseUrl}}/v1beta1/:parent/entryGroups
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/entryGroups");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v1beta1/:parent/entryGroups")
require "http/client"
url = "{{baseUrl}}/v1beta1/:parent/entryGroups"
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/entryGroups"),
};
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/entryGroups");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1beta1/:parent/entryGroups"
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/entryGroups HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1beta1/:parent/entryGroups")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1beta1/:parent/entryGroups"))
.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/entryGroups")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1beta1/:parent/entryGroups")
.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/entryGroups');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/v1beta1/:parent/entryGroups'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1beta1/:parent/entryGroups';
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/entryGroups',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1beta1/:parent/entryGroups")
.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/entryGroups',
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/entryGroups'};
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/entryGroups');
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/entryGroups'};
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/entryGroups';
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/entryGroups"]
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/entryGroups" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1beta1/:parent/entryGroups",
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/entryGroups');
echo $response->getBody();
setUrl('{{baseUrl}}/v1beta1/:parent/entryGroups');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1beta1/:parent/entryGroups');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1beta1/:parent/entryGroups' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1beta1/:parent/entryGroups' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v1beta1/:parent/entryGroups")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1beta1/:parent/entryGroups"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1beta1/:parent/entryGroups"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1beta1/:parent/entryGroups")
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/entryGroups') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1beta1/:parent/entryGroups";
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/entryGroups
http GET {{baseUrl}}/v1beta1/:parent/entryGroups
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v1beta1/:parent/entryGroups
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1beta1/:parent/entryGroups")! 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
datacatalog.projects.locations.entryGroups.tags.create
{{baseUrl}}/v1beta1/:parent/tags
QUERY PARAMS
parent
BODY json
{
"column": "",
"fields": {},
"name": "",
"template": "",
"templateDisplayName": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1beta1/:parent/tags");
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 \"column\": \"\",\n \"fields\": {},\n \"name\": \"\",\n \"template\": \"\",\n \"templateDisplayName\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1beta1/:parent/tags" {:content-type :json
:form-params {:column ""
:fields {}
:name ""
:template ""
:templateDisplayName ""}})
require "http/client"
url = "{{baseUrl}}/v1beta1/:parent/tags"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"column\": \"\",\n \"fields\": {},\n \"name\": \"\",\n \"template\": \"\",\n \"templateDisplayName\": \"\"\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/tags"),
Content = new StringContent("{\n \"column\": \"\",\n \"fields\": {},\n \"name\": \"\",\n \"template\": \"\",\n \"templateDisplayName\": \"\"\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/tags");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"column\": \"\",\n \"fields\": {},\n \"name\": \"\",\n \"template\": \"\",\n \"templateDisplayName\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1beta1/:parent/tags"
payload := strings.NewReader("{\n \"column\": \"\",\n \"fields\": {},\n \"name\": \"\",\n \"template\": \"\",\n \"templateDisplayName\": \"\"\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/tags HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 95
{
"column": "",
"fields": {},
"name": "",
"template": "",
"templateDisplayName": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1beta1/:parent/tags")
.setHeader("content-type", "application/json")
.setBody("{\n \"column\": \"\",\n \"fields\": {},\n \"name\": \"\",\n \"template\": \"\",\n \"templateDisplayName\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1beta1/:parent/tags"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"column\": \"\",\n \"fields\": {},\n \"name\": \"\",\n \"template\": \"\",\n \"templateDisplayName\": \"\"\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 \"column\": \"\",\n \"fields\": {},\n \"name\": \"\",\n \"template\": \"\",\n \"templateDisplayName\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1beta1/:parent/tags")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1beta1/:parent/tags")
.header("content-type", "application/json")
.body("{\n \"column\": \"\",\n \"fields\": {},\n \"name\": \"\",\n \"template\": \"\",\n \"templateDisplayName\": \"\"\n}")
.asString();
const data = JSON.stringify({
column: '',
fields: {},
name: '',
template: '',
templateDisplayName: ''
});
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/tags');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1beta1/:parent/tags',
headers: {'content-type': 'application/json'},
data: {column: '', fields: {}, name: '', template: '', templateDisplayName: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1beta1/:parent/tags';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"column":"","fields":{},"name":"","template":"","templateDisplayName":""}'
};
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/tags',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "column": "",\n "fields": {},\n "name": "",\n "template": "",\n "templateDisplayName": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"column\": \"\",\n \"fields\": {},\n \"name\": \"\",\n \"template\": \"\",\n \"templateDisplayName\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1beta1/:parent/tags")
.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/tags',
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({column: '', fields: {}, name: '', template: '', templateDisplayName: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1beta1/:parent/tags',
headers: {'content-type': 'application/json'},
body: {column: '', fields: {}, name: '', template: '', templateDisplayName: ''},
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/tags');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
column: '',
fields: {},
name: '',
template: '',
templateDisplayName: ''
});
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/tags',
headers: {'content-type': 'application/json'},
data: {column: '', fields: {}, name: '', template: '', templateDisplayName: ''}
};
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/tags';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"column":"","fields":{},"name":"","template":"","templateDisplayName":""}'
};
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 = @{ @"column": @"",
@"fields": @{ },
@"name": @"",
@"template": @"",
@"templateDisplayName": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1beta1/:parent/tags"]
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/tags" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"column\": \"\",\n \"fields\": {},\n \"name\": \"\",\n \"template\": \"\",\n \"templateDisplayName\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1beta1/:parent/tags",
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([
'column' => '',
'fields' => [
],
'name' => '',
'template' => '',
'templateDisplayName' => ''
]),
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/tags', [
'body' => '{
"column": "",
"fields": {},
"name": "",
"template": "",
"templateDisplayName": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1beta1/:parent/tags');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'column' => '',
'fields' => [
],
'name' => '',
'template' => '',
'templateDisplayName' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'column' => '',
'fields' => [
],
'name' => '',
'template' => '',
'templateDisplayName' => ''
]));
$request->setRequestUrl('{{baseUrl}}/v1beta1/:parent/tags');
$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/tags' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"column": "",
"fields": {},
"name": "",
"template": "",
"templateDisplayName": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1beta1/:parent/tags' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"column": "",
"fields": {},
"name": "",
"template": "",
"templateDisplayName": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"column\": \"\",\n \"fields\": {},\n \"name\": \"\",\n \"template\": \"\",\n \"templateDisplayName\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1beta1/:parent/tags", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1beta1/:parent/tags"
payload = {
"column": "",
"fields": {},
"name": "",
"template": "",
"templateDisplayName": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1beta1/:parent/tags"
payload <- "{\n \"column\": \"\",\n \"fields\": {},\n \"name\": \"\",\n \"template\": \"\",\n \"templateDisplayName\": \"\"\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/tags")
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 \"column\": \"\",\n \"fields\": {},\n \"name\": \"\",\n \"template\": \"\",\n \"templateDisplayName\": \"\"\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/tags') do |req|
req.body = "{\n \"column\": \"\",\n \"fields\": {},\n \"name\": \"\",\n \"template\": \"\",\n \"templateDisplayName\": \"\"\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/tags";
let payload = json!({
"column": "",
"fields": json!({}),
"name": "",
"template": "",
"templateDisplayName": ""
});
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/tags \
--header 'content-type: application/json' \
--data '{
"column": "",
"fields": {},
"name": "",
"template": "",
"templateDisplayName": ""
}'
echo '{
"column": "",
"fields": {},
"name": "",
"template": "",
"templateDisplayName": ""
}' | \
http POST {{baseUrl}}/v1beta1/:parent/tags \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "column": "",\n "fields": {},\n "name": "",\n "template": "",\n "templateDisplayName": ""\n}' \
--output-document \
- {{baseUrl}}/v1beta1/:parent/tags
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"column": "",
"fields": [],
"name": "",
"template": "",
"templateDisplayName": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1beta1/:parent/tags")! 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
datacatalog.projects.locations.entryGroups.tags.list
{{baseUrl}}/v1beta1/:parent/tags
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/tags");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v1beta1/:parent/tags")
require "http/client"
url = "{{baseUrl}}/v1beta1/:parent/tags"
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/tags"),
};
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/tags");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1beta1/:parent/tags"
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/tags HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1beta1/:parent/tags")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1beta1/:parent/tags"))
.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/tags")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1beta1/:parent/tags")
.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/tags');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/v1beta1/:parent/tags'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1beta1/:parent/tags';
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/tags',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1beta1/:parent/tags")
.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/tags',
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/tags'};
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/tags');
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/tags'};
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/tags';
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/tags"]
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/tags" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1beta1/:parent/tags",
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/tags');
echo $response->getBody();
setUrl('{{baseUrl}}/v1beta1/:parent/tags');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1beta1/:parent/tags');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1beta1/:parent/tags' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1beta1/:parent/tags' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v1beta1/:parent/tags")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1beta1/:parent/tags"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1beta1/:parent/tags"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1beta1/:parent/tags")
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/tags') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1beta1/:parent/tags";
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/tags
http GET {{baseUrl}}/v1beta1/:parent/tags
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v1beta1/:parent/tags
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1beta1/:parent/tags")! 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
datacatalog.projects.locations.tagTemplates.create
{{baseUrl}}/v1beta1/:parent/tagTemplates
QUERY PARAMS
parent
BODY json
{
"displayName": "",
"fields": {},
"name": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1beta1/:parent/tagTemplates");
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 \"displayName\": \"\",\n \"fields\": {},\n \"name\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1beta1/:parent/tagTemplates" {:content-type :json
:form-params {:displayName ""
:fields {}
:name ""}})
require "http/client"
url = "{{baseUrl}}/v1beta1/:parent/tagTemplates"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"displayName\": \"\",\n \"fields\": {},\n \"name\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/v1beta1/:parent/tagTemplates"),
Content = new StringContent("{\n \"displayName\": \"\",\n \"fields\": {},\n \"name\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1beta1/:parent/tagTemplates");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"displayName\": \"\",\n \"fields\": {},\n \"name\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1beta1/:parent/tagTemplates"
payload := strings.NewReader("{\n \"displayName\": \"\",\n \"fields\": {},\n \"name\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/v1beta1/:parent/tagTemplates HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 53
{
"displayName": "",
"fields": {},
"name": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1beta1/:parent/tagTemplates")
.setHeader("content-type", "application/json")
.setBody("{\n \"displayName\": \"\",\n \"fields\": {},\n \"name\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1beta1/:parent/tagTemplates"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"displayName\": \"\",\n \"fields\": {},\n \"name\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"displayName\": \"\",\n \"fields\": {},\n \"name\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1beta1/:parent/tagTemplates")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1beta1/:parent/tagTemplates")
.header("content-type", "application/json")
.body("{\n \"displayName\": \"\",\n \"fields\": {},\n \"name\": \"\"\n}")
.asString();
const data = JSON.stringify({
displayName: '',
fields: {},
name: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v1beta1/:parent/tagTemplates');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1beta1/:parent/tagTemplates',
headers: {'content-type': 'application/json'},
data: {displayName: '', fields: {}, name: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1beta1/:parent/tagTemplates';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"displayName":"","fields":{},"name":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1beta1/:parent/tagTemplates',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "displayName": "",\n "fields": {},\n "name": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"displayName\": \"\",\n \"fields\": {},\n \"name\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1beta1/:parent/tagTemplates")
.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/tagTemplates',
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({displayName: '', fields: {}, name: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1beta1/:parent/tagTemplates',
headers: {'content-type': 'application/json'},
body: {displayName: '', fields: {}, name: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/v1beta1/:parent/tagTemplates');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
displayName: '',
fields: {},
name: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/v1beta1/:parent/tagTemplates',
headers: {'content-type': 'application/json'},
data: {displayName: '', fields: {}, 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/:parent/tagTemplates';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"displayName":"","fields":{},"name":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"displayName": @"",
@"fields": @{ },
@"name": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1beta1/:parent/tagTemplates"]
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/tagTemplates" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"displayName\": \"\",\n \"fields\": {},\n \"name\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1beta1/:parent/tagTemplates",
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([
'displayName' => '',
'fields' => [
],
'name' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/v1beta1/:parent/tagTemplates', [
'body' => '{
"displayName": "",
"fields": {},
"name": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1beta1/:parent/tagTemplates');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'displayName' => '',
'fields' => [
],
'name' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'displayName' => '',
'fields' => [
],
'name' => ''
]));
$request->setRequestUrl('{{baseUrl}}/v1beta1/:parent/tagTemplates');
$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/tagTemplates' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"displayName": "",
"fields": {},
"name": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1beta1/:parent/tagTemplates' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"displayName": "",
"fields": {},
"name": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"displayName\": \"\",\n \"fields\": {},\n \"name\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1beta1/:parent/tagTemplates", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1beta1/:parent/tagTemplates"
payload = {
"displayName": "",
"fields": {},
"name": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1beta1/:parent/tagTemplates"
payload <- "{\n \"displayName\": \"\",\n \"fields\": {},\n \"name\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1beta1/:parent/tagTemplates")
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 \"displayName\": \"\",\n \"fields\": {},\n \"name\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/v1beta1/:parent/tagTemplates') do |req|
req.body = "{\n \"displayName\": \"\",\n \"fields\": {},\n \"name\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1beta1/:parent/tagTemplates";
let payload = json!({
"displayName": "",
"fields": json!({}),
"name": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/v1beta1/:parent/tagTemplates \
--header 'content-type: application/json' \
--data '{
"displayName": "",
"fields": {},
"name": ""
}'
echo '{
"displayName": "",
"fields": {},
"name": ""
}' | \
http POST {{baseUrl}}/v1beta1/:parent/tagTemplates \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "displayName": "",\n "fields": {},\n "name": ""\n}' \
--output-document \
- {{baseUrl}}/v1beta1/:parent/tagTemplates
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"displayName": "",
"fields": [],
"name": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1beta1/:parent/tagTemplates")! 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
datacatalog.projects.locations.tagTemplates.fields.create
{{baseUrl}}/v1beta1/:parent/fields
QUERY PARAMS
parent
BODY json
{
"description": "",
"displayName": "",
"isRequired": false,
"name": "",
"order": 0,
"type": {
"enumType": {
"allowedValues": [
{
"displayName": ""
}
]
},
"primitiveType": ""
}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1beta1/:parent/fields");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"description\": \"\",\n \"displayName\": \"\",\n \"isRequired\": false,\n \"name\": \"\",\n \"order\": 0,\n \"type\": {\n \"enumType\": {\n \"allowedValues\": [\n {\n \"displayName\": \"\"\n }\n ]\n },\n \"primitiveType\": \"\"\n }\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1beta1/:parent/fields" {:content-type :json
:form-params {:description ""
:displayName ""
:isRequired false
:name ""
:order 0
:type {:enumType {:allowedValues [{:displayName ""}]}
:primitiveType ""}}})
require "http/client"
url = "{{baseUrl}}/v1beta1/:parent/fields"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"description\": \"\",\n \"displayName\": \"\",\n \"isRequired\": false,\n \"name\": \"\",\n \"order\": 0,\n \"type\": {\n \"enumType\": {\n \"allowedValues\": [\n {\n \"displayName\": \"\"\n }\n ]\n },\n \"primitiveType\": \"\"\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/:parent/fields"),
Content = new StringContent("{\n \"description\": \"\",\n \"displayName\": \"\",\n \"isRequired\": false,\n \"name\": \"\",\n \"order\": 0,\n \"type\": {\n \"enumType\": {\n \"allowedValues\": [\n {\n \"displayName\": \"\"\n }\n ]\n },\n \"primitiveType\": \"\"\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/:parent/fields");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"description\": \"\",\n \"displayName\": \"\",\n \"isRequired\": false,\n \"name\": \"\",\n \"order\": 0,\n \"type\": {\n \"enumType\": {\n \"allowedValues\": [\n {\n \"displayName\": \"\"\n }\n ]\n },\n \"primitiveType\": \"\"\n }\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1beta1/:parent/fields"
payload := strings.NewReader("{\n \"description\": \"\",\n \"displayName\": \"\",\n \"isRequired\": false,\n \"name\": \"\",\n \"order\": 0,\n \"type\": {\n \"enumType\": {\n \"allowedValues\": [\n {\n \"displayName\": \"\"\n }\n ]\n },\n \"primitiveType\": \"\"\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/:parent/fields HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 242
{
"description": "",
"displayName": "",
"isRequired": false,
"name": "",
"order": 0,
"type": {
"enumType": {
"allowedValues": [
{
"displayName": ""
}
]
},
"primitiveType": ""
}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1beta1/:parent/fields")
.setHeader("content-type", "application/json")
.setBody("{\n \"description\": \"\",\n \"displayName\": \"\",\n \"isRequired\": false,\n \"name\": \"\",\n \"order\": 0,\n \"type\": {\n \"enumType\": {\n \"allowedValues\": [\n {\n \"displayName\": \"\"\n }\n ]\n },\n \"primitiveType\": \"\"\n }\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1beta1/:parent/fields"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"description\": \"\",\n \"displayName\": \"\",\n \"isRequired\": false,\n \"name\": \"\",\n \"order\": 0,\n \"type\": {\n \"enumType\": {\n \"allowedValues\": [\n {\n \"displayName\": \"\"\n }\n ]\n },\n \"primitiveType\": \"\"\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 \"description\": \"\",\n \"displayName\": \"\",\n \"isRequired\": false,\n \"name\": \"\",\n \"order\": 0,\n \"type\": {\n \"enumType\": {\n \"allowedValues\": [\n {\n \"displayName\": \"\"\n }\n ]\n },\n \"primitiveType\": \"\"\n }\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1beta1/:parent/fields")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1beta1/:parent/fields")
.header("content-type", "application/json")
.body("{\n \"description\": \"\",\n \"displayName\": \"\",\n \"isRequired\": false,\n \"name\": \"\",\n \"order\": 0,\n \"type\": {\n \"enumType\": {\n \"allowedValues\": [\n {\n \"displayName\": \"\"\n }\n ]\n },\n \"primitiveType\": \"\"\n }\n}")
.asString();
const data = JSON.stringify({
description: '',
displayName: '',
isRequired: false,
name: '',
order: 0,
type: {
enumType: {
allowedValues: [
{
displayName: ''
}
]
},
primitiveType: ''
}
});
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/fields');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1beta1/:parent/fields',
headers: {'content-type': 'application/json'},
data: {
description: '',
displayName: '',
isRequired: false,
name: '',
order: 0,
type: {enumType: {allowedValues: [{displayName: ''}]}, primitiveType: ''}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1beta1/:parent/fields';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"description":"","displayName":"","isRequired":false,"name":"","order":0,"type":{"enumType":{"allowedValues":[{"displayName":""}]},"primitiveType":""}}'
};
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/fields',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "description": "",\n "displayName": "",\n "isRequired": false,\n "name": "",\n "order": 0,\n "type": {\n "enumType": {\n "allowedValues": [\n {\n "displayName": ""\n }\n ]\n },\n "primitiveType": ""\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 \"description\": \"\",\n \"displayName\": \"\",\n \"isRequired\": false,\n \"name\": \"\",\n \"order\": 0,\n \"type\": {\n \"enumType\": {\n \"allowedValues\": [\n {\n \"displayName\": \"\"\n }\n ]\n },\n \"primitiveType\": \"\"\n }\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1beta1/:parent/fields")
.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/fields',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
description: '',
displayName: '',
isRequired: false,
name: '',
order: 0,
type: {enumType: {allowedValues: [{displayName: ''}]}, primitiveType: ''}
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1beta1/:parent/fields',
headers: {'content-type': 'application/json'},
body: {
description: '',
displayName: '',
isRequired: false,
name: '',
order: 0,
type: {enumType: {allowedValues: [{displayName: ''}]}, primitiveType: ''}
},
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/fields');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
description: '',
displayName: '',
isRequired: false,
name: '',
order: 0,
type: {
enumType: {
allowedValues: [
{
displayName: ''
}
]
},
primitiveType: ''
}
});
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/fields',
headers: {'content-type': 'application/json'},
data: {
description: '',
displayName: '',
isRequired: false,
name: '',
order: 0,
type: {enumType: {allowedValues: [{displayName: ''}]}, primitiveType: ''}
}
};
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/fields';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"description":"","displayName":"","isRequired":false,"name":"","order":0,"type":{"enumType":{"allowedValues":[{"displayName":""}]},"primitiveType":""}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"description": @"",
@"displayName": @"",
@"isRequired": @NO,
@"name": @"",
@"order": @0,
@"type": @{ @"enumType": @{ @"allowedValues": @[ @{ @"displayName": @"" } ] }, @"primitiveType": @"" } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1beta1/:parent/fields"]
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/fields" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"description\": \"\",\n \"displayName\": \"\",\n \"isRequired\": false,\n \"name\": \"\",\n \"order\": 0,\n \"type\": {\n \"enumType\": {\n \"allowedValues\": [\n {\n \"displayName\": \"\"\n }\n ]\n },\n \"primitiveType\": \"\"\n }\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1beta1/:parent/fields",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'description' => '',
'displayName' => '',
'isRequired' => null,
'name' => '',
'order' => 0,
'type' => [
'enumType' => [
'allowedValues' => [
[
'displayName' => ''
]
]
],
'primitiveType' => ''
]
]),
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/fields', [
'body' => '{
"description": "",
"displayName": "",
"isRequired": false,
"name": "",
"order": 0,
"type": {
"enumType": {
"allowedValues": [
{
"displayName": ""
}
]
},
"primitiveType": ""
}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1beta1/:parent/fields');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'description' => '',
'displayName' => '',
'isRequired' => null,
'name' => '',
'order' => 0,
'type' => [
'enumType' => [
'allowedValues' => [
[
'displayName' => ''
]
]
],
'primitiveType' => ''
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'description' => '',
'displayName' => '',
'isRequired' => null,
'name' => '',
'order' => 0,
'type' => [
'enumType' => [
'allowedValues' => [
[
'displayName' => ''
]
]
],
'primitiveType' => ''
]
]));
$request->setRequestUrl('{{baseUrl}}/v1beta1/:parent/fields');
$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/fields' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"description": "",
"displayName": "",
"isRequired": false,
"name": "",
"order": 0,
"type": {
"enumType": {
"allowedValues": [
{
"displayName": ""
}
]
},
"primitiveType": ""
}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1beta1/:parent/fields' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"description": "",
"displayName": "",
"isRequired": false,
"name": "",
"order": 0,
"type": {
"enumType": {
"allowedValues": [
{
"displayName": ""
}
]
},
"primitiveType": ""
}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"description\": \"\",\n \"displayName\": \"\",\n \"isRequired\": false,\n \"name\": \"\",\n \"order\": 0,\n \"type\": {\n \"enumType\": {\n \"allowedValues\": [\n {\n \"displayName\": \"\"\n }\n ]\n },\n \"primitiveType\": \"\"\n }\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1beta1/:parent/fields", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1beta1/:parent/fields"
payload = {
"description": "",
"displayName": "",
"isRequired": False,
"name": "",
"order": 0,
"type": {
"enumType": { "allowedValues": [{ "displayName": "" }] },
"primitiveType": ""
}
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1beta1/:parent/fields"
payload <- "{\n \"description\": \"\",\n \"displayName\": \"\",\n \"isRequired\": false,\n \"name\": \"\",\n \"order\": 0,\n \"type\": {\n \"enumType\": {\n \"allowedValues\": [\n {\n \"displayName\": \"\"\n }\n ]\n },\n \"primitiveType\": \"\"\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/:parent/fields")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"description\": \"\",\n \"displayName\": \"\",\n \"isRequired\": false,\n \"name\": \"\",\n \"order\": 0,\n \"type\": {\n \"enumType\": {\n \"allowedValues\": [\n {\n \"displayName\": \"\"\n }\n ]\n },\n \"primitiveType\": \"\"\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/:parent/fields') do |req|
req.body = "{\n \"description\": \"\",\n \"displayName\": \"\",\n \"isRequired\": false,\n \"name\": \"\",\n \"order\": 0,\n \"type\": {\n \"enumType\": {\n \"allowedValues\": [\n {\n \"displayName\": \"\"\n }\n ]\n },\n \"primitiveType\": \"\"\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/:parent/fields";
let payload = json!({
"description": "",
"displayName": "",
"isRequired": false,
"name": "",
"order": 0,
"type": json!({
"enumType": json!({"allowedValues": (json!({"displayName": ""}))}),
"primitiveType": ""
})
});
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/fields \
--header 'content-type: application/json' \
--data '{
"description": "",
"displayName": "",
"isRequired": false,
"name": "",
"order": 0,
"type": {
"enumType": {
"allowedValues": [
{
"displayName": ""
}
]
},
"primitiveType": ""
}
}'
echo '{
"description": "",
"displayName": "",
"isRequired": false,
"name": "",
"order": 0,
"type": {
"enumType": {
"allowedValues": [
{
"displayName": ""
}
]
},
"primitiveType": ""
}
}' | \
http POST {{baseUrl}}/v1beta1/:parent/fields \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "description": "",\n "displayName": "",\n "isRequired": false,\n "name": "",\n "order": 0,\n "type": {\n "enumType": {\n "allowedValues": [\n {\n "displayName": ""\n }\n ]\n },\n "primitiveType": ""\n }\n}' \
--output-document \
- {{baseUrl}}/v1beta1/:parent/fields
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"description": "",
"displayName": "",
"isRequired": false,
"name": "",
"order": 0,
"type": [
"enumType": ["allowedValues": [["displayName": ""]]],
"primitiveType": ""
]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1beta1/:parent/fields")! 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
datacatalog.projects.locations.tagTemplates.fields.enumValues.rename
{{baseUrl}}/v1beta1/:name:rename
QUERY PARAMS
name
BODY json
{
"newEnumValueDisplayName": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1beta1/:name:rename");
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 \"newEnumValueDisplayName\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1beta1/:name:rename" {:content-type :json
:form-params {:newEnumValueDisplayName ""}})
require "http/client"
url = "{{baseUrl}}/v1beta1/:name:rename"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"newEnumValueDisplayName\": \"\"\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:rename"),
Content = new StringContent("{\n \"newEnumValueDisplayName\": \"\"\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:rename");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"newEnumValueDisplayName\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1beta1/:name:rename"
payload := strings.NewReader("{\n \"newEnumValueDisplayName\": \"\"\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:rename HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 35
{
"newEnumValueDisplayName": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1beta1/:name:rename")
.setHeader("content-type", "application/json")
.setBody("{\n \"newEnumValueDisplayName\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1beta1/:name:rename"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"newEnumValueDisplayName\": \"\"\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 \"newEnumValueDisplayName\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1beta1/:name:rename")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1beta1/:name:rename")
.header("content-type", "application/json")
.body("{\n \"newEnumValueDisplayName\": \"\"\n}")
.asString();
const data = JSON.stringify({
newEnumValueDisplayName: ''
});
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:rename');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1beta1/:name:rename',
headers: {'content-type': 'application/json'},
data: {newEnumValueDisplayName: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1beta1/:name:rename';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"newEnumValueDisplayName":""}'
};
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:rename',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "newEnumValueDisplayName": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"newEnumValueDisplayName\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1beta1/:name:rename")
.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:rename',
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({newEnumValueDisplayName: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1beta1/:name:rename',
headers: {'content-type': 'application/json'},
body: {newEnumValueDisplayName: ''},
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:rename');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
newEnumValueDisplayName: ''
});
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:rename',
headers: {'content-type': 'application/json'},
data: {newEnumValueDisplayName: ''}
};
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:rename';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"newEnumValueDisplayName":""}'
};
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 = @{ @"newEnumValueDisplayName": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1beta1/:name:rename"]
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:rename" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"newEnumValueDisplayName\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1beta1/:name:rename",
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([
'newEnumValueDisplayName' => ''
]),
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:rename', [
'body' => '{
"newEnumValueDisplayName": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1beta1/:name:rename');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'newEnumValueDisplayName' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'newEnumValueDisplayName' => ''
]));
$request->setRequestUrl('{{baseUrl}}/v1beta1/:name:rename');
$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:rename' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"newEnumValueDisplayName": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1beta1/:name:rename' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"newEnumValueDisplayName": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"newEnumValueDisplayName\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1beta1/:name:rename", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1beta1/:name:rename"
payload = { "newEnumValueDisplayName": "" }
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1beta1/:name:rename"
payload <- "{\n \"newEnumValueDisplayName\": \"\"\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:rename")
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 \"newEnumValueDisplayName\": \"\"\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:rename') do |req|
req.body = "{\n \"newEnumValueDisplayName\": \"\"\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:rename";
let payload = json!({"newEnumValueDisplayName": ""});
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:rename \
--header 'content-type: application/json' \
--data '{
"newEnumValueDisplayName": ""
}'
echo '{
"newEnumValueDisplayName": ""
}' | \
http POST {{baseUrl}}/v1beta1/:name:rename \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "newEnumValueDisplayName": ""\n}' \
--output-document \
- {{baseUrl}}/v1beta1/:name:rename
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["newEnumValueDisplayName": ""] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1beta1/:name:rename")! 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
datacatalog.projects.locations.taxonomies.create
{{baseUrl}}/v1beta1/:parent/taxonomies
QUERY PARAMS
parent
BODY json
{
"activatedPolicyTypes": [],
"description": "",
"displayName": "",
"name": "",
"policyTagCount": 0,
"service": {
"identity": "",
"name": ""
},
"taxonomyTimestamps": {
"createTime": "",
"expireTime": "",
"updateTime": ""
}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1beta1/:parent/taxonomies");
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 \"activatedPolicyTypes\": [],\n \"description\": \"\",\n \"displayName\": \"\",\n \"name\": \"\",\n \"policyTagCount\": 0,\n \"service\": {\n \"identity\": \"\",\n \"name\": \"\"\n },\n \"taxonomyTimestamps\": {\n \"createTime\": \"\",\n \"expireTime\": \"\",\n \"updateTime\": \"\"\n }\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1beta1/:parent/taxonomies" {:content-type :json
:form-params {:activatedPolicyTypes []
:description ""
:displayName ""
:name ""
:policyTagCount 0
:service {:identity ""
:name ""}
:taxonomyTimestamps {:createTime ""
:expireTime ""
:updateTime ""}}})
require "http/client"
url = "{{baseUrl}}/v1beta1/:parent/taxonomies"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"activatedPolicyTypes\": [],\n \"description\": \"\",\n \"displayName\": \"\",\n \"name\": \"\",\n \"policyTagCount\": 0,\n \"service\": {\n \"identity\": \"\",\n \"name\": \"\"\n },\n \"taxonomyTimestamps\": {\n \"createTime\": \"\",\n \"expireTime\": \"\",\n \"updateTime\": \"\"\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/:parent/taxonomies"),
Content = new StringContent("{\n \"activatedPolicyTypes\": [],\n \"description\": \"\",\n \"displayName\": \"\",\n \"name\": \"\",\n \"policyTagCount\": 0,\n \"service\": {\n \"identity\": \"\",\n \"name\": \"\"\n },\n \"taxonomyTimestamps\": {\n \"createTime\": \"\",\n \"expireTime\": \"\",\n \"updateTime\": \"\"\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/:parent/taxonomies");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"activatedPolicyTypes\": [],\n \"description\": \"\",\n \"displayName\": \"\",\n \"name\": \"\",\n \"policyTagCount\": 0,\n \"service\": {\n \"identity\": \"\",\n \"name\": \"\"\n },\n \"taxonomyTimestamps\": {\n \"createTime\": \"\",\n \"expireTime\": \"\",\n \"updateTime\": \"\"\n }\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1beta1/:parent/taxonomies"
payload := strings.NewReader("{\n \"activatedPolicyTypes\": [],\n \"description\": \"\",\n \"displayName\": \"\",\n \"name\": \"\",\n \"policyTagCount\": 0,\n \"service\": {\n \"identity\": \"\",\n \"name\": \"\"\n },\n \"taxonomyTimestamps\": {\n \"createTime\": \"\",\n \"expireTime\": \"\",\n \"updateTime\": \"\"\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/:parent/taxonomies HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 262
{
"activatedPolicyTypes": [],
"description": "",
"displayName": "",
"name": "",
"policyTagCount": 0,
"service": {
"identity": "",
"name": ""
},
"taxonomyTimestamps": {
"createTime": "",
"expireTime": "",
"updateTime": ""
}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1beta1/:parent/taxonomies")
.setHeader("content-type", "application/json")
.setBody("{\n \"activatedPolicyTypes\": [],\n \"description\": \"\",\n \"displayName\": \"\",\n \"name\": \"\",\n \"policyTagCount\": 0,\n \"service\": {\n \"identity\": \"\",\n \"name\": \"\"\n },\n \"taxonomyTimestamps\": {\n \"createTime\": \"\",\n \"expireTime\": \"\",\n \"updateTime\": \"\"\n }\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1beta1/:parent/taxonomies"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"activatedPolicyTypes\": [],\n \"description\": \"\",\n \"displayName\": \"\",\n \"name\": \"\",\n \"policyTagCount\": 0,\n \"service\": {\n \"identity\": \"\",\n \"name\": \"\"\n },\n \"taxonomyTimestamps\": {\n \"createTime\": \"\",\n \"expireTime\": \"\",\n \"updateTime\": \"\"\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 \"activatedPolicyTypes\": [],\n \"description\": \"\",\n \"displayName\": \"\",\n \"name\": \"\",\n \"policyTagCount\": 0,\n \"service\": {\n \"identity\": \"\",\n \"name\": \"\"\n },\n \"taxonomyTimestamps\": {\n \"createTime\": \"\",\n \"expireTime\": \"\",\n \"updateTime\": \"\"\n }\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1beta1/:parent/taxonomies")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1beta1/:parent/taxonomies")
.header("content-type", "application/json")
.body("{\n \"activatedPolicyTypes\": [],\n \"description\": \"\",\n \"displayName\": \"\",\n \"name\": \"\",\n \"policyTagCount\": 0,\n \"service\": {\n \"identity\": \"\",\n \"name\": \"\"\n },\n \"taxonomyTimestamps\": {\n \"createTime\": \"\",\n \"expireTime\": \"\",\n \"updateTime\": \"\"\n }\n}")
.asString();
const data = JSON.stringify({
activatedPolicyTypes: [],
description: '',
displayName: '',
name: '',
policyTagCount: 0,
service: {
identity: '',
name: ''
},
taxonomyTimestamps: {
createTime: '',
expireTime: '',
updateTime: ''
}
});
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/taxonomies');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1beta1/:parent/taxonomies',
headers: {'content-type': 'application/json'},
data: {
activatedPolicyTypes: [],
description: '',
displayName: '',
name: '',
policyTagCount: 0,
service: {identity: '', name: ''},
taxonomyTimestamps: {createTime: '', expireTime: '', updateTime: ''}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1beta1/:parent/taxonomies';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"activatedPolicyTypes":[],"description":"","displayName":"","name":"","policyTagCount":0,"service":{"identity":"","name":""},"taxonomyTimestamps":{"createTime":"","expireTime":"","updateTime":""}}'
};
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/taxonomies',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "activatedPolicyTypes": [],\n "description": "",\n "displayName": "",\n "name": "",\n "policyTagCount": 0,\n "service": {\n "identity": "",\n "name": ""\n },\n "taxonomyTimestamps": {\n "createTime": "",\n "expireTime": "",\n "updateTime": ""\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 \"activatedPolicyTypes\": [],\n \"description\": \"\",\n \"displayName\": \"\",\n \"name\": \"\",\n \"policyTagCount\": 0,\n \"service\": {\n \"identity\": \"\",\n \"name\": \"\"\n },\n \"taxonomyTimestamps\": {\n \"createTime\": \"\",\n \"expireTime\": \"\",\n \"updateTime\": \"\"\n }\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1beta1/:parent/taxonomies")
.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/taxonomies',
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({
activatedPolicyTypes: [],
description: '',
displayName: '',
name: '',
policyTagCount: 0,
service: {identity: '', name: ''},
taxonomyTimestamps: {createTime: '', expireTime: '', updateTime: ''}
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1beta1/:parent/taxonomies',
headers: {'content-type': 'application/json'},
body: {
activatedPolicyTypes: [],
description: '',
displayName: '',
name: '',
policyTagCount: 0,
service: {identity: '', name: ''},
taxonomyTimestamps: {createTime: '', expireTime: '', updateTime: ''}
},
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/taxonomies');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
activatedPolicyTypes: [],
description: '',
displayName: '',
name: '',
policyTagCount: 0,
service: {
identity: '',
name: ''
},
taxonomyTimestamps: {
createTime: '',
expireTime: '',
updateTime: ''
}
});
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/taxonomies',
headers: {'content-type': 'application/json'},
data: {
activatedPolicyTypes: [],
description: '',
displayName: '',
name: '',
policyTagCount: 0,
service: {identity: '', name: ''},
taxonomyTimestamps: {createTime: '', expireTime: '', updateTime: ''}
}
};
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/taxonomies';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"activatedPolicyTypes":[],"description":"","displayName":"","name":"","policyTagCount":0,"service":{"identity":"","name":""},"taxonomyTimestamps":{"createTime":"","expireTime":"","updateTime":""}}'
};
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 = @{ @"activatedPolicyTypes": @[ ],
@"description": @"",
@"displayName": @"",
@"name": @"",
@"policyTagCount": @0,
@"service": @{ @"identity": @"", @"name": @"" },
@"taxonomyTimestamps": @{ @"createTime": @"", @"expireTime": @"", @"updateTime": @"" } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1beta1/:parent/taxonomies"]
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/taxonomies" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"activatedPolicyTypes\": [],\n \"description\": \"\",\n \"displayName\": \"\",\n \"name\": \"\",\n \"policyTagCount\": 0,\n \"service\": {\n \"identity\": \"\",\n \"name\": \"\"\n },\n \"taxonomyTimestamps\": {\n \"createTime\": \"\",\n \"expireTime\": \"\",\n \"updateTime\": \"\"\n }\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1beta1/:parent/taxonomies",
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([
'activatedPolicyTypes' => [
],
'description' => '',
'displayName' => '',
'name' => '',
'policyTagCount' => 0,
'service' => [
'identity' => '',
'name' => ''
],
'taxonomyTimestamps' => [
'createTime' => '',
'expireTime' => '',
'updateTime' => ''
]
]),
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/taxonomies', [
'body' => '{
"activatedPolicyTypes": [],
"description": "",
"displayName": "",
"name": "",
"policyTagCount": 0,
"service": {
"identity": "",
"name": ""
},
"taxonomyTimestamps": {
"createTime": "",
"expireTime": "",
"updateTime": ""
}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1beta1/:parent/taxonomies');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'activatedPolicyTypes' => [
],
'description' => '',
'displayName' => '',
'name' => '',
'policyTagCount' => 0,
'service' => [
'identity' => '',
'name' => ''
],
'taxonomyTimestamps' => [
'createTime' => '',
'expireTime' => '',
'updateTime' => ''
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'activatedPolicyTypes' => [
],
'description' => '',
'displayName' => '',
'name' => '',
'policyTagCount' => 0,
'service' => [
'identity' => '',
'name' => ''
],
'taxonomyTimestamps' => [
'createTime' => '',
'expireTime' => '',
'updateTime' => ''
]
]));
$request->setRequestUrl('{{baseUrl}}/v1beta1/:parent/taxonomies');
$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/taxonomies' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"activatedPolicyTypes": [],
"description": "",
"displayName": "",
"name": "",
"policyTagCount": 0,
"service": {
"identity": "",
"name": ""
},
"taxonomyTimestamps": {
"createTime": "",
"expireTime": "",
"updateTime": ""
}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1beta1/:parent/taxonomies' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"activatedPolicyTypes": [],
"description": "",
"displayName": "",
"name": "",
"policyTagCount": 0,
"service": {
"identity": "",
"name": ""
},
"taxonomyTimestamps": {
"createTime": "",
"expireTime": "",
"updateTime": ""
}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"activatedPolicyTypes\": [],\n \"description\": \"\",\n \"displayName\": \"\",\n \"name\": \"\",\n \"policyTagCount\": 0,\n \"service\": {\n \"identity\": \"\",\n \"name\": \"\"\n },\n \"taxonomyTimestamps\": {\n \"createTime\": \"\",\n \"expireTime\": \"\",\n \"updateTime\": \"\"\n }\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1beta1/:parent/taxonomies", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1beta1/:parent/taxonomies"
payload = {
"activatedPolicyTypes": [],
"description": "",
"displayName": "",
"name": "",
"policyTagCount": 0,
"service": {
"identity": "",
"name": ""
},
"taxonomyTimestamps": {
"createTime": "",
"expireTime": "",
"updateTime": ""
}
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1beta1/:parent/taxonomies"
payload <- "{\n \"activatedPolicyTypes\": [],\n \"description\": \"\",\n \"displayName\": \"\",\n \"name\": \"\",\n \"policyTagCount\": 0,\n \"service\": {\n \"identity\": \"\",\n \"name\": \"\"\n },\n \"taxonomyTimestamps\": {\n \"createTime\": \"\",\n \"expireTime\": \"\",\n \"updateTime\": \"\"\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/:parent/taxonomies")
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 \"activatedPolicyTypes\": [],\n \"description\": \"\",\n \"displayName\": \"\",\n \"name\": \"\",\n \"policyTagCount\": 0,\n \"service\": {\n \"identity\": \"\",\n \"name\": \"\"\n },\n \"taxonomyTimestamps\": {\n \"createTime\": \"\",\n \"expireTime\": \"\",\n \"updateTime\": \"\"\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/:parent/taxonomies') do |req|
req.body = "{\n \"activatedPolicyTypes\": [],\n \"description\": \"\",\n \"displayName\": \"\",\n \"name\": \"\",\n \"policyTagCount\": 0,\n \"service\": {\n \"identity\": \"\",\n \"name\": \"\"\n },\n \"taxonomyTimestamps\": {\n \"createTime\": \"\",\n \"expireTime\": \"\",\n \"updateTime\": \"\"\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/:parent/taxonomies";
let payload = json!({
"activatedPolicyTypes": (),
"description": "",
"displayName": "",
"name": "",
"policyTagCount": 0,
"service": json!({
"identity": "",
"name": ""
}),
"taxonomyTimestamps": json!({
"createTime": "",
"expireTime": "",
"updateTime": ""
})
});
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/taxonomies \
--header 'content-type: application/json' \
--data '{
"activatedPolicyTypes": [],
"description": "",
"displayName": "",
"name": "",
"policyTagCount": 0,
"service": {
"identity": "",
"name": ""
},
"taxonomyTimestamps": {
"createTime": "",
"expireTime": "",
"updateTime": ""
}
}'
echo '{
"activatedPolicyTypes": [],
"description": "",
"displayName": "",
"name": "",
"policyTagCount": 0,
"service": {
"identity": "",
"name": ""
},
"taxonomyTimestamps": {
"createTime": "",
"expireTime": "",
"updateTime": ""
}
}' | \
http POST {{baseUrl}}/v1beta1/:parent/taxonomies \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "activatedPolicyTypes": [],\n "description": "",\n "displayName": "",\n "name": "",\n "policyTagCount": 0,\n "service": {\n "identity": "",\n "name": ""\n },\n "taxonomyTimestamps": {\n "createTime": "",\n "expireTime": "",\n "updateTime": ""\n }\n}' \
--output-document \
- {{baseUrl}}/v1beta1/:parent/taxonomies
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"activatedPolicyTypes": [],
"description": "",
"displayName": "",
"name": "",
"policyTagCount": 0,
"service": [
"identity": "",
"name": ""
],
"taxonomyTimestamps": [
"createTime": "",
"expireTime": "",
"updateTime": ""
]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1beta1/:parent/taxonomies")! 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
datacatalog.projects.locations.taxonomies.export
{{baseUrl}}/v1beta1/:parent/taxonomies:export
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/taxonomies:export");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v1beta1/:parent/taxonomies:export")
require "http/client"
url = "{{baseUrl}}/v1beta1/:parent/taxonomies:export"
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/taxonomies:export"),
};
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/taxonomies:export");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1beta1/:parent/taxonomies:export"
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/taxonomies:export HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1beta1/:parent/taxonomies:export")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1beta1/:parent/taxonomies:export"))
.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/taxonomies:export")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1beta1/:parent/taxonomies:export")
.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/taxonomies:export');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/v1beta1/:parent/taxonomies:export'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1beta1/:parent/taxonomies:export';
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/taxonomies:export',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1beta1/:parent/taxonomies:export")
.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/taxonomies:export',
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/taxonomies:export'
};
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/taxonomies:export');
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/taxonomies:export'
};
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/taxonomies:export';
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/taxonomies:export"]
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/taxonomies:export" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1beta1/:parent/taxonomies:export",
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/taxonomies:export');
echo $response->getBody();
setUrl('{{baseUrl}}/v1beta1/:parent/taxonomies:export');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1beta1/:parent/taxonomies:export');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1beta1/:parent/taxonomies:export' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1beta1/:parent/taxonomies:export' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v1beta1/:parent/taxonomies:export")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1beta1/:parent/taxonomies:export"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1beta1/:parent/taxonomies:export"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1beta1/:parent/taxonomies:export")
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/taxonomies:export') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1beta1/:parent/taxonomies:export";
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/taxonomies:export
http GET {{baseUrl}}/v1beta1/:parent/taxonomies:export
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v1beta1/:parent/taxonomies:export
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1beta1/:parent/taxonomies:export")! 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
datacatalog.projects.locations.taxonomies.import
{{baseUrl}}/v1beta1/:parent/taxonomies:import
QUERY PARAMS
parent
BODY json
{
"inlineSource": {
"taxonomies": [
{
"activatedPolicyTypes": [],
"description": "",
"displayName": "",
"policyTags": [
{
"childPolicyTags": [],
"description": "",
"displayName": "",
"policyTag": ""
}
]
}
]
}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1beta1/:parent/taxonomies:import");
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 \"inlineSource\": {\n \"taxonomies\": [\n {\n \"activatedPolicyTypes\": [],\n \"description\": \"\",\n \"displayName\": \"\",\n \"policyTags\": [\n {\n \"childPolicyTags\": [],\n \"description\": \"\",\n \"displayName\": \"\",\n \"policyTag\": \"\"\n }\n ]\n }\n ]\n }\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1beta1/:parent/taxonomies:import" {:content-type :json
:form-params {:inlineSource {:taxonomies [{:activatedPolicyTypes []
:description ""
:displayName ""
:policyTags [{:childPolicyTags []
:description ""
:displayName ""
:policyTag ""}]}]}}})
require "http/client"
url = "{{baseUrl}}/v1beta1/:parent/taxonomies:import"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"inlineSource\": {\n \"taxonomies\": [\n {\n \"activatedPolicyTypes\": [],\n \"description\": \"\",\n \"displayName\": \"\",\n \"policyTags\": [\n {\n \"childPolicyTags\": [],\n \"description\": \"\",\n \"displayName\": \"\",\n \"policyTag\": \"\"\n }\n ]\n }\n ]\n }\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/v1beta1/:parent/taxonomies:import"),
Content = new StringContent("{\n \"inlineSource\": {\n \"taxonomies\": [\n {\n \"activatedPolicyTypes\": [],\n \"description\": \"\",\n \"displayName\": \"\",\n \"policyTags\": [\n {\n \"childPolicyTags\": [],\n \"description\": \"\",\n \"displayName\": \"\",\n \"policyTag\": \"\"\n }\n ]\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/:parent/taxonomies:import");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"inlineSource\": {\n \"taxonomies\": [\n {\n \"activatedPolicyTypes\": [],\n \"description\": \"\",\n \"displayName\": \"\",\n \"policyTags\": [\n {\n \"childPolicyTags\": [],\n \"description\": \"\",\n \"displayName\": \"\",\n \"policyTag\": \"\"\n }\n ]\n }\n ]\n }\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1beta1/:parent/taxonomies:import"
payload := strings.NewReader("{\n \"inlineSource\": {\n \"taxonomies\": [\n {\n \"activatedPolicyTypes\": [],\n \"description\": \"\",\n \"displayName\": \"\",\n \"policyTags\": [\n {\n \"childPolicyTags\": [],\n \"description\": \"\",\n \"displayName\": \"\",\n \"policyTag\": \"\"\n }\n ]\n }\n ]\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/v1beta1/:parent/taxonomies:import HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 342
{
"inlineSource": {
"taxonomies": [
{
"activatedPolicyTypes": [],
"description": "",
"displayName": "",
"policyTags": [
{
"childPolicyTags": [],
"description": "",
"displayName": "",
"policyTag": ""
}
]
}
]
}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1beta1/:parent/taxonomies:import")
.setHeader("content-type", "application/json")
.setBody("{\n \"inlineSource\": {\n \"taxonomies\": [\n {\n \"activatedPolicyTypes\": [],\n \"description\": \"\",\n \"displayName\": \"\",\n \"policyTags\": [\n {\n \"childPolicyTags\": [],\n \"description\": \"\",\n \"displayName\": \"\",\n \"policyTag\": \"\"\n }\n ]\n }\n ]\n }\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1beta1/:parent/taxonomies:import"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"inlineSource\": {\n \"taxonomies\": [\n {\n \"activatedPolicyTypes\": [],\n \"description\": \"\",\n \"displayName\": \"\",\n \"policyTags\": [\n {\n \"childPolicyTags\": [],\n \"description\": \"\",\n \"displayName\": \"\",\n \"policyTag\": \"\"\n }\n ]\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 \"inlineSource\": {\n \"taxonomies\": [\n {\n \"activatedPolicyTypes\": [],\n \"description\": \"\",\n \"displayName\": \"\",\n \"policyTags\": [\n {\n \"childPolicyTags\": [],\n \"description\": \"\",\n \"displayName\": \"\",\n \"policyTag\": \"\"\n }\n ]\n }\n ]\n }\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1beta1/:parent/taxonomies:import")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1beta1/:parent/taxonomies:import")
.header("content-type", "application/json")
.body("{\n \"inlineSource\": {\n \"taxonomies\": [\n {\n \"activatedPolicyTypes\": [],\n \"description\": \"\",\n \"displayName\": \"\",\n \"policyTags\": [\n {\n \"childPolicyTags\": [],\n \"description\": \"\",\n \"displayName\": \"\",\n \"policyTag\": \"\"\n }\n ]\n }\n ]\n }\n}")
.asString();
const data = JSON.stringify({
inlineSource: {
taxonomies: [
{
activatedPolicyTypes: [],
description: '',
displayName: '',
policyTags: [
{
childPolicyTags: [],
description: '',
displayName: '',
policyTag: ''
}
]
}
]
}
});
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/taxonomies:import');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1beta1/:parent/taxonomies:import',
headers: {'content-type': 'application/json'},
data: {
inlineSource: {
taxonomies: [
{
activatedPolicyTypes: [],
description: '',
displayName: '',
policyTags: [{childPolicyTags: [], description: '', displayName: '', policyTag: ''}]
}
]
}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1beta1/:parent/taxonomies:import';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"inlineSource":{"taxonomies":[{"activatedPolicyTypes":[],"description":"","displayName":"","policyTags":[{"childPolicyTags":[],"description":"","displayName":"","policyTag":""}]}]}}'
};
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/taxonomies:import',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "inlineSource": {\n "taxonomies": [\n {\n "activatedPolicyTypes": [],\n "description": "",\n "displayName": "",\n "policyTags": [\n {\n "childPolicyTags": [],\n "description": "",\n "displayName": "",\n "policyTag": ""\n }\n ]\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 \"inlineSource\": {\n \"taxonomies\": [\n {\n \"activatedPolicyTypes\": [],\n \"description\": \"\",\n \"displayName\": \"\",\n \"policyTags\": [\n {\n \"childPolicyTags\": [],\n \"description\": \"\",\n \"displayName\": \"\",\n \"policyTag\": \"\"\n }\n ]\n }\n ]\n }\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1beta1/:parent/taxonomies:import")
.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/taxonomies:import',
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({
inlineSource: {
taxonomies: [
{
activatedPolicyTypes: [],
description: '',
displayName: '',
policyTags: [{childPolicyTags: [], description: '', displayName: '', policyTag: ''}]
}
]
}
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1beta1/:parent/taxonomies:import',
headers: {'content-type': 'application/json'},
body: {
inlineSource: {
taxonomies: [
{
activatedPolicyTypes: [],
description: '',
displayName: '',
policyTags: [{childPolicyTags: [], description: '', displayName: '', policyTag: ''}]
}
]
}
},
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/taxonomies:import');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
inlineSource: {
taxonomies: [
{
activatedPolicyTypes: [],
description: '',
displayName: '',
policyTags: [
{
childPolicyTags: [],
description: '',
displayName: '',
policyTag: ''
}
]
}
]
}
});
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/taxonomies:import',
headers: {'content-type': 'application/json'},
data: {
inlineSource: {
taxonomies: [
{
activatedPolicyTypes: [],
description: '',
displayName: '',
policyTags: [{childPolicyTags: [], description: '', displayName: '', policyTag: ''}]
}
]
}
}
};
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/taxonomies:import';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"inlineSource":{"taxonomies":[{"activatedPolicyTypes":[],"description":"","displayName":"","policyTags":[{"childPolicyTags":[],"description":"","displayName":"","policyTag":""}]}]}}'
};
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 = @{ @"inlineSource": @{ @"taxonomies": @[ @{ @"activatedPolicyTypes": @[ ], @"description": @"", @"displayName": @"", @"policyTags": @[ @{ @"childPolicyTags": @[ ], @"description": @"", @"displayName": @"", @"policyTag": @"" } ] } ] } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1beta1/:parent/taxonomies:import"]
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/taxonomies:import" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"inlineSource\": {\n \"taxonomies\": [\n {\n \"activatedPolicyTypes\": [],\n \"description\": \"\",\n \"displayName\": \"\",\n \"policyTags\": [\n {\n \"childPolicyTags\": [],\n \"description\": \"\",\n \"displayName\": \"\",\n \"policyTag\": \"\"\n }\n ]\n }\n ]\n }\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1beta1/:parent/taxonomies:import",
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([
'inlineSource' => [
'taxonomies' => [
[
'activatedPolicyTypes' => [
],
'description' => '',
'displayName' => '',
'policyTags' => [
[
'childPolicyTags' => [
],
'description' => '',
'displayName' => '',
'policyTag' => ''
]
]
]
]
]
]),
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/taxonomies:import', [
'body' => '{
"inlineSource": {
"taxonomies": [
{
"activatedPolicyTypes": [],
"description": "",
"displayName": "",
"policyTags": [
{
"childPolicyTags": [],
"description": "",
"displayName": "",
"policyTag": ""
}
]
}
]
}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1beta1/:parent/taxonomies:import');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'inlineSource' => [
'taxonomies' => [
[
'activatedPolicyTypes' => [
],
'description' => '',
'displayName' => '',
'policyTags' => [
[
'childPolicyTags' => [
],
'description' => '',
'displayName' => '',
'policyTag' => ''
]
]
]
]
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'inlineSource' => [
'taxonomies' => [
[
'activatedPolicyTypes' => [
],
'description' => '',
'displayName' => '',
'policyTags' => [
[
'childPolicyTags' => [
],
'description' => '',
'displayName' => '',
'policyTag' => ''
]
]
]
]
]
]));
$request->setRequestUrl('{{baseUrl}}/v1beta1/:parent/taxonomies:import');
$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/taxonomies:import' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"inlineSource": {
"taxonomies": [
{
"activatedPolicyTypes": [],
"description": "",
"displayName": "",
"policyTags": [
{
"childPolicyTags": [],
"description": "",
"displayName": "",
"policyTag": ""
}
]
}
]
}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1beta1/:parent/taxonomies:import' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"inlineSource": {
"taxonomies": [
{
"activatedPolicyTypes": [],
"description": "",
"displayName": "",
"policyTags": [
{
"childPolicyTags": [],
"description": "",
"displayName": "",
"policyTag": ""
}
]
}
]
}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"inlineSource\": {\n \"taxonomies\": [\n {\n \"activatedPolicyTypes\": [],\n \"description\": \"\",\n \"displayName\": \"\",\n \"policyTags\": [\n {\n \"childPolicyTags\": [],\n \"description\": \"\",\n \"displayName\": \"\",\n \"policyTag\": \"\"\n }\n ]\n }\n ]\n }\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1beta1/:parent/taxonomies:import", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1beta1/:parent/taxonomies:import"
payload = { "inlineSource": { "taxonomies": [
{
"activatedPolicyTypes": [],
"description": "",
"displayName": "",
"policyTags": [
{
"childPolicyTags": [],
"description": "",
"displayName": "",
"policyTag": ""
}
]
}
] } }
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1beta1/:parent/taxonomies:import"
payload <- "{\n \"inlineSource\": {\n \"taxonomies\": [\n {\n \"activatedPolicyTypes\": [],\n \"description\": \"\",\n \"displayName\": \"\",\n \"policyTags\": [\n {\n \"childPolicyTags\": [],\n \"description\": \"\",\n \"displayName\": \"\",\n \"policyTag\": \"\"\n }\n ]\n }\n ]\n }\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1beta1/:parent/taxonomies:import")
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 \"inlineSource\": {\n \"taxonomies\": [\n {\n \"activatedPolicyTypes\": [],\n \"description\": \"\",\n \"displayName\": \"\",\n \"policyTags\": [\n {\n \"childPolicyTags\": [],\n \"description\": \"\",\n \"displayName\": \"\",\n \"policyTag\": \"\"\n }\n ]\n }\n ]\n }\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/v1beta1/:parent/taxonomies:import') do |req|
req.body = "{\n \"inlineSource\": {\n \"taxonomies\": [\n {\n \"activatedPolicyTypes\": [],\n \"description\": \"\",\n \"displayName\": \"\",\n \"policyTags\": [\n {\n \"childPolicyTags\": [],\n \"description\": \"\",\n \"displayName\": \"\",\n \"policyTag\": \"\"\n }\n ]\n }\n ]\n }\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1beta1/:parent/taxonomies:import";
let payload = json!({"inlineSource": json!({"taxonomies": (
json!({
"activatedPolicyTypes": (),
"description": "",
"displayName": "",
"policyTags": (
json!({
"childPolicyTags": (),
"description": "",
"displayName": "",
"policyTag": ""
})
)
})
)})});
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/taxonomies:import \
--header 'content-type: application/json' \
--data '{
"inlineSource": {
"taxonomies": [
{
"activatedPolicyTypes": [],
"description": "",
"displayName": "",
"policyTags": [
{
"childPolicyTags": [],
"description": "",
"displayName": "",
"policyTag": ""
}
]
}
]
}
}'
echo '{
"inlineSource": {
"taxonomies": [
{
"activatedPolicyTypes": [],
"description": "",
"displayName": "",
"policyTags": [
{
"childPolicyTags": [],
"description": "",
"displayName": "",
"policyTag": ""
}
]
}
]
}
}' | \
http POST {{baseUrl}}/v1beta1/:parent/taxonomies:import \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "inlineSource": {\n "taxonomies": [\n {\n "activatedPolicyTypes": [],\n "description": "",\n "displayName": "",\n "policyTags": [\n {\n "childPolicyTags": [],\n "description": "",\n "displayName": "",\n "policyTag": ""\n }\n ]\n }\n ]\n }\n}' \
--output-document \
- {{baseUrl}}/v1beta1/:parent/taxonomies:import
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["inlineSource": ["taxonomies": [
[
"activatedPolicyTypes": [],
"description": "",
"displayName": "",
"policyTags": [
[
"childPolicyTags": [],
"description": "",
"displayName": "",
"policyTag": ""
]
]
]
]]] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1beta1/:parent/taxonomies:import")! 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
datacatalog.projects.locations.taxonomies.list
{{baseUrl}}/v1beta1/:parent/taxonomies
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/taxonomies");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v1beta1/:parent/taxonomies")
require "http/client"
url = "{{baseUrl}}/v1beta1/:parent/taxonomies"
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/taxonomies"),
};
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/taxonomies");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1beta1/:parent/taxonomies"
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/taxonomies HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1beta1/:parent/taxonomies")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1beta1/:parent/taxonomies"))
.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/taxonomies")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1beta1/:parent/taxonomies")
.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/taxonomies');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/v1beta1/:parent/taxonomies'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1beta1/:parent/taxonomies';
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/taxonomies',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1beta1/:parent/taxonomies")
.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/taxonomies',
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/taxonomies'};
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/taxonomies');
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/taxonomies'};
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/taxonomies';
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/taxonomies"]
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/taxonomies" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1beta1/:parent/taxonomies",
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/taxonomies');
echo $response->getBody();
setUrl('{{baseUrl}}/v1beta1/:parent/taxonomies');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1beta1/:parent/taxonomies');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1beta1/:parent/taxonomies' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1beta1/:parent/taxonomies' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v1beta1/:parent/taxonomies")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1beta1/:parent/taxonomies"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1beta1/:parent/taxonomies"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1beta1/:parent/taxonomies")
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/taxonomies') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1beta1/:parent/taxonomies";
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/taxonomies
http GET {{baseUrl}}/v1beta1/:parent/taxonomies
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v1beta1/:parent/taxonomies
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1beta1/:parent/taxonomies")! 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
datacatalog.projects.locations.taxonomies.policyTags.create
{{baseUrl}}/v1beta1/:parent/policyTags
QUERY PARAMS
parent
BODY json
{
"childPolicyTags": [],
"description": "",
"displayName": "",
"name": "",
"parentPolicyTag": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1beta1/:parent/policyTags");
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 \"childPolicyTags\": [],\n \"description\": \"\",\n \"displayName\": \"\",\n \"name\": \"\",\n \"parentPolicyTag\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1beta1/:parent/policyTags" {:content-type :json
:form-params {:childPolicyTags []
:description ""
:displayName ""
:name ""
:parentPolicyTag ""}})
require "http/client"
url = "{{baseUrl}}/v1beta1/:parent/policyTags"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"childPolicyTags\": [],\n \"description\": \"\",\n \"displayName\": \"\",\n \"name\": \"\",\n \"parentPolicyTag\": \"\"\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/policyTags"),
Content = new StringContent("{\n \"childPolicyTags\": [],\n \"description\": \"\",\n \"displayName\": \"\",\n \"name\": \"\",\n \"parentPolicyTag\": \"\"\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/policyTags");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"childPolicyTags\": [],\n \"description\": \"\",\n \"displayName\": \"\",\n \"name\": \"\",\n \"parentPolicyTag\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1beta1/:parent/policyTags"
payload := strings.NewReader("{\n \"childPolicyTags\": [],\n \"description\": \"\",\n \"displayName\": \"\",\n \"name\": \"\",\n \"parentPolicyTag\": \"\"\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/policyTags HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 108
{
"childPolicyTags": [],
"description": "",
"displayName": "",
"name": "",
"parentPolicyTag": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1beta1/:parent/policyTags")
.setHeader("content-type", "application/json")
.setBody("{\n \"childPolicyTags\": [],\n \"description\": \"\",\n \"displayName\": \"\",\n \"name\": \"\",\n \"parentPolicyTag\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1beta1/:parent/policyTags"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"childPolicyTags\": [],\n \"description\": \"\",\n \"displayName\": \"\",\n \"name\": \"\",\n \"parentPolicyTag\": \"\"\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 \"childPolicyTags\": [],\n \"description\": \"\",\n \"displayName\": \"\",\n \"name\": \"\",\n \"parentPolicyTag\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1beta1/:parent/policyTags")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1beta1/:parent/policyTags")
.header("content-type", "application/json")
.body("{\n \"childPolicyTags\": [],\n \"description\": \"\",\n \"displayName\": \"\",\n \"name\": \"\",\n \"parentPolicyTag\": \"\"\n}")
.asString();
const data = JSON.stringify({
childPolicyTags: [],
description: '',
displayName: '',
name: '',
parentPolicyTag: ''
});
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/policyTags');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1beta1/:parent/policyTags',
headers: {'content-type': 'application/json'},
data: {
childPolicyTags: [],
description: '',
displayName: '',
name: '',
parentPolicyTag: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1beta1/:parent/policyTags';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"childPolicyTags":[],"description":"","displayName":"","name":"","parentPolicyTag":""}'
};
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/policyTags',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "childPolicyTags": [],\n "description": "",\n "displayName": "",\n "name": "",\n "parentPolicyTag": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"childPolicyTags\": [],\n \"description\": \"\",\n \"displayName\": \"\",\n \"name\": \"\",\n \"parentPolicyTag\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1beta1/:parent/policyTags")
.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/policyTags',
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({
childPolicyTags: [],
description: '',
displayName: '',
name: '',
parentPolicyTag: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1beta1/:parent/policyTags',
headers: {'content-type': 'application/json'},
body: {
childPolicyTags: [],
description: '',
displayName: '',
name: '',
parentPolicyTag: ''
},
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/policyTags');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
childPolicyTags: [],
description: '',
displayName: '',
name: '',
parentPolicyTag: ''
});
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/policyTags',
headers: {'content-type': 'application/json'},
data: {
childPolicyTags: [],
description: '',
displayName: '',
name: '',
parentPolicyTag: ''
}
};
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/policyTags';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"childPolicyTags":[],"description":"","displayName":"","name":"","parentPolicyTag":""}'
};
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 = @{ @"childPolicyTags": @[ ],
@"description": @"",
@"displayName": @"",
@"name": @"",
@"parentPolicyTag": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1beta1/:parent/policyTags"]
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/policyTags" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"childPolicyTags\": [],\n \"description\": \"\",\n \"displayName\": \"\",\n \"name\": \"\",\n \"parentPolicyTag\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1beta1/:parent/policyTags",
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([
'childPolicyTags' => [
],
'description' => '',
'displayName' => '',
'name' => '',
'parentPolicyTag' => ''
]),
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/policyTags', [
'body' => '{
"childPolicyTags": [],
"description": "",
"displayName": "",
"name": "",
"parentPolicyTag": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1beta1/:parent/policyTags');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'childPolicyTags' => [
],
'description' => '',
'displayName' => '',
'name' => '',
'parentPolicyTag' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'childPolicyTags' => [
],
'description' => '',
'displayName' => '',
'name' => '',
'parentPolicyTag' => ''
]));
$request->setRequestUrl('{{baseUrl}}/v1beta1/:parent/policyTags');
$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/policyTags' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"childPolicyTags": [],
"description": "",
"displayName": "",
"name": "",
"parentPolicyTag": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1beta1/:parent/policyTags' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"childPolicyTags": [],
"description": "",
"displayName": "",
"name": "",
"parentPolicyTag": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"childPolicyTags\": [],\n \"description\": \"\",\n \"displayName\": \"\",\n \"name\": \"\",\n \"parentPolicyTag\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1beta1/:parent/policyTags", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1beta1/:parent/policyTags"
payload = {
"childPolicyTags": [],
"description": "",
"displayName": "",
"name": "",
"parentPolicyTag": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1beta1/:parent/policyTags"
payload <- "{\n \"childPolicyTags\": [],\n \"description\": \"\",\n \"displayName\": \"\",\n \"name\": \"\",\n \"parentPolicyTag\": \"\"\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/policyTags")
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 \"childPolicyTags\": [],\n \"description\": \"\",\n \"displayName\": \"\",\n \"name\": \"\",\n \"parentPolicyTag\": \"\"\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/policyTags') do |req|
req.body = "{\n \"childPolicyTags\": [],\n \"description\": \"\",\n \"displayName\": \"\",\n \"name\": \"\",\n \"parentPolicyTag\": \"\"\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/policyTags";
let payload = json!({
"childPolicyTags": (),
"description": "",
"displayName": "",
"name": "",
"parentPolicyTag": ""
});
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/policyTags \
--header 'content-type: application/json' \
--data '{
"childPolicyTags": [],
"description": "",
"displayName": "",
"name": "",
"parentPolicyTag": ""
}'
echo '{
"childPolicyTags": [],
"description": "",
"displayName": "",
"name": "",
"parentPolicyTag": ""
}' | \
http POST {{baseUrl}}/v1beta1/:parent/policyTags \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "childPolicyTags": [],\n "description": "",\n "displayName": "",\n "name": "",\n "parentPolicyTag": ""\n}' \
--output-document \
- {{baseUrl}}/v1beta1/:parent/policyTags
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"childPolicyTags": [],
"description": "",
"displayName": "",
"name": "",
"parentPolicyTag": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1beta1/:parent/policyTags")! 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
datacatalog.projects.locations.taxonomies.policyTags.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
datacatalog.projects.locations.taxonomies.policyTags.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()
POST
datacatalog.projects.locations.taxonomies.policyTags.getIamPolicy
{{baseUrl}}/v1beta1/:resource:getIamPolicy
QUERY PARAMS
resource
BODY json
{
"options": {
"requestedPolicyVersion": 0
}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1beta1/:resource:getIamPolicy");
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 \"options\": {\n \"requestedPolicyVersion\": 0\n }\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1beta1/:resource:getIamPolicy" {:content-type :json
:form-params {:options {:requestedPolicyVersion 0}}})
require "http/client"
url = "{{baseUrl}}/v1beta1/:resource:getIamPolicy"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"options\": {\n \"requestedPolicyVersion\": 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:getIamPolicy"),
Content = new StringContent("{\n \"options\": {\n \"requestedPolicyVersion\": 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:getIamPolicy");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"options\": {\n \"requestedPolicyVersion\": 0\n }\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1beta1/:resource:getIamPolicy"
payload := strings.NewReader("{\n \"options\": {\n \"requestedPolicyVersion\": 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:getIamPolicy HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 54
{
"options": {
"requestedPolicyVersion": 0
}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1beta1/:resource:getIamPolicy")
.setHeader("content-type", "application/json")
.setBody("{\n \"options\": {\n \"requestedPolicyVersion\": 0\n }\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1beta1/:resource:getIamPolicy"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"options\": {\n \"requestedPolicyVersion\": 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 \"options\": {\n \"requestedPolicyVersion\": 0\n }\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1beta1/:resource:getIamPolicy")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1beta1/:resource:getIamPolicy")
.header("content-type", "application/json")
.body("{\n \"options\": {\n \"requestedPolicyVersion\": 0\n }\n}")
.asString();
const data = JSON.stringify({
options: {
requestedPolicyVersion: 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:getIamPolicy');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1beta1/:resource:getIamPolicy',
headers: {'content-type': 'application/json'},
data: {options: {requestedPolicyVersion: 0}}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1beta1/:resource:getIamPolicy';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"options":{"requestedPolicyVersion":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:getIamPolicy',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "options": {\n "requestedPolicyVersion": 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 \"options\": {\n \"requestedPolicyVersion\": 0\n }\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1beta1/:resource:getIamPolicy")
.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:getIamPolicy',
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({options: {requestedPolicyVersion: 0}}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1beta1/:resource:getIamPolicy',
headers: {'content-type': 'application/json'},
body: {options: {requestedPolicyVersion: 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:getIamPolicy');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
options: {
requestedPolicyVersion: 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:getIamPolicy',
headers: {'content-type': 'application/json'},
data: {options: {requestedPolicyVersion: 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:getIamPolicy';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"options":{"requestedPolicyVersion":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 = @{ @"options": @{ @"requestedPolicyVersion": @0 } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1beta1/:resource:getIamPolicy"]
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:getIamPolicy" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"options\": {\n \"requestedPolicyVersion\": 0\n }\n}" in
Client.call ~headers ~body `POST 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 => "POST",
CURLOPT_POSTFIELDS => json_encode([
'options' => [
'requestedPolicyVersion' => 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:getIamPolicy', [
'body' => '{
"options": {
"requestedPolicyVersion": 0
}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1beta1/:resource:getIamPolicy');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'options' => [
'requestedPolicyVersion' => 0
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'options' => [
'requestedPolicyVersion' => 0
]
]));
$request->setRequestUrl('{{baseUrl}}/v1beta1/:resource:getIamPolicy');
$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:getIamPolicy' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"options": {
"requestedPolicyVersion": 0
}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1beta1/:resource:getIamPolicy' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"options": {
"requestedPolicyVersion": 0
}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"options\": {\n \"requestedPolicyVersion\": 0\n }\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1beta1/:resource:getIamPolicy", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1beta1/:resource:getIamPolicy"
payload = { "options": { "requestedPolicyVersion": 0 } }
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1beta1/:resource:getIamPolicy"
payload <- "{\n \"options\": {\n \"requestedPolicyVersion\": 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:getIamPolicy")
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 \"options\": {\n \"requestedPolicyVersion\": 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:getIamPolicy') do |req|
req.body = "{\n \"options\": {\n \"requestedPolicyVersion\": 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:getIamPolicy";
let payload = json!({"options": json!({"requestedPolicyVersion": 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:getIamPolicy \
--header 'content-type: application/json' \
--data '{
"options": {
"requestedPolicyVersion": 0
}
}'
echo '{
"options": {
"requestedPolicyVersion": 0
}
}' | \
http POST {{baseUrl}}/v1beta1/:resource:getIamPolicy \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "options": {\n "requestedPolicyVersion": 0\n }\n}' \
--output-document \
- {{baseUrl}}/v1beta1/:resource:getIamPolicy
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["options": ["requestedPolicyVersion": 0]] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1beta1/:resource:getIamPolicy")! 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
datacatalog.projects.locations.taxonomies.policyTags.list
{{baseUrl}}/v1beta1/:parent/policyTags
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/policyTags");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v1beta1/:parent/policyTags")
require "http/client"
url = "{{baseUrl}}/v1beta1/:parent/policyTags"
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/policyTags"),
};
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/policyTags");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1beta1/:parent/policyTags"
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/policyTags HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1beta1/:parent/policyTags")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1beta1/:parent/policyTags"))
.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/policyTags")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1beta1/:parent/policyTags")
.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/policyTags');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/v1beta1/:parent/policyTags'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1beta1/:parent/policyTags';
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/policyTags',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1beta1/:parent/policyTags")
.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/policyTags',
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/policyTags'};
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/policyTags');
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/policyTags'};
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/policyTags';
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/policyTags"]
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/policyTags" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1beta1/:parent/policyTags",
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/policyTags');
echo $response->getBody();
setUrl('{{baseUrl}}/v1beta1/:parent/policyTags');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1beta1/:parent/policyTags');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1beta1/:parent/policyTags' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1beta1/:parent/policyTags' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v1beta1/:parent/policyTags")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1beta1/:parent/policyTags"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1beta1/:parent/policyTags"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1beta1/:parent/policyTags")
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/policyTags') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1beta1/:parent/policyTags";
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/policyTags
http GET {{baseUrl}}/v1beta1/:parent/policyTags
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v1beta1/:parent/policyTags
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1beta1/:parent/policyTags")! 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
datacatalog.projects.locations.taxonomies.policyTags.patch
{{baseUrl}}/v1beta1/:name
QUERY PARAMS
name
BODY json
{
"childPolicyTags": [],
"description": "",
"displayName": "",
"name": "",
"parentPolicyTag": ""
}
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 \"childPolicyTags\": [],\n \"description\": \"\",\n \"displayName\": \"\",\n \"name\": \"\",\n \"parentPolicyTag\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/patch "{{baseUrl}}/v1beta1/:name" {:content-type :json
:form-params {:childPolicyTags []
:description ""
:displayName ""
:name ""
:parentPolicyTag ""}})
require "http/client"
url = "{{baseUrl}}/v1beta1/:name"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"childPolicyTags\": [],\n \"description\": \"\",\n \"displayName\": \"\",\n \"name\": \"\",\n \"parentPolicyTag\": \"\"\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 \"childPolicyTags\": [],\n \"description\": \"\",\n \"displayName\": \"\",\n \"name\": \"\",\n \"parentPolicyTag\": \"\"\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 \"childPolicyTags\": [],\n \"description\": \"\",\n \"displayName\": \"\",\n \"name\": \"\",\n \"parentPolicyTag\": \"\"\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 \"childPolicyTags\": [],\n \"description\": \"\",\n \"displayName\": \"\",\n \"name\": \"\",\n \"parentPolicyTag\": \"\"\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: 108
{
"childPolicyTags": [],
"description": "",
"displayName": "",
"name": "",
"parentPolicyTag": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/v1beta1/:name")
.setHeader("content-type", "application/json")
.setBody("{\n \"childPolicyTags\": [],\n \"description\": \"\",\n \"displayName\": \"\",\n \"name\": \"\",\n \"parentPolicyTag\": \"\"\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 \"childPolicyTags\": [],\n \"description\": \"\",\n \"displayName\": \"\",\n \"name\": \"\",\n \"parentPolicyTag\": \"\"\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 \"childPolicyTags\": [],\n \"description\": \"\",\n \"displayName\": \"\",\n \"name\": \"\",\n \"parentPolicyTag\": \"\"\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 \"childPolicyTags\": [],\n \"description\": \"\",\n \"displayName\": \"\",\n \"name\": \"\",\n \"parentPolicyTag\": \"\"\n}")
.asString();
const data = JSON.stringify({
childPolicyTags: [],
description: '',
displayName: '',
name: '',
parentPolicyTag: ''
});
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: {
childPolicyTags: [],
description: '',
displayName: '',
name: '',
parentPolicyTag: ''
}
};
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: '{"childPolicyTags":[],"description":"","displayName":"","name":"","parentPolicyTag":""}'
};
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 "childPolicyTags": [],\n "description": "",\n "displayName": "",\n "name": "",\n "parentPolicyTag": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"childPolicyTags\": [],\n \"description\": \"\",\n \"displayName\": \"\",\n \"name\": \"\",\n \"parentPolicyTag\": \"\"\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({
childPolicyTags: [],
description: '',
displayName: '',
name: '',
parentPolicyTag: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PATCH',
url: '{{baseUrl}}/v1beta1/:name',
headers: {'content-type': 'application/json'},
body: {
childPolicyTags: [],
description: '',
displayName: '',
name: '',
parentPolicyTag: ''
},
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({
childPolicyTags: [],
description: '',
displayName: '',
name: '',
parentPolicyTag: ''
});
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: {
childPolicyTags: [],
description: '',
displayName: '',
name: '',
parentPolicyTag: ''
}
};
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: '{"childPolicyTags":[],"description":"","displayName":"","name":"","parentPolicyTag":""}'
};
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 = @{ @"childPolicyTags": @[ ],
@"description": @"",
@"displayName": @"",
@"name": @"",
@"parentPolicyTag": @"" };
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 \"childPolicyTags\": [],\n \"description\": \"\",\n \"displayName\": \"\",\n \"name\": \"\",\n \"parentPolicyTag\": \"\"\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([
'childPolicyTags' => [
],
'description' => '',
'displayName' => '',
'name' => '',
'parentPolicyTag' => ''
]),
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' => '{
"childPolicyTags": [],
"description": "",
"displayName": "",
"name": "",
"parentPolicyTag": ""
}',
'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([
'childPolicyTags' => [
],
'description' => '',
'displayName' => '',
'name' => '',
'parentPolicyTag' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'childPolicyTags' => [
],
'description' => '',
'displayName' => '',
'name' => '',
'parentPolicyTag' => ''
]));
$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 '{
"childPolicyTags": [],
"description": "",
"displayName": "",
"name": "",
"parentPolicyTag": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1beta1/:name' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"childPolicyTags": [],
"description": "",
"displayName": "",
"name": "",
"parentPolicyTag": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"childPolicyTags\": [],\n \"description\": \"\",\n \"displayName\": \"\",\n \"name\": \"\",\n \"parentPolicyTag\": \"\"\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 = {
"childPolicyTags": [],
"description": "",
"displayName": "",
"name": "",
"parentPolicyTag": ""
}
headers = {"content-type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1beta1/:name"
payload <- "{\n \"childPolicyTags\": [],\n \"description\": \"\",\n \"displayName\": \"\",\n \"name\": \"\",\n \"parentPolicyTag\": \"\"\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 \"childPolicyTags\": [],\n \"description\": \"\",\n \"displayName\": \"\",\n \"name\": \"\",\n \"parentPolicyTag\": \"\"\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 \"childPolicyTags\": [],\n \"description\": \"\",\n \"displayName\": \"\",\n \"name\": \"\",\n \"parentPolicyTag\": \"\"\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!({
"childPolicyTags": (),
"description": "",
"displayName": "",
"name": "",
"parentPolicyTag": ""
});
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 '{
"childPolicyTags": [],
"description": "",
"displayName": "",
"name": "",
"parentPolicyTag": ""
}'
echo '{
"childPolicyTags": [],
"description": "",
"displayName": "",
"name": "",
"parentPolicyTag": ""
}' | \
http PATCH {{baseUrl}}/v1beta1/:name \
content-type:application/json
wget --quiet \
--method PATCH \
--header 'content-type: application/json' \
--body-data '{\n "childPolicyTags": [],\n "description": "",\n "displayName": "",\n "name": "",\n "parentPolicyTag": ""\n}' \
--output-document \
- {{baseUrl}}/v1beta1/:name
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"childPolicyTags": [],
"description": "",
"displayName": "",
"name": "",
"parentPolicyTag": ""
] 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()
POST
datacatalog.projects.locations.taxonomies.policyTags.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
datacatalog.projects.locations.taxonomies.policyTags.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()