Cloud Dataplex API
POST
dataplex.projects.locations.dataAttributeBindings.create
{{baseUrl}}/v1/:parent/dataAttributeBindings
QUERY PARAMS
parent
BODY json
{
"attributes": [],
"createTime": "",
"description": "",
"displayName": "",
"etag": "",
"labels": {},
"name": "",
"paths": [
{
"attributes": [],
"name": ""
}
],
"resource": "",
"uid": "",
"updateTime": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:parent/dataAttributeBindings");
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 \"attributes\": [],\n \"createTime\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"etag\": \"\",\n \"labels\": {},\n \"name\": \"\",\n \"paths\": [\n {\n \"attributes\": [],\n \"name\": \"\"\n }\n ],\n \"resource\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1/:parent/dataAttributeBindings" {:content-type :json
:form-params {:attributes []
:createTime ""
:description ""
:displayName ""
:etag ""
:labels {}
:name ""
:paths [{:attributes []
:name ""}]
:resource ""
:uid ""
:updateTime ""}})
require "http/client"
url = "{{baseUrl}}/v1/:parent/dataAttributeBindings"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"attributes\": [],\n \"createTime\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"etag\": \"\",\n \"labels\": {},\n \"name\": \"\",\n \"paths\": [\n {\n \"attributes\": [],\n \"name\": \"\"\n }\n ],\n \"resource\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/v1/:parent/dataAttributeBindings"),
Content = new StringContent("{\n \"attributes\": [],\n \"createTime\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"etag\": \"\",\n \"labels\": {},\n \"name\": \"\",\n \"paths\": [\n {\n \"attributes\": [],\n \"name\": \"\"\n }\n ],\n \"resource\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/:parent/dataAttributeBindings");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"attributes\": [],\n \"createTime\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"etag\": \"\",\n \"labels\": {},\n \"name\": \"\",\n \"paths\": [\n {\n \"attributes\": [],\n \"name\": \"\"\n }\n ],\n \"resource\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/:parent/dataAttributeBindings"
payload := strings.NewReader("{\n \"attributes\": [],\n \"createTime\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"etag\": \"\",\n \"labels\": {},\n \"name\": \"\",\n \"paths\": [\n {\n \"attributes\": [],\n \"name\": \"\"\n }\n ],\n \"resource\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/v1/:parent/dataAttributeBindings HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 250
{
"attributes": [],
"createTime": "",
"description": "",
"displayName": "",
"etag": "",
"labels": {},
"name": "",
"paths": [
{
"attributes": [],
"name": ""
}
],
"resource": "",
"uid": "",
"updateTime": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1/:parent/dataAttributeBindings")
.setHeader("content-type", "application/json")
.setBody("{\n \"attributes\": [],\n \"createTime\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"etag\": \"\",\n \"labels\": {},\n \"name\": \"\",\n \"paths\": [\n {\n \"attributes\": [],\n \"name\": \"\"\n }\n ],\n \"resource\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/:parent/dataAttributeBindings"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"attributes\": [],\n \"createTime\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"etag\": \"\",\n \"labels\": {},\n \"name\": \"\",\n \"paths\": [\n {\n \"attributes\": [],\n \"name\": \"\"\n }\n ],\n \"resource\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\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 \"attributes\": [],\n \"createTime\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"etag\": \"\",\n \"labels\": {},\n \"name\": \"\",\n \"paths\": [\n {\n \"attributes\": [],\n \"name\": \"\"\n }\n ],\n \"resource\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/:parent/dataAttributeBindings")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1/:parent/dataAttributeBindings")
.header("content-type", "application/json")
.body("{\n \"attributes\": [],\n \"createTime\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"etag\": \"\",\n \"labels\": {},\n \"name\": \"\",\n \"paths\": [\n {\n \"attributes\": [],\n \"name\": \"\"\n }\n ],\n \"resource\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}")
.asString();
const data = JSON.stringify({
attributes: [],
createTime: '',
description: '',
displayName: '',
etag: '',
labels: {},
name: '',
paths: [
{
attributes: [],
name: ''
}
],
resource: '',
uid: '',
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}}/v1/:parent/dataAttributeBindings');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:parent/dataAttributeBindings',
headers: {'content-type': 'application/json'},
data: {
attributes: [],
createTime: '',
description: '',
displayName: '',
etag: '',
labels: {},
name: '',
paths: [{attributes: [], name: ''}],
resource: '',
uid: '',
updateTime: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/:parent/dataAttributeBindings';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"attributes":[],"createTime":"","description":"","displayName":"","etag":"","labels":{},"name":"","paths":[{"attributes":[],"name":""}],"resource":"","uid":"","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}}/v1/:parent/dataAttributeBindings',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "attributes": [],\n "createTime": "",\n "description": "",\n "displayName": "",\n "etag": "",\n "labels": {},\n "name": "",\n "paths": [\n {\n "attributes": [],\n "name": ""\n }\n ],\n "resource": "",\n "uid": "",\n "updateTime": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"attributes\": [],\n \"createTime\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"etag\": \"\",\n \"labels\": {},\n \"name\": \"\",\n \"paths\": [\n {\n \"attributes\": [],\n \"name\": \"\"\n }\n ],\n \"resource\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1/:parent/dataAttributeBindings")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/:parent/dataAttributeBindings',
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({
attributes: [],
createTime: '',
description: '',
displayName: '',
etag: '',
labels: {},
name: '',
paths: [{attributes: [], name: ''}],
resource: '',
uid: '',
updateTime: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:parent/dataAttributeBindings',
headers: {'content-type': 'application/json'},
body: {
attributes: [],
createTime: '',
description: '',
displayName: '',
etag: '',
labels: {},
name: '',
paths: [{attributes: [], name: ''}],
resource: '',
uid: '',
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}}/v1/:parent/dataAttributeBindings');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
attributes: [],
createTime: '',
description: '',
displayName: '',
etag: '',
labels: {},
name: '',
paths: [
{
attributes: [],
name: ''
}
],
resource: '',
uid: '',
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}}/v1/:parent/dataAttributeBindings',
headers: {'content-type': 'application/json'},
data: {
attributes: [],
createTime: '',
description: '',
displayName: '',
etag: '',
labels: {},
name: '',
paths: [{attributes: [], name: ''}],
resource: '',
uid: '',
updateTime: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/:parent/dataAttributeBindings';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"attributes":[],"createTime":"","description":"","displayName":"","etag":"","labels":{},"name":"","paths":[{"attributes":[],"name":""}],"resource":"","uid":"","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 = @{ @"attributes": @[ ],
@"createTime": @"",
@"description": @"",
@"displayName": @"",
@"etag": @"",
@"labels": @{ },
@"name": @"",
@"paths": @[ @{ @"attributes": @[ ], @"name": @"" } ],
@"resource": @"",
@"uid": @"",
@"updateTime": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:parent/dataAttributeBindings"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/:parent/dataAttributeBindings" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"attributes\": [],\n \"createTime\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"etag\": \"\",\n \"labels\": {},\n \"name\": \"\",\n \"paths\": [\n {\n \"attributes\": [],\n \"name\": \"\"\n }\n ],\n \"resource\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/:parent/dataAttributeBindings",
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([
'attributes' => [
],
'createTime' => '',
'description' => '',
'displayName' => '',
'etag' => '',
'labels' => [
],
'name' => '',
'paths' => [
[
'attributes' => [
],
'name' => ''
]
],
'resource' => '',
'uid' => '',
'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}}/v1/:parent/dataAttributeBindings', [
'body' => '{
"attributes": [],
"createTime": "",
"description": "",
"displayName": "",
"etag": "",
"labels": {},
"name": "",
"paths": [
{
"attributes": [],
"name": ""
}
],
"resource": "",
"uid": "",
"updateTime": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1/:parent/dataAttributeBindings');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'attributes' => [
],
'createTime' => '',
'description' => '',
'displayName' => '',
'etag' => '',
'labels' => [
],
'name' => '',
'paths' => [
[
'attributes' => [
],
'name' => ''
]
],
'resource' => '',
'uid' => '',
'updateTime' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'attributes' => [
],
'createTime' => '',
'description' => '',
'displayName' => '',
'etag' => '',
'labels' => [
],
'name' => '',
'paths' => [
[
'attributes' => [
],
'name' => ''
]
],
'resource' => '',
'uid' => '',
'updateTime' => ''
]));
$request->setRequestUrl('{{baseUrl}}/v1/:parent/dataAttributeBindings');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:parent/dataAttributeBindings' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"attributes": [],
"createTime": "",
"description": "",
"displayName": "",
"etag": "",
"labels": {},
"name": "",
"paths": [
{
"attributes": [],
"name": ""
}
],
"resource": "",
"uid": "",
"updateTime": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:parent/dataAttributeBindings' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"attributes": [],
"createTime": "",
"description": "",
"displayName": "",
"etag": "",
"labels": {},
"name": "",
"paths": [
{
"attributes": [],
"name": ""
}
],
"resource": "",
"uid": "",
"updateTime": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"attributes\": [],\n \"createTime\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"etag\": \"\",\n \"labels\": {},\n \"name\": \"\",\n \"paths\": [\n {\n \"attributes\": [],\n \"name\": \"\"\n }\n ],\n \"resource\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1/:parent/dataAttributeBindings", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/:parent/dataAttributeBindings"
payload = {
"attributes": [],
"createTime": "",
"description": "",
"displayName": "",
"etag": "",
"labels": {},
"name": "",
"paths": [
{
"attributes": [],
"name": ""
}
],
"resource": "",
"uid": "",
"updateTime": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/:parent/dataAttributeBindings"
payload <- "{\n \"attributes\": [],\n \"createTime\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"etag\": \"\",\n \"labels\": {},\n \"name\": \"\",\n \"paths\": [\n {\n \"attributes\": [],\n \"name\": \"\"\n }\n ],\n \"resource\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/:parent/dataAttributeBindings")
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 \"attributes\": [],\n \"createTime\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"etag\": \"\",\n \"labels\": {},\n \"name\": \"\",\n \"paths\": [\n {\n \"attributes\": [],\n \"name\": \"\"\n }\n ],\n \"resource\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/v1/:parent/dataAttributeBindings') do |req|
req.body = "{\n \"attributes\": [],\n \"createTime\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"etag\": \"\",\n \"labels\": {},\n \"name\": \"\",\n \"paths\": [\n {\n \"attributes\": [],\n \"name\": \"\"\n }\n ],\n \"resource\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/:parent/dataAttributeBindings";
let payload = json!({
"attributes": (),
"createTime": "",
"description": "",
"displayName": "",
"etag": "",
"labels": json!({}),
"name": "",
"paths": (
json!({
"attributes": (),
"name": ""
})
),
"resource": "",
"uid": "",
"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}}/v1/:parent/dataAttributeBindings \
--header 'content-type: application/json' \
--data '{
"attributes": [],
"createTime": "",
"description": "",
"displayName": "",
"etag": "",
"labels": {},
"name": "",
"paths": [
{
"attributes": [],
"name": ""
}
],
"resource": "",
"uid": "",
"updateTime": ""
}'
echo '{
"attributes": [],
"createTime": "",
"description": "",
"displayName": "",
"etag": "",
"labels": {},
"name": "",
"paths": [
{
"attributes": [],
"name": ""
}
],
"resource": "",
"uid": "",
"updateTime": ""
}' | \
http POST {{baseUrl}}/v1/:parent/dataAttributeBindings \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "attributes": [],\n "createTime": "",\n "description": "",\n "displayName": "",\n "etag": "",\n "labels": {},\n "name": "",\n "paths": [\n {\n "attributes": [],\n "name": ""\n }\n ],\n "resource": "",\n "uid": "",\n "updateTime": ""\n}' \
--output-document \
- {{baseUrl}}/v1/:parent/dataAttributeBindings
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"attributes": [],
"createTime": "",
"description": "",
"displayName": "",
"etag": "",
"labels": [],
"name": "",
"paths": [
[
"attributes": [],
"name": ""
]
],
"resource": "",
"uid": "",
"updateTime": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:parent/dataAttributeBindings")! 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
dataplex.projects.locations.dataAttributeBindings.list
{{baseUrl}}/v1/:parent/dataAttributeBindings
QUERY PARAMS
parent
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:parent/dataAttributeBindings");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v1/:parent/dataAttributeBindings")
require "http/client"
url = "{{baseUrl}}/v1/:parent/dataAttributeBindings"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/v1/:parent/dataAttributeBindings"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/:parent/dataAttributeBindings");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/:parent/dataAttributeBindings"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/v1/:parent/dataAttributeBindings HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1/:parent/dataAttributeBindings")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/:parent/dataAttributeBindings"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/:parent/dataAttributeBindings")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1/:parent/dataAttributeBindings")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/v1/:parent/dataAttributeBindings');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/v1/:parent/dataAttributeBindings'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/:parent/dataAttributeBindings';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/:parent/dataAttributeBindings',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1/:parent/dataAttributeBindings")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/:parent/dataAttributeBindings',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/v1/:parent/dataAttributeBindings'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v1/:parent/dataAttributeBindings');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/v1/:parent/dataAttributeBindings'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/:parent/dataAttributeBindings';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:parent/dataAttributeBindings"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/:parent/dataAttributeBindings" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/:parent/dataAttributeBindings",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/v1/:parent/dataAttributeBindings');
echo $response->getBody();
setUrl('{{baseUrl}}/v1/:parent/dataAttributeBindings');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/:parent/dataAttributeBindings');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:parent/dataAttributeBindings' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:parent/dataAttributeBindings' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v1/:parent/dataAttributeBindings")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/:parent/dataAttributeBindings"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/:parent/dataAttributeBindings"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/:parent/dataAttributeBindings")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/v1/:parent/dataAttributeBindings') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/:parent/dataAttributeBindings";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/v1/:parent/dataAttributeBindings
http GET {{baseUrl}}/v1/:parent/dataAttributeBindings
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v1/:parent/dataAttributeBindings
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:parent/dataAttributeBindings")! 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
dataplex.projects.locations.dataScans.create
{{baseUrl}}/v1/:parent/dataScans
QUERY PARAMS
parent
BODY json
{
"createTime": "",
"data": {
"entity": "",
"resource": ""
},
"dataProfileResult": {
"profile": {
"fields": [
{
"mode": "",
"name": "",
"profile": {
"distinctRatio": "",
"doubleProfile": {
"average": "",
"max": "",
"min": "",
"quartiles": [],
"standardDeviation": ""
},
"integerProfile": {
"average": "",
"max": "",
"min": "",
"quartiles": [],
"standardDeviation": ""
},
"nullRatio": "",
"stringProfile": {
"averageLength": "",
"maxLength": "",
"minLength": ""
},
"topNValues": [
{
"count": "",
"value": ""
}
]
},
"type": ""
}
]
},
"rowCount": "",
"scannedData": {
"incrementalField": {
"end": "",
"field": "",
"start": ""
}
}
},
"dataProfileSpec": {},
"dataQualityResult": {
"dimensions": [
{
"passed": false
}
],
"passed": false,
"rowCount": "",
"rules": [
{
"evaluatedCount": "",
"failingRowsQuery": "",
"nullCount": "",
"passRatio": "",
"passed": false,
"passedCount": "",
"rule": {
"column": "",
"dimension": "",
"ignoreNull": false,
"nonNullExpectation": {},
"rangeExpectation": {
"maxValue": "",
"minValue": "",
"strictMaxEnabled": false,
"strictMinEnabled": false
},
"regexExpectation": {
"regex": ""
},
"rowConditionExpectation": {
"sqlExpression": ""
},
"setExpectation": {
"values": []
},
"statisticRangeExpectation": {
"maxValue": "",
"minValue": "",
"statistic": "",
"strictMaxEnabled": false,
"strictMinEnabled": false
},
"tableConditionExpectation": {
"sqlExpression": ""
},
"threshold": "",
"uniquenessExpectation": {}
}
}
],
"scannedData": {}
},
"dataQualitySpec": {
"rules": [
{}
]
},
"description": "",
"displayName": "",
"executionSpec": {
"field": "",
"trigger": {
"onDemand": {},
"schedule": {
"cron": ""
}
}
},
"executionStatus": {
"latestJobEndTime": "",
"latestJobStartTime": ""
},
"labels": {},
"name": "",
"state": "",
"type": "",
"uid": "",
"updateTime": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:parent/dataScans");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"createTime\": \"\",\n \"data\": {\n \"entity\": \"\",\n \"resource\": \"\"\n },\n \"dataProfileResult\": {\n \"profile\": {\n \"fields\": [\n {\n \"mode\": \"\",\n \"name\": \"\",\n \"profile\": {\n \"distinctRatio\": \"\",\n \"doubleProfile\": {\n \"average\": \"\",\n \"max\": \"\",\n \"min\": \"\",\n \"quartiles\": [],\n \"standardDeviation\": \"\"\n },\n \"integerProfile\": {\n \"average\": \"\",\n \"max\": \"\",\n \"min\": \"\",\n \"quartiles\": [],\n \"standardDeviation\": \"\"\n },\n \"nullRatio\": \"\",\n \"stringProfile\": {\n \"averageLength\": \"\",\n \"maxLength\": \"\",\n \"minLength\": \"\"\n },\n \"topNValues\": [\n {\n \"count\": \"\",\n \"value\": \"\"\n }\n ]\n },\n \"type\": \"\"\n }\n ]\n },\n \"rowCount\": \"\",\n \"scannedData\": {\n \"incrementalField\": {\n \"end\": \"\",\n \"field\": \"\",\n \"start\": \"\"\n }\n }\n },\n \"dataProfileSpec\": {},\n \"dataQualityResult\": {\n \"dimensions\": [\n {\n \"passed\": false\n }\n ],\n \"passed\": false,\n \"rowCount\": \"\",\n \"rules\": [\n {\n \"evaluatedCount\": \"\",\n \"failingRowsQuery\": \"\",\n \"nullCount\": \"\",\n \"passRatio\": \"\",\n \"passed\": false,\n \"passedCount\": \"\",\n \"rule\": {\n \"column\": \"\",\n \"dimension\": \"\",\n \"ignoreNull\": false,\n \"nonNullExpectation\": {},\n \"rangeExpectation\": {\n \"maxValue\": \"\",\n \"minValue\": \"\",\n \"strictMaxEnabled\": false,\n \"strictMinEnabled\": false\n },\n \"regexExpectation\": {\n \"regex\": \"\"\n },\n \"rowConditionExpectation\": {\n \"sqlExpression\": \"\"\n },\n \"setExpectation\": {\n \"values\": []\n },\n \"statisticRangeExpectation\": {\n \"maxValue\": \"\",\n \"minValue\": \"\",\n \"statistic\": \"\",\n \"strictMaxEnabled\": false,\n \"strictMinEnabled\": false\n },\n \"tableConditionExpectation\": {\n \"sqlExpression\": \"\"\n },\n \"threshold\": \"\",\n \"uniquenessExpectation\": {}\n }\n }\n ],\n \"scannedData\": {}\n },\n \"dataQualitySpec\": {\n \"rules\": [\n {}\n ]\n },\n \"description\": \"\",\n \"displayName\": \"\",\n \"executionSpec\": {\n \"field\": \"\",\n \"trigger\": {\n \"onDemand\": {},\n \"schedule\": {\n \"cron\": \"\"\n }\n }\n },\n \"executionStatus\": {\n \"latestJobEndTime\": \"\",\n \"latestJobStartTime\": \"\"\n },\n \"labels\": {},\n \"name\": \"\",\n \"state\": \"\",\n \"type\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1/:parent/dataScans" {:content-type :json
:form-params {:createTime ""
:data {:entity ""
:resource ""}
:dataProfileResult {:profile {:fields [{:mode ""
:name ""
:profile {:distinctRatio ""
:doubleProfile {:average ""
:max ""
:min ""
:quartiles []
:standardDeviation ""}
:integerProfile {:average ""
:max ""
:min ""
:quartiles []
:standardDeviation ""}
:nullRatio ""
:stringProfile {:averageLength ""
:maxLength ""
:minLength ""}
:topNValues [{:count ""
:value ""}]}
:type ""}]}
:rowCount ""
:scannedData {:incrementalField {:end ""
:field ""
:start ""}}}
:dataProfileSpec {}
:dataQualityResult {:dimensions [{:passed false}]
:passed false
:rowCount ""
:rules [{:evaluatedCount ""
:failingRowsQuery ""
:nullCount ""
:passRatio ""
:passed false
:passedCount ""
:rule {:column ""
:dimension ""
:ignoreNull false
:nonNullExpectation {}
:rangeExpectation {:maxValue ""
:minValue ""
:strictMaxEnabled false
:strictMinEnabled false}
:regexExpectation {:regex ""}
:rowConditionExpectation {:sqlExpression ""}
:setExpectation {:values []}
:statisticRangeExpectation {:maxValue ""
:minValue ""
:statistic ""
:strictMaxEnabled false
:strictMinEnabled false}
:tableConditionExpectation {:sqlExpression ""}
:threshold ""
:uniquenessExpectation {}}}]
:scannedData {}}
:dataQualitySpec {:rules [{}]}
:description ""
:displayName ""
:executionSpec {:field ""
:trigger {:onDemand {}
:schedule {:cron ""}}}
:executionStatus {:latestJobEndTime ""
:latestJobStartTime ""}
:labels {}
:name ""
:state ""
:type ""
:uid ""
:updateTime ""}})
require "http/client"
url = "{{baseUrl}}/v1/:parent/dataScans"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"createTime\": \"\",\n \"data\": {\n \"entity\": \"\",\n \"resource\": \"\"\n },\n \"dataProfileResult\": {\n \"profile\": {\n \"fields\": [\n {\n \"mode\": \"\",\n \"name\": \"\",\n \"profile\": {\n \"distinctRatio\": \"\",\n \"doubleProfile\": {\n \"average\": \"\",\n \"max\": \"\",\n \"min\": \"\",\n \"quartiles\": [],\n \"standardDeviation\": \"\"\n },\n \"integerProfile\": {\n \"average\": \"\",\n \"max\": \"\",\n \"min\": \"\",\n \"quartiles\": [],\n \"standardDeviation\": \"\"\n },\n \"nullRatio\": \"\",\n \"stringProfile\": {\n \"averageLength\": \"\",\n \"maxLength\": \"\",\n \"minLength\": \"\"\n },\n \"topNValues\": [\n {\n \"count\": \"\",\n \"value\": \"\"\n }\n ]\n },\n \"type\": \"\"\n }\n ]\n },\n \"rowCount\": \"\",\n \"scannedData\": {\n \"incrementalField\": {\n \"end\": \"\",\n \"field\": \"\",\n \"start\": \"\"\n }\n }\n },\n \"dataProfileSpec\": {},\n \"dataQualityResult\": {\n \"dimensions\": [\n {\n \"passed\": false\n }\n ],\n \"passed\": false,\n \"rowCount\": \"\",\n \"rules\": [\n {\n \"evaluatedCount\": \"\",\n \"failingRowsQuery\": \"\",\n \"nullCount\": \"\",\n \"passRatio\": \"\",\n \"passed\": false,\n \"passedCount\": \"\",\n \"rule\": {\n \"column\": \"\",\n \"dimension\": \"\",\n \"ignoreNull\": false,\n \"nonNullExpectation\": {},\n \"rangeExpectation\": {\n \"maxValue\": \"\",\n \"minValue\": \"\",\n \"strictMaxEnabled\": false,\n \"strictMinEnabled\": false\n },\n \"regexExpectation\": {\n \"regex\": \"\"\n },\n \"rowConditionExpectation\": {\n \"sqlExpression\": \"\"\n },\n \"setExpectation\": {\n \"values\": []\n },\n \"statisticRangeExpectation\": {\n \"maxValue\": \"\",\n \"minValue\": \"\",\n \"statistic\": \"\",\n \"strictMaxEnabled\": false,\n \"strictMinEnabled\": false\n },\n \"tableConditionExpectation\": {\n \"sqlExpression\": \"\"\n },\n \"threshold\": \"\",\n \"uniquenessExpectation\": {}\n }\n }\n ],\n \"scannedData\": {}\n },\n \"dataQualitySpec\": {\n \"rules\": [\n {}\n ]\n },\n \"description\": \"\",\n \"displayName\": \"\",\n \"executionSpec\": {\n \"field\": \"\",\n \"trigger\": {\n \"onDemand\": {},\n \"schedule\": {\n \"cron\": \"\"\n }\n }\n },\n \"executionStatus\": {\n \"latestJobEndTime\": \"\",\n \"latestJobStartTime\": \"\"\n },\n \"labels\": {},\n \"name\": \"\",\n \"state\": \"\",\n \"type\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/v1/:parent/dataScans"),
Content = new StringContent("{\n \"createTime\": \"\",\n \"data\": {\n \"entity\": \"\",\n \"resource\": \"\"\n },\n \"dataProfileResult\": {\n \"profile\": {\n \"fields\": [\n {\n \"mode\": \"\",\n \"name\": \"\",\n \"profile\": {\n \"distinctRatio\": \"\",\n \"doubleProfile\": {\n \"average\": \"\",\n \"max\": \"\",\n \"min\": \"\",\n \"quartiles\": [],\n \"standardDeviation\": \"\"\n },\n \"integerProfile\": {\n \"average\": \"\",\n \"max\": \"\",\n \"min\": \"\",\n \"quartiles\": [],\n \"standardDeviation\": \"\"\n },\n \"nullRatio\": \"\",\n \"stringProfile\": {\n \"averageLength\": \"\",\n \"maxLength\": \"\",\n \"minLength\": \"\"\n },\n \"topNValues\": [\n {\n \"count\": \"\",\n \"value\": \"\"\n }\n ]\n },\n \"type\": \"\"\n }\n ]\n },\n \"rowCount\": \"\",\n \"scannedData\": {\n \"incrementalField\": {\n \"end\": \"\",\n \"field\": \"\",\n \"start\": \"\"\n }\n }\n },\n \"dataProfileSpec\": {},\n \"dataQualityResult\": {\n \"dimensions\": [\n {\n \"passed\": false\n }\n ],\n \"passed\": false,\n \"rowCount\": \"\",\n \"rules\": [\n {\n \"evaluatedCount\": \"\",\n \"failingRowsQuery\": \"\",\n \"nullCount\": \"\",\n \"passRatio\": \"\",\n \"passed\": false,\n \"passedCount\": \"\",\n \"rule\": {\n \"column\": \"\",\n \"dimension\": \"\",\n \"ignoreNull\": false,\n \"nonNullExpectation\": {},\n \"rangeExpectation\": {\n \"maxValue\": \"\",\n \"minValue\": \"\",\n \"strictMaxEnabled\": false,\n \"strictMinEnabled\": false\n },\n \"regexExpectation\": {\n \"regex\": \"\"\n },\n \"rowConditionExpectation\": {\n \"sqlExpression\": \"\"\n },\n \"setExpectation\": {\n \"values\": []\n },\n \"statisticRangeExpectation\": {\n \"maxValue\": \"\",\n \"minValue\": \"\",\n \"statistic\": \"\",\n \"strictMaxEnabled\": false,\n \"strictMinEnabled\": false\n },\n \"tableConditionExpectation\": {\n \"sqlExpression\": \"\"\n },\n \"threshold\": \"\",\n \"uniquenessExpectation\": {}\n }\n }\n ],\n \"scannedData\": {}\n },\n \"dataQualitySpec\": {\n \"rules\": [\n {}\n ]\n },\n \"description\": \"\",\n \"displayName\": \"\",\n \"executionSpec\": {\n \"field\": \"\",\n \"trigger\": {\n \"onDemand\": {},\n \"schedule\": {\n \"cron\": \"\"\n }\n }\n },\n \"executionStatus\": {\n \"latestJobEndTime\": \"\",\n \"latestJobStartTime\": \"\"\n },\n \"labels\": {},\n \"name\": \"\",\n \"state\": \"\",\n \"type\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/:parent/dataScans");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"createTime\": \"\",\n \"data\": {\n \"entity\": \"\",\n \"resource\": \"\"\n },\n \"dataProfileResult\": {\n \"profile\": {\n \"fields\": [\n {\n \"mode\": \"\",\n \"name\": \"\",\n \"profile\": {\n \"distinctRatio\": \"\",\n \"doubleProfile\": {\n \"average\": \"\",\n \"max\": \"\",\n \"min\": \"\",\n \"quartiles\": [],\n \"standardDeviation\": \"\"\n },\n \"integerProfile\": {\n \"average\": \"\",\n \"max\": \"\",\n \"min\": \"\",\n \"quartiles\": [],\n \"standardDeviation\": \"\"\n },\n \"nullRatio\": \"\",\n \"stringProfile\": {\n \"averageLength\": \"\",\n \"maxLength\": \"\",\n \"minLength\": \"\"\n },\n \"topNValues\": [\n {\n \"count\": \"\",\n \"value\": \"\"\n }\n ]\n },\n \"type\": \"\"\n }\n ]\n },\n \"rowCount\": \"\",\n \"scannedData\": {\n \"incrementalField\": {\n \"end\": \"\",\n \"field\": \"\",\n \"start\": \"\"\n }\n }\n },\n \"dataProfileSpec\": {},\n \"dataQualityResult\": {\n \"dimensions\": [\n {\n \"passed\": false\n }\n ],\n \"passed\": false,\n \"rowCount\": \"\",\n \"rules\": [\n {\n \"evaluatedCount\": \"\",\n \"failingRowsQuery\": \"\",\n \"nullCount\": \"\",\n \"passRatio\": \"\",\n \"passed\": false,\n \"passedCount\": \"\",\n \"rule\": {\n \"column\": \"\",\n \"dimension\": \"\",\n \"ignoreNull\": false,\n \"nonNullExpectation\": {},\n \"rangeExpectation\": {\n \"maxValue\": \"\",\n \"minValue\": \"\",\n \"strictMaxEnabled\": false,\n \"strictMinEnabled\": false\n },\n \"regexExpectation\": {\n \"regex\": \"\"\n },\n \"rowConditionExpectation\": {\n \"sqlExpression\": \"\"\n },\n \"setExpectation\": {\n \"values\": []\n },\n \"statisticRangeExpectation\": {\n \"maxValue\": \"\",\n \"minValue\": \"\",\n \"statistic\": \"\",\n \"strictMaxEnabled\": false,\n \"strictMinEnabled\": false\n },\n \"tableConditionExpectation\": {\n \"sqlExpression\": \"\"\n },\n \"threshold\": \"\",\n \"uniquenessExpectation\": {}\n }\n }\n ],\n \"scannedData\": {}\n },\n \"dataQualitySpec\": {\n \"rules\": [\n {}\n ]\n },\n \"description\": \"\",\n \"displayName\": \"\",\n \"executionSpec\": {\n \"field\": \"\",\n \"trigger\": {\n \"onDemand\": {},\n \"schedule\": {\n \"cron\": \"\"\n }\n }\n },\n \"executionStatus\": {\n \"latestJobEndTime\": \"\",\n \"latestJobStartTime\": \"\"\n },\n \"labels\": {},\n \"name\": \"\",\n \"state\": \"\",\n \"type\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/:parent/dataScans"
payload := strings.NewReader("{\n \"createTime\": \"\",\n \"data\": {\n \"entity\": \"\",\n \"resource\": \"\"\n },\n \"dataProfileResult\": {\n \"profile\": {\n \"fields\": [\n {\n \"mode\": \"\",\n \"name\": \"\",\n \"profile\": {\n \"distinctRatio\": \"\",\n \"doubleProfile\": {\n \"average\": \"\",\n \"max\": \"\",\n \"min\": \"\",\n \"quartiles\": [],\n \"standardDeviation\": \"\"\n },\n \"integerProfile\": {\n \"average\": \"\",\n \"max\": \"\",\n \"min\": \"\",\n \"quartiles\": [],\n \"standardDeviation\": \"\"\n },\n \"nullRatio\": \"\",\n \"stringProfile\": {\n \"averageLength\": \"\",\n \"maxLength\": \"\",\n \"minLength\": \"\"\n },\n \"topNValues\": [\n {\n \"count\": \"\",\n \"value\": \"\"\n }\n ]\n },\n \"type\": \"\"\n }\n ]\n },\n \"rowCount\": \"\",\n \"scannedData\": {\n \"incrementalField\": {\n \"end\": \"\",\n \"field\": \"\",\n \"start\": \"\"\n }\n }\n },\n \"dataProfileSpec\": {},\n \"dataQualityResult\": {\n \"dimensions\": [\n {\n \"passed\": false\n }\n ],\n \"passed\": false,\n \"rowCount\": \"\",\n \"rules\": [\n {\n \"evaluatedCount\": \"\",\n \"failingRowsQuery\": \"\",\n \"nullCount\": \"\",\n \"passRatio\": \"\",\n \"passed\": false,\n \"passedCount\": \"\",\n \"rule\": {\n \"column\": \"\",\n \"dimension\": \"\",\n \"ignoreNull\": false,\n \"nonNullExpectation\": {},\n \"rangeExpectation\": {\n \"maxValue\": \"\",\n \"minValue\": \"\",\n \"strictMaxEnabled\": false,\n \"strictMinEnabled\": false\n },\n \"regexExpectation\": {\n \"regex\": \"\"\n },\n \"rowConditionExpectation\": {\n \"sqlExpression\": \"\"\n },\n \"setExpectation\": {\n \"values\": []\n },\n \"statisticRangeExpectation\": {\n \"maxValue\": \"\",\n \"minValue\": \"\",\n \"statistic\": \"\",\n \"strictMaxEnabled\": false,\n \"strictMinEnabled\": false\n },\n \"tableConditionExpectation\": {\n \"sqlExpression\": \"\"\n },\n \"threshold\": \"\",\n \"uniquenessExpectation\": {}\n }\n }\n ],\n \"scannedData\": {}\n },\n \"dataQualitySpec\": {\n \"rules\": [\n {}\n ]\n },\n \"description\": \"\",\n \"displayName\": \"\",\n \"executionSpec\": {\n \"field\": \"\",\n \"trigger\": {\n \"onDemand\": {},\n \"schedule\": {\n \"cron\": \"\"\n }\n }\n },\n \"executionStatus\": {\n \"latestJobEndTime\": \"\",\n \"latestJobStartTime\": \"\"\n },\n \"labels\": {},\n \"name\": \"\",\n \"state\": \"\",\n \"type\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/v1/:parent/dataScans HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 2855
{
"createTime": "",
"data": {
"entity": "",
"resource": ""
},
"dataProfileResult": {
"profile": {
"fields": [
{
"mode": "",
"name": "",
"profile": {
"distinctRatio": "",
"doubleProfile": {
"average": "",
"max": "",
"min": "",
"quartiles": [],
"standardDeviation": ""
},
"integerProfile": {
"average": "",
"max": "",
"min": "",
"quartiles": [],
"standardDeviation": ""
},
"nullRatio": "",
"stringProfile": {
"averageLength": "",
"maxLength": "",
"minLength": ""
},
"topNValues": [
{
"count": "",
"value": ""
}
]
},
"type": ""
}
]
},
"rowCount": "",
"scannedData": {
"incrementalField": {
"end": "",
"field": "",
"start": ""
}
}
},
"dataProfileSpec": {},
"dataQualityResult": {
"dimensions": [
{
"passed": false
}
],
"passed": false,
"rowCount": "",
"rules": [
{
"evaluatedCount": "",
"failingRowsQuery": "",
"nullCount": "",
"passRatio": "",
"passed": false,
"passedCount": "",
"rule": {
"column": "",
"dimension": "",
"ignoreNull": false,
"nonNullExpectation": {},
"rangeExpectation": {
"maxValue": "",
"minValue": "",
"strictMaxEnabled": false,
"strictMinEnabled": false
},
"regexExpectation": {
"regex": ""
},
"rowConditionExpectation": {
"sqlExpression": ""
},
"setExpectation": {
"values": []
},
"statisticRangeExpectation": {
"maxValue": "",
"minValue": "",
"statistic": "",
"strictMaxEnabled": false,
"strictMinEnabled": false
},
"tableConditionExpectation": {
"sqlExpression": ""
},
"threshold": "",
"uniquenessExpectation": {}
}
}
],
"scannedData": {}
},
"dataQualitySpec": {
"rules": [
{}
]
},
"description": "",
"displayName": "",
"executionSpec": {
"field": "",
"trigger": {
"onDemand": {},
"schedule": {
"cron": ""
}
}
},
"executionStatus": {
"latestJobEndTime": "",
"latestJobStartTime": ""
},
"labels": {},
"name": "",
"state": "",
"type": "",
"uid": "",
"updateTime": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1/:parent/dataScans")
.setHeader("content-type", "application/json")
.setBody("{\n \"createTime\": \"\",\n \"data\": {\n \"entity\": \"\",\n \"resource\": \"\"\n },\n \"dataProfileResult\": {\n \"profile\": {\n \"fields\": [\n {\n \"mode\": \"\",\n \"name\": \"\",\n \"profile\": {\n \"distinctRatio\": \"\",\n \"doubleProfile\": {\n \"average\": \"\",\n \"max\": \"\",\n \"min\": \"\",\n \"quartiles\": [],\n \"standardDeviation\": \"\"\n },\n \"integerProfile\": {\n \"average\": \"\",\n \"max\": \"\",\n \"min\": \"\",\n \"quartiles\": [],\n \"standardDeviation\": \"\"\n },\n \"nullRatio\": \"\",\n \"stringProfile\": {\n \"averageLength\": \"\",\n \"maxLength\": \"\",\n \"minLength\": \"\"\n },\n \"topNValues\": [\n {\n \"count\": \"\",\n \"value\": \"\"\n }\n ]\n },\n \"type\": \"\"\n }\n ]\n },\n \"rowCount\": \"\",\n \"scannedData\": {\n \"incrementalField\": {\n \"end\": \"\",\n \"field\": \"\",\n \"start\": \"\"\n }\n }\n },\n \"dataProfileSpec\": {},\n \"dataQualityResult\": {\n \"dimensions\": [\n {\n \"passed\": false\n }\n ],\n \"passed\": false,\n \"rowCount\": \"\",\n \"rules\": [\n {\n \"evaluatedCount\": \"\",\n \"failingRowsQuery\": \"\",\n \"nullCount\": \"\",\n \"passRatio\": \"\",\n \"passed\": false,\n \"passedCount\": \"\",\n \"rule\": {\n \"column\": \"\",\n \"dimension\": \"\",\n \"ignoreNull\": false,\n \"nonNullExpectation\": {},\n \"rangeExpectation\": {\n \"maxValue\": \"\",\n \"minValue\": \"\",\n \"strictMaxEnabled\": false,\n \"strictMinEnabled\": false\n },\n \"regexExpectation\": {\n \"regex\": \"\"\n },\n \"rowConditionExpectation\": {\n \"sqlExpression\": \"\"\n },\n \"setExpectation\": {\n \"values\": []\n },\n \"statisticRangeExpectation\": {\n \"maxValue\": \"\",\n \"minValue\": \"\",\n \"statistic\": \"\",\n \"strictMaxEnabled\": false,\n \"strictMinEnabled\": false\n },\n \"tableConditionExpectation\": {\n \"sqlExpression\": \"\"\n },\n \"threshold\": \"\",\n \"uniquenessExpectation\": {}\n }\n }\n ],\n \"scannedData\": {}\n },\n \"dataQualitySpec\": {\n \"rules\": [\n {}\n ]\n },\n \"description\": \"\",\n \"displayName\": \"\",\n \"executionSpec\": {\n \"field\": \"\",\n \"trigger\": {\n \"onDemand\": {},\n \"schedule\": {\n \"cron\": \"\"\n }\n }\n },\n \"executionStatus\": {\n \"latestJobEndTime\": \"\",\n \"latestJobStartTime\": \"\"\n },\n \"labels\": {},\n \"name\": \"\",\n \"state\": \"\",\n \"type\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/:parent/dataScans"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"createTime\": \"\",\n \"data\": {\n \"entity\": \"\",\n \"resource\": \"\"\n },\n \"dataProfileResult\": {\n \"profile\": {\n \"fields\": [\n {\n \"mode\": \"\",\n \"name\": \"\",\n \"profile\": {\n \"distinctRatio\": \"\",\n \"doubleProfile\": {\n \"average\": \"\",\n \"max\": \"\",\n \"min\": \"\",\n \"quartiles\": [],\n \"standardDeviation\": \"\"\n },\n \"integerProfile\": {\n \"average\": \"\",\n \"max\": \"\",\n \"min\": \"\",\n \"quartiles\": [],\n \"standardDeviation\": \"\"\n },\n \"nullRatio\": \"\",\n \"stringProfile\": {\n \"averageLength\": \"\",\n \"maxLength\": \"\",\n \"minLength\": \"\"\n },\n \"topNValues\": [\n {\n \"count\": \"\",\n \"value\": \"\"\n }\n ]\n },\n \"type\": \"\"\n }\n ]\n },\n \"rowCount\": \"\",\n \"scannedData\": {\n \"incrementalField\": {\n \"end\": \"\",\n \"field\": \"\",\n \"start\": \"\"\n }\n }\n },\n \"dataProfileSpec\": {},\n \"dataQualityResult\": {\n \"dimensions\": [\n {\n \"passed\": false\n }\n ],\n \"passed\": false,\n \"rowCount\": \"\",\n \"rules\": [\n {\n \"evaluatedCount\": \"\",\n \"failingRowsQuery\": \"\",\n \"nullCount\": \"\",\n \"passRatio\": \"\",\n \"passed\": false,\n \"passedCount\": \"\",\n \"rule\": {\n \"column\": \"\",\n \"dimension\": \"\",\n \"ignoreNull\": false,\n \"nonNullExpectation\": {},\n \"rangeExpectation\": {\n \"maxValue\": \"\",\n \"minValue\": \"\",\n \"strictMaxEnabled\": false,\n \"strictMinEnabled\": false\n },\n \"regexExpectation\": {\n \"regex\": \"\"\n },\n \"rowConditionExpectation\": {\n \"sqlExpression\": \"\"\n },\n \"setExpectation\": {\n \"values\": []\n },\n \"statisticRangeExpectation\": {\n \"maxValue\": \"\",\n \"minValue\": \"\",\n \"statistic\": \"\",\n \"strictMaxEnabled\": false,\n \"strictMinEnabled\": false\n },\n \"tableConditionExpectation\": {\n \"sqlExpression\": \"\"\n },\n \"threshold\": \"\",\n \"uniquenessExpectation\": {}\n }\n }\n ],\n \"scannedData\": {}\n },\n \"dataQualitySpec\": {\n \"rules\": [\n {}\n ]\n },\n \"description\": \"\",\n \"displayName\": \"\",\n \"executionSpec\": {\n \"field\": \"\",\n \"trigger\": {\n \"onDemand\": {},\n \"schedule\": {\n \"cron\": \"\"\n }\n }\n },\n \"executionStatus\": {\n \"latestJobEndTime\": \"\",\n \"latestJobStartTime\": \"\"\n },\n \"labels\": {},\n \"name\": \"\",\n \"state\": \"\",\n \"type\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"createTime\": \"\",\n \"data\": {\n \"entity\": \"\",\n \"resource\": \"\"\n },\n \"dataProfileResult\": {\n \"profile\": {\n \"fields\": [\n {\n \"mode\": \"\",\n \"name\": \"\",\n \"profile\": {\n \"distinctRatio\": \"\",\n \"doubleProfile\": {\n \"average\": \"\",\n \"max\": \"\",\n \"min\": \"\",\n \"quartiles\": [],\n \"standardDeviation\": \"\"\n },\n \"integerProfile\": {\n \"average\": \"\",\n \"max\": \"\",\n \"min\": \"\",\n \"quartiles\": [],\n \"standardDeviation\": \"\"\n },\n \"nullRatio\": \"\",\n \"stringProfile\": {\n \"averageLength\": \"\",\n \"maxLength\": \"\",\n \"minLength\": \"\"\n },\n \"topNValues\": [\n {\n \"count\": \"\",\n \"value\": \"\"\n }\n ]\n },\n \"type\": \"\"\n }\n ]\n },\n \"rowCount\": \"\",\n \"scannedData\": {\n \"incrementalField\": {\n \"end\": \"\",\n \"field\": \"\",\n \"start\": \"\"\n }\n }\n },\n \"dataProfileSpec\": {},\n \"dataQualityResult\": {\n \"dimensions\": [\n {\n \"passed\": false\n }\n ],\n \"passed\": false,\n \"rowCount\": \"\",\n \"rules\": [\n {\n \"evaluatedCount\": \"\",\n \"failingRowsQuery\": \"\",\n \"nullCount\": \"\",\n \"passRatio\": \"\",\n \"passed\": false,\n \"passedCount\": \"\",\n \"rule\": {\n \"column\": \"\",\n \"dimension\": \"\",\n \"ignoreNull\": false,\n \"nonNullExpectation\": {},\n \"rangeExpectation\": {\n \"maxValue\": \"\",\n \"minValue\": \"\",\n \"strictMaxEnabled\": false,\n \"strictMinEnabled\": false\n },\n \"regexExpectation\": {\n \"regex\": \"\"\n },\n \"rowConditionExpectation\": {\n \"sqlExpression\": \"\"\n },\n \"setExpectation\": {\n \"values\": []\n },\n \"statisticRangeExpectation\": {\n \"maxValue\": \"\",\n \"minValue\": \"\",\n \"statistic\": \"\",\n \"strictMaxEnabled\": false,\n \"strictMinEnabled\": false\n },\n \"tableConditionExpectation\": {\n \"sqlExpression\": \"\"\n },\n \"threshold\": \"\",\n \"uniquenessExpectation\": {}\n }\n }\n ],\n \"scannedData\": {}\n },\n \"dataQualitySpec\": {\n \"rules\": [\n {}\n ]\n },\n \"description\": \"\",\n \"displayName\": \"\",\n \"executionSpec\": {\n \"field\": \"\",\n \"trigger\": {\n \"onDemand\": {},\n \"schedule\": {\n \"cron\": \"\"\n }\n }\n },\n \"executionStatus\": {\n \"latestJobEndTime\": \"\",\n \"latestJobStartTime\": \"\"\n },\n \"labels\": {},\n \"name\": \"\",\n \"state\": \"\",\n \"type\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/:parent/dataScans")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1/:parent/dataScans")
.header("content-type", "application/json")
.body("{\n \"createTime\": \"\",\n \"data\": {\n \"entity\": \"\",\n \"resource\": \"\"\n },\n \"dataProfileResult\": {\n \"profile\": {\n \"fields\": [\n {\n \"mode\": \"\",\n \"name\": \"\",\n \"profile\": {\n \"distinctRatio\": \"\",\n \"doubleProfile\": {\n \"average\": \"\",\n \"max\": \"\",\n \"min\": \"\",\n \"quartiles\": [],\n \"standardDeviation\": \"\"\n },\n \"integerProfile\": {\n \"average\": \"\",\n \"max\": \"\",\n \"min\": \"\",\n \"quartiles\": [],\n \"standardDeviation\": \"\"\n },\n \"nullRatio\": \"\",\n \"stringProfile\": {\n \"averageLength\": \"\",\n \"maxLength\": \"\",\n \"minLength\": \"\"\n },\n \"topNValues\": [\n {\n \"count\": \"\",\n \"value\": \"\"\n }\n ]\n },\n \"type\": \"\"\n }\n ]\n },\n \"rowCount\": \"\",\n \"scannedData\": {\n \"incrementalField\": {\n \"end\": \"\",\n \"field\": \"\",\n \"start\": \"\"\n }\n }\n },\n \"dataProfileSpec\": {},\n \"dataQualityResult\": {\n \"dimensions\": [\n {\n \"passed\": false\n }\n ],\n \"passed\": false,\n \"rowCount\": \"\",\n \"rules\": [\n {\n \"evaluatedCount\": \"\",\n \"failingRowsQuery\": \"\",\n \"nullCount\": \"\",\n \"passRatio\": \"\",\n \"passed\": false,\n \"passedCount\": \"\",\n \"rule\": {\n \"column\": \"\",\n \"dimension\": \"\",\n \"ignoreNull\": false,\n \"nonNullExpectation\": {},\n \"rangeExpectation\": {\n \"maxValue\": \"\",\n \"minValue\": \"\",\n \"strictMaxEnabled\": false,\n \"strictMinEnabled\": false\n },\n \"regexExpectation\": {\n \"regex\": \"\"\n },\n \"rowConditionExpectation\": {\n \"sqlExpression\": \"\"\n },\n \"setExpectation\": {\n \"values\": []\n },\n \"statisticRangeExpectation\": {\n \"maxValue\": \"\",\n \"minValue\": \"\",\n \"statistic\": \"\",\n \"strictMaxEnabled\": false,\n \"strictMinEnabled\": false\n },\n \"tableConditionExpectation\": {\n \"sqlExpression\": \"\"\n },\n \"threshold\": \"\",\n \"uniquenessExpectation\": {}\n }\n }\n ],\n \"scannedData\": {}\n },\n \"dataQualitySpec\": {\n \"rules\": [\n {}\n ]\n },\n \"description\": \"\",\n \"displayName\": \"\",\n \"executionSpec\": {\n \"field\": \"\",\n \"trigger\": {\n \"onDemand\": {},\n \"schedule\": {\n \"cron\": \"\"\n }\n }\n },\n \"executionStatus\": {\n \"latestJobEndTime\": \"\",\n \"latestJobStartTime\": \"\"\n },\n \"labels\": {},\n \"name\": \"\",\n \"state\": \"\",\n \"type\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}")
.asString();
const data = JSON.stringify({
createTime: '',
data: {
entity: '',
resource: ''
},
dataProfileResult: {
profile: {
fields: [
{
mode: '',
name: '',
profile: {
distinctRatio: '',
doubleProfile: {
average: '',
max: '',
min: '',
quartiles: [],
standardDeviation: ''
},
integerProfile: {
average: '',
max: '',
min: '',
quartiles: [],
standardDeviation: ''
},
nullRatio: '',
stringProfile: {
averageLength: '',
maxLength: '',
minLength: ''
},
topNValues: [
{
count: '',
value: ''
}
]
},
type: ''
}
]
},
rowCount: '',
scannedData: {
incrementalField: {
end: '',
field: '',
start: ''
}
}
},
dataProfileSpec: {},
dataQualityResult: {
dimensions: [
{
passed: false
}
],
passed: false,
rowCount: '',
rules: [
{
evaluatedCount: '',
failingRowsQuery: '',
nullCount: '',
passRatio: '',
passed: false,
passedCount: '',
rule: {
column: '',
dimension: '',
ignoreNull: false,
nonNullExpectation: {},
rangeExpectation: {
maxValue: '',
minValue: '',
strictMaxEnabled: false,
strictMinEnabled: false
},
regexExpectation: {
regex: ''
},
rowConditionExpectation: {
sqlExpression: ''
},
setExpectation: {
values: []
},
statisticRangeExpectation: {
maxValue: '',
minValue: '',
statistic: '',
strictMaxEnabled: false,
strictMinEnabled: false
},
tableConditionExpectation: {
sqlExpression: ''
},
threshold: '',
uniquenessExpectation: {}
}
}
],
scannedData: {}
},
dataQualitySpec: {
rules: [
{}
]
},
description: '',
displayName: '',
executionSpec: {
field: '',
trigger: {
onDemand: {},
schedule: {
cron: ''
}
}
},
executionStatus: {
latestJobEndTime: '',
latestJobStartTime: ''
},
labels: {},
name: '',
state: '',
type: '',
uid: '',
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}}/v1/:parent/dataScans');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:parent/dataScans',
headers: {'content-type': 'application/json'},
data: {
createTime: '',
data: {entity: '', resource: ''},
dataProfileResult: {
profile: {
fields: [
{
mode: '',
name: '',
profile: {
distinctRatio: '',
doubleProfile: {average: '', max: '', min: '', quartiles: [], standardDeviation: ''},
integerProfile: {average: '', max: '', min: '', quartiles: [], standardDeviation: ''},
nullRatio: '',
stringProfile: {averageLength: '', maxLength: '', minLength: ''},
topNValues: [{count: '', value: ''}]
},
type: ''
}
]
},
rowCount: '',
scannedData: {incrementalField: {end: '', field: '', start: ''}}
},
dataProfileSpec: {},
dataQualityResult: {
dimensions: [{passed: false}],
passed: false,
rowCount: '',
rules: [
{
evaluatedCount: '',
failingRowsQuery: '',
nullCount: '',
passRatio: '',
passed: false,
passedCount: '',
rule: {
column: '',
dimension: '',
ignoreNull: false,
nonNullExpectation: {},
rangeExpectation: {maxValue: '', minValue: '', strictMaxEnabled: false, strictMinEnabled: false},
regexExpectation: {regex: ''},
rowConditionExpectation: {sqlExpression: ''},
setExpectation: {values: []},
statisticRangeExpectation: {
maxValue: '',
minValue: '',
statistic: '',
strictMaxEnabled: false,
strictMinEnabled: false
},
tableConditionExpectation: {sqlExpression: ''},
threshold: '',
uniquenessExpectation: {}
}
}
],
scannedData: {}
},
dataQualitySpec: {rules: [{}]},
description: '',
displayName: '',
executionSpec: {field: '', trigger: {onDemand: {}, schedule: {cron: ''}}},
executionStatus: {latestJobEndTime: '', latestJobStartTime: ''},
labels: {},
name: '',
state: '',
type: '',
uid: '',
updateTime: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/:parent/dataScans';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"createTime":"","data":{"entity":"","resource":""},"dataProfileResult":{"profile":{"fields":[{"mode":"","name":"","profile":{"distinctRatio":"","doubleProfile":{"average":"","max":"","min":"","quartiles":[],"standardDeviation":""},"integerProfile":{"average":"","max":"","min":"","quartiles":[],"standardDeviation":""},"nullRatio":"","stringProfile":{"averageLength":"","maxLength":"","minLength":""},"topNValues":[{"count":"","value":""}]},"type":""}]},"rowCount":"","scannedData":{"incrementalField":{"end":"","field":"","start":""}}},"dataProfileSpec":{},"dataQualityResult":{"dimensions":[{"passed":false}],"passed":false,"rowCount":"","rules":[{"evaluatedCount":"","failingRowsQuery":"","nullCount":"","passRatio":"","passed":false,"passedCount":"","rule":{"column":"","dimension":"","ignoreNull":false,"nonNullExpectation":{},"rangeExpectation":{"maxValue":"","minValue":"","strictMaxEnabled":false,"strictMinEnabled":false},"regexExpectation":{"regex":""},"rowConditionExpectation":{"sqlExpression":""},"setExpectation":{"values":[]},"statisticRangeExpectation":{"maxValue":"","minValue":"","statistic":"","strictMaxEnabled":false,"strictMinEnabled":false},"tableConditionExpectation":{"sqlExpression":""},"threshold":"","uniquenessExpectation":{}}}],"scannedData":{}},"dataQualitySpec":{"rules":[{}]},"description":"","displayName":"","executionSpec":{"field":"","trigger":{"onDemand":{},"schedule":{"cron":""}}},"executionStatus":{"latestJobEndTime":"","latestJobStartTime":""},"labels":{},"name":"","state":"","type":"","uid":"","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}}/v1/:parent/dataScans',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "createTime": "",\n "data": {\n "entity": "",\n "resource": ""\n },\n "dataProfileResult": {\n "profile": {\n "fields": [\n {\n "mode": "",\n "name": "",\n "profile": {\n "distinctRatio": "",\n "doubleProfile": {\n "average": "",\n "max": "",\n "min": "",\n "quartiles": [],\n "standardDeviation": ""\n },\n "integerProfile": {\n "average": "",\n "max": "",\n "min": "",\n "quartiles": [],\n "standardDeviation": ""\n },\n "nullRatio": "",\n "stringProfile": {\n "averageLength": "",\n "maxLength": "",\n "minLength": ""\n },\n "topNValues": [\n {\n "count": "",\n "value": ""\n }\n ]\n },\n "type": ""\n }\n ]\n },\n "rowCount": "",\n "scannedData": {\n "incrementalField": {\n "end": "",\n "field": "",\n "start": ""\n }\n }\n },\n "dataProfileSpec": {},\n "dataQualityResult": {\n "dimensions": [\n {\n "passed": false\n }\n ],\n "passed": false,\n "rowCount": "",\n "rules": [\n {\n "evaluatedCount": "",\n "failingRowsQuery": "",\n "nullCount": "",\n "passRatio": "",\n "passed": false,\n "passedCount": "",\n "rule": {\n "column": "",\n "dimension": "",\n "ignoreNull": false,\n "nonNullExpectation": {},\n "rangeExpectation": {\n "maxValue": "",\n "minValue": "",\n "strictMaxEnabled": false,\n "strictMinEnabled": false\n },\n "regexExpectation": {\n "regex": ""\n },\n "rowConditionExpectation": {\n "sqlExpression": ""\n },\n "setExpectation": {\n "values": []\n },\n "statisticRangeExpectation": {\n "maxValue": "",\n "minValue": "",\n "statistic": "",\n "strictMaxEnabled": false,\n "strictMinEnabled": false\n },\n "tableConditionExpectation": {\n "sqlExpression": ""\n },\n "threshold": "",\n "uniquenessExpectation": {}\n }\n }\n ],\n "scannedData": {}\n },\n "dataQualitySpec": {\n "rules": [\n {}\n ]\n },\n "description": "",\n "displayName": "",\n "executionSpec": {\n "field": "",\n "trigger": {\n "onDemand": {},\n "schedule": {\n "cron": ""\n }\n }\n },\n "executionStatus": {\n "latestJobEndTime": "",\n "latestJobStartTime": ""\n },\n "labels": {},\n "name": "",\n "state": "",\n "type": "",\n "uid": "",\n "updateTime": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"createTime\": \"\",\n \"data\": {\n \"entity\": \"\",\n \"resource\": \"\"\n },\n \"dataProfileResult\": {\n \"profile\": {\n \"fields\": [\n {\n \"mode\": \"\",\n \"name\": \"\",\n \"profile\": {\n \"distinctRatio\": \"\",\n \"doubleProfile\": {\n \"average\": \"\",\n \"max\": \"\",\n \"min\": \"\",\n \"quartiles\": [],\n \"standardDeviation\": \"\"\n },\n \"integerProfile\": {\n \"average\": \"\",\n \"max\": \"\",\n \"min\": \"\",\n \"quartiles\": [],\n \"standardDeviation\": \"\"\n },\n \"nullRatio\": \"\",\n \"stringProfile\": {\n \"averageLength\": \"\",\n \"maxLength\": \"\",\n \"minLength\": \"\"\n },\n \"topNValues\": [\n {\n \"count\": \"\",\n \"value\": \"\"\n }\n ]\n },\n \"type\": \"\"\n }\n ]\n },\n \"rowCount\": \"\",\n \"scannedData\": {\n \"incrementalField\": {\n \"end\": \"\",\n \"field\": \"\",\n \"start\": \"\"\n }\n }\n },\n \"dataProfileSpec\": {},\n \"dataQualityResult\": {\n \"dimensions\": [\n {\n \"passed\": false\n }\n ],\n \"passed\": false,\n \"rowCount\": \"\",\n \"rules\": [\n {\n \"evaluatedCount\": \"\",\n \"failingRowsQuery\": \"\",\n \"nullCount\": \"\",\n \"passRatio\": \"\",\n \"passed\": false,\n \"passedCount\": \"\",\n \"rule\": {\n \"column\": \"\",\n \"dimension\": \"\",\n \"ignoreNull\": false,\n \"nonNullExpectation\": {},\n \"rangeExpectation\": {\n \"maxValue\": \"\",\n \"minValue\": \"\",\n \"strictMaxEnabled\": false,\n \"strictMinEnabled\": false\n },\n \"regexExpectation\": {\n \"regex\": \"\"\n },\n \"rowConditionExpectation\": {\n \"sqlExpression\": \"\"\n },\n \"setExpectation\": {\n \"values\": []\n },\n \"statisticRangeExpectation\": {\n \"maxValue\": \"\",\n \"minValue\": \"\",\n \"statistic\": \"\",\n \"strictMaxEnabled\": false,\n \"strictMinEnabled\": false\n },\n \"tableConditionExpectation\": {\n \"sqlExpression\": \"\"\n },\n \"threshold\": \"\",\n \"uniquenessExpectation\": {}\n }\n }\n ],\n \"scannedData\": {}\n },\n \"dataQualitySpec\": {\n \"rules\": [\n {}\n ]\n },\n \"description\": \"\",\n \"displayName\": \"\",\n \"executionSpec\": {\n \"field\": \"\",\n \"trigger\": {\n \"onDemand\": {},\n \"schedule\": {\n \"cron\": \"\"\n }\n }\n },\n \"executionStatus\": {\n \"latestJobEndTime\": \"\",\n \"latestJobStartTime\": \"\"\n },\n \"labels\": {},\n \"name\": \"\",\n \"state\": \"\",\n \"type\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1/:parent/dataScans")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/:parent/dataScans',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
createTime: '',
data: {entity: '', resource: ''},
dataProfileResult: {
profile: {
fields: [
{
mode: '',
name: '',
profile: {
distinctRatio: '',
doubleProfile: {average: '', max: '', min: '', quartiles: [], standardDeviation: ''},
integerProfile: {average: '', max: '', min: '', quartiles: [], standardDeviation: ''},
nullRatio: '',
stringProfile: {averageLength: '', maxLength: '', minLength: ''},
topNValues: [{count: '', value: ''}]
},
type: ''
}
]
},
rowCount: '',
scannedData: {incrementalField: {end: '', field: '', start: ''}}
},
dataProfileSpec: {},
dataQualityResult: {
dimensions: [{passed: false}],
passed: false,
rowCount: '',
rules: [
{
evaluatedCount: '',
failingRowsQuery: '',
nullCount: '',
passRatio: '',
passed: false,
passedCount: '',
rule: {
column: '',
dimension: '',
ignoreNull: false,
nonNullExpectation: {},
rangeExpectation: {maxValue: '', minValue: '', strictMaxEnabled: false, strictMinEnabled: false},
regexExpectation: {regex: ''},
rowConditionExpectation: {sqlExpression: ''},
setExpectation: {values: []},
statisticRangeExpectation: {
maxValue: '',
minValue: '',
statistic: '',
strictMaxEnabled: false,
strictMinEnabled: false
},
tableConditionExpectation: {sqlExpression: ''},
threshold: '',
uniquenessExpectation: {}
}
}
],
scannedData: {}
},
dataQualitySpec: {rules: [{}]},
description: '',
displayName: '',
executionSpec: {field: '', trigger: {onDemand: {}, schedule: {cron: ''}}},
executionStatus: {latestJobEndTime: '', latestJobStartTime: ''},
labels: {},
name: '',
state: '',
type: '',
uid: '',
updateTime: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:parent/dataScans',
headers: {'content-type': 'application/json'},
body: {
createTime: '',
data: {entity: '', resource: ''},
dataProfileResult: {
profile: {
fields: [
{
mode: '',
name: '',
profile: {
distinctRatio: '',
doubleProfile: {average: '', max: '', min: '', quartiles: [], standardDeviation: ''},
integerProfile: {average: '', max: '', min: '', quartiles: [], standardDeviation: ''},
nullRatio: '',
stringProfile: {averageLength: '', maxLength: '', minLength: ''},
topNValues: [{count: '', value: ''}]
},
type: ''
}
]
},
rowCount: '',
scannedData: {incrementalField: {end: '', field: '', start: ''}}
},
dataProfileSpec: {},
dataQualityResult: {
dimensions: [{passed: false}],
passed: false,
rowCount: '',
rules: [
{
evaluatedCount: '',
failingRowsQuery: '',
nullCount: '',
passRatio: '',
passed: false,
passedCount: '',
rule: {
column: '',
dimension: '',
ignoreNull: false,
nonNullExpectation: {},
rangeExpectation: {maxValue: '', minValue: '', strictMaxEnabled: false, strictMinEnabled: false},
regexExpectation: {regex: ''},
rowConditionExpectation: {sqlExpression: ''},
setExpectation: {values: []},
statisticRangeExpectation: {
maxValue: '',
minValue: '',
statistic: '',
strictMaxEnabled: false,
strictMinEnabled: false
},
tableConditionExpectation: {sqlExpression: ''},
threshold: '',
uniquenessExpectation: {}
}
}
],
scannedData: {}
},
dataQualitySpec: {rules: [{}]},
description: '',
displayName: '',
executionSpec: {field: '', trigger: {onDemand: {}, schedule: {cron: ''}}},
executionStatus: {latestJobEndTime: '', latestJobStartTime: ''},
labels: {},
name: '',
state: '',
type: '',
uid: '',
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}}/v1/:parent/dataScans');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
createTime: '',
data: {
entity: '',
resource: ''
},
dataProfileResult: {
profile: {
fields: [
{
mode: '',
name: '',
profile: {
distinctRatio: '',
doubleProfile: {
average: '',
max: '',
min: '',
quartiles: [],
standardDeviation: ''
},
integerProfile: {
average: '',
max: '',
min: '',
quartiles: [],
standardDeviation: ''
},
nullRatio: '',
stringProfile: {
averageLength: '',
maxLength: '',
minLength: ''
},
topNValues: [
{
count: '',
value: ''
}
]
},
type: ''
}
]
},
rowCount: '',
scannedData: {
incrementalField: {
end: '',
field: '',
start: ''
}
}
},
dataProfileSpec: {},
dataQualityResult: {
dimensions: [
{
passed: false
}
],
passed: false,
rowCount: '',
rules: [
{
evaluatedCount: '',
failingRowsQuery: '',
nullCount: '',
passRatio: '',
passed: false,
passedCount: '',
rule: {
column: '',
dimension: '',
ignoreNull: false,
nonNullExpectation: {},
rangeExpectation: {
maxValue: '',
minValue: '',
strictMaxEnabled: false,
strictMinEnabled: false
},
regexExpectation: {
regex: ''
},
rowConditionExpectation: {
sqlExpression: ''
},
setExpectation: {
values: []
},
statisticRangeExpectation: {
maxValue: '',
minValue: '',
statistic: '',
strictMaxEnabled: false,
strictMinEnabled: false
},
tableConditionExpectation: {
sqlExpression: ''
},
threshold: '',
uniquenessExpectation: {}
}
}
],
scannedData: {}
},
dataQualitySpec: {
rules: [
{}
]
},
description: '',
displayName: '',
executionSpec: {
field: '',
trigger: {
onDemand: {},
schedule: {
cron: ''
}
}
},
executionStatus: {
latestJobEndTime: '',
latestJobStartTime: ''
},
labels: {},
name: '',
state: '',
type: '',
uid: '',
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}}/v1/:parent/dataScans',
headers: {'content-type': 'application/json'},
data: {
createTime: '',
data: {entity: '', resource: ''},
dataProfileResult: {
profile: {
fields: [
{
mode: '',
name: '',
profile: {
distinctRatio: '',
doubleProfile: {average: '', max: '', min: '', quartiles: [], standardDeviation: ''},
integerProfile: {average: '', max: '', min: '', quartiles: [], standardDeviation: ''},
nullRatio: '',
stringProfile: {averageLength: '', maxLength: '', minLength: ''},
topNValues: [{count: '', value: ''}]
},
type: ''
}
]
},
rowCount: '',
scannedData: {incrementalField: {end: '', field: '', start: ''}}
},
dataProfileSpec: {},
dataQualityResult: {
dimensions: [{passed: false}],
passed: false,
rowCount: '',
rules: [
{
evaluatedCount: '',
failingRowsQuery: '',
nullCount: '',
passRatio: '',
passed: false,
passedCount: '',
rule: {
column: '',
dimension: '',
ignoreNull: false,
nonNullExpectation: {},
rangeExpectation: {maxValue: '', minValue: '', strictMaxEnabled: false, strictMinEnabled: false},
regexExpectation: {regex: ''},
rowConditionExpectation: {sqlExpression: ''},
setExpectation: {values: []},
statisticRangeExpectation: {
maxValue: '',
minValue: '',
statistic: '',
strictMaxEnabled: false,
strictMinEnabled: false
},
tableConditionExpectation: {sqlExpression: ''},
threshold: '',
uniquenessExpectation: {}
}
}
],
scannedData: {}
},
dataQualitySpec: {rules: [{}]},
description: '',
displayName: '',
executionSpec: {field: '', trigger: {onDemand: {}, schedule: {cron: ''}}},
executionStatus: {latestJobEndTime: '', latestJobStartTime: ''},
labels: {},
name: '',
state: '',
type: '',
uid: '',
updateTime: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/:parent/dataScans';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"createTime":"","data":{"entity":"","resource":""},"dataProfileResult":{"profile":{"fields":[{"mode":"","name":"","profile":{"distinctRatio":"","doubleProfile":{"average":"","max":"","min":"","quartiles":[],"standardDeviation":""},"integerProfile":{"average":"","max":"","min":"","quartiles":[],"standardDeviation":""},"nullRatio":"","stringProfile":{"averageLength":"","maxLength":"","minLength":""},"topNValues":[{"count":"","value":""}]},"type":""}]},"rowCount":"","scannedData":{"incrementalField":{"end":"","field":"","start":""}}},"dataProfileSpec":{},"dataQualityResult":{"dimensions":[{"passed":false}],"passed":false,"rowCount":"","rules":[{"evaluatedCount":"","failingRowsQuery":"","nullCount":"","passRatio":"","passed":false,"passedCount":"","rule":{"column":"","dimension":"","ignoreNull":false,"nonNullExpectation":{},"rangeExpectation":{"maxValue":"","minValue":"","strictMaxEnabled":false,"strictMinEnabled":false},"regexExpectation":{"regex":""},"rowConditionExpectation":{"sqlExpression":""},"setExpectation":{"values":[]},"statisticRangeExpectation":{"maxValue":"","minValue":"","statistic":"","strictMaxEnabled":false,"strictMinEnabled":false},"tableConditionExpectation":{"sqlExpression":""},"threshold":"","uniquenessExpectation":{}}}],"scannedData":{}},"dataQualitySpec":{"rules":[{}]},"description":"","displayName":"","executionSpec":{"field":"","trigger":{"onDemand":{},"schedule":{"cron":""}}},"executionStatus":{"latestJobEndTime":"","latestJobStartTime":""},"labels":{},"name":"","state":"","type":"","uid":"","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 = @{ @"createTime": @"",
@"data": @{ @"entity": @"", @"resource": @"" },
@"dataProfileResult": @{ @"profile": @{ @"fields": @[ @{ @"mode": @"", @"name": @"", @"profile": @{ @"distinctRatio": @"", @"doubleProfile": @{ @"average": @"", @"max": @"", @"min": @"", @"quartiles": @[ ], @"standardDeviation": @"" }, @"integerProfile": @{ @"average": @"", @"max": @"", @"min": @"", @"quartiles": @[ ], @"standardDeviation": @"" }, @"nullRatio": @"", @"stringProfile": @{ @"averageLength": @"", @"maxLength": @"", @"minLength": @"" }, @"topNValues": @[ @{ @"count": @"", @"value": @"" } ] }, @"type": @"" } ] }, @"rowCount": @"", @"scannedData": @{ @"incrementalField": @{ @"end": @"", @"field": @"", @"start": @"" } } },
@"dataProfileSpec": @{ },
@"dataQualityResult": @{ @"dimensions": @[ @{ @"passed": @NO } ], @"passed": @NO, @"rowCount": @"", @"rules": @[ @{ @"evaluatedCount": @"", @"failingRowsQuery": @"", @"nullCount": @"", @"passRatio": @"", @"passed": @NO, @"passedCount": @"", @"rule": @{ @"column": @"", @"dimension": @"", @"ignoreNull": @NO, @"nonNullExpectation": @{ }, @"rangeExpectation": @{ @"maxValue": @"", @"minValue": @"", @"strictMaxEnabled": @NO, @"strictMinEnabled": @NO }, @"regexExpectation": @{ @"regex": @"" }, @"rowConditionExpectation": @{ @"sqlExpression": @"" }, @"setExpectation": @{ @"values": @[ ] }, @"statisticRangeExpectation": @{ @"maxValue": @"", @"minValue": @"", @"statistic": @"", @"strictMaxEnabled": @NO, @"strictMinEnabled": @NO }, @"tableConditionExpectation": @{ @"sqlExpression": @"" }, @"threshold": @"", @"uniquenessExpectation": @{ } } } ], @"scannedData": @{ } },
@"dataQualitySpec": @{ @"rules": @[ @{ } ] },
@"description": @"",
@"displayName": @"",
@"executionSpec": @{ @"field": @"", @"trigger": @{ @"onDemand": @{ }, @"schedule": @{ @"cron": @"" } } },
@"executionStatus": @{ @"latestJobEndTime": @"", @"latestJobStartTime": @"" },
@"labels": @{ },
@"name": @"",
@"state": @"",
@"type": @"",
@"uid": @"",
@"updateTime": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:parent/dataScans"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/:parent/dataScans" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"createTime\": \"\",\n \"data\": {\n \"entity\": \"\",\n \"resource\": \"\"\n },\n \"dataProfileResult\": {\n \"profile\": {\n \"fields\": [\n {\n \"mode\": \"\",\n \"name\": \"\",\n \"profile\": {\n \"distinctRatio\": \"\",\n \"doubleProfile\": {\n \"average\": \"\",\n \"max\": \"\",\n \"min\": \"\",\n \"quartiles\": [],\n \"standardDeviation\": \"\"\n },\n \"integerProfile\": {\n \"average\": \"\",\n \"max\": \"\",\n \"min\": \"\",\n \"quartiles\": [],\n \"standardDeviation\": \"\"\n },\n \"nullRatio\": \"\",\n \"stringProfile\": {\n \"averageLength\": \"\",\n \"maxLength\": \"\",\n \"minLength\": \"\"\n },\n \"topNValues\": [\n {\n \"count\": \"\",\n \"value\": \"\"\n }\n ]\n },\n \"type\": \"\"\n }\n ]\n },\n \"rowCount\": \"\",\n \"scannedData\": {\n \"incrementalField\": {\n \"end\": \"\",\n \"field\": \"\",\n \"start\": \"\"\n }\n }\n },\n \"dataProfileSpec\": {},\n \"dataQualityResult\": {\n \"dimensions\": [\n {\n \"passed\": false\n }\n ],\n \"passed\": false,\n \"rowCount\": \"\",\n \"rules\": [\n {\n \"evaluatedCount\": \"\",\n \"failingRowsQuery\": \"\",\n \"nullCount\": \"\",\n \"passRatio\": \"\",\n \"passed\": false,\n \"passedCount\": \"\",\n \"rule\": {\n \"column\": \"\",\n \"dimension\": \"\",\n \"ignoreNull\": false,\n \"nonNullExpectation\": {},\n \"rangeExpectation\": {\n \"maxValue\": \"\",\n \"minValue\": \"\",\n \"strictMaxEnabled\": false,\n \"strictMinEnabled\": false\n },\n \"regexExpectation\": {\n \"regex\": \"\"\n },\n \"rowConditionExpectation\": {\n \"sqlExpression\": \"\"\n },\n \"setExpectation\": {\n \"values\": []\n },\n \"statisticRangeExpectation\": {\n \"maxValue\": \"\",\n \"minValue\": \"\",\n \"statistic\": \"\",\n \"strictMaxEnabled\": false,\n \"strictMinEnabled\": false\n },\n \"tableConditionExpectation\": {\n \"sqlExpression\": \"\"\n },\n \"threshold\": \"\",\n \"uniquenessExpectation\": {}\n }\n }\n ],\n \"scannedData\": {}\n },\n \"dataQualitySpec\": {\n \"rules\": [\n {}\n ]\n },\n \"description\": \"\",\n \"displayName\": \"\",\n \"executionSpec\": {\n \"field\": \"\",\n \"trigger\": {\n \"onDemand\": {},\n \"schedule\": {\n \"cron\": \"\"\n }\n }\n },\n \"executionStatus\": {\n \"latestJobEndTime\": \"\",\n \"latestJobStartTime\": \"\"\n },\n \"labels\": {},\n \"name\": \"\",\n \"state\": \"\",\n \"type\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/:parent/dataScans",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'createTime' => '',
'data' => [
'entity' => '',
'resource' => ''
],
'dataProfileResult' => [
'profile' => [
'fields' => [
[
'mode' => '',
'name' => '',
'profile' => [
'distinctRatio' => '',
'doubleProfile' => [
'average' => '',
'max' => '',
'min' => '',
'quartiles' => [
],
'standardDeviation' => ''
],
'integerProfile' => [
'average' => '',
'max' => '',
'min' => '',
'quartiles' => [
],
'standardDeviation' => ''
],
'nullRatio' => '',
'stringProfile' => [
'averageLength' => '',
'maxLength' => '',
'minLength' => ''
],
'topNValues' => [
[
'count' => '',
'value' => ''
]
]
],
'type' => ''
]
]
],
'rowCount' => '',
'scannedData' => [
'incrementalField' => [
'end' => '',
'field' => '',
'start' => ''
]
]
],
'dataProfileSpec' => [
],
'dataQualityResult' => [
'dimensions' => [
[
'passed' => null
]
],
'passed' => null,
'rowCount' => '',
'rules' => [
[
'evaluatedCount' => '',
'failingRowsQuery' => '',
'nullCount' => '',
'passRatio' => '',
'passed' => null,
'passedCount' => '',
'rule' => [
'column' => '',
'dimension' => '',
'ignoreNull' => null,
'nonNullExpectation' => [
],
'rangeExpectation' => [
'maxValue' => '',
'minValue' => '',
'strictMaxEnabled' => null,
'strictMinEnabled' => null
],
'regexExpectation' => [
'regex' => ''
],
'rowConditionExpectation' => [
'sqlExpression' => ''
],
'setExpectation' => [
'values' => [
]
],
'statisticRangeExpectation' => [
'maxValue' => '',
'minValue' => '',
'statistic' => '',
'strictMaxEnabled' => null,
'strictMinEnabled' => null
],
'tableConditionExpectation' => [
'sqlExpression' => ''
],
'threshold' => '',
'uniquenessExpectation' => [
]
]
]
],
'scannedData' => [
]
],
'dataQualitySpec' => [
'rules' => [
[
]
]
],
'description' => '',
'displayName' => '',
'executionSpec' => [
'field' => '',
'trigger' => [
'onDemand' => [
],
'schedule' => [
'cron' => ''
]
]
],
'executionStatus' => [
'latestJobEndTime' => '',
'latestJobStartTime' => ''
],
'labels' => [
],
'name' => '',
'state' => '',
'type' => '',
'uid' => '',
'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}}/v1/:parent/dataScans', [
'body' => '{
"createTime": "",
"data": {
"entity": "",
"resource": ""
},
"dataProfileResult": {
"profile": {
"fields": [
{
"mode": "",
"name": "",
"profile": {
"distinctRatio": "",
"doubleProfile": {
"average": "",
"max": "",
"min": "",
"quartiles": [],
"standardDeviation": ""
},
"integerProfile": {
"average": "",
"max": "",
"min": "",
"quartiles": [],
"standardDeviation": ""
},
"nullRatio": "",
"stringProfile": {
"averageLength": "",
"maxLength": "",
"minLength": ""
},
"topNValues": [
{
"count": "",
"value": ""
}
]
},
"type": ""
}
]
},
"rowCount": "",
"scannedData": {
"incrementalField": {
"end": "",
"field": "",
"start": ""
}
}
},
"dataProfileSpec": {},
"dataQualityResult": {
"dimensions": [
{
"passed": false
}
],
"passed": false,
"rowCount": "",
"rules": [
{
"evaluatedCount": "",
"failingRowsQuery": "",
"nullCount": "",
"passRatio": "",
"passed": false,
"passedCount": "",
"rule": {
"column": "",
"dimension": "",
"ignoreNull": false,
"nonNullExpectation": {},
"rangeExpectation": {
"maxValue": "",
"minValue": "",
"strictMaxEnabled": false,
"strictMinEnabled": false
},
"regexExpectation": {
"regex": ""
},
"rowConditionExpectation": {
"sqlExpression": ""
},
"setExpectation": {
"values": []
},
"statisticRangeExpectation": {
"maxValue": "",
"minValue": "",
"statistic": "",
"strictMaxEnabled": false,
"strictMinEnabled": false
},
"tableConditionExpectation": {
"sqlExpression": ""
},
"threshold": "",
"uniquenessExpectation": {}
}
}
],
"scannedData": {}
},
"dataQualitySpec": {
"rules": [
{}
]
},
"description": "",
"displayName": "",
"executionSpec": {
"field": "",
"trigger": {
"onDemand": {},
"schedule": {
"cron": ""
}
}
},
"executionStatus": {
"latestJobEndTime": "",
"latestJobStartTime": ""
},
"labels": {},
"name": "",
"state": "",
"type": "",
"uid": "",
"updateTime": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1/:parent/dataScans');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'createTime' => '',
'data' => [
'entity' => '',
'resource' => ''
],
'dataProfileResult' => [
'profile' => [
'fields' => [
[
'mode' => '',
'name' => '',
'profile' => [
'distinctRatio' => '',
'doubleProfile' => [
'average' => '',
'max' => '',
'min' => '',
'quartiles' => [
],
'standardDeviation' => ''
],
'integerProfile' => [
'average' => '',
'max' => '',
'min' => '',
'quartiles' => [
],
'standardDeviation' => ''
],
'nullRatio' => '',
'stringProfile' => [
'averageLength' => '',
'maxLength' => '',
'minLength' => ''
],
'topNValues' => [
[
'count' => '',
'value' => ''
]
]
],
'type' => ''
]
]
],
'rowCount' => '',
'scannedData' => [
'incrementalField' => [
'end' => '',
'field' => '',
'start' => ''
]
]
],
'dataProfileSpec' => [
],
'dataQualityResult' => [
'dimensions' => [
[
'passed' => null
]
],
'passed' => null,
'rowCount' => '',
'rules' => [
[
'evaluatedCount' => '',
'failingRowsQuery' => '',
'nullCount' => '',
'passRatio' => '',
'passed' => null,
'passedCount' => '',
'rule' => [
'column' => '',
'dimension' => '',
'ignoreNull' => null,
'nonNullExpectation' => [
],
'rangeExpectation' => [
'maxValue' => '',
'minValue' => '',
'strictMaxEnabled' => null,
'strictMinEnabled' => null
],
'regexExpectation' => [
'regex' => ''
],
'rowConditionExpectation' => [
'sqlExpression' => ''
],
'setExpectation' => [
'values' => [
]
],
'statisticRangeExpectation' => [
'maxValue' => '',
'minValue' => '',
'statistic' => '',
'strictMaxEnabled' => null,
'strictMinEnabled' => null
],
'tableConditionExpectation' => [
'sqlExpression' => ''
],
'threshold' => '',
'uniquenessExpectation' => [
]
]
]
],
'scannedData' => [
]
],
'dataQualitySpec' => [
'rules' => [
[
]
]
],
'description' => '',
'displayName' => '',
'executionSpec' => [
'field' => '',
'trigger' => [
'onDemand' => [
],
'schedule' => [
'cron' => ''
]
]
],
'executionStatus' => [
'latestJobEndTime' => '',
'latestJobStartTime' => ''
],
'labels' => [
],
'name' => '',
'state' => '',
'type' => '',
'uid' => '',
'updateTime' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'createTime' => '',
'data' => [
'entity' => '',
'resource' => ''
],
'dataProfileResult' => [
'profile' => [
'fields' => [
[
'mode' => '',
'name' => '',
'profile' => [
'distinctRatio' => '',
'doubleProfile' => [
'average' => '',
'max' => '',
'min' => '',
'quartiles' => [
],
'standardDeviation' => ''
],
'integerProfile' => [
'average' => '',
'max' => '',
'min' => '',
'quartiles' => [
],
'standardDeviation' => ''
],
'nullRatio' => '',
'stringProfile' => [
'averageLength' => '',
'maxLength' => '',
'minLength' => ''
],
'topNValues' => [
[
'count' => '',
'value' => ''
]
]
],
'type' => ''
]
]
],
'rowCount' => '',
'scannedData' => [
'incrementalField' => [
'end' => '',
'field' => '',
'start' => ''
]
]
],
'dataProfileSpec' => [
],
'dataQualityResult' => [
'dimensions' => [
[
'passed' => null
]
],
'passed' => null,
'rowCount' => '',
'rules' => [
[
'evaluatedCount' => '',
'failingRowsQuery' => '',
'nullCount' => '',
'passRatio' => '',
'passed' => null,
'passedCount' => '',
'rule' => [
'column' => '',
'dimension' => '',
'ignoreNull' => null,
'nonNullExpectation' => [
],
'rangeExpectation' => [
'maxValue' => '',
'minValue' => '',
'strictMaxEnabled' => null,
'strictMinEnabled' => null
],
'regexExpectation' => [
'regex' => ''
],
'rowConditionExpectation' => [
'sqlExpression' => ''
],
'setExpectation' => [
'values' => [
]
],
'statisticRangeExpectation' => [
'maxValue' => '',
'minValue' => '',
'statistic' => '',
'strictMaxEnabled' => null,
'strictMinEnabled' => null
],
'tableConditionExpectation' => [
'sqlExpression' => ''
],
'threshold' => '',
'uniquenessExpectation' => [
]
]
]
],
'scannedData' => [
]
],
'dataQualitySpec' => [
'rules' => [
[
]
]
],
'description' => '',
'displayName' => '',
'executionSpec' => [
'field' => '',
'trigger' => [
'onDemand' => [
],
'schedule' => [
'cron' => ''
]
]
],
'executionStatus' => [
'latestJobEndTime' => '',
'latestJobStartTime' => ''
],
'labels' => [
],
'name' => '',
'state' => '',
'type' => '',
'uid' => '',
'updateTime' => ''
]));
$request->setRequestUrl('{{baseUrl}}/v1/:parent/dataScans');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:parent/dataScans' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"createTime": "",
"data": {
"entity": "",
"resource": ""
},
"dataProfileResult": {
"profile": {
"fields": [
{
"mode": "",
"name": "",
"profile": {
"distinctRatio": "",
"doubleProfile": {
"average": "",
"max": "",
"min": "",
"quartiles": [],
"standardDeviation": ""
},
"integerProfile": {
"average": "",
"max": "",
"min": "",
"quartiles": [],
"standardDeviation": ""
},
"nullRatio": "",
"stringProfile": {
"averageLength": "",
"maxLength": "",
"minLength": ""
},
"topNValues": [
{
"count": "",
"value": ""
}
]
},
"type": ""
}
]
},
"rowCount": "",
"scannedData": {
"incrementalField": {
"end": "",
"field": "",
"start": ""
}
}
},
"dataProfileSpec": {},
"dataQualityResult": {
"dimensions": [
{
"passed": false
}
],
"passed": false,
"rowCount": "",
"rules": [
{
"evaluatedCount": "",
"failingRowsQuery": "",
"nullCount": "",
"passRatio": "",
"passed": false,
"passedCount": "",
"rule": {
"column": "",
"dimension": "",
"ignoreNull": false,
"nonNullExpectation": {},
"rangeExpectation": {
"maxValue": "",
"minValue": "",
"strictMaxEnabled": false,
"strictMinEnabled": false
},
"regexExpectation": {
"regex": ""
},
"rowConditionExpectation": {
"sqlExpression": ""
},
"setExpectation": {
"values": []
},
"statisticRangeExpectation": {
"maxValue": "",
"minValue": "",
"statistic": "",
"strictMaxEnabled": false,
"strictMinEnabled": false
},
"tableConditionExpectation": {
"sqlExpression": ""
},
"threshold": "",
"uniquenessExpectation": {}
}
}
],
"scannedData": {}
},
"dataQualitySpec": {
"rules": [
{}
]
},
"description": "",
"displayName": "",
"executionSpec": {
"field": "",
"trigger": {
"onDemand": {},
"schedule": {
"cron": ""
}
}
},
"executionStatus": {
"latestJobEndTime": "",
"latestJobStartTime": ""
},
"labels": {},
"name": "",
"state": "",
"type": "",
"uid": "",
"updateTime": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:parent/dataScans' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"createTime": "",
"data": {
"entity": "",
"resource": ""
},
"dataProfileResult": {
"profile": {
"fields": [
{
"mode": "",
"name": "",
"profile": {
"distinctRatio": "",
"doubleProfile": {
"average": "",
"max": "",
"min": "",
"quartiles": [],
"standardDeviation": ""
},
"integerProfile": {
"average": "",
"max": "",
"min": "",
"quartiles": [],
"standardDeviation": ""
},
"nullRatio": "",
"stringProfile": {
"averageLength": "",
"maxLength": "",
"minLength": ""
},
"topNValues": [
{
"count": "",
"value": ""
}
]
},
"type": ""
}
]
},
"rowCount": "",
"scannedData": {
"incrementalField": {
"end": "",
"field": "",
"start": ""
}
}
},
"dataProfileSpec": {},
"dataQualityResult": {
"dimensions": [
{
"passed": false
}
],
"passed": false,
"rowCount": "",
"rules": [
{
"evaluatedCount": "",
"failingRowsQuery": "",
"nullCount": "",
"passRatio": "",
"passed": false,
"passedCount": "",
"rule": {
"column": "",
"dimension": "",
"ignoreNull": false,
"nonNullExpectation": {},
"rangeExpectation": {
"maxValue": "",
"minValue": "",
"strictMaxEnabled": false,
"strictMinEnabled": false
},
"regexExpectation": {
"regex": ""
},
"rowConditionExpectation": {
"sqlExpression": ""
},
"setExpectation": {
"values": []
},
"statisticRangeExpectation": {
"maxValue": "",
"minValue": "",
"statistic": "",
"strictMaxEnabled": false,
"strictMinEnabled": false
},
"tableConditionExpectation": {
"sqlExpression": ""
},
"threshold": "",
"uniquenessExpectation": {}
}
}
],
"scannedData": {}
},
"dataQualitySpec": {
"rules": [
{}
]
},
"description": "",
"displayName": "",
"executionSpec": {
"field": "",
"trigger": {
"onDemand": {},
"schedule": {
"cron": ""
}
}
},
"executionStatus": {
"latestJobEndTime": "",
"latestJobStartTime": ""
},
"labels": {},
"name": "",
"state": "",
"type": "",
"uid": "",
"updateTime": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"createTime\": \"\",\n \"data\": {\n \"entity\": \"\",\n \"resource\": \"\"\n },\n \"dataProfileResult\": {\n \"profile\": {\n \"fields\": [\n {\n \"mode\": \"\",\n \"name\": \"\",\n \"profile\": {\n \"distinctRatio\": \"\",\n \"doubleProfile\": {\n \"average\": \"\",\n \"max\": \"\",\n \"min\": \"\",\n \"quartiles\": [],\n \"standardDeviation\": \"\"\n },\n \"integerProfile\": {\n \"average\": \"\",\n \"max\": \"\",\n \"min\": \"\",\n \"quartiles\": [],\n \"standardDeviation\": \"\"\n },\n \"nullRatio\": \"\",\n \"stringProfile\": {\n \"averageLength\": \"\",\n \"maxLength\": \"\",\n \"minLength\": \"\"\n },\n \"topNValues\": [\n {\n \"count\": \"\",\n \"value\": \"\"\n }\n ]\n },\n \"type\": \"\"\n }\n ]\n },\n \"rowCount\": \"\",\n \"scannedData\": {\n \"incrementalField\": {\n \"end\": \"\",\n \"field\": \"\",\n \"start\": \"\"\n }\n }\n },\n \"dataProfileSpec\": {},\n \"dataQualityResult\": {\n \"dimensions\": [\n {\n \"passed\": false\n }\n ],\n \"passed\": false,\n \"rowCount\": \"\",\n \"rules\": [\n {\n \"evaluatedCount\": \"\",\n \"failingRowsQuery\": \"\",\n \"nullCount\": \"\",\n \"passRatio\": \"\",\n \"passed\": false,\n \"passedCount\": \"\",\n \"rule\": {\n \"column\": \"\",\n \"dimension\": \"\",\n \"ignoreNull\": false,\n \"nonNullExpectation\": {},\n \"rangeExpectation\": {\n \"maxValue\": \"\",\n \"minValue\": \"\",\n \"strictMaxEnabled\": false,\n \"strictMinEnabled\": false\n },\n \"regexExpectation\": {\n \"regex\": \"\"\n },\n \"rowConditionExpectation\": {\n \"sqlExpression\": \"\"\n },\n \"setExpectation\": {\n \"values\": []\n },\n \"statisticRangeExpectation\": {\n \"maxValue\": \"\",\n \"minValue\": \"\",\n \"statistic\": \"\",\n \"strictMaxEnabled\": false,\n \"strictMinEnabled\": false\n },\n \"tableConditionExpectation\": {\n \"sqlExpression\": \"\"\n },\n \"threshold\": \"\",\n \"uniquenessExpectation\": {}\n }\n }\n ],\n \"scannedData\": {}\n },\n \"dataQualitySpec\": {\n \"rules\": [\n {}\n ]\n },\n \"description\": \"\",\n \"displayName\": \"\",\n \"executionSpec\": {\n \"field\": \"\",\n \"trigger\": {\n \"onDemand\": {},\n \"schedule\": {\n \"cron\": \"\"\n }\n }\n },\n \"executionStatus\": {\n \"latestJobEndTime\": \"\",\n \"latestJobStartTime\": \"\"\n },\n \"labels\": {},\n \"name\": \"\",\n \"state\": \"\",\n \"type\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1/:parent/dataScans", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/:parent/dataScans"
payload = {
"createTime": "",
"data": {
"entity": "",
"resource": ""
},
"dataProfileResult": {
"profile": { "fields": [
{
"mode": "",
"name": "",
"profile": {
"distinctRatio": "",
"doubleProfile": {
"average": "",
"max": "",
"min": "",
"quartiles": [],
"standardDeviation": ""
},
"integerProfile": {
"average": "",
"max": "",
"min": "",
"quartiles": [],
"standardDeviation": ""
},
"nullRatio": "",
"stringProfile": {
"averageLength": "",
"maxLength": "",
"minLength": ""
},
"topNValues": [
{
"count": "",
"value": ""
}
]
},
"type": ""
}
] },
"rowCount": "",
"scannedData": { "incrementalField": {
"end": "",
"field": "",
"start": ""
} }
},
"dataProfileSpec": {},
"dataQualityResult": {
"dimensions": [{ "passed": False }],
"passed": False,
"rowCount": "",
"rules": [
{
"evaluatedCount": "",
"failingRowsQuery": "",
"nullCount": "",
"passRatio": "",
"passed": False,
"passedCount": "",
"rule": {
"column": "",
"dimension": "",
"ignoreNull": False,
"nonNullExpectation": {},
"rangeExpectation": {
"maxValue": "",
"minValue": "",
"strictMaxEnabled": False,
"strictMinEnabled": False
},
"regexExpectation": { "regex": "" },
"rowConditionExpectation": { "sqlExpression": "" },
"setExpectation": { "values": [] },
"statisticRangeExpectation": {
"maxValue": "",
"minValue": "",
"statistic": "",
"strictMaxEnabled": False,
"strictMinEnabled": False
},
"tableConditionExpectation": { "sqlExpression": "" },
"threshold": "",
"uniquenessExpectation": {}
}
}
],
"scannedData": {}
},
"dataQualitySpec": { "rules": [{}] },
"description": "",
"displayName": "",
"executionSpec": {
"field": "",
"trigger": {
"onDemand": {},
"schedule": { "cron": "" }
}
},
"executionStatus": {
"latestJobEndTime": "",
"latestJobStartTime": ""
},
"labels": {},
"name": "",
"state": "",
"type": "",
"uid": "",
"updateTime": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/:parent/dataScans"
payload <- "{\n \"createTime\": \"\",\n \"data\": {\n \"entity\": \"\",\n \"resource\": \"\"\n },\n \"dataProfileResult\": {\n \"profile\": {\n \"fields\": [\n {\n \"mode\": \"\",\n \"name\": \"\",\n \"profile\": {\n \"distinctRatio\": \"\",\n \"doubleProfile\": {\n \"average\": \"\",\n \"max\": \"\",\n \"min\": \"\",\n \"quartiles\": [],\n \"standardDeviation\": \"\"\n },\n \"integerProfile\": {\n \"average\": \"\",\n \"max\": \"\",\n \"min\": \"\",\n \"quartiles\": [],\n \"standardDeviation\": \"\"\n },\n \"nullRatio\": \"\",\n \"stringProfile\": {\n \"averageLength\": \"\",\n \"maxLength\": \"\",\n \"minLength\": \"\"\n },\n \"topNValues\": [\n {\n \"count\": \"\",\n \"value\": \"\"\n }\n ]\n },\n \"type\": \"\"\n }\n ]\n },\n \"rowCount\": \"\",\n \"scannedData\": {\n \"incrementalField\": {\n \"end\": \"\",\n \"field\": \"\",\n \"start\": \"\"\n }\n }\n },\n \"dataProfileSpec\": {},\n \"dataQualityResult\": {\n \"dimensions\": [\n {\n \"passed\": false\n }\n ],\n \"passed\": false,\n \"rowCount\": \"\",\n \"rules\": [\n {\n \"evaluatedCount\": \"\",\n \"failingRowsQuery\": \"\",\n \"nullCount\": \"\",\n \"passRatio\": \"\",\n \"passed\": false,\n \"passedCount\": \"\",\n \"rule\": {\n \"column\": \"\",\n \"dimension\": \"\",\n \"ignoreNull\": false,\n \"nonNullExpectation\": {},\n \"rangeExpectation\": {\n \"maxValue\": \"\",\n \"minValue\": \"\",\n \"strictMaxEnabled\": false,\n \"strictMinEnabled\": false\n },\n \"regexExpectation\": {\n \"regex\": \"\"\n },\n \"rowConditionExpectation\": {\n \"sqlExpression\": \"\"\n },\n \"setExpectation\": {\n \"values\": []\n },\n \"statisticRangeExpectation\": {\n \"maxValue\": \"\",\n \"minValue\": \"\",\n \"statistic\": \"\",\n \"strictMaxEnabled\": false,\n \"strictMinEnabled\": false\n },\n \"tableConditionExpectation\": {\n \"sqlExpression\": \"\"\n },\n \"threshold\": \"\",\n \"uniquenessExpectation\": {}\n }\n }\n ],\n \"scannedData\": {}\n },\n \"dataQualitySpec\": {\n \"rules\": [\n {}\n ]\n },\n \"description\": \"\",\n \"displayName\": \"\",\n \"executionSpec\": {\n \"field\": \"\",\n \"trigger\": {\n \"onDemand\": {},\n \"schedule\": {\n \"cron\": \"\"\n }\n }\n },\n \"executionStatus\": {\n \"latestJobEndTime\": \"\",\n \"latestJobStartTime\": \"\"\n },\n \"labels\": {},\n \"name\": \"\",\n \"state\": \"\",\n \"type\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/:parent/dataScans")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"createTime\": \"\",\n \"data\": {\n \"entity\": \"\",\n \"resource\": \"\"\n },\n \"dataProfileResult\": {\n \"profile\": {\n \"fields\": [\n {\n \"mode\": \"\",\n \"name\": \"\",\n \"profile\": {\n \"distinctRatio\": \"\",\n \"doubleProfile\": {\n \"average\": \"\",\n \"max\": \"\",\n \"min\": \"\",\n \"quartiles\": [],\n \"standardDeviation\": \"\"\n },\n \"integerProfile\": {\n \"average\": \"\",\n \"max\": \"\",\n \"min\": \"\",\n \"quartiles\": [],\n \"standardDeviation\": \"\"\n },\n \"nullRatio\": \"\",\n \"stringProfile\": {\n \"averageLength\": \"\",\n \"maxLength\": \"\",\n \"minLength\": \"\"\n },\n \"topNValues\": [\n {\n \"count\": \"\",\n \"value\": \"\"\n }\n ]\n },\n \"type\": \"\"\n }\n ]\n },\n \"rowCount\": \"\",\n \"scannedData\": {\n \"incrementalField\": {\n \"end\": \"\",\n \"field\": \"\",\n \"start\": \"\"\n }\n }\n },\n \"dataProfileSpec\": {},\n \"dataQualityResult\": {\n \"dimensions\": [\n {\n \"passed\": false\n }\n ],\n \"passed\": false,\n \"rowCount\": \"\",\n \"rules\": [\n {\n \"evaluatedCount\": \"\",\n \"failingRowsQuery\": \"\",\n \"nullCount\": \"\",\n \"passRatio\": \"\",\n \"passed\": false,\n \"passedCount\": \"\",\n \"rule\": {\n \"column\": \"\",\n \"dimension\": \"\",\n \"ignoreNull\": false,\n \"nonNullExpectation\": {},\n \"rangeExpectation\": {\n \"maxValue\": \"\",\n \"minValue\": \"\",\n \"strictMaxEnabled\": false,\n \"strictMinEnabled\": false\n },\n \"regexExpectation\": {\n \"regex\": \"\"\n },\n \"rowConditionExpectation\": {\n \"sqlExpression\": \"\"\n },\n \"setExpectation\": {\n \"values\": []\n },\n \"statisticRangeExpectation\": {\n \"maxValue\": \"\",\n \"minValue\": \"\",\n \"statistic\": \"\",\n \"strictMaxEnabled\": false,\n \"strictMinEnabled\": false\n },\n \"tableConditionExpectation\": {\n \"sqlExpression\": \"\"\n },\n \"threshold\": \"\",\n \"uniquenessExpectation\": {}\n }\n }\n ],\n \"scannedData\": {}\n },\n \"dataQualitySpec\": {\n \"rules\": [\n {}\n ]\n },\n \"description\": \"\",\n \"displayName\": \"\",\n \"executionSpec\": {\n \"field\": \"\",\n \"trigger\": {\n \"onDemand\": {},\n \"schedule\": {\n \"cron\": \"\"\n }\n }\n },\n \"executionStatus\": {\n \"latestJobEndTime\": \"\",\n \"latestJobStartTime\": \"\"\n },\n \"labels\": {},\n \"name\": \"\",\n \"state\": \"\",\n \"type\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/v1/:parent/dataScans') do |req|
req.body = "{\n \"createTime\": \"\",\n \"data\": {\n \"entity\": \"\",\n \"resource\": \"\"\n },\n \"dataProfileResult\": {\n \"profile\": {\n \"fields\": [\n {\n \"mode\": \"\",\n \"name\": \"\",\n \"profile\": {\n \"distinctRatio\": \"\",\n \"doubleProfile\": {\n \"average\": \"\",\n \"max\": \"\",\n \"min\": \"\",\n \"quartiles\": [],\n \"standardDeviation\": \"\"\n },\n \"integerProfile\": {\n \"average\": \"\",\n \"max\": \"\",\n \"min\": \"\",\n \"quartiles\": [],\n \"standardDeviation\": \"\"\n },\n \"nullRatio\": \"\",\n \"stringProfile\": {\n \"averageLength\": \"\",\n \"maxLength\": \"\",\n \"minLength\": \"\"\n },\n \"topNValues\": [\n {\n \"count\": \"\",\n \"value\": \"\"\n }\n ]\n },\n \"type\": \"\"\n }\n ]\n },\n \"rowCount\": \"\",\n \"scannedData\": {\n \"incrementalField\": {\n \"end\": \"\",\n \"field\": \"\",\n \"start\": \"\"\n }\n }\n },\n \"dataProfileSpec\": {},\n \"dataQualityResult\": {\n \"dimensions\": [\n {\n \"passed\": false\n }\n ],\n \"passed\": false,\n \"rowCount\": \"\",\n \"rules\": [\n {\n \"evaluatedCount\": \"\",\n \"failingRowsQuery\": \"\",\n \"nullCount\": \"\",\n \"passRatio\": \"\",\n \"passed\": false,\n \"passedCount\": \"\",\n \"rule\": {\n \"column\": \"\",\n \"dimension\": \"\",\n \"ignoreNull\": false,\n \"nonNullExpectation\": {},\n \"rangeExpectation\": {\n \"maxValue\": \"\",\n \"minValue\": \"\",\n \"strictMaxEnabled\": false,\n \"strictMinEnabled\": false\n },\n \"regexExpectation\": {\n \"regex\": \"\"\n },\n \"rowConditionExpectation\": {\n \"sqlExpression\": \"\"\n },\n \"setExpectation\": {\n \"values\": []\n },\n \"statisticRangeExpectation\": {\n \"maxValue\": \"\",\n \"minValue\": \"\",\n \"statistic\": \"\",\n \"strictMaxEnabled\": false,\n \"strictMinEnabled\": false\n },\n \"tableConditionExpectation\": {\n \"sqlExpression\": \"\"\n },\n \"threshold\": \"\",\n \"uniquenessExpectation\": {}\n }\n }\n ],\n \"scannedData\": {}\n },\n \"dataQualitySpec\": {\n \"rules\": [\n {}\n ]\n },\n \"description\": \"\",\n \"displayName\": \"\",\n \"executionSpec\": {\n \"field\": \"\",\n \"trigger\": {\n \"onDemand\": {},\n \"schedule\": {\n \"cron\": \"\"\n }\n }\n },\n \"executionStatus\": {\n \"latestJobEndTime\": \"\",\n \"latestJobStartTime\": \"\"\n },\n \"labels\": {},\n \"name\": \"\",\n \"state\": \"\",\n \"type\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/:parent/dataScans";
let payload = json!({
"createTime": "",
"data": json!({
"entity": "",
"resource": ""
}),
"dataProfileResult": json!({
"profile": json!({"fields": (
json!({
"mode": "",
"name": "",
"profile": json!({
"distinctRatio": "",
"doubleProfile": json!({
"average": "",
"max": "",
"min": "",
"quartiles": (),
"standardDeviation": ""
}),
"integerProfile": json!({
"average": "",
"max": "",
"min": "",
"quartiles": (),
"standardDeviation": ""
}),
"nullRatio": "",
"stringProfile": json!({
"averageLength": "",
"maxLength": "",
"minLength": ""
}),
"topNValues": (
json!({
"count": "",
"value": ""
})
)
}),
"type": ""
})
)}),
"rowCount": "",
"scannedData": json!({"incrementalField": json!({
"end": "",
"field": "",
"start": ""
})})
}),
"dataProfileSpec": json!({}),
"dataQualityResult": json!({
"dimensions": (json!({"passed": false})),
"passed": false,
"rowCount": "",
"rules": (
json!({
"evaluatedCount": "",
"failingRowsQuery": "",
"nullCount": "",
"passRatio": "",
"passed": false,
"passedCount": "",
"rule": json!({
"column": "",
"dimension": "",
"ignoreNull": false,
"nonNullExpectation": json!({}),
"rangeExpectation": json!({
"maxValue": "",
"minValue": "",
"strictMaxEnabled": false,
"strictMinEnabled": false
}),
"regexExpectation": json!({"regex": ""}),
"rowConditionExpectation": json!({"sqlExpression": ""}),
"setExpectation": json!({"values": ()}),
"statisticRangeExpectation": json!({
"maxValue": "",
"minValue": "",
"statistic": "",
"strictMaxEnabled": false,
"strictMinEnabled": false
}),
"tableConditionExpectation": json!({"sqlExpression": ""}),
"threshold": "",
"uniquenessExpectation": json!({})
})
})
),
"scannedData": json!({})
}),
"dataQualitySpec": json!({"rules": (json!({}))}),
"description": "",
"displayName": "",
"executionSpec": json!({
"field": "",
"trigger": json!({
"onDemand": json!({}),
"schedule": json!({"cron": ""})
})
}),
"executionStatus": json!({
"latestJobEndTime": "",
"latestJobStartTime": ""
}),
"labels": json!({}),
"name": "",
"state": "",
"type": "",
"uid": "",
"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}}/v1/:parent/dataScans \
--header 'content-type: application/json' \
--data '{
"createTime": "",
"data": {
"entity": "",
"resource": ""
},
"dataProfileResult": {
"profile": {
"fields": [
{
"mode": "",
"name": "",
"profile": {
"distinctRatio": "",
"doubleProfile": {
"average": "",
"max": "",
"min": "",
"quartiles": [],
"standardDeviation": ""
},
"integerProfile": {
"average": "",
"max": "",
"min": "",
"quartiles": [],
"standardDeviation": ""
},
"nullRatio": "",
"stringProfile": {
"averageLength": "",
"maxLength": "",
"minLength": ""
},
"topNValues": [
{
"count": "",
"value": ""
}
]
},
"type": ""
}
]
},
"rowCount": "",
"scannedData": {
"incrementalField": {
"end": "",
"field": "",
"start": ""
}
}
},
"dataProfileSpec": {},
"dataQualityResult": {
"dimensions": [
{
"passed": false
}
],
"passed": false,
"rowCount": "",
"rules": [
{
"evaluatedCount": "",
"failingRowsQuery": "",
"nullCount": "",
"passRatio": "",
"passed": false,
"passedCount": "",
"rule": {
"column": "",
"dimension": "",
"ignoreNull": false,
"nonNullExpectation": {},
"rangeExpectation": {
"maxValue": "",
"minValue": "",
"strictMaxEnabled": false,
"strictMinEnabled": false
},
"regexExpectation": {
"regex": ""
},
"rowConditionExpectation": {
"sqlExpression": ""
},
"setExpectation": {
"values": []
},
"statisticRangeExpectation": {
"maxValue": "",
"minValue": "",
"statistic": "",
"strictMaxEnabled": false,
"strictMinEnabled": false
},
"tableConditionExpectation": {
"sqlExpression": ""
},
"threshold": "",
"uniquenessExpectation": {}
}
}
],
"scannedData": {}
},
"dataQualitySpec": {
"rules": [
{}
]
},
"description": "",
"displayName": "",
"executionSpec": {
"field": "",
"trigger": {
"onDemand": {},
"schedule": {
"cron": ""
}
}
},
"executionStatus": {
"latestJobEndTime": "",
"latestJobStartTime": ""
},
"labels": {},
"name": "",
"state": "",
"type": "",
"uid": "",
"updateTime": ""
}'
echo '{
"createTime": "",
"data": {
"entity": "",
"resource": ""
},
"dataProfileResult": {
"profile": {
"fields": [
{
"mode": "",
"name": "",
"profile": {
"distinctRatio": "",
"doubleProfile": {
"average": "",
"max": "",
"min": "",
"quartiles": [],
"standardDeviation": ""
},
"integerProfile": {
"average": "",
"max": "",
"min": "",
"quartiles": [],
"standardDeviation": ""
},
"nullRatio": "",
"stringProfile": {
"averageLength": "",
"maxLength": "",
"minLength": ""
},
"topNValues": [
{
"count": "",
"value": ""
}
]
},
"type": ""
}
]
},
"rowCount": "",
"scannedData": {
"incrementalField": {
"end": "",
"field": "",
"start": ""
}
}
},
"dataProfileSpec": {},
"dataQualityResult": {
"dimensions": [
{
"passed": false
}
],
"passed": false,
"rowCount": "",
"rules": [
{
"evaluatedCount": "",
"failingRowsQuery": "",
"nullCount": "",
"passRatio": "",
"passed": false,
"passedCount": "",
"rule": {
"column": "",
"dimension": "",
"ignoreNull": false,
"nonNullExpectation": {},
"rangeExpectation": {
"maxValue": "",
"minValue": "",
"strictMaxEnabled": false,
"strictMinEnabled": false
},
"regexExpectation": {
"regex": ""
},
"rowConditionExpectation": {
"sqlExpression": ""
},
"setExpectation": {
"values": []
},
"statisticRangeExpectation": {
"maxValue": "",
"minValue": "",
"statistic": "",
"strictMaxEnabled": false,
"strictMinEnabled": false
},
"tableConditionExpectation": {
"sqlExpression": ""
},
"threshold": "",
"uniquenessExpectation": {}
}
}
],
"scannedData": {}
},
"dataQualitySpec": {
"rules": [
{}
]
},
"description": "",
"displayName": "",
"executionSpec": {
"field": "",
"trigger": {
"onDemand": {},
"schedule": {
"cron": ""
}
}
},
"executionStatus": {
"latestJobEndTime": "",
"latestJobStartTime": ""
},
"labels": {},
"name": "",
"state": "",
"type": "",
"uid": "",
"updateTime": ""
}' | \
http POST {{baseUrl}}/v1/:parent/dataScans \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "createTime": "",\n "data": {\n "entity": "",\n "resource": ""\n },\n "dataProfileResult": {\n "profile": {\n "fields": [\n {\n "mode": "",\n "name": "",\n "profile": {\n "distinctRatio": "",\n "doubleProfile": {\n "average": "",\n "max": "",\n "min": "",\n "quartiles": [],\n "standardDeviation": ""\n },\n "integerProfile": {\n "average": "",\n "max": "",\n "min": "",\n "quartiles": [],\n "standardDeviation": ""\n },\n "nullRatio": "",\n "stringProfile": {\n "averageLength": "",\n "maxLength": "",\n "minLength": ""\n },\n "topNValues": [\n {\n "count": "",\n "value": ""\n }\n ]\n },\n "type": ""\n }\n ]\n },\n "rowCount": "",\n "scannedData": {\n "incrementalField": {\n "end": "",\n "field": "",\n "start": ""\n }\n }\n },\n "dataProfileSpec": {},\n "dataQualityResult": {\n "dimensions": [\n {\n "passed": false\n }\n ],\n "passed": false,\n "rowCount": "",\n "rules": [\n {\n "evaluatedCount": "",\n "failingRowsQuery": "",\n "nullCount": "",\n "passRatio": "",\n "passed": false,\n "passedCount": "",\n "rule": {\n "column": "",\n "dimension": "",\n "ignoreNull": false,\n "nonNullExpectation": {},\n "rangeExpectation": {\n "maxValue": "",\n "minValue": "",\n "strictMaxEnabled": false,\n "strictMinEnabled": false\n },\n "regexExpectation": {\n "regex": ""\n },\n "rowConditionExpectation": {\n "sqlExpression": ""\n },\n "setExpectation": {\n "values": []\n },\n "statisticRangeExpectation": {\n "maxValue": "",\n "minValue": "",\n "statistic": "",\n "strictMaxEnabled": false,\n "strictMinEnabled": false\n },\n "tableConditionExpectation": {\n "sqlExpression": ""\n },\n "threshold": "",\n "uniquenessExpectation": {}\n }\n }\n ],\n "scannedData": {}\n },\n "dataQualitySpec": {\n "rules": [\n {}\n ]\n },\n "description": "",\n "displayName": "",\n "executionSpec": {\n "field": "",\n "trigger": {\n "onDemand": {},\n "schedule": {\n "cron": ""\n }\n }\n },\n "executionStatus": {\n "latestJobEndTime": "",\n "latestJobStartTime": ""\n },\n "labels": {},\n "name": "",\n "state": "",\n "type": "",\n "uid": "",\n "updateTime": ""\n}' \
--output-document \
- {{baseUrl}}/v1/:parent/dataScans
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"createTime": "",
"data": [
"entity": "",
"resource": ""
],
"dataProfileResult": [
"profile": ["fields": [
[
"mode": "",
"name": "",
"profile": [
"distinctRatio": "",
"doubleProfile": [
"average": "",
"max": "",
"min": "",
"quartiles": [],
"standardDeviation": ""
],
"integerProfile": [
"average": "",
"max": "",
"min": "",
"quartiles": [],
"standardDeviation": ""
],
"nullRatio": "",
"stringProfile": [
"averageLength": "",
"maxLength": "",
"minLength": ""
],
"topNValues": [
[
"count": "",
"value": ""
]
]
],
"type": ""
]
]],
"rowCount": "",
"scannedData": ["incrementalField": [
"end": "",
"field": "",
"start": ""
]]
],
"dataProfileSpec": [],
"dataQualityResult": [
"dimensions": [["passed": false]],
"passed": false,
"rowCount": "",
"rules": [
[
"evaluatedCount": "",
"failingRowsQuery": "",
"nullCount": "",
"passRatio": "",
"passed": false,
"passedCount": "",
"rule": [
"column": "",
"dimension": "",
"ignoreNull": false,
"nonNullExpectation": [],
"rangeExpectation": [
"maxValue": "",
"minValue": "",
"strictMaxEnabled": false,
"strictMinEnabled": false
],
"regexExpectation": ["regex": ""],
"rowConditionExpectation": ["sqlExpression": ""],
"setExpectation": ["values": []],
"statisticRangeExpectation": [
"maxValue": "",
"minValue": "",
"statistic": "",
"strictMaxEnabled": false,
"strictMinEnabled": false
],
"tableConditionExpectation": ["sqlExpression": ""],
"threshold": "",
"uniquenessExpectation": []
]
]
],
"scannedData": []
],
"dataQualitySpec": ["rules": [[]]],
"description": "",
"displayName": "",
"executionSpec": [
"field": "",
"trigger": [
"onDemand": [],
"schedule": ["cron": ""]
]
],
"executionStatus": [
"latestJobEndTime": "",
"latestJobStartTime": ""
],
"labels": [],
"name": "",
"state": "",
"type": "",
"uid": "",
"updateTime": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:parent/dataScans")! 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
dataplex.projects.locations.dataScans.list
{{baseUrl}}/v1/:parent/dataScans
QUERY PARAMS
parent
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:parent/dataScans");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v1/:parent/dataScans")
require "http/client"
url = "{{baseUrl}}/v1/:parent/dataScans"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/v1/:parent/dataScans"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/:parent/dataScans");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/:parent/dataScans"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/v1/:parent/dataScans HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1/:parent/dataScans")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/:parent/dataScans"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/:parent/dataScans")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1/:parent/dataScans")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/v1/:parent/dataScans');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/v1/:parent/dataScans'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/:parent/dataScans';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/:parent/dataScans',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1/:parent/dataScans")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/:parent/dataScans',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'GET', url: '{{baseUrl}}/v1/:parent/dataScans'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v1/:parent/dataScans');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {method: 'GET', url: '{{baseUrl}}/v1/:parent/dataScans'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/:parent/dataScans';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:parent/dataScans"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/:parent/dataScans" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/:parent/dataScans",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/v1/:parent/dataScans');
echo $response->getBody();
setUrl('{{baseUrl}}/v1/:parent/dataScans');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/:parent/dataScans');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:parent/dataScans' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:parent/dataScans' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v1/:parent/dataScans")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/:parent/dataScans"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/:parent/dataScans"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/:parent/dataScans")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/v1/:parent/dataScans') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/:parent/dataScans";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/v1/:parent/dataScans
http GET {{baseUrl}}/v1/:parent/dataScans
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v1/:parent/dataScans
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:parent/dataScans")! 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
dataplex.projects.locations.dataTaxonomies.attributes.create
{{baseUrl}}/v1/:parent/attributes
QUERY PARAMS
parent
BODY json
{
"attributeCount": 0,
"createTime": "",
"dataAccessSpec": {
"readers": []
},
"description": "",
"displayName": "",
"etag": "",
"labels": {},
"name": "",
"parentId": "",
"resourceAccessSpec": {
"owners": [],
"readers": [],
"writers": []
},
"uid": "",
"updateTime": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:parent/attributes");
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 \"attributeCount\": 0,\n \"createTime\": \"\",\n \"dataAccessSpec\": {\n \"readers\": []\n },\n \"description\": \"\",\n \"displayName\": \"\",\n \"etag\": \"\",\n \"labels\": {},\n \"name\": \"\",\n \"parentId\": \"\",\n \"resourceAccessSpec\": {\n \"owners\": [],\n \"readers\": [],\n \"writers\": []\n },\n \"uid\": \"\",\n \"updateTime\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1/:parent/attributes" {:content-type :json
:form-params {:attributeCount 0
:createTime ""
:dataAccessSpec {:readers []}
:description ""
:displayName ""
:etag ""
:labels {}
:name ""
:parentId ""
:resourceAccessSpec {:owners []
:readers []
:writers []}
:uid ""
:updateTime ""}})
require "http/client"
url = "{{baseUrl}}/v1/:parent/attributes"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"attributeCount\": 0,\n \"createTime\": \"\",\n \"dataAccessSpec\": {\n \"readers\": []\n },\n \"description\": \"\",\n \"displayName\": \"\",\n \"etag\": \"\",\n \"labels\": {},\n \"name\": \"\",\n \"parentId\": \"\",\n \"resourceAccessSpec\": {\n \"owners\": [],\n \"readers\": [],\n \"writers\": []\n },\n \"uid\": \"\",\n \"updateTime\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/v1/:parent/attributes"),
Content = new StringContent("{\n \"attributeCount\": 0,\n \"createTime\": \"\",\n \"dataAccessSpec\": {\n \"readers\": []\n },\n \"description\": \"\",\n \"displayName\": \"\",\n \"etag\": \"\",\n \"labels\": {},\n \"name\": \"\",\n \"parentId\": \"\",\n \"resourceAccessSpec\": {\n \"owners\": [],\n \"readers\": [],\n \"writers\": []\n },\n \"uid\": \"\",\n \"updateTime\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/:parent/attributes");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"attributeCount\": 0,\n \"createTime\": \"\",\n \"dataAccessSpec\": {\n \"readers\": []\n },\n \"description\": \"\",\n \"displayName\": \"\",\n \"etag\": \"\",\n \"labels\": {},\n \"name\": \"\",\n \"parentId\": \"\",\n \"resourceAccessSpec\": {\n \"owners\": [],\n \"readers\": [],\n \"writers\": []\n },\n \"uid\": \"\",\n \"updateTime\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/:parent/attributes"
payload := strings.NewReader("{\n \"attributeCount\": 0,\n \"createTime\": \"\",\n \"dataAccessSpec\": {\n \"readers\": []\n },\n \"description\": \"\",\n \"displayName\": \"\",\n \"etag\": \"\",\n \"labels\": {},\n \"name\": \"\",\n \"parentId\": \"\",\n \"resourceAccessSpec\": {\n \"owners\": [],\n \"readers\": [],\n \"writers\": []\n },\n \"uid\": \"\",\n \"updateTime\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/v1/:parent/attributes HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 313
{
"attributeCount": 0,
"createTime": "",
"dataAccessSpec": {
"readers": []
},
"description": "",
"displayName": "",
"etag": "",
"labels": {},
"name": "",
"parentId": "",
"resourceAccessSpec": {
"owners": [],
"readers": [],
"writers": []
},
"uid": "",
"updateTime": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1/:parent/attributes")
.setHeader("content-type", "application/json")
.setBody("{\n \"attributeCount\": 0,\n \"createTime\": \"\",\n \"dataAccessSpec\": {\n \"readers\": []\n },\n \"description\": \"\",\n \"displayName\": \"\",\n \"etag\": \"\",\n \"labels\": {},\n \"name\": \"\",\n \"parentId\": \"\",\n \"resourceAccessSpec\": {\n \"owners\": [],\n \"readers\": [],\n \"writers\": []\n },\n \"uid\": \"\",\n \"updateTime\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/:parent/attributes"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"attributeCount\": 0,\n \"createTime\": \"\",\n \"dataAccessSpec\": {\n \"readers\": []\n },\n \"description\": \"\",\n \"displayName\": \"\",\n \"etag\": \"\",\n \"labels\": {},\n \"name\": \"\",\n \"parentId\": \"\",\n \"resourceAccessSpec\": {\n \"owners\": [],\n \"readers\": [],\n \"writers\": []\n },\n \"uid\": \"\",\n \"updateTime\": \"\"\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 \"attributeCount\": 0,\n \"createTime\": \"\",\n \"dataAccessSpec\": {\n \"readers\": []\n },\n \"description\": \"\",\n \"displayName\": \"\",\n \"etag\": \"\",\n \"labels\": {},\n \"name\": \"\",\n \"parentId\": \"\",\n \"resourceAccessSpec\": {\n \"owners\": [],\n \"readers\": [],\n \"writers\": []\n },\n \"uid\": \"\",\n \"updateTime\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/:parent/attributes")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1/:parent/attributes")
.header("content-type", "application/json")
.body("{\n \"attributeCount\": 0,\n \"createTime\": \"\",\n \"dataAccessSpec\": {\n \"readers\": []\n },\n \"description\": \"\",\n \"displayName\": \"\",\n \"etag\": \"\",\n \"labels\": {},\n \"name\": \"\",\n \"parentId\": \"\",\n \"resourceAccessSpec\": {\n \"owners\": [],\n \"readers\": [],\n \"writers\": []\n },\n \"uid\": \"\",\n \"updateTime\": \"\"\n}")
.asString();
const data = JSON.stringify({
attributeCount: 0,
createTime: '',
dataAccessSpec: {
readers: []
},
description: '',
displayName: '',
etag: '',
labels: {},
name: '',
parentId: '',
resourceAccessSpec: {
owners: [],
readers: [],
writers: []
},
uid: '',
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}}/v1/:parent/attributes');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:parent/attributes',
headers: {'content-type': 'application/json'},
data: {
attributeCount: 0,
createTime: '',
dataAccessSpec: {readers: []},
description: '',
displayName: '',
etag: '',
labels: {},
name: '',
parentId: '',
resourceAccessSpec: {owners: [], readers: [], writers: []},
uid: '',
updateTime: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/:parent/attributes';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"attributeCount":0,"createTime":"","dataAccessSpec":{"readers":[]},"description":"","displayName":"","etag":"","labels":{},"name":"","parentId":"","resourceAccessSpec":{"owners":[],"readers":[],"writers":[]},"uid":"","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}}/v1/:parent/attributes',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "attributeCount": 0,\n "createTime": "",\n "dataAccessSpec": {\n "readers": []\n },\n "description": "",\n "displayName": "",\n "etag": "",\n "labels": {},\n "name": "",\n "parentId": "",\n "resourceAccessSpec": {\n "owners": [],\n "readers": [],\n "writers": []\n },\n "uid": "",\n "updateTime": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"attributeCount\": 0,\n \"createTime\": \"\",\n \"dataAccessSpec\": {\n \"readers\": []\n },\n \"description\": \"\",\n \"displayName\": \"\",\n \"etag\": \"\",\n \"labels\": {},\n \"name\": \"\",\n \"parentId\": \"\",\n \"resourceAccessSpec\": {\n \"owners\": [],\n \"readers\": [],\n \"writers\": []\n },\n \"uid\": \"\",\n \"updateTime\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1/:parent/attributes")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/:parent/attributes',
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({
attributeCount: 0,
createTime: '',
dataAccessSpec: {readers: []},
description: '',
displayName: '',
etag: '',
labels: {},
name: '',
parentId: '',
resourceAccessSpec: {owners: [], readers: [], writers: []},
uid: '',
updateTime: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:parent/attributes',
headers: {'content-type': 'application/json'},
body: {
attributeCount: 0,
createTime: '',
dataAccessSpec: {readers: []},
description: '',
displayName: '',
etag: '',
labels: {},
name: '',
parentId: '',
resourceAccessSpec: {owners: [], readers: [], writers: []},
uid: '',
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}}/v1/:parent/attributes');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
attributeCount: 0,
createTime: '',
dataAccessSpec: {
readers: []
},
description: '',
displayName: '',
etag: '',
labels: {},
name: '',
parentId: '',
resourceAccessSpec: {
owners: [],
readers: [],
writers: []
},
uid: '',
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}}/v1/:parent/attributes',
headers: {'content-type': 'application/json'},
data: {
attributeCount: 0,
createTime: '',
dataAccessSpec: {readers: []},
description: '',
displayName: '',
etag: '',
labels: {},
name: '',
parentId: '',
resourceAccessSpec: {owners: [], readers: [], writers: []},
uid: '',
updateTime: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/:parent/attributes';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"attributeCount":0,"createTime":"","dataAccessSpec":{"readers":[]},"description":"","displayName":"","etag":"","labels":{},"name":"","parentId":"","resourceAccessSpec":{"owners":[],"readers":[],"writers":[]},"uid":"","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 = @{ @"attributeCount": @0,
@"createTime": @"",
@"dataAccessSpec": @{ @"readers": @[ ] },
@"description": @"",
@"displayName": @"",
@"etag": @"",
@"labels": @{ },
@"name": @"",
@"parentId": @"",
@"resourceAccessSpec": @{ @"owners": @[ ], @"readers": @[ ], @"writers": @[ ] },
@"uid": @"",
@"updateTime": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:parent/attributes"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/:parent/attributes" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"attributeCount\": 0,\n \"createTime\": \"\",\n \"dataAccessSpec\": {\n \"readers\": []\n },\n \"description\": \"\",\n \"displayName\": \"\",\n \"etag\": \"\",\n \"labels\": {},\n \"name\": \"\",\n \"parentId\": \"\",\n \"resourceAccessSpec\": {\n \"owners\": [],\n \"readers\": [],\n \"writers\": []\n },\n \"uid\": \"\",\n \"updateTime\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/:parent/attributes",
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([
'attributeCount' => 0,
'createTime' => '',
'dataAccessSpec' => [
'readers' => [
]
],
'description' => '',
'displayName' => '',
'etag' => '',
'labels' => [
],
'name' => '',
'parentId' => '',
'resourceAccessSpec' => [
'owners' => [
],
'readers' => [
],
'writers' => [
]
],
'uid' => '',
'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}}/v1/:parent/attributes', [
'body' => '{
"attributeCount": 0,
"createTime": "",
"dataAccessSpec": {
"readers": []
},
"description": "",
"displayName": "",
"etag": "",
"labels": {},
"name": "",
"parentId": "",
"resourceAccessSpec": {
"owners": [],
"readers": [],
"writers": []
},
"uid": "",
"updateTime": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1/:parent/attributes');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'attributeCount' => 0,
'createTime' => '',
'dataAccessSpec' => [
'readers' => [
]
],
'description' => '',
'displayName' => '',
'etag' => '',
'labels' => [
],
'name' => '',
'parentId' => '',
'resourceAccessSpec' => [
'owners' => [
],
'readers' => [
],
'writers' => [
]
],
'uid' => '',
'updateTime' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'attributeCount' => 0,
'createTime' => '',
'dataAccessSpec' => [
'readers' => [
]
],
'description' => '',
'displayName' => '',
'etag' => '',
'labels' => [
],
'name' => '',
'parentId' => '',
'resourceAccessSpec' => [
'owners' => [
],
'readers' => [
],
'writers' => [
]
],
'uid' => '',
'updateTime' => ''
]));
$request->setRequestUrl('{{baseUrl}}/v1/:parent/attributes');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:parent/attributes' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"attributeCount": 0,
"createTime": "",
"dataAccessSpec": {
"readers": []
},
"description": "",
"displayName": "",
"etag": "",
"labels": {},
"name": "",
"parentId": "",
"resourceAccessSpec": {
"owners": [],
"readers": [],
"writers": []
},
"uid": "",
"updateTime": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:parent/attributes' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"attributeCount": 0,
"createTime": "",
"dataAccessSpec": {
"readers": []
},
"description": "",
"displayName": "",
"etag": "",
"labels": {},
"name": "",
"parentId": "",
"resourceAccessSpec": {
"owners": [],
"readers": [],
"writers": []
},
"uid": "",
"updateTime": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"attributeCount\": 0,\n \"createTime\": \"\",\n \"dataAccessSpec\": {\n \"readers\": []\n },\n \"description\": \"\",\n \"displayName\": \"\",\n \"etag\": \"\",\n \"labels\": {},\n \"name\": \"\",\n \"parentId\": \"\",\n \"resourceAccessSpec\": {\n \"owners\": [],\n \"readers\": [],\n \"writers\": []\n },\n \"uid\": \"\",\n \"updateTime\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1/:parent/attributes", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/:parent/attributes"
payload = {
"attributeCount": 0,
"createTime": "",
"dataAccessSpec": { "readers": [] },
"description": "",
"displayName": "",
"etag": "",
"labels": {},
"name": "",
"parentId": "",
"resourceAccessSpec": {
"owners": [],
"readers": [],
"writers": []
},
"uid": "",
"updateTime": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/:parent/attributes"
payload <- "{\n \"attributeCount\": 0,\n \"createTime\": \"\",\n \"dataAccessSpec\": {\n \"readers\": []\n },\n \"description\": \"\",\n \"displayName\": \"\",\n \"etag\": \"\",\n \"labels\": {},\n \"name\": \"\",\n \"parentId\": \"\",\n \"resourceAccessSpec\": {\n \"owners\": [],\n \"readers\": [],\n \"writers\": []\n },\n \"uid\": \"\",\n \"updateTime\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/:parent/attributes")
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 \"attributeCount\": 0,\n \"createTime\": \"\",\n \"dataAccessSpec\": {\n \"readers\": []\n },\n \"description\": \"\",\n \"displayName\": \"\",\n \"etag\": \"\",\n \"labels\": {},\n \"name\": \"\",\n \"parentId\": \"\",\n \"resourceAccessSpec\": {\n \"owners\": [],\n \"readers\": [],\n \"writers\": []\n },\n \"uid\": \"\",\n \"updateTime\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/v1/:parent/attributes') do |req|
req.body = "{\n \"attributeCount\": 0,\n \"createTime\": \"\",\n \"dataAccessSpec\": {\n \"readers\": []\n },\n \"description\": \"\",\n \"displayName\": \"\",\n \"etag\": \"\",\n \"labels\": {},\n \"name\": \"\",\n \"parentId\": \"\",\n \"resourceAccessSpec\": {\n \"owners\": [],\n \"readers\": [],\n \"writers\": []\n },\n \"uid\": \"\",\n \"updateTime\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/:parent/attributes";
let payload = json!({
"attributeCount": 0,
"createTime": "",
"dataAccessSpec": json!({"readers": ()}),
"description": "",
"displayName": "",
"etag": "",
"labels": json!({}),
"name": "",
"parentId": "",
"resourceAccessSpec": json!({
"owners": (),
"readers": (),
"writers": ()
}),
"uid": "",
"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}}/v1/:parent/attributes \
--header 'content-type: application/json' \
--data '{
"attributeCount": 0,
"createTime": "",
"dataAccessSpec": {
"readers": []
},
"description": "",
"displayName": "",
"etag": "",
"labels": {},
"name": "",
"parentId": "",
"resourceAccessSpec": {
"owners": [],
"readers": [],
"writers": []
},
"uid": "",
"updateTime": ""
}'
echo '{
"attributeCount": 0,
"createTime": "",
"dataAccessSpec": {
"readers": []
},
"description": "",
"displayName": "",
"etag": "",
"labels": {},
"name": "",
"parentId": "",
"resourceAccessSpec": {
"owners": [],
"readers": [],
"writers": []
},
"uid": "",
"updateTime": ""
}' | \
http POST {{baseUrl}}/v1/:parent/attributes \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "attributeCount": 0,\n "createTime": "",\n "dataAccessSpec": {\n "readers": []\n },\n "description": "",\n "displayName": "",\n "etag": "",\n "labels": {},\n "name": "",\n "parentId": "",\n "resourceAccessSpec": {\n "owners": [],\n "readers": [],\n "writers": []\n },\n "uid": "",\n "updateTime": ""\n}' \
--output-document \
- {{baseUrl}}/v1/:parent/attributes
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"attributeCount": 0,
"createTime": "",
"dataAccessSpec": ["readers": []],
"description": "",
"displayName": "",
"etag": "",
"labels": [],
"name": "",
"parentId": "",
"resourceAccessSpec": [
"owners": [],
"readers": [],
"writers": []
],
"uid": "",
"updateTime": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:parent/attributes")! 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
dataplex.projects.locations.dataTaxonomies.attributes.list
{{baseUrl}}/v1/:parent/attributes
QUERY PARAMS
parent
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:parent/attributes");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v1/:parent/attributes")
require "http/client"
url = "{{baseUrl}}/v1/:parent/attributes"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/v1/:parent/attributes"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/:parent/attributes");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/:parent/attributes"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/v1/:parent/attributes HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1/:parent/attributes")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/:parent/attributes"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/:parent/attributes")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1/:parent/attributes")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/v1/:parent/attributes');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/v1/:parent/attributes'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/:parent/attributes';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/:parent/attributes',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1/:parent/attributes")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/:parent/attributes',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'GET', url: '{{baseUrl}}/v1/:parent/attributes'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v1/:parent/attributes');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {method: 'GET', url: '{{baseUrl}}/v1/:parent/attributes'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/:parent/attributes';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:parent/attributes"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/:parent/attributes" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/:parent/attributes",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/v1/:parent/attributes');
echo $response->getBody();
setUrl('{{baseUrl}}/v1/:parent/attributes');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/:parent/attributes');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:parent/attributes' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:parent/attributes' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v1/:parent/attributes")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/:parent/attributes"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/:parent/attributes"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/:parent/attributes")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/v1/:parent/attributes') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/:parent/attributes";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/v1/:parent/attributes
http GET {{baseUrl}}/v1/:parent/attributes
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v1/:parent/attributes
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:parent/attributes")! 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
dataplex.projects.locations.dataTaxonomies.create
{{baseUrl}}/v1/:parent/dataTaxonomies
QUERY PARAMS
parent
BODY json
{
"attributeCount": 0,
"createTime": "",
"description": "",
"displayName": "",
"etag": "",
"labels": {},
"name": "",
"uid": "",
"updateTime": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:parent/dataTaxonomies");
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 \"attributeCount\": 0,\n \"createTime\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"etag\": \"\",\n \"labels\": {},\n \"name\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1/:parent/dataTaxonomies" {:content-type :json
:form-params {:attributeCount 0
:createTime ""
:description ""
:displayName ""
:etag ""
:labels {}
:name ""
:uid ""
:updateTime ""}})
require "http/client"
url = "{{baseUrl}}/v1/:parent/dataTaxonomies"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"attributeCount\": 0,\n \"createTime\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"etag\": \"\",\n \"labels\": {},\n \"name\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/v1/:parent/dataTaxonomies"),
Content = new StringContent("{\n \"attributeCount\": 0,\n \"createTime\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"etag\": \"\",\n \"labels\": {},\n \"name\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/:parent/dataTaxonomies");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"attributeCount\": 0,\n \"createTime\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"etag\": \"\",\n \"labels\": {},\n \"name\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/:parent/dataTaxonomies"
payload := strings.NewReader("{\n \"attributeCount\": 0,\n \"createTime\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"etag\": \"\",\n \"labels\": {},\n \"name\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/v1/:parent/dataTaxonomies HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 164
{
"attributeCount": 0,
"createTime": "",
"description": "",
"displayName": "",
"etag": "",
"labels": {},
"name": "",
"uid": "",
"updateTime": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1/:parent/dataTaxonomies")
.setHeader("content-type", "application/json")
.setBody("{\n \"attributeCount\": 0,\n \"createTime\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"etag\": \"\",\n \"labels\": {},\n \"name\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/:parent/dataTaxonomies"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"attributeCount\": 0,\n \"createTime\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"etag\": \"\",\n \"labels\": {},\n \"name\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\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 \"attributeCount\": 0,\n \"createTime\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"etag\": \"\",\n \"labels\": {},\n \"name\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/:parent/dataTaxonomies")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1/:parent/dataTaxonomies")
.header("content-type", "application/json")
.body("{\n \"attributeCount\": 0,\n \"createTime\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"etag\": \"\",\n \"labels\": {},\n \"name\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}")
.asString();
const data = JSON.stringify({
attributeCount: 0,
createTime: '',
description: '',
displayName: '',
etag: '',
labels: {},
name: '',
uid: '',
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}}/v1/:parent/dataTaxonomies');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:parent/dataTaxonomies',
headers: {'content-type': 'application/json'},
data: {
attributeCount: 0,
createTime: '',
description: '',
displayName: '',
etag: '',
labels: {},
name: '',
uid: '',
updateTime: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/:parent/dataTaxonomies';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"attributeCount":0,"createTime":"","description":"","displayName":"","etag":"","labels":{},"name":"","uid":"","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}}/v1/:parent/dataTaxonomies',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "attributeCount": 0,\n "createTime": "",\n "description": "",\n "displayName": "",\n "etag": "",\n "labels": {},\n "name": "",\n "uid": "",\n "updateTime": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"attributeCount\": 0,\n \"createTime\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"etag\": \"\",\n \"labels\": {},\n \"name\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1/:parent/dataTaxonomies")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/:parent/dataTaxonomies',
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({
attributeCount: 0,
createTime: '',
description: '',
displayName: '',
etag: '',
labels: {},
name: '',
uid: '',
updateTime: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:parent/dataTaxonomies',
headers: {'content-type': 'application/json'},
body: {
attributeCount: 0,
createTime: '',
description: '',
displayName: '',
etag: '',
labels: {},
name: '',
uid: '',
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}}/v1/:parent/dataTaxonomies');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
attributeCount: 0,
createTime: '',
description: '',
displayName: '',
etag: '',
labels: {},
name: '',
uid: '',
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}}/v1/:parent/dataTaxonomies',
headers: {'content-type': 'application/json'},
data: {
attributeCount: 0,
createTime: '',
description: '',
displayName: '',
etag: '',
labels: {},
name: '',
uid: '',
updateTime: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/:parent/dataTaxonomies';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"attributeCount":0,"createTime":"","description":"","displayName":"","etag":"","labels":{},"name":"","uid":"","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 = @{ @"attributeCount": @0,
@"createTime": @"",
@"description": @"",
@"displayName": @"",
@"etag": @"",
@"labels": @{ },
@"name": @"",
@"uid": @"",
@"updateTime": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:parent/dataTaxonomies"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/:parent/dataTaxonomies" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"attributeCount\": 0,\n \"createTime\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"etag\": \"\",\n \"labels\": {},\n \"name\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/:parent/dataTaxonomies",
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([
'attributeCount' => 0,
'createTime' => '',
'description' => '',
'displayName' => '',
'etag' => '',
'labels' => [
],
'name' => '',
'uid' => '',
'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}}/v1/:parent/dataTaxonomies', [
'body' => '{
"attributeCount": 0,
"createTime": "",
"description": "",
"displayName": "",
"etag": "",
"labels": {},
"name": "",
"uid": "",
"updateTime": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1/:parent/dataTaxonomies');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'attributeCount' => 0,
'createTime' => '',
'description' => '',
'displayName' => '',
'etag' => '',
'labels' => [
],
'name' => '',
'uid' => '',
'updateTime' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'attributeCount' => 0,
'createTime' => '',
'description' => '',
'displayName' => '',
'etag' => '',
'labels' => [
],
'name' => '',
'uid' => '',
'updateTime' => ''
]));
$request->setRequestUrl('{{baseUrl}}/v1/:parent/dataTaxonomies');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:parent/dataTaxonomies' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"attributeCount": 0,
"createTime": "",
"description": "",
"displayName": "",
"etag": "",
"labels": {},
"name": "",
"uid": "",
"updateTime": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:parent/dataTaxonomies' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"attributeCount": 0,
"createTime": "",
"description": "",
"displayName": "",
"etag": "",
"labels": {},
"name": "",
"uid": "",
"updateTime": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"attributeCount\": 0,\n \"createTime\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"etag\": \"\",\n \"labels\": {},\n \"name\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1/:parent/dataTaxonomies", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/:parent/dataTaxonomies"
payload = {
"attributeCount": 0,
"createTime": "",
"description": "",
"displayName": "",
"etag": "",
"labels": {},
"name": "",
"uid": "",
"updateTime": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/:parent/dataTaxonomies"
payload <- "{\n \"attributeCount\": 0,\n \"createTime\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"etag\": \"\",\n \"labels\": {},\n \"name\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/:parent/dataTaxonomies")
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 \"attributeCount\": 0,\n \"createTime\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"etag\": \"\",\n \"labels\": {},\n \"name\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/v1/:parent/dataTaxonomies') do |req|
req.body = "{\n \"attributeCount\": 0,\n \"createTime\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"etag\": \"\",\n \"labels\": {},\n \"name\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/:parent/dataTaxonomies";
let payload = json!({
"attributeCount": 0,
"createTime": "",
"description": "",
"displayName": "",
"etag": "",
"labels": json!({}),
"name": "",
"uid": "",
"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}}/v1/:parent/dataTaxonomies \
--header 'content-type: application/json' \
--data '{
"attributeCount": 0,
"createTime": "",
"description": "",
"displayName": "",
"etag": "",
"labels": {},
"name": "",
"uid": "",
"updateTime": ""
}'
echo '{
"attributeCount": 0,
"createTime": "",
"description": "",
"displayName": "",
"etag": "",
"labels": {},
"name": "",
"uid": "",
"updateTime": ""
}' | \
http POST {{baseUrl}}/v1/:parent/dataTaxonomies \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "attributeCount": 0,\n "createTime": "",\n "description": "",\n "displayName": "",\n "etag": "",\n "labels": {},\n "name": "",\n "uid": "",\n "updateTime": ""\n}' \
--output-document \
- {{baseUrl}}/v1/:parent/dataTaxonomies
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"attributeCount": 0,
"createTime": "",
"description": "",
"displayName": "",
"etag": "",
"labels": [],
"name": "",
"uid": "",
"updateTime": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:parent/dataTaxonomies")! 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
dataplex.projects.locations.dataTaxonomies.list
{{baseUrl}}/v1/:parent/dataTaxonomies
QUERY PARAMS
parent
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:parent/dataTaxonomies");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v1/:parent/dataTaxonomies")
require "http/client"
url = "{{baseUrl}}/v1/:parent/dataTaxonomies"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/v1/:parent/dataTaxonomies"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/:parent/dataTaxonomies");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/:parent/dataTaxonomies"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/v1/:parent/dataTaxonomies HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1/:parent/dataTaxonomies")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/:parent/dataTaxonomies"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/:parent/dataTaxonomies")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1/:parent/dataTaxonomies")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/v1/:parent/dataTaxonomies');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/v1/:parent/dataTaxonomies'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/:parent/dataTaxonomies';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/:parent/dataTaxonomies',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1/:parent/dataTaxonomies")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/:parent/dataTaxonomies',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'GET', url: '{{baseUrl}}/v1/:parent/dataTaxonomies'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v1/:parent/dataTaxonomies');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {method: 'GET', url: '{{baseUrl}}/v1/:parent/dataTaxonomies'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/:parent/dataTaxonomies';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:parent/dataTaxonomies"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/:parent/dataTaxonomies" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/:parent/dataTaxonomies",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/v1/:parent/dataTaxonomies');
echo $response->getBody();
setUrl('{{baseUrl}}/v1/:parent/dataTaxonomies');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/:parent/dataTaxonomies');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:parent/dataTaxonomies' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:parent/dataTaxonomies' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v1/:parent/dataTaxonomies")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/:parent/dataTaxonomies"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/:parent/dataTaxonomies"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/:parent/dataTaxonomies")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/v1/:parent/dataTaxonomies') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/:parent/dataTaxonomies";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/v1/:parent/dataTaxonomies
http GET {{baseUrl}}/v1/:parent/dataTaxonomies
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v1/:parent/dataTaxonomies
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:parent/dataTaxonomies")! 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
dataplex.projects.locations.lakes.content.create
{{baseUrl}}/v1/:parent/content
QUERY PARAMS
parent
BODY json
{
"createTime": "",
"dataText": "",
"description": "",
"labels": {},
"name": "",
"notebook": {
"kernelType": ""
},
"path": "",
"sqlScript": {
"engine": ""
},
"uid": "",
"updateTime": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:parent/content");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"createTime\": \"\",\n \"dataText\": \"\",\n \"description\": \"\",\n \"labels\": {},\n \"name\": \"\",\n \"notebook\": {\n \"kernelType\": \"\"\n },\n \"path\": \"\",\n \"sqlScript\": {\n \"engine\": \"\"\n },\n \"uid\": \"\",\n \"updateTime\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1/:parent/content" {:content-type :json
:form-params {:createTime ""
:dataText ""
:description ""
:labels {}
:name ""
:notebook {:kernelType ""}
:path ""
:sqlScript {:engine ""}
:uid ""
:updateTime ""}})
require "http/client"
url = "{{baseUrl}}/v1/:parent/content"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"createTime\": \"\",\n \"dataText\": \"\",\n \"description\": \"\",\n \"labels\": {},\n \"name\": \"\",\n \"notebook\": {\n \"kernelType\": \"\"\n },\n \"path\": \"\",\n \"sqlScript\": {\n \"engine\": \"\"\n },\n \"uid\": \"\",\n \"updateTime\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/v1/:parent/content"),
Content = new StringContent("{\n \"createTime\": \"\",\n \"dataText\": \"\",\n \"description\": \"\",\n \"labels\": {},\n \"name\": \"\",\n \"notebook\": {\n \"kernelType\": \"\"\n },\n \"path\": \"\",\n \"sqlScript\": {\n \"engine\": \"\"\n },\n \"uid\": \"\",\n \"updateTime\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/:parent/content");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"createTime\": \"\",\n \"dataText\": \"\",\n \"description\": \"\",\n \"labels\": {},\n \"name\": \"\",\n \"notebook\": {\n \"kernelType\": \"\"\n },\n \"path\": \"\",\n \"sqlScript\": {\n \"engine\": \"\"\n },\n \"uid\": \"\",\n \"updateTime\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/:parent/content"
payload := strings.NewReader("{\n \"createTime\": \"\",\n \"dataText\": \"\",\n \"description\": \"\",\n \"labels\": {},\n \"name\": \"\",\n \"notebook\": {\n \"kernelType\": \"\"\n },\n \"path\": \"\",\n \"sqlScript\": {\n \"engine\": \"\"\n },\n \"uid\": \"\",\n \"updateTime\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/v1/:parent/content HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 219
{
"createTime": "",
"dataText": "",
"description": "",
"labels": {},
"name": "",
"notebook": {
"kernelType": ""
},
"path": "",
"sqlScript": {
"engine": ""
},
"uid": "",
"updateTime": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1/:parent/content")
.setHeader("content-type", "application/json")
.setBody("{\n \"createTime\": \"\",\n \"dataText\": \"\",\n \"description\": \"\",\n \"labels\": {},\n \"name\": \"\",\n \"notebook\": {\n \"kernelType\": \"\"\n },\n \"path\": \"\",\n \"sqlScript\": {\n \"engine\": \"\"\n },\n \"uid\": \"\",\n \"updateTime\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/:parent/content"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"createTime\": \"\",\n \"dataText\": \"\",\n \"description\": \"\",\n \"labels\": {},\n \"name\": \"\",\n \"notebook\": {\n \"kernelType\": \"\"\n },\n \"path\": \"\",\n \"sqlScript\": {\n \"engine\": \"\"\n },\n \"uid\": \"\",\n \"updateTime\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"createTime\": \"\",\n \"dataText\": \"\",\n \"description\": \"\",\n \"labels\": {},\n \"name\": \"\",\n \"notebook\": {\n \"kernelType\": \"\"\n },\n \"path\": \"\",\n \"sqlScript\": {\n \"engine\": \"\"\n },\n \"uid\": \"\",\n \"updateTime\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/:parent/content")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1/:parent/content")
.header("content-type", "application/json")
.body("{\n \"createTime\": \"\",\n \"dataText\": \"\",\n \"description\": \"\",\n \"labels\": {},\n \"name\": \"\",\n \"notebook\": {\n \"kernelType\": \"\"\n },\n \"path\": \"\",\n \"sqlScript\": {\n \"engine\": \"\"\n },\n \"uid\": \"\",\n \"updateTime\": \"\"\n}")
.asString();
const data = JSON.stringify({
createTime: '',
dataText: '',
description: '',
labels: {},
name: '',
notebook: {
kernelType: ''
},
path: '',
sqlScript: {
engine: ''
},
uid: '',
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}}/v1/:parent/content');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:parent/content',
headers: {'content-type': 'application/json'},
data: {
createTime: '',
dataText: '',
description: '',
labels: {},
name: '',
notebook: {kernelType: ''},
path: '',
sqlScript: {engine: ''},
uid: '',
updateTime: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/:parent/content';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"createTime":"","dataText":"","description":"","labels":{},"name":"","notebook":{"kernelType":""},"path":"","sqlScript":{"engine":""},"uid":"","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}}/v1/:parent/content',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "createTime": "",\n "dataText": "",\n "description": "",\n "labels": {},\n "name": "",\n "notebook": {\n "kernelType": ""\n },\n "path": "",\n "sqlScript": {\n "engine": ""\n },\n "uid": "",\n "updateTime": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"createTime\": \"\",\n \"dataText\": \"\",\n \"description\": \"\",\n \"labels\": {},\n \"name\": \"\",\n \"notebook\": {\n \"kernelType\": \"\"\n },\n \"path\": \"\",\n \"sqlScript\": {\n \"engine\": \"\"\n },\n \"uid\": \"\",\n \"updateTime\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1/:parent/content")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/:parent/content',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
createTime: '',
dataText: '',
description: '',
labels: {},
name: '',
notebook: {kernelType: ''},
path: '',
sqlScript: {engine: ''},
uid: '',
updateTime: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:parent/content',
headers: {'content-type': 'application/json'},
body: {
createTime: '',
dataText: '',
description: '',
labels: {},
name: '',
notebook: {kernelType: ''},
path: '',
sqlScript: {engine: ''},
uid: '',
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}}/v1/:parent/content');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
createTime: '',
dataText: '',
description: '',
labels: {},
name: '',
notebook: {
kernelType: ''
},
path: '',
sqlScript: {
engine: ''
},
uid: '',
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}}/v1/:parent/content',
headers: {'content-type': 'application/json'},
data: {
createTime: '',
dataText: '',
description: '',
labels: {},
name: '',
notebook: {kernelType: ''},
path: '',
sqlScript: {engine: ''},
uid: '',
updateTime: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/:parent/content';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"createTime":"","dataText":"","description":"","labels":{},"name":"","notebook":{"kernelType":""},"path":"","sqlScript":{"engine":""},"uid":"","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 = @{ @"createTime": @"",
@"dataText": @"",
@"description": @"",
@"labels": @{ },
@"name": @"",
@"notebook": @{ @"kernelType": @"" },
@"path": @"",
@"sqlScript": @{ @"engine": @"" },
@"uid": @"",
@"updateTime": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:parent/content"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/:parent/content" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"createTime\": \"\",\n \"dataText\": \"\",\n \"description\": \"\",\n \"labels\": {},\n \"name\": \"\",\n \"notebook\": {\n \"kernelType\": \"\"\n },\n \"path\": \"\",\n \"sqlScript\": {\n \"engine\": \"\"\n },\n \"uid\": \"\",\n \"updateTime\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/:parent/content",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'createTime' => '',
'dataText' => '',
'description' => '',
'labels' => [
],
'name' => '',
'notebook' => [
'kernelType' => ''
],
'path' => '',
'sqlScript' => [
'engine' => ''
],
'uid' => '',
'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}}/v1/:parent/content', [
'body' => '{
"createTime": "",
"dataText": "",
"description": "",
"labels": {},
"name": "",
"notebook": {
"kernelType": ""
},
"path": "",
"sqlScript": {
"engine": ""
},
"uid": "",
"updateTime": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1/:parent/content');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'createTime' => '',
'dataText' => '',
'description' => '',
'labels' => [
],
'name' => '',
'notebook' => [
'kernelType' => ''
],
'path' => '',
'sqlScript' => [
'engine' => ''
],
'uid' => '',
'updateTime' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'createTime' => '',
'dataText' => '',
'description' => '',
'labels' => [
],
'name' => '',
'notebook' => [
'kernelType' => ''
],
'path' => '',
'sqlScript' => [
'engine' => ''
],
'uid' => '',
'updateTime' => ''
]));
$request->setRequestUrl('{{baseUrl}}/v1/:parent/content');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:parent/content' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"createTime": "",
"dataText": "",
"description": "",
"labels": {},
"name": "",
"notebook": {
"kernelType": ""
},
"path": "",
"sqlScript": {
"engine": ""
},
"uid": "",
"updateTime": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:parent/content' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"createTime": "",
"dataText": "",
"description": "",
"labels": {},
"name": "",
"notebook": {
"kernelType": ""
},
"path": "",
"sqlScript": {
"engine": ""
},
"uid": "",
"updateTime": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"createTime\": \"\",\n \"dataText\": \"\",\n \"description\": \"\",\n \"labels\": {},\n \"name\": \"\",\n \"notebook\": {\n \"kernelType\": \"\"\n },\n \"path\": \"\",\n \"sqlScript\": {\n \"engine\": \"\"\n },\n \"uid\": \"\",\n \"updateTime\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1/:parent/content", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/:parent/content"
payload = {
"createTime": "",
"dataText": "",
"description": "",
"labels": {},
"name": "",
"notebook": { "kernelType": "" },
"path": "",
"sqlScript": { "engine": "" },
"uid": "",
"updateTime": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/:parent/content"
payload <- "{\n \"createTime\": \"\",\n \"dataText\": \"\",\n \"description\": \"\",\n \"labels\": {},\n \"name\": \"\",\n \"notebook\": {\n \"kernelType\": \"\"\n },\n \"path\": \"\",\n \"sqlScript\": {\n \"engine\": \"\"\n },\n \"uid\": \"\",\n \"updateTime\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/:parent/content")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"createTime\": \"\",\n \"dataText\": \"\",\n \"description\": \"\",\n \"labels\": {},\n \"name\": \"\",\n \"notebook\": {\n \"kernelType\": \"\"\n },\n \"path\": \"\",\n \"sqlScript\": {\n \"engine\": \"\"\n },\n \"uid\": \"\",\n \"updateTime\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/v1/:parent/content') do |req|
req.body = "{\n \"createTime\": \"\",\n \"dataText\": \"\",\n \"description\": \"\",\n \"labels\": {},\n \"name\": \"\",\n \"notebook\": {\n \"kernelType\": \"\"\n },\n \"path\": \"\",\n \"sqlScript\": {\n \"engine\": \"\"\n },\n \"uid\": \"\",\n \"updateTime\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/:parent/content";
let payload = json!({
"createTime": "",
"dataText": "",
"description": "",
"labels": json!({}),
"name": "",
"notebook": json!({"kernelType": ""}),
"path": "",
"sqlScript": json!({"engine": ""}),
"uid": "",
"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}}/v1/:parent/content \
--header 'content-type: application/json' \
--data '{
"createTime": "",
"dataText": "",
"description": "",
"labels": {},
"name": "",
"notebook": {
"kernelType": ""
},
"path": "",
"sqlScript": {
"engine": ""
},
"uid": "",
"updateTime": ""
}'
echo '{
"createTime": "",
"dataText": "",
"description": "",
"labels": {},
"name": "",
"notebook": {
"kernelType": ""
},
"path": "",
"sqlScript": {
"engine": ""
},
"uid": "",
"updateTime": ""
}' | \
http POST {{baseUrl}}/v1/:parent/content \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "createTime": "",\n "dataText": "",\n "description": "",\n "labels": {},\n "name": "",\n "notebook": {\n "kernelType": ""\n },\n "path": "",\n "sqlScript": {\n "engine": ""\n },\n "uid": "",\n "updateTime": ""\n}' \
--output-document \
- {{baseUrl}}/v1/:parent/content
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"createTime": "",
"dataText": "",
"description": "",
"labels": [],
"name": "",
"notebook": ["kernelType": ""],
"path": "",
"sqlScript": ["engine": ""],
"uid": "",
"updateTime": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:parent/content")! 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
dataplex.projects.locations.lakes.content.list
{{baseUrl}}/v1/:parent/content
QUERY PARAMS
parent
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:parent/content");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v1/:parent/content")
require "http/client"
url = "{{baseUrl}}/v1/:parent/content"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/v1/:parent/content"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/:parent/content");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/:parent/content"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/v1/:parent/content HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1/:parent/content")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/:parent/content"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/:parent/content")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1/:parent/content")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/v1/:parent/content');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/v1/:parent/content'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/:parent/content';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/:parent/content',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1/:parent/content")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/:parent/content',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'GET', url: '{{baseUrl}}/v1/:parent/content'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v1/:parent/content');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {method: 'GET', url: '{{baseUrl}}/v1/:parent/content'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/:parent/content';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:parent/content"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/:parent/content" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/:parent/content",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/v1/:parent/content');
echo $response->getBody();
setUrl('{{baseUrl}}/v1/:parent/content');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/:parent/content');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:parent/content' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:parent/content' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v1/:parent/content")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/:parent/content"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/:parent/content"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/:parent/content")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/v1/:parent/content') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/:parent/content";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/v1/:parent/content
http GET {{baseUrl}}/v1/:parent/content
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v1/:parent/content
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:parent/content")! 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
dataplex.projects.locations.lakes.contentitems.create
{{baseUrl}}/v1/:parent/contentitems
QUERY PARAMS
parent
BODY json
{
"createTime": "",
"dataText": "",
"description": "",
"labels": {},
"name": "",
"notebook": {
"kernelType": ""
},
"path": "",
"sqlScript": {
"engine": ""
},
"uid": "",
"updateTime": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:parent/contentitems");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"createTime\": \"\",\n \"dataText\": \"\",\n \"description\": \"\",\n \"labels\": {},\n \"name\": \"\",\n \"notebook\": {\n \"kernelType\": \"\"\n },\n \"path\": \"\",\n \"sqlScript\": {\n \"engine\": \"\"\n },\n \"uid\": \"\",\n \"updateTime\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1/:parent/contentitems" {:content-type :json
:form-params {:createTime ""
:dataText ""
:description ""
:labels {}
:name ""
:notebook {:kernelType ""}
:path ""
:sqlScript {:engine ""}
:uid ""
:updateTime ""}})
require "http/client"
url = "{{baseUrl}}/v1/:parent/contentitems"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"createTime\": \"\",\n \"dataText\": \"\",\n \"description\": \"\",\n \"labels\": {},\n \"name\": \"\",\n \"notebook\": {\n \"kernelType\": \"\"\n },\n \"path\": \"\",\n \"sqlScript\": {\n \"engine\": \"\"\n },\n \"uid\": \"\",\n \"updateTime\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/v1/:parent/contentitems"),
Content = new StringContent("{\n \"createTime\": \"\",\n \"dataText\": \"\",\n \"description\": \"\",\n \"labels\": {},\n \"name\": \"\",\n \"notebook\": {\n \"kernelType\": \"\"\n },\n \"path\": \"\",\n \"sqlScript\": {\n \"engine\": \"\"\n },\n \"uid\": \"\",\n \"updateTime\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/:parent/contentitems");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"createTime\": \"\",\n \"dataText\": \"\",\n \"description\": \"\",\n \"labels\": {},\n \"name\": \"\",\n \"notebook\": {\n \"kernelType\": \"\"\n },\n \"path\": \"\",\n \"sqlScript\": {\n \"engine\": \"\"\n },\n \"uid\": \"\",\n \"updateTime\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/:parent/contentitems"
payload := strings.NewReader("{\n \"createTime\": \"\",\n \"dataText\": \"\",\n \"description\": \"\",\n \"labels\": {},\n \"name\": \"\",\n \"notebook\": {\n \"kernelType\": \"\"\n },\n \"path\": \"\",\n \"sqlScript\": {\n \"engine\": \"\"\n },\n \"uid\": \"\",\n \"updateTime\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/v1/:parent/contentitems HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 219
{
"createTime": "",
"dataText": "",
"description": "",
"labels": {},
"name": "",
"notebook": {
"kernelType": ""
},
"path": "",
"sqlScript": {
"engine": ""
},
"uid": "",
"updateTime": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1/:parent/contentitems")
.setHeader("content-type", "application/json")
.setBody("{\n \"createTime\": \"\",\n \"dataText\": \"\",\n \"description\": \"\",\n \"labels\": {},\n \"name\": \"\",\n \"notebook\": {\n \"kernelType\": \"\"\n },\n \"path\": \"\",\n \"sqlScript\": {\n \"engine\": \"\"\n },\n \"uid\": \"\",\n \"updateTime\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/:parent/contentitems"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"createTime\": \"\",\n \"dataText\": \"\",\n \"description\": \"\",\n \"labels\": {},\n \"name\": \"\",\n \"notebook\": {\n \"kernelType\": \"\"\n },\n \"path\": \"\",\n \"sqlScript\": {\n \"engine\": \"\"\n },\n \"uid\": \"\",\n \"updateTime\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"createTime\": \"\",\n \"dataText\": \"\",\n \"description\": \"\",\n \"labels\": {},\n \"name\": \"\",\n \"notebook\": {\n \"kernelType\": \"\"\n },\n \"path\": \"\",\n \"sqlScript\": {\n \"engine\": \"\"\n },\n \"uid\": \"\",\n \"updateTime\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/:parent/contentitems")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1/:parent/contentitems")
.header("content-type", "application/json")
.body("{\n \"createTime\": \"\",\n \"dataText\": \"\",\n \"description\": \"\",\n \"labels\": {},\n \"name\": \"\",\n \"notebook\": {\n \"kernelType\": \"\"\n },\n \"path\": \"\",\n \"sqlScript\": {\n \"engine\": \"\"\n },\n \"uid\": \"\",\n \"updateTime\": \"\"\n}")
.asString();
const data = JSON.stringify({
createTime: '',
dataText: '',
description: '',
labels: {},
name: '',
notebook: {
kernelType: ''
},
path: '',
sqlScript: {
engine: ''
},
uid: '',
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}}/v1/:parent/contentitems');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:parent/contentitems',
headers: {'content-type': 'application/json'},
data: {
createTime: '',
dataText: '',
description: '',
labels: {},
name: '',
notebook: {kernelType: ''},
path: '',
sqlScript: {engine: ''},
uid: '',
updateTime: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/:parent/contentitems';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"createTime":"","dataText":"","description":"","labels":{},"name":"","notebook":{"kernelType":""},"path":"","sqlScript":{"engine":""},"uid":"","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}}/v1/:parent/contentitems',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "createTime": "",\n "dataText": "",\n "description": "",\n "labels": {},\n "name": "",\n "notebook": {\n "kernelType": ""\n },\n "path": "",\n "sqlScript": {\n "engine": ""\n },\n "uid": "",\n "updateTime": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"createTime\": \"\",\n \"dataText\": \"\",\n \"description\": \"\",\n \"labels\": {},\n \"name\": \"\",\n \"notebook\": {\n \"kernelType\": \"\"\n },\n \"path\": \"\",\n \"sqlScript\": {\n \"engine\": \"\"\n },\n \"uid\": \"\",\n \"updateTime\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1/:parent/contentitems")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/:parent/contentitems',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
createTime: '',
dataText: '',
description: '',
labels: {},
name: '',
notebook: {kernelType: ''},
path: '',
sqlScript: {engine: ''},
uid: '',
updateTime: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:parent/contentitems',
headers: {'content-type': 'application/json'},
body: {
createTime: '',
dataText: '',
description: '',
labels: {},
name: '',
notebook: {kernelType: ''},
path: '',
sqlScript: {engine: ''},
uid: '',
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}}/v1/:parent/contentitems');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
createTime: '',
dataText: '',
description: '',
labels: {},
name: '',
notebook: {
kernelType: ''
},
path: '',
sqlScript: {
engine: ''
},
uid: '',
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}}/v1/:parent/contentitems',
headers: {'content-type': 'application/json'},
data: {
createTime: '',
dataText: '',
description: '',
labels: {},
name: '',
notebook: {kernelType: ''},
path: '',
sqlScript: {engine: ''},
uid: '',
updateTime: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/:parent/contentitems';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"createTime":"","dataText":"","description":"","labels":{},"name":"","notebook":{"kernelType":""},"path":"","sqlScript":{"engine":""},"uid":"","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 = @{ @"createTime": @"",
@"dataText": @"",
@"description": @"",
@"labels": @{ },
@"name": @"",
@"notebook": @{ @"kernelType": @"" },
@"path": @"",
@"sqlScript": @{ @"engine": @"" },
@"uid": @"",
@"updateTime": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:parent/contentitems"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/:parent/contentitems" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"createTime\": \"\",\n \"dataText\": \"\",\n \"description\": \"\",\n \"labels\": {},\n \"name\": \"\",\n \"notebook\": {\n \"kernelType\": \"\"\n },\n \"path\": \"\",\n \"sqlScript\": {\n \"engine\": \"\"\n },\n \"uid\": \"\",\n \"updateTime\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/:parent/contentitems",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'createTime' => '',
'dataText' => '',
'description' => '',
'labels' => [
],
'name' => '',
'notebook' => [
'kernelType' => ''
],
'path' => '',
'sqlScript' => [
'engine' => ''
],
'uid' => '',
'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}}/v1/:parent/contentitems', [
'body' => '{
"createTime": "",
"dataText": "",
"description": "",
"labels": {},
"name": "",
"notebook": {
"kernelType": ""
},
"path": "",
"sqlScript": {
"engine": ""
},
"uid": "",
"updateTime": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1/:parent/contentitems');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'createTime' => '',
'dataText' => '',
'description' => '',
'labels' => [
],
'name' => '',
'notebook' => [
'kernelType' => ''
],
'path' => '',
'sqlScript' => [
'engine' => ''
],
'uid' => '',
'updateTime' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'createTime' => '',
'dataText' => '',
'description' => '',
'labels' => [
],
'name' => '',
'notebook' => [
'kernelType' => ''
],
'path' => '',
'sqlScript' => [
'engine' => ''
],
'uid' => '',
'updateTime' => ''
]));
$request->setRequestUrl('{{baseUrl}}/v1/:parent/contentitems');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:parent/contentitems' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"createTime": "",
"dataText": "",
"description": "",
"labels": {},
"name": "",
"notebook": {
"kernelType": ""
},
"path": "",
"sqlScript": {
"engine": ""
},
"uid": "",
"updateTime": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:parent/contentitems' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"createTime": "",
"dataText": "",
"description": "",
"labels": {},
"name": "",
"notebook": {
"kernelType": ""
},
"path": "",
"sqlScript": {
"engine": ""
},
"uid": "",
"updateTime": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"createTime\": \"\",\n \"dataText\": \"\",\n \"description\": \"\",\n \"labels\": {},\n \"name\": \"\",\n \"notebook\": {\n \"kernelType\": \"\"\n },\n \"path\": \"\",\n \"sqlScript\": {\n \"engine\": \"\"\n },\n \"uid\": \"\",\n \"updateTime\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1/:parent/contentitems", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/:parent/contentitems"
payload = {
"createTime": "",
"dataText": "",
"description": "",
"labels": {},
"name": "",
"notebook": { "kernelType": "" },
"path": "",
"sqlScript": { "engine": "" },
"uid": "",
"updateTime": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/:parent/contentitems"
payload <- "{\n \"createTime\": \"\",\n \"dataText\": \"\",\n \"description\": \"\",\n \"labels\": {},\n \"name\": \"\",\n \"notebook\": {\n \"kernelType\": \"\"\n },\n \"path\": \"\",\n \"sqlScript\": {\n \"engine\": \"\"\n },\n \"uid\": \"\",\n \"updateTime\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/:parent/contentitems")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"createTime\": \"\",\n \"dataText\": \"\",\n \"description\": \"\",\n \"labels\": {},\n \"name\": \"\",\n \"notebook\": {\n \"kernelType\": \"\"\n },\n \"path\": \"\",\n \"sqlScript\": {\n \"engine\": \"\"\n },\n \"uid\": \"\",\n \"updateTime\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/v1/:parent/contentitems') do |req|
req.body = "{\n \"createTime\": \"\",\n \"dataText\": \"\",\n \"description\": \"\",\n \"labels\": {},\n \"name\": \"\",\n \"notebook\": {\n \"kernelType\": \"\"\n },\n \"path\": \"\",\n \"sqlScript\": {\n \"engine\": \"\"\n },\n \"uid\": \"\",\n \"updateTime\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/:parent/contentitems";
let payload = json!({
"createTime": "",
"dataText": "",
"description": "",
"labels": json!({}),
"name": "",
"notebook": json!({"kernelType": ""}),
"path": "",
"sqlScript": json!({"engine": ""}),
"uid": "",
"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}}/v1/:parent/contentitems \
--header 'content-type: application/json' \
--data '{
"createTime": "",
"dataText": "",
"description": "",
"labels": {},
"name": "",
"notebook": {
"kernelType": ""
},
"path": "",
"sqlScript": {
"engine": ""
},
"uid": "",
"updateTime": ""
}'
echo '{
"createTime": "",
"dataText": "",
"description": "",
"labels": {},
"name": "",
"notebook": {
"kernelType": ""
},
"path": "",
"sqlScript": {
"engine": ""
},
"uid": "",
"updateTime": ""
}' | \
http POST {{baseUrl}}/v1/:parent/contentitems \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "createTime": "",\n "dataText": "",\n "description": "",\n "labels": {},\n "name": "",\n "notebook": {\n "kernelType": ""\n },\n "path": "",\n "sqlScript": {\n "engine": ""\n },\n "uid": "",\n "updateTime": ""\n}' \
--output-document \
- {{baseUrl}}/v1/:parent/contentitems
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"createTime": "",
"dataText": "",
"description": "",
"labels": [],
"name": "",
"notebook": ["kernelType": ""],
"path": "",
"sqlScript": ["engine": ""],
"uid": "",
"updateTime": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:parent/contentitems")! 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
dataplex.projects.locations.lakes.contentitems.list
{{baseUrl}}/v1/:parent/contentitems
QUERY PARAMS
parent
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:parent/contentitems");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v1/:parent/contentitems")
require "http/client"
url = "{{baseUrl}}/v1/:parent/contentitems"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/v1/:parent/contentitems"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/:parent/contentitems");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/:parent/contentitems"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/v1/:parent/contentitems HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1/:parent/contentitems")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/:parent/contentitems"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/:parent/contentitems")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1/:parent/contentitems")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/v1/:parent/contentitems');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/v1/:parent/contentitems'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/:parent/contentitems';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/:parent/contentitems',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1/:parent/contentitems")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/:parent/contentitems',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'GET', url: '{{baseUrl}}/v1/:parent/contentitems'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v1/:parent/contentitems');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {method: 'GET', url: '{{baseUrl}}/v1/:parent/contentitems'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/:parent/contentitems';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:parent/contentitems"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/:parent/contentitems" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/:parent/contentitems",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/v1/:parent/contentitems');
echo $response->getBody();
setUrl('{{baseUrl}}/v1/:parent/contentitems');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/:parent/contentitems');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:parent/contentitems' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:parent/contentitems' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v1/:parent/contentitems")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/:parent/contentitems"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/:parent/contentitems"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/:parent/contentitems")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/v1/:parent/contentitems') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/:parent/contentitems";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/v1/:parent/contentitems
http GET {{baseUrl}}/v1/:parent/contentitems
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v1/:parent/contentitems
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:parent/contentitems")! 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
dataplex.projects.locations.lakes.create
{{baseUrl}}/v1/:parent/lakes
QUERY PARAMS
parent
BODY json
{
"assetStatus": {
"activeAssets": 0,
"securityPolicyApplyingAssets": 0,
"updateTime": ""
},
"createTime": "",
"description": "",
"displayName": "",
"labels": {},
"metastore": {
"service": ""
},
"metastoreStatus": {
"endpoint": "",
"message": "",
"state": "",
"updateTime": ""
},
"name": "",
"serviceAccount": "",
"state": "",
"uid": "",
"updateTime": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:parent/lakes");
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 \"assetStatus\": {\n \"activeAssets\": 0,\n \"securityPolicyApplyingAssets\": 0,\n \"updateTime\": \"\"\n },\n \"createTime\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"labels\": {},\n \"metastore\": {\n \"service\": \"\"\n },\n \"metastoreStatus\": {\n \"endpoint\": \"\",\n \"message\": \"\",\n \"state\": \"\",\n \"updateTime\": \"\"\n },\n \"name\": \"\",\n \"serviceAccount\": \"\",\n \"state\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1/:parent/lakes" {:content-type :json
:form-params {:assetStatus {:activeAssets 0
:securityPolicyApplyingAssets 0
:updateTime ""}
:createTime ""
:description ""
:displayName ""
:labels {}
:metastore {:service ""}
:metastoreStatus {:endpoint ""
:message ""
:state ""
:updateTime ""}
:name ""
:serviceAccount ""
:state ""
:uid ""
:updateTime ""}})
require "http/client"
url = "{{baseUrl}}/v1/:parent/lakes"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"assetStatus\": {\n \"activeAssets\": 0,\n \"securityPolicyApplyingAssets\": 0,\n \"updateTime\": \"\"\n },\n \"createTime\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"labels\": {},\n \"metastore\": {\n \"service\": \"\"\n },\n \"metastoreStatus\": {\n \"endpoint\": \"\",\n \"message\": \"\",\n \"state\": \"\",\n \"updateTime\": \"\"\n },\n \"name\": \"\",\n \"serviceAccount\": \"\",\n \"state\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/v1/:parent/lakes"),
Content = new StringContent("{\n \"assetStatus\": {\n \"activeAssets\": 0,\n \"securityPolicyApplyingAssets\": 0,\n \"updateTime\": \"\"\n },\n \"createTime\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"labels\": {},\n \"metastore\": {\n \"service\": \"\"\n },\n \"metastoreStatus\": {\n \"endpoint\": \"\",\n \"message\": \"\",\n \"state\": \"\",\n \"updateTime\": \"\"\n },\n \"name\": \"\",\n \"serviceAccount\": \"\",\n \"state\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/:parent/lakes");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"assetStatus\": {\n \"activeAssets\": 0,\n \"securityPolicyApplyingAssets\": 0,\n \"updateTime\": \"\"\n },\n \"createTime\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"labels\": {},\n \"metastore\": {\n \"service\": \"\"\n },\n \"metastoreStatus\": {\n \"endpoint\": \"\",\n \"message\": \"\",\n \"state\": \"\",\n \"updateTime\": \"\"\n },\n \"name\": \"\",\n \"serviceAccount\": \"\",\n \"state\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/:parent/lakes"
payload := strings.NewReader("{\n \"assetStatus\": {\n \"activeAssets\": 0,\n \"securityPolicyApplyingAssets\": 0,\n \"updateTime\": \"\"\n },\n \"createTime\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"labels\": {},\n \"metastore\": {\n \"service\": \"\"\n },\n \"metastoreStatus\": {\n \"endpoint\": \"\",\n \"message\": \"\",\n \"state\": \"\",\n \"updateTime\": \"\"\n },\n \"name\": \"\",\n \"serviceAccount\": \"\",\n \"state\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/v1/:parent/lakes HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 418
{
"assetStatus": {
"activeAssets": 0,
"securityPolicyApplyingAssets": 0,
"updateTime": ""
},
"createTime": "",
"description": "",
"displayName": "",
"labels": {},
"metastore": {
"service": ""
},
"metastoreStatus": {
"endpoint": "",
"message": "",
"state": "",
"updateTime": ""
},
"name": "",
"serviceAccount": "",
"state": "",
"uid": "",
"updateTime": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1/:parent/lakes")
.setHeader("content-type", "application/json")
.setBody("{\n \"assetStatus\": {\n \"activeAssets\": 0,\n \"securityPolicyApplyingAssets\": 0,\n \"updateTime\": \"\"\n },\n \"createTime\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"labels\": {},\n \"metastore\": {\n \"service\": \"\"\n },\n \"metastoreStatus\": {\n \"endpoint\": \"\",\n \"message\": \"\",\n \"state\": \"\",\n \"updateTime\": \"\"\n },\n \"name\": \"\",\n \"serviceAccount\": \"\",\n \"state\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/:parent/lakes"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"assetStatus\": {\n \"activeAssets\": 0,\n \"securityPolicyApplyingAssets\": 0,\n \"updateTime\": \"\"\n },\n \"createTime\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"labels\": {},\n \"metastore\": {\n \"service\": \"\"\n },\n \"metastoreStatus\": {\n \"endpoint\": \"\",\n \"message\": \"\",\n \"state\": \"\",\n \"updateTime\": \"\"\n },\n \"name\": \"\",\n \"serviceAccount\": \"\",\n \"state\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\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 \"assetStatus\": {\n \"activeAssets\": 0,\n \"securityPolicyApplyingAssets\": 0,\n \"updateTime\": \"\"\n },\n \"createTime\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"labels\": {},\n \"metastore\": {\n \"service\": \"\"\n },\n \"metastoreStatus\": {\n \"endpoint\": \"\",\n \"message\": \"\",\n \"state\": \"\",\n \"updateTime\": \"\"\n },\n \"name\": \"\",\n \"serviceAccount\": \"\",\n \"state\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/:parent/lakes")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1/:parent/lakes")
.header("content-type", "application/json")
.body("{\n \"assetStatus\": {\n \"activeAssets\": 0,\n \"securityPolicyApplyingAssets\": 0,\n \"updateTime\": \"\"\n },\n \"createTime\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"labels\": {},\n \"metastore\": {\n \"service\": \"\"\n },\n \"metastoreStatus\": {\n \"endpoint\": \"\",\n \"message\": \"\",\n \"state\": \"\",\n \"updateTime\": \"\"\n },\n \"name\": \"\",\n \"serviceAccount\": \"\",\n \"state\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}")
.asString();
const data = JSON.stringify({
assetStatus: {
activeAssets: 0,
securityPolicyApplyingAssets: 0,
updateTime: ''
},
createTime: '',
description: '',
displayName: '',
labels: {},
metastore: {
service: ''
},
metastoreStatus: {
endpoint: '',
message: '',
state: '',
updateTime: ''
},
name: '',
serviceAccount: '',
state: '',
uid: '',
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}}/v1/:parent/lakes');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:parent/lakes',
headers: {'content-type': 'application/json'},
data: {
assetStatus: {activeAssets: 0, securityPolicyApplyingAssets: 0, updateTime: ''},
createTime: '',
description: '',
displayName: '',
labels: {},
metastore: {service: ''},
metastoreStatus: {endpoint: '', message: '', state: '', updateTime: ''},
name: '',
serviceAccount: '',
state: '',
uid: '',
updateTime: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/:parent/lakes';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"assetStatus":{"activeAssets":0,"securityPolicyApplyingAssets":0,"updateTime":""},"createTime":"","description":"","displayName":"","labels":{},"metastore":{"service":""},"metastoreStatus":{"endpoint":"","message":"","state":"","updateTime":""},"name":"","serviceAccount":"","state":"","uid":"","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}}/v1/:parent/lakes',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "assetStatus": {\n "activeAssets": 0,\n "securityPolicyApplyingAssets": 0,\n "updateTime": ""\n },\n "createTime": "",\n "description": "",\n "displayName": "",\n "labels": {},\n "metastore": {\n "service": ""\n },\n "metastoreStatus": {\n "endpoint": "",\n "message": "",\n "state": "",\n "updateTime": ""\n },\n "name": "",\n "serviceAccount": "",\n "state": "",\n "uid": "",\n "updateTime": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"assetStatus\": {\n \"activeAssets\": 0,\n \"securityPolicyApplyingAssets\": 0,\n \"updateTime\": \"\"\n },\n \"createTime\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"labels\": {},\n \"metastore\": {\n \"service\": \"\"\n },\n \"metastoreStatus\": {\n \"endpoint\": \"\",\n \"message\": \"\",\n \"state\": \"\",\n \"updateTime\": \"\"\n },\n \"name\": \"\",\n \"serviceAccount\": \"\",\n \"state\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1/:parent/lakes")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/:parent/lakes',
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({
assetStatus: {activeAssets: 0, securityPolicyApplyingAssets: 0, updateTime: ''},
createTime: '',
description: '',
displayName: '',
labels: {},
metastore: {service: ''},
metastoreStatus: {endpoint: '', message: '', state: '', updateTime: ''},
name: '',
serviceAccount: '',
state: '',
uid: '',
updateTime: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:parent/lakes',
headers: {'content-type': 'application/json'},
body: {
assetStatus: {activeAssets: 0, securityPolicyApplyingAssets: 0, updateTime: ''},
createTime: '',
description: '',
displayName: '',
labels: {},
metastore: {service: ''},
metastoreStatus: {endpoint: '', message: '', state: '', updateTime: ''},
name: '',
serviceAccount: '',
state: '',
uid: '',
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}}/v1/:parent/lakes');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
assetStatus: {
activeAssets: 0,
securityPolicyApplyingAssets: 0,
updateTime: ''
},
createTime: '',
description: '',
displayName: '',
labels: {},
metastore: {
service: ''
},
metastoreStatus: {
endpoint: '',
message: '',
state: '',
updateTime: ''
},
name: '',
serviceAccount: '',
state: '',
uid: '',
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}}/v1/:parent/lakes',
headers: {'content-type': 'application/json'},
data: {
assetStatus: {activeAssets: 0, securityPolicyApplyingAssets: 0, updateTime: ''},
createTime: '',
description: '',
displayName: '',
labels: {},
metastore: {service: ''},
metastoreStatus: {endpoint: '', message: '', state: '', updateTime: ''},
name: '',
serviceAccount: '',
state: '',
uid: '',
updateTime: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/:parent/lakes';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"assetStatus":{"activeAssets":0,"securityPolicyApplyingAssets":0,"updateTime":""},"createTime":"","description":"","displayName":"","labels":{},"metastore":{"service":""},"metastoreStatus":{"endpoint":"","message":"","state":"","updateTime":""},"name":"","serviceAccount":"","state":"","uid":"","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 = @{ @"assetStatus": @{ @"activeAssets": @0, @"securityPolicyApplyingAssets": @0, @"updateTime": @"" },
@"createTime": @"",
@"description": @"",
@"displayName": @"",
@"labels": @{ },
@"metastore": @{ @"service": @"" },
@"metastoreStatus": @{ @"endpoint": @"", @"message": @"", @"state": @"", @"updateTime": @"" },
@"name": @"",
@"serviceAccount": @"",
@"state": @"",
@"uid": @"",
@"updateTime": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:parent/lakes"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/:parent/lakes" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"assetStatus\": {\n \"activeAssets\": 0,\n \"securityPolicyApplyingAssets\": 0,\n \"updateTime\": \"\"\n },\n \"createTime\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"labels\": {},\n \"metastore\": {\n \"service\": \"\"\n },\n \"metastoreStatus\": {\n \"endpoint\": \"\",\n \"message\": \"\",\n \"state\": \"\",\n \"updateTime\": \"\"\n },\n \"name\": \"\",\n \"serviceAccount\": \"\",\n \"state\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/:parent/lakes",
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([
'assetStatus' => [
'activeAssets' => 0,
'securityPolicyApplyingAssets' => 0,
'updateTime' => ''
],
'createTime' => '',
'description' => '',
'displayName' => '',
'labels' => [
],
'metastore' => [
'service' => ''
],
'metastoreStatus' => [
'endpoint' => '',
'message' => '',
'state' => '',
'updateTime' => ''
],
'name' => '',
'serviceAccount' => '',
'state' => '',
'uid' => '',
'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}}/v1/:parent/lakes', [
'body' => '{
"assetStatus": {
"activeAssets": 0,
"securityPolicyApplyingAssets": 0,
"updateTime": ""
},
"createTime": "",
"description": "",
"displayName": "",
"labels": {},
"metastore": {
"service": ""
},
"metastoreStatus": {
"endpoint": "",
"message": "",
"state": "",
"updateTime": ""
},
"name": "",
"serviceAccount": "",
"state": "",
"uid": "",
"updateTime": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1/:parent/lakes');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'assetStatus' => [
'activeAssets' => 0,
'securityPolicyApplyingAssets' => 0,
'updateTime' => ''
],
'createTime' => '',
'description' => '',
'displayName' => '',
'labels' => [
],
'metastore' => [
'service' => ''
],
'metastoreStatus' => [
'endpoint' => '',
'message' => '',
'state' => '',
'updateTime' => ''
],
'name' => '',
'serviceAccount' => '',
'state' => '',
'uid' => '',
'updateTime' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'assetStatus' => [
'activeAssets' => 0,
'securityPolicyApplyingAssets' => 0,
'updateTime' => ''
],
'createTime' => '',
'description' => '',
'displayName' => '',
'labels' => [
],
'metastore' => [
'service' => ''
],
'metastoreStatus' => [
'endpoint' => '',
'message' => '',
'state' => '',
'updateTime' => ''
],
'name' => '',
'serviceAccount' => '',
'state' => '',
'uid' => '',
'updateTime' => ''
]));
$request->setRequestUrl('{{baseUrl}}/v1/:parent/lakes');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:parent/lakes' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"assetStatus": {
"activeAssets": 0,
"securityPolicyApplyingAssets": 0,
"updateTime": ""
},
"createTime": "",
"description": "",
"displayName": "",
"labels": {},
"metastore": {
"service": ""
},
"metastoreStatus": {
"endpoint": "",
"message": "",
"state": "",
"updateTime": ""
},
"name": "",
"serviceAccount": "",
"state": "",
"uid": "",
"updateTime": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:parent/lakes' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"assetStatus": {
"activeAssets": 0,
"securityPolicyApplyingAssets": 0,
"updateTime": ""
},
"createTime": "",
"description": "",
"displayName": "",
"labels": {},
"metastore": {
"service": ""
},
"metastoreStatus": {
"endpoint": "",
"message": "",
"state": "",
"updateTime": ""
},
"name": "",
"serviceAccount": "",
"state": "",
"uid": "",
"updateTime": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"assetStatus\": {\n \"activeAssets\": 0,\n \"securityPolicyApplyingAssets\": 0,\n \"updateTime\": \"\"\n },\n \"createTime\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"labels\": {},\n \"metastore\": {\n \"service\": \"\"\n },\n \"metastoreStatus\": {\n \"endpoint\": \"\",\n \"message\": \"\",\n \"state\": \"\",\n \"updateTime\": \"\"\n },\n \"name\": \"\",\n \"serviceAccount\": \"\",\n \"state\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1/:parent/lakes", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/:parent/lakes"
payload = {
"assetStatus": {
"activeAssets": 0,
"securityPolicyApplyingAssets": 0,
"updateTime": ""
},
"createTime": "",
"description": "",
"displayName": "",
"labels": {},
"metastore": { "service": "" },
"metastoreStatus": {
"endpoint": "",
"message": "",
"state": "",
"updateTime": ""
},
"name": "",
"serviceAccount": "",
"state": "",
"uid": "",
"updateTime": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/:parent/lakes"
payload <- "{\n \"assetStatus\": {\n \"activeAssets\": 0,\n \"securityPolicyApplyingAssets\": 0,\n \"updateTime\": \"\"\n },\n \"createTime\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"labels\": {},\n \"metastore\": {\n \"service\": \"\"\n },\n \"metastoreStatus\": {\n \"endpoint\": \"\",\n \"message\": \"\",\n \"state\": \"\",\n \"updateTime\": \"\"\n },\n \"name\": \"\",\n \"serviceAccount\": \"\",\n \"state\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/:parent/lakes")
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 \"assetStatus\": {\n \"activeAssets\": 0,\n \"securityPolicyApplyingAssets\": 0,\n \"updateTime\": \"\"\n },\n \"createTime\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"labels\": {},\n \"metastore\": {\n \"service\": \"\"\n },\n \"metastoreStatus\": {\n \"endpoint\": \"\",\n \"message\": \"\",\n \"state\": \"\",\n \"updateTime\": \"\"\n },\n \"name\": \"\",\n \"serviceAccount\": \"\",\n \"state\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/v1/:parent/lakes') do |req|
req.body = "{\n \"assetStatus\": {\n \"activeAssets\": 0,\n \"securityPolicyApplyingAssets\": 0,\n \"updateTime\": \"\"\n },\n \"createTime\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"labels\": {},\n \"metastore\": {\n \"service\": \"\"\n },\n \"metastoreStatus\": {\n \"endpoint\": \"\",\n \"message\": \"\",\n \"state\": \"\",\n \"updateTime\": \"\"\n },\n \"name\": \"\",\n \"serviceAccount\": \"\",\n \"state\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/:parent/lakes";
let payload = json!({
"assetStatus": json!({
"activeAssets": 0,
"securityPolicyApplyingAssets": 0,
"updateTime": ""
}),
"createTime": "",
"description": "",
"displayName": "",
"labels": json!({}),
"metastore": json!({"service": ""}),
"metastoreStatus": json!({
"endpoint": "",
"message": "",
"state": "",
"updateTime": ""
}),
"name": "",
"serviceAccount": "",
"state": "",
"uid": "",
"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}}/v1/:parent/lakes \
--header 'content-type: application/json' \
--data '{
"assetStatus": {
"activeAssets": 0,
"securityPolicyApplyingAssets": 0,
"updateTime": ""
},
"createTime": "",
"description": "",
"displayName": "",
"labels": {},
"metastore": {
"service": ""
},
"metastoreStatus": {
"endpoint": "",
"message": "",
"state": "",
"updateTime": ""
},
"name": "",
"serviceAccount": "",
"state": "",
"uid": "",
"updateTime": ""
}'
echo '{
"assetStatus": {
"activeAssets": 0,
"securityPolicyApplyingAssets": 0,
"updateTime": ""
},
"createTime": "",
"description": "",
"displayName": "",
"labels": {},
"metastore": {
"service": ""
},
"metastoreStatus": {
"endpoint": "",
"message": "",
"state": "",
"updateTime": ""
},
"name": "",
"serviceAccount": "",
"state": "",
"uid": "",
"updateTime": ""
}' | \
http POST {{baseUrl}}/v1/:parent/lakes \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "assetStatus": {\n "activeAssets": 0,\n "securityPolicyApplyingAssets": 0,\n "updateTime": ""\n },\n "createTime": "",\n "description": "",\n "displayName": "",\n "labels": {},\n "metastore": {\n "service": ""\n },\n "metastoreStatus": {\n "endpoint": "",\n "message": "",\n "state": "",\n "updateTime": ""\n },\n "name": "",\n "serviceAccount": "",\n "state": "",\n "uid": "",\n "updateTime": ""\n}' \
--output-document \
- {{baseUrl}}/v1/:parent/lakes
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"assetStatus": [
"activeAssets": 0,
"securityPolicyApplyingAssets": 0,
"updateTime": ""
],
"createTime": "",
"description": "",
"displayName": "",
"labels": [],
"metastore": ["service": ""],
"metastoreStatus": [
"endpoint": "",
"message": "",
"state": "",
"updateTime": ""
],
"name": "",
"serviceAccount": "",
"state": "",
"uid": "",
"updateTime": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:parent/lakes")! 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
dataplex.projects.locations.lakes.environments.create
{{baseUrl}}/v1/:parent/environments
QUERY PARAMS
parent
BODY json
{
"createTime": "",
"description": "",
"displayName": "",
"endpoints": {
"notebooks": "",
"sql": ""
},
"infrastructureSpec": {
"compute": {
"diskSizeGb": 0,
"maxNodeCount": 0,
"nodeCount": 0
},
"osImage": {
"imageVersion": "",
"javaLibraries": [],
"properties": {},
"pythonPackages": []
}
},
"labels": {},
"name": "",
"sessionSpec": {
"enableFastStartup": false,
"maxIdleDuration": ""
},
"sessionStatus": {
"active": false
},
"state": "",
"uid": "",
"updateTime": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:parent/environments");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"createTime\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"endpoints\": {\n \"notebooks\": \"\",\n \"sql\": \"\"\n },\n \"infrastructureSpec\": {\n \"compute\": {\n \"diskSizeGb\": 0,\n \"maxNodeCount\": 0,\n \"nodeCount\": 0\n },\n \"osImage\": {\n \"imageVersion\": \"\",\n \"javaLibraries\": [],\n \"properties\": {},\n \"pythonPackages\": []\n }\n },\n \"labels\": {},\n \"name\": \"\",\n \"sessionSpec\": {\n \"enableFastStartup\": false,\n \"maxIdleDuration\": \"\"\n },\n \"sessionStatus\": {\n \"active\": false\n },\n \"state\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1/:parent/environments" {:content-type :json
:form-params {:createTime ""
:description ""
:displayName ""
:endpoints {:notebooks ""
:sql ""}
:infrastructureSpec {:compute {:diskSizeGb 0
:maxNodeCount 0
:nodeCount 0}
:osImage {:imageVersion ""
:javaLibraries []
:properties {}
:pythonPackages []}}
:labels {}
:name ""
:sessionSpec {:enableFastStartup false
:maxIdleDuration ""}
:sessionStatus {:active false}
:state ""
:uid ""
:updateTime ""}})
require "http/client"
url = "{{baseUrl}}/v1/:parent/environments"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"createTime\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"endpoints\": {\n \"notebooks\": \"\",\n \"sql\": \"\"\n },\n \"infrastructureSpec\": {\n \"compute\": {\n \"diskSizeGb\": 0,\n \"maxNodeCount\": 0,\n \"nodeCount\": 0\n },\n \"osImage\": {\n \"imageVersion\": \"\",\n \"javaLibraries\": [],\n \"properties\": {},\n \"pythonPackages\": []\n }\n },\n \"labels\": {},\n \"name\": \"\",\n \"sessionSpec\": {\n \"enableFastStartup\": false,\n \"maxIdleDuration\": \"\"\n },\n \"sessionStatus\": {\n \"active\": false\n },\n \"state\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/v1/:parent/environments"),
Content = new StringContent("{\n \"createTime\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"endpoints\": {\n \"notebooks\": \"\",\n \"sql\": \"\"\n },\n \"infrastructureSpec\": {\n \"compute\": {\n \"diskSizeGb\": 0,\n \"maxNodeCount\": 0,\n \"nodeCount\": 0\n },\n \"osImage\": {\n \"imageVersion\": \"\",\n \"javaLibraries\": [],\n \"properties\": {},\n \"pythonPackages\": []\n }\n },\n \"labels\": {},\n \"name\": \"\",\n \"sessionSpec\": {\n \"enableFastStartup\": false,\n \"maxIdleDuration\": \"\"\n },\n \"sessionStatus\": {\n \"active\": false\n },\n \"state\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/:parent/environments");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"createTime\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"endpoints\": {\n \"notebooks\": \"\",\n \"sql\": \"\"\n },\n \"infrastructureSpec\": {\n \"compute\": {\n \"diskSizeGb\": 0,\n \"maxNodeCount\": 0,\n \"nodeCount\": 0\n },\n \"osImage\": {\n \"imageVersion\": \"\",\n \"javaLibraries\": [],\n \"properties\": {},\n \"pythonPackages\": []\n }\n },\n \"labels\": {},\n \"name\": \"\",\n \"sessionSpec\": {\n \"enableFastStartup\": false,\n \"maxIdleDuration\": \"\"\n },\n \"sessionStatus\": {\n \"active\": false\n },\n \"state\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/:parent/environments"
payload := strings.NewReader("{\n \"createTime\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"endpoints\": {\n \"notebooks\": \"\",\n \"sql\": \"\"\n },\n \"infrastructureSpec\": {\n \"compute\": {\n \"diskSizeGb\": 0,\n \"maxNodeCount\": 0,\n \"nodeCount\": 0\n },\n \"osImage\": {\n \"imageVersion\": \"\",\n \"javaLibraries\": [],\n \"properties\": {},\n \"pythonPackages\": []\n }\n },\n \"labels\": {},\n \"name\": \"\",\n \"sessionSpec\": {\n \"enableFastStartup\": false,\n \"maxIdleDuration\": \"\"\n },\n \"sessionStatus\": {\n \"active\": false\n },\n \"state\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/v1/:parent/environments HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 578
{
"createTime": "",
"description": "",
"displayName": "",
"endpoints": {
"notebooks": "",
"sql": ""
},
"infrastructureSpec": {
"compute": {
"diskSizeGb": 0,
"maxNodeCount": 0,
"nodeCount": 0
},
"osImage": {
"imageVersion": "",
"javaLibraries": [],
"properties": {},
"pythonPackages": []
}
},
"labels": {},
"name": "",
"sessionSpec": {
"enableFastStartup": false,
"maxIdleDuration": ""
},
"sessionStatus": {
"active": false
},
"state": "",
"uid": "",
"updateTime": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1/:parent/environments")
.setHeader("content-type", "application/json")
.setBody("{\n \"createTime\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"endpoints\": {\n \"notebooks\": \"\",\n \"sql\": \"\"\n },\n \"infrastructureSpec\": {\n \"compute\": {\n \"diskSizeGb\": 0,\n \"maxNodeCount\": 0,\n \"nodeCount\": 0\n },\n \"osImage\": {\n \"imageVersion\": \"\",\n \"javaLibraries\": [],\n \"properties\": {},\n \"pythonPackages\": []\n }\n },\n \"labels\": {},\n \"name\": \"\",\n \"sessionSpec\": {\n \"enableFastStartup\": false,\n \"maxIdleDuration\": \"\"\n },\n \"sessionStatus\": {\n \"active\": false\n },\n \"state\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/:parent/environments"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"createTime\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"endpoints\": {\n \"notebooks\": \"\",\n \"sql\": \"\"\n },\n \"infrastructureSpec\": {\n \"compute\": {\n \"diskSizeGb\": 0,\n \"maxNodeCount\": 0,\n \"nodeCount\": 0\n },\n \"osImage\": {\n \"imageVersion\": \"\",\n \"javaLibraries\": [],\n \"properties\": {},\n \"pythonPackages\": []\n }\n },\n \"labels\": {},\n \"name\": \"\",\n \"sessionSpec\": {\n \"enableFastStartup\": false,\n \"maxIdleDuration\": \"\"\n },\n \"sessionStatus\": {\n \"active\": false\n },\n \"state\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"createTime\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"endpoints\": {\n \"notebooks\": \"\",\n \"sql\": \"\"\n },\n \"infrastructureSpec\": {\n \"compute\": {\n \"diskSizeGb\": 0,\n \"maxNodeCount\": 0,\n \"nodeCount\": 0\n },\n \"osImage\": {\n \"imageVersion\": \"\",\n \"javaLibraries\": [],\n \"properties\": {},\n \"pythonPackages\": []\n }\n },\n \"labels\": {},\n \"name\": \"\",\n \"sessionSpec\": {\n \"enableFastStartup\": false,\n \"maxIdleDuration\": \"\"\n },\n \"sessionStatus\": {\n \"active\": false\n },\n \"state\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/:parent/environments")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1/:parent/environments")
.header("content-type", "application/json")
.body("{\n \"createTime\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"endpoints\": {\n \"notebooks\": \"\",\n \"sql\": \"\"\n },\n \"infrastructureSpec\": {\n \"compute\": {\n \"diskSizeGb\": 0,\n \"maxNodeCount\": 0,\n \"nodeCount\": 0\n },\n \"osImage\": {\n \"imageVersion\": \"\",\n \"javaLibraries\": [],\n \"properties\": {},\n \"pythonPackages\": []\n }\n },\n \"labels\": {},\n \"name\": \"\",\n \"sessionSpec\": {\n \"enableFastStartup\": false,\n \"maxIdleDuration\": \"\"\n },\n \"sessionStatus\": {\n \"active\": false\n },\n \"state\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}")
.asString();
const data = JSON.stringify({
createTime: '',
description: '',
displayName: '',
endpoints: {
notebooks: '',
sql: ''
},
infrastructureSpec: {
compute: {
diskSizeGb: 0,
maxNodeCount: 0,
nodeCount: 0
},
osImage: {
imageVersion: '',
javaLibraries: [],
properties: {},
pythonPackages: []
}
},
labels: {},
name: '',
sessionSpec: {
enableFastStartup: false,
maxIdleDuration: ''
},
sessionStatus: {
active: false
},
state: '',
uid: '',
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}}/v1/:parent/environments');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:parent/environments',
headers: {'content-type': 'application/json'},
data: {
createTime: '',
description: '',
displayName: '',
endpoints: {notebooks: '', sql: ''},
infrastructureSpec: {
compute: {diskSizeGb: 0, maxNodeCount: 0, nodeCount: 0},
osImage: {imageVersion: '', javaLibraries: [], properties: {}, pythonPackages: []}
},
labels: {},
name: '',
sessionSpec: {enableFastStartup: false, maxIdleDuration: ''},
sessionStatus: {active: false},
state: '',
uid: '',
updateTime: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/:parent/environments';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"createTime":"","description":"","displayName":"","endpoints":{"notebooks":"","sql":""},"infrastructureSpec":{"compute":{"diskSizeGb":0,"maxNodeCount":0,"nodeCount":0},"osImage":{"imageVersion":"","javaLibraries":[],"properties":{},"pythonPackages":[]}},"labels":{},"name":"","sessionSpec":{"enableFastStartup":false,"maxIdleDuration":""},"sessionStatus":{"active":false},"state":"","uid":"","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}}/v1/:parent/environments',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "createTime": "",\n "description": "",\n "displayName": "",\n "endpoints": {\n "notebooks": "",\n "sql": ""\n },\n "infrastructureSpec": {\n "compute": {\n "diskSizeGb": 0,\n "maxNodeCount": 0,\n "nodeCount": 0\n },\n "osImage": {\n "imageVersion": "",\n "javaLibraries": [],\n "properties": {},\n "pythonPackages": []\n }\n },\n "labels": {},\n "name": "",\n "sessionSpec": {\n "enableFastStartup": false,\n "maxIdleDuration": ""\n },\n "sessionStatus": {\n "active": false\n },\n "state": "",\n "uid": "",\n "updateTime": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"createTime\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"endpoints\": {\n \"notebooks\": \"\",\n \"sql\": \"\"\n },\n \"infrastructureSpec\": {\n \"compute\": {\n \"diskSizeGb\": 0,\n \"maxNodeCount\": 0,\n \"nodeCount\": 0\n },\n \"osImage\": {\n \"imageVersion\": \"\",\n \"javaLibraries\": [],\n \"properties\": {},\n \"pythonPackages\": []\n }\n },\n \"labels\": {},\n \"name\": \"\",\n \"sessionSpec\": {\n \"enableFastStartup\": false,\n \"maxIdleDuration\": \"\"\n },\n \"sessionStatus\": {\n \"active\": false\n },\n \"state\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1/:parent/environments")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/:parent/environments',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
createTime: '',
description: '',
displayName: '',
endpoints: {notebooks: '', sql: ''},
infrastructureSpec: {
compute: {diskSizeGb: 0, maxNodeCount: 0, nodeCount: 0},
osImage: {imageVersion: '', javaLibraries: [], properties: {}, pythonPackages: []}
},
labels: {},
name: '',
sessionSpec: {enableFastStartup: false, maxIdleDuration: ''},
sessionStatus: {active: false},
state: '',
uid: '',
updateTime: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:parent/environments',
headers: {'content-type': 'application/json'},
body: {
createTime: '',
description: '',
displayName: '',
endpoints: {notebooks: '', sql: ''},
infrastructureSpec: {
compute: {diskSizeGb: 0, maxNodeCount: 0, nodeCount: 0},
osImage: {imageVersion: '', javaLibraries: [], properties: {}, pythonPackages: []}
},
labels: {},
name: '',
sessionSpec: {enableFastStartup: false, maxIdleDuration: ''},
sessionStatus: {active: false},
state: '',
uid: '',
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}}/v1/:parent/environments');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
createTime: '',
description: '',
displayName: '',
endpoints: {
notebooks: '',
sql: ''
},
infrastructureSpec: {
compute: {
diskSizeGb: 0,
maxNodeCount: 0,
nodeCount: 0
},
osImage: {
imageVersion: '',
javaLibraries: [],
properties: {},
pythonPackages: []
}
},
labels: {},
name: '',
sessionSpec: {
enableFastStartup: false,
maxIdleDuration: ''
},
sessionStatus: {
active: false
},
state: '',
uid: '',
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}}/v1/:parent/environments',
headers: {'content-type': 'application/json'},
data: {
createTime: '',
description: '',
displayName: '',
endpoints: {notebooks: '', sql: ''},
infrastructureSpec: {
compute: {diskSizeGb: 0, maxNodeCount: 0, nodeCount: 0},
osImage: {imageVersion: '', javaLibraries: [], properties: {}, pythonPackages: []}
},
labels: {},
name: '',
sessionSpec: {enableFastStartup: false, maxIdleDuration: ''},
sessionStatus: {active: false},
state: '',
uid: '',
updateTime: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/:parent/environments';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"createTime":"","description":"","displayName":"","endpoints":{"notebooks":"","sql":""},"infrastructureSpec":{"compute":{"diskSizeGb":0,"maxNodeCount":0,"nodeCount":0},"osImage":{"imageVersion":"","javaLibraries":[],"properties":{},"pythonPackages":[]}},"labels":{},"name":"","sessionSpec":{"enableFastStartup":false,"maxIdleDuration":""},"sessionStatus":{"active":false},"state":"","uid":"","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 = @{ @"createTime": @"",
@"description": @"",
@"displayName": @"",
@"endpoints": @{ @"notebooks": @"", @"sql": @"" },
@"infrastructureSpec": @{ @"compute": @{ @"diskSizeGb": @0, @"maxNodeCount": @0, @"nodeCount": @0 }, @"osImage": @{ @"imageVersion": @"", @"javaLibraries": @[ ], @"properties": @{ }, @"pythonPackages": @[ ] } },
@"labels": @{ },
@"name": @"",
@"sessionSpec": @{ @"enableFastStartup": @NO, @"maxIdleDuration": @"" },
@"sessionStatus": @{ @"active": @NO },
@"state": @"",
@"uid": @"",
@"updateTime": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:parent/environments"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/:parent/environments" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"createTime\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"endpoints\": {\n \"notebooks\": \"\",\n \"sql\": \"\"\n },\n \"infrastructureSpec\": {\n \"compute\": {\n \"diskSizeGb\": 0,\n \"maxNodeCount\": 0,\n \"nodeCount\": 0\n },\n \"osImage\": {\n \"imageVersion\": \"\",\n \"javaLibraries\": [],\n \"properties\": {},\n \"pythonPackages\": []\n }\n },\n \"labels\": {},\n \"name\": \"\",\n \"sessionSpec\": {\n \"enableFastStartup\": false,\n \"maxIdleDuration\": \"\"\n },\n \"sessionStatus\": {\n \"active\": false\n },\n \"state\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/:parent/environments",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'createTime' => '',
'description' => '',
'displayName' => '',
'endpoints' => [
'notebooks' => '',
'sql' => ''
],
'infrastructureSpec' => [
'compute' => [
'diskSizeGb' => 0,
'maxNodeCount' => 0,
'nodeCount' => 0
],
'osImage' => [
'imageVersion' => '',
'javaLibraries' => [
],
'properties' => [
],
'pythonPackages' => [
]
]
],
'labels' => [
],
'name' => '',
'sessionSpec' => [
'enableFastStartup' => null,
'maxIdleDuration' => ''
],
'sessionStatus' => [
'active' => null
],
'state' => '',
'uid' => '',
'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}}/v1/:parent/environments', [
'body' => '{
"createTime": "",
"description": "",
"displayName": "",
"endpoints": {
"notebooks": "",
"sql": ""
},
"infrastructureSpec": {
"compute": {
"diskSizeGb": 0,
"maxNodeCount": 0,
"nodeCount": 0
},
"osImage": {
"imageVersion": "",
"javaLibraries": [],
"properties": {},
"pythonPackages": []
}
},
"labels": {},
"name": "",
"sessionSpec": {
"enableFastStartup": false,
"maxIdleDuration": ""
},
"sessionStatus": {
"active": false
},
"state": "",
"uid": "",
"updateTime": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1/:parent/environments');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'createTime' => '',
'description' => '',
'displayName' => '',
'endpoints' => [
'notebooks' => '',
'sql' => ''
],
'infrastructureSpec' => [
'compute' => [
'diskSizeGb' => 0,
'maxNodeCount' => 0,
'nodeCount' => 0
],
'osImage' => [
'imageVersion' => '',
'javaLibraries' => [
],
'properties' => [
],
'pythonPackages' => [
]
]
],
'labels' => [
],
'name' => '',
'sessionSpec' => [
'enableFastStartup' => null,
'maxIdleDuration' => ''
],
'sessionStatus' => [
'active' => null
],
'state' => '',
'uid' => '',
'updateTime' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'createTime' => '',
'description' => '',
'displayName' => '',
'endpoints' => [
'notebooks' => '',
'sql' => ''
],
'infrastructureSpec' => [
'compute' => [
'diskSizeGb' => 0,
'maxNodeCount' => 0,
'nodeCount' => 0
],
'osImage' => [
'imageVersion' => '',
'javaLibraries' => [
],
'properties' => [
],
'pythonPackages' => [
]
]
],
'labels' => [
],
'name' => '',
'sessionSpec' => [
'enableFastStartup' => null,
'maxIdleDuration' => ''
],
'sessionStatus' => [
'active' => null
],
'state' => '',
'uid' => '',
'updateTime' => ''
]));
$request->setRequestUrl('{{baseUrl}}/v1/:parent/environments');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:parent/environments' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"createTime": "",
"description": "",
"displayName": "",
"endpoints": {
"notebooks": "",
"sql": ""
},
"infrastructureSpec": {
"compute": {
"diskSizeGb": 0,
"maxNodeCount": 0,
"nodeCount": 0
},
"osImage": {
"imageVersion": "",
"javaLibraries": [],
"properties": {},
"pythonPackages": []
}
},
"labels": {},
"name": "",
"sessionSpec": {
"enableFastStartup": false,
"maxIdleDuration": ""
},
"sessionStatus": {
"active": false
},
"state": "",
"uid": "",
"updateTime": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:parent/environments' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"createTime": "",
"description": "",
"displayName": "",
"endpoints": {
"notebooks": "",
"sql": ""
},
"infrastructureSpec": {
"compute": {
"diskSizeGb": 0,
"maxNodeCount": 0,
"nodeCount": 0
},
"osImage": {
"imageVersion": "",
"javaLibraries": [],
"properties": {},
"pythonPackages": []
}
},
"labels": {},
"name": "",
"sessionSpec": {
"enableFastStartup": false,
"maxIdleDuration": ""
},
"sessionStatus": {
"active": false
},
"state": "",
"uid": "",
"updateTime": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"createTime\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"endpoints\": {\n \"notebooks\": \"\",\n \"sql\": \"\"\n },\n \"infrastructureSpec\": {\n \"compute\": {\n \"diskSizeGb\": 0,\n \"maxNodeCount\": 0,\n \"nodeCount\": 0\n },\n \"osImage\": {\n \"imageVersion\": \"\",\n \"javaLibraries\": [],\n \"properties\": {},\n \"pythonPackages\": []\n }\n },\n \"labels\": {},\n \"name\": \"\",\n \"sessionSpec\": {\n \"enableFastStartup\": false,\n \"maxIdleDuration\": \"\"\n },\n \"sessionStatus\": {\n \"active\": false\n },\n \"state\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1/:parent/environments", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/:parent/environments"
payload = {
"createTime": "",
"description": "",
"displayName": "",
"endpoints": {
"notebooks": "",
"sql": ""
},
"infrastructureSpec": {
"compute": {
"diskSizeGb": 0,
"maxNodeCount": 0,
"nodeCount": 0
},
"osImage": {
"imageVersion": "",
"javaLibraries": [],
"properties": {},
"pythonPackages": []
}
},
"labels": {},
"name": "",
"sessionSpec": {
"enableFastStartup": False,
"maxIdleDuration": ""
},
"sessionStatus": { "active": False },
"state": "",
"uid": "",
"updateTime": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/:parent/environments"
payload <- "{\n \"createTime\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"endpoints\": {\n \"notebooks\": \"\",\n \"sql\": \"\"\n },\n \"infrastructureSpec\": {\n \"compute\": {\n \"diskSizeGb\": 0,\n \"maxNodeCount\": 0,\n \"nodeCount\": 0\n },\n \"osImage\": {\n \"imageVersion\": \"\",\n \"javaLibraries\": [],\n \"properties\": {},\n \"pythonPackages\": []\n }\n },\n \"labels\": {},\n \"name\": \"\",\n \"sessionSpec\": {\n \"enableFastStartup\": false,\n \"maxIdleDuration\": \"\"\n },\n \"sessionStatus\": {\n \"active\": false\n },\n \"state\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/:parent/environments")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"createTime\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"endpoints\": {\n \"notebooks\": \"\",\n \"sql\": \"\"\n },\n \"infrastructureSpec\": {\n \"compute\": {\n \"diskSizeGb\": 0,\n \"maxNodeCount\": 0,\n \"nodeCount\": 0\n },\n \"osImage\": {\n \"imageVersion\": \"\",\n \"javaLibraries\": [],\n \"properties\": {},\n \"pythonPackages\": []\n }\n },\n \"labels\": {},\n \"name\": \"\",\n \"sessionSpec\": {\n \"enableFastStartup\": false,\n \"maxIdleDuration\": \"\"\n },\n \"sessionStatus\": {\n \"active\": false\n },\n \"state\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/v1/:parent/environments') do |req|
req.body = "{\n \"createTime\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"endpoints\": {\n \"notebooks\": \"\",\n \"sql\": \"\"\n },\n \"infrastructureSpec\": {\n \"compute\": {\n \"diskSizeGb\": 0,\n \"maxNodeCount\": 0,\n \"nodeCount\": 0\n },\n \"osImage\": {\n \"imageVersion\": \"\",\n \"javaLibraries\": [],\n \"properties\": {},\n \"pythonPackages\": []\n }\n },\n \"labels\": {},\n \"name\": \"\",\n \"sessionSpec\": {\n \"enableFastStartup\": false,\n \"maxIdleDuration\": \"\"\n },\n \"sessionStatus\": {\n \"active\": false\n },\n \"state\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/:parent/environments";
let payload = json!({
"createTime": "",
"description": "",
"displayName": "",
"endpoints": json!({
"notebooks": "",
"sql": ""
}),
"infrastructureSpec": json!({
"compute": json!({
"diskSizeGb": 0,
"maxNodeCount": 0,
"nodeCount": 0
}),
"osImage": json!({
"imageVersion": "",
"javaLibraries": (),
"properties": json!({}),
"pythonPackages": ()
})
}),
"labels": json!({}),
"name": "",
"sessionSpec": json!({
"enableFastStartup": false,
"maxIdleDuration": ""
}),
"sessionStatus": json!({"active": false}),
"state": "",
"uid": "",
"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}}/v1/:parent/environments \
--header 'content-type: application/json' \
--data '{
"createTime": "",
"description": "",
"displayName": "",
"endpoints": {
"notebooks": "",
"sql": ""
},
"infrastructureSpec": {
"compute": {
"diskSizeGb": 0,
"maxNodeCount": 0,
"nodeCount": 0
},
"osImage": {
"imageVersion": "",
"javaLibraries": [],
"properties": {},
"pythonPackages": []
}
},
"labels": {},
"name": "",
"sessionSpec": {
"enableFastStartup": false,
"maxIdleDuration": ""
},
"sessionStatus": {
"active": false
},
"state": "",
"uid": "",
"updateTime": ""
}'
echo '{
"createTime": "",
"description": "",
"displayName": "",
"endpoints": {
"notebooks": "",
"sql": ""
},
"infrastructureSpec": {
"compute": {
"diskSizeGb": 0,
"maxNodeCount": 0,
"nodeCount": 0
},
"osImage": {
"imageVersion": "",
"javaLibraries": [],
"properties": {},
"pythonPackages": []
}
},
"labels": {},
"name": "",
"sessionSpec": {
"enableFastStartup": false,
"maxIdleDuration": ""
},
"sessionStatus": {
"active": false
},
"state": "",
"uid": "",
"updateTime": ""
}' | \
http POST {{baseUrl}}/v1/:parent/environments \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "createTime": "",\n "description": "",\n "displayName": "",\n "endpoints": {\n "notebooks": "",\n "sql": ""\n },\n "infrastructureSpec": {\n "compute": {\n "diskSizeGb": 0,\n "maxNodeCount": 0,\n "nodeCount": 0\n },\n "osImage": {\n "imageVersion": "",\n "javaLibraries": [],\n "properties": {},\n "pythonPackages": []\n }\n },\n "labels": {},\n "name": "",\n "sessionSpec": {\n "enableFastStartup": false,\n "maxIdleDuration": ""\n },\n "sessionStatus": {\n "active": false\n },\n "state": "",\n "uid": "",\n "updateTime": ""\n}' \
--output-document \
- {{baseUrl}}/v1/:parent/environments
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"createTime": "",
"description": "",
"displayName": "",
"endpoints": [
"notebooks": "",
"sql": ""
],
"infrastructureSpec": [
"compute": [
"diskSizeGb": 0,
"maxNodeCount": 0,
"nodeCount": 0
],
"osImage": [
"imageVersion": "",
"javaLibraries": [],
"properties": [],
"pythonPackages": []
]
],
"labels": [],
"name": "",
"sessionSpec": [
"enableFastStartup": false,
"maxIdleDuration": ""
],
"sessionStatus": ["active": false],
"state": "",
"uid": "",
"updateTime": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:parent/environments")! 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
dataplex.projects.locations.lakes.environments.list
{{baseUrl}}/v1/:parent/environments
QUERY PARAMS
parent
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:parent/environments");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v1/:parent/environments")
require "http/client"
url = "{{baseUrl}}/v1/:parent/environments"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/v1/:parent/environments"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/:parent/environments");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/:parent/environments"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/v1/:parent/environments HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1/:parent/environments")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/:parent/environments"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/:parent/environments")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1/:parent/environments")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/v1/:parent/environments');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/v1/:parent/environments'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/:parent/environments';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/:parent/environments',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1/:parent/environments")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/:parent/environments',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'GET', url: '{{baseUrl}}/v1/:parent/environments'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v1/:parent/environments');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {method: 'GET', url: '{{baseUrl}}/v1/:parent/environments'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/:parent/environments';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:parent/environments"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/:parent/environments" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/:parent/environments",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/v1/:parent/environments');
echo $response->getBody();
setUrl('{{baseUrl}}/v1/:parent/environments');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/:parent/environments');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:parent/environments' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:parent/environments' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v1/:parent/environments")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/:parent/environments"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/:parent/environments"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/:parent/environments")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/v1/:parent/environments') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/:parent/environments";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/v1/:parent/environments
http GET {{baseUrl}}/v1/:parent/environments
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v1/:parent/environments
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:parent/environments")! 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
dataplex.projects.locations.lakes.environments.sessions.list
{{baseUrl}}/v1/:parent/sessions
QUERY PARAMS
parent
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:parent/sessions");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v1/:parent/sessions")
require "http/client"
url = "{{baseUrl}}/v1/:parent/sessions"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/v1/:parent/sessions"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/:parent/sessions");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/:parent/sessions"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/v1/:parent/sessions HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1/:parent/sessions")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/:parent/sessions"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/:parent/sessions")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1/:parent/sessions")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/v1/:parent/sessions');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/v1/:parent/sessions'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/:parent/sessions';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/:parent/sessions',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1/:parent/sessions")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/:parent/sessions',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'GET', url: '{{baseUrl}}/v1/:parent/sessions'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v1/:parent/sessions');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {method: 'GET', url: '{{baseUrl}}/v1/:parent/sessions'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/:parent/sessions';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:parent/sessions"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/:parent/sessions" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/:parent/sessions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/v1/:parent/sessions');
echo $response->getBody();
setUrl('{{baseUrl}}/v1/:parent/sessions');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/:parent/sessions');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:parent/sessions' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:parent/sessions' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v1/:parent/sessions")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/:parent/sessions"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/:parent/sessions"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/:parent/sessions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/v1/:parent/sessions') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/:parent/sessions";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/v1/:parent/sessions
http GET {{baseUrl}}/v1/:parent/sessions
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v1/:parent/sessions
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:parent/sessions")! 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
dataplex.projects.locations.lakes.list
{{baseUrl}}/v1/:parent/lakes
QUERY PARAMS
parent
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:parent/lakes");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v1/:parent/lakes")
require "http/client"
url = "{{baseUrl}}/v1/:parent/lakes"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/v1/:parent/lakes"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/:parent/lakes");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/:parent/lakes"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/v1/:parent/lakes HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1/:parent/lakes")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/:parent/lakes"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/:parent/lakes")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1/:parent/lakes")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/v1/:parent/lakes');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/v1/:parent/lakes'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/:parent/lakes';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/:parent/lakes',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1/:parent/lakes")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/:parent/lakes',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'GET', url: '{{baseUrl}}/v1/:parent/lakes'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v1/:parent/lakes');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {method: 'GET', url: '{{baseUrl}}/v1/:parent/lakes'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/:parent/lakes';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:parent/lakes"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/:parent/lakes" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/:parent/lakes",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/v1/:parent/lakes');
echo $response->getBody();
setUrl('{{baseUrl}}/v1/:parent/lakes');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/:parent/lakes');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:parent/lakes' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:parent/lakes' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v1/:parent/lakes")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/:parent/lakes"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/:parent/lakes"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/:parent/lakes")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/v1/:parent/lakes') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/:parent/lakes";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/v1/:parent/lakes
http GET {{baseUrl}}/v1/:parent/lakes
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v1/:parent/lakes
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:parent/lakes")! 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
dataplex.projects.locations.lakes.tasks.create
{{baseUrl}}/v1/:parent/tasks
QUERY PARAMS
parent
BODY json
{
"createTime": "",
"description": "",
"displayName": "",
"executionSpec": {
"args": {},
"kmsKey": "",
"maxJobExecutionLifetime": "",
"project": "",
"serviceAccount": ""
},
"executionStatus": {
"latestJob": {
"endTime": "",
"message": "",
"name": "",
"retryCount": 0,
"service": "",
"serviceJob": "",
"startTime": "",
"state": "",
"uid": ""
},
"updateTime": ""
},
"labels": {},
"name": "",
"notebook": {
"archiveUris": [],
"fileUris": [],
"infrastructureSpec": {
"batch": {
"executorsCount": 0,
"maxExecutorsCount": 0
},
"containerImage": {
"image": "",
"javaJars": [],
"properties": {},
"pythonPackages": []
},
"vpcNetwork": {
"network": "",
"networkTags": [],
"subNetwork": ""
}
},
"notebook": ""
},
"spark": {
"archiveUris": [],
"fileUris": [],
"infrastructureSpec": {},
"mainClass": "",
"mainJarFileUri": "",
"pythonScriptFile": "",
"sqlScript": "",
"sqlScriptFile": ""
},
"state": "",
"triggerSpec": {
"disabled": false,
"maxRetries": 0,
"schedule": "",
"startTime": "",
"type": ""
},
"uid": "",
"updateTime": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:parent/tasks");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"createTime\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"executionSpec\": {\n \"args\": {},\n \"kmsKey\": \"\",\n \"maxJobExecutionLifetime\": \"\",\n \"project\": \"\",\n \"serviceAccount\": \"\"\n },\n \"executionStatus\": {\n \"latestJob\": {\n \"endTime\": \"\",\n \"message\": \"\",\n \"name\": \"\",\n \"retryCount\": 0,\n \"service\": \"\",\n \"serviceJob\": \"\",\n \"startTime\": \"\",\n \"state\": \"\",\n \"uid\": \"\"\n },\n \"updateTime\": \"\"\n },\n \"labels\": {},\n \"name\": \"\",\n \"notebook\": {\n \"archiveUris\": [],\n \"fileUris\": [],\n \"infrastructureSpec\": {\n \"batch\": {\n \"executorsCount\": 0,\n \"maxExecutorsCount\": 0\n },\n \"containerImage\": {\n \"image\": \"\",\n \"javaJars\": [],\n \"properties\": {},\n \"pythonPackages\": []\n },\n \"vpcNetwork\": {\n \"network\": \"\",\n \"networkTags\": [],\n \"subNetwork\": \"\"\n }\n },\n \"notebook\": \"\"\n },\n \"spark\": {\n \"archiveUris\": [],\n \"fileUris\": [],\n \"infrastructureSpec\": {},\n \"mainClass\": \"\",\n \"mainJarFileUri\": \"\",\n \"pythonScriptFile\": \"\",\n \"sqlScript\": \"\",\n \"sqlScriptFile\": \"\"\n },\n \"state\": \"\",\n \"triggerSpec\": {\n \"disabled\": false,\n \"maxRetries\": 0,\n \"schedule\": \"\",\n \"startTime\": \"\",\n \"type\": \"\"\n },\n \"uid\": \"\",\n \"updateTime\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1/:parent/tasks" {:content-type :json
:form-params {:createTime ""
:description ""
:displayName ""
:executionSpec {:args {}
:kmsKey ""
:maxJobExecutionLifetime ""
:project ""
:serviceAccount ""}
:executionStatus {:latestJob {:endTime ""
:message ""
:name ""
:retryCount 0
:service ""
:serviceJob ""
:startTime ""
:state ""
:uid ""}
:updateTime ""}
:labels {}
:name ""
:notebook {:archiveUris []
:fileUris []
:infrastructureSpec {:batch {:executorsCount 0
:maxExecutorsCount 0}
:containerImage {:image ""
:javaJars []
:properties {}
:pythonPackages []}
:vpcNetwork {:network ""
:networkTags []
:subNetwork ""}}
:notebook ""}
:spark {:archiveUris []
:fileUris []
:infrastructureSpec {}
:mainClass ""
:mainJarFileUri ""
:pythonScriptFile ""
:sqlScript ""
:sqlScriptFile ""}
:state ""
:triggerSpec {:disabled false
:maxRetries 0
:schedule ""
:startTime ""
:type ""}
:uid ""
:updateTime ""}})
require "http/client"
url = "{{baseUrl}}/v1/:parent/tasks"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"createTime\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"executionSpec\": {\n \"args\": {},\n \"kmsKey\": \"\",\n \"maxJobExecutionLifetime\": \"\",\n \"project\": \"\",\n \"serviceAccount\": \"\"\n },\n \"executionStatus\": {\n \"latestJob\": {\n \"endTime\": \"\",\n \"message\": \"\",\n \"name\": \"\",\n \"retryCount\": 0,\n \"service\": \"\",\n \"serviceJob\": \"\",\n \"startTime\": \"\",\n \"state\": \"\",\n \"uid\": \"\"\n },\n \"updateTime\": \"\"\n },\n \"labels\": {},\n \"name\": \"\",\n \"notebook\": {\n \"archiveUris\": [],\n \"fileUris\": [],\n \"infrastructureSpec\": {\n \"batch\": {\n \"executorsCount\": 0,\n \"maxExecutorsCount\": 0\n },\n \"containerImage\": {\n \"image\": \"\",\n \"javaJars\": [],\n \"properties\": {},\n \"pythonPackages\": []\n },\n \"vpcNetwork\": {\n \"network\": \"\",\n \"networkTags\": [],\n \"subNetwork\": \"\"\n }\n },\n \"notebook\": \"\"\n },\n \"spark\": {\n \"archiveUris\": [],\n \"fileUris\": [],\n \"infrastructureSpec\": {},\n \"mainClass\": \"\",\n \"mainJarFileUri\": \"\",\n \"pythonScriptFile\": \"\",\n \"sqlScript\": \"\",\n \"sqlScriptFile\": \"\"\n },\n \"state\": \"\",\n \"triggerSpec\": {\n \"disabled\": false,\n \"maxRetries\": 0,\n \"schedule\": \"\",\n \"startTime\": \"\",\n \"type\": \"\"\n },\n \"uid\": \"\",\n \"updateTime\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/v1/:parent/tasks"),
Content = new StringContent("{\n \"createTime\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"executionSpec\": {\n \"args\": {},\n \"kmsKey\": \"\",\n \"maxJobExecutionLifetime\": \"\",\n \"project\": \"\",\n \"serviceAccount\": \"\"\n },\n \"executionStatus\": {\n \"latestJob\": {\n \"endTime\": \"\",\n \"message\": \"\",\n \"name\": \"\",\n \"retryCount\": 0,\n \"service\": \"\",\n \"serviceJob\": \"\",\n \"startTime\": \"\",\n \"state\": \"\",\n \"uid\": \"\"\n },\n \"updateTime\": \"\"\n },\n \"labels\": {},\n \"name\": \"\",\n \"notebook\": {\n \"archiveUris\": [],\n \"fileUris\": [],\n \"infrastructureSpec\": {\n \"batch\": {\n \"executorsCount\": 0,\n \"maxExecutorsCount\": 0\n },\n \"containerImage\": {\n \"image\": \"\",\n \"javaJars\": [],\n \"properties\": {},\n \"pythonPackages\": []\n },\n \"vpcNetwork\": {\n \"network\": \"\",\n \"networkTags\": [],\n \"subNetwork\": \"\"\n }\n },\n \"notebook\": \"\"\n },\n \"spark\": {\n \"archiveUris\": [],\n \"fileUris\": [],\n \"infrastructureSpec\": {},\n \"mainClass\": \"\",\n \"mainJarFileUri\": \"\",\n \"pythonScriptFile\": \"\",\n \"sqlScript\": \"\",\n \"sqlScriptFile\": \"\"\n },\n \"state\": \"\",\n \"triggerSpec\": {\n \"disabled\": false,\n \"maxRetries\": 0,\n \"schedule\": \"\",\n \"startTime\": \"\",\n \"type\": \"\"\n },\n \"uid\": \"\",\n \"updateTime\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/:parent/tasks");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"createTime\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"executionSpec\": {\n \"args\": {},\n \"kmsKey\": \"\",\n \"maxJobExecutionLifetime\": \"\",\n \"project\": \"\",\n \"serviceAccount\": \"\"\n },\n \"executionStatus\": {\n \"latestJob\": {\n \"endTime\": \"\",\n \"message\": \"\",\n \"name\": \"\",\n \"retryCount\": 0,\n \"service\": \"\",\n \"serviceJob\": \"\",\n \"startTime\": \"\",\n \"state\": \"\",\n \"uid\": \"\"\n },\n \"updateTime\": \"\"\n },\n \"labels\": {},\n \"name\": \"\",\n \"notebook\": {\n \"archiveUris\": [],\n \"fileUris\": [],\n \"infrastructureSpec\": {\n \"batch\": {\n \"executorsCount\": 0,\n \"maxExecutorsCount\": 0\n },\n \"containerImage\": {\n \"image\": \"\",\n \"javaJars\": [],\n \"properties\": {},\n \"pythonPackages\": []\n },\n \"vpcNetwork\": {\n \"network\": \"\",\n \"networkTags\": [],\n \"subNetwork\": \"\"\n }\n },\n \"notebook\": \"\"\n },\n \"spark\": {\n \"archiveUris\": [],\n \"fileUris\": [],\n \"infrastructureSpec\": {},\n \"mainClass\": \"\",\n \"mainJarFileUri\": \"\",\n \"pythonScriptFile\": \"\",\n \"sqlScript\": \"\",\n \"sqlScriptFile\": \"\"\n },\n \"state\": \"\",\n \"triggerSpec\": {\n \"disabled\": false,\n \"maxRetries\": 0,\n \"schedule\": \"\",\n \"startTime\": \"\",\n \"type\": \"\"\n },\n \"uid\": \"\",\n \"updateTime\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/:parent/tasks"
payload := strings.NewReader("{\n \"createTime\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"executionSpec\": {\n \"args\": {},\n \"kmsKey\": \"\",\n \"maxJobExecutionLifetime\": \"\",\n \"project\": \"\",\n \"serviceAccount\": \"\"\n },\n \"executionStatus\": {\n \"latestJob\": {\n \"endTime\": \"\",\n \"message\": \"\",\n \"name\": \"\",\n \"retryCount\": 0,\n \"service\": \"\",\n \"serviceJob\": \"\",\n \"startTime\": \"\",\n \"state\": \"\",\n \"uid\": \"\"\n },\n \"updateTime\": \"\"\n },\n \"labels\": {},\n \"name\": \"\",\n \"notebook\": {\n \"archiveUris\": [],\n \"fileUris\": [],\n \"infrastructureSpec\": {\n \"batch\": {\n \"executorsCount\": 0,\n \"maxExecutorsCount\": 0\n },\n \"containerImage\": {\n \"image\": \"\",\n \"javaJars\": [],\n \"properties\": {},\n \"pythonPackages\": []\n },\n \"vpcNetwork\": {\n \"network\": \"\",\n \"networkTags\": [],\n \"subNetwork\": \"\"\n }\n },\n \"notebook\": \"\"\n },\n \"spark\": {\n \"archiveUris\": [],\n \"fileUris\": [],\n \"infrastructureSpec\": {},\n \"mainClass\": \"\",\n \"mainJarFileUri\": \"\",\n \"pythonScriptFile\": \"\",\n \"sqlScript\": \"\",\n \"sqlScriptFile\": \"\"\n },\n \"state\": \"\",\n \"triggerSpec\": {\n \"disabled\": false,\n \"maxRetries\": 0,\n \"schedule\": \"\",\n \"startTime\": \"\",\n \"type\": \"\"\n },\n \"uid\": \"\",\n \"updateTime\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/v1/:parent/tasks HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 1321
{
"createTime": "",
"description": "",
"displayName": "",
"executionSpec": {
"args": {},
"kmsKey": "",
"maxJobExecutionLifetime": "",
"project": "",
"serviceAccount": ""
},
"executionStatus": {
"latestJob": {
"endTime": "",
"message": "",
"name": "",
"retryCount": 0,
"service": "",
"serviceJob": "",
"startTime": "",
"state": "",
"uid": ""
},
"updateTime": ""
},
"labels": {},
"name": "",
"notebook": {
"archiveUris": [],
"fileUris": [],
"infrastructureSpec": {
"batch": {
"executorsCount": 0,
"maxExecutorsCount": 0
},
"containerImage": {
"image": "",
"javaJars": [],
"properties": {},
"pythonPackages": []
},
"vpcNetwork": {
"network": "",
"networkTags": [],
"subNetwork": ""
}
},
"notebook": ""
},
"spark": {
"archiveUris": [],
"fileUris": [],
"infrastructureSpec": {},
"mainClass": "",
"mainJarFileUri": "",
"pythonScriptFile": "",
"sqlScript": "",
"sqlScriptFile": ""
},
"state": "",
"triggerSpec": {
"disabled": false,
"maxRetries": 0,
"schedule": "",
"startTime": "",
"type": ""
},
"uid": "",
"updateTime": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1/:parent/tasks")
.setHeader("content-type", "application/json")
.setBody("{\n \"createTime\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"executionSpec\": {\n \"args\": {},\n \"kmsKey\": \"\",\n \"maxJobExecutionLifetime\": \"\",\n \"project\": \"\",\n \"serviceAccount\": \"\"\n },\n \"executionStatus\": {\n \"latestJob\": {\n \"endTime\": \"\",\n \"message\": \"\",\n \"name\": \"\",\n \"retryCount\": 0,\n \"service\": \"\",\n \"serviceJob\": \"\",\n \"startTime\": \"\",\n \"state\": \"\",\n \"uid\": \"\"\n },\n \"updateTime\": \"\"\n },\n \"labels\": {},\n \"name\": \"\",\n \"notebook\": {\n \"archiveUris\": [],\n \"fileUris\": [],\n \"infrastructureSpec\": {\n \"batch\": {\n \"executorsCount\": 0,\n \"maxExecutorsCount\": 0\n },\n \"containerImage\": {\n \"image\": \"\",\n \"javaJars\": [],\n \"properties\": {},\n \"pythonPackages\": []\n },\n \"vpcNetwork\": {\n \"network\": \"\",\n \"networkTags\": [],\n \"subNetwork\": \"\"\n }\n },\n \"notebook\": \"\"\n },\n \"spark\": {\n \"archiveUris\": [],\n \"fileUris\": [],\n \"infrastructureSpec\": {},\n \"mainClass\": \"\",\n \"mainJarFileUri\": \"\",\n \"pythonScriptFile\": \"\",\n \"sqlScript\": \"\",\n \"sqlScriptFile\": \"\"\n },\n \"state\": \"\",\n \"triggerSpec\": {\n \"disabled\": false,\n \"maxRetries\": 0,\n \"schedule\": \"\",\n \"startTime\": \"\",\n \"type\": \"\"\n },\n \"uid\": \"\",\n \"updateTime\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/:parent/tasks"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"createTime\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"executionSpec\": {\n \"args\": {},\n \"kmsKey\": \"\",\n \"maxJobExecutionLifetime\": \"\",\n \"project\": \"\",\n \"serviceAccount\": \"\"\n },\n \"executionStatus\": {\n \"latestJob\": {\n \"endTime\": \"\",\n \"message\": \"\",\n \"name\": \"\",\n \"retryCount\": 0,\n \"service\": \"\",\n \"serviceJob\": \"\",\n \"startTime\": \"\",\n \"state\": \"\",\n \"uid\": \"\"\n },\n \"updateTime\": \"\"\n },\n \"labels\": {},\n \"name\": \"\",\n \"notebook\": {\n \"archiveUris\": [],\n \"fileUris\": [],\n \"infrastructureSpec\": {\n \"batch\": {\n \"executorsCount\": 0,\n \"maxExecutorsCount\": 0\n },\n \"containerImage\": {\n \"image\": \"\",\n \"javaJars\": [],\n \"properties\": {},\n \"pythonPackages\": []\n },\n \"vpcNetwork\": {\n \"network\": \"\",\n \"networkTags\": [],\n \"subNetwork\": \"\"\n }\n },\n \"notebook\": \"\"\n },\n \"spark\": {\n \"archiveUris\": [],\n \"fileUris\": [],\n \"infrastructureSpec\": {},\n \"mainClass\": \"\",\n \"mainJarFileUri\": \"\",\n \"pythonScriptFile\": \"\",\n \"sqlScript\": \"\",\n \"sqlScriptFile\": \"\"\n },\n \"state\": \"\",\n \"triggerSpec\": {\n \"disabled\": false,\n \"maxRetries\": 0,\n \"schedule\": \"\",\n \"startTime\": \"\",\n \"type\": \"\"\n },\n \"uid\": \"\",\n \"updateTime\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"createTime\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"executionSpec\": {\n \"args\": {},\n \"kmsKey\": \"\",\n \"maxJobExecutionLifetime\": \"\",\n \"project\": \"\",\n \"serviceAccount\": \"\"\n },\n \"executionStatus\": {\n \"latestJob\": {\n \"endTime\": \"\",\n \"message\": \"\",\n \"name\": \"\",\n \"retryCount\": 0,\n \"service\": \"\",\n \"serviceJob\": \"\",\n \"startTime\": \"\",\n \"state\": \"\",\n \"uid\": \"\"\n },\n \"updateTime\": \"\"\n },\n \"labels\": {},\n \"name\": \"\",\n \"notebook\": {\n \"archiveUris\": [],\n \"fileUris\": [],\n \"infrastructureSpec\": {\n \"batch\": {\n \"executorsCount\": 0,\n \"maxExecutorsCount\": 0\n },\n \"containerImage\": {\n \"image\": \"\",\n \"javaJars\": [],\n \"properties\": {},\n \"pythonPackages\": []\n },\n \"vpcNetwork\": {\n \"network\": \"\",\n \"networkTags\": [],\n \"subNetwork\": \"\"\n }\n },\n \"notebook\": \"\"\n },\n \"spark\": {\n \"archiveUris\": [],\n \"fileUris\": [],\n \"infrastructureSpec\": {},\n \"mainClass\": \"\",\n \"mainJarFileUri\": \"\",\n \"pythonScriptFile\": \"\",\n \"sqlScript\": \"\",\n \"sqlScriptFile\": \"\"\n },\n \"state\": \"\",\n \"triggerSpec\": {\n \"disabled\": false,\n \"maxRetries\": 0,\n \"schedule\": \"\",\n \"startTime\": \"\",\n \"type\": \"\"\n },\n \"uid\": \"\",\n \"updateTime\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/:parent/tasks")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1/:parent/tasks")
.header("content-type", "application/json")
.body("{\n \"createTime\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"executionSpec\": {\n \"args\": {},\n \"kmsKey\": \"\",\n \"maxJobExecutionLifetime\": \"\",\n \"project\": \"\",\n \"serviceAccount\": \"\"\n },\n \"executionStatus\": {\n \"latestJob\": {\n \"endTime\": \"\",\n \"message\": \"\",\n \"name\": \"\",\n \"retryCount\": 0,\n \"service\": \"\",\n \"serviceJob\": \"\",\n \"startTime\": \"\",\n \"state\": \"\",\n \"uid\": \"\"\n },\n \"updateTime\": \"\"\n },\n \"labels\": {},\n \"name\": \"\",\n \"notebook\": {\n \"archiveUris\": [],\n \"fileUris\": [],\n \"infrastructureSpec\": {\n \"batch\": {\n \"executorsCount\": 0,\n \"maxExecutorsCount\": 0\n },\n \"containerImage\": {\n \"image\": \"\",\n \"javaJars\": [],\n \"properties\": {},\n \"pythonPackages\": []\n },\n \"vpcNetwork\": {\n \"network\": \"\",\n \"networkTags\": [],\n \"subNetwork\": \"\"\n }\n },\n \"notebook\": \"\"\n },\n \"spark\": {\n \"archiveUris\": [],\n \"fileUris\": [],\n \"infrastructureSpec\": {},\n \"mainClass\": \"\",\n \"mainJarFileUri\": \"\",\n \"pythonScriptFile\": \"\",\n \"sqlScript\": \"\",\n \"sqlScriptFile\": \"\"\n },\n \"state\": \"\",\n \"triggerSpec\": {\n \"disabled\": false,\n \"maxRetries\": 0,\n \"schedule\": \"\",\n \"startTime\": \"\",\n \"type\": \"\"\n },\n \"uid\": \"\",\n \"updateTime\": \"\"\n}")
.asString();
const data = JSON.stringify({
createTime: '',
description: '',
displayName: '',
executionSpec: {
args: {},
kmsKey: '',
maxJobExecutionLifetime: '',
project: '',
serviceAccount: ''
},
executionStatus: {
latestJob: {
endTime: '',
message: '',
name: '',
retryCount: 0,
service: '',
serviceJob: '',
startTime: '',
state: '',
uid: ''
},
updateTime: ''
},
labels: {},
name: '',
notebook: {
archiveUris: [],
fileUris: [],
infrastructureSpec: {
batch: {
executorsCount: 0,
maxExecutorsCount: 0
},
containerImage: {
image: '',
javaJars: [],
properties: {},
pythonPackages: []
},
vpcNetwork: {
network: '',
networkTags: [],
subNetwork: ''
}
},
notebook: ''
},
spark: {
archiveUris: [],
fileUris: [],
infrastructureSpec: {},
mainClass: '',
mainJarFileUri: '',
pythonScriptFile: '',
sqlScript: '',
sqlScriptFile: ''
},
state: '',
triggerSpec: {
disabled: false,
maxRetries: 0,
schedule: '',
startTime: '',
type: ''
},
uid: '',
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}}/v1/:parent/tasks');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:parent/tasks',
headers: {'content-type': 'application/json'},
data: {
createTime: '',
description: '',
displayName: '',
executionSpec: {
args: {},
kmsKey: '',
maxJobExecutionLifetime: '',
project: '',
serviceAccount: ''
},
executionStatus: {
latestJob: {
endTime: '',
message: '',
name: '',
retryCount: 0,
service: '',
serviceJob: '',
startTime: '',
state: '',
uid: ''
},
updateTime: ''
},
labels: {},
name: '',
notebook: {
archiveUris: [],
fileUris: [],
infrastructureSpec: {
batch: {executorsCount: 0, maxExecutorsCount: 0},
containerImage: {image: '', javaJars: [], properties: {}, pythonPackages: []},
vpcNetwork: {network: '', networkTags: [], subNetwork: ''}
},
notebook: ''
},
spark: {
archiveUris: [],
fileUris: [],
infrastructureSpec: {},
mainClass: '',
mainJarFileUri: '',
pythonScriptFile: '',
sqlScript: '',
sqlScriptFile: ''
},
state: '',
triggerSpec: {disabled: false, maxRetries: 0, schedule: '', startTime: '', type: ''},
uid: '',
updateTime: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/:parent/tasks';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"createTime":"","description":"","displayName":"","executionSpec":{"args":{},"kmsKey":"","maxJobExecutionLifetime":"","project":"","serviceAccount":""},"executionStatus":{"latestJob":{"endTime":"","message":"","name":"","retryCount":0,"service":"","serviceJob":"","startTime":"","state":"","uid":""},"updateTime":""},"labels":{},"name":"","notebook":{"archiveUris":[],"fileUris":[],"infrastructureSpec":{"batch":{"executorsCount":0,"maxExecutorsCount":0},"containerImage":{"image":"","javaJars":[],"properties":{},"pythonPackages":[]},"vpcNetwork":{"network":"","networkTags":[],"subNetwork":""}},"notebook":""},"spark":{"archiveUris":[],"fileUris":[],"infrastructureSpec":{},"mainClass":"","mainJarFileUri":"","pythonScriptFile":"","sqlScript":"","sqlScriptFile":""},"state":"","triggerSpec":{"disabled":false,"maxRetries":0,"schedule":"","startTime":"","type":""},"uid":"","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}}/v1/:parent/tasks',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "createTime": "",\n "description": "",\n "displayName": "",\n "executionSpec": {\n "args": {},\n "kmsKey": "",\n "maxJobExecutionLifetime": "",\n "project": "",\n "serviceAccount": ""\n },\n "executionStatus": {\n "latestJob": {\n "endTime": "",\n "message": "",\n "name": "",\n "retryCount": 0,\n "service": "",\n "serviceJob": "",\n "startTime": "",\n "state": "",\n "uid": ""\n },\n "updateTime": ""\n },\n "labels": {},\n "name": "",\n "notebook": {\n "archiveUris": [],\n "fileUris": [],\n "infrastructureSpec": {\n "batch": {\n "executorsCount": 0,\n "maxExecutorsCount": 0\n },\n "containerImage": {\n "image": "",\n "javaJars": [],\n "properties": {},\n "pythonPackages": []\n },\n "vpcNetwork": {\n "network": "",\n "networkTags": [],\n "subNetwork": ""\n }\n },\n "notebook": ""\n },\n "spark": {\n "archiveUris": [],\n "fileUris": [],\n "infrastructureSpec": {},\n "mainClass": "",\n "mainJarFileUri": "",\n "pythonScriptFile": "",\n "sqlScript": "",\n "sqlScriptFile": ""\n },\n "state": "",\n "triggerSpec": {\n "disabled": false,\n "maxRetries": 0,\n "schedule": "",\n "startTime": "",\n "type": ""\n },\n "uid": "",\n "updateTime": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"createTime\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"executionSpec\": {\n \"args\": {},\n \"kmsKey\": \"\",\n \"maxJobExecutionLifetime\": \"\",\n \"project\": \"\",\n \"serviceAccount\": \"\"\n },\n \"executionStatus\": {\n \"latestJob\": {\n \"endTime\": \"\",\n \"message\": \"\",\n \"name\": \"\",\n \"retryCount\": 0,\n \"service\": \"\",\n \"serviceJob\": \"\",\n \"startTime\": \"\",\n \"state\": \"\",\n \"uid\": \"\"\n },\n \"updateTime\": \"\"\n },\n \"labels\": {},\n \"name\": \"\",\n \"notebook\": {\n \"archiveUris\": [],\n \"fileUris\": [],\n \"infrastructureSpec\": {\n \"batch\": {\n \"executorsCount\": 0,\n \"maxExecutorsCount\": 0\n },\n \"containerImage\": {\n \"image\": \"\",\n \"javaJars\": [],\n \"properties\": {},\n \"pythonPackages\": []\n },\n \"vpcNetwork\": {\n \"network\": \"\",\n \"networkTags\": [],\n \"subNetwork\": \"\"\n }\n },\n \"notebook\": \"\"\n },\n \"spark\": {\n \"archiveUris\": [],\n \"fileUris\": [],\n \"infrastructureSpec\": {},\n \"mainClass\": \"\",\n \"mainJarFileUri\": \"\",\n \"pythonScriptFile\": \"\",\n \"sqlScript\": \"\",\n \"sqlScriptFile\": \"\"\n },\n \"state\": \"\",\n \"triggerSpec\": {\n \"disabled\": false,\n \"maxRetries\": 0,\n \"schedule\": \"\",\n \"startTime\": \"\",\n \"type\": \"\"\n },\n \"uid\": \"\",\n \"updateTime\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1/:parent/tasks")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/:parent/tasks',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
createTime: '',
description: '',
displayName: '',
executionSpec: {
args: {},
kmsKey: '',
maxJobExecutionLifetime: '',
project: '',
serviceAccount: ''
},
executionStatus: {
latestJob: {
endTime: '',
message: '',
name: '',
retryCount: 0,
service: '',
serviceJob: '',
startTime: '',
state: '',
uid: ''
},
updateTime: ''
},
labels: {},
name: '',
notebook: {
archiveUris: [],
fileUris: [],
infrastructureSpec: {
batch: {executorsCount: 0, maxExecutorsCount: 0},
containerImage: {image: '', javaJars: [], properties: {}, pythonPackages: []},
vpcNetwork: {network: '', networkTags: [], subNetwork: ''}
},
notebook: ''
},
spark: {
archiveUris: [],
fileUris: [],
infrastructureSpec: {},
mainClass: '',
mainJarFileUri: '',
pythonScriptFile: '',
sqlScript: '',
sqlScriptFile: ''
},
state: '',
triggerSpec: {disabled: false, maxRetries: 0, schedule: '', startTime: '', type: ''},
uid: '',
updateTime: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:parent/tasks',
headers: {'content-type': 'application/json'},
body: {
createTime: '',
description: '',
displayName: '',
executionSpec: {
args: {},
kmsKey: '',
maxJobExecutionLifetime: '',
project: '',
serviceAccount: ''
},
executionStatus: {
latestJob: {
endTime: '',
message: '',
name: '',
retryCount: 0,
service: '',
serviceJob: '',
startTime: '',
state: '',
uid: ''
},
updateTime: ''
},
labels: {},
name: '',
notebook: {
archiveUris: [],
fileUris: [],
infrastructureSpec: {
batch: {executorsCount: 0, maxExecutorsCount: 0},
containerImage: {image: '', javaJars: [], properties: {}, pythonPackages: []},
vpcNetwork: {network: '', networkTags: [], subNetwork: ''}
},
notebook: ''
},
spark: {
archiveUris: [],
fileUris: [],
infrastructureSpec: {},
mainClass: '',
mainJarFileUri: '',
pythonScriptFile: '',
sqlScript: '',
sqlScriptFile: ''
},
state: '',
triggerSpec: {disabled: false, maxRetries: 0, schedule: '', startTime: '', type: ''},
uid: '',
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}}/v1/:parent/tasks');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
createTime: '',
description: '',
displayName: '',
executionSpec: {
args: {},
kmsKey: '',
maxJobExecutionLifetime: '',
project: '',
serviceAccount: ''
},
executionStatus: {
latestJob: {
endTime: '',
message: '',
name: '',
retryCount: 0,
service: '',
serviceJob: '',
startTime: '',
state: '',
uid: ''
},
updateTime: ''
},
labels: {},
name: '',
notebook: {
archiveUris: [],
fileUris: [],
infrastructureSpec: {
batch: {
executorsCount: 0,
maxExecutorsCount: 0
},
containerImage: {
image: '',
javaJars: [],
properties: {},
pythonPackages: []
},
vpcNetwork: {
network: '',
networkTags: [],
subNetwork: ''
}
},
notebook: ''
},
spark: {
archiveUris: [],
fileUris: [],
infrastructureSpec: {},
mainClass: '',
mainJarFileUri: '',
pythonScriptFile: '',
sqlScript: '',
sqlScriptFile: ''
},
state: '',
triggerSpec: {
disabled: false,
maxRetries: 0,
schedule: '',
startTime: '',
type: ''
},
uid: '',
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}}/v1/:parent/tasks',
headers: {'content-type': 'application/json'},
data: {
createTime: '',
description: '',
displayName: '',
executionSpec: {
args: {},
kmsKey: '',
maxJobExecutionLifetime: '',
project: '',
serviceAccount: ''
},
executionStatus: {
latestJob: {
endTime: '',
message: '',
name: '',
retryCount: 0,
service: '',
serviceJob: '',
startTime: '',
state: '',
uid: ''
},
updateTime: ''
},
labels: {},
name: '',
notebook: {
archiveUris: [],
fileUris: [],
infrastructureSpec: {
batch: {executorsCount: 0, maxExecutorsCount: 0},
containerImage: {image: '', javaJars: [], properties: {}, pythonPackages: []},
vpcNetwork: {network: '', networkTags: [], subNetwork: ''}
},
notebook: ''
},
spark: {
archiveUris: [],
fileUris: [],
infrastructureSpec: {},
mainClass: '',
mainJarFileUri: '',
pythonScriptFile: '',
sqlScript: '',
sqlScriptFile: ''
},
state: '',
triggerSpec: {disabled: false, maxRetries: 0, schedule: '', startTime: '', type: ''},
uid: '',
updateTime: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/:parent/tasks';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"createTime":"","description":"","displayName":"","executionSpec":{"args":{},"kmsKey":"","maxJobExecutionLifetime":"","project":"","serviceAccount":""},"executionStatus":{"latestJob":{"endTime":"","message":"","name":"","retryCount":0,"service":"","serviceJob":"","startTime":"","state":"","uid":""},"updateTime":""},"labels":{},"name":"","notebook":{"archiveUris":[],"fileUris":[],"infrastructureSpec":{"batch":{"executorsCount":0,"maxExecutorsCount":0},"containerImage":{"image":"","javaJars":[],"properties":{},"pythonPackages":[]},"vpcNetwork":{"network":"","networkTags":[],"subNetwork":""}},"notebook":""},"spark":{"archiveUris":[],"fileUris":[],"infrastructureSpec":{},"mainClass":"","mainJarFileUri":"","pythonScriptFile":"","sqlScript":"","sqlScriptFile":""},"state":"","triggerSpec":{"disabled":false,"maxRetries":0,"schedule":"","startTime":"","type":""},"uid":"","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 = @{ @"createTime": @"",
@"description": @"",
@"displayName": @"",
@"executionSpec": @{ @"args": @{ }, @"kmsKey": @"", @"maxJobExecutionLifetime": @"", @"project": @"", @"serviceAccount": @"" },
@"executionStatus": @{ @"latestJob": @{ @"endTime": @"", @"message": @"", @"name": @"", @"retryCount": @0, @"service": @"", @"serviceJob": @"", @"startTime": @"", @"state": @"", @"uid": @"" }, @"updateTime": @"" },
@"labels": @{ },
@"name": @"",
@"notebook": @{ @"archiveUris": @[ ], @"fileUris": @[ ], @"infrastructureSpec": @{ @"batch": @{ @"executorsCount": @0, @"maxExecutorsCount": @0 }, @"containerImage": @{ @"image": @"", @"javaJars": @[ ], @"properties": @{ }, @"pythonPackages": @[ ] }, @"vpcNetwork": @{ @"network": @"", @"networkTags": @[ ], @"subNetwork": @"" } }, @"notebook": @"" },
@"spark": @{ @"archiveUris": @[ ], @"fileUris": @[ ], @"infrastructureSpec": @{ }, @"mainClass": @"", @"mainJarFileUri": @"", @"pythonScriptFile": @"", @"sqlScript": @"", @"sqlScriptFile": @"" },
@"state": @"",
@"triggerSpec": @{ @"disabled": @NO, @"maxRetries": @0, @"schedule": @"", @"startTime": @"", @"type": @"" },
@"uid": @"",
@"updateTime": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:parent/tasks"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/:parent/tasks" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"createTime\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"executionSpec\": {\n \"args\": {},\n \"kmsKey\": \"\",\n \"maxJobExecutionLifetime\": \"\",\n \"project\": \"\",\n \"serviceAccount\": \"\"\n },\n \"executionStatus\": {\n \"latestJob\": {\n \"endTime\": \"\",\n \"message\": \"\",\n \"name\": \"\",\n \"retryCount\": 0,\n \"service\": \"\",\n \"serviceJob\": \"\",\n \"startTime\": \"\",\n \"state\": \"\",\n \"uid\": \"\"\n },\n \"updateTime\": \"\"\n },\n \"labels\": {},\n \"name\": \"\",\n \"notebook\": {\n \"archiveUris\": [],\n \"fileUris\": [],\n \"infrastructureSpec\": {\n \"batch\": {\n \"executorsCount\": 0,\n \"maxExecutorsCount\": 0\n },\n \"containerImage\": {\n \"image\": \"\",\n \"javaJars\": [],\n \"properties\": {},\n \"pythonPackages\": []\n },\n \"vpcNetwork\": {\n \"network\": \"\",\n \"networkTags\": [],\n \"subNetwork\": \"\"\n }\n },\n \"notebook\": \"\"\n },\n \"spark\": {\n \"archiveUris\": [],\n \"fileUris\": [],\n \"infrastructureSpec\": {},\n \"mainClass\": \"\",\n \"mainJarFileUri\": \"\",\n \"pythonScriptFile\": \"\",\n \"sqlScript\": \"\",\n \"sqlScriptFile\": \"\"\n },\n \"state\": \"\",\n \"triggerSpec\": {\n \"disabled\": false,\n \"maxRetries\": 0,\n \"schedule\": \"\",\n \"startTime\": \"\",\n \"type\": \"\"\n },\n \"uid\": \"\",\n \"updateTime\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/:parent/tasks",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'createTime' => '',
'description' => '',
'displayName' => '',
'executionSpec' => [
'args' => [
],
'kmsKey' => '',
'maxJobExecutionLifetime' => '',
'project' => '',
'serviceAccount' => ''
],
'executionStatus' => [
'latestJob' => [
'endTime' => '',
'message' => '',
'name' => '',
'retryCount' => 0,
'service' => '',
'serviceJob' => '',
'startTime' => '',
'state' => '',
'uid' => ''
],
'updateTime' => ''
],
'labels' => [
],
'name' => '',
'notebook' => [
'archiveUris' => [
],
'fileUris' => [
],
'infrastructureSpec' => [
'batch' => [
'executorsCount' => 0,
'maxExecutorsCount' => 0
],
'containerImage' => [
'image' => '',
'javaJars' => [
],
'properties' => [
],
'pythonPackages' => [
]
],
'vpcNetwork' => [
'network' => '',
'networkTags' => [
],
'subNetwork' => ''
]
],
'notebook' => ''
],
'spark' => [
'archiveUris' => [
],
'fileUris' => [
],
'infrastructureSpec' => [
],
'mainClass' => '',
'mainJarFileUri' => '',
'pythonScriptFile' => '',
'sqlScript' => '',
'sqlScriptFile' => ''
],
'state' => '',
'triggerSpec' => [
'disabled' => null,
'maxRetries' => 0,
'schedule' => '',
'startTime' => '',
'type' => ''
],
'uid' => '',
'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}}/v1/:parent/tasks', [
'body' => '{
"createTime": "",
"description": "",
"displayName": "",
"executionSpec": {
"args": {},
"kmsKey": "",
"maxJobExecutionLifetime": "",
"project": "",
"serviceAccount": ""
},
"executionStatus": {
"latestJob": {
"endTime": "",
"message": "",
"name": "",
"retryCount": 0,
"service": "",
"serviceJob": "",
"startTime": "",
"state": "",
"uid": ""
},
"updateTime": ""
},
"labels": {},
"name": "",
"notebook": {
"archiveUris": [],
"fileUris": [],
"infrastructureSpec": {
"batch": {
"executorsCount": 0,
"maxExecutorsCount": 0
},
"containerImage": {
"image": "",
"javaJars": [],
"properties": {},
"pythonPackages": []
},
"vpcNetwork": {
"network": "",
"networkTags": [],
"subNetwork": ""
}
},
"notebook": ""
},
"spark": {
"archiveUris": [],
"fileUris": [],
"infrastructureSpec": {},
"mainClass": "",
"mainJarFileUri": "",
"pythonScriptFile": "",
"sqlScript": "",
"sqlScriptFile": ""
},
"state": "",
"triggerSpec": {
"disabled": false,
"maxRetries": 0,
"schedule": "",
"startTime": "",
"type": ""
},
"uid": "",
"updateTime": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1/:parent/tasks');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'createTime' => '',
'description' => '',
'displayName' => '',
'executionSpec' => [
'args' => [
],
'kmsKey' => '',
'maxJobExecutionLifetime' => '',
'project' => '',
'serviceAccount' => ''
],
'executionStatus' => [
'latestJob' => [
'endTime' => '',
'message' => '',
'name' => '',
'retryCount' => 0,
'service' => '',
'serviceJob' => '',
'startTime' => '',
'state' => '',
'uid' => ''
],
'updateTime' => ''
],
'labels' => [
],
'name' => '',
'notebook' => [
'archiveUris' => [
],
'fileUris' => [
],
'infrastructureSpec' => [
'batch' => [
'executorsCount' => 0,
'maxExecutorsCount' => 0
],
'containerImage' => [
'image' => '',
'javaJars' => [
],
'properties' => [
],
'pythonPackages' => [
]
],
'vpcNetwork' => [
'network' => '',
'networkTags' => [
],
'subNetwork' => ''
]
],
'notebook' => ''
],
'spark' => [
'archiveUris' => [
],
'fileUris' => [
],
'infrastructureSpec' => [
],
'mainClass' => '',
'mainJarFileUri' => '',
'pythonScriptFile' => '',
'sqlScript' => '',
'sqlScriptFile' => ''
],
'state' => '',
'triggerSpec' => [
'disabled' => null,
'maxRetries' => 0,
'schedule' => '',
'startTime' => '',
'type' => ''
],
'uid' => '',
'updateTime' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'createTime' => '',
'description' => '',
'displayName' => '',
'executionSpec' => [
'args' => [
],
'kmsKey' => '',
'maxJobExecutionLifetime' => '',
'project' => '',
'serviceAccount' => ''
],
'executionStatus' => [
'latestJob' => [
'endTime' => '',
'message' => '',
'name' => '',
'retryCount' => 0,
'service' => '',
'serviceJob' => '',
'startTime' => '',
'state' => '',
'uid' => ''
],
'updateTime' => ''
],
'labels' => [
],
'name' => '',
'notebook' => [
'archiveUris' => [
],
'fileUris' => [
],
'infrastructureSpec' => [
'batch' => [
'executorsCount' => 0,
'maxExecutorsCount' => 0
],
'containerImage' => [
'image' => '',
'javaJars' => [
],
'properties' => [
],
'pythonPackages' => [
]
],
'vpcNetwork' => [
'network' => '',
'networkTags' => [
],
'subNetwork' => ''
]
],
'notebook' => ''
],
'spark' => [
'archiveUris' => [
],
'fileUris' => [
],
'infrastructureSpec' => [
],
'mainClass' => '',
'mainJarFileUri' => '',
'pythonScriptFile' => '',
'sqlScript' => '',
'sqlScriptFile' => ''
],
'state' => '',
'triggerSpec' => [
'disabled' => null,
'maxRetries' => 0,
'schedule' => '',
'startTime' => '',
'type' => ''
],
'uid' => '',
'updateTime' => ''
]));
$request->setRequestUrl('{{baseUrl}}/v1/:parent/tasks');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:parent/tasks' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"createTime": "",
"description": "",
"displayName": "",
"executionSpec": {
"args": {},
"kmsKey": "",
"maxJobExecutionLifetime": "",
"project": "",
"serviceAccount": ""
},
"executionStatus": {
"latestJob": {
"endTime": "",
"message": "",
"name": "",
"retryCount": 0,
"service": "",
"serviceJob": "",
"startTime": "",
"state": "",
"uid": ""
},
"updateTime": ""
},
"labels": {},
"name": "",
"notebook": {
"archiveUris": [],
"fileUris": [],
"infrastructureSpec": {
"batch": {
"executorsCount": 0,
"maxExecutorsCount": 0
},
"containerImage": {
"image": "",
"javaJars": [],
"properties": {},
"pythonPackages": []
},
"vpcNetwork": {
"network": "",
"networkTags": [],
"subNetwork": ""
}
},
"notebook": ""
},
"spark": {
"archiveUris": [],
"fileUris": [],
"infrastructureSpec": {},
"mainClass": "",
"mainJarFileUri": "",
"pythonScriptFile": "",
"sqlScript": "",
"sqlScriptFile": ""
},
"state": "",
"triggerSpec": {
"disabled": false,
"maxRetries": 0,
"schedule": "",
"startTime": "",
"type": ""
},
"uid": "",
"updateTime": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:parent/tasks' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"createTime": "",
"description": "",
"displayName": "",
"executionSpec": {
"args": {},
"kmsKey": "",
"maxJobExecutionLifetime": "",
"project": "",
"serviceAccount": ""
},
"executionStatus": {
"latestJob": {
"endTime": "",
"message": "",
"name": "",
"retryCount": 0,
"service": "",
"serviceJob": "",
"startTime": "",
"state": "",
"uid": ""
},
"updateTime": ""
},
"labels": {},
"name": "",
"notebook": {
"archiveUris": [],
"fileUris": [],
"infrastructureSpec": {
"batch": {
"executorsCount": 0,
"maxExecutorsCount": 0
},
"containerImage": {
"image": "",
"javaJars": [],
"properties": {},
"pythonPackages": []
},
"vpcNetwork": {
"network": "",
"networkTags": [],
"subNetwork": ""
}
},
"notebook": ""
},
"spark": {
"archiveUris": [],
"fileUris": [],
"infrastructureSpec": {},
"mainClass": "",
"mainJarFileUri": "",
"pythonScriptFile": "",
"sqlScript": "",
"sqlScriptFile": ""
},
"state": "",
"triggerSpec": {
"disabled": false,
"maxRetries": 0,
"schedule": "",
"startTime": "",
"type": ""
},
"uid": "",
"updateTime": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"createTime\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"executionSpec\": {\n \"args\": {},\n \"kmsKey\": \"\",\n \"maxJobExecutionLifetime\": \"\",\n \"project\": \"\",\n \"serviceAccount\": \"\"\n },\n \"executionStatus\": {\n \"latestJob\": {\n \"endTime\": \"\",\n \"message\": \"\",\n \"name\": \"\",\n \"retryCount\": 0,\n \"service\": \"\",\n \"serviceJob\": \"\",\n \"startTime\": \"\",\n \"state\": \"\",\n \"uid\": \"\"\n },\n \"updateTime\": \"\"\n },\n \"labels\": {},\n \"name\": \"\",\n \"notebook\": {\n \"archiveUris\": [],\n \"fileUris\": [],\n \"infrastructureSpec\": {\n \"batch\": {\n \"executorsCount\": 0,\n \"maxExecutorsCount\": 0\n },\n \"containerImage\": {\n \"image\": \"\",\n \"javaJars\": [],\n \"properties\": {},\n \"pythonPackages\": []\n },\n \"vpcNetwork\": {\n \"network\": \"\",\n \"networkTags\": [],\n \"subNetwork\": \"\"\n }\n },\n \"notebook\": \"\"\n },\n \"spark\": {\n \"archiveUris\": [],\n \"fileUris\": [],\n \"infrastructureSpec\": {},\n \"mainClass\": \"\",\n \"mainJarFileUri\": \"\",\n \"pythonScriptFile\": \"\",\n \"sqlScript\": \"\",\n \"sqlScriptFile\": \"\"\n },\n \"state\": \"\",\n \"triggerSpec\": {\n \"disabled\": false,\n \"maxRetries\": 0,\n \"schedule\": \"\",\n \"startTime\": \"\",\n \"type\": \"\"\n },\n \"uid\": \"\",\n \"updateTime\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1/:parent/tasks", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/:parent/tasks"
payload = {
"createTime": "",
"description": "",
"displayName": "",
"executionSpec": {
"args": {},
"kmsKey": "",
"maxJobExecutionLifetime": "",
"project": "",
"serviceAccount": ""
},
"executionStatus": {
"latestJob": {
"endTime": "",
"message": "",
"name": "",
"retryCount": 0,
"service": "",
"serviceJob": "",
"startTime": "",
"state": "",
"uid": ""
},
"updateTime": ""
},
"labels": {},
"name": "",
"notebook": {
"archiveUris": [],
"fileUris": [],
"infrastructureSpec": {
"batch": {
"executorsCount": 0,
"maxExecutorsCount": 0
},
"containerImage": {
"image": "",
"javaJars": [],
"properties": {},
"pythonPackages": []
},
"vpcNetwork": {
"network": "",
"networkTags": [],
"subNetwork": ""
}
},
"notebook": ""
},
"spark": {
"archiveUris": [],
"fileUris": [],
"infrastructureSpec": {},
"mainClass": "",
"mainJarFileUri": "",
"pythonScriptFile": "",
"sqlScript": "",
"sqlScriptFile": ""
},
"state": "",
"triggerSpec": {
"disabled": False,
"maxRetries": 0,
"schedule": "",
"startTime": "",
"type": ""
},
"uid": "",
"updateTime": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/:parent/tasks"
payload <- "{\n \"createTime\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"executionSpec\": {\n \"args\": {},\n \"kmsKey\": \"\",\n \"maxJobExecutionLifetime\": \"\",\n \"project\": \"\",\n \"serviceAccount\": \"\"\n },\n \"executionStatus\": {\n \"latestJob\": {\n \"endTime\": \"\",\n \"message\": \"\",\n \"name\": \"\",\n \"retryCount\": 0,\n \"service\": \"\",\n \"serviceJob\": \"\",\n \"startTime\": \"\",\n \"state\": \"\",\n \"uid\": \"\"\n },\n \"updateTime\": \"\"\n },\n \"labels\": {},\n \"name\": \"\",\n \"notebook\": {\n \"archiveUris\": [],\n \"fileUris\": [],\n \"infrastructureSpec\": {\n \"batch\": {\n \"executorsCount\": 0,\n \"maxExecutorsCount\": 0\n },\n \"containerImage\": {\n \"image\": \"\",\n \"javaJars\": [],\n \"properties\": {},\n \"pythonPackages\": []\n },\n \"vpcNetwork\": {\n \"network\": \"\",\n \"networkTags\": [],\n \"subNetwork\": \"\"\n }\n },\n \"notebook\": \"\"\n },\n \"spark\": {\n \"archiveUris\": [],\n \"fileUris\": [],\n \"infrastructureSpec\": {},\n \"mainClass\": \"\",\n \"mainJarFileUri\": \"\",\n \"pythonScriptFile\": \"\",\n \"sqlScript\": \"\",\n \"sqlScriptFile\": \"\"\n },\n \"state\": \"\",\n \"triggerSpec\": {\n \"disabled\": false,\n \"maxRetries\": 0,\n \"schedule\": \"\",\n \"startTime\": \"\",\n \"type\": \"\"\n },\n \"uid\": \"\",\n \"updateTime\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/:parent/tasks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"createTime\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"executionSpec\": {\n \"args\": {},\n \"kmsKey\": \"\",\n \"maxJobExecutionLifetime\": \"\",\n \"project\": \"\",\n \"serviceAccount\": \"\"\n },\n \"executionStatus\": {\n \"latestJob\": {\n \"endTime\": \"\",\n \"message\": \"\",\n \"name\": \"\",\n \"retryCount\": 0,\n \"service\": \"\",\n \"serviceJob\": \"\",\n \"startTime\": \"\",\n \"state\": \"\",\n \"uid\": \"\"\n },\n \"updateTime\": \"\"\n },\n \"labels\": {},\n \"name\": \"\",\n \"notebook\": {\n \"archiveUris\": [],\n \"fileUris\": [],\n \"infrastructureSpec\": {\n \"batch\": {\n \"executorsCount\": 0,\n \"maxExecutorsCount\": 0\n },\n \"containerImage\": {\n \"image\": \"\",\n \"javaJars\": [],\n \"properties\": {},\n \"pythonPackages\": []\n },\n \"vpcNetwork\": {\n \"network\": \"\",\n \"networkTags\": [],\n \"subNetwork\": \"\"\n }\n },\n \"notebook\": \"\"\n },\n \"spark\": {\n \"archiveUris\": [],\n \"fileUris\": [],\n \"infrastructureSpec\": {},\n \"mainClass\": \"\",\n \"mainJarFileUri\": \"\",\n \"pythonScriptFile\": \"\",\n \"sqlScript\": \"\",\n \"sqlScriptFile\": \"\"\n },\n \"state\": \"\",\n \"triggerSpec\": {\n \"disabled\": false,\n \"maxRetries\": 0,\n \"schedule\": \"\",\n \"startTime\": \"\",\n \"type\": \"\"\n },\n \"uid\": \"\",\n \"updateTime\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/v1/:parent/tasks') do |req|
req.body = "{\n \"createTime\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"executionSpec\": {\n \"args\": {},\n \"kmsKey\": \"\",\n \"maxJobExecutionLifetime\": \"\",\n \"project\": \"\",\n \"serviceAccount\": \"\"\n },\n \"executionStatus\": {\n \"latestJob\": {\n \"endTime\": \"\",\n \"message\": \"\",\n \"name\": \"\",\n \"retryCount\": 0,\n \"service\": \"\",\n \"serviceJob\": \"\",\n \"startTime\": \"\",\n \"state\": \"\",\n \"uid\": \"\"\n },\n \"updateTime\": \"\"\n },\n \"labels\": {},\n \"name\": \"\",\n \"notebook\": {\n \"archiveUris\": [],\n \"fileUris\": [],\n \"infrastructureSpec\": {\n \"batch\": {\n \"executorsCount\": 0,\n \"maxExecutorsCount\": 0\n },\n \"containerImage\": {\n \"image\": \"\",\n \"javaJars\": [],\n \"properties\": {},\n \"pythonPackages\": []\n },\n \"vpcNetwork\": {\n \"network\": \"\",\n \"networkTags\": [],\n \"subNetwork\": \"\"\n }\n },\n \"notebook\": \"\"\n },\n \"spark\": {\n \"archiveUris\": [],\n \"fileUris\": [],\n \"infrastructureSpec\": {},\n \"mainClass\": \"\",\n \"mainJarFileUri\": \"\",\n \"pythonScriptFile\": \"\",\n \"sqlScript\": \"\",\n \"sqlScriptFile\": \"\"\n },\n \"state\": \"\",\n \"triggerSpec\": {\n \"disabled\": false,\n \"maxRetries\": 0,\n \"schedule\": \"\",\n \"startTime\": \"\",\n \"type\": \"\"\n },\n \"uid\": \"\",\n \"updateTime\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/:parent/tasks";
let payload = json!({
"createTime": "",
"description": "",
"displayName": "",
"executionSpec": json!({
"args": json!({}),
"kmsKey": "",
"maxJobExecutionLifetime": "",
"project": "",
"serviceAccount": ""
}),
"executionStatus": json!({
"latestJob": json!({
"endTime": "",
"message": "",
"name": "",
"retryCount": 0,
"service": "",
"serviceJob": "",
"startTime": "",
"state": "",
"uid": ""
}),
"updateTime": ""
}),
"labels": json!({}),
"name": "",
"notebook": json!({
"archiveUris": (),
"fileUris": (),
"infrastructureSpec": json!({
"batch": json!({
"executorsCount": 0,
"maxExecutorsCount": 0
}),
"containerImage": json!({
"image": "",
"javaJars": (),
"properties": json!({}),
"pythonPackages": ()
}),
"vpcNetwork": json!({
"network": "",
"networkTags": (),
"subNetwork": ""
})
}),
"notebook": ""
}),
"spark": json!({
"archiveUris": (),
"fileUris": (),
"infrastructureSpec": json!({}),
"mainClass": "",
"mainJarFileUri": "",
"pythonScriptFile": "",
"sqlScript": "",
"sqlScriptFile": ""
}),
"state": "",
"triggerSpec": json!({
"disabled": false,
"maxRetries": 0,
"schedule": "",
"startTime": "",
"type": ""
}),
"uid": "",
"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}}/v1/:parent/tasks \
--header 'content-type: application/json' \
--data '{
"createTime": "",
"description": "",
"displayName": "",
"executionSpec": {
"args": {},
"kmsKey": "",
"maxJobExecutionLifetime": "",
"project": "",
"serviceAccount": ""
},
"executionStatus": {
"latestJob": {
"endTime": "",
"message": "",
"name": "",
"retryCount": 0,
"service": "",
"serviceJob": "",
"startTime": "",
"state": "",
"uid": ""
},
"updateTime": ""
},
"labels": {},
"name": "",
"notebook": {
"archiveUris": [],
"fileUris": [],
"infrastructureSpec": {
"batch": {
"executorsCount": 0,
"maxExecutorsCount": 0
},
"containerImage": {
"image": "",
"javaJars": [],
"properties": {},
"pythonPackages": []
},
"vpcNetwork": {
"network": "",
"networkTags": [],
"subNetwork": ""
}
},
"notebook": ""
},
"spark": {
"archiveUris": [],
"fileUris": [],
"infrastructureSpec": {},
"mainClass": "",
"mainJarFileUri": "",
"pythonScriptFile": "",
"sqlScript": "",
"sqlScriptFile": ""
},
"state": "",
"triggerSpec": {
"disabled": false,
"maxRetries": 0,
"schedule": "",
"startTime": "",
"type": ""
},
"uid": "",
"updateTime": ""
}'
echo '{
"createTime": "",
"description": "",
"displayName": "",
"executionSpec": {
"args": {},
"kmsKey": "",
"maxJobExecutionLifetime": "",
"project": "",
"serviceAccount": ""
},
"executionStatus": {
"latestJob": {
"endTime": "",
"message": "",
"name": "",
"retryCount": 0,
"service": "",
"serviceJob": "",
"startTime": "",
"state": "",
"uid": ""
},
"updateTime": ""
},
"labels": {},
"name": "",
"notebook": {
"archiveUris": [],
"fileUris": [],
"infrastructureSpec": {
"batch": {
"executorsCount": 0,
"maxExecutorsCount": 0
},
"containerImage": {
"image": "",
"javaJars": [],
"properties": {},
"pythonPackages": []
},
"vpcNetwork": {
"network": "",
"networkTags": [],
"subNetwork": ""
}
},
"notebook": ""
},
"spark": {
"archiveUris": [],
"fileUris": [],
"infrastructureSpec": {},
"mainClass": "",
"mainJarFileUri": "",
"pythonScriptFile": "",
"sqlScript": "",
"sqlScriptFile": ""
},
"state": "",
"triggerSpec": {
"disabled": false,
"maxRetries": 0,
"schedule": "",
"startTime": "",
"type": ""
},
"uid": "",
"updateTime": ""
}' | \
http POST {{baseUrl}}/v1/:parent/tasks \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "createTime": "",\n "description": "",\n "displayName": "",\n "executionSpec": {\n "args": {},\n "kmsKey": "",\n "maxJobExecutionLifetime": "",\n "project": "",\n "serviceAccount": ""\n },\n "executionStatus": {\n "latestJob": {\n "endTime": "",\n "message": "",\n "name": "",\n "retryCount": 0,\n "service": "",\n "serviceJob": "",\n "startTime": "",\n "state": "",\n "uid": ""\n },\n "updateTime": ""\n },\n "labels": {},\n "name": "",\n "notebook": {\n "archiveUris": [],\n "fileUris": [],\n "infrastructureSpec": {\n "batch": {\n "executorsCount": 0,\n "maxExecutorsCount": 0\n },\n "containerImage": {\n "image": "",\n "javaJars": [],\n "properties": {},\n "pythonPackages": []\n },\n "vpcNetwork": {\n "network": "",\n "networkTags": [],\n "subNetwork": ""\n }\n },\n "notebook": ""\n },\n "spark": {\n "archiveUris": [],\n "fileUris": [],\n "infrastructureSpec": {},\n "mainClass": "",\n "mainJarFileUri": "",\n "pythonScriptFile": "",\n "sqlScript": "",\n "sqlScriptFile": ""\n },\n "state": "",\n "triggerSpec": {\n "disabled": false,\n "maxRetries": 0,\n "schedule": "",\n "startTime": "",\n "type": ""\n },\n "uid": "",\n "updateTime": ""\n}' \
--output-document \
- {{baseUrl}}/v1/:parent/tasks
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"createTime": "",
"description": "",
"displayName": "",
"executionSpec": [
"args": [],
"kmsKey": "",
"maxJobExecutionLifetime": "",
"project": "",
"serviceAccount": ""
],
"executionStatus": [
"latestJob": [
"endTime": "",
"message": "",
"name": "",
"retryCount": 0,
"service": "",
"serviceJob": "",
"startTime": "",
"state": "",
"uid": ""
],
"updateTime": ""
],
"labels": [],
"name": "",
"notebook": [
"archiveUris": [],
"fileUris": [],
"infrastructureSpec": [
"batch": [
"executorsCount": 0,
"maxExecutorsCount": 0
],
"containerImage": [
"image": "",
"javaJars": [],
"properties": [],
"pythonPackages": []
],
"vpcNetwork": [
"network": "",
"networkTags": [],
"subNetwork": ""
]
],
"notebook": ""
],
"spark": [
"archiveUris": [],
"fileUris": [],
"infrastructureSpec": [],
"mainClass": "",
"mainJarFileUri": "",
"pythonScriptFile": "",
"sqlScript": "",
"sqlScriptFile": ""
],
"state": "",
"triggerSpec": [
"disabled": false,
"maxRetries": 0,
"schedule": "",
"startTime": "",
"type": ""
],
"uid": "",
"updateTime": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:parent/tasks")! 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
dataplex.projects.locations.lakes.tasks.jobs.list
{{baseUrl}}/v1/:parent/jobs
QUERY PARAMS
parent
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:parent/jobs");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v1/:parent/jobs")
require "http/client"
url = "{{baseUrl}}/v1/:parent/jobs"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/v1/:parent/jobs"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/:parent/jobs");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/:parent/jobs"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/v1/:parent/jobs HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1/:parent/jobs")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/:parent/jobs"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/:parent/jobs")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1/:parent/jobs")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/v1/:parent/jobs');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/v1/:parent/jobs'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/:parent/jobs';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/:parent/jobs',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1/:parent/jobs")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/:parent/jobs',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'GET', url: '{{baseUrl}}/v1/:parent/jobs'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v1/:parent/jobs');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {method: 'GET', url: '{{baseUrl}}/v1/:parent/jobs'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/:parent/jobs';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:parent/jobs"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/:parent/jobs" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/:parent/jobs",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/v1/:parent/jobs');
echo $response->getBody();
setUrl('{{baseUrl}}/v1/:parent/jobs');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/:parent/jobs');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:parent/jobs' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:parent/jobs' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v1/:parent/jobs")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/:parent/jobs"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/:parent/jobs"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/:parent/jobs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/v1/:parent/jobs') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/:parent/jobs";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/v1/:parent/jobs
http GET {{baseUrl}}/v1/:parent/jobs
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v1/:parent/jobs
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:parent/jobs")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
dataplex.projects.locations.lakes.tasks.list
{{baseUrl}}/v1/:parent/tasks
QUERY PARAMS
parent
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:parent/tasks");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v1/:parent/tasks")
require "http/client"
url = "{{baseUrl}}/v1/:parent/tasks"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/v1/:parent/tasks"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/:parent/tasks");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/:parent/tasks"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/v1/:parent/tasks HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1/:parent/tasks")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/:parent/tasks"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/:parent/tasks")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1/:parent/tasks")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/v1/:parent/tasks');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/v1/:parent/tasks'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/:parent/tasks';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/:parent/tasks',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1/:parent/tasks")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/:parent/tasks',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'GET', url: '{{baseUrl}}/v1/:parent/tasks'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v1/:parent/tasks');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {method: 'GET', url: '{{baseUrl}}/v1/:parent/tasks'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/:parent/tasks';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:parent/tasks"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/:parent/tasks" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/:parent/tasks",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/v1/:parent/tasks');
echo $response->getBody();
setUrl('{{baseUrl}}/v1/:parent/tasks');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/:parent/tasks');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:parent/tasks' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:parent/tasks' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v1/:parent/tasks")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/:parent/tasks"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/:parent/tasks"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/:parent/tasks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/v1/:parent/tasks') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/:parent/tasks";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/v1/:parent/tasks
http GET {{baseUrl}}/v1/:parent/tasks
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v1/:parent/tasks
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:parent/tasks")! 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
dataplex.projects.locations.lakes.tasks.run
{{baseUrl}}/v1/:name:run
QUERY PARAMS
name
BODY json
{}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:name:run");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1/:name:run" {:content-type :json})
require "http/client"
url = "{{baseUrl}}/v1/:name:run"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/v1/:name:run"),
Content = new StringContent("{}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/:name:run");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/:name:run"
payload := strings.NewReader("{}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/v1/:name:run HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 2
{}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1/:name:run")
.setHeader("content-type", "application/json")
.setBody("{}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/:name:run"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/:name:run")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1/:name:run")
.header("content-type", "application/json")
.body("{}")
.asString();
const data = JSON.stringify({});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v1/:name:run');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:name:run',
headers: {'content-type': 'application/json'},
data: {}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/:name:run';
const options = {method: 'POST', headers: {'content-type': 'application/json'}, body: '{}'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/:name:run',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{}")
val request = Request.Builder()
.url("{{baseUrl}}/v1/:name:run")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/:name:run',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:name:run',
headers: {'content-type': 'application/json'},
body: {},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/v1/:name:run');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:name:run',
headers: {'content-type': 'application/json'},
data: {}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/:name:run';
const options = {method: 'POST', headers: {'content-type': 'application/json'}, body: '{}'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:name:run"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/:name:run" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/:name:run",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/v1/:name:run', [
'body' => '{}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1/:name:run');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
]));
$request->setRequestUrl('{{baseUrl}}/v1/:name:run');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:name:run' -Method POST -Headers $headers -ContentType 'application/json' -Body '{}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:name:run' -Method POST -Headers $headers -ContentType 'application/json' -Body '{}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1/:name:run", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/:name:run"
payload = {}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/:name:run"
payload <- "{}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/:name:run")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/v1/:name:run') do |req|
req.body = "{}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/:name:run";
let payload = json!({});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/v1/:name:run \
--header 'content-type: application/json' \
--data '{}'
echo '{}' | \
http POST {{baseUrl}}/v1/:name:run \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{}' \
--output-document \
- {{baseUrl}}/v1/:name:run
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:name:run")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
dataplex.projects.locations.lakes.zones.assets.actions.list
{{baseUrl}}/v1/:parent/actions
QUERY PARAMS
parent
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:parent/actions");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v1/:parent/actions")
require "http/client"
url = "{{baseUrl}}/v1/:parent/actions"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/v1/:parent/actions"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/:parent/actions");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/:parent/actions"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/v1/:parent/actions HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1/:parent/actions")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/:parent/actions"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/:parent/actions")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1/:parent/actions")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/v1/:parent/actions');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/v1/:parent/actions'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/:parent/actions';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/:parent/actions',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1/:parent/actions")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/:parent/actions',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'GET', url: '{{baseUrl}}/v1/:parent/actions'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v1/:parent/actions');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {method: 'GET', url: '{{baseUrl}}/v1/:parent/actions'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/:parent/actions';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:parent/actions"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/:parent/actions" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/:parent/actions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/v1/:parent/actions');
echo $response->getBody();
setUrl('{{baseUrl}}/v1/:parent/actions');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/:parent/actions');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:parent/actions' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:parent/actions' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v1/:parent/actions")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/:parent/actions"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/:parent/actions"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/:parent/actions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/v1/:parent/actions') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/:parent/actions";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/v1/:parent/actions
http GET {{baseUrl}}/v1/:parent/actions
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v1/:parent/actions
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:parent/actions")! 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
dataplex.projects.locations.lakes.zones.assets.create
{{baseUrl}}/v1/:parent/assets
QUERY PARAMS
parent
BODY json
{
"createTime": "",
"description": "",
"discoverySpec": {
"csvOptions": {
"delimiter": "",
"disableTypeInference": false,
"encoding": "",
"headerRows": 0
},
"enabled": false,
"excludePatterns": [],
"includePatterns": [],
"jsonOptions": {
"disableTypeInference": false,
"encoding": ""
},
"schedule": ""
},
"discoveryStatus": {
"lastRunDuration": "",
"lastRunTime": "",
"message": "",
"state": "",
"stats": {
"dataItems": "",
"dataSize": "",
"filesets": "",
"tables": ""
},
"updateTime": ""
},
"displayName": "",
"labels": {},
"name": "",
"resourceSpec": {
"name": "",
"readAccessMode": "",
"type": ""
},
"resourceStatus": {
"managedAccessIdentity": "",
"message": "",
"state": "",
"updateTime": ""
},
"securityStatus": {
"message": "",
"state": "",
"updateTime": ""
},
"state": "",
"uid": "",
"updateTime": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:parent/assets");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"createTime\": \"\",\n \"description\": \"\",\n \"discoverySpec\": {\n \"csvOptions\": {\n \"delimiter\": \"\",\n \"disableTypeInference\": false,\n \"encoding\": \"\",\n \"headerRows\": 0\n },\n \"enabled\": false,\n \"excludePatterns\": [],\n \"includePatterns\": [],\n \"jsonOptions\": {\n \"disableTypeInference\": false,\n \"encoding\": \"\"\n },\n \"schedule\": \"\"\n },\n \"discoveryStatus\": {\n \"lastRunDuration\": \"\",\n \"lastRunTime\": \"\",\n \"message\": \"\",\n \"state\": \"\",\n \"stats\": {\n \"dataItems\": \"\",\n \"dataSize\": \"\",\n \"filesets\": \"\",\n \"tables\": \"\"\n },\n \"updateTime\": \"\"\n },\n \"displayName\": \"\",\n \"labels\": {},\n \"name\": \"\",\n \"resourceSpec\": {\n \"name\": \"\",\n \"readAccessMode\": \"\",\n \"type\": \"\"\n },\n \"resourceStatus\": {\n \"managedAccessIdentity\": \"\",\n \"message\": \"\",\n \"state\": \"\",\n \"updateTime\": \"\"\n },\n \"securityStatus\": {\n \"message\": \"\",\n \"state\": \"\",\n \"updateTime\": \"\"\n },\n \"state\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1/:parent/assets" {:content-type :json
:form-params {:createTime ""
:description ""
:discoverySpec {:csvOptions {:delimiter ""
:disableTypeInference false
:encoding ""
:headerRows 0}
:enabled false
:excludePatterns []
:includePatterns []
:jsonOptions {:disableTypeInference false
:encoding ""}
:schedule ""}
:discoveryStatus {:lastRunDuration ""
:lastRunTime ""
:message ""
:state ""
:stats {:dataItems ""
:dataSize ""
:filesets ""
:tables ""}
:updateTime ""}
:displayName ""
:labels {}
:name ""
:resourceSpec {:name ""
:readAccessMode ""
:type ""}
:resourceStatus {:managedAccessIdentity ""
:message ""
:state ""
:updateTime ""}
:securityStatus {:message ""
:state ""
:updateTime ""}
:state ""
:uid ""
:updateTime ""}})
require "http/client"
url = "{{baseUrl}}/v1/:parent/assets"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"createTime\": \"\",\n \"description\": \"\",\n \"discoverySpec\": {\n \"csvOptions\": {\n \"delimiter\": \"\",\n \"disableTypeInference\": false,\n \"encoding\": \"\",\n \"headerRows\": 0\n },\n \"enabled\": false,\n \"excludePatterns\": [],\n \"includePatterns\": [],\n \"jsonOptions\": {\n \"disableTypeInference\": false,\n \"encoding\": \"\"\n },\n \"schedule\": \"\"\n },\n \"discoveryStatus\": {\n \"lastRunDuration\": \"\",\n \"lastRunTime\": \"\",\n \"message\": \"\",\n \"state\": \"\",\n \"stats\": {\n \"dataItems\": \"\",\n \"dataSize\": \"\",\n \"filesets\": \"\",\n \"tables\": \"\"\n },\n \"updateTime\": \"\"\n },\n \"displayName\": \"\",\n \"labels\": {},\n \"name\": \"\",\n \"resourceSpec\": {\n \"name\": \"\",\n \"readAccessMode\": \"\",\n \"type\": \"\"\n },\n \"resourceStatus\": {\n \"managedAccessIdentity\": \"\",\n \"message\": \"\",\n \"state\": \"\",\n \"updateTime\": \"\"\n },\n \"securityStatus\": {\n \"message\": \"\",\n \"state\": \"\",\n \"updateTime\": \"\"\n },\n \"state\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/v1/:parent/assets"),
Content = new StringContent("{\n \"createTime\": \"\",\n \"description\": \"\",\n \"discoverySpec\": {\n \"csvOptions\": {\n \"delimiter\": \"\",\n \"disableTypeInference\": false,\n \"encoding\": \"\",\n \"headerRows\": 0\n },\n \"enabled\": false,\n \"excludePatterns\": [],\n \"includePatterns\": [],\n \"jsonOptions\": {\n \"disableTypeInference\": false,\n \"encoding\": \"\"\n },\n \"schedule\": \"\"\n },\n \"discoveryStatus\": {\n \"lastRunDuration\": \"\",\n \"lastRunTime\": \"\",\n \"message\": \"\",\n \"state\": \"\",\n \"stats\": {\n \"dataItems\": \"\",\n \"dataSize\": \"\",\n \"filesets\": \"\",\n \"tables\": \"\"\n },\n \"updateTime\": \"\"\n },\n \"displayName\": \"\",\n \"labels\": {},\n \"name\": \"\",\n \"resourceSpec\": {\n \"name\": \"\",\n \"readAccessMode\": \"\",\n \"type\": \"\"\n },\n \"resourceStatus\": {\n \"managedAccessIdentity\": \"\",\n \"message\": \"\",\n \"state\": \"\",\n \"updateTime\": \"\"\n },\n \"securityStatus\": {\n \"message\": \"\",\n \"state\": \"\",\n \"updateTime\": \"\"\n },\n \"state\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/:parent/assets");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"createTime\": \"\",\n \"description\": \"\",\n \"discoverySpec\": {\n \"csvOptions\": {\n \"delimiter\": \"\",\n \"disableTypeInference\": false,\n \"encoding\": \"\",\n \"headerRows\": 0\n },\n \"enabled\": false,\n \"excludePatterns\": [],\n \"includePatterns\": [],\n \"jsonOptions\": {\n \"disableTypeInference\": false,\n \"encoding\": \"\"\n },\n \"schedule\": \"\"\n },\n \"discoveryStatus\": {\n \"lastRunDuration\": \"\",\n \"lastRunTime\": \"\",\n \"message\": \"\",\n \"state\": \"\",\n \"stats\": {\n \"dataItems\": \"\",\n \"dataSize\": \"\",\n \"filesets\": \"\",\n \"tables\": \"\"\n },\n \"updateTime\": \"\"\n },\n \"displayName\": \"\",\n \"labels\": {},\n \"name\": \"\",\n \"resourceSpec\": {\n \"name\": \"\",\n \"readAccessMode\": \"\",\n \"type\": \"\"\n },\n \"resourceStatus\": {\n \"managedAccessIdentity\": \"\",\n \"message\": \"\",\n \"state\": \"\",\n \"updateTime\": \"\"\n },\n \"securityStatus\": {\n \"message\": \"\",\n \"state\": \"\",\n \"updateTime\": \"\"\n },\n \"state\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/:parent/assets"
payload := strings.NewReader("{\n \"createTime\": \"\",\n \"description\": \"\",\n \"discoverySpec\": {\n \"csvOptions\": {\n \"delimiter\": \"\",\n \"disableTypeInference\": false,\n \"encoding\": \"\",\n \"headerRows\": 0\n },\n \"enabled\": false,\n \"excludePatterns\": [],\n \"includePatterns\": [],\n \"jsonOptions\": {\n \"disableTypeInference\": false,\n \"encoding\": \"\"\n },\n \"schedule\": \"\"\n },\n \"discoveryStatus\": {\n \"lastRunDuration\": \"\",\n \"lastRunTime\": \"\",\n \"message\": \"\",\n \"state\": \"\",\n \"stats\": {\n \"dataItems\": \"\",\n \"dataSize\": \"\",\n \"filesets\": \"\",\n \"tables\": \"\"\n },\n \"updateTime\": \"\"\n },\n \"displayName\": \"\",\n \"labels\": {},\n \"name\": \"\",\n \"resourceSpec\": {\n \"name\": \"\",\n \"readAccessMode\": \"\",\n \"type\": \"\"\n },\n \"resourceStatus\": {\n \"managedAccessIdentity\": \"\",\n \"message\": \"\",\n \"state\": \"\",\n \"updateTime\": \"\"\n },\n \"securityStatus\": {\n \"message\": \"\",\n \"state\": \"\",\n \"updateTime\": \"\"\n },\n \"state\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/v1/:parent/assets HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 1006
{
"createTime": "",
"description": "",
"discoverySpec": {
"csvOptions": {
"delimiter": "",
"disableTypeInference": false,
"encoding": "",
"headerRows": 0
},
"enabled": false,
"excludePatterns": [],
"includePatterns": [],
"jsonOptions": {
"disableTypeInference": false,
"encoding": ""
},
"schedule": ""
},
"discoveryStatus": {
"lastRunDuration": "",
"lastRunTime": "",
"message": "",
"state": "",
"stats": {
"dataItems": "",
"dataSize": "",
"filesets": "",
"tables": ""
},
"updateTime": ""
},
"displayName": "",
"labels": {},
"name": "",
"resourceSpec": {
"name": "",
"readAccessMode": "",
"type": ""
},
"resourceStatus": {
"managedAccessIdentity": "",
"message": "",
"state": "",
"updateTime": ""
},
"securityStatus": {
"message": "",
"state": "",
"updateTime": ""
},
"state": "",
"uid": "",
"updateTime": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1/:parent/assets")
.setHeader("content-type", "application/json")
.setBody("{\n \"createTime\": \"\",\n \"description\": \"\",\n \"discoverySpec\": {\n \"csvOptions\": {\n \"delimiter\": \"\",\n \"disableTypeInference\": false,\n \"encoding\": \"\",\n \"headerRows\": 0\n },\n \"enabled\": false,\n \"excludePatterns\": [],\n \"includePatterns\": [],\n \"jsonOptions\": {\n \"disableTypeInference\": false,\n \"encoding\": \"\"\n },\n \"schedule\": \"\"\n },\n \"discoveryStatus\": {\n \"lastRunDuration\": \"\",\n \"lastRunTime\": \"\",\n \"message\": \"\",\n \"state\": \"\",\n \"stats\": {\n \"dataItems\": \"\",\n \"dataSize\": \"\",\n \"filesets\": \"\",\n \"tables\": \"\"\n },\n \"updateTime\": \"\"\n },\n \"displayName\": \"\",\n \"labels\": {},\n \"name\": \"\",\n \"resourceSpec\": {\n \"name\": \"\",\n \"readAccessMode\": \"\",\n \"type\": \"\"\n },\n \"resourceStatus\": {\n \"managedAccessIdentity\": \"\",\n \"message\": \"\",\n \"state\": \"\",\n \"updateTime\": \"\"\n },\n \"securityStatus\": {\n \"message\": \"\",\n \"state\": \"\",\n \"updateTime\": \"\"\n },\n \"state\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/:parent/assets"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"createTime\": \"\",\n \"description\": \"\",\n \"discoverySpec\": {\n \"csvOptions\": {\n \"delimiter\": \"\",\n \"disableTypeInference\": false,\n \"encoding\": \"\",\n \"headerRows\": 0\n },\n \"enabled\": false,\n \"excludePatterns\": [],\n \"includePatterns\": [],\n \"jsonOptions\": {\n \"disableTypeInference\": false,\n \"encoding\": \"\"\n },\n \"schedule\": \"\"\n },\n \"discoveryStatus\": {\n \"lastRunDuration\": \"\",\n \"lastRunTime\": \"\",\n \"message\": \"\",\n \"state\": \"\",\n \"stats\": {\n \"dataItems\": \"\",\n \"dataSize\": \"\",\n \"filesets\": \"\",\n \"tables\": \"\"\n },\n \"updateTime\": \"\"\n },\n \"displayName\": \"\",\n \"labels\": {},\n \"name\": \"\",\n \"resourceSpec\": {\n \"name\": \"\",\n \"readAccessMode\": \"\",\n \"type\": \"\"\n },\n \"resourceStatus\": {\n \"managedAccessIdentity\": \"\",\n \"message\": \"\",\n \"state\": \"\",\n \"updateTime\": \"\"\n },\n \"securityStatus\": {\n \"message\": \"\",\n \"state\": \"\",\n \"updateTime\": \"\"\n },\n \"state\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"createTime\": \"\",\n \"description\": \"\",\n \"discoverySpec\": {\n \"csvOptions\": {\n \"delimiter\": \"\",\n \"disableTypeInference\": false,\n \"encoding\": \"\",\n \"headerRows\": 0\n },\n \"enabled\": false,\n \"excludePatterns\": [],\n \"includePatterns\": [],\n \"jsonOptions\": {\n \"disableTypeInference\": false,\n \"encoding\": \"\"\n },\n \"schedule\": \"\"\n },\n \"discoveryStatus\": {\n \"lastRunDuration\": \"\",\n \"lastRunTime\": \"\",\n \"message\": \"\",\n \"state\": \"\",\n \"stats\": {\n \"dataItems\": \"\",\n \"dataSize\": \"\",\n \"filesets\": \"\",\n \"tables\": \"\"\n },\n \"updateTime\": \"\"\n },\n \"displayName\": \"\",\n \"labels\": {},\n \"name\": \"\",\n \"resourceSpec\": {\n \"name\": \"\",\n \"readAccessMode\": \"\",\n \"type\": \"\"\n },\n \"resourceStatus\": {\n \"managedAccessIdentity\": \"\",\n \"message\": \"\",\n \"state\": \"\",\n \"updateTime\": \"\"\n },\n \"securityStatus\": {\n \"message\": \"\",\n \"state\": \"\",\n \"updateTime\": \"\"\n },\n \"state\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/:parent/assets")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1/:parent/assets")
.header("content-type", "application/json")
.body("{\n \"createTime\": \"\",\n \"description\": \"\",\n \"discoverySpec\": {\n \"csvOptions\": {\n \"delimiter\": \"\",\n \"disableTypeInference\": false,\n \"encoding\": \"\",\n \"headerRows\": 0\n },\n \"enabled\": false,\n \"excludePatterns\": [],\n \"includePatterns\": [],\n \"jsonOptions\": {\n \"disableTypeInference\": false,\n \"encoding\": \"\"\n },\n \"schedule\": \"\"\n },\n \"discoveryStatus\": {\n \"lastRunDuration\": \"\",\n \"lastRunTime\": \"\",\n \"message\": \"\",\n \"state\": \"\",\n \"stats\": {\n \"dataItems\": \"\",\n \"dataSize\": \"\",\n \"filesets\": \"\",\n \"tables\": \"\"\n },\n \"updateTime\": \"\"\n },\n \"displayName\": \"\",\n \"labels\": {},\n \"name\": \"\",\n \"resourceSpec\": {\n \"name\": \"\",\n \"readAccessMode\": \"\",\n \"type\": \"\"\n },\n \"resourceStatus\": {\n \"managedAccessIdentity\": \"\",\n \"message\": \"\",\n \"state\": \"\",\n \"updateTime\": \"\"\n },\n \"securityStatus\": {\n \"message\": \"\",\n \"state\": \"\",\n \"updateTime\": \"\"\n },\n \"state\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}")
.asString();
const data = JSON.stringify({
createTime: '',
description: '',
discoverySpec: {
csvOptions: {
delimiter: '',
disableTypeInference: false,
encoding: '',
headerRows: 0
},
enabled: false,
excludePatterns: [],
includePatterns: [],
jsonOptions: {
disableTypeInference: false,
encoding: ''
},
schedule: ''
},
discoveryStatus: {
lastRunDuration: '',
lastRunTime: '',
message: '',
state: '',
stats: {
dataItems: '',
dataSize: '',
filesets: '',
tables: ''
},
updateTime: ''
},
displayName: '',
labels: {},
name: '',
resourceSpec: {
name: '',
readAccessMode: '',
type: ''
},
resourceStatus: {
managedAccessIdentity: '',
message: '',
state: '',
updateTime: ''
},
securityStatus: {
message: '',
state: '',
updateTime: ''
},
state: '',
uid: '',
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}}/v1/:parent/assets');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:parent/assets',
headers: {'content-type': 'application/json'},
data: {
createTime: '',
description: '',
discoverySpec: {
csvOptions: {delimiter: '', disableTypeInference: false, encoding: '', headerRows: 0},
enabled: false,
excludePatterns: [],
includePatterns: [],
jsonOptions: {disableTypeInference: false, encoding: ''},
schedule: ''
},
discoveryStatus: {
lastRunDuration: '',
lastRunTime: '',
message: '',
state: '',
stats: {dataItems: '', dataSize: '', filesets: '', tables: ''},
updateTime: ''
},
displayName: '',
labels: {},
name: '',
resourceSpec: {name: '', readAccessMode: '', type: ''},
resourceStatus: {managedAccessIdentity: '', message: '', state: '', updateTime: ''},
securityStatus: {message: '', state: '', updateTime: ''},
state: '',
uid: '',
updateTime: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/:parent/assets';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"createTime":"","description":"","discoverySpec":{"csvOptions":{"delimiter":"","disableTypeInference":false,"encoding":"","headerRows":0},"enabled":false,"excludePatterns":[],"includePatterns":[],"jsonOptions":{"disableTypeInference":false,"encoding":""},"schedule":""},"discoveryStatus":{"lastRunDuration":"","lastRunTime":"","message":"","state":"","stats":{"dataItems":"","dataSize":"","filesets":"","tables":""},"updateTime":""},"displayName":"","labels":{},"name":"","resourceSpec":{"name":"","readAccessMode":"","type":""},"resourceStatus":{"managedAccessIdentity":"","message":"","state":"","updateTime":""},"securityStatus":{"message":"","state":"","updateTime":""},"state":"","uid":"","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}}/v1/:parent/assets',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "createTime": "",\n "description": "",\n "discoverySpec": {\n "csvOptions": {\n "delimiter": "",\n "disableTypeInference": false,\n "encoding": "",\n "headerRows": 0\n },\n "enabled": false,\n "excludePatterns": [],\n "includePatterns": [],\n "jsonOptions": {\n "disableTypeInference": false,\n "encoding": ""\n },\n "schedule": ""\n },\n "discoveryStatus": {\n "lastRunDuration": "",\n "lastRunTime": "",\n "message": "",\n "state": "",\n "stats": {\n "dataItems": "",\n "dataSize": "",\n "filesets": "",\n "tables": ""\n },\n "updateTime": ""\n },\n "displayName": "",\n "labels": {},\n "name": "",\n "resourceSpec": {\n "name": "",\n "readAccessMode": "",\n "type": ""\n },\n "resourceStatus": {\n "managedAccessIdentity": "",\n "message": "",\n "state": "",\n "updateTime": ""\n },\n "securityStatus": {\n "message": "",\n "state": "",\n "updateTime": ""\n },\n "state": "",\n "uid": "",\n "updateTime": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"createTime\": \"\",\n \"description\": \"\",\n \"discoverySpec\": {\n \"csvOptions\": {\n \"delimiter\": \"\",\n \"disableTypeInference\": false,\n \"encoding\": \"\",\n \"headerRows\": 0\n },\n \"enabled\": false,\n \"excludePatterns\": [],\n \"includePatterns\": [],\n \"jsonOptions\": {\n \"disableTypeInference\": false,\n \"encoding\": \"\"\n },\n \"schedule\": \"\"\n },\n \"discoveryStatus\": {\n \"lastRunDuration\": \"\",\n \"lastRunTime\": \"\",\n \"message\": \"\",\n \"state\": \"\",\n \"stats\": {\n \"dataItems\": \"\",\n \"dataSize\": \"\",\n \"filesets\": \"\",\n \"tables\": \"\"\n },\n \"updateTime\": \"\"\n },\n \"displayName\": \"\",\n \"labels\": {},\n \"name\": \"\",\n \"resourceSpec\": {\n \"name\": \"\",\n \"readAccessMode\": \"\",\n \"type\": \"\"\n },\n \"resourceStatus\": {\n \"managedAccessIdentity\": \"\",\n \"message\": \"\",\n \"state\": \"\",\n \"updateTime\": \"\"\n },\n \"securityStatus\": {\n \"message\": \"\",\n \"state\": \"\",\n \"updateTime\": \"\"\n },\n \"state\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1/:parent/assets")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/:parent/assets',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
createTime: '',
description: '',
discoverySpec: {
csvOptions: {delimiter: '', disableTypeInference: false, encoding: '', headerRows: 0},
enabled: false,
excludePatterns: [],
includePatterns: [],
jsonOptions: {disableTypeInference: false, encoding: ''},
schedule: ''
},
discoveryStatus: {
lastRunDuration: '',
lastRunTime: '',
message: '',
state: '',
stats: {dataItems: '', dataSize: '', filesets: '', tables: ''},
updateTime: ''
},
displayName: '',
labels: {},
name: '',
resourceSpec: {name: '', readAccessMode: '', type: ''},
resourceStatus: {managedAccessIdentity: '', message: '', state: '', updateTime: ''},
securityStatus: {message: '', state: '', updateTime: ''},
state: '',
uid: '',
updateTime: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:parent/assets',
headers: {'content-type': 'application/json'},
body: {
createTime: '',
description: '',
discoverySpec: {
csvOptions: {delimiter: '', disableTypeInference: false, encoding: '', headerRows: 0},
enabled: false,
excludePatterns: [],
includePatterns: [],
jsonOptions: {disableTypeInference: false, encoding: ''},
schedule: ''
},
discoveryStatus: {
lastRunDuration: '',
lastRunTime: '',
message: '',
state: '',
stats: {dataItems: '', dataSize: '', filesets: '', tables: ''},
updateTime: ''
},
displayName: '',
labels: {},
name: '',
resourceSpec: {name: '', readAccessMode: '', type: ''},
resourceStatus: {managedAccessIdentity: '', message: '', state: '', updateTime: ''},
securityStatus: {message: '', state: '', updateTime: ''},
state: '',
uid: '',
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}}/v1/:parent/assets');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
createTime: '',
description: '',
discoverySpec: {
csvOptions: {
delimiter: '',
disableTypeInference: false,
encoding: '',
headerRows: 0
},
enabled: false,
excludePatterns: [],
includePatterns: [],
jsonOptions: {
disableTypeInference: false,
encoding: ''
},
schedule: ''
},
discoveryStatus: {
lastRunDuration: '',
lastRunTime: '',
message: '',
state: '',
stats: {
dataItems: '',
dataSize: '',
filesets: '',
tables: ''
},
updateTime: ''
},
displayName: '',
labels: {},
name: '',
resourceSpec: {
name: '',
readAccessMode: '',
type: ''
},
resourceStatus: {
managedAccessIdentity: '',
message: '',
state: '',
updateTime: ''
},
securityStatus: {
message: '',
state: '',
updateTime: ''
},
state: '',
uid: '',
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}}/v1/:parent/assets',
headers: {'content-type': 'application/json'},
data: {
createTime: '',
description: '',
discoverySpec: {
csvOptions: {delimiter: '', disableTypeInference: false, encoding: '', headerRows: 0},
enabled: false,
excludePatterns: [],
includePatterns: [],
jsonOptions: {disableTypeInference: false, encoding: ''},
schedule: ''
},
discoveryStatus: {
lastRunDuration: '',
lastRunTime: '',
message: '',
state: '',
stats: {dataItems: '', dataSize: '', filesets: '', tables: ''},
updateTime: ''
},
displayName: '',
labels: {},
name: '',
resourceSpec: {name: '', readAccessMode: '', type: ''},
resourceStatus: {managedAccessIdentity: '', message: '', state: '', updateTime: ''},
securityStatus: {message: '', state: '', updateTime: ''},
state: '',
uid: '',
updateTime: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/:parent/assets';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"createTime":"","description":"","discoverySpec":{"csvOptions":{"delimiter":"","disableTypeInference":false,"encoding":"","headerRows":0},"enabled":false,"excludePatterns":[],"includePatterns":[],"jsonOptions":{"disableTypeInference":false,"encoding":""},"schedule":""},"discoveryStatus":{"lastRunDuration":"","lastRunTime":"","message":"","state":"","stats":{"dataItems":"","dataSize":"","filesets":"","tables":""},"updateTime":""},"displayName":"","labels":{},"name":"","resourceSpec":{"name":"","readAccessMode":"","type":""},"resourceStatus":{"managedAccessIdentity":"","message":"","state":"","updateTime":""},"securityStatus":{"message":"","state":"","updateTime":""},"state":"","uid":"","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 = @{ @"createTime": @"",
@"description": @"",
@"discoverySpec": @{ @"csvOptions": @{ @"delimiter": @"", @"disableTypeInference": @NO, @"encoding": @"", @"headerRows": @0 }, @"enabled": @NO, @"excludePatterns": @[ ], @"includePatterns": @[ ], @"jsonOptions": @{ @"disableTypeInference": @NO, @"encoding": @"" }, @"schedule": @"" },
@"discoveryStatus": @{ @"lastRunDuration": @"", @"lastRunTime": @"", @"message": @"", @"state": @"", @"stats": @{ @"dataItems": @"", @"dataSize": @"", @"filesets": @"", @"tables": @"" }, @"updateTime": @"" },
@"displayName": @"",
@"labels": @{ },
@"name": @"",
@"resourceSpec": @{ @"name": @"", @"readAccessMode": @"", @"type": @"" },
@"resourceStatus": @{ @"managedAccessIdentity": @"", @"message": @"", @"state": @"", @"updateTime": @"" },
@"securityStatus": @{ @"message": @"", @"state": @"", @"updateTime": @"" },
@"state": @"",
@"uid": @"",
@"updateTime": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:parent/assets"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/:parent/assets" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"createTime\": \"\",\n \"description\": \"\",\n \"discoverySpec\": {\n \"csvOptions\": {\n \"delimiter\": \"\",\n \"disableTypeInference\": false,\n \"encoding\": \"\",\n \"headerRows\": 0\n },\n \"enabled\": false,\n \"excludePatterns\": [],\n \"includePatterns\": [],\n \"jsonOptions\": {\n \"disableTypeInference\": false,\n \"encoding\": \"\"\n },\n \"schedule\": \"\"\n },\n \"discoveryStatus\": {\n \"lastRunDuration\": \"\",\n \"lastRunTime\": \"\",\n \"message\": \"\",\n \"state\": \"\",\n \"stats\": {\n \"dataItems\": \"\",\n \"dataSize\": \"\",\n \"filesets\": \"\",\n \"tables\": \"\"\n },\n \"updateTime\": \"\"\n },\n \"displayName\": \"\",\n \"labels\": {},\n \"name\": \"\",\n \"resourceSpec\": {\n \"name\": \"\",\n \"readAccessMode\": \"\",\n \"type\": \"\"\n },\n \"resourceStatus\": {\n \"managedAccessIdentity\": \"\",\n \"message\": \"\",\n \"state\": \"\",\n \"updateTime\": \"\"\n },\n \"securityStatus\": {\n \"message\": \"\",\n \"state\": \"\",\n \"updateTime\": \"\"\n },\n \"state\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/:parent/assets",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'createTime' => '',
'description' => '',
'discoverySpec' => [
'csvOptions' => [
'delimiter' => '',
'disableTypeInference' => null,
'encoding' => '',
'headerRows' => 0
],
'enabled' => null,
'excludePatterns' => [
],
'includePatterns' => [
],
'jsonOptions' => [
'disableTypeInference' => null,
'encoding' => ''
],
'schedule' => ''
],
'discoveryStatus' => [
'lastRunDuration' => '',
'lastRunTime' => '',
'message' => '',
'state' => '',
'stats' => [
'dataItems' => '',
'dataSize' => '',
'filesets' => '',
'tables' => ''
],
'updateTime' => ''
],
'displayName' => '',
'labels' => [
],
'name' => '',
'resourceSpec' => [
'name' => '',
'readAccessMode' => '',
'type' => ''
],
'resourceStatus' => [
'managedAccessIdentity' => '',
'message' => '',
'state' => '',
'updateTime' => ''
],
'securityStatus' => [
'message' => '',
'state' => '',
'updateTime' => ''
],
'state' => '',
'uid' => '',
'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}}/v1/:parent/assets', [
'body' => '{
"createTime": "",
"description": "",
"discoverySpec": {
"csvOptions": {
"delimiter": "",
"disableTypeInference": false,
"encoding": "",
"headerRows": 0
},
"enabled": false,
"excludePatterns": [],
"includePatterns": [],
"jsonOptions": {
"disableTypeInference": false,
"encoding": ""
},
"schedule": ""
},
"discoveryStatus": {
"lastRunDuration": "",
"lastRunTime": "",
"message": "",
"state": "",
"stats": {
"dataItems": "",
"dataSize": "",
"filesets": "",
"tables": ""
},
"updateTime": ""
},
"displayName": "",
"labels": {},
"name": "",
"resourceSpec": {
"name": "",
"readAccessMode": "",
"type": ""
},
"resourceStatus": {
"managedAccessIdentity": "",
"message": "",
"state": "",
"updateTime": ""
},
"securityStatus": {
"message": "",
"state": "",
"updateTime": ""
},
"state": "",
"uid": "",
"updateTime": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1/:parent/assets');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'createTime' => '',
'description' => '',
'discoverySpec' => [
'csvOptions' => [
'delimiter' => '',
'disableTypeInference' => null,
'encoding' => '',
'headerRows' => 0
],
'enabled' => null,
'excludePatterns' => [
],
'includePatterns' => [
],
'jsonOptions' => [
'disableTypeInference' => null,
'encoding' => ''
],
'schedule' => ''
],
'discoveryStatus' => [
'lastRunDuration' => '',
'lastRunTime' => '',
'message' => '',
'state' => '',
'stats' => [
'dataItems' => '',
'dataSize' => '',
'filesets' => '',
'tables' => ''
],
'updateTime' => ''
],
'displayName' => '',
'labels' => [
],
'name' => '',
'resourceSpec' => [
'name' => '',
'readAccessMode' => '',
'type' => ''
],
'resourceStatus' => [
'managedAccessIdentity' => '',
'message' => '',
'state' => '',
'updateTime' => ''
],
'securityStatus' => [
'message' => '',
'state' => '',
'updateTime' => ''
],
'state' => '',
'uid' => '',
'updateTime' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'createTime' => '',
'description' => '',
'discoverySpec' => [
'csvOptions' => [
'delimiter' => '',
'disableTypeInference' => null,
'encoding' => '',
'headerRows' => 0
],
'enabled' => null,
'excludePatterns' => [
],
'includePatterns' => [
],
'jsonOptions' => [
'disableTypeInference' => null,
'encoding' => ''
],
'schedule' => ''
],
'discoveryStatus' => [
'lastRunDuration' => '',
'lastRunTime' => '',
'message' => '',
'state' => '',
'stats' => [
'dataItems' => '',
'dataSize' => '',
'filesets' => '',
'tables' => ''
],
'updateTime' => ''
],
'displayName' => '',
'labels' => [
],
'name' => '',
'resourceSpec' => [
'name' => '',
'readAccessMode' => '',
'type' => ''
],
'resourceStatus' => [
'managedAccessIdentity' => '',
'message' => '',
'state' => '',
'updateTime' => ''
],
'securityStatus' => [
'message' => '',
'state' => '',
'updateTime' => ''
],
'state' => '',
'uid' => '',
'updateTime' => ''
]));
$request->setRequestUrl('{{baseUrl}}/v1/:parent/assets');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:parent/assets' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"createTime": "",
"description": "",
"discoverySpec": {
"csvOptions": {
"delimiter": "",
"disableTypeInference": false,
"encoding": "",
"headerRows": 0
},
"enabled": false,
"excludePatterns": [],
"includePatterns": [],
"jsonOptions": {
"disableTypeInference": false,
"encoding": ""
},
"schedule": ""
},
"discoveryStatus": {
"lastRunDuration": "",
"lastRunTime": "",
"message": "",
"state": "",
"stats": {
"dataItems": "",
"dataSize": "",
"filesets": "",
"tables": ""
},
"updateTime": ""
},
"displayName": "",
"labels": {},
"name": "",
"resourceSpec": {
"name": "",
"readAccessMode": "",
"type": ""
},
"resourceStatus": {
"managedAccessIdentity": "",
"message": "",
"state": "",
"updateTime": ""
},
"securityStatus": {
"message": "",
"state": "",
"updateTime": ""
},
"state": "",
"uid": "",
"updateTime": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:parent/assets' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"createTime": "",
"description": "",
"discoverySpec": {
"csvOptions": {
"delimiter": "",
"disableTypeInference": false,
"encoding": "",
"headerRows": 0
},
"enabled": false,
"excludePatterns": [],
"includePatterns": [],
"jsonOptions": {
"disableTypeInference": false,
"encoding": ""
},
"schedule": ""
},
"discoveryStatus": {
"lastRunDuration": "",
"lastRunTime": "",
"message": "",
"state": "",
"stats": {
"dataItems": "",
"dataSize": "",
"filesets": "",
"tables": ""
},
"updateTime": ""
},
"displayName": "",
"labels": {},
"name": "",
"resourceSpec": {
"name": "",
"readAccessMode": "",
"type": ""
},
"resourceStatus": {
"managedAccessIdentity": "",
"message": "",
"state": "",
"updateTime": ""
},
"securityStatus": {
"message": "",
"state": "",
"updateTime": ""
},
"state": "",
"uid": "",
"updateTime": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"createTime\": \"\",\n \"description\": \"\",\n \"discoverySpec\": {\n \"csvOptions\": {\n \"delimiter\": \"\",\n \"disableTypeInference\": false,\n \"encoding\": \"\",\n \"headerRows\": 0\n },\n \"enabled\": false,\n \"excludePatterns\": [],\n \"includePatterns\": [],\n \"jsonOptions\": {\n \"disableTypeInference\": false,\n \"encoding\": \"\"\n },\n \"schedule\": \"\"\n },\n \"discoveryStatus\": {\n \"lastRunDuration\": \"\",\n \"lastRunTime\": \"\",\n \"message\": \"\",\n \"state\": \"\",\n \"stats\": {\n \"dataItems\": \"\",\n \"dataSize\": \"\",\n \"filesets\": \"\",\n \"tables\": \"\"\n },\n \"updateTime\": \"\"\n },\n \"displayName\": \"\",\n \"labels\": {},\n \"name\": \"\",\n \"resourceSpec\": {\n \"name\": \"\",\n \"readAccessMode\": \"\",\n \"type\": \"\"\n },\n \"resourceStatus\": {\n \"managedAccessIdentity\": \"\",\n \"message\": \"\",\n \"state\": \"\",\n \"updateTime\": \"\"\n },\n \"securityStatus\": {\n \"message\": \"\",\n \"state\": \"\",\n \"updateTime\": \"\"\n },\n \"state\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1/:parent/assets", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/:parent/assets"
payload = {
"createTime": "",
"description": "",
"discoverySpec": {
"csvOptions": {
"delimiter": "",
"disableTypeInference": False,
"encoding": "",
"headerRows": 0
},
"enabled": False,
"excludePatterns": [],
"includePatterns": [],
"jsonOptions": {
"disableTypeInference": False,
"encoding": ""
},
"schedule": ""
},
"discoveryStatus": {
"lastRunDuration": "",
"lastRunTime": "",
"message": "",
"state": "",
"stats": {
"dataItems": "",
"dataSize": "",
"filesets": "",
"tables": ""
},
"updateTime": ""
},
"displayName": "",
"labels": {},
"name": "",
"resourceSpec": {
"name": "",
"readAccessMode": "",
"type": ""
},
"resourceStatus": {
"managedAccessIdentity": "",
"message": "",
"state": "",
"updateTime": ""
},
"securityStatus": {
"message": "",
"state": "",
"updateTime": ""
},
"state": "",
"uid": "",
"updateTime": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/:parent/assets"
payload <- "{\n \"createTime\": \"\",\n \"description\": \"\",\n \"discoverySpec\": {\n \"csvOptions\": {\n \"delimiter\": \"\",\n \"disableTypeInference\": false,\n \"encoding\": \"\",\n \"headerRows\": 0\n },\n \"enabled\": false,\n \"excludePatterns\": [],\n \"includePatterns\": [],\n \"jsonOptions\": {\n \"disableTypeInference\": false,\n \"encoding\": \"\"\n },\n \"schedule\": \"\"\n },\n \"discoveryStatus\": {\n \"lastRunDuration\": \"\",\n \"lastRunTime\": \"\",\n \"message\": \"\",\n \"state\": \"\",\n \"stats\": {\n \"dataItems\": \"\",\n \"dataSize\": \"\",\n \"filesets\": \"\",\n \"tables\": \"\"\n },\n \"updateTime\": \"\"\n },\n \"displayName\": \"\",\n \"labels\": {},\n \"name\": \"\",\n \"resourceSpec\": {\n \"name\": \"\",\n \"readAccessMode\": \"\",\n \"type\": \"\"\n },\n \"resourceStatus\": {\n \"managedAccessIdentity\": \"\",\n \"message\": \"\",\n \"state\": \"\",\n \"updateTime\": \"\"\n },\n \"securityStatus\": {\n \"message\": \"\",\n \"state\": \"\",\n \"updateTime\": \"\"\n },\n \"state\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/:parent/assets")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"createTime\": \"\",\n \"description\": \"\",\n \"discoverySpec\": {\n \"csvOptions\": {\n \"delimiter\": \"\",\n \"disableTypeInference\": false,\n \"encoding\": \"\",\n \"headerRows\": 0\n },\n \"enabled\": false,\n \"excludePatterns\": [],\n \"includePatterns\": [],\n \"jsonOptions\": {\n \"disableTypeInference\": false,\n \"encoding\": \"\"\n },\n \"schedule\": \"\"\n },\n \"discoveryStatus\": {\n \"lastRunDuration\": \"\",\n \"lastRunTime\": \"\",\n \"message\": \"\",\n \"state\": \"\",\n \"stats\": {\n \"dataItems\": \"\",\n \"dataSize\": \"\",\n \"filesets\": \"\",\n \"tables\": \"\"\n },\n \"updateTime\": \"\"\n },\n \"displayName\": \"\",\n \"labels\": {},\n \"name\": \"\",\n \"resourceSpec\": {\n \"name\": \"\",\n \"readAccessMode\": \"\",\n \"type\": \"\"\n },\n \"resourceStatus\": {\n \"managedAccessIdentity\": \"\",\n \"message\": \"\",\n \"state\": \"\",\n \"updateTime\": \"\"\n },\n \"securityStatus\": {\n \"message\": \"\",\n \"state\": \"\",\n \"updateTime\": \"\"\n },\n \"state\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/v1/:parent/assets') do |req|
req.body = "{\n \"createTime\": \"\",\n \"description\": \"\",\n \"discoverySpec\": {\n \"csvOptions\": {\n \"delimiter\": \"\",\n \"disableTypeInference\": false,\n \"encoding\": \"\",\n \"headerRows\": 0\n },\n \"enabled\": false,\n \"excludePatterns\": [],\n \"includePatterns\": [],\n \"jsonOptions\": {\n \"disableTypeInference\": false,\n \"encoding\": \"\"\n },\n \"schedule\": \"\"\n },\n \"discoveryStatus\": {\n \"lastRunDuration\": \"\",\n \"lastRunTime\": \"\",\n \"message\": \"\",\n \"state\": \"\",\n \"stats\": {\n \"dataItems\": \"\",\n \"dataSize\": \"\",\n \"filesets\": \"\",\n \"tables\": \"\"\n },\n \"updateTime\": \"\"\n },\n \"displayName\": \"\",\n \"labels\": {},\n \"name\": \"\",\n \"resourceSpec\": {\n \"name\": \"\",\n \"readAccessMode\": \"\",\n \"type\": \"\"\n },\n \"resourceStatus\": {\n \"managedAccessIdentity\": \"\",\n \"message\": \"\",\n \"state\": \"\",\n \"updateTime\": \"\"\n },\n \"securityStatus\": {\n \"message\": \"\",\n \"state\": \"\",\n \"updateTime\": \"\"\n },\n \"state\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/:parent/assets";
let payload = json!({
"createTime": "",
"description": "",
"discoverySpec": json!({
"csvOptions": json!({
"delimiter": "",
"disableTypeInference": false,
"encoding": "",
"headerRows": 0
}),
"enabled": false,
"excludePatterns": (),
"includePatterns": (),
"jsonOptions": json!({
"disableTypeInference": false,
"encoding": ""
}),
"schedule": ""
}),
"discoveryStatus": json!({
"lastRunDuration": "",
"lastRunTime": "",
"message": "",
"state": "",
"stats": json!({
"dataItems": "",
"dataSize": "",
"filesets": "",
"tables": ""
}),
"updateTime": ""
}),
"displayName": "",
"labels": json!({}),
"name": "",
"resourceSpec": json!({
"name": "",
"readAccessMode": "",
"type": ""
}),
"resourceStatus": json!({
"managedAccessIdentity": "",
"message": "",
"state": "",
"updateTime": ""
}),
"securityStatus": json!({
"message": "",
"state": "",
"updateTime": ""
}),
"state": "",
"uid": "",
"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}}/v1/:parent/assets \
--header 'content-type: application/json' \
--data '{
"createTime": "",
"description": "",
"discoverySpec": {
"csvOptions": {
"delimiter": "",
"disableTypeInference": false,
"encoding": "",
"headerRows": 0
},
"enabled": false,
"excludePatterns": [],
"includePatterns": [],
"jsonOptions": {
"disableTypeInference": false,
"encoding": ""
},
"schedule": ""
},
"discoveryStatus": {
"lastRunDuration": "",
"lastRunTime": "",
"message": "",
"state": "",
"stats": {
"dataItems": "",
"dataSize": "",
"filesets": "",
"tables": ""
},
"updateTime": ""
},
"displayName": "",
"labels": {},
"name": "",
"resourceSpec": {
"name": "",
"readAccessMode": "",
"type": ""
},
"resourceStatus": {
"managedAccessIdentity": "",
"message": "",
"state": "",
"updateTime": ""
},
"securityStatus": {
"message": "",
"state": "",
"updateTime": ""
},
"state": "",
"uid": "",
"updateTime": ""
}'
echo '{
"createTime": "",
"description": "",
"discoverySpec": {
"csvOptions": {
"delimiter": "",
"disableTypeInference": false,
"encoding": "",
"headerRows": 0
},
"enabled": false,
"excludePatterns": [],
"includePatterns": [],
"jsonOptions": {
"disableTypeInference": false,
"encoding": ""
},
"schedule": ""
},
"discoveryStatus": {
"lastRunDuration": "",
"lastRunTime": "",
"message": "",
"state": "",
"stats": {
"dataItems": "",
"dataSize": "",
"filesets": "",
"tables": ""
},
"updateTime": ""
},
"displayName": "",
"labels": {},
"name": "",
"resourceSpec": {
"name": "",
"readAccessMode": "",
"type": ""
},
"resourceStatus": {
"managedAccessIdentity": "",
"message": "",
"state": "",
"updateTime": ""
},
"securityStatus": {
"message": "",
"state": "",
"updateTime": ""
},
"state": "",
"uid": "",
"updateTime": ""
}' | \
http POST {{baseUrl}}/v1/:parent/assets \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "createTime": "",\n "description": "",\n "discoverySpec": {\n "csvOptions": {\n "delimiter": "",\n "disableTypeInference": false,\n "encoding": "",\n "headerRows": 0\n },\n "enabled": false,\n "excludePatterns": [],\n "includePatterns": [],\n "jsonOptions": {\n "disableTypeInference": false,\n "encoding": ""\n },\n "schedule": ""\n },\n "discoveryStatus": {\n "lastRunDuration": "",\n "lastRunTime": "",\n "message": "",\n "state": "",\n "stats": {\n "dataItems": "",\n "dataSize": "",\n "filesets": "",\n "tables": ""\n },\n "updateTime": ""\n },\n "displayName": "",\n "labels": {},\n "name": "",\n "resourceSpec": {\n "name": "",\n "readAccessMode": "",\n "type": ""\n },\n "resourceStatus": {\n "managedAccessIdentity": "",\n "message": "",\n "state": "",\n "updateTime": ""\n },\n "securityStatus": {\n "message": "",\n "state": "",\n "updateTime": ""\n },\n "state": "",\n "uid": "",\n "updateTime": ""\n}' \
--output-document \
- {{baseUrl}}/v1/:parent/assets
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"createTime": "",
"description": "",
"discoverySpec": [
"csvOptions": [
"delimiter": "",
"disableTypeInference": false,
"encoding": "",
"headerRows": 0
],
"enabled": false,
"excludePatterns": [],
"includePatterns": [],
"jsonOptions": [
"disableTypeInference": false,
"encoding": ""
],
"schedule": ""
],
"discoveryStatus": [
"lastRunDuration": "",
"lastRunTime": "",
"message": "",
"state": "",
"stats": [
"dataItems": "",
"dataSize": "",
"filesets": "",
"tables": ""
],
"updateTime": ""
],
"displayName": "",
"labels": [],
"name": "",
"resourceSpec": [
"name": "",
"readAccessMode": "",
"type": ""
],
"resourceStatus": [
"managedAccessIdentity": "",
"message": "",
"state": "",
"updateTime": ""
],
"securityStatus": [
"message": "",
"state": "",
"updateTime": ""
],
"state": "",
"uid": "",
"updateTime": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:parent/assets")! 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
dataplex.projects.locations.lakes.zones.assets.getIamPolicy
{{baseUrl}}/v1/:resource:getIamPolicy
QUERY PARAMS
resource
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:resource:getIamPolicy");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v1/:resource:getIamPolicy")
require "http/client"
url = "{{baseUrl}}/v1/:resource:getIamPolicy"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/v1/:resource:getIamPolicy"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/:resource:getIamPolicy");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/:resource:getIamPolicy"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/v1/:resource:getIamPolicy HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1/:resource:getIamPolicy")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/:resource:getIamPolicy"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/:resource:getIamPolicy")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1/:resource:getIamPolicy")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/v1/:resource:getIamPolicy');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/v1/:resource:getIamPolicy'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/:resource:getIamPolicy';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/:resource:getIamPolicy',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1/:resource:getIamPolicy")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/:resource:getIamPolicy',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'GET', url: '{{baseUrl}}/v1/:resource:getIamPolicy'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v1/:resource:getIamPolicy');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {method: 'GET', url: '{{baseUrl}}/v1/:resource:getIamPolicy'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/:resource:getIamPolicy';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:resource:getIamPolicy"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/:resource:getIamPolicy" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/:resource:getIamPolicy",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/v1/:resource:getIamPolicy');
echo $response->getBody();
setUrl('{{baseUrl}}/v1/:resource:getIamPolicy');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/:resource:getIamPolicy');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:resource:getIamPolicy' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:resource:getIamPolicy' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v1/:resource:getIamPolicy")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/:resource:getIamPolicy"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/:resource:getIamPolicy"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/:resource:getIamPolicy")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/v1/:resource:getIamPolicy') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/:resource:getIamPolicy";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/v1/:resource:getIamPolicy
http GET {{baseUrl}}/v1/:resource:getIamPolicy
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v1/:resource:getIamPolicy
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:resource:getIamPolicy")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
dataplex.projects.locations.lakes.zones.assets.list
{{baseUrl}}/v1/:parent/assets
QUERY PARAMS
parent
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:parent/assets");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v1/:parent/assets")
require "http/client"
url = "{{baseUrl}}/v1/:parent/assets"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/v1/:parent/assets"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/:parent/assets");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/:parent/assets"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/v1/:parent/assets HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1/:parent/assets")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/:parent/assets"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/:parent/assets")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1/:parent/assets")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/v1/:parent/assets');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/v1/:parent/assets'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/:parent/assets';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/:parent/assets',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1/:parent/assets")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/:parent/assets',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'GET', url: '{{baseUrl}}/v1/:parent/assets'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v1/:parent/assets');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {method: 'GET', url: '{{baseUrl}}/v1/:parent/assets'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/:parent/assets';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:parent/assets"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/:parent/assets" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/:parent/assets",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/v1/:parent/assets');
echo $response->getBody();
setUrl('{{baseUrl}}/v1/:parent/assets');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/:parent/assets');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:parent/assets' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:parent/assets' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v1/:parent/assets")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/:parent/assets"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/:parent/assets"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/:parent/assets")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/v1/:parent/assets') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/:parent/assets";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/v1/:parent/assets
http GET {{baseUrl}}/v1/:parent/assets
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v1/:parent/assets
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:parent/assets")! 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
dataplex.projects.locations.lakes.zones.assets.patch
{{baseUrl}}/v1/:name
QUERY PARAMS
name
BODY json
{
"createTime": "",
"description": "",
"discoverySpec": {
"csvOptions": {
"delimiter": "",
"disableTypeInference": false,
"encoding": "",
"headerRows": 0
},
"enabled": false,
"excludePatterns": [],
"includePatterns": [],
"jsonOptions": {
"disableTypeInference": false,
"encoding": ""
},
"schedule": ""
},
"discoveryStatus": {
"lastRunDuration": "",
"lastRunTime": "",
"message": "",
"state": "",
"stats": {
"dataItems": "",
"dataSize": "",
"filesets": "",
"tables": ""
},
"updateTime": ""
},
"displayName": "",
"labels": {},
"name": "",
"resourceSpec": {
"name": "",
"readAccessMode": "",
"type": ""
},
"resourceStatus": {
"managedAccessIdentity": "",
"message": "",
"state": "",
"updateTime": ""
},
"securityStatus": {
"message": "",
"state": "",
"updateTime": ""
},
"state": "",
"uid": "",
"updateTime": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:name");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"createTime\": \"\",\n \"description\": \"\",\n \"discoverySpec\": {\n \"csvOptions\": {\n \"delimiter\": \"\",\n \"disableTypeInference\": false,\n \"encoding\": \"\",\n \"headerRows\": 0\n },\n \"enabled\": false,\n \"excludePatterns\": [],\n \"includePatterns\": [],\n \"jsonOptions\": {\n \"disableTypeInference\": false,\n \"encoding\": \"\"\n },\n \"schedule\": \"\"\n },\n \"discoveryStatus\": {\n \"lastRunDuration\": \"\",\n \"lastRunTime\": \"\",\n \"message\": \"\",\n \"state\": \"\",\n \"stats\": {\n \"dataItems\": \"\",\n \"dataSize\": \"\",\n \"filesets\": \"\",\n \"tables\": \"\"\n },\n \"updateTime\": \"\"\n },\n \"displayName\": \"\",\n \"labels\": {},\n \"name\": \"\",\n \"resourceSpec\": {\n \"name\": \"\",\n \"readAccessMode\": \"\",\n \"type\": \"\"\n },\n \"resourceStatus\": {\n \"managedAccessIdentity\": \"\",\n \"message\": \"\",\n \"state\": \"\",\n \"updateTime\": \"\"\n },\n \"securityStatus\": {\n \"message\": \"\",\n \"state\": \"\",\n \"updateTime\": \"\"\n },\n \"state\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/patch "{{baseUrl}}/v1/:name" {:content-type :json
:form-params {:createTime ""
:description ""
:discoverySpec {:csvOptions {:delimiter ""
:disableTypeInference false
:encoding ""
:headerRows 0}
:enabled false
:excludePatterns []
:includePatterns []
:jsonOptions {:disableTypeInference false
:encoding ""}
:schedule ""}
:discoveryStatus {:lastRunDuration ""
:lastRunTime ""
:message ""
:state ""
:stats {:dataItems ""
:dataSize ""
:filesets ""
:tables ""}
:updateTime ""}
:displayName ""
:labels {}
:name ""
:resourceSpec {:name ""
:readAccessMode ""
:type ""}
:resourceStatus {:managedAccessIdentity ""
:message ""
:state ""
:updateTime ""}
:securityStatus {:message ""
:state ""
:updateTime ""}
:state ""
:uid ""
:updateTime ""}})
require "http/client"
url = "{{baseUrl}}/v1/:name"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"createTime\": \"\",\n \"description\": \"\",\n \"discoverySpec\": {\n \"csvOptions\": {\n \"delimiter\": \"\",\n \"disableTypeInference\": false,\n \"encoding\": \"\",\n \"headerRows\": 0\n },\n \"enabled\": false,\n \"excludePatterns\": [],\n \"includePatterns\": [],\n \"jsonOptions\": {\n \"disableTypeInference\": false,\n \"encoding\": \"\"\n },\n \"schedule\": \"\"\n },\n \"discoveryStatus\": {\n \"lastRunDuration\": \"\",\n \"lastRunTime\": \"\",\n \"message\": \"\",\n \"state\": \"\",\n \"stats\": {\n \"dataItems\": \"\",\n \"dataSize\": \"\",\n \"filesets\": \"\",\n \"tables\": \"\"\n },\n \"updateTime\": \"\"\n },\n \"displayName\": \"\",\n \"labels\": {},\n \"name\": \"\",\n \"resourceSpec\": {\n \"name\": \"\",\n \"readAccessMode\": \"\",\n \"type\": \"\"\n },\n \"resourceStatus\": {\n \"managedAccessIdentity\": \"\",\n \"message\": \"\",\n \"state\": \"\",\n \"updateTime\": \"\"\n },\n \"securityStatus\": {\n \"message\": \"\",\n \"state\": \"\",\n \"updateTime\": \"\"\n },\n \"state\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}"
response = HTTP::Client.patch url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Patch,
RequestUri = new Uri("{{baseUrl}}/v1/:name"),
Content = new StringContent("{\n \"createTime\": \"\",\n \"description\": \"\",\n \"discoverySpec\": {\n \"csvOptions\": {\n \"delimiter\": \"\",\n \"disableTypeInference\": false,\n \"encoding\": \"\",\n \"headerRows\": 0\n },\n \"enabled\": false,\n \"excludePatterns\": [],\n \"includePatterns\": [],\n \"jsonOptions\": {\n \"disableTypeInference\": false,\n \"encoding\": \"\"\n },\n \"schedule\": \"\"\n },\n \"discoveryStatus\": {\n \"lastRunDuration\": \"\",\n \"lastRunTime\": \"\",\n \"message\": \"\",\n \"state\": \"\",\n \"stats\": {\n \"dataItems\": \"\",\n \"dataSize\": \"\",\n \"filesets\": \"\",\n \"tables\": \"\"\n },\n \"updateTime\": \"\"\n },\n \"displayName\": \"\",\n \"labels\": {},\n \"name\": \"\",\n \"resourceSpec\": {\n \"name\": \"\",\n \"readAccessMode\": \"\",\n \"type\": \"\"\n },\n \"resourceStatus\": {\n \"managedAccessIdentity\": \"\",\n \"message\": \"\",\n \"state\": \"\",\n \"updateTime\": \"\"\n },\n \"securityStatus\": {\n \"message\": \"\",\n \"state\": \"\",\n \"updateTime\": \"\"\n },\n \"state\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/:name");
var request = new RestRequest("", Method.Patch);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"createTime\": \"\",\n \"description\": \"\",\n \"discoverySpec\": {\n \"csvOptions\": {\n \"delimiter\": \"\",\n \"disableTypeInference\": false,\n \"encoding\": \"\",\n \"headerRows\": 0\n },\n \"enabled\": false,\n \"excludePatterns\": [],\n \"includePatterns\": [],\n \"jsonOptions\": {\n \"disableTypeInference\": false,\n \"encoding\": \"\"\n },\n \"schedule\": \"\"\n },\n \"discoveryStatus\": {\n \"lastRunDuration\": \"\",\n \"lastRunTime\": \"\",\n \"message\": \"\",\n \"state\": \"\",\n \"stats\": {\n \"dataItems\": \"\",\n \"dataSize\": \"\",\n \"filesets\": \"\",\n \"tables\": \"\"\n },\n \"updateTime\": \"\"\n },\n \"displayName\": \"\",\n \"labels\": {},\n \"name\": \"\",\n \"resourceSpec\": {\n \"name\": \"\",\n \"readAccessMode\": \"\",\n \"type\": \"\"\n },\n \"resourceStatus\": {\n \"managedAccessIdentity\": \"\",\n \"message\": \"\",\n \"state\": \"\",\n \"updateTime\": \"\"\n },\n \"securityStatus\": {\n \"message\": \"\",\n \"state\": \"\",\n \"updateTime\": \"\"\n },\n \"state\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/:name"
payload := strings.NewReader("{\n \"createTime\": \"\",\n \"description\": \"\",\n \"discoverySpec\": {\n \"csvOptions\": {\n \"delimiter\": \"\",\n \"disableTypeInference\": false,\n \"encoding\": \"\",\n \"headerRows\": 0\n },\n \"enabled\": false,\n \"excludePatterns\": [],\n \"includePatterns\": [],\n \"jsonOptions\": {\n \"disableTypeInference\": false,\n \"encoding\": \"\"\n },\n \"schedule\": \"\"\n },\n \"discoveryStatus\": {\n \"lastRunDuration\": \"\",\n \"lastRunTime\": \"\",\n \"message\": \"\",\n \"state\": \"\",\n \"stats\": {\n \"dataItems\": \"\",\n \"dataSize\": \"\",\n \"filesets\": \"\",\n \"tables\": \"\"\n },\n \"updateTime\": \"\"\n },\n \"displayName\": \"\",\n \"labels\": {},\n \"name\": \"\",\n \"resourceSpec\": {\n \"name\": \"\",\n \"readAccessMode\": \"\",\n \"type\": \"\"\n },\n \"resourceStatus\": {\n \"managedAccessIdentity\": \"\",\n \"message\": \"\",\n \"state\": \"\",\n \"updateTime\": \"\"\n },\n \"securityStatus\": {\n \"message\": \"\",\n \"state\": \"\",\n \"updateTime\": \"\"\n },\n \"state\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
PATCH /baseUrl/v1/:name HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 1006
{
"createTime": "",
"description": "",
"discoverySpec": {
"csvOptions": {
"delimiter": "",
"disableTypeInference": false,
"encoding": "",
"headerRows": 0
},
"enabled": false,
"excludePatterns": [],
"includePatterns": [],
"jsonOptions": {
"disableTypeInference": false,
"encoding": ""
},
"schedule": ""
},
"discoveryStatus": {
"lastRunDuration": "",
"lastRunTime": "",
"message": "",
"state": "",
"stats": {
"dataItems": "",
"dataSize": "",
"filesets": "",
"tables": ""
},
"updateTime": ""
},
"displayName": "",
"labels": {},
"name": "",
"resourceSpec": {
"name": "",
"readAccessMode": "",
"type": ""
},
"resourceStatus": {
"managedAccessIdentity": "",
"message": "",
"state": "",
"updateTime": ""
},
"securityStatus": {
"message": "",
"state": "",
"updateTime": ""
},
"state": "",
"uid": "",
"updateTime": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/v1/:name")
.setHeader("content-type", "application/json")
.setBody("{\n \"createTime\": \"\",\n \"description\": \"\",\n \"discoverySpec\": {\n \"csvOptions\": {\n \"delimiter\": \"\",\n \"disableTypeInference\": false,\n \"encoding\": \"\",\n \"headerRows\": 0\n },\n \"enabled\": false,\n \"excludePatterns\": [],\n \"includePatterns\": [],\n \"jsonOptions\": {\n \"disableTypeInference\": false,\n \"encoding\": \"\"\n },\n \"schedule\": \"\"\n },\n \"discoveryStatus\": {\n \"lastRunDuration\": \"\",\n \"lastRunTime\": \"\",\n \"message\": \"\",\n \"state\": \"\",\n \"stats\": {\n \"dataItems\": \"\",\n \"dataSize\": \"\",\n \"filesets\": \"\",\n \"tables\": \"\"\n },\n \"updateTime\": \"\"\n },\n \"displayName\": \"\",\n \"labels\": {},\n \"name\": \"\",\n \"resourceSpec\": {\n \"name\": \"\",\n \"readAccessMode\": \"\",\n \"type\": \"\"\n },\n \"resourceStatus\": {\n \"managedAccessIdentity\": \"\",\n \"message\": \"\",\n \"state\": \"\",\n \"updateTime\": \"\"\n },\n \"securityStatus\": {\n \"message\": \"\",\n \"state\": \"\",\n \"updateTime\": \"\"\n },\n \"state\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/:name"))
.header("content-type", "application/json")
.method("PATCH", HttpRequest.BodyPublishers.ofString("{\n \"createTime\": \"\",\n \"description\": \"\",\n \"discoverySpec\": {\n \"csvOptions\": {\n \"delimiter\": \"\",\n \"disableTypeInference\": false,\n \"encoding\": \"\",\n \"headerRows\": 0\n },\n \"enabled\": false,\n \"excludePatterns\": [],\n \"includePatterns\": [],\n \"jsonOptions\": {\n \"disableTypeInference\": false,\n \"encoding\": \"\"\n },\n \"schedule\": \"\"\n },\n \"discoveryStatus\": {\n \"lastRunDuration\": \"\",\n \"lastRunTime\": \"\",\n \"message\": \"\",\n \"state\": \"\",\n \"stats\": {\n \"dataItems\": \"\",\n \"dataSize\": \"\",\n \"filesets\": \"\",\n \"tables\": \"\"\n },\n \"updateTime\": \"\"\n },\n \"displayName\": \"\",\n \"labels\": {},\n \"name\": \"\",\n \"resourceSpec\": {\n \"name\": \"\",\n \"readAccessMode\": \"\",\n \"type\": \"\"\n },\n \"resourceStatus\": {\n \"managedAccessIdentity\": \"\",\n \"message\": \"\",\n \"state\": \"\",\n \"updateTime\": \"\"\n },\n \"securityStatus\": {\n \"message\": \"\",\n \"state\": \"\",\n \"updateTime\": \"\"\n },\n \"state\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"createTime\": \"\",\n \"description\": \"\",\n \"discoverySpec\": {\n \"csvOptions\": {\n \"delimiter\": \"\",\n \"disableTypeInference\": false,\n \"encoding\": \"\",\n \"headerRows\": 0\n },\n \"enabled\": false,\n \"excludePatterns\": [],\n \"includePatterns\": [],\n \"jsonOptions\": {\n \"disableTypeInference\": false,\n \"encoding\": \"\"\n },\n \"schedule\": \"\"\n },\n \"discoveryStatus\": {\n \"lastRunDuration\": \"\",\n \"lastRunTime\": \"\",\n \"message\": \"\",\n \"state\": \"\",\n \"stats\": {\n \"dataItems\": \"\",\n \"dataSize\": \"\",\n \"filesets\": \"\",\n \"tables\": \"\"\n },\n \"updateTime\": \"\"\n },\n \"displayName\": \"\",\n \"labels\": {},\n \"name\": \"\",\n \"resourceSpec\": {\n \"name\": \"\",\n \"readAccessMode\": \"\",\n \"type\": \"\"\n },\n \"resourceStatus\": {\n \"managedAccessIdentity\": \"\",\n \"message\": \"\",\n \"state\": \"\",\n \"updateTime\": \"\"\n },\n \"securityStatus\": {\n \"message\": \"\",\n \"state\": \"\",\n \"updateTime\": \"\"\n },\n \"state\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/:name")
.patch(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/v1/:name")
.header("content-type", "application/json")
.body("{\n \"createTime\": \"\",\n \"description\": \"\",\n \"discoverySpec\": {\n \"csvOptions\": {\n \"delimiter\": \"\",\n \"disableTypeInference\": false,\n \"encoding\": \"\",\n \"headerRows\": 0\n },\n \"enabled\": false,\n \"excludePatterns\": [],\n \"includePatterns\": [],\n \"jsonOptions\": {\n \"disableTypeInference\": false,\n \"encoding\": \"\"\n },\n \"schedule\": \"\"\n },\n \"discoveryStatus\": {\n \"lastRunDuration\": \"\",\n \"lastRunTime\": \"\",\n \"message\": \"\",\n \"state\": \"\",\n \"stats\": {\n \"dataItems\": \"\",\n \"dataSize\": \"\",\n \"filesets\": \"\",\n \"tables\": \"\"\n },\n \"updateTime\": \"\"\n },\n \"displayName\": \"\",\n \"labels\": {},\n \"name\": \"\",\n \"resourceSpec\": {\n \"name\": \"\",\n \"readAccessMode\": \"\",\n \"type\": \"\"\n },\n \"resourceStatus\": {\n \"managedAccessIdentity\": \"\",\n \"message\": \"\",\n \"state\": \"\",\n \"updateTime\": \"\"\n },\n \"securityStatus\": {\n \"message\": \"\",\n \"state\": \"\",\n \"updateTime\": \"\"\n },\n \"state\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}")
.asString();
const data = JSON.stringify({
createTime: '',
description: '',
discoverySpec: {
csvOptions: {
delimiter: '',
disableTypeInference: false,
encoding: '',
headerRows: 0
},
enabled: false,
excludePatterns: [],
includePatterns: [],
jsonOptions: {
disableTypeInference: false,
encoding: ''
},
schedule: ''
},
discoveryStatus: {
lastRunDuration: '',
lastRunTime: '',
message: '',
state: '',
stats: {
dataItems: '',
dataSize: '',
filesets: '',
tables: ''
},
updateTime: ''
},
displayName: '',
labels: {},
name: '',
resourceSpec: {
name: '',
readAccessMode: '',
type: ''
},
resourceStatus: {
managedAccessIdentity: '',
message: '',
state: '',
updateTime: ''
},
securityStatus: {
message: '',
state: '',
updateTime: ''
},
state: '',
uid: '',
updateTime: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PATCH', '{{baseUrl}}/v1/:name');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PATCH',
url: '{{baseUrl}}/v1/:name',
headers: {'content-type': 'application/json'},
data: {
createTime: '',
description: '',
discoverySpec: {
csvOptions: {delimiter: '', disableTypeInference: false, encoding: '', headerRows: 0},
enabled: false,
excludePatterns: [],
includePatterns: [],
jsonOptions: {disableTypeInference: false, encoding: ''},
schedule: ''
},
discoveryStatus: {
lastRunDuration: '',
lastRunTime: '',
message: '',
state: '',
stats: {dataItems: '', dataSize: '', filesets: '', tables: ''},
updateTime: ''
},
displayName: '',
labels: {},
name: '',
resourceSpec: {name: '', readAccessMode: '', type: ''},
resourceStatus: {managedAccessIdentity: '', message: '', state: '', updateTime: ''},
securityStatus: {message: '', state: '', updateTime: ''},
state: '',
uid: '',
updateTime: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/:name';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"createTime":"","description":"","discoverySpec":{"csvOptions":{"delimiter":"","disableTypeInference":false,"encoding":"","headerRows":0},"enabled":false,"excludePatterns":[],"includePatterns":[],"jsonOptions":{"disableTypeInference":false,"encoding":""},"schedule":""},"discoveryStatus":{"lastRunDuration":"","lastRunTime":"","message":"","state":"","stats":{"dataItems":"","dataSize":"","filesets":"","tables":""},"updateTime":""},"displayName":"","labels":{},"name":"","resourceSpec":{"name":"","readAccessMode":"","type":""},"resourceStatus":{"managedAccessIdentity":"","message":"","state":"","updateTime":""},"securityStatus":{"message":"","state":"","updateTime":""},"state":"","uid":"","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}}/v1/:name',
method: 'PATCH',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "createTime": "",\n "description": "",\n "discoverySpec": {\n "csvOptions": {\n "delimiter": "",\n "disableTypeInference": false,\n "encoding": "",\n "headerRows": 0\n },\n "enabled": false,\n "excludePatterns": [],\n "includePatterns": [],\n "jsonOptions": {\n "disableTypeInference": false,\n "encoding": ""\n },\n "schedule": ""\n },\n "discoveryStatus": {\n "lastRunDuration": "",\n "lastRunTime": "",\n "message": "",\n "state": "",\n "stats": {\n "dataItems": "",\n "dataSize": "",\n "filesets": "",\n "tables": ""\n },\n "updateTime": ""\n },\n "displayName": "",\n "labels": {},\n "name": "",\n "resourceSpec": {\n "name": "",\n "readAccessMode": "",\n "type": ""\n },\n "resourceStatus": {\n "managedAccessIdentity": "",\n "message": "",\n "state": "",\n "updateTime": ""\n },\n "securityStatus": {\n "message": "",\n "state": "",\n "updateTime": ""\n },\n "state": "",\n "uid": "",\n "updateTime": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"createTime\": \"\",\n \"description\": \"\",\n \"discoverySpec\": {\n \"csvOptions\": {\n \"delimiter\": \"\",\n \"disableTypeInference\": false,\n \"encoding\": \"\",\n \"headerRows\": 0\n },\n \"enabled\": false,\n \"excludePatterns\": [],\n \"includePatterns\": [],\n \"jsonOptions\": {\n \"disableTypeInference\": false,\n \"encoding\": \"\"\n },\n \"schedule\": \"\"\n },\n \"discoveryStatus\": {\n \"lastRunDuration\": \"\",\n \"lastRunTime\": \"\",\n \"message\": \"\",\n \"state\": \"\",\n \"stats\": {\n \"dataItems\": \"\",\n \"dataSize\": \"\",\n \"filesets\": \"\",\n \"tables\": \"\"\n },\n \"updateTime\": \"\"\n },\n \"displayName\": \"\",\n \"labels\": {},\n \"name\": \"\",\n \"resourceSpec\": {\n \"name\": \"\",\n \"readAccessMode\": \"\",\n \"type\": \"\"\n },\n \"resourceStatus\": {\n \"managedAccessIdentity\": \"\",\n \"message\": \"\",\n \"state\": \"\",\n \"updateTime\": \"\"\n },\n \"securityStatus\": {\n \"message\": \"\",\n \"state\": \"\",\n \"updateTime\": \"\"\n },\n \"state\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1/:name")
.patch(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PATCH',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/:name',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
createTime: '',
description: '',
discoverySpec: {
csvOptions: {delimiter: '', disableTypeInference: false, encoding: '', headerRows: 0},
enabled: false,
excludePatterns: [],
includePatterns: [],
jsonOptions: {disableTypeInference: false, encoding: ''},
schedule: ''
},
discoveryStatus: {
lastRunDuration: '',
lastRunTime: '',
message: '',
state: '',
stats: {dataItems: '', dataSize: '', filesets: '', tables: ''},
updateTime: ''
},
displayName: '',
labels: {},
name: '',
resourceSpec: {name: '', readAccessMode: '', type: ''},
resourceStatus: {managedAccessIdentity: '', message: '', state: '', updateTime: ''},
securityStatus: {message: '', state: '', updateTime: ''},
state: '',
uid: '',
updateTime: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PATCH',
url: '{{baseUrl}}/v1/:name',
headers: {'content-type': 'application/json'},
body: {
createTime: '',
description: '',
discoverySpec: {
csvOptions: {delimiter: '', disableTypeInference: false, encoding: '', headerRows: 0},
enabled: false,
excludePatterns: [],
includePatterns: [],
jsonOptions: {disableTypeInference: false, encoding: ''},
schedule: ''
},
discoveryStatus: {
lastRunDuration: '',
lastRunTime: '',
message: '',
state: '',
stats: {dataItems: '', dataSize: '', filesets: '', tables: ''},
updateTime: ''
},
displayName: '',
labels: {},
name: '',
resourceSpec: {name: '', readAccessMode: '', type: ''},
resourceStatus: {managedAccessIdentity: '', message: '', state: '', updateTime: ''},
securityStatus: {message: '', state: '', updateTime: ''},
state: '',
uid: '',
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('PATCH', '{{baseUrl}}/v1/:name');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
createTime: '',
description: '',
discoverySpec: {
csvOptions: {
delimiter: '',
disableTypeInference: false,
encoding: '',
headerRows: 0
},
enabled: false,
excludePatterns: [],
includePatterns: [],
jsonOptions: {
disableTypeInference: false,
encoding: ''
},
schedule: ''
},
discoveryStatus: {
lastRunDuration: '',
lastRunTime: '',
message: '',
state: '',
stats: {
dataItems: '',
dataSize: '',
filesets: '',
tables: ''
},
updateTime: ''
},
displayName: '',
labels: {},
name: '',
resourceSpec: {
name: '',
readAccessMode: '',
type: ''
},
resourceStatus: {
managedAccessIdentity: '',
message: '',
state: '',
updateTime: ''
},
securityStatus: {
message: '',
state: '',
updateTime: ''
},
state: '',
uid: '',
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: 'PATCH',
url: '{{baseUrl}}/v1/:name',
headers: {'content-type': 'application/json'},
data: {
createTime: '',
description: '',
discoverySpec: {
csvOptions: {delimiter: '', disableTypeInference: false, encoding: '', headerRows: 0},
enabled: false,
excludePatterns: [],
includePatterns: [],
jsonOptions: {disableTypeInference: false, encoding: ''},
schedule: ''
},
discoveryStatus: {
lastRunDuration: '',
lastRunTime: '',
message: '',
state: '',
stats: {dataItems: '', dataSize: '', filesets: '', tables: ''},
updateTime: ''
},
displayName: '',
labels: {},
name: '',
resourceSpec: {name: '', readAccessMode: '', type: ''},
resourceStatus: {managedAccessIdentity: '', message: '', state: '', updateTime: ''},
securityStatus: {message: '', state: '', updateTime: ''},
state: '',
uid: '',
updateTime: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/:name';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"createTime":"","description":"","discoverySpec":{"csvOptions":{"delimiter":"","disableTypeInference":false,"encoding":"","headerRows":0},"enabled":false,"excludePatterns":[],"includePatterns":[],"jsonOptions":{"disableTypeInference":false,"encoding":""},"schedule":""},"discoveryStatus":{"lastRunDuration":"","lastRunTime":"","message":"","state":"","stats":{"dataItems":"","dataSize":"","filesets":"","tables":""},"updateTime":""},"displayName":"","labels":{},"name":"","resourceSpec":{"name":"","readAccessMode":"","type":""},"resourceStatus":{"managedAccessIdentity":"","message":"","state":"","updateTime":""},"securityStatus":{"message":"","state":"","updateTime":""},"state":"","uid":"","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 = @{ @"createTime": @"",
@"description": @"",
@"discoverySpec": @{ @"csvOptions": @{ @"delimiter": @"", @"disableTypeInference": @NO, @"encoding": @"", @"headerRows": @0 }, @"enabled": @NO, @"excludePatterns": @[ ], @"includePatterns": @[ ], @"jsonOptions": @{ @"disableTypeInference": @NO, @"encoding": @"" }, @"schedule": @"" },
@"discoveryStatus": @{ @"lastRunDuration": @"", @"lastRunTime": @"", @"message": @"", @"state": @"", @"stats": @{ @"dataItems": @"", @"dataSize": @"", @"filesets": @"", @"tables": @"" }, @"updateTime": @"" },
@"displayName": @"",
@"labels": @{ },
@"name": @"",
@"resourceSpec": @{ @"name": @"", @"readAccessMode": @"", @"type": @"" },
@"resourceStatus": @{ @"managedAccessIdentity": @"", @"message": @"", @"state": @"", @"updateTime": @"" },
@"securityStatus": @{ @"message": @"", @"state": @"", @"updateTime": @"" },
@"state": @"",
@"uid": @"",
@"updateTime": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:name"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PATCH"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/:name" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"createTime\": \"\",\n \"description\": \"\",\n \"discoverySpec\": {\n \"csvOptions\": {\n \"delimiter\": \"\",\n \"disableTypeInference\": false,\n \"encoding\": \"\",\n \"headerRows\": 0\n },\n \"enabled\": false,\n \"excludePatterns\": [],\n \"includePatterns\": [],\n \"jsonOptions\": {\n \"disableTypeInference\": false,\n \"encoding\": \"\"\n },\n \"schedule\": \"\"\n },\n \"discoveryStatus\": {\n \"lastRunDuration\": \"\",\n \"lastRunTime\": \"\",\n \"message\": \"\",\n \"state\": \"\",\n \"stats\": {\n \"dataItems\": \"\",\n \"dataSize\": \"\",\n \"filesets\": \"\",\n \"tables\": \"\"\n },\n \"updateTime\": \"\"\n },\n \"displayName\": \"\",\n \"labels\": {},\n \"name\": \"\",\n \"resourceSpec\": {\n \"name\": \"\",\n \"readAccessMode\": \"\",\n \"type\": \"\"\n },\n \"resourceStatus\": {\n \"managedAccessIdentity\": \"\",\n \"message\": \"\",\n \"state\": \"\",\n \"updateTime\": \"\"\n },\n \"securityStatus\": {\n \"message\": \"\",\n \"state\": \"\",\n \"updateTime\": \"\"\n },\n \"state\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}" in
Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/:name",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'createTime' => '',
'description' => '',
'discoverySpec' => [
'csvOptions' => [
'delimiter' => '',
'disableTypeInference' => null,
'encoding' => '',
'headerRows' => 0
],
'enabled' => null,
'excludePatterns' => [
],
'includePatterns' => [
],
'jsonOptions' => [
'disableTypeInference' => null,
'encoding' => ''
],
'schedule' => ''
],
'discoveryStatus' => [
'lastRunDuration' => '',
'lastRunTime' => '',
'message' => '',
'state' => '',
'stats' => [
'dataItems' => '',
'dataSize' => '',
'filesets' => '',
'tables' => ''
],
'updateTime' => ''
],
'displayName' => '',
'labels' => [
],
'name' => '',
'resourceSpec' => [
'name' => '',
'readAccessMode' => '',
'type' => ''
],
'resourceStatus' => [
'managedAccessIdentity' => '',
'message' => '',
'state' => '',
'updateTime' => ''
],
'securityStatus' => [
'message' => '',
'state' => '',
'updateTime' => ''
],
'state' => '',
'uid' => '',
'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('PATCH', '{{baseUrl}}/v1/:name', [
'body' => '{
"createTime": "",
"description": "",
"discoverySpec": {
"csvOptions": {
"delimiter": "",
"disableTypeInference": false,
"encoding": "",
"headerRows": 0
},
"enabled": false,
"excludePatterns": [],
"includePatterns": [],
"jsonOptions": {
"disableTypeInference": false,
"encoding": ""
},
"schedule": ""
},
"discoveryStatus": {
"lastRunDuration": "",
"lastRunTime": "",
"message": "",
"state": "",
"stats": {
"dataItems": "",
"dataSize": "",
"filesets": "",
"tables": ""
},
"updateTime": ""
},
"displayName": "",
"labels": {},
"name": "",
"resourceSpec": {
"name": "",
"readAccessMode": "",
"type": ""
},
"resourceStatus": {
"managedAccessIdentity": "",
"message": "",
"state": "",
"updateTime": ""
},
"securityStatus": {
"message": "",
"state": "",
"updateTime": ""
},
"state": "",
"uid": "",
"updateTime": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1/:name');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'createTime' => '',
'description' => '',
'discoverySpec' => [
'csvOptions' => [
'delimiter' => '',
'disableTypeInference' => null,
'encoding' => '',
'headerRows' => 0
],
'enabled' => null,
'excludePatterns' => [
],
'includePatterns' => [
],
'jsonOptions' => [
'disableTypeInference' => null,
'encoding' => ''
],
'schedule' => ''
],
'discoveryStatus' => [
'lastRunDuration' => '',
'lastRunTime' => '',
'message' => '',
'state' => '',
'stats' => [
'dataItems' => '',
'dataSize' => '',
'filesets' => '',
'tables' => ''
],
'updateTime' => ''
],
'displayName' => '',
'labels' => [
],
'name' => '',
'resourceSpec' => [
'name' => '',
'readAccessMode' => '',
'type' => ''
],
'resourceStatus' => [
'managedAccessIdentity' => '',
'message' => '',
'state' => '',
'updateTime' => ''
],
'securityStatus' => [
'message' => '',
'state' => '',
'updateTime' => ''
],
'state' => '',
'uid' => '',
'updateTime' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'createTime' => '',
'description' => '',
'discoverySpec' => [
'csvOptions' => [
'delimiter' => '',
'disableTypeInference' => null,
'encoding' => '',
'headerRows' => 0
],
'enabled' => null,
'excludePatterns' => [
],
'includePatterns' => [
],
'jsonOptions' => [
'disableTypeInference' => null,
'encoding' => ''
],
'schedule' => ''
],
'discoveryStatus' => [
'lastRunDuration' => '',
'lastRunTime' => '',
'message' => '',
'state' => '',
'stats' => [
'dataItems' => '',
'dataSize' => '',
'filesets' => '',
'tables' => ''
],
'updateTime' => ''
],
'displayName' => '',
'labels' => [
],
'name' => '',
'resourceSpec' => [
'name' => '',
'readAccessMode' => '',
'type' => ''
],
'resourceStatus' => [
'managedAccessIdentity' => '',
'message' => '',
'state' => '',
'updateTime' => ''
],
'securityStatus' => [
'message' => '',
'state' => '',
'updateTime' => ''
],
'state' => '',
'uid' => '',
'updateTime' => ''
]));
$request->setRequestUrl('{{baseUrl}}/v1/:name');
$request->setRequestMethod('PATCH');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:name' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"createTime": "",
"description": "",
"discoverySpec": {
"csvOptions": {
"delimiter": "",
"disableTypeInference": false,
"encoding": "",
"headerRows": 0
},
"enabled": false,
"excludePatterns": [],
"includePatterns": [],
"jsonOptions": {
"disableTypeInference": false,
"encoding": ""
},
"schedule": ""
},
"discoveryStatus": {
"lastRunDuration": "",
"lastRunTime": "",
"message": "",
"state": "",
"stats": {
"dataItems": "",
"dataSize": "",
"filesets": "",
"tables": ""
},
"updateTime": ""
},
"displayName": "",
"labels": {},
"name": "",
"resourceSpec": {
"name": "",
"readAccessMode": "",
"type": ""
},
"resourceStatus": {
"managedAccessIdentity": "",
"message": "",
"state": "",
"updateTime": ""
},
"securityStatus": {
"message": "",
"state": "",
"updateTime": ""
},
"state": "",
"uid": "",
"updateTime": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:name' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"createTime": "",
"description": "",
"discoverySpec": {
"csvOptions": {
"delimiter": "",
"disableTypeInference": false,
"encoding": "",
"headerRows": 0
},
"enabled": false,
"excludePatterns": [],
"includePatterns": [],
"jsonOptions": {
"disableTypeInference": false,
"encoding": ""
},
"schedule": ""
},
"discoveryStatus": {
"lastRunDuration": "",
"lastRunTime": "",
"message": "",
"state": "",
"stats": {
"dataItems": "",
"dataSize": "",
"filesets": "",
"tables": ""
},
"updateTime": ""
},
"displayName": "",
"labels": {},
"name": "",
"resourceSpec": {
"name": "",
"readAccessMode": "",
"type": ""
},
"resourceStatus": {
"managedAccessIdentity": "",
"message": "",
"state": "",
"updateTime": ""
},
"securityStatus": {
"message": "",
"state": "",
"updateTime": ""
},
"state": "",
"uid": "",
"updateTime": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"createTime\": \"\",\n \"description\": \"\",\n \"discoverySpec\": {\n \"csvOptions\": {\n \"delimiter\": \"\",\n \"disableTypeInference\": false,\n \"encoding\": \"\",\n \"headerRows\": 0\n },\n \"enabled\": false,\n \"excludePatterns\": [],\n \"includePatterns\": [],\n \"jsonOptions\": {\n \"disableTypeInference\": false,\n \"encoding\": \"\"\n },\n \"schedule\": \"\"\n },\n \"discoveryStatus\": {\n \"lastRunDuration\": \"\",\n \"lastRunTime\": \"\",\n \"message\": \"\",\n \"state\": \"\",\n \"stats\": {\n \"dataItems\": \"\",\n \"dataSize\": \"\",\n \"filesets\": \"\",\n \"tables\": \"\"\n },\n \"updateTime\": \"\"\n },\n \"displayName\": \"\",\n \"labels\": {},\n \"name\": \"\",\n \"resourceSpec\": {\n \"name\": \"\",\n \"readAccessMode\": \"\",\n \"type\": \"\"\n },\n \"resourceStatus\": {\n \"managedAccessIdentity\": \"\",\n \"message\": \"\",\n \"state\": \"\",\n \"updateTime\": \"\"\n },\n \"securityStatus\": {\n \"message\": \"\",\n \"state\": \"\",\n \"updateTime\": \"\"\n },\n \"state\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("PATCH", "/baseUrl/v1/:name", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/:name"
payload = {
"createTime": "",
"description": "",
"discoverySpec": {
"csvOptions": {
"delimiter": "",
"disableTypeInference": False,
"encoding": "",
"headerRows": 0
},
"enabled": False,
"excludePatterns": [],
"includePatterns": [],
"jsonOptions": {
"disableTypeInference": False,
"encoding": ""
},
"schedule": ""
},
"discoveryStatus": {
"lastRunDuration": "",
"lastRunTime": "",
"message": "",
"state": "",
"stats": {
"dataItems": "",
"dataSize": "",
"filesets": "",
"tables": ""
},
"updateTime": ""
},
"displayName": "",
"labels": {},
"name": "",
"resourceSpec": {
"name": "",
"readAccessMode": "",
"type": ""
},
"resourceStatus": {
"managedAccessIdentity": "",
"message": "",
"state": "",
"updateTime": ""
},
"securityStatus": {
"message": "",
"state": "",
"updateTime": ""
},
"state": "",
"uid": "",
"updateTime": ""
}
headers = {"content-type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/:name"
payload <- "{\n \"createTime\": \"\",\n \"description\": \"\",\n \"discoverySpec\": {\n \"csvOptions\": {\n \"delimiter\": \"\",\n \"disableTypeInference\": false,\n \"encoding\": \"\",\n \"headerRows\": 0\n },\n \"enabled\": false,\n \"excludePatterns\": [],\n \"includePatterns\": [],\n \"jsonOptions\": {\n \"disableTypeInference\": false,\n \"encoding\": \"\"\n },\n \"schedule\": \"\"\n },\n \"discoveryStatus\": {\n \"lastRunDuration\": \"\",\n \"lastRunTime\": \"\",\n \"message\": \"\",\n \"state\": \"\",\n \"stats\": {\n \"dataItems\": \"\",\n \"dataSize\": \"\",\n \"filesets\": \"\",\n \"tables\": \"\"\n },\n \"updateTime\": \"\"\n },\n \"displayName\": \"\",\n \"labels\": {},\n \"name\": \"\",\n \"resourceSpec\": {\n \"name\": \"\",\n \"readAccessMode\": \"\",\n \"type\": \"\"\n },\n \"resourceStatus\": {\n \"managedAccessIdentity\": \"\",\n \"message\": \"\",\n \"state\": \"\",\n \"updateTime\": \"\"\n },\n \"securityStatus\": {\n \"message\": \"\",\n \"state\": \"\",\n \"updateTime\": \"\"\n },\n \"state\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}"
encode <- "json"
response <- VERB("PATCH", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/:name")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"createTime\": \"\",\n \"description\": \"\",\n \"discoverySpec\": {\n \"csvOptions\": {\n \"delimiter\": \"\",\n \"disableTypeInference\": false,\n \"encoding\": \"\",\n \"headerRows\": 0\n },\n \"enabled\": false,\n \"excludePatterns\": [],\n \"includePatterns\": [],\n \"jsonOptions\": {\n \"disableTypeInference\": false,\n \"encoding\": \"\"\n },\n \"schedule\": \"\"\n },\n \"discoveryStatus\": {\n \"lastRunDuration\": \"\",\n \"lastRunTime\": \"\",\n \"message\": \"\",\n \"state\": \"\",\n \"stats\": {\n \"dataItems\": \"\",\n \"dataSize\": \"\",\n \"filesets\": \"\",\n \"tables\": \"\"\n },\n \"updateTime\": \"\"\n },\n \"displayName\": \"\",\n \"labels\": {},\n \"name\": \"\",\n \"resourceSpec\": {\n \"name\": \"\",\n \"readAccessMode\": \"\",\n \"type\": \"\"\n },\n \"resourceStatus\": {\n \"managedAccessIdentity\": \"\",\n \"message\": \"\",\n \"state\": \"\",\n \"updateTime\": \"\"\n },\n \"securityStatus\": {\n \"message\": \"\",\n \"state\": \"\",\n \"updateTime\": \"\"\n },\n \"state\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.patch('/baseUrl/v1/:name') do |req|
req.body = "{\n \"createTime\": \"\",\n \"description\": \"\",\n \"discoverySpec\": {\n \"csvOptions\": {\n \"delimiter\": \"\",\n \"disableTypeInference\": false,\n \"encoding\": \"\",\n \"headerRows\": 0\n },\n \"enabled\": false,\n \"excludePatterns\": [],\n \"includePatterns\": [],\n \"jsonOptions\": {\n \"disableTypeInference\": false,\n \"encoding\": \"\"\n },\n \"schedule\": \"\"\n },\n \"discoveryStatus\": {\n \"lastRunDuration\": \"\",\n \"lastRunTime\": \"\",\n \"message\": \"\",\n \"state\": \"\",\n \"stats\": {\n \"dataItems\": \"\",\n \"dataSize\": \"\",\n \"filesets\": \"\",\n \"tables\": \"\"\n },\n \"updateTime\": \"\"\n },\n \"displayName\": \"\",\n \"labels\": {},\n \"name\": \"\",\n \"resourceSpec\": {\n \"name\": \"\",\n \"readAccessMode\": \"\",\n \"type\": \"\"\n },\n \"resourceStatus\": {\n \"managedAccessIdentity\": \"\",\n \"message\": \"\",\n \"state\": \"\",\n \"updateTime\": \"\"\n },\n \"securityStatus\": {\n \"message\": \"\",\n \"state\": \"\",\n \"updateTime\": \"\"\n },\n \"state\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}"
end
puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/:name";
let payload = json!({
"createTime": "",
"description": "",
"discoverySpec": json!({
"csvOptions": json!({
"delimiter": "",
"disableTypeInference": false,
"encoding": "",
"headerRows": 0
}),
"enabled": false,
"excludePatterns": (),
"includePatterns": (),
"jsonOptions": json!({
"disableTypeInference": false,
"encoding": ""
}),
"schedule": ""
}),
"discoveryStatus": json!({
"lastRunDuration": "",
"lastRunTime": "",
"message": "",
"state": "",
"stats": json!({
"dataItems": "",
"dataSize": "",
"filesets": "",
"tables": ""
}),
"updateTime": ""
}),
"displayName": "",
"labels": json!({}),
"name": "",
"resourceSpec": json!({
"name": "",
"readAccessMode": "",
"type": ""
}),
"resourceStatus": json!({
"managedAccessIdentity": "",
"message": "",
"state": "",
"updateTime": ""
}),
"securityStatus": json!({
"message": "",
"state": "",
"updateTime": ""
}),
"state": "",
"uid": "",
"updateTime": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PATCH").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PATCH \
--url {{baseUrl}}/v1/:name \
--header 'content-type: application/json' \
--data '{
"createTime": "",
"description": "",
"discoverySpec": {
"csvOptions": {
"delimiter": "",
"disableTypeInference": false,
"encoding": "",
"headerRows": 0
},
"enabled": false,
"excludePatterns": [],
"includePatterns": [],
"jsonOptions": {
"disableTypeInference": false,
"encoding": ""
},
"schedule": ""
},
"discoveryStatus": {
"lastRunDuration": "",
"lastRunTime": "",
"message": "",
"state": "",
"stats": {
"dataItems": "",
"dataSize": "",
"filesets": "",
"tables": ""
},
"updateTime": ""
},
"displayName": "",
"labels": {},
"name": "",
"resourceSpec": {
"name": "",
"readAccessMode": "",
"type": ""
},
"resourceStatus": {
"managedAccessIdentity": "",
"message": "",
"state": "",
"updateTime": ""
},
"securityStatus": {
"message": "",
"state": "",
"updateTime": ""
},
"state": "",
"uid": "",
"updateTime": ""
}'
echo '{
"createTime": "",
"description": "",
"discoverySpec": {
"csvOptions": {
"delimiter": "",
"disableTypeInference": false,
"encoding": "",
"headerRows": 0
},
"enabled": false,
"excludePatterns": [],
"includePatterns": [],
"jsonOptions": {
"disableTypeInference": false,
"encoding": ""
},
"schedule": ""
},
"discoveryStatus": {
"lastRunDuration": "",
"lastRunTime": "",
"message": "",
"state": "",
"stats": {
"dataItems": "",
"dataSize": "",
"filesets": "",
"tables": ""
},
"updateTime": ""
},
"displayName": "",
"labels": {},
"name": "",
"resourceSpec": {
"name": "",
"readAccessMode": "",
"type": ""
},
"resourceStatus": {
"managedAccessIdentity": "",
"message": "",
"state": "",
"updateTime": ""
},
"securityStatus": {
"message": "",
"state": "",
"updateTime": ""
},
"state": "",
"uid": "",
"updateTime": ""
}' | \
http PATCH {{baseUrl}}/v1/:name \
content-type:application/json
wget --quiet \
--method PATCH \
--header 'content-type: application/json' \
--body-data '{\n "createTime": "",\n "description": "",\n "discoverySpec": {\n "csvOptions": {\n "delimiter": "",\n "disableTypeInference": false,\n "encoding": "",\n "headerRows": 0\n },\n "enabled": false,\n "excludePatterns": [],\n "includePatterns": [],\n "jsonOptions": {\n "disableTypeInference": false,\n "encoding": ""\n },\n "schedule": ""\n },\n "discoveryStatus": {\n "lastRunDuration": "",\n "lastRunTime": "",\n "message": "",\n "state": "",\n "stats": {\n "dataItems": "",\n "dataSize": "",\n "filesets": "",\n "tables": ""\n },\n "updateTime": ""\n },\n "displayName": "",\n "labels": {},\n "name": "",\n "resourceSpec": {\n "name": "",\n "readAccessMode": "",\n "type": ""\n },\n "resourceStatus": {\n "managedAccessIdentity": "",\n "message": "",\n "state": "",\n "updateTime": ""\n },\n "securityStatus": {\n "message": "",\n "state": "",\n "updateTime": ""\n },\n "state": "",\n "uid": "",\n "updateTime": ""\n}' \
--output-document \
- {{baseUrl}}/v1/:name
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"createTime": "",
"description": "",
"discoverySpec": [
"csvOptions": [
"delimiter": "",
"disableTypeInference": false,
"encoding": "",
"headerRows": 0
],
"enabled": false,
"excludePatterns": [],
"includePatterns": [],
"jsonOptions": [
"disableTypeInference": false,
"encoding": ""
],
"schedule": ""
],
"discoveryStatus": [
"lastRunDuration": "",
"lastRunTime": "",
"message": "",
"state": "",
"stats": [
"dataItems": "",
"dataSize": "",
"filesets": "",
"tables": ""
],
"updateTime": ""
],
"displayName": "",
"labels": [],
"name": "",
"resourceSpec": [
"name": "",
"readAccessMode": "",
"type": ""
],
"resourceStatus": [
"managedAccessIdentity": "",
"message": "",
"state": "",
"updateTime": ""
],
"securityStatus": [
"message": "",
"state": "",
"updateTime": ""
],
"state": "",
"uid": "",
"updateTime": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:name")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
dataplex.projects.locations.lakes.zones.assets.setIamPolicy
{{baseUrl}}/v1/:resource:setIamPolicy
QUERY PARAMS
resource
BODY json
{
"policy": {
"auditConfigs": [
{
"auditLogConfigs": [
{
"exemptedMembers": [],
"logType": ""
}
],
"service": ""
}
],
"bindings": [
{
"condition": {
"description": "",
"expression": "",
"location": "",
"title": ""
},
"members": [],
"role": ""
}
],
"etag": "",
"version": 0
},
"updateMask": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/: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 \"auditConfigs\": [\n {\n \"auditLogConfigs\": [\n {\n \"exemptedMembers\": [],\n \"logType\": \"\"\n }\n ],\n \"service\": \"\"\n }\n ],\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 \"updateMask\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1/:resource:setIamPolicy" {:content-type :json
:form-params {:policy {:auditConfigs [{:auditLogConfigs [{:exemptedMembers []
:logType ""}]
:service ""}]
:bindings [{:condition {:description ""
:expression ""
:location ""
:title ""}
:members []
:role ""}]
:etag ""
:version 0}
:updateMask ""}})
require "http/client"
url = "{{baseUrl}}/v1/:resource:setIamPolicy"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"policy\": {\n \"auditConfigs\": [\n {\n \"auditLogConfigs\": [\n {\n \"exemptedMembers\": [],\n \"logType\": \"\"\n }\n ],\n \"service\": \"\"\n }\n ],\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 \"updateMask\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/v1/:resource:setIamPolicy"),
Content = new StringContent("{\n \"policy\": {\n \"auditConfigs\": [\n {\n \"auditLogConfigs\": [\n {\n \"exemptedMembers\": [],\n \"logType\": \"\"\n }\n ],\n \"service\": \"\"\n }\n ],\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 \"updateMask\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/:resource:setIamPolicy");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"policy\": {\n \"auditConfigs\": [\n {\n \"auditLogConfigs\": [\n {\n \"exemptedMembers\": [],\n \"logType\": \"\"\n }\n ],\n \"service\": \"\"\n }\n ],\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 \"updateMask\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/:resource:setIamPolicy"
payload := strings.NewReader("{\n \"policy\": {\n \"auditConfigs\": [\n {\n \"auditLogConfigs\": [\n {\n \"exemptedMembers\": [],\n \"logType\": \"\"\n }\n ],\n \"service\": \"\"\n }\n ],\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 \"updateMask\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/v1/:resource:setIamPolicy HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 488
{
"policy": {
"auditConfigs": [
{
"auditLogConfigs": [
{
"exemptedMembers": [],
"logType": ""
}
],
"service": ""
}
],
"bindings": [
{
"condition": {
"description": "",
"expression": "",
"location": "",
"title": ""
},
"members": [],
"role": ""
}
],
"etag": "",
"version": 0
},
"updateMask": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1/:resource:setIamPolicy")
.setHeader("content-type", "application/json")
.setBody("{\n \"policy\": {\n \"auditConfigs\": [\n {\n \"auditLogConfigs\": [\n {\n \"exemptedMembers\": [],\n \"logType\": \"\"\n }\n ],\n \"service\": \"\"\n }\n ],\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 \"updateMask\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/:resource:setIamPolicy"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"policy\": {\n \"auditConfigs\": [\n {\n \"auditLogConfigs\": [\n {\n \"exemptedMembers\": [],\n \"logType\": \"\"\n }\n ],\n \"service\": \"\"\n }\n ],\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 \"updateMask\": \"\"\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 \"auditConfigs\": [\n {\n \"auditLogConfigs\": [\n {\n \"exemptedMembers\": [],\n \"logType\": \"\"\n }\n ],\n \"service\": \"\"\n }\n ],\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 \"updateMask\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/:resource:setIamPolicy")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1/:resource:setIamPolicy")
.header("content-type", "application/json")
.body("{\n \"policy\": {\n \"auditConfigs\": [\n {\n \"auditLogConfigs\": [\n {\n \"exemptedMembers\": [],\n \"logType\": \"\"\n }\n ],\n \"service\": \"\"\n }\n ],\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 \"updateMask\": \"\"\n}")
.asString();
const data = JSON.stringify({
policy: {
auditConfigs: [
{
auditLogConfigs: [
{
exemptedMembers: [],
logType: ''
}
],
service: ''
}
],
bindings: [
{
condition: {
description: '',
expression: '',
location: '',
title: ''
},
members: [],
role: ''
}
],
etag: '',
version: 0
},
updateMask: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v1/:resource:setIamPolicy');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:resource:setIamPolicy',
headers: {'content-type': 'application/json'},
data: {
policy: {
auditConfigs: [{auditLogConfigs: [{exemptedMembers: [], logType: ''}], service: ''}],
bindings: [
{
condition: {description: '', expression: '', location: '', title: ''},
members: [],
role: ''
}
],
etag: '',
version: 0
},
updateMask: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/:resource:setIamPolicy';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"policy":{"auditConfigs":[{"auditLogConfigs":[{"exemptedMembers":[],"logType":""}],"service":""}],"bindings":[{"condition":{"description":"","expression":"","location":"","title":""},"members":[],"role":""}],"etag":"","version":0},"updateMask":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/:resource:setIamPolicy',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "policy": {\n "auditConfigs": [\n {\n "auditLogConfigs": [\n {\n "exemptedMembers": [],\n "logType": ""\n }\n ],\n "service": ""\n }\n ],\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 "updateMask": ""\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 \"auditConfigs\": [\n {\n \"auditLogConfigs\": [\n {\n \"exemptedMembers\": [],\n \"logType\": \"\"\n }\n ],\n \"service\": \"\"\n }\n ],\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 \"updateMask\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1/: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/v1/: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: {
auditConfigs: [{auditLogConfigs: [{exemptedMembers: [], logType: ''}], service: ''}],
bindings: [
{
condition: {description: '', expression: '', location: '', title: ''},
members: [],
role: ''
}
],
etag: '',
version: 0
},
updateMask: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:resource:setIamPolicy',
headers: {'content-type': 'application/json'},
body: {
policy: {
auditConfigs: [{auditLogConfigs: [{exemptedMembers: [], logType: ''}], service: ''}],
bindings: [
{
condition: {description: '', expression: '', location: '', title: ''},
members: [],
role: ''
}
],
etag: '',
version: 0
},
updateMask: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/v1/:resource:setIamPolicy');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
policy: {
auditConfigs: [
{
auditLogConfigs: [
{
exemptedMembers: [],
logType: ''
}
],
service: ''
}
],
bindings: [
{
condition: {
description: '',
expression: '',
location: '',
title: ''
},
members: [],
role: ''
}
],
etag: '',
version: 0
},
updateMask: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:resource:setIamPolicy',
headers: {'content-type': 'application/json'},
data: {
policy: {
auditConfigs: [{auditLogConfigs: [{exemptedMembers: [], logType: ''}], service: ''}],
bindings: [
{
condition: {description: '', expression: '', location: '', title: ''},
members: [],
role: ''
}
],
etag: '',
version: 0
},
updateMask: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/:resource:setIamPolicy';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"policy":{"auditConfigs":[{"auditLogConfigs":[{"exemptedMembers":[],"logType":""}],"service":""}],"bindings":[{"condition":{"description":"","expression":"","location":"","title":""},"members":[],"role":""}],"etag":"","version":0},"updateMask":""}'
};
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": @{ @"auditConfigs": @[ @{ @"auditLogConfigs": @[ @{ @"exemptedMembers": @[ ], @"logType": @"" } ], @"service": @"" } ], @"bindings": @[ @{ @"condition": @{ @"description": @"", @"expression": @"", @"location": @"", @"title": @"" }, @"members": @[ ], @"role": @"" } ], @"etag": @"", @"version": @0 },
@"updateMask": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/: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}}/v1/:resource:setIamPolicy" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"policy\": {\n \"auditConfigs\": [\n {\n \"auditLogConfigs\": [\n {\n \"exemptedMembers\": [],\n \"logType\": \"\"\n }\n ],\n \"service\": \"\"\n }\n ],\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 \"updateMask\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/: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' => [
'auditConfigs' => [
[
'auditLogConfigs' => [
[
'exemptedMembers' => [
],
'logType' => ''
]
],
'service' => ''
]
],
'bindings' => [
[
'condition' => [
'description' => '',
'expression' => '',
'location' => '',
'title' => ''
],
'members' => [
],
'role' => ''
]
],
'etag' => '',
'version' => 0
],
'updateMask' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/v1/:resource:setIamPolicy', [
'body' => '{
"policy": {
"auditConfigs": [
{
"auditLogConfigs": [
{
"exemptedMembers": [],
"logType": ""
}
],
"service": ""
}
],
"bindings": [
{
"condition": {
"description": "",
"expression": "",
"location": "",
"title": ""
},
"members": [],
"role": ""
}
],
"etag": "",
"version": 0
},
"updateMask": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1/:resource:setIamPolicy');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'policy' => [
'auditConfigs' => [
[
'auditLogConfigs' => [
[
'exemptedMembers' => [
],
'logType' => ''
]
],
'service' => ''
]
],
'bindings' => [
[
'condition' => [
'description' => '',
'expression' => '',
'location' => '',
'title' => ''
],
'members' => [
],
'role' => ''
]
],
'etag' => '',
'version' => 0
],
'updateMask' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'policy' => [
'auditConfigs' => [
[
'auditLogConfigs' => [
[
'exemptedMembers' => [
],
'logType' => ''
]
],
'service' => ''
]
],
'bindings' => [
[
'condition' => [
'description' => '',
'expression' => '',
'location' => '',
'title' => ''
],
'members' => [
],
'role' => ''
]
],
'etag' => '',
'version' => 0
],
'updateMask' => ''
]));
$request->setRequestUrl('{{baseUrl}}/v1/: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}}/v1/:resource:setIamPolicy' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"policy": {
"auditConfigs": [
{
"auditLogConfigs": [
{
"exemptedMembers": [],
"logType": ""
}
],
"service": ""
}
],
"bindings": [
{
"condition": {
"description": "",
"expression": "",
"location": "",
"title": ""
},
"members": [],
"role": ""
}
],
"etag": "",
"version": 0
},
"updateMask": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:resource:setIamPolicy' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"policy": {
"auditConfigs": [
{
"auditLogConfigs": [
{
"exemptedMembers": [],
"logType": ""
}
],
"service": ""
}
],
"bindings": [
{
"condition": {
"description": "",
"expression": "",
"location": "",
"title": ""
},
"members": [],
"role": ""
}
],
"etag": "",
"version": 0
},
"updateMask": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"policy\": {\n \"auditConfigs\": [\n {\n \"auditLogConfigs\": [\n {\n \"exemptedMembers\": [],\n \"logType\": \"\"\n }\n ],\n \"service\": \"\"\n }\n ],\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 \"updateMask\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1/:resource:setIamPolicy", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/:resource:setIamPolicy"
payload = {
"policy": {
"auditConfigs": [
{
"auditLogConfigs": [
{
"exemptedMembers": [],
"logType": ""
}
],
"service": ""
}
],
"bindings": [
{
"condition": {
"description": "",
"expression": "",
"location": "",
"title": ""
},
"members": [],
"role": ""
}
],
"etag": "",
"version": 0
},
"updateMask": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/:resource:setIamPolicy"
payload <- "{\n \"policy\": {\n \"auditConfigs\": [\n {\n \"auditLogConfigs\": [\n {\n \"exemptedMembers\": [],\n \"logType\": \"\"\n }\n ],\n \"service\": \"\"\n }\n ],\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 \"updateMask\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/: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 \"auditConfigs\": [\n {\n \"auditLogConfigs\": [\n {\n \"exemptedMembers\": [],\n \"logType\": \"\"\n }\n ],\n \"service\": \"\"\n }\n ],\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 \"updateMask\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/v1/:resource:setIamPolicy') do |req|
req.body = "{\n \"policy\": {\n \"auditConfigs\": [\n {\n \"auditLogConfigs\": [\n {\n \"exemptedMembers\": [],\n \"logType\": \"\"\n }\n ],\n \"service\": \"\"\n }\n ],\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 \"updateMask\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/:resource:setIamPolicy";
let payload = json!({
"policy": json!({
"auditConfigs": (
json!({
"auditLogConfigs": (
json!({
"exemptedMembers": (),
"logType": ""
})
),
"service": ""
})
),
"bindings": (
json!({
"condition": json!({
"description": "",
"expression": "",
"location": "",
"title": ""
}),
"members": (),
"role": ""
})
),
"etag": "",
"version": 0
}),
"updateMask": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/v1/:resource:setIamPolicy \
--header 'content-type: application/json' \
--data '{
"policy": {
"auditConfigs": [
{
"auditLogConfigs": [
{
"exemptedMembers": [],
"logType": ""
}
],
"service": ""
}
],
"bindings": [
{
"condition": {
"description": "",
"expression": "",
"location": "",
"title": ""
},
"members": [],
"role": ""
}
],
"etag": "",
"version": 0
},
"updateMask": ""
}'
echo '{
"policy": {
"auditConfigs": [
{
"auditLogConfigs": [
{
"exemptedMembers": [],
"logType": ""
}
],
"service": ""
}
],
"bindings": [
{
"condition": {
"description": "",
"expression": "",
"location": "",
"title": ""
},
"members": [],
"role": ""
}
],
"etag": "",
"version": 0
},
"updateMask": ""
}' | \
http POST {{baseUrl}}/v1/:resource:setIamPolicy \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "policy": {\n "auditConfigs": [\n {\n "auditLogConfigs": [\n {\n "exemptedMembers": [],\n "logType": ""\n }\n ],\n "service": ""\n }\n ],\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 "updateMask": ""\n}' \
--output-document \
- {{baseUrl}}/v1/:resource:setIamPolicy
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"policy": [
"auditConfigs": [
[
"auditLogConfigs": [
[
"exemptedMembers": [],
"logType": ""
]
],
"service": ""
]
],
"bindings": [
[
"condition": [
"description": "",
"expression": "",
"location": "",
"title": ""
],
"members": [],
"role": ""
]
],
"etag": "",
"version": 0
],
"updateMask": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/: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
dataplex.projects.locations.lakes.zones.assets.testIamPermissions
{{baseUrl}}/v1/: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}}/v1/: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}}/v1/:resource:testIamPermissions" {:content-type :json
:form-params {:permissions []}})
require "http/client"
url = "{{baseUrl}}/v1/: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}}/v1/: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}}/v1/: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}}/v1/: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/v1/:resource:testIamPermissions HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 23
{
"permissions": []
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1/: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}}/v1/: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}}/v1/:resource:testIamPermissions")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1/: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}}/v1/:resource:testIamPermissions');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/: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}}/v1/: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}}/v1/: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}}/v1/: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/v1/: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}}/v1/: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}}/v1/: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}}/v1/: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}}/v1/: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}}/v1/: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}}/v1/: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}}/v1/: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}}/v1/:resource:testIamPermissions', [
'body' => '{
"permissions": []
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1/: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}}/v1/: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}}/v1/:resource:testIamPermissions' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"permissions": []
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/: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/v1/:resource:testIamPermissions", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/:resource:testIamPermissions"
payload = { "permissions": [] }
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/: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}}/v1/: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/v1/: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}}/v1/: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}}/v1/:resource:testIamPermissions \
--header 'content-type: application/json' \
--data '{
"permissions": []
}'
echo '{
"permissions": []
}' | \
http POST {{baseUrl}}/v1/:resource:testIamPermissions \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "permissions": []\n}' \
--output-document \
- {{baseUrl}}/v1/: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}}/v1/: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()
POST
dataplex.projects.locations.lakes.zones.create
{{baseUrl}}/v1/:parent/zones
QUERY PARAMS
parent
BODY json
{
"assetStatus": {
"activeAssets": 0,
"securityPolicyApplyingAssets": 0,
"updateTime": ""
},
"createTime": "",
"description": "",
"discoverySpec": {
"csvOptions": {
"delimiter": "",
"disableTypeInference": false,
"encoding": "",
"headerRows": 0
},
"enabled": false,
"excludePatterns": [],
"includePatterns": [],
"jsonOptions": {
"disableTypeInference": false,
"encoding": ""
},
"schedule": ""
},
"displayName": "",
"labels": {},
"name": "",
"resourceSpec": {
"locationType": ""
},
"state": "",
"type": "",
"uid": "",
"updateTime": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:parent/zones");
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 \"assetStatus\": {\n \"activeAssets\": 0,\n \"securityPolicyApplyingAssets\": 0,\n \"updateTime\": \"\"\n },\n \"createTime\": \"\",\n \"description\": \"\",\n \"discoverySpec\": {\n \"csvOptions\": {\n \"delimiter\": \"\",\n \"disableTypeInference\": false,\n \"encoding\": \"\",\n \"headerRows\": 0\n },\n \"enabled\": false,\n \"excludePatterns\": [],\n \"includePatterns\": [],\n \"jsonOptions\": {\n \"disableTypeInference\": false,\n \"encoding\": \"\"\n },\n \"schedule\": \"\"\n },\n \"displayName\": \"\",\n \"labels\": {},\n \"name\": \"\",\n \"resourceSpec\": {\n \"locationType\": \"\"\n },\n \"state\": \"\",\n \"type\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1/:parent/zones" {:content-type :json
:form-params {:assetStatus {:activeAssets 0
:securityPolicyApplyingAssets 0
:updateTime ""}
:createTime ""
:description ""
:discoverySpec {:csvOptions {:delimiter ""
:disableTypeInference false
:encoding ""
:headerRows 0}
:enabled false
:excludePatterns []
:includePatterns []
:jsonOptions {:disableTypeInference false
:encoding ""}
:schedule ""}
:displayName ""
:labels {}
:name ""
:resourceSpec {:locationType ""}
:state ""
:type ""
:uid ""
:updateTime ""}})
require "http/client"
url = "{{baseUrl}}/v1/:parent/zones"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"assetStatus\": {\n \"activeAssets\": 0,\n \"securityPolicyApplyingAssets\": 0,\n \"updateTime\": \"\"\n },\n \"createTime\": \"\",\n \"description\": \"\",\n \"discoverySpec\": {\n \"csvOptions\": {\n \"delimiter\": \"\",\n \"disableTypeInference\": false,\n \"encoding\": \"\",\n \"headerRows\": 0\n },\n \"enabled\": false,\n \"excludePatterns\": [],\n \"includePatterns\": [],\n \"jsonOptions\": {\n \"disableTypeInference\": false,\n \"encoding\": \"\"\n },\n \"schedule\": \"\"\n },\n \"displayName\": \"\",\n \"labels\": {},\n \"name\": \"\",\n \"resourceSpec\": {\n \"locationType\": \"\"\n },\n \"state\": \"\",\n \"type\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/v1/:parent/zones"),
Content = new StringContent("{\n \"assetStatus\": {\n \"activeAssets\": 0,\n \"securityPolicyApplyingAssets\": 0,\n \"updateTime\": \"\"\n },\n \"createTime\": \"\",\n \"description\": \"\",\n \"discoverySpec\": {\n \"csvOptions\": {\n \"delimiter\": \"\",\n \"disableTypeInference\": false,\n \"encoding\": \"\",\n \"headerRows\": 0\n },\n \"enabled\": false,\n \"excludePatterns\": [],\n \"includePatterns\": [],\n \"jsonOptions\": {\n \"disableTypeInference\": false,\n \"encoding\": \"\"\n },\n \"schedule\": \"\"\n },\n \"displayName\": \"\",\n \"labels\": {},\n \"name\": \"\",\n \"resourceSpec\": {\n \"locationType\": \"\"\n },\n \"state\": \"\",\n \"type\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/:parent/zones");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"assetStatus\": {\n \"activeAssets\": 0,\n \"securityPolicyApplyingAssets\": 0,\n \"updateTime\": \"\"\n },\n \"createTime\": \"\",\n \"description\": \"\",\n \"discoverySpec\": {\n \"csvOptions\": {\n \"delimiter\": \"\",\n \"disableTypeInference\": false,\n \"encoding\": \"\",\n \"headerRows\": 0\n },\n \"enabled\": false,\n \"excludePatterns\": [],\n \"includePatterns\": [],\n \"jsonOptions\": {\n \"disableTypeInference\": false,\n \"encoding\": \"\"\n },\n \"schedule\": \"\"\n },\n \"displayName\": \"\",\n \"labels\": {},\n \"name\": \"\",\n \"resourceSpec\": {\n \"locationType\": \"\"\n },\n \"state\": \"\",\n \"type\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/:parent/zones"
payload := strings.NewReader("{\n \"assetStatus\": {\n \"activeAssets\": 0,\n \"securityPolicyApplyingAssets\": 0,\n \"updateTime\": \"\"\n },\n \"createTime\": \"\",\n \"description\": \"\",\n \"discoverySpec\": {\n \"csvOptions\": {\n \"delimiter\": \"\",\n \"disableTypeInference\": false,\n \"encoding\": \"\",\n \"headerRows\": 0\n },\n \"enabled\": false,\n \"excludePatterns\": [],\n \"includePatterns\": [],\n \"jsonOptions\": {\n \"disableTypeInference\": false,\n \"encoding\": \"\"\n },\n \"schedule\": \"\"\n },\n \"displayName\": \"\",\n \"labels\": {},\n \"name\": \"\",\n \"resourceSpec\": {\n \"locationType\": \"\"\n },\n \"state\": \"\",\n \"type\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/v1/:parent/zones HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 649
{
"assetStatus": {
"activeAssets": 0,
"securityPolicyApplyingAssets": 0,
"updateTime": ""
},
"createTime": "",
"description": "",
"discoverySpec": {
"csvOptions": {
"delimiter": "",
"disableTypeInference": false,
"encoding": "",
"headerRows": 0
},
"enabled": false,
"excludePatterns": [],
"includePatterns": [],
"jsonOptions": {
"disableTypeInference": false,
"encoding": ""
},
"schedule": ""
},
"displayName": "",
"labels": {},
"name": "",
"resourceSpec": {
"locationType": ""
},
"state": "",
"type": "",
"uid": "",
"updateTime": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1/:parent/zones")
.setHeader("content-type", "application/json")
.setBody("{\n \"assetStatus\": {\n \"activeAssets\": 0,\n \"securityPolicyApplyingAssets\": 0,\n \"updateTime\": \"\"\n },\n \"createTime\": \"\",\n \"description\": \"\",\n \"discoverySpec\": {\n \"csvOptions\": {\n \"delimiter\": \"\",\n \"disableTypeInference\": false,\n \"encoding\": \"\",\n \"headerRows\": 0\n },\n \"enabled\": false,\n \"excludePatterns\": [],\n \"includePatterns\": [],\n \"jsonOptions\": {\n \"disableTypeInference\": false,\n \"encoding\": \"\"\n },\n \"schedule\": \"\"\n },\n \"displayName\": \"\",\n \"labels\": {},\n \"name\": \"\",\n \"resourceSpec\": {\n \"locationType\": \"\"\n },\n \"state\": \"\",\n \"type\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/:parent/zones"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"assetStatus\": {\n \"activeAssets\": 0,\n \"securityPolicyApplyingAssets\": 0,\n \"updateTime\": \"\"\n },\n \"createTime\": \"\",\n \"description\": \"\",\n \"discoverySpec\": {\n \"csvOptions\": {\n \"delimiter\": \"\",\n \"disableTypeInference\": false,\n \"encoding\": \"\",\n \"headerRows\": 0\n },\n \"enabled\": false,\n \"excludePatterns\": [],\n \"includePatterns\": [],\n \"jsonOptions\": {\n \"disableTypeInference\": false,\n \"encoding\": \"\"\n },\n \"schedule\": \"\"\n },\n \"displayName\": \"\",\n \"labels\": {},\n \"name\": \"\",\n \"resourceSpec\": {\n \"locationType\": \"\"\n },\n \"state\": \"\",\n \"type\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\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 \"assetStatus\": {\n \"activeAssets\": 0,\n \"securityPolicyApplyingAssets\": 0,\n \"updateTime\": \"\"\n },\n \"createTime\": \"\",\n \"description\": \"\",\n \"discoverySpec\": {\n \"csvOptions\": {\n \"delimiter\": \"\",\n \"disableTypeInference\": false,\n \"encoding\": \"\",\n \"headerRows\": 0\n },\n \"enabled\": false,\n \"excludePatterns\": [],\n \"includePatterns\": [],\n \"jsonOptions\": {\n \"disableTypeInference\": false,\n \"encoding\": \"\"\n },\n \"schedule\": \"\"\n },\n \"displayName\": \"\",\n \"labels\": {},\n \"name\": \"\",\n \"resourceSpec\": {\n \"locationType\": \"\"\n },\n \"state\": \"\",\n \"type\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/:parent/zones")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1/:parent/zones")
.header("content-type", "application/json")
.body("{\n \"assetStatus\": {\n \"activeAssets\": 0,\n \"securityPolicyApplyingAssets\": 0,\n \"updateTime\": \"\"\n },\n \"createTime\": \"\",\n \"description\": \"\",\n \"discoverySpec\": {\n \"csvOptions\": {\n \"delimiter\": \"\",\n \"disableTypeInference\": false,\n \"encoding\": \"\",\n \"headerRows\": 0\n },\n \"enabled\": false,\n \"excludePatterns\": [],\n \"includePatterns\": [],\n \"jsonOptions\": {\n \"disableTypeInference\": false,\n \"encoding\": \"\"\n },\n \"schedule\": \"\"\n },\n \"displayName\": \"\",\n \"labels\": {},\n \"name\": \"\",\n \"resourceSpec\": {\n \"locationType\": \"\"\n },\n \"state\": \"\",\n \"type\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}")
.asString();
const data = JSON.stringify({
assetStatus: {
activeAssets: 0,
securityPolicyApplyingAssets: 0,
updateTime: ''
},
createTime: '',
description: '',
discoverySpec: {
csvOptions: {
delimiter: '',
disableTypeInference: false,
encoding: '',
headerRows: 0
},
enabled: false,
excludePatterns: [],
includePatterns: [],
jsonOptions: {
disableTypeInference: false,
encoding: ''
},
schedule: ''
},
displayName: '',
labels: {},
name: '',
resourceSpec: {
locationType: ''
},
state: '',
type: '',
uid: '',
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}}/v1/:parent/zones');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:parent/zones',
headers: {'content-type': 'application/json'},
data: {
assetStatus: {activeAssets: 0, securityPolicyApplyingAssets: 0, updateTime: ''},
createTime: '',
description: '',
discoverySpec: {
csvOptions: {delimiter: '', disableTypeInference: false, encoding: '', headerRows: 0},
enabled: false,
excludePatterns: [],
includePatterns: [],
jsonOptions: {disableTypeInference: false, encoding: ''},
schedule: ''
},
displayName: '',
labels: {},
name: '',
resourceSpec: {locationType: ''},
state: '',
type: '',
uid: '',
updateTime: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/:parent/zones';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"assetStatus":{"activeAssets":0,"securityPolicyApplyingAssets":0,"updateTime":""},"createTime":"","description":"","discoverySpec":{"csvOptions":{"delimiter":"","disableTypeInference":false,"encoding":"","headerRows":0},"enabled":false,"excludePatterns":[],"includePatterns":[],"jsonOptions":{"disableTypeInference":false,"encoding":""},"schedule":""},"displayName":"","labels":{},"name":"","resourceSpec":{"locationType":""},"state":"","type":"","uid":"","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}}/v1/:parent/zones',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "assetStatus": {\n "activeAssets": 0,\n "securityPolicyApplyingAssets": 0,\n "updateTime": ""\n },\n "createTime": "",\n "description": "",\n "discoverySpec": {\n "csvOptions": {\n "delimiter": "",\n "disableTypeInference": false,\n "encoding": "",\n "headerRows": 0\n },\n "enabled": false,\n "excludePatterns": [],\n "includePatterns": [],\n "jsonOptions": {\n "disableTypeInference": false,\n "encoding": ""\n },\n "schedule": ""\n },\n "displayName": "",\n "labels": {},\n "name": "",\n "resourceSpec": {\n "locationType": ""\n },\n "state": "",\n "type": "",\n "uid": "",\n "updateTime": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"assetStatus\": {\n \"activeAssets\": 0,\n \"securityPolicyApplyingAssets\": 0,\n \"updateTime\": \"\"\n },\n \"createTime\": \"\",\n \"description\": \"\",\n \"discoverySpec\": {\n \"csvOptions\": {\n \"delimiter\": \"\",\n \"disableTypeInference\": false,\n \"encoding\": \"\",\n \"headerRows\": 0\n },\n \"enabled\": false,\n \"excludePatterns\": [],\n \"includePatterns\": [],\n \"jsonOptions\": {\n \"disableTypeInference\": false,\n \"encoding\": \"\"\n },\n \"schedule\": \"\"\n },\n \"displayName\": \"\",\n \"labels\": {},\n \"name\": \"\",\n \"resourceSpec\": {\n \"locationType\": \"\"\n },\n \"state\": \"\",\n \"type\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1/:parent/zones")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/:parent/zones',
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({
assetStatus: {activeAssets: 0, securityPolicyApplyingAssets: 0, updateTime: ''},
createTime: '',
description: '',
discoverySpec: {
csvOptions: {delimiter: '', disableTypeInference: false, encoding: '', headerRows: 0},
enabled: false,
excludePatterns: [],
includePatterns: [],
jsonOptions: {disableTypeInference: false, encoding: ''},
schedule: ''
},
displayName: '',
labels: {},
name: '',
resourceSpec: {locationType: ''},
state: '',
type: '',
uid: '',
updateTime: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:parent/zones',
headers: {'content-type': 'application/json'},
body: {
assetStatus: {activeAssets: 0, securityPolicyApplyingAssets: 0, updateTime: ''},
createTime: '',
description: '',
discoverySpec: {
csvOptions: {delimiter: '', disableTypeInference: false, encoding: '', headerRows: 0},
enabled: false,
excludePatterns: [],
includePatterns: [],
jsonOptions: {disableTypeInference: false, encoding: ''},
schedule: ''
},
displayName: '',
labels: {},
name: '',
resourceSpec: {locationType: ''},
state: '',
type: '',
uid: '',
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}}/v1/:parent/zones');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
assetStatus: {
activeAssets: 0,
securityPolicyApplyingAssets: 0,
updateTime: ''
},
createTime: '',
description: '',
discoverySpec: {
csvOptions: {
delimiter: '',
disableTypeInference: false,
encoding: '',
headerRows: 0
},
enabled: false,
excludePatterns: [],
includePatterns: [],
jsonOptions: {
disableTypeInference: false,
encoding: ''
},
schedule: ''
},
displayName: '',
labels: {},
name: '',
resourceSpec: {
locationType: ''
},
state: '',
type: '',
uid: '',
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}}/v1/:parent/zones',
headers: {'content-type': 'application/json'},
data: {
assetStatus: {activeAssets: 0, securityPolicyApplyingAssets: 0, updateTime: ''},
createTime: '',
description: '',
discoverySpec: {
csvOptions: {delimiter: '', disableTypeInference: false, encoding: '', headerRows: 0},
enabled: false,
excludePatterns: [],
includePatterns: [],
jsonOptions: {disableTypeInference: false, encoding: ''},
schedule: ''
},
displayName: '',
labels: {},
name: '',
resourceSpec: {locationType: ''},
state: '',
type: '',
uid: '',
updateTime: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/:parent/zones';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"assetStatus":{"activeAssets":0,"securityPolicyApplyingAssets":0,"updateTime":""},"createTime":"","description":"","discoverySpec":{"csvOptions":{"delimiter":"","disableTypeInference":false,"encoding":"","headerRows":0},"enabled":false,"excludePatterns":[],"includePatterns":[],"jsonOptions":{"disableTypeInference":false,"encoding":""},"schedule":""},"displayName":"","labels":{},"name":"","resourceSpec":{"locationType":""},"state":"","type":"","uid":"","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 = @{ @"assetStatus": @{ @"activeAssets": @0, @"securityPolicyApplyingAssets": @0, @"updateTime": @"" },
@"createTime": @"",
@"description": @"",
@"discoverySpec": @{ @"csvOptions": @{ @"delimiter": @"", @"disableTypeInference": @NO, @"encoding": @"", @"headerRows": @0 }, @"enabled": @NO, @"excludePatterns": @[ ], @"includePatterns": @[ ], @"jsonOptions": @{ @"disableTypeInference": @NO, @"encoding": @"" }, @"schedule": @"" },
@"displayName": @"",
@"labels": @{ },
@"name": @"",
@"resourceSpec": @{ @"locationType": @"" },
@"state": @"",
@"type": @"",
@"uid": @"",
@"updateTime": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:parent/zones"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/:parent/zones" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"assetStatus\": {\n \"activeAssets\": 0,\n \"securityPolicyApplyingAssets\": 0,\n \"updateTime\": \"\"\n },\n \"createTime\": \"\",\n \"description\": \"\",\n \"discoverySpec\": {\n \"csvOptions\": {\n \"delimiter\": \"\",\n \"disableTypeInference\": false,\n \"encoding\": \"\",\n \"headerRows\": 0\n },\n \"enabled\": false,\n \"excludePatterns\": [],\n \"includePatterns\": [],\n \"jsonOptions\": {\n \"disableTypeInference\": false,\n \"encoding\": \"\"\n },\n \"schedule\": \"\"\n },\n \"displayName\": \"\",\n \"labels\": {},\n \"name\": \"\",\n \"resourceSpec\": {\n \"locationType\": \"\"\n },\n \"state\": \"\",\n \"type\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/:parent/zones",
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([
'assetStatus' => [
'activeAssets' => 0,
'securityPolicyApplyingAssets' => 0,
'updateTime' => ''
],
'createTime' => '',
'description' => '',
'discoverySpec' => [
'csvOptions' => [
'delimiter' => '',
'disableTypeInference' => null,
'encoding' => '',
'headerRows' => 0
],
'enabled' => null,
'excludePatterns' => [
],
'includePatterns' => [
],
'jsonOptions' => [
'disableTypeInference' => null,
'encoding' => ''
],
'schedule' => ''
],
'displayName' => '',
'labels' => [
],
'name' => '',
'resourceSpec' => [
'locationType' => ''
],
'state' => '',
'type' => '',
'uid' => '',
'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}}/v1/:parent/zones', [
'body' => '{
"assetStatus": {
"activeAssets": 0,
"securityPolicyApplyingAssets": 0,
"updateTime": ""
},
"createTime": "",
"description": "",
"discoverySpec": {
"csvOptions": {
"delimiter": "",
"disableTypeInference": false,
"encoding": "",
"headerRows": 0
},
"enabled": false,
"excludePatterns": [],
"includePatterns": [],
"jsonOptions": {
"disableTypeInference": false,
"encoding": ""
},
"schedule": ""
},
"displayName": "",
"labels": {},
"name": "",
"resourceSpec": {
"locationType": ""
},
"state": "",
"type": "",
"uid": "",
"updateTime": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1/:parent/zones');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'assetStatus' => [
'activeAssets' => 0,
'securityPolicyApplyingAssets' => 0,
'updateTime' => ''
],
'createTime' => '',
'description' => '',
'discoverySpec' => [
'csvOptions' => [
'delimiter' => '',
'disableTypeInference' => null,
'encoding' => '',
'headerRows' => 0
],
'enabled' => null,
'excludePatterns' => [
],
'includePatterns' => [
],
'jsonOptions' => [
'disableTypeInference' => null,
'encoding' => ''
],
'schedule' => ''
],
'displayName' => '',
'labels' => [
],
'name' => '',
'resourceSpec' => [
'locationType' => ''
],
'state' => '',
'type' => '',
'uid' => '',
'updateTime' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'assetStatus' => [
'activeAssets' => 0,
'securityPolicyApplyingAssets' => 0,
'updateTime' => ''
],
'createTime' => '',
'description' => '',
'discoverySpec' => [
'csvOptions' => [
'delimiter' => '',
'disableTypeInference' => null,
'encoding' => '',
'headerRows' => 0
],
'enabled' => null,
'excludePatterns' => [
],
'includePatterns' => [
],
'jsonOptions' => [
'disableTypeInference' => null,
'encoding' => ''
],
'schedule' => ''
],
'displayName' => '',
'labels' => [
],
'name' => '',
'resourceSpec' => [
'locationType' => ''
],
'state' => '',
'type' => '',
'uid' => '',
'updateTime' => ''
]));
$request->setRequestUrl('{{baseUrl}}/v1/:parent/zones');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:parent/zones' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"assetStatus": {
"activeAssets": 0,
"securityPolicyApplyingAssets": 0,
"updateTime": ""
},
"createTime": "",
"description": "",
"discoverySpec": {
"csvOptions": {
"delimiter": "",
"disableTypeInference": false,
"encoding": "",
"headerRows": 0
},
"enabled": false,
"excludePatterns": [],
"includePatterns": [],
"jsonOptions": {
"disableTypeInference": false,
"encoding": ""
},
"schedule": ""
},
"displayName": "",
"labels": {},
"name": "",
"resourceSpec": {
"locationType": ""
},
"state": "",
"type": "",
"uid": "",
"updateTime": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:parent/zones' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"assetStatus": {
"activeAssets": 0,
"securityPolicyApplyingAssets": 0,
"updateTime": ""
},
"createTime": "",
"description": "",
"discoverySpec": {
"csvOptions": {
"delimiter": "",
"disableTypeInference": false,
"encoding": "",
"headerRows": 0
},
"enabled": false,
"excludePatterns": [],
"includePatterns": [],
"jsonOptions": {
"disableTypeInference": false,
"encoding": ""
},
"schedule": ""
},
"displayName": "",
"labels": {},
"name": "",
"resourceSpec": {
"locationType": ""
},
"state": "",
"type": "",
"uid": "",
"updateTime": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"assetStatus\": {\n \"activeAssets\": 0,\n \"securityPolicyApplyingAssets\": 0,\n \"updateTime\": \"\"\n },\n \"createTime\": \"\",\n \"description\": \"\",\n \"discoverySpec\": {\n \"csvOptions\": {\n \"delimiter\": \"\",\n \"disableTypeInference\": false,\n \"encoding\": \"\",\n \"headerRows\": 0\n },\n \"enabled\": false,\n \"excludePatterns\": [],\n \"includePatterns\": [],\n \"jsonOptions\": {\n \"disableTypeInference\": false,\n \"encoding\": \"\"\n },\n \"schedule\": \"\"\n },\n \"displayName\": \"\",\n \"labels\": {},\n \"name\": \"\",\n \"resourceSpec\": {\n \"locationType\": \"\"\n },\n \"state\": \"\",\n \"type\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1/:parent/zones", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/:parent/zones"
payload = {
"assetStatus": {
"activeAssets": 0,
"securityPolicyApplyingAssets": 0,
"updateTime": ""
},
"createTime": "",
"description": "",
"discoverySpec": {
"csvOptions": {
"delimiter": "",
"disableTypeInference": False,
"encoding": "",
"headerRows": 0
},
"enabled": False,
"excludePatterns": [],
"includePatterns": [],
"jsonOptions": {
"disableTypeInference": False,
"encoding": ""
},
"schedule": ""
},
"displayName": "",
"labels": {},
"name": "",
"resourceSpec": { "locationType": "" },
"state": "",
"type": "",
"uid": "",
"updateTime": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/:parent/zones"
payload <- "{\n \"assetStatus\": {\n \"activeAssets\": 0,\n \"securityPolicyApplyingAssets\": 0,\n \"updateTime\": \"\"\n },\n \"createTime\": \"\",\n \"description\": \"\",\n \"discoverySpec\": {\n \"csvOptions\": {\n \"delimiter\": \"\",\n \"disableTypeInference\": false,\n \"encoding\": \"\",\n \"headerRows\": 0\n },\n \"enabled\": false,\n \"excludePatterns\": [],\n \"includePatterns\": [],\n \"jsonOptions\": {\n \"disableTypeInference\": false,\n \"encoding\": \"\"\n },\n \"schedule\": \"\"\n },\n \"displayName\": \"\",\n \"labels\": {},\n \"name\": \"\",\n \"resourceSpec\": {\n \"locationType\": \"\"\n },\n \"state\": \"\",\n \"type\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/:parent/zones")
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 \"assetStatus\": {\n \"activeAssets\": 0,\n \"securityPolicyApplyingAssets\": 0,\n \"updateTime\": \"\"\n },\n \"createTime\": \"\",\n \"description\": \"\",\n \"discoverySpec\": {\n \"csvOptions\": {\n \"delimiter\": \"\",\n \"disableTypeInference\": false,\n \"encoding\": \"\",\n \"headerRows\": 0\n },\n \"enabled\": false,\n \"excludePatterns\": [],\n \"includePatterns\": [],\n \"jsonOptions\": {\n \"disableTypeInference\": false,\n \"encoding\": \"\"\n },\n \"schedule\": \"\"\n },\n \"displayName\": \"\",\n \"labels\": {},\n \"name\": \"\",\n \"resourceSpec\": {\n \"locationType\": \"\"\n },\n \"state\": \"\",\n \"type\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/v1/:parent/zones') do |req|
req.body = "{\n \"assetStatus\": {\n \"activeAssets\": 0,\n \"securityPolicyApplyingAssets\": 0,\n \"updateTime\": \"\"\n },\n \"createTime\": \"\",\n \"description\": \"\",\n \"discoverySpec\": {\n \"csvOptions\": {\n \"delimiter\": \"\",\n \"disableTypeInference\": false,\n \"encoding\": \"\",\n \"headerRows\": 0\n },\n \"enabled\": false,\n \"excludePatterns\": [],\n \"includePatterns\": [],\n \"jsonOptions\": {\n \"disableTypeInference\": false,\n \"encoding\": \"\"\n },\n \"schedule\": \"\"\n },\n \"displayName\": \"\",\n \"labels\": {},\n \"name\": \"\",\n \"resourceSpec\": {\n \"locationType\": \"\"\n },\n \"state\": \"\",\n \"type\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/:parent/zones";
let payload = json!({
"assetStatus": json!({
"activeAssets": 0,
"securityPolicyApplyingAssets": 0,
"updateTime": ""
}),
"createTime": "",
"description": "",
"discoverySpec": json!({
"csvOptions": json!({
"delimiter": "",
"disableTypeInference": false,
"encoding": "",
"headerRows": 0
}),
"enabled": false,
"excludePatterns": (),
"includePatterns": (),
"jsonOptions": json!({
"disableTypeInference": false,
"encoding": ""
}),
"schedule": ""
}),
"displayName": "",
"labels": json!({}),
"name": "",
"resourceSpec": json!({"locationType": ""}),
"state": "",
"type": "",
"uid": "",
"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}}/v1/:parent/zones \
--header 'content-type: application/json' \
--data '{
"assetStatus": {
"activeAssets": 0,
"securityPolicyApplyingAssets": 0,
"updateTime": ""
},
"createTime": "",
"description": "",
"discoverySpec": {
"csvOptions": {
"delimiter": "",
"disableTypeInference": false,
"encoding": "",
"headerRows": 0
},
"enabled": false,
"excludePatterns": [],
"includePatterns": [],
"jsonOptions": {
"disableTypeInference": false,
"encoding": ""
},
"schedule": ""
},
"displayName": "",
"labels": {},
"name": "",
"resourceSpec": {
"locationType": ""
},
"state": "",
"type": "",
"uid": "",
"updateTime": ""
}'
echo '{
"assetStatus": {
"activeAssets": 0,
"securityPolicyApplyingAssets": 0,
"updateTime": ""
},
"createTime": "",
"description": "",
"discoverySpec": {
"csvOptions": {
"delimiter": "",
"disableTypeInference": false,
"encoding": "",
"headerRows": 0
},
"enabled": false,
"excludePatterns": [],
"includePatterns": [],
"jsonOptions": {
"disableTypeInference": false,
"encoding": ""
},
"schedule": ""
},
"displayName": "",
"labels": {},
"name": "",
"resourceSpec": {
"locationType": ""
},
"state": "",
"type": "",
"uid": "",
"updateTime": ""
}' | \
http POST {{baseUrl}}/v1/:parent/zones \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "assetStatus": {\n "activeAssets": 0,\n "securityPolicyApplyingAssets": 0,\n "updateTime": ""\n },\n "createTime": "",\n "description": "",\n "discoverySpec": {\n "csvOptions": {\n "delimiter": "",\n "disableTypeInference": false,\n "encoding": "",\n "headerRows": 0\n },\n "enabled": false,\n "excludePatterns": [],\n "includePatterns": [],\n "jsonOptions": {\n "disableTypeInference": false,\n "encoding": ""\n },\n "schedule": ""\n },\n "displayName": "",\n "labels": {},\n "name": "",\n "resourceSpec": {\n "locationType": ""\n },\n "state": "",\n "type": "",\n "uid": "",\n "updateTime": ""\n}' \
--output-document \
- {{baseUrl}}/v1/:parent/zones
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"assetStatus": [
"activeAssets": 0,
"securityPolicyApplyingAssets": 0,
"updateTime": ""
],
"createTime": "",
"description": "",
"discoverySpec": [
"csvOptions": [
"delimiter": "",
"disableTypeInference": false,
"encoding": "",
"headerRows": 0
],
"enabled": false,
"excludePatterns": [],
"includePatterns": [],
"jsonOptions": [
"disableTypeInference": false,
"encoding": ""
],
"schedule": ""
],
"displayName": "",
"labels": [],
"name": "",
"resourceSpec": ["locationType": ""],
"state": "",
"type": "",
"uid": "",
"updateTime": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:parent/zones")! 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
dataplex.projects.locations.lakes.zones.entities.create
{{baseUrl}}/v1/:parent/entities
QUERY PARAMS
parent
BODY json
{
"access": {
"read": ""
},
"asset": "",
"catalogEntry": "",
"compatibility": {
"bigquery": {
"compatible": false,
"reason": ""
},
"hiveMetastore": {}
},
"createTime": "",
"dataPath": "",
"dataPathPattern": "",
"description": "",
"displayName": "",
"etag": "",
"format": {
"compressionFormat": "",
"csv": {
"delimiter": "",
"encoding": "",
"headerRows": 0,
"quote": ""
},
"format": "",
"iceberg": {
"metadataLocation": ""
},
"json": {
"encoding": ""
},
"mimeType": ""
},
"id": "",
"name": "",
"schema": {
"fields": [
{
"description": "",
"fields": [],
"mode": "",
"name": "",
"type": ""
}
],
"partitionFields": [
{
"name": "",
"type": ""
}
],
"partitionStyle": "",
"userManaged": false
},
"system": "",
"type": "",
"uid": "",
"updateTime": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:parent/entities");
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 \"access\": {\n \"read\": \"\"\n },\n \"asset\": \"\",\n \"catalogEntry\": \"\",\n \"compatibility\": {\n \"bigquery\": {\n \"compatible\": false,\n \"reason\": \"\"\n },\n \"hiveMetastore\": {}\n },\n \"createTime\": \"\",\n \"dataPath\": \"\",\n \"dataPathPattern\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"etag\": \"\",\n \"format\": {\n \"compressionFormat\": \"\",\n \"csv\": {\n \"delimiter\": \"\",\n \"encoding\": \"\",\n \"headerRows\": 0,\n \"quote\": \"\"\n },\n \"format\": \"\",\n \"iceberg\": {\n \"metadataLocation\": \"\"\n },\n \"json\": {\n \"encoding\": \"\"\n },\n \"mimeType\": \"\"\n },\n \"id\": \"\",\n \"name\": \"\",\n \"schema\": {\n \"fields\": [\n {\n \"description\": \"\",\n \"fields\": [],\n \"mode\": \"\",\n \"name\": \"\",\n \"type\": \"\"\n }\n ],\n \"partitionFields\": [\n {\n \"name\": \"\",\n \"type\": \"\"\n }\n ],\n \"partitionStyle\": \"\",\n \"userManaged\": false\n },\n \"system\": \"\",\n \"type\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1/:parent/entities" {:content-type :json
:form-params {:access {:read ""}
:asset ""
:catalogEntry ""
:compatibility {:bigquery {:compatible false
:reason ""}
:hiveMetastore {}}
:createTime ""
:dataPath ""
:dataPathPattern ""
:description ""
:displayName ""
:etag ""
:format {:compressionFormat ""
:csv {:delimiter ""
:encoding ""
:headerRows 0
:quote ""}
:format ""
:iceberg {:metadataLocation ""}
:json {:encoding ""}
:mimeType ""}
:id ""
:name ""
:schema {:fields [{:description ""
:fields []
:mode ""
:name ""
:type ""}]
:partitionFields [{:name ""
:type ""}]
:partitionStyle ""
:userManaged false}
:system ""
:type ""
:uid ""
:updateTime ""}})
require "http/client"
url = "{{baseUrl}}/v1/:parent/entities"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"access\": {\n \"read\": \"\"\n },\n \"asset\": \"\",\n \"catalogEntry\": \"\",\n \"compatibility\": {\n \"bigquery\": {\n \"compatible\": false,\n \"reason\": \"\"\n },\n \"hiveMetastore\": {}\n },\n \"createTime\": \"\",\n \"dataPath\": \"\",\n \"dataPathPattern\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"etag\": \"\",\n \"format\": {\n \"compressionFormat\": \"\",\n \"csv\": {\n \"delimiter\": \"\",\n \"encoding\": \"\",\n \"headerRows\": 0,\n \"quote\": \"\"\n },\n \"format\": \"\",\n \"iceberg\": {\n \"metadataLocation\": \"\"\n },\n \"json\": {\n \"encoding\": \"\"\n },\n \"mimeType\": \"\"\n },\n \"id\": \"\",\n \"name\": \"\",\n \"schema\": {\n \"fields\": [\n {\n \"description\": \"\",\n \"fields\": [],\n \"mode\": \"\",\n \"name\": \"\",\n \"type\": \"\"\n }\n ],\n \"partitionFields\": [\n {\n \"name\": \"\",\n \"type\": \"\"\n }\n ],\n \"partitionStyle\": \"\",\n \"userManaged\": false\n },\n \"system\": \"\",\n \"type\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/v1/:parent/entities"),
Content = new StringContent("{\n \"access\": {\n \"read\": \"\"\n },\n \"asset\": \"\",\n \"catalogEntry\": \"\",\n \"compatibility\": {\n \"bigquery\": {\n \"compatible\": false,\n \"reason\": \"\"\n },\n \"hiveMetastore\": {}\n },\n \"createTime\": \"\",\n \"dataPath\": \"\",\n \"dataPathPattern\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"etag\": \"\",\n \"format\": {\n \"compressionFormat\": \"\",\n \"csv\": {\n \"delimiter\": \"\",\n \"encoding\": \"\",\n \"headerRows\": 0,\n \"quote\": \"\"\n },\n \"format\": \"\",\n \"iceberg\": {\n \"metadataLocation\": \"\"\n },\n \"json\": {\n \"encoding\": \"\"\n },\n \"mimeType\": \"\"\n },\n \"id\": \"\",\n \"name\": \"\",\n \"schema\": {\n \"fields\": [\n {\n \"description\": \"\",\n \"fields\": [],\n \"mode\": \"\",\n \"name\": \"\",\n \"type\": \"\"\n }\n ],\n \"partitionFields\": [\n {\n \"name\": \"\",\n \"type\": \"\"\n }\n ],\n \"partitionStyle\": \"\",\n \"userManaged\": false\n },\n \"system\": \"\",\n \"type\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/:parent/entities");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"access\": {\n \"read\": \"\"\n },\n \"asset\": \"\",\n \"catalogEntry\": \"\",\n \"compatibility\": {\n \"bigquery\": {\n \"compatible\": false,\n \"reason\": \"\"\n },\n \"hiveMetastore\": {}\n },\n \"createTime\": \"\",\n \"dataPath\": \"\",\n \"dataPathPattern\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"etag\": \"\",\n \"format\": {\n \"compressionFormat\": \"\",\n \"csv\": {\n \"delimiter\": \"\",\n \"encoding\": \"\",\n \"headerRows\": 0,\n \"quote\": \"\"\n },\n \"format\": \"\",\n \"iceberg\": {\n \"metadataLocation\": \"\"\n },\n \"json\": {\n \"encoding\": \"\"\n },\n \"mimeType\": \"\"\n },\n \"id\": \"\",\n \"name\": \"\",\n \"schema\": {\n \"fields\": [\n {\n \"description\": \"\",\n \"fields\": [],\n \"mode\": \"\",\n \"name\": \"\",\n \"type\": \"\"\n }\n ],\n \"partitionFields\": [\n {\n \"name\": \"\",\n \"type\": \"\"\n }\n ],\n \"partitionStyle\": \"\",\n \"userManaged\": false\n },\n \"system\": \"\",\n \"type\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/:parent/entities"
payload := strings.NewReader("{\n \"access\": {\n \"read\": \"\"\n },\n \"asset\": \"\",\n \"catalogEntry\": \"\",\n \"compatibility\": {\n \"bigquery\": {\n \"compatible\": false,\n \"reason\": \"\"\n },\n \"hiveMetastore\": {}\n },\n \"createTime\": \"\",\n \"dataPath\": \"\",\n \"dataPathPattern\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"etag\": \"\",\n \"format\": {\n \"compressionFormat\": \"\",\n \"csv\": {\n \"delimiter\": \"\",\n \"encoding\": \"\",\n \"headerRows\": 0,\n \"quote\": \"\"\n },\n \"format\": \"\",\n \"iceberg\": {\n \"metadataLocation\": \"\"\n },\n \"json\": {\n \"encoding\": \"\"\n },\n \"mimeType\": \"\"\n },\n \"id\": \"\",\n \"name\": \"\",\n \"schema\": {\n \"fields\": [\n {\n \"description\": \"\",\n \"fields\": [],\n \"mode\": \"\",\n \"name\": \"\",\n \"type\": \"\"\n }\n ],\n \"partitionFields\": [\n {\n \"name\": \"\",\n \"type\": \"\"\n }\n ],\n \"partitionStyle\": \"\",\n \"userManaged\": false\n },\n \"system\": \"\",\n \"type\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/v1/:parent/entities HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 992
{
"access": {
"read": ""
},
"asset": "",
"catalogEntry": "",
"compatibility": {
"bigquery": {
"compatible": false,
"reason": ""
},
"hiveMetastore": {}
},
"createTime": "",
"dataPath": "",
"dataPathPattern": "",
"description": "",
"displayName": "",
"etag": "",
"format": {
"compressionFormat": "",
"csv": {
"delimiter": "",
"encoding": "",
"headerRows": 0,
"quote": ""
},
"format": "",
"iceberg": {
"metadataLocation": ""
},
"json": {
"encoding": ""
},
"mimeType": ""
},
"id": "",
"name": "",
"schema": {
"fields": [
{
"description": "",
"fields": [],
"mode": "",
"name": "",
"type": ""
}
],
"partitionFields": [
{
"name": "",
"type": ""
}
],
"partitionStyle": "",
"userManaged": false
},
"system": "",
"type": "",
"uid": "",
"updateTime": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1/:parent/entities")
.setHeader("content-type", "application/json")
.setBody("{\n \"access\": {\n \"read\": \"\"\n },\n \"asset\": \"\",\n \"catalogEntry\": \"\",\n \"compatibility\": {\n \"bigquery\": {\n \"compatible\": false,\n \"reason\": \"\"\n },\n \"hiveMetastore\": {}\n },\n \"createTime\": \"\",\n \"dataPath\": \"\",\n \"dataPathPattern\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"etag\": \"\",\n \"format\": {\n \"compressionFormat\": \"\",\n \"csv\": {\n \"delimiter\": \"\",\n \"encoding\": \"\",\n \"headerRows\": 0,\n \"quote\": \"\"\n },\n \"format\": \"\",\n \"iceberg\": {\n \"metadataLocation\": \"\"\n },\n \"json\": {\n \"encoding\": \"\"\n },\n \"mimeType\": \"\"\n },\n \"id\": \"\",\n \"name\": \"\",\n \"schema\": {\n \"fields\": [\n {\n \"description\": \"\",\n \"fields\": [],\n \"mode\": \"\",\n \"name\": \"\",\n \"type\": \"\"\n }\n ],\n \"partitionFields\": [\n {\n \"name\": \"\",\n \"type\": \"\"\n }\n ],\n \"partitionStyle\": \"\",\n \"userManaged\": false\n },\n \"system\": \"\",\n \"type\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/:parent/entities"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"access\": {\n \"read\": \"\"\n },\n \"asset\": \"\",\n \"catalogEntry\": \"\",\n \"compatibility\": {\n \"bigquery\": {\n \"compatible\": false,\n \"reason\": \"\"\n },\n \"hiveMetastore\": {}\n },\n \"createTime\": \"\",\n \"dataPath\": \"\",\n \"dataPathPattern\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"etag\": \"\",\n \"format\": {\n \"compressionFormat\": \"\",\n \"csv\": {\n \"delimiter\": \"\",\n \"encoding\": \"\",\n \"headerRows\": 0,\n \"quote\": \"\"\n },\n \"format\": \"\",\n \"iceberg\": {\n \"metadataLocation\": \"\"\n },\n \"json\": {\n \"encoding\": \"\"\n },\n \"mimeType\": \"\"\n },\n \"id\": \"\",\n \"name\": \"\",\n \"schema\": {\n \"fields\": [\n {\n \"description\": \"\",\n \"fields\": [],\n \"mode\": \"\",\n \"name\": \"\",\n \"type\": \"\"\n }\n ],\n \"partitionFields\": [\n {\n \"name\": \"\",\n \"type\": \"\"\n }\n ],\n \"partitionStyle\": \"\",\n \"userManaged\": false\n },\n \"system\": \"\",\n \"type\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\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 \"access\": {\n \"read\": \"\"\n },\n \"asset\": \"\",\n \"catalogEntry\": \"\",\n \"compatibility\": {\n \"bigquery\": {\n \"compatible\": false,\n \"reason\": \"\"\n },\n \"hiveMetastore\": {}\n },\n \"createTime\": \"\",\n \"dataPath\": \"\",\n \"dataPathPattern\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"etag\": \"\",\n \"format\": {\n \"compressionFormat\": \"\",\n \"csv\": {\n \"delimiter\": \"\",\n \"encoding\": \"\",\n \"headerRows\": 0,\n \"quote\": \"\"\n },\n \"format\": \"\",\n \"iceberg\": {\n \"metadataLocation\": \"\"\n },\n \"json\": {\n \"encoding\": \"\"\n },\n \"mimeType\": \"\"\n },\n \"id\": \"\",\n \"name\": \"\",\n \"schema\": {\n \"fields\": [\n {\n \"description\": \"\",\n \"fields\": [],\n \"mode\": \"\",\n \"name\": \"\",\n \"type\": \"\"\n }\n ],\n \"partitionFields\": [\n {\n \"name\": \"\",\n \"type\": \"\"\n }\n ],\n \"partitionStyle\": \"\",\n \"userManaged\": false\n },\n \"system\": \"\",\n \"type\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/:parent/entities")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1/:parent/entities")
.header("content-type", "application/json")
.body("{\n \"access\": {\n \"read\": \"\"\n },\n \"asset\": \"\",\n \"catalogEntry\": \"\",\n \"compatibility\": {\n \"bigquery\": {\n \"compatible\": false,\n \"reason\": \"\"\n },\n \"hiveMetastore\": {}\n },\n \"createTime\": \"\",\n \"dataPath\": \"\",\n \"dataPathPattern\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"etag\": \"\",\n \"format\": {\n \"compressionFormat\": \"\",\n \"csv\": {\n \"delimiter\": \"\",\n \"encoding\": \"\",\n \"headerRows\": 0,\n \"quote\": \"\"\n },\n \"format\": \"\",\n \"iceberg\": {\n \"metadataLocation\": \"\"\n },\n \"json\": {\n \"encoding\": \"\"\n },\n \"mimeType\": \"\"\n },\n \"id\": \"\",\n \"name\": \"\",\n \"schema\": {\n \"fields\": [\n {\n \"description\": \"\",\n \"fields\": [],\n \"mode\": \"\",\n \"name\": \"\",\n \"type\": \"\"\n }\n ],\n \"partitionFields\": [\n {\n \"name\": \"\",\n \"type\": \"\"\n }\n ],\n \"partitionStyle\": \"\",\n \"userManaged\": false\n },\n \"system\": \"\",\n \"type\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}")
.asString();
const data = JSON.stringify({
access: {
read: ''
},
asset: '',
catalogEntry: '',
compatibility: {
bigquery: {
compatible: false,
reason: ''
},
hiveMetastore: {}
},
createTime: '',
dataPath: '',
dataPathPattern: '',
description: '',
displayName: '',
etag: '',
format: {
compressionFormat: '',
csv: {
delimiter: '',
encoding: '',
headerRows: 0,
quote: ''
},
format: '',
iceberg: {
metadataLocation: ''
},
json: {
encoding: ''
},
mimeType: ''
},
id: '',
name: '',
schema: {
fields: [
{
description: '',
fields: [],
mode: '',
name: '',
type: ''
}
],
partitionFields: [
{
name: '',
type: ''
}
],
partitionStyle: '',
userManaged: false
},
system: '',
type: '',
uid: '',
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}}/v1/:parent/entities');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:parent/entities',
headers: {'content-type': 'application/json'},
data: {
access: {read: ''},
asset: '',
catalogEntry: '',
compatibility: {bigquery: {compatible: false, reason: ''}, hiveMetastore: {}},
createTime: '',
dataPath: '',
dataPathPattern: '',
description: '',
displayName: '',
etag: '',
format: {
compressionFormat: '',
csv: {delimiter: '', encoding: '', headerRows: 0, quote: ''},
format: '',
iceberg: {metadataLocation: ''},
json: {encoding: ''},
mimeType: ''
},
id: '',
name: '',
schema: {
fields: [{description: '', fields: [], mode: '', name: '', type: ''}],
partitionFields: [{name: '', type: ''}],
partitionStyle: '',
userManaged: false
},
system: '',
type: '',
uid: '',
updateTime: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/:parent/entities';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"access":{"read":""},"asset":"","catalogEntry":"","compatibility":{"bigquery":{"compatible":false,"reason":""},"hiveMetastore":{}},"createTime":"","dataPath":"","dataPathPattern":"","description":"","displayName":"","etag":"","format":{"compressionFormat":"","csv":{"delimiter":"","encoding":"","headerRows":0,"quote":""},"format":"","iceberg":{"metadataLocation":""},"json":{"encoding":""},"mimeType":""},"id":"","name":"","schema":{"fields":[{"description":"","fields":[],"mode":"","name":"","type":""}],"partitionFields":[{"name":"","type":""}],"partitionStyle":"","userManaged":false},"system":"","type":"","uid":"","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}}/v1/:parent/entities',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "access": {\n "read": ""\n },\n "asset": "",\n "catalogEntry": "",\n "compatibility": {\n "bigquery": {\n "compatible": false,\n "reason": ""\n },\n "hiveMetastore": {}\n },\n "createTime": "",\n "dataPath": "",\n "dataPathPattern": "",\n "description": "",\n "displayName": "",\n "etag": "",\n "format": {\n "compressionFormat": "",\n "csv": {\n "delimiter": "",\n "encoding": "",\n "headerRows": 0,\n "quote": ""\n },\n "format": "",\n "iceberg": {\n "metadataLocation": ""\n },\n "json": {\n "encoding": ""\n },\n "mimeType": ""\n },\n "id": "",\n "name": "",\n "schema": {\n "fields": [\n {\n "description": "",\n "fields": [],\n "mode": "",\n "name": "",\n "type": ""\n }\n ],\n "partitionFields": [\n {\n "name": "",\n "type": ""\n }\n ],\n "partitionStyle": "",\n "userManaged": false\n },\n "system": "",\n "type": "",\n "uid": "",\n "updateTime": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"access\": {\n \"read\": \"\"\n },\n \"asset\": \"\",\n \"catalogEntry\": \"\",\n \"compatibility\": {\n \"bigquery\": {\n \"compatible\": false,\n \"reason\": \"\"\n },\n \"hiveMetastore\": {}\n },\n \"createTime\": \"\",\n \"dataPath\": \"\",\n \"dataPathPattern\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"etag\": \"\",\n \"format\": {\n \"compressionFormat\": \"\",\n \"csv\": {\n \"delimiter\": \"\",\n \"encoding\": \"\",\n \"headerRows\": 0,\n \"quote\": \"\"\n },\n \"format\": \"\",\n \"iceberg\": {\n \"metadataLocation\": \"\"\n },\n \"json\": {\n \"encoding\": \"\"\n },\n \"mimeType\": \"\"\n },\n \"id\": \"\",\n \"name\": \"\",\n \"schema\": {\n \"fields\": [\n {\n \"description\": \"\",\n \"fields\": [],\n \"mode\": \"\",\n \"name\": \"\",\n \"type\": \"\"\n }\n ],\n \"partitionFields\": [\n {\n \"name\": \"\",\n \"type\": \"\"\n }\n ],\n \"partitionStyle\": \"\",\n \"userManaged\": false\n },\n \"system\": \"\",\n \"type\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1/:parent/entities")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/:parent/entities',
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({
access: {read: ''},
asset: '',
catalogEntry: '',
compatibility: {bigquery: {compatible: false, reason: ''}, hiveMetastore: {}},
createTime: '',
dataPath: '',
dataPathPattern: '',
description: '',
displayName: '',
etag: '',
format: {
compressionFormat: '',
csv: {delimiter: '', encoding: '', headerRows: 0, quote: ''},
format: '',
iceberg: {metadataLocation: ''},
json: {encoding: ''},
mimeType: ''
},
id: '',
name: '',
schema: {
fields: [{description: '', fields: [], mode: '', name: '', type: ''}],
partitionFields: [{name: '', type: ''}],
partitionStyle: '',
userManaged: false
},
system: '',
type: '',
uid: '',
updateTime: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:parent/entities',
headers: {'content-type': 'application/json'},
body: {
access: {read: ''},
asset: '',
catalogEntry: '',
compatibility: {bigquery: {compatible: false, reason: ''}, hiveMetastore: {}},
createTime: '',
dataPath: '',
dataPathPattern: '',
description: '',
displayName: '',
etag: '',
format: {
compressionFormat: '',
csv: {delimiter: '', encoding: '', headerRows: 0, quote: ''},
format: '',
iceberg: {metadataLocation: ''},
json: {encoding: ''},
mimeType: ''
},
id: '',
name: '',
schema: {
fields: [{description: '', fields: [], mode: '', name: '', type: ''}],
partitionFields: [{name: '', type: ''}],
partitionStyle: '',
userManaged: false
},
system: '',
type: '',
uid: '',
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}}/v1/:parent/entities');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
access: {
read: ''
},
asset: '',
catalogEntry: '',
compatibility: {
bigquery: {
compatible: false,
reason: ''
},
hiveMetastore: {}
},
createTime: '',
dataPath: '',
dataPathPattern: '',
description: '',
displayName: '',
etag: '',
format: {
compressionFormat: '',
csv: {
delimiter: '',
encoding: '',
headerRows: 0,
quote: ''
},
format: '',
iceberg: {
metadataLocation: ''
},
json: {
encoding: ''
},
mimeType: ''
},
id: '',
name: '',
schema: {
fields: [
{
description: '',
fields: [],
mode: '',
name: '',
type: ''
}
],
partitionFields: [
{
name: '',
type: ''
}
],
partitionStyle: '',
userManaged: false
},
system: '',
type: '',
uid: '',
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}}/v1/:parent/entities',
headers: {'content-type': 'application/json'},
data: {
access: {read: ''},
asset: '',
catalogEntry: '',
compatibility: {bigquery: {compatible: false, reason: ''}, hiveMetastore: {}},
createTime: '',
dataPath: '',
dataPathPattern: '',
description: '',
displayName: '',
etag: '',
format: {
compressionFormat: '',
csv: {delimiter: '', encoding: '', headerRows: 0, quote: ''},
format: '',
iceberg: {metadataLocation: ''},
json: {encoding: ''},
mimeType: ''
},
id: '',
name: '',
schema: {
fields: [{description: '', fields: [], mode: '', name: '', type: ''}],
partitionFields: [{name: '', type: ''}],
partitionStyle: '',
userManaged: false
},
system: '',
type: '',
uid: '',
updateTime: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/:parent/entities';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"access":{"read":""},"asset":"","catalogEntry":"","compatibility":{"bigquery":{"compatible":false,"reason":""},"hiveMetastore":{}},"createTime":"","dataPath":"","dataPathPattern":"","description":"","displayName":"","etag":"","format":{"compressionFormat":"","csv":{"delimiter":"","encoding":"","headerRows":0,"quote":""},"format":"","iceberg":{"metadataLocation":""},"json":{"encoding":""},"mimeType":""},"id":"","name":"","schema":{"fields":[{"description":"","fields":[],"mode":"","name":"","type":""}],"partitionFields":[{"name":"","type":""}],"partitionStyle":"","userManaged":false},"system":"","type":"","uid":"","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 = @{ @"access": @{ @"read": @"" },
@"asset": @"",
@"catalogEntry": @"",
@"compatibility": @{ @"bigquery": @{ @"compatible": @NO, @"reason": @"" }, @"hiveMetastore": @{ } },
@"createTime": @"",
@"dataPath": @"",
@"dataPathPattern": @"",
@"description": @"",
@"displayName": @"",
@"etag": @"",
@"format": @{ @"compressionFormat": @"", @"csv": @{ @"delimiter": @"", @"encoding": @"", @"headerRows": @0, @"quote": @"" }, @"format": @"", @"iceberg": @{ @"metadataLocation": @"" }, @"json": @{ @"encoding": @"" }, @"mimeType": @"" },
@"id": @"",
@"name": @"",
@"schema": @{ @"fields": @[ @{ @"description": @"", @"fields": @[ ], @"mode": @"", @"name": @"", @"type": @"" } ], @"partitionFields": @[ @{ @"name": @"", @"type": @"" } ], @"partitionStyle": @"", @"userManaged": @NO },
@"system": @"",
@"type": @"",
@"uid": @"",
@"updateTime": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:parent/entities"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/:parent/entities" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"access\": {\n \"read\": \"\"\n },\n \"asset\": \"\",\n \"catalogEntry\": \"\",\n \"compatibility\": {\n \"bigquery\": {\n \"compatible\": false,\n \"reason\": \"\"\n },\n \"hiveMetastore\": {}\n },\n \"createTime\": \"\",\n \"dataPath\": \"\",\n \"dataPathPattern\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"etag\": \"\",\n \"format\": {\n \"compressionFormat\": \"\",\n \"csv\": {\n \"delimiter\": \"\",\n \"encoding\": \"\",\n \"headerRows\": 0,\n \"quote\": \"\"\n },\n \"format\": \"\",\n \"iceberg\": {\n \"metadataLocation\": \"\"\n },\n \"json\": {\n \"encoding\": \"\"\n },\n \"mimeType\": \"\"\n },\n \"id\": \"\",\n \"name\": \"\",\n \"schema\": {\n \"fields\": [\n {\n \"description\": \"\",\n \"fields\": [],\n \"mode\": \"\",\n \"name\": \"\",\n \"type\": \"\"\n }\n ],\n \"partitionFields\": [\n {\n \"name\": \"\",\n \"type\": \"\"\n }\n ],\n \"partitionStyle\": \"\",\n \"userManaged\": false\n },\n \"system\": \"\",\n \"type\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/:parent/entities",
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([
'access' => [
'read' => ''
],
'asset' => '',
'catalogEntry' => '',
'compatibility' => [
'bigquery' => [
'compatible' => null,
'reason' => ''
],
'hiveMetastore' => [
]
],
'createTime' => '',
'dataPath' => '',
'dataPathPattern' => '',
'description' => '',
'displayName' => '',
'etag' => '',
'format' => [
'compressionFormat' => '',
'csv' => [
'delimiter' => '',
'encoding' => '',
'headerRows' => 0,
'quote' => ''
],
'format' => '',
'iceberg' => [
'metadataLocation' => ''
],
'json' => [
'encoding' => ''
],
'mimeType' => ''
],
'id' => '',
'name' => '',
'schema' => [
'fields' => [
[
'description' => '',
'fields' => [
],
'mode' => '',
'name' => '',
'type' => ''
]
],
'partitionFields' => [
[
'name' => '',
'type' => ''
]
],
'partitionStyle' => '',
'userManaged' => null
],
'system' => '',
'type' => '',
'uid' => '',
'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}}/v1/:parent/entities', [
'body' => '{
"access": {
"read": ""
},
"asset": "",
"catalogEntry": "",
"compatibility": {
"bigquery": {
"compatible": false,
"reason": ""
},
"hiveMetastore": {}
},
"createTime": "",
"dataPath": "",
"dataPathPattern": "",
"description": "",
"displayName": "",
"etag": "",
"format": {
"compressionFormat": "",
"csv": {
"delimiter": "",
"encoding": "",
"headerRows": 0,
"quote": ""
},
"format": "",
"iceberg": {
"metadataLocation": ""
},
"json": {
"encoding": ""
},
"mimeType": ""
},
"id": "",
"name": "",
"schema": {
"fields": [
{
"description": "",
"fields": [],
"mode": "",
"name": "",
"type": ""
}
],
"partitionFields": [
{
"name": "",
"type": ""
}
],
"partitionStyle": "",
"userManaged": false
},
"system": "",
"type": "",
"uid": "",
"updateTime": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1/:parent/entities');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'access' => [
'read' => ''
],
'asset' => '',
'catalogEntry' => '',
'compatibility' => [
'bigquery' => [
'compatible' => null,
'reason' => ''
],
'hiveMetastore' => [
]
],
'createTime' => '',
'dataPath' => '',
'dataPathPattern' => '',
'description' => '',
'displayName' => '',
'etag' => '',
'format' => [
'compressionFormat' => '',
'csv' => [
'delimiter' => '',
'encoding' => '',
'headerRows' => 0,
'quote' => ''
],
'format' => '',
'iceberg' => [
'metadataLocation' => ''
],
'json' => [
'encoding' => ''
],
'mimeType' => ''
],
'id' => '',
'name' => '',
'schema' => [
'fields' => [
[
'description' => '',
'fields' => [
],
'mode' => '',
'name' => '',
'type' => ''
]
],
'partitionFields' => [
[
'name' => '',
'type' => ''
]
],
'partitionStyle' => '',
'userManaged' => null
],
'system' => '',
'type' => '',
'uid' => '',
'updateTime' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'access' => [
'read' => ''
],
'asset' => '',
'catalogEntry' => '',
'compatibility' => [
'bigquery' => [
'compatible' => null,
'reason' => ''
],
'hiveMetastore' => [
]
],
'createTime' => '',
'dataPath' => '',
'dataPathPattern' => '',
'description' => '',
'displayName' => '',
'etag' => '',
'format' => [
'compressionFormat' => '',
'csv' => [
'delimiter' => '',
'encoding' => '',
'headerRows' => 0,
'quote' => ''
],
'format' => '',
'iceberg' => [
'metadataLocation' => ''
],
'json' => [
'encoding' => ''
],
'mimeType' => ''
],
'id' => '',
'name' => '',
'schema' => [
'fields' => [
[
'description' => '',
'fields' => [
],
'mode' => '',
'name' => '',
'type' => ''
]
],
'partitionFields' => [
[
'name' => '',
'type' => ''
]
],
'partitionStyle' => '',
'userManaged' => null
],
'system' => '',
'type' => '',
'uid' => '',
'updateTime' => ''
]));
$request->setRequestUrl('{{baseUrl}}/v1/:parent/entities');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:parent/entities' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"access": {
"read": ""
},
"asset": "",
"catalogEntry": "",
"compatibility": {
"bigquery": {
"compatible": false,
"reason": ""
},
"hiveMetastore": {}
},
"createTime": "",
"dataPath": "",
"dataPathPattern": "",
"description": "",
"displayName": "",
"etag": "",
"format": {
"compressionFormat": "",
"csv": {
"delimiter": "",
"encoding": "",
"headerRows": 0,
"quote": ""
},
"format": "",
"iceberg": {
"metadataLocation": ""
},
"json": {
"encoding": ""
},
"mimeType": ""
},
"id": "",
"name": "",
"schema": {
"fields": [
{
"description": "",
"fields": [],
"mode": "",
"name": "",
"type": ""
}
],
"partitionFields": [
{
"name": "",
"type": ""
}
],
"partitionStyle": "",
"userManaged": false
},
"system": "",
"type": "",
"uid": "",
"updateTime": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:parent/entities' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"access": {
"read": ""
},
"asset": "",
"catalogEntry": "",
"compatibility": {
"bigquery": {
"compatible": false,
"reason": ""
},
"hiveMetastore": {}
},
"createTime": "",
"dataPath": "",
"dataPathPattern": "",
"description": "",
"displayName": "",
"etag": "",
"format": {
"compressionFormat": "",
"csv": {
"delimiter": "",
"encoding": "",
"headerRows": 0,
"quote": ""
},
"format": "",
"iceberg": {
"metadataLocation": ""
},
"json": {
"encoding": ""
},
"mimeType": ""
},
"id": "",
"name": "",
"schema": {
"fields": [
{
"description": "",
"fields": [],
"mode": "",
"name": "",
"type": ""
}
],
"partitionFields": [
{
"name": "",
"type": ""
}
],
"partitionStyle": "",
"userManaged": false
},
"system": "",
"type": "",
"uid": "",
"updateTime": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"access\": {\n \"read\": \"\"\n },\n \"asset\": \"\",\n \"catalogEntry\": \"\",\n \"compatibility\": {\n \"bigquery\": {\n \"compatible\": false,\n \"reason\": \"\"\n },\n \"hiveMetastore\": {}\n },\n \"createTime\": \"\",\n \"dataPath\": \"\",\n \"dataPathPattern\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"etag\": \"\",\n \"format\": {\n \"compressionFormat\": \"\",\n \"csv\": {\n \"delimiter\": \"\",\n \"encoding\": \"\",\n \"headerRows\": 0,\n \"quote\": \"\"\n },\n \"format\": \"\",\n \"iceberg\": {\n \"metadataLocation\": \"\"\n },\n \"json\": {\n \"encoding\": \"\"\n },\n \"mimeType\": \"\"\n },\n \"id\": \"\",\n \"name\": \"\",\n \"schema\": {\n \"fields\": [\n {\n \"description\": \"\",\n \"fields\": [],\n \"mode\": \"\",\n \"name\": \"\",\n \"type\": \"\"\n }\n ],\n \"partitionFields\": [\n {\n \"name\": \"\",\n \"type\": \"\"\n }\n ],\n \"partitionStyle\": \"\",\n \"userManaged\": false\n },\n \"system\": \"\",\n \"type\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1/:parent/entities", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/:parent/entities"
payload = {
"access": { "read": "" },
"asset": "",
"catalogEntry": "",
"compatibility": {
"bigquery": {
"compatible": False,
"reason": ""
},
"hiveMetastore": {}
},
"createTime": "",
"dataPath": "",
"dataPathPattern": "",
"description": "",
"displayName": "",
"etag": "",
"format": {
"compressionFormat": "",
"csv": {
"delimiter": "",
"encoding": "",
"headerRows": 0,
"quote": ""
},
"format": "",
"iceberg": { "metadataLocation": "" },
"json": { "encoding": "" },
"mimeType": ""
},
"id": "",
"name": "",
"schema": {
"fields": [
{
"description": "",
"fields": [],
"mode": "",
"name": "",
"type": ""
}
],
"partitionFields": [
{
"name": "",
"type": ""
}
],
"partitionStyle": "",
"userManaged": False
},
"system": "",
"type": "",
"uid": "",
"updateTime": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/:parent/entities"
payload <- "{\n \"access\": {\n \"read\": \"\"\n },\n \"asset\": \"\",\n \"catalogEntry\": \"\",\n \"compatibility\": {\n \"bigquery\": {\n \"compatible\": false,\n \"reason\": \"\"\n },\n \"hiveMetastore\": {}\n },\n \"createTime\": \"\",\n \"dataPath\": \"\",\n \"dataPathPattern\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"etag\": \"\",\n \"format\": {\n \"compressionFormat\": \"\",\n \"csv\": {\n \"delimiter\": \"\",\n \"encoding\": \"\",\n \"headerRows\": 0,\n \"quote\": \"\"\n },\n \"format\": \"\",\n \"iceberg\": {\n \"metadataLocation\": \"\"\n },\n \"json\": {\n \"encoding\": \"\"\n },\n \"mimeType\": \"\"\n },\n \"id\": \"\",\n \"name\": \"\",\n \"schema\": {\n \"fields\": [\n {\n \"description\": \"\",\n \"fields\": [],\n \"mode\": \"\",\n \"name\": \"\",\n \"type\": \"\"\n }\n ],\n \"partitionFields\": [\n {\n \"name\": \"\",\n \"type\": \"\"\n }\n ],\n \"partitionStyle\": \"\",\n \"userManaged\": false\n },\n \"system\": \"\",\n \"type\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/:parent/entities")
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 \"access\": {\n \"read\": \"\"\n },\n \"asset\": \"\",\n \"catalogEntry\": \"\",\n \"compatibility\": {\n \"bigquery\": {\n \"compatible\": false,\n \"reason\": \"\"\n },\n \"hiveMetastore\": {}\n },\n \"createTime\": \"\",\n \"dataPath\": \"\",\n \"dataPathPattern\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"etag\": \"\",\n \"format\": {\n \"compressionFormat\": \"\",\n \"csv\": {\n \"delimiter\": \"\",\n \"encoding\": \"\",\n \"headerRows\": 0,\n \"quote\": \"\"\n },\n \"format\": \"\",\n \"iceberg\": {\n \"metadataLocation\": \"\"\n },\n \"json\": {\n \"encoding\": \"\"\n },\n \"mimeType\": \"\"\n },\n \"id\": \"\",\n \"name\": \"\",\n \"schema\": {\n \"fields\": [\n {\n \"description\": \"\",\n \"fields\": [],\n \"mode\": \"\",\n \"name\": \"\",\n \"type\": \"\"\n }\n ],\n \"partitionFields\": [\n {\n \"name\": \"\",\n \"type\": \"\"\n }\n ],\n \"partitionStyle\": \"\",\n \"userManaged\": false\n },\n \"system\": \"\",\n \"type\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/v1/:parent/entities') do |req|
req.body = "{\n \"access\": {\n \"read\": \"\"\n },\n \"asset\": \"\",\n \"catalogEntry\": \"\",\n \"compatibility\": {\n \"bigquery\": {\n \"compatible\": false,\n \"reason\": \"\"\n },\n \"hiveMetastore\": {}\n },\n \"createTime\": \"\",\n \"dataPath\": \"\",\n \"dataPathPattern\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"etag\": \"\",\n \"format\": {\n \"compressionFormat\": \"\",\n \"csv\": {\n \"delimiter\": \"\",\n \"encoding\": \"\",\n \"headerRows\": 0,\n \"quote\": \"\"\n },\n \"format\": \"\",\n \"iceberg\": {\n \"metadataLocation\": \"\"\n },\n \"json\": {\n \"encoding\": \"\"\n },\n \"mimeType\": \"\"\n },\n \"id\": \"\",\n \"name\": \"\",\n \"schema\": {\n \"fields\": [\n {\n \"description\": \"\",\n \"fields\": [],\n \"mode\": \"\",\n \"name\": \"\",\n \"type\": \"\"\n }\n ],\n \"partitionFields\": [\n {\n \"name\": \"\",\n \"type\": \"\"\n }\n ],\n \"partitionStyle\": \"\",\n \"userManaged\": false\n },\n \"system\": \"\",\n \"type\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/:parent/entities";
let payload = json!({
"access": json!({"read": ""}),
"asset": "",
"catalogEntry": "",
"compatibility": json!({
"bigquery": json!({
"compatible": false,
"reason": ""
}),
"hiveMetastore": json!({})
}),
"createTime": "",
"dataPath": "",
"dataPathPattern": "",
"description": "",
"displayName": "",
"etag": "",
"format": json!({
"compressionFormat": "",
"csv": json!({
"delimiter": "",
"encoding": "",
"headerRows": 0,
"quote": ""
}),
"format": "",
"iceberg": json!({"metadataLocation": ""}),
"json": json!({"encoding": ""}),
"mimeType": ""
}),
"id": "",
"name": "",
"schema": json!({
"fields": (
json!({
"description": "",
"fields": (),
"mode": "",
"name": "",
"type": ""
})
),
"partitionFields": (
json!({
"name": "",
"type": ""
})
),
"partitionStyle": "",
"userManaged": false
}),
"system": "",
"type": "",
"uid": "",
"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}}/v1/:parent/entities \
--header 'content-type: application/json' \
--data '{
"access": {
"read": ""
},
"asset": "",
"catalogEntry": "",
"compatibility": {
"bigquery": {
"compatible": false,
"reason": ""
},
"hiveMetastore": {}
},
"createTime": "",
"dataPath": "",
"dataPathPattern": "",
"description": "",
"displayName": "",
"etag": "",
"format": {
"compressionFormat": "",
"csv": {
"delimiter": "",
"encoding": "",
"headerRows": 0,
"quote": ""
},
"format": "",
"iceberg": {
"metadataLocation": ""
},
"json": {
"encoding": ""
},
"mimeType": ""
},
"id": "",
"name": "",
"schema": {
"fields": [
{
"description": "",
"fields": [],
"mode": "",
"name": "",
"type": ""
}
],
"partitionFields": [
{
"name": "",
"type": ""
}
],
"partitionStyle": "",
"userManaged": false
},
"system": "",
"type": "",
"uid": "",
"updateTime": ""
}'
echo '{
"access": {
"read": ""
},
"asset": "",
"catalogEntry": "",
"compatibility": {
"bigquery": {
"compatible": false,
"reason": ""
},
"hiveMetastore": {}
},
"createTime": "",
"dataPath": "",
"dataPathPattern": "",
"description": "",
"displayName": "",
"etag": "",
"format": {
"compressionFormat": "",
"csv": {
"delimiter": "",
"encoding": "",
"headerRows": 0,
"quote": ""
},
"format": "",
"iceberg": {
"metadataLocation": ""
},
"json": {
"encoding": ""
},
"mimeType": ""
},
"id": "",
"name": "",
"schema": {
"fields": [
{
"description": "",
"fields": [],
"mode": "",
"name": "",
"type": ""
}
],
"partitionFields": [
{
"name": "",
"type": ""
}
],
"partitionStyle": "",
"userManaged": false
},
"system": "",
"type": "",
"uid": "",
"updateTime": ""
}' | \
http POST {{baseUrl}}/v1/:parent/entities \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "access": {\n "read": ""\n },\n "asset": "",\n "catalogEntry": "",\n "compatibility": {\n "bigquery": {\n "compatible": false,\n "reason": ""\n },\n "hiveMetastore": {}\n },\n "createTime": "",\n "dataPath": "",\n "dataPathPattern": "",\n "description": "",\n "displayName": "",\n "etag": "",\n "format": {\n "compressionFormat": "",\n "csv": {\n "delimiter": "",\n "encoding": "",\n "headerRows": 0,\n "quote": ""\n },\n "format": "",\n "iceberg": {\n "metadataLocation": ""\n },\n "json": {\n "encoding": ""\n },\n "mimeType": ""\n },\n "id": "",\n "name": "",\n "schema": {\n "fields": [\n {\n "description": "",\n "fields": [],\n "mode": "",\n "name": "",\n "type": ""\n }\n ],\n "partitionFields": [\n {\n "name": "",\n "type": ""\n }\n ],\n "partitionStyle": "",\n "userManaged": false\n },\n "system": "",\n "type": "",\n "uid": "",\n "updateTime": ""\n}' \
--output-document \
- {{baseUrl}}/v1/:parent/entities
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"access": ["read": ""],
"asset": "",
"catalogEntry": "",
"compatibility": [
"bigquery": [
"compatible": false,
"reason": ""
],
"hiveMetastore": []
],
"createTime": "",
"dataPath": "",
"dataPathPattern": "",
"description": "",
"displayName": "",
"etag": "",
"format": [
"compressionFormat": "",
"csv": [
"delimiter": "",
"encoding": "",
"headerRows": 0,
"quote": ""
],
"format": "",
"iceberg": ["metadataLocation": ""],
"json": ["encoding": ""],
"mimeType": ""
],
"id": "",
"name": "",
"schema": [
"fields": [
[
"description": "",
"fields": [],
"mode": "",
"name": "",
"type": ""
]
],
"partitionFields": [
[
"name": "",
"type": ""
]
],
"partitionStyle": "",
"userManaged": false
],
"system": "",
"type": "",
"uid": "",
"updateTime": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:parent/entities")! 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
dataplex.projects.locations.lakes.zones.entities.list
{{baseUrl}}/v1/:parent/entities
QUERY PARAMS
parent
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:parent/entities");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v1/:parent/entities")
require "http/client"
url = "{{baseUrl}}/v1/:parent/entities"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/v1/:parent/entities"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/:parent/entities");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/:parent/entities"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/v1/:parent/entities HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1/:parent/entities")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/:parent/entities"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/:parent/entities")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1/:parent/entities")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/v1/:parent/entities');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/v1/:parent/entities'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/:parent/entities';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/:parent/entities',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1/:parent/entities")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/:parent/entities',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'GET', url: '{{baseUrl}}/v1/:parent/entities'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v1/:parent/entities');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {method: 'GET', url: '{{baseUrl}}/v1/:parent/entities'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/:parent/entities';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:parent/entities"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/:parent/entities" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/:parent/entities",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/v1/:parent/entities');
echo $response->getBody();
setUrl('{{baseUrl}}/v1/:parent/entities');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/:parent/entities');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:parent/entities' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:parent/entities' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v1/:parent/entities")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/:parent/entities"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/:parent/entities"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/:parent/entities")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/v1/:parent/entities') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/:parent/entities";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/v1/:parent/entities
http GET {{baseUrl}}/v1/:parent/entities
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v1/:parent/entities
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:parent/entities")! 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
dataplex.projects.locations.lakes.zones.entities.partitions.create
{{baseUrl}}/v1/:parent/partitions
QUERY PARAMS
parent
BODY json
{
"etag": "",
"location": "",
"name": "",
"values": []
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:parent/partitions");
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 \"etag\": \"\",\n \"location\": \"\",\n \"name\": \"\",\n \"values\": []\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1/:parent/partitions" {:content-type :json
:form-params {:etag ""
:location ""
:name ""
:values []}})
require "http/client"
url = "{{baseUrl}}/v1/:parent/partitions"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"etag\": \"\",\n \"location\": \"\",\n \"name\": \"\",\n \"values\": []\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/v1/:parent/partitions"),
Content = new StringContent("{\n \"etag\": \"\",\n \"location\": \"\",\n \"name\": \"\",\n \"values\": []\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/:parent/partitions");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"etag\": \"\",\n \"location\": \"\",\n \"name\": \"\",\n \"values\": []\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/:parent/partitions"
payload := strings.NewReader("{\n \"etag\": \"\",\n \"location\": \"\",\n \"name\": \"\",\n \"values\": []\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/v1/:parent/partitions HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 64
{
"etag": "",
"location": "",
"name": "",
"values": []
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1/:parent/partitions")
.setHeader("content-type", "application/json")
.setBody("{\n \"etag\": \"\",\n \"location\": \"\",\n \"name\": \"\",\n \"values\": []\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/:parent/partitions"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"etag\": \"\",\n \"location\": \"\",\n \"name\": \"\",\n \"values\": []\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 \"etag\": \"\",\n \"location\": \"\",\n \"name\": \"\",\n \"values\": []\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/:parent/partitions")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1/:parent/partitions")
.header("content-type", "application/json")
.body("{\n \"etag\": \"\",\n \"location\": \"\",\n \"name\": \"\",\n \"values\": []\n}")
.asString();
const data = JSON.stringify({
etag: '',
location: '',
name: '',
values: []
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v1/:parent/partitions');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:parent/partitions',
headers: {'content-type': 'application/json'},
data: {etag: '', location: '', name: '', values: []}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/:parent/partitions';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"etag":"","location":"","name":"","values":[]}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/:parent/partitions',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "etag": "",\n "location": "",\n "name": "",\n "values": []\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"etag\": \"\",\n \"location\": \"\",\n \"name\": \"\",\n \"values\": []\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1/:parent/partitions")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/:parent/partitions',
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({etag: '', location: '', name: '', values: []}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:parent/partitions',
headers: {'content-type': 'application/json'},
body: {etag: '', location: '', name: '', values: []},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/v1/:parent/partitions');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
etag: '',
location: '',
name: '',
values: []
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:parent/partitions',
headers: {'content-type': 'application/json'},
data: {etag: '', location: '', name: '', values: []}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/:parent/partitions';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"etag":"","location":"","name":"","values":[]}'
};
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 = @{ @"etag": @"",
@"location": @"",
@"name": @"",
@"values": @[ ] };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:parent/partitions"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/:parent/partitions" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"etag\": \"\",\n \"location\": \"\",\n \"name\": \"\",\n \"values\": []\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/:parent/partitions",
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([
'etag' => '',
'location' => '',
'name' => '',
'values' => [
]
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/v1/:parent/partitions', [
'body' => '{
"etag": "",
"location": "",
"name": "",
"values": []
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1/:parent/partitions');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'etag' => '',
'location' => '',
'name' => '',
'values' => [
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'etag' => '',
'location' => '',
'name' => '',
'values' => [
]
]));
$request->setRequestUrl('{{baseUrl}}/v1/:parent/partitions');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:parent/partitions' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"etag": "",
"location": "",
"name": "",
"values": []
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:parent/partitions' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"etag": "",
"location": "",
"name": "",
"values": []
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"etag\": \"\",\n \"location\": \"\",\n \"name\": \"\",\n \"values\": []\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1/:parent/partitions", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/:parent/partitions"
payload = {
"etag": "",
"location": "",
"name": "",
"values": []
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/:parent/partitions"
payload <- "{\n \"etag\": \"\",\n \"location\": \"\",\n \"name\": \"\",\n \"values\": []\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/:parent/partitions")
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 \"etag\": \"\",\n \"location\": \"\",\n \"name\": \"\",\n \"values\": []\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/v1/:parent/partitions') do |req|
req.body = "{\n \"etag\": \"\",\n \"location\": \"\",\n \"name\": \"\",\n \"values\": []\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/:parent/partitions";
let payload = json!({
"etag": "",
"location": "",
"name": "",
"values": ()
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/v1/:parent/partitions \
--header 'content-type: application/json' \
--data '{
"etag": "",
"location": "",
"name": "",
"values": []
}'
echo '{
"etag": "",
"location": "",
"name": "",
"values": []
}' | \
http POST {{baseUrl}}/v1/:parent/partitions \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "etag": "",\n "location": "",\n "name": "",\n "values": []\n}' \
--output-document \
- {{baseUrl}}/v1/:parent/partitions
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"etag": "",
"location": "",
"name": "",
"values": []
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:parent/partitions")! 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
dataplex.projects.locations.lakes.zones.entities.partitions.list
{{baseUrl}}/v1/:parent/partitions
QUERY PARAMS
parent
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:parent/partitions");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v1/:parent/partitions")
require "http/client"
url = "{{baseUrl}}/v1/:parent/partitions"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/v1/:parent/partitions"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/:parent/partitions");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/:parent/partitions"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/v1/:parent/partitions HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1/:parent/partitions")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/:parent/partitions"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/:parent/partitions")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1/:parent/partitions")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/v1/:parent/partitions');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/v1/:parent/partitions'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/:parent/partitions';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/:parent/partitions',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1/:parent/partitions")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/:parent/partitions',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'GET', url: '{{baseUrl}}/v1/:parent/partitions'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v1/:parent/partitions');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {method: 'GET', url: '{{baseUrl}}/v1/:parent/partitions'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/:parent/partitions';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:parent/partitions"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/:parent/partitions" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/:parent/partitions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/v1/:parent/partitions');
echo $response->getBody();
setUrl('{{baseUrl}}/v1/:parent/partitions');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/:parent/partitions');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:parent/partitions' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:parent/partitions' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v1/:parent/partitions")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/:parent/partitions"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/:parent/partitions"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/:parent/partitions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/v1/:parent/partitions') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/:parent/partitions";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/v1/:parent/partitions
http GET {{baseUrl}}/v1/:parent/partitions
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v1/:parent/partitions
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:parent/partitions")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PUT
dataplex.projects.locations.lakes.zones.entities.update
{{baseUrl}}/v1/:name
QUERY PARAMS
name
BODY json
{
"access": {
"read": ""
},
"asset": "",
"catalogEntry": "",
"compatibility": {
"bigquery": {
"compatible": false,
"reason": ""
},
"hiveMetastore": {}
},
"createTime": "",
"dataPath": "",
"dataPathPattern": "",
"description": "",
"displayName": "",
"etag": "",
"format": {
"compressionFormat": "",
"csv": {
"delimiter": "",
"encoding": "",
"headerRows": 0,
"quote": ""
},
"format": "",
"iceberg": {
"metadataLocation": ""
},
"json": {
"encoding": ""
},
"mimeType": ""
},
"id": "",
"name": "",
"schema": {
"fields": [
{
"description": "",
"fields": [],
"mode": "",
"name": "",
"type": ""
}
],
"partitionFields": [
{
"name": "",
"type": ""
}
],
"partitionStyle": "",
"userManaged": false
},
"system": "",
"type": "",
"uid": "",
"updateTime": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:name");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"access\": {\n \"read\": \"\"\n },\n \"asset\": \"\",\n \"catalogEntry\": \"\",\n \"compatibility\": {\n \"bigquery\": {\n \"compatible\": false,\n \"reason\": \"\"\n },\n \"hiveMetastore\": {}\n },\n \"createTime\": \"\",\n \"dataPath\": \"\",\n \"dataPathPattern\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"etag\": \"\",\n \"format\": {\n \"compressionFormat\": \"\",\n \"csv\": {\n \"delimiter\": \"\",\n \"encoding\": \"\",\n \"headerRows\": 0,\n \"quote\": \"\"\n },\n \"format\": \"\",\n \"iceberg\": {\n \"metadataLocation\": \"\"\n },\n \"json\": {\n \"encoding\": \"\"\n },\n \"mimeType\": \"\"\n },\n \"id\": \"\",\n \"name\": \"\",\n \"schema\": {\n \"fields\": [\n {\n \"description\": \"\",\n \"fields\": [],\n \"mode\": \"\",\n \"name\": \"\",\n \"type\": \"\"\n }\n ],\n \"partitionFields\": [\n {\n \"name\": \"\",\n \"type\": \"\"\n }\n ],\n \"partitionStyle\": \"\",\n \"userManaged\": false\n },\n \"system\": \"\",\n \"type\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/v1/:name" {:content-type :json
:form-params {:access {:read ""}
:asset ""
:catalogEntry ""
:compatibility {:bigquery {:compatible false
:reason ""}
:hiveMetastore {}}
:createTime ""
:dataPath ""
:dataPathPattern ""
:description ""
:displayName ""
:etag ""
:format {:compressionFormat ""
:csv {:delimiter ""
:encoding ""
:headerRows 0
:quote ""}
:format ""
:iceberg {:metadataLocation ""}
:json {:encoding ""}
:mimeType ""}
:id ""
:name ""
:schema {:fields [{:description ""
:fields []
:mode ""
:name ""
:type ""}]
:partitionFields [{:name ""
:type ""}]
:partitionStyle ""
:userManaged false}
:system ""
:type ""
:uid ""
:updateTime ""}})
require "http/client"
url = "{{baseUrl}}/v1/:name"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"access\": {\n \"read\": \"\"\n },\n \"asset\": \"\",\n \"catalogEntry\": \"\",\n \"compatibility\": {\n \"bigquery\": {\n \"compatible\": false,\n \"reason\": \"\"\n },\n \"hiveMetastore\": {}\n },\n \"createTime\": \"\",\n \"dataPath\": \"\",\n \"dataPathPattern\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"etag\": \"\",\n \"format\": {\n \"compressionFormat\": \"\",\n \"csv\": {\n \"delimiter\": \"\",\n \"encoding\": \"\",\n \"headerRows\": 0,\n \"quote\": \"\"\n },\n \"format\": \"\",\n \"iceberg\": {\n \"metadataLocation\": \"\"\n },\n \"json\": {\n \"encoding\": \"\"\n },\n \"mimeType\": \"\"\n },\n \"id\": \"\",\n \"name\": \"\",\n \"schema\": {\n \"fields\": [\n {\n \"description\": \"\",\n \"fields\": [],\n \"mode\": \"\",\n \"name\": \"\",\n \"type\": \"\"\n }\n ],\n \"partitionFields\": [\n {\n \"name\": \"\",\n \"type\": \"\"\n }\n ],\n \"partitionStyle\": \"\",\n \"userManaged\": false\n },\n \"system\": \"\",\n \"type\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}"
response = HTTP::Client.put url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Put,
RequestUri = new Uri("{{baseUrl}}/v1/:name"),
Content = new StringContent("{\n \"access\": {\n \"read\": \"\"\n },\n \"asset\": \"\",\n \"catalogEntry\": \"\",\n \"compatibility\": {\n \"bigquery\": {\n \"compatible\": false,\n \"reason\": \"\"\n },\n \"hiveMetastore\": {}\n },\n \"createTime\": \"\",\n \"dataPath\": \"\",\n \"dataPathPattern\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"etag\": \"\",\n \"format\": {\n \"compressionFormat\": \"\",\n \"csv\": {\n \"delimiter\": \"\",\n \"encoding\": \"\",\n \"headerRows\": 0,\n \"quote\": \"\"\n },\n \"format\": \"\",\n \"iceberg\": {\n \"metadataLocation\": \"\"\n },\n \"json\": {\n \"encoding\": \"\"\n },\n \"mimeType\": \"\"\n },\n \"id\": \"\",\n \"name\": \"\",\n \"schema\": {\n \"fields\": [\n {\n \"description\": \"\",\n \"fields\": [],\n \"mode\": \"\",\n \"name\": \"\",\n \"type\": \"\"\n }\n ],\n \"partitionFields\": [\n {\n \"name\": \"\",\n \"type\": \"\"\n }\n ],\n \"partitionStyle\": \"\",\n \"userManaged\": false\n },\n \"system\": \"\",\n \"type\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/:name");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"access\": {\n \"read\": \"\"\n },\n \"asset\": \"\",\n \"catalogEntry\": \"\",\n \"compatibility\": {\n \"bigquery\": {\n \"compatible\": false,\n \"reason\": \"\"\n },\n \"hiveMetastore\": {}\n },\n \"createTime\": \"\",\n \"dataPath\": \"\",\n \"dataPathPattern\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"etag\": \"\",\n \"format\": {\n \"compressionFormat\": \"\",\n \"csv\": {\n \"delimiter\": \"\",\n \"encoding\": \"\",\n \"headerRows\": 0,\n \"quote\": \"\"\n },\n \"format\": \"\",\n \"iceberg\": {\n \"metadataLocation\": \"\"\n },\n \"json\": {\n \"encoding\": \"\"\n },\n \"mimeType\": \"\"\n },\n \"id\": \"\",\n \"name\": \"\",\n \"schema\": {\n \"fields\": [\n {\n \"description\": \"\",\n \"fields\": [],\n \"mode\": \"\",\n \"name\": \"\",\n \"type\": \"\"\n }\n ],\n \"partitionFields\": [\n {\n \"name\": \"\",\n \"type\": \"\"\n }\n ],\n \"partitionStyle\": \"\",\n \"userManaged\": false\n },\n \"system\": \"\",\n \"type\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/:name"
payload := strings.NewReader("{\n \"access\": {\n \"read\": \"\"\n },\n \"asset\": \"\",\n \"catalogEntry\": \"\",\n \"compatibility\": {\n \"bigquery\": {\n \"compatible\": false,\n \"reason\": \"\"\n },\n \"hiveMetastore\": {}\n },\n \"createTime\": \"\",\n \"dataPath\": \"\",\n \"dataPathPattern\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"etag\": \"\",\n \"format\": {\n \"compressionFormat\": \"\",\n \"csv\": {\n \"delimiter\": \"\",\n \"encoding\": \"\",\n \"headerRows\": 0,\n \"quote\": \"\"\n },\n \"format\": \"\",\n \"iceberg\": {\n \"metadataLocation\": \"\"\n },\n \"json\": {\n \"encoding\": \"\"\n },\n \"mimeType\": \"\"\n },\n \"id\": \"\",\n \"name\": \"\",\n \"schema\": {\n \"fields\": [\n {\n \"description\": \"\",\n \"fields\": [],\n \"mode\": \"\",\n \"name\": \"\",\n \"type\": \"\"\n }\n ],\n \"partitionFields\": [\n {\n \"name\": \"\",\n \"type\": \"\"\n }\n ],\n \"partitionStyle\": \"\",\n \"userManaged\": false\n },\n \"system\": \"\",\n \"type\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
PUT /baseUrl/v1/:name HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 992
{
"access": {
"read": ""
},
"asset": "",
"catalogEntry": "",
"compatibility": {
"bigquery": {
"compatible": false,
"reason": ""
},
"hiveMetastore": {}
},
"createTime": "",
"dataPath": "",
"dataPathPattern": "",
"description": "",
"displayName": "",
"etag": "",
"format": {
"compressionFormat": "",
"csv": {
"delimiter": "",
"encoding": "",
"headerRows": 0,
"quote": ""
},
"format": "",
"iceberg": {
"metadataLocation": ""
},
"json": {
"encoding": ""
},
"mimeType": ""
},
"id": "",
"name": "",
"schema": {
"fields": [
{
"description": "",
"fields": [],
"mode": "",
"name": "",
"type": ""
}
],
"partitionFields": [
{
"name": "",
"type": ""
}
],
"partitionStyle": "",
"userManaged": false
},
"system": "",
"type": "",
"uid": "",
"updateTime": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/v1/:name")
.setHeader("content-type", "application/json")
.setBody("{\n \"access\": {\n \"read\": \"\"\n },\n \"asset\": \"\",\n \"catalogEntry\": \"\",\n \"compatibility\": {\n \"bigquery\": {\n \"compatible\": false,\n \"reason\": \"\"\n },\n \"hiveMetastore\": {}\n },\n \"createTime\": \"\",\n \"dataPath\": \"\",\n \"dataPathPattern\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"etag\": \"\",\n \"format\": {\n \"compressionFormat\": \"\",\n \"csv\": {\n \"delimiter\": \"\",\n \"encoding\": \"\",\n \"headerRows\": 0,\n \"quote\": \"\"\n },\n \"format\": \"\",\n \"iceberg\": {\n \"metadataLocation\": \"\"\n },\n \"json\": {\n \"encoding\": \"\"\n },\n \"mimeType\": \"\"\n },\n \"id\": \"\",\n \"name\": \"\",\n \"schema\": {\n \"fields\": [\n {\n \"description\": \"\",\n \"fields\": [],\n \"mode\": \"\",\n \"name\": \"\",\n \"type\": \"\"\n }\n ],\n \"partitionFields\": [\n {\n \"name\": \"\",\n \"type\": \"\"\n }\n ],\n \"partitionStyle\": \"\",\n \"userManaged\": false\n },\n \"system\": \"\",\n \"type\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/:name"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"access\": {\n \"read\": \"\"\n },\n \"asset\": \"\",\n \"catalogEntry\": \"\",\n \"compatibility\": {\n \"bigquery\": {\n \"compatible\": false,\n \"reason\": \"\"\n },\n \"hiveMetastore\": {}\n },\n \"createTime\": \"\",\n \"dataPath\": \"\",\n \"dataPathPattern\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"etag\": \"\",\n \"format\": {\n \"compressionFormat\": \"\",\n \"csv\": {\n \"delimiter\": \"\",\n \"encoding\": \"\",\n \"headerRows\": 0,\n \"quote\": \"\"\n },\n \"format\": \"\",\n \"iceberg\": {\n \"metadataLocation\": \"\"\n },\n \"json\": {\n \"encoding\": \"\"\n },\n \"mimeType\": \"\"\n },\n \"id\": \"\",\n \"name\": \"\",\n \"schema\": {\n \"fields\": [\n {\n \"description\": \"\",\n \"fields\": [],\n \"mode\": \"\",\n \"name\": \"\",\n \"type\": \"\"\n }\n ],\n \"partitionFields\": [\n {\n \"name\": \"\",\n \"type\": \"\"\n }\n ],\n \"partitionStyle\": \"\",\n \"userManaged\": false\n },\n \"system\": \"\",\n \"type\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\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 \"access\": {\n \"read\": \"\"\n },\n \"asset\": \"\",\n \"catalogEntry\": \"\",\n \"compatibility\": {\n \"bigquery\": {\n \"compatible\": false,\n \"reason\": \"\"\n },\n \"hiveMetastore\": {}\n },\n \"createTime\": \"\",\n \"dataPath\": \"\",\n \"dataPathPattern\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"etag\": \"\",\n \"format\": {\n \"compressionFormat\": \"\",\n \"csv\": {\n \"delimiter\": \"\",\n \"encoding\": \"\",\n \"headerRows\": 0,\n \"quote\": \"\"\n },\n \"format\": \"\",\n \"iceberg\": {\n \"metadataLocation\": \"\"\n },\n \"json\": {\n \"encoding\": \"\"\n },\n \"mimeType\": \"\"\n },\n \"id\": \"\",\n \"name\": \"\",\n \"schema\": {\n \"fields\": [\n {\n \"description\": \"\",\n \"fields\": [],\n \"mode\": \"\",\n \"name\": \"\",\n \"type\": \"\"\n }\n ],\n \"partitionFields\": [\n {\n \"name\": \"\",\n \"type\": \"\"\n }\n ],\n \"partitionStyle\": \"\",\n \"userManaged\": false\n },\n \"system\": \"\",\n \"type\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/:name")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/v1/:name")
.header("content-type", "application/json")
.body("{\n \"access\": {\n \"read\": \"\"\n },\n \"asset\": \"\",\n \"catalogEntry\": \"\",\n \"compatibility\": {\n \"bigquery\": {\n \"compatible\": false,\n \"reason\": \"\"\n },\n \"hiveMetastore\": {}\n },\n \"createTime\": \"\",\n \"dataPath\": \"\",\n \"dataPathPattern\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"etag\": \"\",\n \"format\": {\n \"compressionFormat\": \"\",\n \"csv\": {\n \"delimiter\": \"\",\n \"encoding\": \"\",\n \"headerRows\": 0,\n \"quote\": \"\"\n },\n \"format\": \"\",\n \"iceberg\": {\n \"metadataLocation\": \"\"\n },\n \"json\": {\n \"encoding\": \"\"\n },\n \"mimeType\": \"\"\n },\n \"id\": \"\",\n \"name\": \"\",\n \"schema\": {\n \"fields\": [\n {\n \"description\": \"\",\n \"fields\": [],\n \"mode\": \"\",\n \"name\": \"\",\n \"type\": \"\"\n }\n ],\n \"partitionFields\": [\n {\n \"name\": \"\",\n \"type\": \"\"\n }\n ],\n \"partitionStyle\": \"\",\n \"userManaged\": false\n },\n \"system\": \"\",\n \"type\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}")
.asString();
const data = JSON.stringify({
access: {
read: ''
},
asset: '',
catalogEntry: '',
compatibility: {
bigquery: {
compatible: false,
reason: ''
},
hiveMetastore: {}
},
createTime: '',
dataPath: '',
dataPathPattern: '',
description: '',
displayName: '',
etag: '',
format: {
compressionFormat: '',
csv: {
delimiter: '',
encoding: '',
headerRows: 0,
quote: ''
},
format: '',
iceberg: {
metadataLocation: ''
},
json: {
encoding: ''
},
mimeType: ''
},
id: '',
name: '',
schema: {
fields: [
{
description: '',
fields: [],
mode: '',
name: '',
type: ''
}
],
partitionFields: [
{
name: '',
type: ''
}
],
partitionStyle: '',
userManaged: false
},
system: '',
type: '',
uid: '',
updateTime: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/v1/:name');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/v1/:name',
headers: {'content-type': 'application/json'},
data: {
access: {read: ''},
asset: '',
catalogEntry: '',
compatibility: {bigquery: {compatible: false, reason: ''}, hiveMetastore: {}},
createTime: '',
dataPath: '',
dataPathPattern: '',
description: '',
displayName: '',
etag: '',
format: {
compressionFormat: '',
csv: {delimiter: '', encoding: '', headerRows: 0, quote: ''},
format: '',
iceberg: {metadataLocation: ''},
json: {encoding: ''},
mimeType: ''
},
id: '',
name: '',
schema: {
fields: [{description: '', fields: [], mode: '', name: '', type: ''}],
partitionFields: [{name: '', type: ''}],
partitionStyle: '',
userManaged: false
},
system: '',
type: '',
uid: '',
updateTime: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/:name';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"access":{"read":""},"asset":"","catalogEntry":"","compatibility":{"bigquery":{"compatible":false,"reason":""},"hiveMetastore":{}},"createTime":"","dataPath":"","dataPathPattern":"","description":"","displayName":"","etag":"","format":{"compressionFormat":"","csv":{"delimiter":"","encoding":"","headerRows":0,"quote":""},"format":"","iceberg":{"metadataLocation":""},"json":{"encoding":""},"mimeType":""},"id":"","name":"","schema":{"fields":[{"description":"","fields":[],"mode":"","name":"","type":""}],"partitionFields":[{"name":"","type":""}],"partitionStyle":"","userManaged":false},"system":"","type":"","uid":"","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}}/v1/:name',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "access": {\n "read": ""\n },\n "asset": "",\n "catalogEntry": "",\n "compatibility": {\n "bigquery": {\n "compatible": false,\n "reason": ""\n },\n "hiveMetastore": {}\n },\n "createTime": "",\n "dataPath": "",\n "dataPathPattern": "",\n "description": "",\n "displayName": "",\n "etag": "",\n "format": {\n "compressionFormat": "",\n "csv": {\n "delimiter": "",\n "encoding": "",\n "headerRows": 0,\n "quote": ""\n },\n "format": "",\n "iceberg": {\n "metadataLocation": ""\n },\n "json": {\n "encoding": ""\n },\n "mimeType": ""\n },\n "id": "",\n "name": "",\n "schema": {\n "fields": [\n {\n "description": "",\n "fields": [],\n "mode": "",\n "name": "",\n "type": ""\n }\n ],\n "partitionFields": [\n {\n "name": "",\n "type": ""\n }\n ],\n "partitionStyle": "",\n "userManaged": false\n },\n "system": "",\n "type": "",\n "uid": "",\n "updateTime": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"access\": {\n \"read\": \"\"\n },\n \"asset\": \"\",\n \"catalogEntry\": \"\",\n \"compatibility\": {\n \"bigquery\": {\n \"compatible\": false,\n \"reason\": \"\"\n },\n \"hiveMetastore\": {}\n },\n \"createTime\": \"\",\n \"dataPath\": \"\",\n \"dataPathPattern\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"etag\": \"\",\n \"format\": {\n \"compressionFormat\": \"\",\n \"csv\": {\n \"delimiter\": \"\",\n \"encoding\": \"\",\n \"headerRows\": 0,\n \"quote\": \"\"\n },\n \"format\": \"\",\n \"iceberg\": {\n \"metadataLocation\": \"\"\n },\n \"json\": {\n \"encoding\": \"\"\n },\n \"mimeType\": \"\"\n },\n \"id\": \"\",\n \"name\": \"\",\n \"schema\": {\n \"fields\": [\n {\n \"description\": \"\",\n \"fields\": [],\n \"mode\": \"\",\n \"name\": \"\",\n \"type\": \"\"\n }\n ],\n \"partitionFields\": [\n {\n \"name\": \"\",\n \"type\": \"\"\n }\n ],\n \"partitionStyle\": \"\",\n \"userManaged\": false\n },\n \"system\": \"\",\n \"type\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1/:name")
.put(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PUT',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/:name',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
access: {read: ''},
asset: '',
catalogEntry: '',
compatibility: {bigquery: {compatible: false, reason: ''}, hiveMetastore: {}},
createTime: '',
dataPath: '',
dataPathPattern: '',
description: '',
displayName: '',
etag: '',
format: {
compressionFormat: '',
csv: {delimiter: '', encoding: '', headerRows: 0, quote: ''},
format: '',
iceberg: {metadataLocation: ''},
json: {encoding: ''},
mimeType: ''
},
id: '',
name: '',
schema: {
fields: [{description: '', fields: [], mode: '', name: '', type: ''}],
partitionFields: [{name: '', type: ''}],
partitionStyle: '',
userManaged: false
},
system: '',
type: '',
uid: '',
updateTime: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/v1/:name',
headers: {'content-type': 'application/json'},
body: {
access: {read: ''},
asset: '',
catalogEntry: '',
compatibility: {bigquery: {compatible: false, reason: ''}, hiveMetastore: {}},
createTime: '',
dataPath: '',
dataPathPattern: '',
description: '',
displayName: '',
etag: '',
format: {
compressionFormat: '',
csv: {delimiter: '', encoding: '', headerRows: 0, quote: ''},
format: '',
iceberg: {metadataLocation: ''},
json: {encoding: ''},
mimeType: ''
},
id: '',
name: '',
schema: {
fields: [{description: '', fields: [], mode: '', name: '', type: ''}],
partitionFields: [{name: '', type: ''}],
partitionStyle: '',
userManaged: false
},
system: '',
type: '',
uid: '',
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('PUT', '{{baseUrl}}/v1/:name');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
access: {
read: ''
},
asset: '',
catalogEntry: '',
compatibility: {
bigquery: {
compatible: false,
reason: ''
},
hiveMetastore: {}
},
createTime: '',
dataPath: '',
dataPathPattern: '',
description: '',
displayName: '',
etag: '',
format: {
compressionFormat: '',
csv: {
delimiter: '',
encoding: '',
headerRows: 0,
quote: ''
},
format: '',
iceberg: {
metadataLocation: ''
},
json: {
encoding: ''
},
mimeType: ''
},
id: '',
name: '',
schema: {
fields: [
{
description: '',
fields: [],
mode: '',
name: '',
type: ''
}
],
partitionFields: [
{
name: '',
type: ''
}
],
partitionStyle: '',
userManaged: false
},
system: '',
type: '',
uid: '',
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: 'PUT',
url: '{{baseUrl}}/v1/:name',
headers: {'content-type': 'application/json'},
data: {
access: {read: ''},
asset: '',
catalogEntry: '',
compatibility: {bigquery: {compatible: false, reason: ''}, hiveMetastore: {}},
createTime: '',
dataPath: '',
dataPathPattern: '',
description: '',
displayName: '',
etag: '',
format: {
compressionFormat: '',
csv: {delimiter: '', encoding: '', headerRows: 0, quote: ''},
format: '',
iceberg: {metadataLocation: ''},
json: {encoding: ''},
mimeType: ''
},
id: '',
name: '',
schema: {
fields: [{description: '', fields: [], mode: '', name: '', type: ''}],
partitionFields: [{name: '', type: ''}],
partitionStyle: '',
userManaged: false
},
system: '',
type: '',
uid: '',
updateTime: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/:name';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"access":{"read":""},"asset":"","catalogEntry":"","compatibility":{"bigquery":{"compatible":false,"reason":""},"hiveMetastore":{}},"createTime":"","dataPath":"","dataPathPattern":"","description":"","displayName":"","etag":"","format":{"compressionFormat":"","csv":{"delimiter":"","encoding":"","headerRows":0,"quote":""},"format":"","iceberg":{"metadataLocation":""},"json":{"encoding":""},"mimeType":""},"id":"","name":"","schema":{"fields":[{"description":"","fields":[],"mode":"","name":"","type":""}],"partitionFields":[{"name":"","type":""}],"partitionStyle":"","userManaged":false},"system":"","type":"","uid":"","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 = @{ @"access": @{ @"read": @"" },
@"asset": @"",
@"catalogEntry": @"",
@"compatibility": @{ @"bigquery": @{ @"compatible": @NO, @"reason": @"" }, @"hiveMetastore": @{ } },
@"createTime": @"",
@"dataPath": @"",
@"dataPathPattern": @"",
@"description": @"",
@"displayName": @"",
@"etag": @"",
@"format": @{ @"compressionFormat": @"", @"csv": @{ @"delimiter": @"", @"encoding": @"", @"headerRows": @0, @"quote": @"" }, @"format": @"", @"iceberg": @{ @"metadataLocation": @"" }, @"json": @{ @"encoding": @"" }, @"mimeType": @"" },
@"id": @"",
@"name": @"",
@"schema": @{ @"fields": @[ @{ @"description": @"", @"fields": @[ ], @"mode": @"", @"name": @"", @"type": @"" } ], @"partitionFields": @[ @{ @"name": @"", @"type": @"" } ], @"partitionStyle": @"", @"userManaged": @NO },
@"system": @"",
@"type": @"",
@"uid": @"",
@"updateTime": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:name"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/:name" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"access\": {\n \"read\": \"\"\n },\n \"asset\": \"\",\n \"catalogEntry\": \"\",\n \"compatibility\": {\n \"bigquery\": {\n \"compatible\": false,\n \"reason\": \"\"\n },\n \"hiveMetastore\": {}\n },\n \"createTime\": \"\",\n \"dataPath\": \"\",\n \"dataPathPattern\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"etag\": \"\",\n \"format\": {\n \"compressionFormat\": \"\",\n \"csv\": {\n \"delimiter\": \"\",\n \"encoding\": \"\",\n \"headerRows\": 0,\n \"quote\": \"\"\n },\n \"format\": \"\",\n \"iceberg\": {\n \"metadataLocation\": \"\"\n },\n \"json\": {\n \"encoding\": \"\"\n },\n \"mimeType\": \"\"\n },\n \"id\": \"\",\n \"name\": \"\",\n \"schema\": {\n \"fields\": [\n {\n \"description\": \"\",\n \"fields\": [],\n \"mode\": \"\",\n \"name\": \"\",\n \"type\": \"\"\n }\n ],\n \"partitionFields\": [\n {\n \"name\": \"\",\n \"type\": \"\"\n }\n ],\n \"partitionStyle\": \"\",\n \"userManaged\": false\n },\n \"system\": \"\",\n \"type\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/:name",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'access' => [
'read' => ''
],
'asset' => '',
'catalogEntry' => '',
'compatibility' => [
'bigquery' => [
'compatible' => null,
'reason' => ''
],
'hiveMetastore' => [
]
],
'createTime' => '',
'dataPath' => '',
'dataPathPattern' => '',
'description' => '',
'displayName' => '',
'etag' => '',
'format' => [
'compressionFormat' => '',
'csv' => [
'delimiter' => '',
'encoding' => '',
'headerRows' => 0,
'quote' => ''
],
'format' => '',
'iceberg' => [
'metadataLocation' => ''
],
'json' => [
'encoding' => ''
],
'mimeType' => ''
],
'id' => '',
'name' => '',
'schema' => [
'fields' => [
[
'description' => '',
'fields' => [
],
'mode' => '',
'name' => '',
'type' => ''
]
],
'partitionFields' => [
[
'name' => '',
'type' => ''
]
],
'partitionStyle' => '',
'userManaged' => null
],
'system' => '',
'type' => '',
'uid' => '',
'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('PUT', '{{baseUrl}}/v1/:name', [
'body' => '{
"access": {
"read": ""
},
"asset": "",
"catalogEntry": "",
"compatibility": {
"bigquery": {
"compatible": false,
"reason": ""
},
"hiveMetastore": {}
},
"createTime": "",
"dataPath": "",
"dataPathPattern": "",
"description": "",
"displayName": "",
"etag": "",
"format": {
"compressionFormat": "",
"csv": {
"delimiter": "",
"encoding": "",
"headerRows": 0,
"quote": ""
},
"format": "",
"iceberg": {
"metadataLocation": ""
},
"json": {
"encoding": ""
},
"mimeType": ""
},
"id": "",
"name": "",
"schema": {
"fields": [
{
"description": "",
"fields": [],
"mode": "",
"name": "",
"type": ""
}
],
"partitionFields": [
{
"name": "",
"type": ""
}
],
"partitionStyle": "",
"userManaged": false
},
"system": "",
"type": "",
"uid": "",
"updateTime": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1/:name');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'access' => [
'read' => ''
],
'asset' => '',
'catalogEntry' => '',
'compatibility' => [
'bigquery' => [
'compatible' => null,
'reason' => ''
],
'hiveMetastore' => [
]
],
'createTime' => '',
'dataPath' => '',
'dataPathPattern' => '',
'description' => '',
'displayName' => '',
'etag' => '',
'format' => [
'compressionFormat' => '',
'csv' => [
'delimiter' => '',
'encoding' => '',
'headerRows' => 0,
'quote' => ''
],
'format' => '',
'iceberg' => [
'metadataLocation' => ''
],
'json' => [
'encoding' => ''
],
'mimeType' => ''
],
'id' => '',
'name' => '',
'schema' => [
'fields' => [
[
'description' => '',
'fields' => [
],
'mode' => '',
'name' => '',
'type' => ''
]
],
'partitionFields' => [
[
'name' => '',
'type' => ''
]
],
'partitionStyle' => '',
'userManaged' => null
],
'system' => '',
'type' => '',
'uid' => '',
'updateTime' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'access' => [
'read' => ''
],
'asset' => '',
'catalogEntry' => '',
'compatibility' => [
'bigquery' => [
'compatible' => null,
'reason' => ''
],
'hiveMetastore' => [
]
],
'createTime' => '',
'dataPath' => '',
'dataPathPattern' => '',
'description' => '',
'displayName' => '',
'etag' => '',
'format' => [
'compressionFormat' => '',
'csv' => [
'delimiter' => '',
'encoding' => '',
'headerRows' => 0,
'quote' => ''
],
'format' => '',
'iceberg' => [
'metadataLocation' => ''
],
'json' => [
'encoding' => ''
],
'mimeType' => ''
],
'id' => '',
'name' => '',
'schema' => [
'fields' => [
[
'description' => '',
'fields' => [
],
'mode' => '',
'name' => '',
'type' => ''
]
],
'partitionFields' => [
[
'name' => '',
'type' => ''
]
],
'partitionStyle' => '',
'userManaged' => null
],
'system' => '',
'type' => '',
'uid' => '',
'updateTime' => ''
]));
$request->setRequestUrl('{{baseUrl}}/v1/:name');
$request->setRequestMethod('PUT');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:name' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"access": {
"read": ""
},
"asset": "",
"catalogEntry": "",
"compatibility": {
"bigquery": {
"compatible": false,
"reason": ""
},
"hiveMetastore": {}
},
"createTime": "",
"dataPath": "",
"dataPathPattern": "",
"description": "",
"displayName": "",
"etag": "",
"format": {
"compressionFormat": "",
"csv": {
"delimiter": "",
"encoding": "",
"headerRows": 0,
"quote": ""
},
"format": "",
"iceberg": {
"metadataLocation": ""
},
"json": {
"encoding": ""
},
"mimeType": ""
},
"id": "",
"name": "",
"schema": {
"fields": [
{
"description": "",
"fields": [],
"mode": "",
"name": "",
"type": ""
}
],
"partitionFields": [
{
"name": "",
"type": ""
}
],
"partitionStyle": "",
"userManaged": false
},
"system": "",
"type": "",
"uid": "",
"updateTime": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:name' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"access": {
"read": ""
},
"asset": "",
"catalogEntry": "",
"compatibility": {
"bigquery": {
"compatible": false,
"reason": ""
},
"hiveMetastore": {}
},
"createTime": "",
"dataPath": "",
"dataPathPattern": "",
"description": "",
"displayName": "",
"etag": "",
"format": {
"compressionFormat": "",
"csv": {
"delimiter": "",
"encoding": "",
"headerRows": 0,
"quote": ""
},
"format": "",
"iceberg": {
"metadataLocation": ""
},
"json": {
"encoding": ""
},
"mimeType": ""
},
"id": "",
"name": "",
"schema": {
"fields": [
{
"description": "",
"fields": [],
"mode": "",
"name": "",
"type": ""
}
],
"partitionFields": [
{
"name": "",
"type": ""
}
],
"partitionStyle": "",
"userManaged": false
},
"system": "",
"type": "",
"uid": "",
"updateTime": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"access\": {\n \"read\": \"\"\n },\n \"asset\": \"\",\n \"catalogEntry\": \"\",\n \"compatibility\": {\n \"bigquery\": {\n \"compatible\": false,\n \"reason\": \"\"\n },\n \"hiveMetastore\": {}\n },\n \"createTime\": \"\",\n \"dataPath\": \"\",\n \"dataPathPattern\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"etag\": \"\",\n \"format\": {\n \"compressionFormat\": \"\",\n \"csv\": {\n \"delimiter\": \"\",\n \"encoding\": \"\",\n \"headerRows\": 0,\n \"quote\": \"\"\n },\n \"format\": \"\",\n \"iceberg\": {\n \"metadataLocation\": \"\"\n },\n \"json\": {\n \"encoding\": \"\"\n },\n \"mimeType\": \"\"\n },\n \"id\": \"\",\n \"name\": \"\",\n \"schema\": {\n \"fields\": [\n {\n \"description\": \"\",\n \"fields\": [],\n \"mode\": \"\",\n \"name\": \"\",\n \"type\": \"\"\n }\n ],\n \"partitionFields\": [\n {\n \"name\": \"\",\n \"type\": \"\"\n }\n ],\n \"partitionStyle\": \"\",\n \"userManaged\": false\n },\n \"system\": \"\",\n \"type\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/v1/:name", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/:name"
payload = {
"access": { "read": "" },
"asset": "",
"catalogEntry": "",
"compatibility": {
"bigquery": {
"compatible": False,
"reason": ""
},
"hiveMetastore": {}
},
"createTime": "",
"dataPath": "",
"dataPathPattern": "",
"description": "",
"displayName": "",
"etag": "",
"format": {
"compressionFormat": "",
"csv": {
"delimiter": "",
"encoding": "",
"headerRows": 0,
"quote": ""
},
"format": "",
"iceberg": { "metadataLocation": "" },
"json": { "encoding": "" },
"mimeType": ""
},
"id": "",
"name": "",
"schema": {
"fields": [
{
"description": "",
"fields": [],
"mode": "",
"name": "",
"type": ""
}
],
"partitionFields": [
{
"name": "",
"type": ""
}
],
"partitionStyle": "",
"userManaged": False
},
"system": "",
"type": "",
"uid": "",
"updateTime": ""
}
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/:name"
payload <- "{\n \"access\": {\n \"read\": \"\"\n },\n \"asset\": \"\",\n \"catalogEntry\": \"\",\n \"compatibility\": {\n \"bigquery\": {\n \"compatible\": false,\n \"reason\": \"\"\n },\n \"hiveMetastore\": {}\n },\n \"createTime\": \"\",\n \"dataPath\": \"\",\n \"dataPathPattern\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"etag\": \"\",\n \"format\": {\n \"compressionFormat\": \"\",\n \"csv\": {\n \"delimiter\": \"\",\n \"encoding\": \"\",\n \"headerRows\": 0,\n \"quote\": \"\"\n },\n \"format\": \"\",\n \"iceberg\": {\n \"metadataLocation\": \"\"\n },\n \"json\": {\n \"encoding\": \"\"\n },\n \"mimeType\": \"\"\n },\n \"id\": \"\",\n \"name\": \"\",\n \"schema\": {\n \"fields\": [\n {\n \"description\": \"\",\n \"fields\": [],\n \"mode\": \"\",\n \"name\": \"\",\n \"type\": \"\"\n }\n ],\n \"partitionFields\": [\n {\n \"name\": \"\",\n \"type\": \"\"\n }\n ],\n \"partitionStyle\": \"\",\n \"userManaged\": false\n },\n \"system\": \"\",\n \"type\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}"
encode <- "json"
response <- VERB("PUT", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/:name")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"access\": {\n \"read\": \"\"\n },\n \"asset\": \"\",\n \"catalogEntry\": \"\",\n \"compatibility\": {\n \"bigquery\": {\n \"compatible\": false,\n \"reason\": \"\"\n },\n \"hiveMetastore\": {}\n },\n \"createTime\": \"\",\n \"dataPath\": \"\",\n \"dataPathPattern\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"etag\": \"\",\n \"format\": {\n \"compressionFormat\": \"\",\n \"csv\": {\n \"delimiter\": \"\",\n \"encoding\": \"\",\n \"headerRows\": 0,\n \"quote\": \"\"\n },\n \"format\": \"\",\n \"iceberg\": {\n \"metadataLocation\": \"\"\n },\n \"json\": {\n \"encoding\": \"\"\n },\n \"mimeType\": \"\"\n },\n \"id\": \"\",\n \"name\": \"\",\n \"schema\": {\n \"fields\": [\n {\n \"description\": \"\",\n \"fields\": [],\n \"mode\": \"\",\n \"name\": \"\",\n \"type\": \"\"\n }\n ],\n \"partitionFields\": [\n {\n \"name\": \"\",\n \"type\": \"\"\n }\n ],\n \"partitionStyle\": \"\",\n \"userManaged\": false\n },\n \"system\": \"\",\n \"type\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.put('/baseUrl/v1/:name') do |req|
req.body = "{\n \"access\": {\n \"read\": \"\"\n },\n \"asset\": \"\",\n \"catalogEntry\": \"\",\n \"compatibility\": {\n \"bigquery\": {\n \"compatible\": false,\n \"reason\": \"\"\n },\n \"hiveMetastore\": {}\n },\n \"createTime\": \"\",\n \"dataPath\": \"\",\n \"dataPathPattern\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"etag\": \"\",\n \"format\": {\n \"compressionFormat\": \"\",\n \"csv\": {\n \"delimiter\": \"\",\n \"encoding\": \"\",\n \"headerRows\": 0,\n \"quote\": \"\"\n },\n \"format\": \"\",\n \"iceberg\": {\n \"metadataLocation\": \"\"\n },\n \"json\": {\n \"encoding\": \"\"\n },\n \"mimeType\": \"\"\n },\n \"id\": \"\",\n \"name\": \"\",\n \"schema\": {\n \"fields\": [\n {\n \"description\": \"\",\n \"fields\": [],\n \"mode\": \"\",\n \"name\": \"\",\n \"type\": \"\"\n }\n ],\n \"partitionFields\": [\n {\n \"name\": \"\",\n \"type\": \"\"\n }\n ],\n \"partitionStyle\": \"\",\n \"userManaged\": false\n },\n \"system\": \"\",\n \"type\": \"\",\n \"uid\": \"\",\n \"updateTime\": \"\"\n}"
end
puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/:name";
let payload = json!({
"access": json!({"read": ""}),
"asset": "",
"catalogEntry": "",
"compatibility": json!({
"bigquery": json!({
"compatible": false,
"reason": ""
}),
"hiveMetastore": json!({})
}),
"createTime": "",
"dataPath": "",
"dataPathPattern": "",
"description": "",
"displayName": "",
"etag": "",
"format": json!({
"compressionFormat": "",
"csv": json!({
"delimiter": "",
"encoding": "",
"headerRows": 0,
"quote": ""
}),
"format": "",
"iceberg": json!({"metadataLocation": ""}),
"json": json!({"encoding": ""}),
"mimeType": ""
}),
"id": "",
"name": "",
"schema": json!({
"fields": (
json!({
"description": "",
"fields": (),
"mode": "",
"name": "",
"type": ""
})
),
"partitionFields": (
json!({
"name": "",
"type": ""
})
),
"partitionStyle": "",
"userManaged": false
}),
"system": "",
"type": "",
"uid": "",
"updateTime": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/v1/:name \
--header 'content-type: application/json' \
--data '{
"access": {
"read": ""
},
"asset": "",
"catalogEntry": "",
"compatibility": {
"bigquery": {
"compatible": false,
"reason": ""
},
"hiveMetastore": {}
},
"createTime": "",
"dataPath": "",
"dataPathPattern": "",
"description": "",
"displayName": "",
"etag": "",
"format": {
"compressionFormat": "",
"csv": {
"delimiter": "",
"encoding": "",
"headerRows": 0,
"quote": ""
},
"format": "",
"iceberg": {
"metadataLocation": ""
},
"json": {
"encoding": ""
},
"mimeType": ""
},
"id": "",
"name": "",
"schema": {
"fields": [
{
"description": "",
"fields": [],
"mode": "",
"name": "",
"type": ""
}
],
"partitionFields": [
{
"name": "",
"type": ""
}
],
"partitionStyle": "",
"userManaged": false
},
"system": "",
"type": "",
"uid": "",
"updateTime": ""
}'
echo '{
"access": {
"read": ""
},
"asset": "",
"catalogEntry": "",
"compatibility": {
"bigquery": {
"compatible": false,
"reason": ""
},
"hiveMetastore": {}
},
"createTime": "",
"dataPath": "",
"dataPathPattern": "",
"description": "",
"displayName": "",
"etag": "",
"format": {
"compressionFormat": "",
"csv": {
"delimiter": "",
"encoding": "",
"headerRows": 0,
"quote": ""
},
"format": "",
"iceberg": {
"metadataLocation": ""
},
"json": {
"encoding": ""
},
"mimeType": ""
},
"id": "",
"name": "",
"schema": {
"fields": [
{
"description": "",
"fields": [],
"mode": "",
"name": "",
"type": ""
}
],
"partitionFields": [
{
"name": "",
"type": ""
}
],
"partitionStyle": "",
"userManaged": false
},
"system": "",
"type": "",
"uid": "",
"updateTime": ""
}' | \
http PUT {{baseUrl}}/v1/:name \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '{\n "access": {\n "read": ""\n },\n "asset": "",\n "catalogEntry": "",\n "compatibility": {\n "bigquery": {\n "compatible": false,\n "reason": ""\n },\n "hiveMetastore": {}\n },\n "createTime": "",\n "dataPath": "",\n "dataPathPattern": "",\n "description": "",\n "displayName": "",\n "etag": "",\n "format": {\n "compressionFormat": "",\n "csv": {\n "delimiter": "",\n "encoding": "",\n "headerRows": 0,\n "quote": ""\n },\n "format": "",\n "iceberg": {\n "metadataLocation": ""\n },\n "json": {\n "encoding": ""\n },\n "mimeType": ""\n },\n "id": "",\n "name": "",\n "schema": {\n "fields": [\n {\n "description": "",\n "fields": [],\n "mode": "",\n "name": "",\n "type": ""\n }\n ],\n "partitionFields": [\n {\n "name": "",\n "type": ""\n }\n ],\n "partitionStyle": "",\n "userManaged": false\n },\n "system": "",\n "type": "",\n "uid": "",\n "updateTime": ""\n}' \
--output-document \
- {{baseUrl}}/v1/:name
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"access": ["read": ""],
"asset": "",
"catalogEntry": "",
"compatibility": [
"bigquery": [
"compatible": false,
"reason": ""
],
"hiveMetastore": []
],
"createTime": "",
"dataPath": "",
"dataPathPattern": "",
"description": "",
"displayName": "",
"etag": "",
"format": [
"compressionFormat": "",
"csv": [
"delimiter": "",
"encoding": "",
"headerRows": 0,
"quote": ""
],
"format": "",
"iceberg": ["metadataLocation": ""],
"json": ["encoding": ""],
"mimeType": ""
],
"id": "",
"name": "",
"schema": [
"fields": [
[
"description": "",
"fields": [],
"mode": "",
"name": "",
"type": ""
]
],
"partitionFields": [
[
"name": "",
"type": ""
]
],
"partitionStyle": "",
"userManaged": false
],
"system": "",
"type": "",
"uid": "",
"updateTime": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:name")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
dataplex.projects.locations.lakes.zones.list
{{baseUrl}}/v1/:parent/zones
QUERY PARAMS
parent
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:parent/zones");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v1/:parent/zones")
require "http/client"
url = "{{baseUrl}}/v1/:parent/zones"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/v1/:parent/zones"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/:parent/zones");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/:parent/zones"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/v1/:parent/zones HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1/:parent/zones")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/:parent/zones"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/:parent/zones")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1/:parent/zones")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/v1/:parent/zones');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/v1/:parent/zones'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/:parent/zones';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/:parent/zones',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1/:parent/zones")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/:parent/zones',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'GET', url: '{{baseUrl}}/v1/:parent/zones'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v1/:parent/zones');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {method: 'GET', url: '{{baseUrl}}/v1/:parent/zones'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/:parent/zones';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:parent/zones"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/:parent/zones" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/:parent/zones",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/v1/:parent/zones');
echo $response->getBody();
setUrl('{{baseUrl}}/v1/:parent/zones');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/:parent/zones');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:parent/zones' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:parent/zones' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v1/:parent/zones")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/:parent/zones"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/:parent/zones"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/:parent/zones")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/v1/:parent/zones') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/:parent/zones";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/v1/:parent/zones
http GET {{baseUrl}}/v1/:parent/zones
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v1/:parent/zones
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:parent/zones")! 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
dataplex.projects.locations.list
{{baseUrl}}/v1/:name/locations
QUERY PARAMS
name
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:name/locations");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v1/:name/locations")
require "http/client"
url = "{{baseUrl}}/v1/:name/locations"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/v1/:name/locations"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/:name/locations");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/:name/locations"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/v1/:name/locations HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1/:name/locations")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/:name/locations"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/:name/locations")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1/:name/locations")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/v1/:name/locations');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/v1/:name/locations'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/:name/locations';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/:name/locations',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1/:name/locations")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/:name/locations',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'GET', url: '{{baseUrl}}/v1/:name/locations'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v1/:name/locations');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {method: 'GET', url: '{{baseUrl}}/v1/:name/locations'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/:name/locations';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:name/locations"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/:name/locations" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/:name/locations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/v1/:name/locations');
echo $response->getBody();
setUrl('{{baseUrl}}/v1/:name/locations');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/:name/locations');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:name/locations' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:name/locations' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v1/:name/locations")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/:name/locations"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/:name/locations"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/:name/locations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/v1/:name/locations') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/:name/locations";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/v1/:name/locations
http GET {{baseUrl}}/v1/:name/locations
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v1/:name/locations
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:name/locations")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
dataplex.projects.locations.operations.cancel
{{baseUrl}}/v1/:name:cancel
QUERY PARAMS
name
BODY json
{}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:name:cancel");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1/:name:cancel" {:content-type :json})
require "http/client"
url = "{{baseUrl}}/v1/:name:cancel"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/v1/:name:cancel"),
Content = new StringContent("{}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/:name:cancel");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/:name:cancel"
payload := strings.NewReader("{}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/v1/:name:cancel HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 2
{}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1/:name:cancel")
.setHeader("content-type", "application/json")
.setBody("{}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/:name:cancel"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/:name:cancel")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1/:name:cancel")
.header("content-type", "application/json")
.body("{}")
.asString();
const data = JSON.stringify({});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v1/:name:cancel');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:name:cancel',
headers: {'content-type': 'application/json'},
data: {}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/:name:cancel';
const options = {method: 'POST', headers: {'content-type': 'application/json'}, body: '{}'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/:name:cancel',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{}")
val request = Request.Builder()
.url("{{baseUrl}}/v1/:name:cancel")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/:name:cancel',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:name:cancel',
headers: {'content-type': 'application/json'},
body: {},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/v1/:name:cancel');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:name:cancel',
headers: {'content-type': 'application/json'},
data: {}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/:name:cancel';
const options = {method: 'POST', headers: {'content-type': 'application/json'}, body: '{}'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:name:cancel"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/:name:cancel" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/:name:cancel",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/v1/:name:cancel', [
'body' => '{}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1/:name:cancel');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
]));
$request->setRequestUrl('{{baseUrl}}/v1/:name:cancel');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:name:cancel' -Method POST -Headers $headers -ContentType 'application/json' -Body '{}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:name:cancel' -Method POST -Headers $headers -ContentType 'application/json' -Body '{}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1/:name:cancel", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/:name:cancel"
payload = {}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/:name:cancel"
payload <- "{}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/:name:cancel")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/v1/:name:cancel') do |req|
req.body = "{}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/:name:cancel";
let payload = json!({});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/v1/:name:cancel \
--header 'content-type: application/json' \
--data '{}'
echo '{}' | \
http POST {{baseUrl}}/v1/:name:cancel \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{}' \
--output-document \
- {{baseUrl}}/v1/:name:cancel
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:name:cancel")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
DELETE
dataplex.projects.locations.operations.delete
{{baseUrl}}/v1/:name
QUERY PARAMS
name
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:name");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/v1/:name")
require "http/client"
url = "{{baseUrl}}/v1/:name"
response = HTTP::Client.delete url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Delete,
RequestUri = new Uri("{{baseUrl}}/v1/:name"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/:name");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/:name"
req, _ := http.NewRequest("DELETE", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
DELETE /baseUrl/v1/:name HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/v1/:name")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/:name"))
.method("DELETE", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/:name")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/v1/:name")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('DELETE', '{{baseUrl}}/v1/:name');
xhr.send(data);
import axios from 'axios';
const options = {method: 'DELETE', url: '{{baseUrl}}/v1/:name'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/:name';
const options = {method: 'DELETE'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/:name',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1/:name")
.delete(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/:name',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'DELETE', url: '{{baseUrl}}/v1/:name'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/v1/:name');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {method: 'DELETE', url: '{{baseUrl}}/v1/:name'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/:name';
const options = {method: 'DELETE'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:name"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"DELETE"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/:name" in
Client.call `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/:name",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('DELETE', '{{baseUrl}}/v1/:name');
echo $response->getBody();
setUrl('{{baseUrl}}/v1/:name');
$request->setMethod(HTTP_METH_DELETE);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/:name');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:name' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:name' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/v1/:name")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/:name"
response = requests.delete(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/:name"
response <- VERB("DELETE", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/:name")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.delete('/baseUrl/v1/:name') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/:name";
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("DELETE").unwrap(), url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request DELETE \
--url {{baseUrl}}/v1/:name
http DELETE {{baseUrl}}/v1/:name
wget --quiet \
--method DELETE \
--output-document \
- {{baseUrl}}/v1/:name
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:name")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "DELETE"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
dataplex.projects.locations.operations.get
{{baseUrl}}/v1/:name
QUERY PARAMS
name
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:name");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v1/:name")
require "http/client"
url = "{{baseUrl}}/v1/:name"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/v1/:name"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/:name");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/:name"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/v1/:name HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1/:name")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/:name"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/:name")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1/:name")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/v1/:name');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/v1/:name'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/:name';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/:name',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1/:name")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/:name',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'GET', url: '{{baseUrl}}/v1/:name'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v1/:name');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {method: 'GET', url: '{{baseUrl}}/v1/:name'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/:name';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:name"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/:name" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/:name",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/v1/:name');
echo $response->getBody();
setUrl('{{baseUrl}}/v1/:name');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/:name');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:name' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:name' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v1/:name")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/:name"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/:name"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/:name")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/v1/:name') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/:name";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/v1/:name
http GET {{baseUrl}}/v1/:name
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v1/:name
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:name")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
dataplex.projects.locations.operations.list
{{baseUrl}}/v1/:name/operations
QUERY PARAMS
name
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:name/operations");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v1/:name/operations")
require "http/client"
url = "{{baseUrl}}/v1/:name/operations"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/v1/:name/operations"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/:name/operations");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/:name/operations"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/v1/:name/operations HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1/:name/operations")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/:name/operations"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/:name/operations")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1/:name/operations")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/v1/:name/operations');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/v1/:name/operations'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/:name/operations';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/:name/operations',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1/:name/operations")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/:name/operations',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'GET', url: '{{baseUrl}}/v1/:name/operations'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v1/:name/operations');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {method: 'GET', url: '{{baseUrl}}/v1/:name/operations'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/:name/operations';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:name/operations"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/:name/operations" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/:name/operations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/v1/:name/operations');
echo $response->getBody();
setUrl('{{baseUrl}}/v1/:name/operations');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/:name/operations');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:name/operations' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:name/operations' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v1/:name/operations")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/:name/operations"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/:name/operations"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/:name/operations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/v1/:name/operations') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/:name/operations";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/v1/:name/operations
http GET {{baseUrl}}/v1/:name/operations
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v1/:name/operations
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:name/operations")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()