POST discoveryengine.projects.locations.dataStores.branches.documents.create
{{baseUrl}}/v1beta/:parent/documents
QUERY PARAMS

parent
BODY json

{
  "id": "",
  "jsonData": "",
  "name": "",
  "parentDocumentId": "",
  "schemaId": "",
  "structData": {}
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1beta/:parent/documents");

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  \"id\": \"\",\n  \"jsonData\": \"\",\n  \"name\": \"\",\n  \"parentDocumentId\": \"\",\n  \"schemaId\": \"\",\n  \"structData\": {}\n}");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/post "{{baseUrl}}/v1beta/:parent/documents" {:content-type :json
                                                                     :form-params {:id ""
                                                                                   :jsonData ""
                                                                                   :name ""
                                                                                   :parentDocumentId ""
                                                                                   :schemaId ""
                                                                                   :structData {}}})
require "http/client"

url = "{{baseUrl}}/v1beta/:parent/documents"
headers = HTTP::Headers{
  "content-type" => "application/json"
}
reqBody = "{\n  \"id\": \"\",\n  \"jsonData\": \"\",\n  \"name\": \"\",\n  \"parentDocumentId\": \"\",\n  \"schemaId\": \"\",\n  \"structData\": {}\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}}/v1beta/:parent/documents"),
    Content = new StringContent("{\n  \"id\": \"\",\n  \"jsonData\": \"\",\n  \"name\": \"\",\n  \"parentDocumentId\": \"\",\n  \"schemaId\": \"\",\n  \"structData\": {}\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}}/v1beta/:parent/documents");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"id\": \"\",\n  \"jsonData\": \"\",\n  \"name\": \"\",\n  \"parentDocumentId\": \"\",\n  \"schemaId\": \"\",\n  \"structData\": {}\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/v1beta/:parent/documents"

	payload := strings.NewReader("{\n  \"id\": \"\",\n  \"jsonData\": \"\",\n  \"name\": \"\",\n  \"parentDocumentId\": \"\",\n  \"schemaId\": \"\",\n  \"structData\": {}\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/v1beta/:parent/documents HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 110

{
  "id": "",
  "jsonData": "",
  "name": "",
  "parentDocumentId": "",
  "schemaId": "",
  "structData": {}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1beta/:parent/documents")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"id\": \"\",\n  \"jsonData\": \"\",\n  \"name\": \"\",\n  \"parentDocumentId\": \"\",\n  \"schemaId\": \"\",\n  \"structData\": {}\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/v1beta/:parent/documents"))
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"id\": \"\",\n  \"jsonData\": \"\",\n  \"name\": \"\",\n  \"parentDocumentId\": \"\",\n  \"schemaId\": \"\",\n  \"structData\": {}\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  \"id\": \"\",\n  \"jsonData\": \"\",\n  \"name\": \"\",\n  \"parentDocumentId\": \"\",\n  \"schemaId\": \"\",\n  \"structData\": {}\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/v1beta/:parent/documents")
  .post(body)
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1beta/:parent/documents")
  .header("content-type", "application/json")
  .body("{\n  \"id\": \"\",\n  \"jsonData\": \"\",\n  \"name\": \"\",\n  \"parentDocumentId\": \"\",\n  \"schemaId\": \"\",\n  \"structData\": {}\n}")
  .asString();
const data = JSON.stringify({
  id: '',
  jsonData: '',
  name: '',
  parentDocumentId: '',
  schemaId: '',
  structData: {}
});

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('POST', '{{baseUrl}}/v1beta/:parent/documents');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'POST',
  url: '{{baseUrl}}/v1beta/:parent/documents',
  headers: {'content-type': 'application/json'},
  data: {
    id: '',
    jsonData: '',
    name: '',
    parentDocumentId: '',
    schemaId: '',
    structData: {}
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/v1beta/:parent/documents';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"id":"","jsonData":"","name":"","parentDocumentId":"","schemaId":"","structData":{}}'
};

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}}/v1beta/:parent/documents',
  method: 'POST',
  headers: {
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "id": "",\n  "jsonData": "",\n  "name": "",\n  "parentDocumentId": "",\n  "schemaId": "",\n  "structData": {}\n}'
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"id\": \"\",\n  \"jsonData\": \"\",\n  \"name\": \"\",\n  \"parentDocumentId\": \"\",\n  \"schemaId\": \"\",\n  \"structData\": {}\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/v1beta/:parent/documents")
  .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/v1beta/:parent/documents',
  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({
  id: '',
  jsonData: '',
  name: '',
  parentDocumentId: '',
  schemaId: '',
  structData: {}
}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/v1beta/:parent/documents',
  headers: {'content-type': 'application/json'},
  body: {
    id: '',
    jsonData: '',
    name: '',
    parentDocumentId: '',
    schemaId: '',
    structData: {}
  },
  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}}/v1beta/:parent/documents');

req.headers({
  'content-type': 'application/json'
});

req.type('json');
req.send({
  id: '',
  jsonData: '',
  name: '',
  parentDocumentId: '',
  schemaId: '',
  structData: {}
});

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}}/v1beta/:parent/documents',
  headers: {'content-type': 'application/json'},
  data: {
    id: '',
    jsonData: '',
    name: '',
    parentDocumentId: '',
    schemaId: '',
    structData: {}
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/v1beta/:parent/documents';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"id":"","jsonData":"","name":"","parentDocumentId":"","schemaId":"","structData":{}}'
};

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 = @{ @"id": @"",
                              @"jsonData": @"",
                              @"name": @"",
                              @"parentDocumentId": @"",
                              @"schemaId": @"",
                              @"structData": @{  } };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1beta/:parent/documents"]
                                                       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}}/v1beta/:parent/documents" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n  \"id\": \"\",\n  \"jsonData\": \"\",\n  \"name\": \"\",\n  \"parentDocumentId\": \"\",\n  \"schemaId\": \"\",\n  \"structData\": {}\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/v1beta/:parent/documents",
  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([
    'id' => '',
    'jsonData' => '',
    'name' => '',
    'parentDocumentId' => '',
    'schemaId' => '',
    'structData' => [
        
    ]
  ]),
  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}}/v1beta/:parent/documents', [
  'body' => '{
  "id": "",
  "jsonData": "",
  "name": "",
  "parentDocumentId": "",
  "schemaId": "",
  "structData": {}
}',
  'headers' => [
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/v1beta/:parent/documents');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'id' => '',
  'jsonData' => '',
  'name' => '',
  'parentDocumentId' => '',
  'schemaId' => '',
  'structData' => [
    
  ]
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'id' => '',
  'jsonData' => '',
  'name' => '',
  'parentDocumentId' => '',
  'schemaId' => '',
  'structData' => [
    
  ]
]));
$request->setRequestUrl('{{baseUrl}}/v1beta/:parent/documents');
$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}}/v1beta/:parent/documents' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "id": "",
  "jsonData": "",
  "name": "",
  "parentDocumentId": "",
  "schemaId": "",
  "structData": {}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1beta/:parent/documents' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "id": "",
  "jsonData": "",
  "name": "",
  "parentDocumentId": "",
  "schemaId": "",
  "structData": {}
}'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "{\n  \"id\": \"\",\n  \"jsonData\": \"\",\n  \"name\": \"\",\n  \"parentDocumentId\": \"\",\n  \"schemaId\": \"\",\n  \"structData\": {}\n}"

headers = { 'content-type': "application/json" }

conn.request("POST", "/baseUrl/v1beta/:parent/documents", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/v1beta/:parent/documents"

payload = {
    "id": "",
    "jsonData": "",
    "name": "",
    "parentDocumentId": "",
    "schemaId": "",
    "structData": {}
}
headers = {"content-type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/v1beta/:parent/documents"

payload <- "{\n  \"id\": \"\",\n  \"jsonData\": \"\",\n  \"name\": \"\",\n  \"parentDocumentId\": \"\",\n  \"schemaId\": \"\",\n  \"structData\": {}\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}}/v1beta/:parent/documents")

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  \"id\": \"\",\n  \"jsonData\": \"\",\n  \"name\": \"\",\n  \"parentDocumentId\": \"\",\n  \"schemaId\": \"\",\n  \"structData\": {}\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/v1beta/:parent/documents') do |req|
  req.body = "{\n  \"id\": \"\",\n  \"jsonData\": \"\",\n  \"name\": \"\",\n  \"parentDocumentId\": \"\",\n  \"schemaId\": \"\",\n  \"structData\": {}\n}"
end

puts response.status
puts response.body
use serde_json::json;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/v1beta/:parent/documents";

    let payload = json!({
        "id": "",
        "jsonData": "",
        "name": "",
        "parentDocumentId": "",
        "schemaId": "",
        "structData": 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}}/v1beta/:parent/documents \
  --header 'content-type: application/json' \
  --data '{
  "id": "",
  "jsonData": "",
  "name": "",
  "parentDocumentId": "",
  "schemaId": "",
  "structData": {}
}'
echo '{
  "id": "",
  "jsonData": "",
  "name": "",
  "parentDocumentId": "",
  "schemaId": "",
  "structData": {}
}' |  \
  http POST {{baseUrl}}/v1beta/:parent/documents \
  content-type:application/json
wget --quiet \
  --method POST \
  --header 'content-type: application/json' \
  --body-data '{\n  "id": "",\n  "jsonData": "",\n  "name": "",\n  "parentDocumentId": "",\n  "schemaId": "",\n  "structData": {}\n}' \
  --output-document \
  - {{baseUrl}}/v1beta/:parent/documents
import Foundation

let headers = ["content-type": "application/json"]
let parameters = [
  "id": "",
  "jsonData": "",
  "name": "",
  "parentDocumentId": "",
  "schemaId": "",
  "structData": []
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1beta/:parent/documents")! 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 discoveryengine.projects.locations.dataStores.branches.documents.delete
{{baseUrl}}/v1beta/: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}}/v1beta/:name");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/delete "{{baseUrl}}/v1beta/:name")
require "http/client"

url = "{{baseUrl}}/v1beta/: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}}/v1beta/:name"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1beta/:name");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/v1beta/: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/v1beta/:name HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/v1beta/:name")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/v1beta/: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}}/v1beta/:name")
  .delete(null)
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/v1beta/: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}}/v1beta/:name');

xhr.send(data);
import axios from 'axios';

const options = {method: 'DELETE', url: '{{baseUrl}}/v1beta/:name'};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/v1beta/: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}}/v1beta/:name',
  method: 'DELETE',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/v1beta/: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/v1beta/: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}}/v1beta/: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}}/v1beta/: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}}/v1beta/:name'};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/v1beta/: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}}/v1beta/: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}}/v1beta/:name" in

Client.call `DELETE uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/v1beta/: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}}/v1beta/:name');

echo $response->getBody();
setUrl('{{baseUrl}}/v1beta/:name');
$request->setMethod(HTTP_METH_DELETE);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/v1beta/:name');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1beta/:name' -Method DELETE 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1beta/:name' -Method DELETE 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("DELETE", "/baseUrl/v1beta/:name")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/v1beta/:name"

response = requests.delete(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/v1beta/:name"

response <- VERB("DELETE", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/v1beta/: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/v1beta/: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}}/v1beta/: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}}/v1beta/:name
http DELETE {{baseUrl}}/v1beta/:name
wget --quiet \
  --method DELETE \
  --output-document \
  - {{baseUrl}}/v1beta/:name
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1beta/: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()
POST discoveryengine.projects.locations.dataStores.branches.documents.import
{{baseUrl}}/v1beta/:parent/documents:import
QUERY PARAMS

parent
BODY json

{
  "bigquerySource": {
    "dataSchema": "",
    "datasetId": "",
    "gcsStagingDir": "",
    "partitionDate": {
      "day": 0,
      "month": 0,
      "year": 0
    },
    "projectId": "",
    "tableId": ""
  },
  "errorConfig": {
    "gcsPrefix": ""
  },
  "gcsSource": {
    "dataSchema": "",
    "inputUris": []
  },
  "inlineSource": {
    "documents": [
      {
        "id": "",
        "jsonData": "",
        "name": "",
        "parentDocumentId": "",
        "schemaId": "",
        "structData": {}
      }
    ]
  },
  "reconciliationMode": ""
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1beta/:parent/documents:import");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"bigquerySource\": {\n    \"dataSchema\": \"\",\n    \"datasetId\": \"\",\n    \"gcsStagingDir\": \"\",\n    \"partitionDate\": {\n      \"day\": 0,\n      \"month\": 0,\n      \"year\": 0\n    },\n    \"projectId\": \"\",\n    \"tableId\": \"\"\n  },\n  \"errorConfig\": {\n    \"gcsPrefix\": \"\"\n  },\n  \"gcsSource\": {\n    \"dataSchema\": \"\",\n    \"inputUris\": []\n  },\n  \"inlineSource\": {\n    \"documents\": [\n      {\n        \"id\": \"\",\n        \"jsonData\": \"\",\n        \"name\": \"\",\n        \"parentDocumentId\": \"\",\n        \"schemaId\": \"\",\n        \"structData\": {}\n      }\n    ]\n  },\n  \"reconciliationMode\": \"\"\n}");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/post "{{baseUrl}}/v1beta/:parent/documents:import" {:content-type :json
                                                                            :form-params {:bigquerySource {:dataSchema ""
                                                                                                           :datasetId ""
                                                                                                           :gcsStagingDir ""
                                                                                                           :partitionDate {:day 0
                                                                                                                           :month 0
                                                                                                                           :year 0}
                                                                                                           :projectId ""
                                                                                                           :tableId ""}
                                                                                          :errorConfig {:gcsPrefix ""}
                                                                                          :gcsSource {:dataSchema ""
                                                                                                      :inputUris []}
                                                                                          :inlineSource {:documents [{:id ""
                                                                                                                      :jsonData ""
                                                                                                                      :name ""
                                                                                                                      :parentDocumentId ""
                                                                                                                      :schemaId ""
                                                                                                                      :structData {}}]}
                                                                                          :reconciliationMode ""}})
require "http/client"

url = "{{baseUrl}}/v1beta/:parent/documents:import"
headers = HTTP::Headers{
  "content-type" => "application/json"
}
reqBody = "{\n  \"bigquerySource\": {\n    \"dataSchema\": \"\",\n    \"datasetId\": \"\",\n    \"gcsStagingDir\": \"\",\n    \"partitionDate\": {\n      \"day\": 0,\n      \"month\": 0,\n      \"year\": 0\n    },\n    \"projectId\": \"\",\n    \"tableId\": \"\"\n  },\n  \"errorConfig\": {\n    \"gcsPrefix\": \"\"\n  },\n  \"gcsSource\": {\n    \"dataSchema\": \"\",\n    \"inputUris\": []\n  },\n  \"inlineSource\": {\n    \"documents\": [\n      {\n        \"id\": \"\",\n        \"jsonData\": \"\",\n        \"name\": \"\",\n        \"parentDocumentId\": \"\",\n        \"schemaId\": \"\",\n        \"structData\": {}\n      }\n    ]\n  },\n  \"reconciliationMode\": \"\"\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}}/v1beta/:parent/documents:import"),
    Content = new StringContent("{\n  \"bigquerySource\": {\n    \"dataSchema\": \"\",\n    \"datasetId\": \"\",\n    \"gcsStagingDir\": \"\",\n    \"partitionDate\": {\n      \"day\": 0,\n      \"month\": 0,\n      \"year\": 0\n    },\n    \"projectId\": \"\",\n    \"tableId\": \"\"\n  },\n  \"errorConfig\": {\n    \"gcsPrefix\": \"\"\n  },\n  \"gcsSource\": {\n    \"dataSchema\": \"\",\n    \"inputUris\": []\n  },\n  \"inlineSource\": {\n    \"documents\": [\n      {\n        \"id\": \"\",\n        \"jsonData\": \"\",\n        \"name\": \"\",\n        \"parentDocumentId\": \"\",\n        \"schemaId\": \"\",\n        \"structData\": {}\n      }\n    ]\n  },\n  \"reconciliationMode\": \"\"\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}}/v1beta/:parent/documents:import");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"bigquerySource\": {\n    \"dataSchema\": \"\",\n    \"datasetId\": \"\",\n    \"gcsStagingDir\": \"\",\n    \"partitionDate\": {\n      \"day\": 0,\n      \"month\": 0,\n      \"year\": 0\n    },\n    \"projectId\": \"\",\n    \"tableId\": \"\"\n  },\n  \"errorConfig\": {\n    \"gcsPrefix\": \"\"\n  },\n  \"gcsSource\": {\n    \"dataSchema\": \"\",\n    \"inputUris\": []\n  },\n  \"inlineSource\": {\n    \"documents\": [\n      {\n        \"id\": \"\",\n        \"jsonData\": \"\",\n        \"name\": \"\",\n        \"parentDocumentId\": \"\",\n        \"schemaId\": \"\",\n        \"structData\": {}\n      }\n    ]\n  },\n  \"reconciliationMode\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/v1beta/:parent/documents:import"

	payload := strings.NewReader("{\n  \"bigquerySource\": {\n    \"dataSchema\": \"\",\n    \"datasetId\": \"\",\n    \"gcsStagingDir\": \"\",\n    \"partitionDate\": {\n      \"day\": 0,\n      \"month\": 0,\n      \"year\": 0\n    },\n    \"projectId\": \"\",\n    \"tableId\": \"\"\n  },\n  \"errorConfig\": {\n    \"gcsPrefix\": \"\"\n  },\n  \"gcsSource\": {\n    \"dataSchema\": \"\",\n    \"inputUris\": []\n  },\n  \"inlineSource\": {\n    \"documents\": [\n      {\n        \"id\": \"\",\n        \"jsonData\": \"\",\n        \"name\": \"\",\n        \"parentDocumentId\": \"\",\n        \"schemaId\": \"\",\n        \"structData\": {}\n      }\n    ]\n  },\n  \"reconciliationMode\": \"\"\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/v1beta/:parent/documents:import HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 561

{
  "bigquerySource": {
    "dataSchema": "",
    "datasetId": "",
    "gcsStagingDir": "",
    "partitionDate": {
      "day": 0,
      "month": 0,
      "year": 0
    },
    "projectId": "",
    "tableId": ""
  },
  "errorConfig": {
    "gcsPrefix": ""
  },
  "gcsSource": {
    "dataSchema": "",
    "inputUris": []
  },
  "inlineSource": {
    "documents": [
      {
        "id": "",
        "jsonData": "",
        "name": "",
        "parentDocumentId": "",
        "schemaId": "",
        "structData": {}
      }
    ]
  },
  "reconciliationMode": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1beta/:parent/documents:import")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"bigquerySource\": {\n    \"dataSchema\": \"\",\n    \"datasetId\": \"\",\n    \"gcsStagingDir\": \"\",\n    \"partitionDate\": {\n      \"day\": 0,\n      \"month\": 0,\n      \"year\": 0\n    },\n    \"projectId\": \"\",\n    \"tableId\": \"\"\n  },\n  \"errorConfig\": {\n    \"gcsPrefix\": \"\"\n  },\n  \"gcsSource\": {\n    \"dataSchema\": \"\",\n    \"inputUris\": []\n  },\n  \"inlineSource\": {\n    \"documents\": [\n      {\n        \"id\": \"\",\n        \"jsonData\": \"\",\n        \"name\": \"\",\n        \"parentDocumentId\": \"\",\n        \"schemaId\": \"\",\n        \"structData\": {}\n      }\n    ]\n  },\n  \"reconciliationMode\": \"\"\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/v1beta/:parent/documents:import"))
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"bigquerySource\": {\n    \"dataSchema\": \"\",\n    \"datasetId\": \"\",\n    \"gcsStagingDir\": \"\",\n    \"partitionDate\": {\n      \"day\": 0,\n      \"month\": 0,\n      \"year\": 0\n    },\n    \"projectId\": \"\",\n    \"tableId\": \"\"\n  },\n  \"errorConfig\": {\n    \"gcsPrefix\": \"\"\n  },\n  \"gcsSource\": {\n    \"dataSchema\": \"\",\n    \"inputUris\": []\n  },\n  \"inlineSource\": {\n    \"documents\": [\n      {\n        \"id\": \"\",\n        \"jsonData\": \"\",\n        \"name\": \"\",\n        \"parentDocumentId\": \"\",\n        \"schemaId\": \"\",\n        \"structData\": {}\n      }\n    ]\n  },\n  \"reconciliationMode\": \"\"\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  \"bigquerySource\": {\n    \"dataSchema\": \"\",\n    \"datasetId\": \"\",\n    \"gcsStagingDir\": \"\",\n    \"partitionDate\": {\n      \"day\": 0,\n      \"month\": 0,\n      \"year\": 0\n    },\n    \"projectId\": \"\",\n    \"tableId\": \"\"\n  },\n  \"errorConfig\": {\n    \"gcsPrefix\": \"\"\n  },\n  \"gcsSource\": {\n    \"dataSchema\": \"\",\n    \"inputUris\": []\n  },\n  \"inlineSource\": {\n    \"documents\": [\n      {\n        \"id\": \"\",\n        \"jsonData\": \"\",\n        \"name\": \"\",\n        \"parentDocumentId\": \"\",\n        \"schemaId\": \"\",\n        \"structData\": {}\n      }\n    ]\n  },\n  \"reconciliationMode\": \"\"\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/v1beta/:parent/documents:import")
  .post(body)
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1beta/:parent/documents:import")
  .header("content-type", "application/json")
  .body("{\n  \"bigquerySource\": {\n    \"dataSchema\": \"\",\n    \"datasetId\": \"\",\n    \"gcsStagingDir\": \"\",\n    \"partitionDate\": {\n      \"day\": 0,\n      \"month\": 0,\n      \"year\": 0\n    },\n    \"projectId\": \"\",\n    \"tableId\": \"\"\n  },\n  \"errorConfig\": {\n    \"gcsPrefix\": \"\"\n  },\n  \"gcsSource\": {\n    \"dataSchema\": \"\",\n    \"inputUris\": []\n  },\n  \"inlineSource\": {\n    \"documents\": [\n      {\n        \"id\": \"\",\n        \"jsonData\": \"\",\n        \"name\": \"\",\n        \"parentDocumentId\": \"\",\n        \"schemaId\": \"\",\n        \"structData\": {}\n      }\n    ]\n  },\n  \"reconciliationMode\": \"\"\n}")
  .asString();
const data = JSON.stringify({
  bigquerySource: {
    dataSchema: '',
    datasetId: '',
    gcsStagingDir: '',
    partitionDate: {
      day: 0,
      month: 0,
      year: 0
    },
    projectId: '',
    tableId: ''
  },
  errorConfig: {
    gcsPrefix: ''
  },
  gcsSource: {
    dataSchema: '',
    inputUris: []
  },
  inlineSource: {
    documents: [
      {
        id: '',
        jsonData: '',
        name: '',
        parentDocumentId: '',
        schemaId: '',
        structData: {}
      }
    ]
  },
  reconciliationMode: ''
});

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('POST', '{{baseUrl}}/v1beta/:parent/documents:import');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'POST',
  url: '{{baseUrl}}/v1beta/:parent/documents:import',
  headers: {'content-type': 'application/json'},
  data: {
    bigquerySource: {
      dataSchema: '',
      datasetId: '',
      gcsStagingDir: '',
      partitionDate: {day: 0, month: 0, year: 0},
      projectId: '',
      tableId: ''
    },
    errorConfig: {gcsPrefix: ''},
    gcsSource: {dataSchema: '', inputUris: []},
    inlineSource: {
      documents: [
        {
          id: '',
          jsonData: '',
          name: '',
          parentDocumentId: '',
          schemaId: '',
          structData: {}
        }
      ]
    },
    reconciliationMode: ''
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/v1beta/:parent/documents:import';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"bigquerySource":{"dataSchema":"","datasetId":"","gcsStagingDir":"","partitionDate":{"day":0,"month":0,"year":0},"projectId":"","tableId":""},"errorConfig":{"gcsPrefix":""},"gcsSource":{"dataSchema":"","inputUris":[]},"inlineSource":{"documents":[{"id":"","jsonData":"","name":"","parentDocumentId":"","schemaId":"","structData":{}}]},"reconciliationMode":""}'
};

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}}/v1beta/:parent/documents:import',
  method: 'POST',
  headers: {
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "bigquerySource": {\n    "dataSchema": "",\n    "datasetId": "",\n    "gcsStagingDir": "",\n    "partitionDate": {\n      "day": 0,\n      "month": 0,\n      "year": 0\n    },\n    "projectId": "",\n    "tableId": ""\n  },\n  "errorConfig": {\n    "gcsPrefix": ""\n  },\n  "gcsSource": {\n    "dataSchema": "",\n    "inputUris": []\n  },\n  "inlineSource": {\n    "documents": [\n      {\n        "id": "",\n        "jsonData": "",\n        "name": "",\n        "parentDocumentId": "",\n        "schemaId": "",\n        "structData": {}\n      }\n    ]\n  },\n  "reconciliationMode": ""\n}'
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"bigquerySource\": {\n    \"dataSchema\": \"\",\n    \"datasetId\": \"\",\n    \"gcsStagingDir\": \"\",\n    \"partitionDate\": {\n      \"day\": 0,\n      \"month\": 0,\n      \"year\": 0\n    },\n    \"projectId\": \"\",\n    \"tableId\": \"\"\n  },\n  \"errorConfig\": {\n    \"gcsPrefix\": \"\"\n  },\n  \"gcsSource\": {\n    \"dataSchema\": \"\",\n    \"inputUris\": []\n  },\n  \"inlineSource\": {\n    \"documents\": [\n      {\n        \"id\": \"\",\n        \"jsonData\": \"\",\n        \"name\": \"\",\n        \"parentDocumentId\": \"\",\n        \"schemaId\": \"\",\n        \"structData\": {}\n      }\n    ]\n  },\n  \"reconciliationMode\": \"\"\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/v1beta/:parent/documents:import")
  .post(body)
  .addHeader("content-type", "application/json")
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'POST',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/v1beta/:parent/documents:import',
  headers: {
    'content-type': 'application/json'
  }
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on('data', function (chunk) {
    chunks.push(chunk);
  });

  res.on('end', function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.write(JSON.stringify({
  bigquerySource: {
    dataSchema: '',
    datasetId: '',
    gcsStagingDir: '',
    partitionDate: {day: 0, month: 0, year: 0},
    projectId: '',
    tableId: ''
  },
  errorConfig: {gcsPrefix: ''},
  gcsSource: {dataSchema: '', inputUris: []},
  inlineSource: {
    documents: [
      {
        id: '',
        jsonData: '',
        name: '',
        parentDocumentId: '',
        schemaId: '',
        structData: {}
      }
    ]
  },
  reconciliationMode: ''
}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/v1beta/:parent/documents:import',
  headers: {'content-type': 'application/json'},
  body: {
    bigquerySource: {
      dataSchema: '',
      datasetId: '',
      gcsStagingDir: '',
      partitionDate: {day: 0, month: 0, year: 0},
      projectId: '',
      tableId: ''
    },
    errorConfig: {gcsPrefix: ''},
    gcsSource: {dataSchema: '', inputUris: []},
    inlineSource: {
      documents: [
        {
          id: '',
          jsonData: '',
          name: '',
          parentDocumentId: '',
          schemaId: '',
          structData: {}
        }
      ]
    },
    reconciliationMode: ''
  },
  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}}/v1beta/:parent/documents:import');

req.headers({
  'content-type': 'application/json'
});

req.type('json');
req.send({
  bigquerySource: {
    dataSchema: '',
    datasetId: '',
    gcsStagingDir: '',
    partitionDate: {
      day: 0,
      month: 0,
      year: 0
    },
    projectId: '',
    tableId: ''
  },
  errorConfig: {
    gcsPrefix: ''
  },
  gcsSource: {
    dataSchema: '',
    inputUris: []
  },
  inlineSource: {
    documents: [
      {
        id: '',
        jsonData: '',
        name: '',
        parentDocumentId: '',
        schemaId: '',
        structData: {}
      }
    ]
  },
  reconciliationMode: ''
});

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}}/v1beta/:parent/documents:import',
  headers: {'content-type': 'application/json'},
  data: {
    bigquerySource: {
      dataSchema: '',
      datasetId: '',
      gcsStagingDir: '',
      partitionDate: {day: 0, month: 0, year: 0},
      projectId: '',
      tableId: ''
    },
    errorConfig: {gcsPrefix: ''},
    gcsSource: {dataSchema: '', inputUris: []},
    inlineSource: {
      documents: [
        {
          id: '',
          jsonData: '',
          name: '',
          parentDocumentId: '',
          schemaId: '',
          structData: {}
        }
      ]
    },
    reconciliationMode: ''
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/v1beta/:parent/documents:import';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"bigquerySource":{"dataSchema":"","datasetId":"","gcsStagingDir":"","partitionDate":{"day":0,"month":0,"year":0},"projectId":"","tableId":""},"errorConfig":{"gcsPrefix":""},"gcsSource":{"dataSchema":"","inputUris":[]},"inlineSource":{"documents":[{"id":"","jsonData":"","name":"","parentDocumentId":"","schemaId":"","structData":{}}]},"reconciliationMode":""}'
};

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 = @{ @"bigquerySource": @{ @"dataSchema": @"", @"datasetId": @"", @"gcsStagingDir": @"", @"partitionDate": @{ @"day": @0, @"month": @0, @"year": @0 }, @"projectId": @"", @"tableId": @"" },
                              @"errorConfig": @{ @"gcsPrefix": @"" },
                              @"gcsSource": @{ @"dataSchema": @"", @"inputUris": @[  ] },
                              @"inlineSource": @{ @"documents": @[ @{ @"id": @"", @"jsonData": @"", @"name": @"", @"parentDocumentId": @"", @"schemaId": @"", @"structData": @{  } } ] },
                              @"reconciliationMode": @"" };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1beta/:parent/documents:import"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/v1beta/:parent/documents:import" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n  \"bigquerySource\": {\n    \"dataSchema\": \"\",\n    \"datasetId\": \"\",\n    \"gcsStagingDir\": \"\",\n    \"partitionDate\": {\n      \"day\": 0,\n      \"month\": 0,\n      \"year\": 0\n    },\n    \"projectId\": \"\",\n    \"tableId\": \"\"\n  },\n  \"errorConfig\": {\n    \"gcsPrefix\": \"\"\n  },\n  \"gcsSource\": {\n    \"dataSchema\": \"\",\n    \"inputUris\": []\n  },\n  \"inlineSource\": {\n    \"documents\": [\n      {\n        \"id\": \"\",\n        \"jsonData\": \"\",\n        \"name\": \"\",\n        \"parentDocumentId\": \"\",\n        \"schemaId\": \"\",\n        \"structData\": {}\n      }\n    ]\n  },\n  \"reconciliationMode\": \"\"\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/v1beta/:parent/documents:import",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => json_encode([
    'bigquerySource' => [
        'dataSchema' => '',
        'datasetId' => '',
        'gcsStagingDir' => '',
        'partitionDate' => [
                'day' => 0,
                'month' => 0,
                'year' => 0
        ],
        'projectId' => '',
        'tableId' => ''
    ],
    'errorConfig' => [
        'gcsPrefix' => ''
    ],
    'gcsSource' => [
        'dataSchema' => '',
        'inputUris' => [
                
        ]
    ],
    'inlineSource' => [
        'documents' => [
                [
                                'id' => '',
                                'jsonData' => '',
                                'name' => '',
                                'parentDocumentId' => '',
                                'schemaId' => '',
                                'structData' => [
                                                                
                                ]
                ]
        ]
    ],
    'reconciliationMode' => ''
  ]),
  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}}/v1beta/:parent/documents:import', [
  'body' => '{
  "bigquerySource": {
    "dataSchema": "",
    "datasetId": "",
    "gcsStagingDir": "",
    "partitionDate": {
      "day": 0,
      "month": 0,
      "year": 0
    },
    "projectId": "",
    "tableId": ""
  },
  "errorConfig": {
    "gcsPrefix": ""
  },
  "gcsSource": {
    "dataSchema": "",
    "inputUris": []
  },
  "inlineSource": {
    "documents": [
      {
        "id": "",
        "jsonData": "",
        "name": "",
        "parentDocumentId": "",
        "schemaId": "",
        "structData": {}
      }
    ]
  },
  "reconciliationMode": ""
}',
  'headers' => [
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/v1beta/:parent/documents:import');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'bigquerySource' => [
    'dataSchema' => '',
    'datasetId' => '',
    'gcsStagingDir' => '',
    'partitionDate' => [
        'day' => 0,
        'month' => 0,
        'year' => 0
    ],
    'projectId' => '',
    'tableId' => ''
  ],
  'errorConfig' => [
    'gcsPrefix' => ''
  ],
  'gcsSource' => [
    'dataSchema' => '',
    'inputUris' => [
        
    ]
  ],
  'inlineSource' => [
    'documents' => [
        [
                'id' => '',
                'jsonData' => '',
                'name' => '',
                'parentDocumentId' => '',
                'schemaId' => '',
                'structData' => [
                                
                ]
        ]
    ]
  ],
  'reconciliationMode' => ''
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'bigquerySource' => [
    'dataSchema' => '',
    'datasetId' => '',
    'gcsStagingDir' => '',
    'partitionDate' => [
        'day' => 0,
        'month' => 0,
        'year' => 0
    ],
    'projectId' => '',
    'tableId' => ''
  ],
  'errorConfig' => [
    'gcsPrefix' => ''
  ],
  'gcsSource' => [
    'dataSchema' => '',
    'inputUris' => [
        
    ]
  ],
  'inlineSource' => [
    'documents' => [
        [
                'id' => '',
                'jsonData' => '',
                'name' => '',
                'parentDocumentId' => '',
                'schemaId' => '',
                'structData' => [
                                
                ]
        ]
    ]
  ],
  'reconciliationMode' => ''
]));
$request->setRequestUrl('{{baseUrl}}/v1beta/:parent/documents:import');
$request->setRequestMethod('POST');
$request->setBody($body);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1beta/:parent/documents:import' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "bigquerySource": {
    "dataSchema": "",
    "datasetId": "",
    "gcsStagingDir": "",
    "partitionDate": {
      "day": 0,
      "month": 0,
      "year": 0
    },
    "projectId": "",
    "tableId": ""
  },
  "errorConfig": {
    "gcsPrefix": ""
  },
  "gcsSource": {
    "dataSchema": "",
    "inputUris": []
  },
  "inlineSource": {
    "documents": [
      {
        "id": "",
        "jsonData": "",
        "name": "",
        "parentDocumentId": "",
        "schemaId": "",
        "structData": {}
      }
    ]
  },
  "reconciliationMode": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1beta/:parent/documents:import' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "bigquerySource": {
    "dataSchema": "",
    "datasetId": "",
    "gcsStagingDir": "",
    "partitionDate": {
      "day": 0,
      "month": 0,
      "year": 0
    },
    "projectId": "",
    "tableId": ""
  },
  "errorConfig": {
    "gcsPrefix": ""
  },
  "gcsSource": {
    "dataSchema": "",
    "inputUris": []
  },
  "inlineSource": {
    "documents": [
      {
        "id": "",
        "jsonData": "",
        "name": "",
        "parentDocumentId": "",
        "schemaId": "",
        "structData": {}
      }
    ]
  },
  "reconciliationMode": ""
}'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "{\n  \"bigquerySource\": {\n    \"dataSchema\": \"\",\n    \"datasetId\": \"\",\n    \"gcsStagingDir\": \"\",\n    \"partitionDate\": {\n      \"day\": 0,\n      \"month\": 0,\n      \"year\": 0\n    },\n    \"projectId\": \"\",\n    \"tableId\": \"\"\n  },\n  \"errorConfig\": {\n    \"gcsPrefix\": \"\"\n  },\n  \"gcsSource\": {\n    \"dataSchema\": \"\",\n    \"inputUris\": []\n  },\n  \"inlineSource\": {\n    \"documents\": [\n      {\n        \"id\": \"\",\n        \"jsonData\": \"\",\n        \"name\": \"\",\n        \"parentDocumentId\": \"\",\n        \"schemaId\": \"\",\n        \"structData\": {}\n      }\n    ]\n  },\n  \"reconciliationMode\": \"\"\n}"

headers = { 'content-type': "application/json" }

conn.request("POST", "/baseUrl/v1beta/:parent/documents:import", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/v1beta/:parent/documents:import"

payload = {
    "bigquerySource": {
        "dataSchema": "",
        "datasetId": "",
        "gcsStagingDir": "",
        "partitionDate": {
            "day": 0,
            "month": 0,
            "year": 0
        },
        "projectId": "",
        "tableId": ""
    },
    "errorConfig": { "gcsPrefix": "" },
    "gcsSource": {
        "dataSchema": "",
        "inputUris": []
    },
    "inlineSource": { "documents": [
            {
                "id": "",
                "jsonData": "",
                "name": "",
                "parentDocumentId": "",
                "schemaId": "",
                "structData": {}
            }
        ] },
    "reconciliationMode": ""
}
headers = {"content-type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/v1beta/:parent/documents:import"

payload <- "{\n  \"bigquerySource\": {\n    \"dataSchema\": \"\",\n    \"datasetId\": \"\",\n    \"gcsStagingDir\": \"\",\n    \"partitionDate\": {\n      \"day\": 0,\n      \"month\": 0,\n      \"year\": 0\n    },\n    \"projectId\": \"\",\n    \"tableId\": \"\"\n  },\n  \"errorConfig\": {\n    \"gcsPrefix\": \"\"\n  },\n  \"gcsSource\": {\n    \"dataSchema\": \"\",\n    \"inputUris\": []\n  },\n  \"inlineSource\": {\n    \"documents\": [\n      {\n        \"id\": \"\",\n        \"jsonData\": \"\",\n        \"name\": \"\",\n        \"parentDocumentId\": \"\",\n        \"schemaId\": \"\",\n        \"structData\": {}\n      }\n    ]\n  },\n  \"reconciliationMode\": \"\"\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}}/v1beta/:parent/documents:import")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n  \"bigquerySource\": {\n    \"dataSchema\": \"\",\n    \"datasetId\": \"\",\n    \"gcsStagingDir\": \"\",\n    \"partitionDate\": {\n      \"day\": 0,\n      \"month\": 0,\n      \"year\": 0\n    },\n    \"projectId\": \"\",\n    \"tableId\": \"\"\n  },\n  \"errorConfig\": {\n    \"gcsPrefix\": \"\"\n  },\n  \"gcsSource\": {\n    \"dataSchema\": \"\",\n    \"inputUris\": []\n  },\n  \"inlineSource\": {\n    \"documents\": [\n      {\n        \"id\": \"\",\n        \"jsonData\": \"\",\n        \"name\": \"\",\n        \"parentDocumentId\": \"\",\n        \"schemaId\": \"\",\n        \"structData\": {}\n      }\n    ]\n  },\n  \"reconciliationMode\": \"\"\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/v1beta/:parent/documents:import') do |req|
  req.body = "{\n  \"bigquerySource\": {\n    \"dataSchema\": \"\",\n    \"datasetId\": \"\",\n    \"gcsStagingDir\": \"\",\n    \"partitionDate\": {\n      \"day\": 0,\n      \"month\": 0,\n      \"year\": 0\n    },\n    \"projectId\": \"\",\n    \"tableId\": \"\"\n  },\n  \"errorConfig\": {\n    \"gcsPrefix\": \"\"\n  },\n  \"gcsSource\": {\n    \"dataSchema\": \"\",\n    \"inputUris\": []\n  },\n  \"inlineSource\": {\n    \"documents\": [\n      {\n        \"id\": \"\",\n        \"jsonData\": \"\",\n        \"name\": \"\",\n        \"parentDocumentId\": \"\",\n        \"schemaId\": \"\",\n        \"structData\": {}\n      }\n    ]\n  },\n  \"reconciliationMode\": \"\"\n}"
end

puts response.status
puts response.body
use serde_json::json;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/v1beta/:parent/documents:import";

    let payload = json!({
        "bigquerySource": json!({
            "dataSchema": "",
            "datasetId": "",
            "gcsStagingDir": "",
            "partitionDate": json!({
                "day": 0,
                "month": 0,
                "year": 0
            }),
            "projectId": "",
            "tableId": ""
        }),
        "errorConfig": json!({"gcsPrefix": ""}),
        "gcsSource": json!({
            "dataSchema": "",
            "inputUris": ()
        }),
        "inlineSource": json!({"documents": (
                json!({
                    "id": "",
                    "jsonData": "",
                    "name": "",
                    "parentDocumentId": "",
                    "schemaId": "",
                    "structData": json!({})
                })
            )}),
        "reconciliationMode": ""
    });

    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}}/v1beta/:parent/documents:import \
  --header 'content-type: application/json' \
  --data '{
  "bigquerySource": {
    "dataSchema": "",
    "datasetId": "",
    "gcsStagingDir": "",
    "partitionDate": {
      "day": 0,
      "month": 0,
      "year": 0
    },
    "projectId": "",
    "tableId": ""
  },
  "errorConfig": {
    "gcsPrefix": ""
  },
  "gcsSource": {
    "dataSchema": "",
    "inputUris": []
  },
  "inlineSource": {
    "documents": [
      {
        "id": "",
        "jsonData": "",
        "name": "",
        "parentDocumentId": "",
        "schemaId": "",
        "structData": {}
      }
    ]
  },
  "reconciliationMode": ""
}'
echo '{
  "bigquerySource": {
    "dataSchema": "",
    "datasetId": "",
    "gcsStagingDir": "",
    "partitionDate": {
      "day": 0,
      "month": 0,
      "year": 0
    },
    "projectId": "",
    "tableId": ""
  },
  "errorConfig": {
    "gcsPrefix": ""
  },
  "gcsSource": {
    "dataSchema": "",
    "inputUris": []
  },
  "inlineSource": {
    "documents": [
      {
        "id": "",
        "jsonData": "",
        "name": "",
        "parentDocumentId": "",
        "schemaId": "",
        "structData": {}
      }
    ]
  },
  "reconciliationMode": ""
}' |  \
  http POST {{baseUrl}}/v1beta/:parent/documents:import \
  content-type:application/json
wget --quiet \
  --method POST \
  --header 'content-type: application/json' \
  --body-data '{\n  "bigquerySource": {\n    "dataSchema": "",\n    "datasetId": "",\n    "gcsStagingDir": "",\n    "partitionDate": {\n      "day": 0,\n      "month": 0,\n      "year": 0\n    },\n    "projectId": "",\n    "tableId": ""\n  },\n  "errorConfig": {\n    "gcsPrefix": ""\n  },\n  "gcsSource": {\n    "dataSchema": "",\n    "inputUris": []\n  },\n  "inlineSource": {\n    "documents": [\n      {\n        "id": "",\n        "jsonData": "",\n        "name": "",\n        "parentDocumentId": "",\n        "schemaId": "",\n        "structData": {}\n      }\n    ]\n  },\n  "reconciliationMode": ""\n}' \
  --output-document \
  - {{baseUrl}}/v1beta/:parent/documents:import
import Foundation

let headers = ["content-type": "application/json"]
let parameters = [
  "bigquerySource": [
    "dataSchema": "",
    "datasetId": "",
    "gcsStagingDir": "",
    "partitionDate": [
      "day": 0,
      "month": 0,
      "year": 0
    ],
    "projectId": "",
    "tableId": ""
  ],
  "errorConfig": ["gcsPrefix": ""],
  "gcsSource": [
    "dataSchema": "",
    "inputUris": []
  ],
  "inlineSource": ["documents": [
      [
        "id": "",
        "jsonData": "",
        "name": "",
        "parentDocumentId": "",
        "schemaId": "",
        "structData": []
      ]
    ]],
  "reconciliationMode": ""
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1beta/:parent/documents:import")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
GET discoveryengine.projects.locations.dataStores.branches.documents.list
{{baseUrl}}/v1beta/:parent/documents
QUERY PARAMS

parent
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1beta/:parent/documents");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/get "{{baseUrl}}/v1beta/:parent/documents")
require "http/client"

url = "{{baseUrl}}/v1beta/:parent/documents"

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}}/v1beta/:parent/documents"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1beta/:parent/documents");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/v1beta/:parent/documents"

	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/v1beta/:parent/documents HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1beta/:parent/documents")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/v1beta/:parent/documents"))
    .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}}/v1beta/:parent/documents")
  .get()
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1beta/:parent/documents")
  .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}}/v1beta/:parent/documents');

xhr.send(data);
import axios from 'axios';

const options = {method: 'GET', url: '{{baseUrl}}/v1beta/:parent/documents'};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/v1beta/:parent/documents';
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}}/v1beta/:parent/documents',
  method: 'GET',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/v1beta/:parent/documents")
  .get()
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/v1beta/:parent/documents',
  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}}/v1beta/:parent/documents'};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('GET', '{{baseUrl}}/v1beta/:parent/documents');

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}}/v1beta/:parent/documents'};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/v1beta/:parent/documents';
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}}/v1beta/:parent/documents"]
                                                       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}}/v1beta/:parent/documents" in

Client.call `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/v1beta/:parent/documents",
  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}}/v1beta/:parent/documents');

echo $response->getBody();
setUrl('{{baseUrl}}/v1beta/:parent/documents');
$request->setMethod(HTTP_METH_GET);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/v1beta/:parent/documents');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1beta/:parent/documents' -Method GET 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1beta/:parent/documents' -Method GET 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("GET", "/baseUrl/v1beta/:parent/documents")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/v1beta/:parent/documents"

response = requests.get(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/v1beta/:parent/documents"

response <- VERB("GET", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/v1beta/:parent/documents")

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/v1beta/:parent/documents') do |req|
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/v1beta/:parent/documents";

    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}}/v1beta/:parent/documents
http GET {{baseUrl}}/v1beta/:parent/documents
wget --quiet \
  --method GET \
  --output-document \
  - {{baseUrl}}/v1beta/:parent/documents
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1beta/:parent/documents")! 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 discoveryengine.projects.locations.dataStores.branches.documents.patch
{{baseUrl}}/v1beta/:name
QUERY PARAMS

name
BODY json

{
  "id": "",
  "jsonData": "",
  "name": "",
  "parentDocumentId": "",
  "schemaId": "",
  "structData": {}
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1beta/: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  \"id\": \"\",\n  \"jsonData\": \"\",\n  \"name\": \"\",\n  \"parentDocumentId\": \"\",\n  \"schemaId\": \"\",\n  \"structData\": {}\n}");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/patch "{{baseUrl}}/v1beta/:name" {:content-type :json
                                                          :form-params {:id ""
                                                                        :jsonData ""
                                                                        :name ""
                                                                        :parentDocumentId ""
                                                                        :schemaId ""
                                                                        :structData {}}})
require "http/client"

url = "{{baseUrl}}/v1beta/:name"
headers = HTTP::Headers{
  "content-type" => "application/json"
}
reqBody = "{\n  \"id\": \"\",\n  \"jsonData\": \"\",\n  \"name\": \"\",\n  \"parentDocumentId\": \"\",\n  \"schemaId\": \"\",\n  \"structData\": {}\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}}/v1beta/:name"),
    Content = new StringContent("{\n  \"id\": \"\",\n  \"jsonData\": \"\",\n  \"name\": \"\",\n  \"parentDocumentId\": \"\",\n  \"schemaId\": \"\",\n  \"structData\": {}\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}}/v1beta/:name");
var request = new RestRequest("", Method.Patch);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"id\": \"\",\n  \"jsonData\": \"\",\n  \"name\": \"\",\n  \"parentDocumentId\": \"\",\n  \"schemaId\": \"\",\n  \"structData\": {}\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/v1beta/:name"

	payload := strings.NewReader("{\n  \"id\": \"\",\n  \"jsonData\": \"\",\n  \"name\": \"\",\n  \"parentDocumentId\": \"\",\n  \"schemaId\": \"\",\n  \"structData\": {}\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/v1beta/:name HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 110

{
  "id": "",
  "jsonData": "",
  "name": "",
  "parentDocumentId": "",
  "schemaId": "",
  "structData": {}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/v1beta/:name")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"id\": \"\",\n  \"jsonData\": \"\",\n  \"name\": \"\",\n  \"parentDocumentId\": \"\",\n  \"schemaId\": \"\",\n  \"structData\": {}\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/v1beta/:name"))
    .header("content-type", "application/json")
    .method("PATCH", HttpRequest.BodyPublishers.ofString("{\n  \"id\": \"\",\n  \"jsonData\": \"\",\n  \"name\": \"\",\n  \"parentDocumentId\": \"\",\n  \"schemaId\": \"\",\n  \"structData\": {}\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  \"id\": \"\",\n  \"jsonData\": \"\",\n  \"name\": \"\",\n  \"parentDocumentId\": \"\",\n  \"schemaId\": \"\",\n  \"structData\": {}\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/v1beta/:name")
  .patch(body)
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/v1beta/:name")
  .header("content-type", "application/json")
  .body("{\n  \"id\": \"\",\n  \"jsonData\": \"\",\n  \"name\": \"\",\n  \"parentDocumentId\": \"\",\n  \"schemaId\": \"\",\n  \"structData\": {}\n}")
  .asString();
const data = JSON.stringify({
  id: '',
  jsonData: '',
  name: '',
  parentDocumentId: '',
  schemaId: '',
  structData: {}
});

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('PATCH', '{{baseUrl}}/v1beta/:name');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'PATCH',
  url: '{{baseUrl}}/v1beta/:name',
  headers: {'content-type': 'application/json'},
  data: {
    id: '',
    jsonData: '',
    name: '',
    parentDocumentId: '',
    schemaId: '',
    structData: {}
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/v1beta/:name';
const options = {
  method: 'PATCH',
  headers: {'content-type': 'application/json'},
  body: '{"id":"","jsonData":"","name":"","parentDocumentId":"","schemaId":"","structData":{}}'
};

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}}/v1beta/:name',
  method: 'PATCH',
  headers: {
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "id": "",\n  "jsonData": "",\n  "name": "",\n  "parentDocumentId": "",\n  "schemaId": "",\n  "structData": {}\n}'
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"id\": \"\",\n  \"jsonData\": \"\",\n  \"name\": \"\",\n  \"parentDocumentId\": \"\",\n  \"schemaId\": \"\",\n  \"structData\": {}\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/v1beta/: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/v1beta/: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({
  id: '',
  jsonData: '',
  name: '',
  parentDocumentId: '',
  schemaId: '',
  structData: {}
}));
req.end();
const request = require('request');

const options = {
  method: 'PATCH',
  url: '{{baseUrl}}/v1beta/:name',
  headers: {'content-type': 'application/json'},
  body: {
    id: '',
    jsonData: '',
    name: '',
    parentDocumentId: '',
    schemaId: '',
    structData: {}
  },
  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}}/v1beta/:name');

req.headers({
  'content-type': 'application/json'
});

req.type('json');
req.send({
  id: '',
  jsonData: '',
  name: '',
  parentDocumentId: '',
  schemaId: '',
  structData: {}
});

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}}/v1beta/:name',
  headers: {'content-type': 'application/json'},
  data: {
    id: '',
    jsonData: '',
    name: '',
    parentDocumentId: '',
    schemaId: '',
    structData: {}
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/v1beta/:name';
const options = {
  method: 'PATCH',
  headers: {'content-type': 'application/json'},
  body: '{"id":"","jsonData":"","name":"","parentDocumentId":"","schemaId":"","structData":{}}'
};

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 = @{ @"id": @"",
                              @"jsonData": @"",
                              @"name": @"",
                              @"parentDocumentId": @"",
                              @"schemaId": @"",
                              @"structData": @{  } };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1beta/: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}}/v1beta/:name" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n  \"id\": \"\",\n  \"jsonData\": \"\",\n  \"name\": \"\",\n  \"parentDocumentId\": \"\",\n  \"schemaId\": \"\",\n  \"structData\": {}\n}" in

Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/v1beta/: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([
    'id' => '',
    'jsonData' => '',
    'name' => '',
    'parentDocumentId' => '',
    'schemaId' => '',
    'structData' => [
        
    ]
  ]),
  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}}/v1beta/:name', [
  'body' => '{
  "id": "",
  "jsonData": "",
  "name": "",
  "parentDocumentId": "",
  "schemaId": "",
  "structData": {}
}',
  'headers' => [
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/v1beta/:name');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'id' => '',
  'jsonData' => '',
  'name' => '',
  'parentDocumentId' => '',
  'schemaId' => '',
  'structData' => [
    
  ]
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'id' => '',
  'jsonData' => '',
  'name' => '',
  'parentDocumentId' => '',
  'schemaId' => '',
  'structData' => [
    
  ]
]));
$request->setRequestUrl('{{baseUrl}}/v1beta/: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}}/v1beta/:name' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
  "id": "",
  "jsonData": "",
  "name": "",
  "parentDocumentId": "",
  "schemaId": "",
  "structData": {}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1beta/:name' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
  "id": "",
  "jsonData": "",
  "name": "",
  "parentDocumentId": "",
  "schemaId": "",
  "structData": {}
}'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "{\n  \"id\": \"\",\n  \"jsonData\": \"\",\n  \"name\": \"\",\n  \"parentDocumentId\": \"\",\n  \"schemaId\": \"\",\n  \"structData\": {}\n}"

headers = { 'content-type': "application/json" }

conn.request("PATCH", "/baseUrl/v1beta/:name", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/v1beta/:name"

payload = {
    "id": "",
    "jsonData": "",
    "name": "",
    "parentDocumentId": "",
    "schemaId": "",
    "structData": {}
}
headers = {"content-type": "application/json"}

response = requests.patch(url, json=payload, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/v1beta/:name"

payload <- "{\n  \"id\": \"\",\n  \"jsonData\": \"\",\n  \"name\": \"\",\n  \"parentDocumentId\": \"\",\n  \"schemaId\": \"\",\n  \"structData\": {}\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}}/v1beta/: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  \"id\": \"\",\n  \"jsonData\": \"\",\n  \"name\": \"\",\n  \"parentDocumentId\": \"\",\n  \"schemaId\": \"\",\n  \"structData\": {}\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/v1beta/:name') do |req|
  req.body = "{\n  \"id\": \"\",\n  \"jsonData\": \"\",\n  \"name\": \"\",\n  \"parentDocumentId\": \"\",\n  \"schemaId\": \"\",\n  \"structData\": {}\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}}/v1beta/:name";

    let payload = json!({
        "id": "",
        "jsonData": "",
        "name": "",
        "parentDocumentId": "",
        "schemaId": "",
        "structData": json!({})
    });

    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}}/v1beta/:name \
  --header 'content-type: application/json' \
  --data '{
  "id": "",
  "jsonData": "",
  "name": "",
  "parentDocumentId": "",
  "schemaId": "",
  "structData": {}
}'
echo '{
  "id": "",
  "jsonData": "",
  "name": "",
  "parentDocumentId": "",
  "schemaId": "",
  "structData": {}
}' |  \
  http PATCH {{baseUrl}}/v1beta/:name \
  content-type:application/json
wget --quiet \
  --method PATCH \
  --header 'content-type: application/json' \
  --body-data '{\n  "id": "",\n  "jsonData": "",\n  "name": "",\n  "parentDocumentId": "",\n  "schemaId": "",\n  "structData": {}\n}' \
  --output-document \
  - {{baseUrl}}/v1beta/:name
import Foundation

let headers = ["content-type": "application/json"]
let parameters = [
  "id": "",
  "jsonData": "",
  "name": "",
  "parentDocumentId": "",
  "schemaId": "",
  "structData": []
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1beta/: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 discoveryengine.projects.locations.dataStores.servingConfigs.recommend
{{baseUrl}}/v1beta/:servingConfig:recommend
QUERY PARAMS

servingConfig
BODY json

{
  "filter": "",
  "pageSize": 0,
  "params": {},
  "userEvent": {
    "attributes": {},
    "attributionToken": "",
    "completionInfo": {
      "selectedPosition": 0,
      "selectedSuggestion": ""
    },
    "directUserRequest": false,
    "documents": [
      {
        "id": "",
        "name": "",
        "promotionIds": [],
        "quantity": 0
      }
    ],
    "eventTime": "",
    "eventType": "",
    "filter": "",
    "mediaInfo": {
      "mediaProgressDuration": "",
      "mediaProgressPercentage": ""
    },
    "pageInfo": {
      "pageCategory": "",
      "pageviewId": "",
      "referrerUri": "",
      "uri": ""
    },
    "panel": {
      "displayName": "",
      "panelId": "",
      "panelPosition": 0,
      "totalPanels": 0
    },
    "promotionIds": [],
    "searchInfo": {
      "offset": 0,
      "orderBy": "",
      "searchQuery": ""
    },
    "sessionId": "",
    "tagIds": [],
    "transactionInfo": {
      "cost": "",
      "currency": "",
      "discountValue": "",
      "tax": "",
      "transactionId": "",
      "value": ""
    },
    "userInfo": {
      "userAgent": "",
      "userId": ""
    },
    "userPseudoId": ""
  },
  "userLabels": {},
  "validateOnly": false
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1beta/:servingConfig:recommend");

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  \"filter\": \"\",\n  \"pageSize\": 0,\n  \"params\": {},\n  \"userEvent\": {\n    \"attributes\": {},\n    \"attributionToken\": \"\",\n    \"completionInfo\": {\n      \"selectedPosition\": 0,\n      \"selectedSuggestion\": \"\"\n    },\n    \"directUserRequest\": false,\n    \"documents\": [\n      {\n        \"id\": \"\",\n        \"name\": \"\",\n        \"promotionIds\": [],\n        \"quantity\": 0\n      }\n    ],\n    \"eventTime\": \"\",\n    \"eventType\": \"\",\n    \"filter\": \"\",\n    \"mediaInfo\": {\n      \"mediaProgressDuration\": \"\",\n      \"mediaProgressPercentage\": \"\"\n    },\n    \"pageInfo\": {\n      \"pageCategory\": \"\",\n      \"pageviewId\": \"\",\n      \"referrerUri\": \"\",\n      \"uri\": \"\"\n    },\n    \"panel\": {\n      \"displayName\": \"\",\n      \"panelId\": \"\",\n      \"panelPosition\": 0,\n      \"totalPanels\": 0\n    },\n    \"promotionIds\": [],\n    \"searchInfo\": {\n      \"offset\": 0,\n      \"orderBy\": \"\",\n      \"searchQuery\": \"\"\n    },\n    \"sessionId\": \"\",\n    \"tagIds\": [],\n    \"transactionInfo\": {\n      \"cost\": \"\",\n      \"currency\": \"\",\n      \"discountValue\": \"\",\n      \"tax\": \"\",\n      \"transactionId\": \"\",\n      \"value\": \"\"\n    },\n    \"userInfo\": {\n      \"userAgent\": \"\",\n      \"userId\": \"\"\n    },\n    \"userPseudoId\": \"\"\n  },\n  \"userLabels\": {},\n  \"validateOnly\": false\n}");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/post "{{baseUrl}}/v1beta/:servingConfig:recommend" {:content-type :json
                                                                            :form-params {:filter ""
                                                                                          :pageSize 0
                                                                                          :params {}
                                                                                          :userEvent {:attributes {}
                                                                                                      :attributionToken ""
                                                                                                      :completionInfo {:selectedPosition 0
                                                                                                                       :selectedSuggestion ""}
                                                                                                      :directUserRequest false
                                                                                                      :documents [{:id ""
                                                                                                                   :name ""
                                                                                                                   :promotionIds []
                                                                                                                   :quantity 0}]
                                                                                                      :eventTime ""
                                                                                                      :eventType ""
                                                                                                      :filter ""
                                                                                                      :mediaInfo {:mediaProgressDuration ""
                                                                                                                  :mediaProgressPercentage ""}
                                                                                                      :pageInfo {:pageCategory ""
                                                                                                                 :pageviewId ""
                                                                                                                 :referrerUri ""
                                                                                                                 :uri ""}
                                                                                                      :panel {:displayName ""
                                                                                                              :panelId ""
                                                                                                              :panelPosition 0
                                                                                                              :totalPanels 0}
                                                                                                      :promotionIds []
                                                                                                      :searchInfo {:offset 0
                                                                                                                   :orderBy ""
                                                                                                                   :searchQuery ""}
                                                                                                      :sessionId ""
                                                                                                      :tagIds []
                                                                                                      :transactionInfo {:cost ""
                                                                                                                        :currency ""
                                                                                                                        :discountValue ""
                                                                                                                        :tax ""
                                                                                                                        :transactionId ""
                                                                                                                        :value ""}
                                                                                                      :userInfo {:userAgent ""
                                                                                                                 :userId ""}
                                                                                                      :userPseudoId ""}
                                                                                          :userLabels {}
                                                                                          :validateOnly false}})
require "http/client"

url = "{{baseUrl}}/v1beta/:servingConfig:recommend"
headers = HTTP::Headers{
  "content-type" => "application/json"
}
reqBody = "{\n  \"filter\": \"\",\n  \"pageSize\": 0,\n  \"params\": {},\n  \"userEvent\": {\n    \"attributes\": {},\n    \"attributionToken\": \"\",\n    \"completionInfo\": {\n      \"selectedPosition\": 0,\n      \"selectedSuggestion\": \"\"\n    },\n    \"directUserRequest\": false,\n    \"documents\": [\n      {\n        \"id\": \"\",\n        \"name\": \"\",\n        \"promotionIds\": [],\n        \"quantity\": 0\n      }\n    ],\n    \"eventTime\": \"\",\n    \"eventType\": \"\",\n    \"filter\": \"\",\n    \"mediaInfo\": {\n      \"mediaProgressDuration\": \"\",\n      \"mediaProgressPercentage\": \"\"\n    },\n    \"pageInfo\": {\n      \"pageCategory\": \"\",\n      \"pageviewId\": \"\",\n      \"referrerUri\": \"\",\n      \"uri\": \"\"\n    },\n    \"panel\": {\n      \"displayName\": \"\",\n      \"panelId\": \"\",\n      \"panelPosition\": 0,\n      \"totalPanels\": 0\n    },\n    \"promotionIds\": [],\n    \"searchInfo\": {\n      \"offset\": 0,\n      \"orderBy\": \"\",\n      \"searchQuery\": \"\"\n    },\n    \"sessionId\": \"\",\n    \"tagIds\": [],\n    \"transactionInfo\": {\n      \"cost\": \"\",\n      \"currency\": \"\",\n      \"discountValue\": \"\",\n      \"tax\": \"\",\n      \"transactionId\": \"\",\n      \"value\": \"\"\n    },\n    \"userInfo\": {\n      \"userAgent\": \"\",\n      \"userId\": \"\"\n    },\n    \"userPseudoId\": \"\"\n  },\n  \"userLabels\": {},\n  \"validateOnly\": false\n}"

response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Post,
    RequestUri = new Uri("{{baseUrl}}/v1beta/:servingConfig:recommend"),
    Content = new StringContent("{\n  \"filter\": \"\",\n  \"pageSize\": 0,\n  \"params\": {},\n  \"userEvent\": {\n    \"attributes\": {},\n    \"attributionToken\": \"\",\n    \"completionInfo\": {\n      \"selectedPosition\": 0,\n      \"selectedSuggestion\": \"\"\n    },\n    \"directUserRequest\": false,\n    \"documents\": [\n      {\n        \"id\": \"\",\n        \"name\": \"\",\n        \"promotionIds\": [],\n        \"quantity\": 0\n      }\n    ],\n    \"eventTime\": \"\",\n    \"eventType\": \"\",\n    \"filter\": \"\",\n    \"mediaInfo\": {\n      \"mediaProgressDuration\": \"\",\n      \"mediaProgressPercentage\": \"\"\n    },\n    \"pageInfo\": {\n      \"pageCategory\": \"\",\n      \"pageviewId\": \"\",\n      \"referrerUri\": \"\",\n      \"uri\": \"\"\n    },\n    \"panel\": {\n      \"displayName\": \"\",\n      \"panelId\": \"\",\n      \"panelPosition\": 0,\n      \"totalPanels\": 0\n    },\n    \"promotionIds\": [],\n    \"searchInfo\": {\n      \"offset\": 0,\n      \"orderBy\": \"\",\n      \"searchQuery\": \"\"\n    },\n    \"sessionId\": \"\",\n    \"tagIds\": [],\n    \"transactionInfo\": {\n      \"cost\": \"\",\n      \"currency\": \"\",\n      \"discountValue\": \"\",\n      \"tax\": \"\",\n      \"transactionId\": \"\",\n      \"value\": \"\"\n    },\n    \"userInfo\": {\n      \"userAgent\": \"\",\n      \"userId\": \"\"\n    },\n    \"userPseudoId\": \"\"\n  },\n  \"userLabels\": {},\n  \"validateOnly\": false\n}")
    {
        Headers =
        {
            ContentType = new MediaTypeHeaderValue("application/json")
        }
    }
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1beta/:servingConfig:recommend");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"filter\": \"\",\n  \"pageSize\": 0,\n  \"params\": {},\n  \"userEvent\": {\n    \"attributes\": {},\n    \"attributionToken\": \"\",\n    \"completionInfo\": {\n      \"selectedPosition\": 0,\n      \"selectedSuggestion\": \"\"\n    },\n    \"directUserRequest\": false,\n    \"documents\": [\n      {\n        \"id\": \"\",\n        \"name\": \"\",\n        \"promotionIds\": [],\n        \"quantity\": 0\n      }\n    ],\n    \"eventTime\": \"\",\n    \"eventType\": \"\",\n    \"filter\": \"\",\n    \"mediaInfo\": {\n      \"mediaProgressDuration\": \"\",\n      \"mediaProgressPercentage\": \"\"\n    },\n    \"pageInfo\": {\n      \"pageCategory\": \"\",\n      \"pageviewId\": \"\",\n      \"referrerUri\": \"\",\n      \"uri\": \"\"\n    },\n    \"panel\": {\n      \"displayName\": \"\",\n      \"panelId\": \"\",\n      \"panelPosition\": 0,\n      \"totalPanels\": 0\n    },\n    \"promotionIds\": [],\n    \"searchInfo\": {\n      \"offset\": 0,\n      \"orderBy\": \"\",\n      \"searchQuery\": \"\"\n    },\n    \"sessionId\": \"\",\n    \"tagIds\": [],\n    \"transactionInfo\": {\n      \"cost\": \"\",\n      \"currency\": \"\",\n      \"discountValue\": \"\",\n      \"tax\": \"\",\n      \"transactionId\": \"\",\n      \"value\": \"\"\n    },\n    \"userInfo\": {\n      \"userAgent\": \"\",\n      \"userId\": \"\"\n    },\n    \"userPseudoId\": \"\"\n  },\n  \"userLabels\": {},\n  \"validateOnly\": false\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/v1beta/:servingConfig:recommend"

	payload := strings.NewReader("{\n  \"filter\": \"\",\n  \"pageSize\": 0,\n  \"params\": {},\n  \"userEvent\": {\n    \"attributes\": {},\n    \"attributionToken\": \"\",\n    \"completionInfo\": {\n      \"selectedPosition\": 0,\n      \"selectedSuggestion\": \"\"\n    },\n    \"directUserRequest\": false,\n    \"documents\": [\n      {\n        \"id\": \"\",\n        \"name\": \"\",\n        \"promotionIds\": [],\n        \"quantity\": 0\n      }\n    ],\n    \"eventTime\": \"\",\n    \"eventType\": \"\",\n    \"filter\": \"\",\n    \"mediaInfo\": {\n      \"mediaProgressDuration\": \"\",\n      \"mediaProgressPercentage\": \"\"\n    },\n    \"pageInfo\": {\n      \"pageCategory\": \"\",\n      \"pageviewId\": \"\",\n      \"referrerUri\": \"\",\n      \"uri\": \"\"\n    },\n    \"panel\": {\n      \"displayName\": \"\",\n      \"panelId\": \"\",\n      \"panelPosition\": 0,\n      \"totalPanels\": 0\n    },\n    \"promotionIds\": [],\n    \"searchInfo\": {\n      \"offset\": 0,\n      \"orderBy\": \"\",\n      \"searchQuery\": \"\"\n    },\n    \"sessionId\": \"\",\n    \"tagIds\": [],\n    \"transactionInfo\": {\n      \"cost\": \"\",\n      \"currency\": \"\",\n      \"discountValue\": \"\",\n      \"tax\": \"\",\n      \"transactionId\": \"\",\n      \"value\": \"\"\n    },\n    \"userInfo\": {\n      \"userAgent\": \"\",\n      \"userId\": \"\"\n    },\n    \"userPseudoId\": \"\"\n  },\n  \"userLabels\": {},\n  \"validateOnly\": false\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("content-type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
POST /baseUrl/v1beta/:servingConfig:recommend HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 1216

{
  "filter": "",
  "pageSize": 0,
  "params": {},
  "userEvent": {
    "attributes": {},
    "attributionToken": "",
    "completionInfo": {
      "selectedPosition": 0,
      "selectedSuggestion": ""
    },
    "directUserRequest": false,
    "documents": [
      {
        "id": "",
        "name": "",
        "promotionIds": [],
        "quantity": 0
      }
    ],
    "eventTime": "",
    "eventType": "",
    "filter": "",
    "mediaInfo": {
      "mediaProgressDuration": "",
      "mediaProgressPercentage": ""
    },
    "pageInfo": {
      "pageCategory": "",
      "pageviewId": "",
      "referrerUri": "",
      "uri": ""
    },
    "panel": {
      "displayName": "",
      "panelId": "",
      "panelPosition": 0,
      "totalPanels": 0
    },
    "promotionIds": [],
    "searchInfo": {
      "offset": 0,
      "orderBy": "",
      "searchQuery": ""
    },
    "sessionId": "",
    "tagIds": [],
    "transactionInfo": {
      "cost": "",
      "currency": "",
      "discountValue": "",
      "tax": "",
      "transactionId": "",
      "value": ""
    },
    "userInfo": {
      "userAgent": "",
      "userId": ""
    },
    "userPseudoId": ""
  },
  "userLabels": {},
  "validateOnly": false
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1beta/:servingConfig:recommend")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"filter\": \"\",\n  \"pageSize\": 0,\n  \"params\": {},\n  \"userEvent\": {\n    \"attributes\": {},\n    \"attributionToken\": \"\",\n    \"completionInfo\": {\n      \"selectedPosition\": 0,\n      \"selectedSuggestion\": \"\"\n    },\n    \"directUserRequest\": false,\n    \"documents\": [\n      {\n        \"id\": \"\",\n        \"name\": \"\",\n        \"promotionIds\": [],\n        \"quantity\": 0\n      }\n    ],\n    \"eventTime\": \"\",\n    \"eventType\": \"\",\n    \"filter\": \"\",\n    \"mediaInfo\": {\n      \"mediaProgressDuration\": \"\",\n      \"mediaProgressPercentage\": \"\"\n    },\n    \"pageInfo\": {\n      \"pageCategory\": \"\",\n      \"pageviewId\": \"\",\n      \"referrerUri\": \"\",\n      \"uri\": \"\"\n    },\n    \"panel\": {\n      \"displayName\": \"\",\n      \"panelId\": \"\",\n      \"panelPosition\": 0,\n      \"totalPanels\": 0\n    },\n    \"promotionIds\": [],\n    \"searchInfo\": {\n      \"offset\": 0,\n      \"orderBy\": \"\",\n      \"searchQuery\": \"\"\n    },\n    \"sessionId\": \"\",\n    \"tagIds\": [],\n    \"transactionInfo\": {\n      \"cost\": \"\",\n      \"currency\": \"\",\n      \"discountValue\": \"\",\n      \"tax\": \"\",\n      \"transactionId\": \"\",\n      \"value\": \"\"\n    },\n    \"userInfo\": {\n      \"userAgent\": \"\",\n      \"userId\": \"\"\n    },\n    \"userPseudoId\": \"\"\n  },\n  \"userLabels\": {},\n  \"validateOnly\": false\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/v1beta/:servingConfig:recommend"))
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"filter\": \"\",\n  \"pageSize\": 0,\n  \"params\": {},\n  \"userEvent\": {\n    \"attributes\": {},\n    \"attributionToken\": \"\",\n    \"completionInfo\": {\n      \"selectedPosition\": 0,\n      \"selectedSuggestion\": \"\"\n    },\n    \"directUserRequest\": false,\n    \"documents\": [\n      {\n        \"id\": \"\",\n        \"name\": \"\",\n        \"promotionIds\": [],\n        \"quantity\": 0\n      }\n    ],\n    \"eventTime\": \"\",\n    \"eventType\": \"\",\n    \"filter\": \"\",\n    \"mediaInfo\": {\n      \"mediaProgressDuration\": \"\",\n      \"mediaProgressPercentage\": \"\"\n    },\n    \"pageInfo\": {\n      \"pageCategory\": \"\",\n      \"pageviewId\": \"\",\n      \"referrerUri\": \"\",\n      \"uri\": \"\"\n    },\n    \"panel\": {\n      \"displayName\": \"\",\n      \"panelId\": \"\",\n      \"panelPosition\": 0,\n      \"totalPanels\": 0\n    },\n    \"promotionIds\": [],\n    \"searchInfo\": {\n      \"offset\": 0,\n      \"orderBy\": \"\",\n      \"searchQuery\": \"\"\n    },\n    \"sessionId\": \"\",\n    \"tagIds\": [],\n    \"transactionInfo\": {\n      \"cost\": \"\",\n      \"currency\": \"\",\n      \"discountValue\": \"\",\n      \"tax\": \"\",\n      \"transactionId\": \"\",\n      \"value\": \"\"\n    },\n    \"userInfo\": {\n      \"userAgent\": \"\",\n      \"userId\": \"\"\n    },\n    \"userPseudoId\": \"\"\n  },\n  \"userLabels\": {},\n  \"validateOnly\": false\n}"))
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n  \"filter\": \"\",\n  \"pageSize\": 0,\n  \"params\": {},\n  \"userEvent\": {\n    \"attributes\": {},\n    \"attributionToken\": \"\",\n    \"completionInfo\": {\n      \"selectedPosition\": 0,\n      \"selectedSuggestion\": \"\"\n    },\n    \"directUserRequest\": false,\n    \"documents\": [\n      {\n        \"id\": \"\",\n        \"name\": \"\",\n        \"promotionIds\": [],\n        \"quantity\": 0\n      }\n    ],\n    \"eventTime\": \"\",\n    \"eventType\": \"\",\n    \"filter\": \"\",\n    \"mediaInfo\": {\n      \"mediaProgressDuration\": \"\",\n      \"mediaProgressPercentage\": \"\"\n    },\n    \"pageInfo\": {\n      \"pageCategory\": \"\",\n      \"pageviewId\": \"\",\n      \"referrerUri\": \"\",\n      \"uri\": \"\"\n    },\n    \"panel\": {\n      \"displayName\": \"\",\n      \"panelId\": \"\",\n      \"panelPosition\": 0,\n      \"totalPanels\": 0\n    },\n    \"promotionIds\": [],\n    \"searchInfo\": {\n      \"offset\": 0,\n      \"orderBy\": \"\",\n      \"searchQuery\": \"\"\n    },\n    \"sessionId\": \"\",\n    \"tagIds\": [],\n    \"transactionInfo\": {\n      \"cost\": \"\",\n      \"currency\": \"\",\n      \"discountValue\": \"\",\n      \"tax\": \"\",\n      \"transactionId\": \"\",\n      \"value\": \"\"\n    },\n    \"userInfo\": {\n      \"userAgent\": \"\",\n      \"userId\": \"\"\n    },\n    \"userPseudoId\": \"\"\n  },\n  \"userLabels\": {},\n  \"validateOnly\": false\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/v1beta/:servingConfig:recommend")
  .post(body)
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1beta/:servingConfig:recommend")
  .header("content-type", "application/json")
  .body("{\n  \"filter\": \"\",\n  \"pageSize\": 0,\n  \"params\": {},\n  \"userEvent\": {\n    \"attributes\": {},\n    \"attributionToken\": \"\",\n    \"completionInfo\": {\n      \"selectedPosition\": 0,\n      \"selectedSuggestion\": \"\"\n    },\n    \"directUserRequest\": false,\n    \"documents\": [\n      {\n        \"id\": \"\",\n        \"name\": \"\",\n        \"promotionIds\": [],\n        \"quantity\": 0\n      }\n    ],\n    \"eventTime\": \"\",\n    \"eventType\": \"\",\n    \"filter\": \"\",\n    \"mediaInfo\": {\n      \"mediaProgressDuration\": \"\",\n      \"mediaProgressPercentage\": \"\"\n    },\n    \"pageInfo\": {\n      \"pageCategory\": \"\",\n      \"pageviewId\": \"\",\n      \"referrerUri\": \"\",\n      \"uri\": \"\"\n    },\n    \"panel\": {\n      \"displayName\": \"\",\n      \"panelId\": \"\",\n      \"panelPosition\": 0,\n      \"totalPanels\": 0\n    },\n    \"promotionIds\": [],\n    \"searchInfo\": {\n      \"offset\": 0,\n      \"orderBy\": \"\",\n      \"searchQuery\": \"\"\n    },\n    \"sessionId\": \"\",\n    \"tagIds\": [],\n    \"transactionInfo\": {\n      \"cost\": \"\",\n      \"currency\": \"\",\n      \"discountValue\": \"\",\n      \"tax\": \"\",\n      \"transactionId\": \"\",\n      \"value\": \"\"\n    },\n    \"userInfo\": {\n      \"userAgent\": \"\",\n      \"userId\": \"\"\n    },\n    \"userPseudoId\": \"\"\n  },\n  \"userLabels\": {},\n  \"validateOnly\": false\n}")
  .asString();
const data = JSON.stringify({
  filter: '',
  pageSize: 0,
  params: {},
  userEvent: {
    attributes: {},
    attributionToken: '',
    completionInfo: {
      selectedPosition: 0,
      selectedSuggestion: ''
    },
    directUserRequest: false,
    documents: [
      {
        id: '',
        name: '',
        promotionIds: [],
        quantity: 0
      }
    ],
    eventTime: '',
    eventType: '',
    filter: '',
    mediaInfo: {
      mediaProgressDuration: '',
      mediaProgressPercentage: ''
    },
    pageInfo: {
      pageCategory: '',
      pageviewId: '',
      referrerUri: '',
      uri: ''
    },
    panel: {
      displayName: '',
      panelId: '',
      panelPosition: 0,
      totalPanels: 0
    },
    promotionIds: [],
    searchInfo: {
      offset: 0,
      orderBy: '',
      searchQuery: ''
    },
    sessionId: '',
    tagIds: [],
    transactionInfo: {
      cost: '',
      currency: '',
      discountValue: '',
      tax: '',
      transactionId: '',
      value: ''
    },
    userInfo: {
      userAgent: '',
      userId: ''
    },
    userPseudoId: ''
  },
  userLabels: {},
  validateOnly: false
});

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('POST', '{{baseUrl}}/v1beta/:servingConfig:recommend');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'POST',
  url: '{{baseUrl}}/v1beta/:servingConfig:recommend',
  headers: {'content-type': 'application/json'},
  data: {
    filter: '',
    pageSize: 0,
    params: {},
    userEvent: {
      attributes: {},
      attributionToken: '',
      completionInfo: {selectedPosition: 0, selectedSuggestion: ''},
      directUserRequest: false,
      documents: [{id: '', name: '', promotionIds: [], quantity: 0}],
      eventTime: '',
      eventType: '',
      filter: '',
      mediaInfo: {mediaProgressDuration: '', mediaProgressPercentage: ''},
      pageInfo: {pageCategory: '', pageviewId: '', referrerUri: '', uri: ''},
      panel: {displayName: '', panelId: '', panelPosition: 0, totalPanels: 0},
      promotionIds: [],
      searchInfo: {offset: 0, orderBy: '', searchQuery: ''},
      sessionId: '',
      tagIds: [],
      transactionInfo: {
        cost: '',
        currency: '',
        discountValue: '',
        tax: '',
        transactionId: '',
        value: ''
      },
      userInfo: {userAgent: '', userId: ''},
      userPseudoId: ''
    },
    userLabels: {},
    validateOnly: false
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/v1beta/:servingConfig:recommend';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"filter":"","pageSize":0,"params":{},"userEvent":{"attributes":{},"attributionToken":"","completionInfo":{"selectedPosition":0,"selectedSuggestion":""},"directUserRequest":false,"documents":[{"id":"","name":"","promotionIds":[],"quantity":0}],"eventTime":"","eventType":"","filter":"","mediaInfo":{"mediaProgressDuration":"","mediaProgressPercentage":""},"pageInfo":{"pageCategory":"","pageviewId":"","referrerUri":"","uri":""},"panel":{"displayName":"","panelId":"","panelPosition":0,"totalPanels":0},"promotionIds":[],"searchInfo":{"offset":0,"orderBy":"","searchQuery":""},"sessionId":"","tagIds":[],"transactionInfo":{"cost":"","currency":"","discountValue":"","tax":"","transactionId":"","value":""},"userInfo":{"userAgent":"","userId":""},"userPseudoId":""},"userLabels":{},"validateOnly":false}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/v1beta/:servingConfig:recommend',
  method: 'POST',
  headers: {
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "filter": "",\n  "pageSize": 0,\n  "params": {},\n  "userEvent": {\n    "attributes": {},\n    "attributionToken": "",\n    "completionInfo": {\n      "selectedPosition": 0,\n      "selectedSuggestion": ""\n    },\n    "directUserRequest": false,\n    "documents": [\n      {\n        "id": "",\n        "name": "",\n        "promotionIds": [],\n        "quantity": 0\n      }\n    ],\n    "eventTime": "",\n    "eventType": "",\n    "filter": "",\n    "mediaInfo": {\n      "mediaProgressDuration": "",\n      "mediaProgressPercentage": ""\n    },\n    "pageInfo": {\n      "pageCategory": "",\n      "pageviewId": "",\n      "referrerUri": "",\n      "uri": ""\n    },\n    "panel": {\n      "displayName": "",\n      "panelId": "",\n      "panelPosition": 0,\n      "totalPanels": 0\n    },\n    "promotionIds": [],\n    "searchInfo": {\n      "offset": 0,\n      "orderBy": "",\n      "searchQuery": ""\n    },\n    "sessionId": "",\n    "tagIds": [],\n    "transactionInfo": {\n      "cost": "",\n      "currency": "",\n      "discountValue": "",\n      "tax": "",\n      "transactionId": "",\n      "value": ""\n    },\n    "userInfo": {\n      "userAgent": "",\n      "userId": ""\n    },\n    "userPseudoId": ""\n  },\n  "userLabels": {},\n  "validateOnly": false\n}'
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"filter\": \"\",\n  \"pageSize\": 0,\n  \"params\": {},\n  \"userEvent\": {\n    \"attributes\": {},\n    \"attributionToken\": \"\",\n    \"completionInfo\": {\n      \"selectedPosition\": 0,\n      \"selectedSuggestion\": \"\"\n    },\n    \"directUserRequest\": false,\n    \"documents\": [\n      {\n        \"id\": \"\",\n        \"name\": \"\",\n        \"promotionIds\": [],\n        \"quantity\": 0\n      }\n    ],\n    \"eventTime\": \"\",\n    \"eventType\": \"\",\n    \"filter\": \"\",\n    \"mediaInfo\": {\n      \"mediaProgressDuration\": \"\",\n      \"mediaProgressPercentage\": \"\"\n    },\n    \"pageInfo\": {\n      \"pageCategory\": \"\",\n      \"pageviewId\": \"\",\n      \"referrerUri\": \"\",\n      \"uri\": \"\"\n    },\n    \"panel\": {\n      \"displayName\": \"\",\n      \"panelId\": \"\",\n      \"panelPosition\": 0,\n      \"totalPanels\": 0\n    },\n    \"promotionIds\": [],\n    \"searchInfo\": {\n      \"offset\": 0,\n      \"orderBy\": \"\",\n      \"searchQuery\": \"\"\n    },\n    \"sessionId\": \"\",\n    \"tagIds\": [],\n    \"transactionInfo\": {\n      \"cost\": \"\",\n      \"currency\": \"\",\n      \"discountValue\": \"\",\n      \"tax\": \"\",\n      \"transactionId\": \"\",\n      \"value\": \"\"\n    },\n    \"userInfo\": {\n      \"userAgent\": \"\",\n      \"userId\": \"\"\n    },\n    \"userPseudoId\": \"\"\n  },\n  \"userLabels\": {},\n  \"validateOnly\": false\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/v1beta/:servingConfig:recommend")
  .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/v1beta/:servingConfig:recommend',
  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({
  filter: '',
  pageSize: 0,
  params: {},
  userEvent: {
    attributes: {},
    attributionToken: '',
    completionInfo: {selectedPosition: 0, selectedSuggestion: ''},
    directUserRequest: false,
    documents: [{id: '', name: '', promotionIds: [], quantity: 0}],
    eventTime: '',
    eventType: '',
    filter: '',
    mediaInfo: {mediaProgressDuration: '', mediaProgressPercentage: ''},
    pageInfo: {pageCategory: '', pageviewId: '', referrerUri: '', uri: ''},
    panel: {displayName: '', panelId: '', panelPosition: 0, totalPanels: 0},
    promotionIds: [],
    searchInfo: {offset: 0, orderBy: '', searchQuery: ''},
    sessionId: '',
    tagIds: [],
    transactionInfo: {
      cost: '',
      currency: '',
      discountValue: '',
      tax: '',
      transactionId: '',
      value: ''
    },
    userInfo: {userAgent: '', userId: ''},
    userPseudoId: ''
  },
  userLabels: {},
  validateOnly: false
}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/v1beta/:servingConfig:recommend',
  headers: {'content-type': 'application/json'},
  body: {
    filter: '',
    pageSize: 0,
    params: {},
    userEvent: {
      attributes: {},
      attributionToken: '',
      completionInfo: {selectedPosition: 0, selectedSuggestion: ''},
      directUserRequest: false,
      documents: [{id: '', name: '', promotionIds: [], quantity: 0}],
      eventTime: '',
      eventType: '',
      filter: '',
      mediaInfo: {mediaProgressDuration: '', mediaProgressPercentage: ''},
      pageInfo: {pageCategory: '', pageviewId: '', referrerUri: '', uri: ''},
      panel: {displayName: '', panelId: '', panelPosition: 0, totalPanels: 0},
      promotionIds: [],
      searchInfo: {offset: 0, orderBy: '', searchQuery: ''},
      sessionId: '',
      tagIds: [],
      transactionInfo: {
        cost: '',
        currency: '',
        discountValue: '',
        tax: '',
        transactionId: '',
        value: ''
      },
      userInfo: {userAgent: '', userId: ''},
      userPseudoId: ''
    },
    userLabels: {},
    validateOnly: false
  },
  json: true
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('POST', '{{baseUrl}}/v1beta/:servingConfig:recommend');

req.headers({
  'content-type': 'application/json'
});

req.type('json');
req.send({
  filter: '',
  pageSize: 0,
  params: {},
  userEvent: {
    attributes: {},
    attributionToken: '',
    completionInfo: {
      selectedPosition: 0,
      selectedSuggestion: ''
    },
    directUserRequest: false,
    documents: [
      {
        id: '',
        name: '',
        promotionIds: [],
        quantity: 0
      }
    ],
    eventTime: '',
    eventType: '',
    filter: '',
    mediaInfo: {
      mediaProgressDuration: '',
      mediaProgressPercentage: ''
    },
    pageInfo: {
      pageCategory: '',
      pageviewId: '',
      referrerUri: '',
      uri: ''
    },
    panel: {
      displayName: '',
      panelId: '',
      panelPosition: 0,
      totalPanels: 0
    },
    promotionIds: [],
    searchInfo: {
      offset: 0,
      orderBy: '',
      searchQuery: ''
    },
    sessionId: '',
    tagIds: [],
    transactionInfo: {
      cost: '',
      currency: '',
      discountValue: '',
      tax: '',
      transactionId: '',
      value: ''
    },
    userInfo: {
      userAgent: '',
      userId: ''
    },
    userPseudoId: ''
  },
  userLabels: {},
  validateOnly: false
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'POST',
  url: '{{baseUrl}}/v1beta/:servingConfig:recommend',
  headers: {'content-type': 'application/json'},
  data: {
    filter: '',
    pageSize: 0,
    params: {},
    userEvent: {
      attributes: {},
      attributionToken: '',
      completionInfo: {selectedPosition: 0, selectedSuggestion: ''},
      directUserRequest: false,
      documents: [{id: '', name: '', promotionIds: [], quantity: 0}],
      eventTime: '',
      eventType: '',
      filter: '',
      mediaInfo: {mediaProgressDuration: '', mediaProgressPercentage: ''},
      pageInfo: {pageCategory: '', pageviewId: '', referrerUri: '', uri: ''},
      panel: {displayName: '', panelId: '', panelPosition: 0, totalPanels: 0},
      promotionIds: [],
      searchInfo: {offset: 0, orderBy: '', searchQuery: ''},
      sessionId: '',
      tagIds: [],
      transactionInfo: {
        cost: '',
        currency: '',
        discountValue: '',
        tax: '',
        transactionId: '',
        value: ''
      },
      userInfo: {userAgent: '', userId: ''},
      userPseudoId: ''
    },
    userLabels: {},
    validateOnly: false
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/v1beta/:servingConfig:recommend';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"filter":"","pageSize":0,"params":{},"userEvent":{"attributes":{},"attributionToken":"","completionInfo":{"selectedPosition":0,"selectedSuggestion":""},"directUserRequest":false,"documents":[{"id":"","name":"","promotionIds":[],"quantity":0}],"eventTime":"","eventType":"","filter":"","mediaInfo":{"mediaProgressDuration":"","mediaProgressPercentage":""},"pageInfo":{"pageCategory":"","pageviewId":"","referrerUri":"","uri":""},"panel":{"displayName":"","panelId":"","panelPosition":0,"totalPanels":0},"promotionIds":[],"searchInfo":{"offset":0,"orderBy":"","searchQuery":""},"sessionId":"","tagIds":[],"transactionInfo":{"cost":"","currency":"","discountValue":"","tax":"","transactionId":"","value":""},"userInfo":{"userAgent":"","userId":""},"userPseudoId":""},"userLabels":{},"validateOnly":false}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"filter": @"",
                              @"pageSize": @0,
                              @"params": @{  },
                              @"userEvent": @{ @"attributes": @{  }, @"attributionToken": @"", @"completionInfo": @{ @"selectedPosition": @0, @"selectedSuggestion": @"" }, @"directUserRequest": @NO, @"documents": @[ @{ @"id": @"", @"name": @"", @"promotionIds": @[  ], @"quantity": @0 } ], @"eventTime": @"", @"eventType": @"", @"filter": @"", @"mediaInfo": @{ @"mediaProgressDuration": @"", @"mediaProgressPercentage": @"" }, @"pageInfo": @{ @"pageCategory": @"", @"pageviewId": @"", @"referrerUri": @"", @"uri": @"" }, @"panel": @{ @"displayName": @"", @"panelId": @"", @"panelPosition": @0, @"totalPanels": @0 }, @"promotionIds": @[  ], @"searchInfo": @{ @"offset": @0, @"orderBy": @"", @"searchQuery": @"" }, @"sessionId": @"", @"tagIds": @[  ], @"transactionInfo": @{ @"cost": @"", @"currency": @"", @"discountValue": @"", @"tax": @"", @"transactionId": @"", @"value": @"" }, @"userInfo": @{ @"userAgent": @"", @"userId": @"" }, @"userPseudoId": @"" },
                              @"userLabels": @{  },
                              @"validateOnly": @NO };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1beta/:servingConfig:recommend"]
                                                       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}}/v1beta/:servingConfig:recommend" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n  \"filter\": \"\",\n  \"pageSize\": 0,\n  \"params\": {},\n  \"userEvent\": {\n    \"attributes\": {},\n    \"attributionToken\": \"\",\n    \"completionInfo\": {\n      \"selectedPosition\": 0,\n      \"selectedSuggestion\": \"\"\n    },\n    \"directUserRequest\": false,\n    \"documents\": [\n      {\n        \"id\": \"\",\n        \"name\": \"\",\n        \"promotionIds\": [],\n        \"quantity\": 0\n      }\n    ],\n    \"eventTime\": \"\",\n    \"eventType\": \"\",\n    \"filter\": \"\",\n    \"mediaInfo\": {\n      \"mediaProgressDuration\": \"\",\n      \"mediaProgressPercentage\": \"\"\n    },\n    \"pageInfo\": {\n      \"pageCategory\": \"\",\n      \"pageviewId\": \"\",\n      \"referrerUri\": \"\",\n      \"uri\": \"\"\n    },\n    \"panel\": {\n      \"displayName\": \"\",\n      \"panelId\": \"\",\n      \"panelPosition\": 0,\n      \"totalPanels\": 0\n    },\n    \"promotionIds\": [],\n    \"searchInfo\": {\n      \"offset\": 0,\n      \"orderBy\": \"\",\n      \"searchQuery\": \"\"\n    },\n    \"sessionId\": \"\",\n    \"tagIds\": [],\n    \"transactionInfo\": {\n      \"cost\": \"\",\n      \"currency\": \"\",\n      \"discountValue\": \"\",\n      \"tax\": \"\",\n      \"transactionId\": \"\",\n      \"value\": \"\"\n    },\n    \"userInfo\": {\n      \"userAgent\": \"\",\n      \"userId\": \"\"\n    },\n    \"userPseudoId\": \"\"\n  },\n  \"userLabels\": {},\n  \"validateOnly\": false\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/v1beta/:servingConfig:recommend",
  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([
    'filter' => '',
    'pageSize' => 0,
    'params' => [
        
    ],
    'userEvent' => [
        'attributes' => [
                
        ],
        'attributionToken' => '',
        'completionInfo' => [
                'selectedPosition' => 0,
                'selectedSuggestion' => ''
        ],
        'directUserRequest' => null,
        'documents' => [
                [
                                'id' => '',
                                'name' => '',
                                'promotionIds' => [
                                                                
                                ],
                                'quantity' => 0
                ]
        ],
        'eventTime' => '',
        'eventType' => '',
        'filter' => '',
        'mediaInfo' => [
                'mediaProgressDuration' => '',
                'mediaProgressPercentage' => ''
        ],
        'pageInfo' => [
                'pageCategory' => '',
                'pageviewId' => '',
                'referrerUri' => '',
                'uri' => ''
        ],
        'panel' => [
                'displayName' => '',
                'panelId' => '',
                'panelPosition' => 0,
                'totalPanels' => 0
        ],
        'promotionIds' => [
                
        ],
        'searchInfo' => [
                'offset' => 0,
                'orderBy' => '',
                'searchQuery' => ''
        ],
        'sessionId' => '',
        'tagIds' => [
                
        ],
        'transactionInfo' => [
                'cost' => '',
                'currency' => '',
                'discountValue' => '',
                'tax' => '',
                'transactionId' => '',
                'value' => ''
        ],
        'userInfo' => [
                'userAgent' => '',
                'userId' => ''
        ],
        'userPseudoId' => ''
    ],
    'userLabels' => [
        
    ],
    'validateOnly' => null
  ]),
  CURLOPT_HTTPHEADER => [
    "content-type: application/json"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('POST', '{{baseUrl}}/v1beta/:servingConfig:recommend', [
  'body' => '{
  "filter": "",
  "pageSize": 0,
  "params": {},
  "userEvent": {
    "attributes": {},
    "attributionToken": "",
    "completionInfo": {
      "selectedPosition": 0,
      "selectedSuggestion": ""
    },
    "directUserRequest": false,
    "documents": [
      {
        "id": "",
        "name": "",
        "promotionIds": [],
        "quantity": 0
      }
    ],
    "eventTime": "",
    "eventType": "",
    "filter": "",
    "mediaInfo": {
      "mediaProgressDuration": "",
      "mediaProgressPercentage": ""
    },
    "pageInfo": {
      "pageCategory": "",
      "pageviewId": "",
      "referrerUri": "",
      "uri": ""
    },
    "panel": {
      "displayName": "",
      "panelId": "",
      "panelPosition": 0,
      "totalPanels": 0
    },
    "promotionIds": [],
    "searchInfo": {
      "offset": 0,
      "orderBy": "",
      "searchQuery": ""
    },
    "sessionId": "",
    "tagIds": [],
    "transactionInfo": {
      "cost": "",
      "currency": "",
      "discountValue": "",
      "tax": "",
      "transactionId": "",
      "value": ""
    },
    "userInfo": {
      "userAgent": "",
      "userId": ""
    },
    "userPseudoId": ""
  },
  "userLabels": {},
  "validateOnly": false
}',
  'headers' => [
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/v1beta/:servingConfig:recommend');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'filter' => '',
  'pageSize' => 0,
  'params' => [
    
  ],
  'userEvent' => [
    'attributes' => [
        
    ],
    'attributionToken' => '',
    'completionInfo' => [
        'selectedPosition' => 0,
        'selectedSuggestion' => ''
    ],
    'directUserRequest' => null,
    'documents' => [
        [
                'id' => '',
                'name' => '',
                'promotionIds' => [
                                
                ],
                'quantity' => 0
        ]
    ],
    'eventTime' => '',
    'eventType' => '',
    'filter' => '',
    'mediaInfo' => [
        'mediaProgressDuration' => '',
        'mediaProgressPercentage' => ''
    ],
    'pageInfo' => [
        'pageCategory' => '',
        'pageviewId' => '',
        'referrerUri' => '',
        'uri' => ''
    ],
    'panel' => [
        'displayName' => '',
        'panelId' => '',
        'panelPosition' => 0,
        'totalPanels' => 0
    ],
    'promotionIds' => [
        
    ],
    'searchInfo' => [
        'offset' => 0,
        'orderBy' => '',
        'searchQuery' => ''
    ],
    'sessionId' => '',
    'tagIds' => [
        
    ],
    'transactionInfo' => [
        'cost' => '',
        'currency' => '',
        'discountValue' => '',
        'tax' => '',
        'transactionId' => '',
        'value' => ''
    ],
    'userInfo' => [
        'userAgent' => '',
        'userId' => ''
    ],
    'userPseudoId' => ''
  ],
  'userLabels' => [
    
  ],
  'validateOnly' => null
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'filter' => '',
  'pageSize' => 0,
  'params' => [
    
  ],
  'userEvent' => [
    'attributes' => [
        
    ],
    'attributionToken' => '',
    'completionInfo' => [
        'selectedPosition' => 0,
        'selectedSuggestion' => ''
    ],
    'directUserRequest' => null,
    'documents' => [
        [
                'id' => '',
                'name' => '',
                'promotionIds' => [
                                
                ],
                'quantity' => 0
        ]
    ],
    'eventTime' => '',
    'eventType' => '',
    'filter' => '',
    'mediaInfo' => [
        'mediaProgressDuration' => '',
        'mediaProgressPercentage' => ''
    ],
    'pageInfo' => [
        'pageCategory' => '',
        'pageviewId' => '',
        'referrerUri' => '',
        'uri' => ''
    ],
    'panel' => [
        'displayName' => '',
        'panelId' => '',
        'panelPosition' => 0,
        'totalPanels' => 0
    ],
    'promotionIds' => [
        
    ],
    'searchInfo' => [
        'offset' => 0,
        'orderBy' => '',
        'searchQuery' => ''
    ],
    'sessionId' => '',
    'tagIds' => [
        
    ],
    'transactionInfo' => [
        'cost' => '',
        'currency' => '',
        'discountValue' => '',
        'tax' => '',
        'transactionId' => '',
        'value' => ''
    ],
    'userInfo' => [
        'userAgent' => '',
        'userId' => ''
    ],
    'userPseudoId' => ''
  ],
  'userLabels' => [
    
  ],
  'validateOnly' => null
]));
$request->setRequestUrl('{{baseUrl}}/v1beta/:servingConfig:recommend');
$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}}/v1beta/:servingConfig:recommend' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "filter": "",
  "pageSize": 0,
  "params": {},
  "userEvent": {
    "attributes": {},
    "attributionToken": "",
    "completionInfo": {
      "selectedPosition": 0,
      "selectedSuggestion": ""
    },
    "directUserRequest": false,
    "documents": [
      {
        "id": "",
        "name": "",
        "promotionIds": [],
        "quantity": 0
      }
    ],
    "eventTime": "",
    "eventType": "",
    "filter": "",
    "mediaInfo": {
      "mediaProgressDuration": "",
      "mediaProgressPercentage": ""
    },
    "pageInfo": {
      "pageCategory": "",
      "pageviewId": "",
      "referrerUri": "",
      "uri": ""
    },
    "panel": {
      "displayName": "",
      "panelId": "",
      "panelPosition": 0,
      "totalPanels": 0
    },
    "promotionIds": [],
    "searchInfo": {
      "offset": 0,
      "orderBy": "",
      "searchQuery": ""
    },
    "sessionId": "",
    "tagIds": [],
    "transactionInfo": {
      "cost": "",
      "currency": "",
      "discountValue": "",
      "tax": "",
      "transactionId": "",
      "value": ""
    },
    "userInfo": {
      "userAgent": "",
      "userId": ""
    },
    "userPseudoId": ""
  },
  "userLabels": {},
  "validateOnly": false
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1beta/:servingConfig:recommend' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "filter": "",
  "pageSize": 0,
  "params": {},
  "userEvent": {
    "attributes": {},
    "attributionToken": "",
    "completionInfo": {
      "selectedPosition": 0,
      "selectedSuggestion": ""
    },
    "directUserRequest": false,
    "documents": [
      {
        "id": "",
        "name": "",
        "promotionIds": [],
        "quantity": 0
      }
    ],
    "eventTime": "",
    "eventType": "",
    "filter": "",
    "mediaInfo": {
      "mediaProgressDuration": "",
      "mediaProgressPercentage": ""
    },
    "pageInfo": {
      "pageCategory": "",
      "pageviewId": "",
      "referrerUri": "",
      "uri": ""
    },
    "panel": {
      "displayName": "",
      "panelId": "",
      "panelPosition": 0,
      "totalPanels": 0
    },
    "promotionIds": [],
    "searchInfo": {
      "offset": 0,
      "orderBy": "",
      "searchQuery": ""
    },
    "sessionId": "",
    "tagIds": [],
    "transactionInfo": {
      "cost": "",
      "currency": "",
      "discountValue": "",
      "tax": "",
      "transactionId": "",
      "value": ""
    },
    "userInfo": {
      "userAgent": "",
      "userId": ""
    },
    "userPseudoId": ""
  },
  "userLabels": {},
  "validateOnly": false
}'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "{\n  \"filter\": \"\",\n  \"pageSize\": 0,\n  \"params\": {},\n  \"userEvent\": {\n    \"attributes\": {},\n    \"attributionToken\": \"\",\n    \"completionInfo\": {\n      \"selectedPosition\": 0,\n      \"selectedSuggestion\": \"\"\n    },\n    \"directUserRequest\": false,\n    \"documents\": [\n      {\n        \"id\": \"\",\n        \"name\": \"\",\n        \"promotionIds\": [],\n        \"quantity\": 0\n      }\n    ],\n    \"eventTime\": \"\",\n    \"eventType\": \"\",\n    \"filter\": \"\",\n    \"mediaInfo\": {\n      \"mediaProgressDuration\": \"\",\n      \"mediaProgressPercentage\": \"\"\n    },\n    \"pageInfo\": {\n      \"pageCategory\": \"\",\n      \"pageviewId\": \"\",\n      \"referrerUri\": \"\",\n      \"uri\": \"\"\n    },\n    \"panel\": {\n      \"displayName\": \"\",\n      \"panelId\": \"\",\n      \"panelPosition\": 0,\n      \"totalPanels\": 0\n    },\n    \"promotionIds\": [],\n    \"searchInfo\": {\n      \"offset\": 0,\n      \"orderBy\": \"\",\n      \"searchQuery\": \"\"\n    },\n    \"sessionId\": \"\",\n    \"tagIds\": [],\n    \"transactionInfo\": {\n      \"cost\": \"\",\n      \"currency\": \"\",\n      \"discountValue\": \"\",\n      \"tax\": \"\",\n      \"transactionId\": \"\",\n      \"value\": \"\"\n    },\n    \"userInfo\": {\n      \"userAgent\": \"\",\n      \"userId\": \"\"\n    },\n    \"userPseudoId\": \"\"\n  },\n  \"userLabels\": {},\n  \"validateOnly\": false\n}"

headers = { 'content-type': "application/json" }

conn.request("POST", "/baseUrl/v1beta/:servingConfig:recommend", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/v1beta/:servingConfig:recommend"

payload = {
    "filter": "",
    "pageSize": 0,
    "params": {},
    "userEvent": {
        "attributes": {},
        "attributionToken": "",
        "completionInfo": {
            "selectedPosition": 0,
            "selectedSuggestion": ""
        },
        "directUserRequest": False,
        "documents": [
            {
                "id": "",
                "name": "",
                "promotionIds": [],
                "quantity": 0
            }
        ],
        "eventTime": "",
        "eventType": "",
        "filter": "",
        "mediaInfo": {
            "mediaProgressDuration": "",
            "mediaProgressPercentage": ""
        },
        "pageInfo": {
            "pageCategory": "",
            "pageviewId": "",
            "referrerUri": "",
            "uri": ""
        },
        "panel": {
            "displayName": "",
            "panelId": "",
            "panelPosition": 0,
            "totalPanels": 0
        },
        "promotionIds": [],
        "searchInfo": {
            "offset": 0,
            "orderBy": "",
            "searchQuery": ""
        },
        "sessionId": "",
        "tagIds": [],
        "transactionInfo": {
            "cost": "",
            "currency": "",
            "discountValue": "",
            "tax": "",
            "transactionId": "",
            "value": ""
        },
        "userInfo": {
            "userAgent": "",
            "userId": ""
        },
        "userPseudoId": ""
    },
    "userLabels": {},
    "validateOnly": False
}
headers = {"content-type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/v1beta/:servingConfig:recommend"

payload <- "{\n  \"filter\": \"\",\n  \"pageSize\": 0,\n  \"params\": {},\n  \"userEvent\": {\n    \"attributes\": {},\n    \"attributionToken\": \"\",\n    \"completionInfo\": {\n      \"selectedPosition\": 0,\n      \"selectedSuggestion\": \"\"\n    },\n    \"directUserRequest\": false,\n    \"documents\": [\n      {\n        \"id\": \"\",\n        \"name\": \"\",\n        \"promotionIds\": [],\n        \"quantity\": 0\n      }\n    ],\n    \"eventTime\": \"\",\n    \"eventType\": \"\",\n    \"filter\": \"\",\n    \"mediaInfo\": {\n      \"mediaProgressDuration\": \"\",\n      \"mediaProgressPercentage\": \"\"\n    },\n    \"pageInfo\": {\n      \"pageCategory\": \"\",\n      \"pageviewId\": \"\",\n      \"referrerUri\": \"\",\n      \"uri\": \"\"\n    },\n    \"panel\": {\n      \"displayName\": \"\",\n      \"panelId\": \"\",\n      \"panelPosition\": 0,\n      \"totalPanels\": 0\n    },\n    \"promotionIds\": [],\n    \"searchInfo\": {\n      \"offset\": 0,\n      \"orderBy\": \"\",\n      \"searchQuery\": \"\"\n    },\n    \"sessionId\": \"\",\n    \"tagIds\": [],\n    \"transactionInfo\": {\n      \"cost\": \"\",\n      \"currency\": \"\",\n      \"discountValue\": \"\",\n      \"tax\": \"\",\n      \"transactionId\": \"\",\n      \"value\": \"\"\n    },\n    \"userInfo\": {\n      \"userAgent\": \"\",\n      \"userId\": \"\"\n    },\n    \"userPseudoId\": \"\"\n  },\n  \"userLabels\": {},\n  \"validateOnly\": false\n}"

encode <- "json"

response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/v1beta/:servingConfig:recommend")

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  \"filter\": \"\",\n  \"pageSize\": 0,\n  \"params\": {},\n  \"userEvent\": {\n    \"attributes\": {},\n    \"attributionToken\": \"\",\n    \"completionInfo\": {\n      \"selectedPosition\": 0,\n      \"selectedSuggestion\": \"\"\n    },\n    \"directUserRequest\": false,\n    \"documents\": [\n      {\n        \"id\": \"\",\n        \"name\": \"\",\n        \"promotionIds\": [],\n        \"quantity\": 0\n      }\n    ],\n    \"eventTime\": \"\",\n    \"eventType\": \"\",\n    \"filter\": \"\",\n    \"mediaInfo\": {\n      \"mediaProgressDuration\": \"\",\n      \"mediaProgressPercentage\": \"\"\n    },\n    \"pageInfo\": {\n      \"pageCategory\": \"\",\n      \"pageviewId\": \"\",\n      \"referrerUri\": \"\",\n      \"uri\": \"\"\n    },\n    \"panel\": {\n      \"displayName\": \"\",\n      \"panelId\": \"\",\n      \"panelPosition\": 0,\n      \"totalPanels\": 0\n    },\n    \"promotionIds\": [],\n    \"searchInfo\": {\n      \"offset\": 0,\n      \"orderBy\": \"\",\n      \"searchQuery\": \"\"\n    },\n    \"sessionId\": \"\",\n    \"tagIds\": [],\n    \"transactionInfo\": {\n      \"cost\": \"\",\n      \"currency\": \"\",\n      \"discountValue\": \"\",\n      \"tax\": \"\",\n      \"transactionId\": \"\",\n      \"value\": \"\"\n    },\n    \"userInfo\": {\n      \"userAgent\": \"\",\n      \"userId\": \"\"\n    },\n    \"userPseudoId\": \"\"\n  },\n  \"userLabels\": {},\n  \"validateOnly\": false\n}"

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
  headers: {'Content-Type' => 'application/json'}
)

response = conn.post('/baseUrl/v1beta/:servingConfig:recommend') do |req|
  req.body = "{\n  \"filter\": \"\",\n  \"pageSize\": 0,\n  \"params\": {},\n  \"userEvent\": {\n    \"attributes\": {},\n    \"attributionToken\": \"\",\n    \"completionInfo\": {\n      \"selectedPosition\": 0,\n      \"selectedSuggestion\": \"\"\n    },\n    \"directUserRequest\": false,\n    \"documents\": [\n      {\n        \"id\": \"\",\n        \"name\": \"\",\n        \"promotionIds\": [],\n        \"quantity\": 0\n      }\n    ],\n    \"eventTime\": \"\",\n    \"eventType\": \"\",\n    \"filter\": \"\",\n    \"mediaInfo\": {\n      \"mediaProgressDuration\": \"\",\n      \"mediaProgressPercentage\": \"\"\n    },\n    \"pageInfo\": {\n      \"pageCategory\": \"\",\n      \"pageviewId\": \"\",\n      \"referrerUri\": \"\",\n      \"uri\": \"\"\n    },\n    \"panel\": {\n      \"displayName\": \"\",\n      \"panelId\": \"\",\n      \"panelPosition\": 0,\n      \"totalPanels\": 0\n    },\n    \"promotionIds\": [],\n    \"searchInfo\": {\n      \"offset\": 0,\n      \"orderBy\": \"\",\n      \"searchQuery\": \"\"\n    },\n    \"sessionId\": \"\",\n    \"tagIds\": [],\n    \"transactionInfo\": {\n      \"cost\": \"\",\n      \"currency\": \"\",\n      \"discountValue\": \"\",\n      \"tax\": \"\",\n      \"transactionId\": \"\",\n      \"value\": \"\"\n    },\n    \"userInfo\": {\n      \"userAgent\": \"\",\n      \"userId\": \"\"\n    },\n    \"userPseudoId\": \"\"\n  },\n  \"userLabels\": {},\n  \"validateOnly\": false\n}"
end

puts response.status
puts response.body
use serde_json::json;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/v1beta/:servingConfig:recommend";

    let payload = json!({
        "filter": "",
        "pageSize": 0,
        "params": json!({}),
        "userEvent": json!({
            "attributes": json!({}),
            "attributionToken": "",
            "completionInfo": json!({
                "selectedPosition": 0,
                "selectedSuggestion": ""
            }),
            "directUserRequest": false,
            "documents": (
                json!({
                    "id": "",
                    "name": "",
                    "promotionIds": (),
                    "quantity": 0
                })
            ),
            "eventTime": "",
            "eventType": "",
            "filter": "",
            "mediaInfo": json!({
                "mediaProgressDuration": "",
                "mediaProgressPercentage": ""
            }),
            "pageInfo": json!({
                "pageCategory": "",
                "pageviewId": "",
                "referrerUri": "",
                "uri": ""
            }),
            "panel": json!({
                "displayName": "",
                "panelId": "",
                "panelPosition": 0,
                "totalPanels": 0
            }),
            "promotionIds": (),
            "searchInfo": json!({
                "offset": 0,
                "orderBy": "",
                "searchQuery": ""
            }),
            "sessionId": "",
            "tagIds": (),
            "transactionInfo": json!({
                "cost": "",
                "currency": "",
                "discountValue": "",
                "tax": "",
                "transactionId": "",
                "value": ""
            }),
            "userInfo": json!({
                "userAgent": "",
                "userId": ""
            }),
            "userPseudoId": ""
        }),
        "userLabels": json!({}),
        "validateOnly": false
    });

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("content-type", "application/json".parse().unwrap());

    let client = reqwest::Client::new();
    let response = client.post(url)
        .headers(headers)
        .json(&payload)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request POST \
  --url {{baseUrl}}/v1beta/:servingConfig:recommend \
  --header 'content-type: application/json' \
  --data '{
  "filter": "",
  "pageSize": 0,
  "params": {},
  "userEvent": {
    "attributes": {},
    "attributionToken": "",
    "completionInfo": {
      "selectedPosition": 0,
      "selectedSuggestion": ""
    },
    "directUserRequest": false,
    "documents": [
      {
        "id": "",
        "name": "",
        "promotionIds": [],
        "quantity": 0
      }
    ],
    "eventTime": "",
    "eventType": "",
    "filter": "",
    "mediaInfo": {
      "mediaProgressDuration": "",
      "mediaProgressPercentage": ""
    },
    "pageInfo": {
      "pageCategory": "",
      "pageviewId": "",
      "referrerUri": "",
      "uri": ""
    },
    "panel": {
      "displayName": "",
      "panelId": "",
      "panelPosition": 0,
      "totalPanels": 0
    },
    "promotionIds": [],
    "searchInfo": {
      "offset": 0,
      "orderBy": "",
      "searchQuery": ""
    },
    "sessionId": "",
    "tagIds": [],
    "transactionInfo": {
      "cost": "",
      "currency": "",
      "discountValue": "",
      "tax": "",
      "transactionId": "",
      "value": ""
    },
    "userInfo": {
      "userAgent": "",
      "userId": ""
    },
    "userPseudoId": ""
  },
  "userLabels": {},
  "validateOnly": false
}'
echo '{
  "filter": "",
  "pageSize": 0,
  "params": {},
  "userEvent": {
    "attributes": {},
    "attributionToken": "",
    "completionInfo": {
      "selectedPosition": 0,
      "selectedSuggestion": ""
    },
    "directUserRequest": false,
    "documents": [
      {
        "id": "",
        "name": "",
        "promotionIds": [],
        "quantity": 0
      }
    ],
    "eventTime": "",
    "eventType": "",
    "filter": "",
    "mediaInfo": {
      "mediaProgressDuration": "",
      "mediaProgressPercentage": ""
    },
    "pageInfo": {
      "pageCategory": "",
      "pageviewId": "",
      "referrerUri": "",
      "uri": ""
    },
    "panel": {
      "displayName": "",
      "panelId": "",
      "panelPosition": 0,
      "totalPanels": 0
    },
    "promotionIds": [],
    "searchInfo": {
      "offset": 0,
      "orderBy": "",
      "searchQuery": ""
    },
    "sessionId": "",
    "tagIds": [],
    "transactionInfo": {
      "cost": "",
      "currency": "",
      "discountValue": "",
      "tax": "",
      "transactionId": "",
      "value": ""
    },
    "userInfo": {
      "userAgent": "",
      "userId": ""
    },
    "userPseudoId": ""
  },
  "userLabels": {},
  "validateOnly": false
}' |  \
  http POST {{baseUrl}}/v1beta/:servingConfig:recommend \
  content-type:application/json
wget --quiet \
  --method POST \
  --header 'content-type: application/json' \
  --body-data '{\n  "filter": "",\n  "pageSize": 0,\n  "params": {},\n  "userEvent": {\n    "attributes": {},\n    "attributionToken": "",\n    "completionInfo": {\n      "selectedPosition": 0,\n      "selectedSuggestion": ""\n    },\n    "directUserRequest": false,\n    "documents": [\n      {\n        "id": "",\n        "name": "",\n        "promotionIds": [],\n        "quantity": 0\n      }\n    ],\n    "eventTime": "",\n    "eventType": "",\n    "filter": "",\n    "mediaInfo": {\n      "mediaProgressDuration": "",\n      "mediaProgressPercentage": ""\n    },\n    "pageInfo": {\n      "pageCategory": "",\n      "pageviewId": "",\n      "referrerUri": "",\n      "uri": ""\n    },\n    "panel": {\n      "displayName": "",\n      "panelId": "",\n      "panelPosition": 0,\n      "totalPanels": 0\n    },\n    "promotionIds": [],\n    "searchInfo": {\n      "offset": 0,\n      "orderBy": "",\n      "searchQuery": ""\n    },\n    "sessionId": "",\n    "tagIds": [],\n    "transactionInfo": {\n      "cost": "",\n      "currency": "",\n      "discountValue": "",\n      "tax": "",\n      "transactionId": "",\n      "value": ""\n    },\n    "userInfo": {\n      "userAgent": "",\n      "userId": ""\n    },\n    "userPseudoId": ""\n  },\n  "userLabels": {},\n  "validateOnly": false\n}' \
  --output-document \
  - {{baseUrl}}/v1beta/:servingConfig:recommend
import Foundation

let headers = ["content-type": "application/json"]
let parameters = [
  "filter": "",
  "pageSize": 0,
  "params": [],
  "userEvent": [
    "attributes": [],
    "attributionToken": "",
    "completionInfo": [
      "selectedPosition": 0,
      "selectedSuggestion": ""
    ],
    "directUserRequest": false,
    "documents": [
      [
        "id": "",
        "name": "",
        "promotionIds": [],
        "quantity": 0
      ]
    ],
    "eventTime": "",
    "eventType": "",
    "filter": "",
    "mediaInfo": [
      "mediaProgressDuration": "",
      "mediaProgressPercentage": ""
    ],
    "pageInfo": [
      "pageCategory": "",
      "pageviewId": "",
      "referrerUri": "",
      "uri": ""
    ],
    "panel": [
      "displayName": "",
      "panelId": "",
      "panelPosition": 0,
      "totalPanels": 0
    ],
    "promotionIds": [],
    "searchInfo": [
      "offset": 0,
      "orderBy": "",
      "searchQuery": ""
    ],
    "sessionId": "",
    "tagIds": [],
    "transactionInfo": [
      "cost": "",
      "currency": "",
      "discountValue": "",
      "tax": "",
      "transactionId": "",
      "value": ""
    ],
    "userInfo": [
      "userAgent": "",
      "userId": ""
    ],
    "userPseudoId": ""
  ],
  "userLabels": [],
  "validateOnly": false
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1beta/:servingConfig:recommend")! 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 discoveryengine.projects.locations.dataStores.userEvents.collect
{{baseUrl}}/v1beta/:parent/userEvents:collect
QUERY PARAMS

parent
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1beta/:parent/userEvents:collect");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/get "{{baseUrl}}/v1beta/:parent/userEvents:collect")
require "http/client"

url = "{{baseUrl}}/v1beta/:parent/userEvents:collect"

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}}/v1beta/:parent/userEvents:collect"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1beta/:parent/userEvents:collect");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/v1beta/:parent/userEvents:collect"

	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/v1beta/:parent/userEvents:collect HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1beta/:parent/userEvents:collect")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/v1beta/:parent/userEvents:collect"))
    .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}}/v1beta/:parent/userEvents:collect")
  .get()
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1beta/:parent/userEvents:collect")
  .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}}/v1beta/:parent/userEvents:collect');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'GET',
  url: '{{baseUrl}}/v1beta/:parent/userEvents:collect'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/v1beta/:parent/userEvents:collect';
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}}/v1beta/:parent/userEvents:collect',
  method: 'GET',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/v1beta/:parent/userEvents:collect")
  .get()
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/v1beta/:parent/userEvents:collect',
  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}}/v1beta/:parent/userEvents:collect'
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('GET', '{{baseUrl}}/v1beta/:parent/userEvents:collect');

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}}/v1beta/:parent/userEvents:collect'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/v1beta/:parent/userEvents:collect';
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}}/v1beta/:parent/userEvents:collect"]
                                                       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}}/v1beta/:parent/userEvents:collect" in

Client.call `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/v1beta/:parent/userEvents:collect",
  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}}/v1beta/:parent/userEvents:collect');

echo $response->getBody();
setUrl('{{baseUrl}}/v1beta/:parent/userEvents:collect');
$request->setMethod(HTTP_METH_GET);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/v1beta/:parent/userEvents:collect');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1beta/:parent/userEvents:collect' -Method GET 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1beta/:parent/userEvents:collect' -Method GET 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("GET", "/baseUrl/v1beta/:parent/userEvents:collect")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/v1beta/:parent/userEvents:collect"

response = requests.get(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/v1beta/:parent/userEvents:collect"

response <- VERB("GET", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/v1beta/:parent/userEvents:collect")

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/v1beta/:parent/userEvents:collect') do |req|
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/v1beta/:parent/userEvents:collect";

    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}}/v1beta/:parent/userEvents:collect
http GET {{baseUrl}}/v1beta/:parent/userEvents:collect
wget --quiet \
  --method GET \
  --output-document \
  - {{baseUrl}}/v1beta/:parent/userEvents:collect
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1beta/:parent/userEvents:collect")! 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 discoveryengine.projects.locations.dataStores.userEvents.import
{{baseUrl}}/v1beta/:parent/userEvents:import
QUERY PARAMS

parent
BODY json

{
  "bigquerySource": {
    "dataSchema": "",
    "datasetId": "",
    "gcsStagingDir": "",
    "partitionDate": {
      "day": 0,
      "month": 0,
      "year": 0
    },
    "projectId": "",
    "tableId": ""
  },
  "errorConfig": {
    "gcsPrefix": ""
  },
  "gcsSource": {
    "dataSchema": "",
    "inputUris": []
  },
  "inlineSource": {
    "userEvents": [
      {
        "attributes": {},
        "attributionToken": "",
        "completionInfo": {
          "selectedPosition": 0,
          "selectedSuggestion": ""
        },
        "directUserRequest": false,
        "documents": [
          {
            "id": "",
            "name": "",
            "promotionIds": [],
            "quantity": 0
          }
        ],
        "eventTime": "",
        "eventType": "",
        "filter": "",
        "mediaInfo": {
          "mediaProgressDuration": "",
          "mediaProgressPercentage": ""
        },
        "pageInfo": {
          "pageCategory": "",
          "pageviewId": "",
          "referrerUri": "",
          "uri": ""
        },
        "panel": {
          "displayName": "",
          "panelId": "",
          "panelPosition": 0,
          "totalPanels": 0
        },
        "promotionIds": [],
        "searchInfo": {
          "offset": 0,
          "orderBy": "",
          "searchQuery": ""
        },
        "sessionId": "",
        "tagIds": [],
        "transactionInfo": {
          "cost": "",
          "currency": "",
          "discountValue": "",
          "tax": "",
          "transactionId": "",
          "value": ""
        },
        "userInfo": {
          "userAgent": "",
          "userId": ""
        },
        "userPseudoId": ""
      }
    ]
  }
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1beta/:parent/userEvents:import");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"bigquerySource\": {\n    \"dataSchema\": \"\",\n    \"datasetId\": \"\",\n    \"gcsStagingDir\": \"\",\n    \"partitionDate\": {\n      \"day\": 0,\n      \"month\": 0,\n      \"year\": 0\n    },\n    \"projectId\": \"\",\n    \"tableId\": \"\"\n  },\n  \"errorConfig\": {\n    \"gcsPrefix\": \"\"\n  },\n  \"gcsSource\": {\n    \"dataSchema\": \"\",\n    \"inputUris\": []\n  },\n  \"inlineSource\": {\n    \"userEvents\": [\n      {\n        \"attributes\": {},\n        \"attributionToken\": \"\",\n        \"completionInfo\": {\n          \"selectedPosition\": 0,\n          \"selectedSuggestion\": \"\"\n        },\n        \"directUserRequest\": false,\n        \"documents\": [\n          {\n            \"id\": \"\",\n            \"name\": \"\",\n            \"promotionIds\": [],\n            \"quantity\": 0\n          }\n        ],\n        \"eventTime\": \"\",\n        \"eventType\": \"\",\n        \"filter\": \"\",\n        \"mediaInfo\": {\n          \"mediaProgressDuration\": \"\",\n          \"mediaProgressPercentage\": \"\"\n        },\n        \"pageInfo\": {\n          \"pageCategory\": \"\",\n          \"pageviewId\": \"\",\n          \"referrerUri\": \"\",\n          \"uri\": \"\"\n        },\n        \"panel\": {\n          \"displayName\": \"\",\n          \"panelId\": \"\",\n          \"panelPosition\": 0,\n          \"totalPanels\": 0\n        },\n        \"promotionIds\": [],\n        \"searchInfo\": {\n          \"offset\": 0,\n          \"orderBy\": \"\",\n          \"searchQuery\": \"\"\n        },\n        \"sessionId\": \"\",\n        \"tagIds\": [],\n        \"transactionInfo\": {\n          \"cost\": \"\",\n          \"currency\": \"\",\n          \"discountValue\": \"\",\n          \"tax\": \"\",\n          \"transactionId\": \"\",\n          \"value\": \"\"\n        },\n        \"userInfo\": {\n          \"userAgent\": \"\",\n          \"userId\": \"\"\n        },\n        \"userPseudoId\": \"\"\n      }\n    ]\n  }\n}");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/post "{{baseUrl}}/v1beta/:parent/userEvents:import" {:content-type :json
                                                                             :form-params {:bigquerySource {:dataSchema ""
                                                                                                            :datasetId ""
                                                                                                            :gcsStagingDir ""
                                                                                                            :partitionDate {:day 0
                                                                                                                            :month 0
                                                                                                                            :year 0}
                                                                                                            :projectId ""
                                                                                                            :tableId ""}
                                                                                           :errorConfig {:gcsPrefix ""}
                                                                                           :gcsSource {:dataSchema ""
                                                                                                       :inputUris []}
                                                                                           :inlineSource {:userEvents [{:attributes {}
                                                                                                                        :attributionToken ""
                                                                                                                        :completionInfo {:selectedPosition 0
                                                                                                                                         :selectedSuggestion ""}
                                                                                                                        :directUserRequest false
                                                                                                                        :documents [{:id ""
                                                                                                                                     :name ""
                                                                                                                                     :promotionIds []
                                                                                                                                     :quantity 0}]
                                                                                                                        :eventTime ""
                                                                                                                        :eventType ""
                                                                                                                        :filter ""
                                                                                                                        :mediaInfo {:mediaProgressDuration ""
                                                                                                                                    :mediaProgressPercentage ""}
                                                                                                                        :pageInfo {:pageCategory ""
                                                                                                                                   :pageviewId ""
                                                                                                                                   :referrerUri ""
                                                                                                                                   :uri ""}
                                                                                                                        :panel {:displayName ""
                                                                                                                                :panelId ""
                                                                                                                                :panelPosition 0
                                                                                                                                :totalPanels 0}
                                                                                                                        :promotionIds []
                                                                                                                        :searchInfo {:offset 0
                                                                                                                                     :orderBy ""
                                                                                                                                     :searchQuery ""}
                                                                                                                        :sessionId ""
                                                                                                                        :tagIds []
                                                                                                                        :transactionInfo {:cost ""
                                                                                                                                          :currency ""
                                                                                                                                          :discountValue ""
                                                                                                                                          :tax ""
                                                                                                                                          :transactionId ""
                                                                                                                                          :value ""}
                                                                                                                        :userInfo {:userAgent ""
                                                                                                                                   :userId ""}
                                                                                                                        :userPseudoId ""}]}}})
require "http/client"

url = "{{baseUrl}}/v1beta/:parent/userEvents:import"
headers = HTTP::Headers{
  "content-type" => "application/json"
}
reqBody = "{\n  \"bigquerySource\": {\n    \"dataSchema\": \"\",\n    \"datasetId\": \"\",\n    \"gcsStagingDir\": \"\",\n    \"partitionDate\": {\n      \"day\": 0,\n      \"month\": 0,\n      \"year\": 0\n    },\n    \"projectId\": \"\",\n    \"tableId\": \"\"\n  },\n  \"errorConfig\": {\n    \"gcsPrefix\": \"\"\n  },\n  \"gcsSource\": {\n    \"dataSchema\": \"\",\n    \"inputUris\": []\n  },\n  \"inlineSource\": {\n    \"userEvents\": [\n      {\n        \"attributes\": {},\n        \"attributionToken\": \"\",\n        \"completionInfo\": {\n          \"selectedPosition\": 0,\n          \"selectedSuggestion\": \"\"\n        },\n        \"directUserRequest\": false,\n        \"documents\": [\n          {\n            \"id\": \"\",\n            \"name\": \"\",\n            \"promotionIds\": [],\n            \"quantity\": 0\n          }\n        ],\n        \"eventTime\": \"\",\n        \"eventType\": \"\",\n        \"filter\": \"\",\n        \"mediaInfo\": {\n          \"mediaProgressDuration\": \"\",\n          \"mediaProgressPercentage\": \"\"\n        },\n        \"pageInfo\": {\n          \"pageCategory\": \"\",\n          \"pageviewId\": \"\",\n          \"referrerUri\": \"\",\n          \"uri\": \"\"\n        },\n        \"panel\": {\n          \"displayName\": \"\",\n          \"panelId\": \"\",\n          \"panelPosition\": 0,\n          \"totalPanels\": 0\n        },\n        \"promotionIds\": [],\n        \"searchInfo\": {\n          \"offset\": 0,\n          \"orderBy\": \"\",\n          \"searchQuery\": \"\"\n        },\n        \"sessionId\": \"\",\n        \"tagIds\": [],\n        \"transactionInfo\": {\n          \"cost\": \"\",\n          \"currency\": \"\",\n          \"discountValue\": \"\",\n          \"tax\": \"\",\n          \"transactionId\": \"\",\n          \"value\": \"\"\n        },\n        \"userInfo\": {\n          \"userAgent\": \"\",\n          \"userId\": \"\"\n        },\n        \"userPseudoId\": \"\"\n      }\n    ]\n  }\n}"

response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Post,
    RequestUri = new Uri("{{baseUrl}}/v1beta/:parent/userEvents:import"),
    Content = new StringContent("{\n  \"bigquerySource\": {\n    \"dataSchema\": \"\",\n    \"datasetId\": \"\",\n    \"gcsStagingDir\": \"\",\n    \"partitionDate\": {\n      \"day\": 0,\n      \"month\": 0,\n      \"year\": 0\n    },\n    \"projectId\": \"\",\n    \"tableId\": \"\"\n  },\n  \"errorConfig\": {\n    \"gcsPrefix\": \"\"\n  },\n  \"gcsSource\": {\n    \"dataSchema\": \"\",\n    \"inputUris\": []\n  },\n  \"inlineSource\": {\n    \"userEvents\": [\n      {\n        \"attributes\": {},\n        \"attributionToken\": \"\",\n        \"completionInfo\": {\n          \"selectedPosition\": 0,\n          \"selectedSuggestion\": \"\"\n        },\n        \"directUserRequest\": false,\n        \"documents\": [\n          {\n            \"id\": \"\",\n            \"name\": \"\",\n            \"promotionIds\": [],\n            \"quantity\": 0\n          }\n        ],\n        \"eventTime\": \"\",\n        \"eventType\": \"\",\n        \"filter\": \"\",\n        \"mediaInfo\": {\n          \"mediaProgressDuration\": \"\",\n          \"mediaProgressPercentage\": \"\"\n        },\n        \"pageInfo\": {\n          \"pageCategory\": \"\",\n          \"pageviewId\": \"\",\n          \"referrerUri\": \"\",\n          \"uri\": \"\"\n        },\n        \"panel\": {\n          \"displayName\": \"\",\n          \"panelId\": \"\",\n          \"panelPosition\": 0,\n          \"totalPanels\": 0\n        },\n        \"promotionIds\": [],\n        \"searchInfo\": {\n          \"offset\": 0,\n          \"orderBy\": \"\",\n          \"searchQuery\": \"\"\n        },\n        \"sessionId\": \"\",\n        \"tagIds\": [],\n        \"transactionInfo\": {\n          \"cost\": \"\",\n          \"currency\": \"\",\n          \"discountValue\": \"\",\n          \"tax\": \"\",\n          \"transactionId\": \"\",\n          \"value\": \"\"\n        },\n        \"userInfo\": {\n          \"userAgent\": \"\",\n          \"userId\": \"\"\n        },\n        \"userPseudoId\": \"\"\n      }\n    ]\n  }\n}")
    {
        Headers =
        {
            ContentType = new MediaTypeHeaderValue("application/json")
        }
    }
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1beta/:parent/userEvents:import");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"bigquerySource\": {\n    \"dataSchema\": \"\",\n    \"datasetId\": \"\",\n    \"gcsStagingDir\": \"\",\n    \"partitionDate\": {\n      \"day\": 0,\n      \"month\": 0,\n      \"year\": 0\n    },\n    \"projectId\": \"\",\n    \"tableId\": \"\"\n  },\n  \"errorConfig\": {\n    \"gcsPrefix\": \"\"\n  },\n  \"gcsSource\": {\n    \"dataSchema\": \"\",\n    \"inputUris\": []\n  },\n  \"inlineSource\": {\n    \"userEvents\": [\n      {\n        \"attributes\": {},\n        \"attributionToken\": \"\",\n        \"completionInfo\": {\n          \"selectedPosition\": 0,\n          \"selectedSuggestion\": \"\"\n        },\n        \"directUserRequest\": false,\n        \"documents\": [\n          {\n            \"id\": \"\",\n            \"name\": \"\",\n            \"promotionIds\": [],\n            \"quantity\": 0\n          }\n        ],\n        \"eventTime\": \"\",\n        \"eventType\": \"\",\n        \"filter\": \"\",\n        \"mediaInfo\": {\n          \"mediaProgressDuration\": \"\",\n          \"mediaProgressPercentage\": \"\"\n        },\n        \"pageInfo\": {\n          \"pageCategory\": \"\",\n          \"pageviewId\": \"\",\n          \"referrerUri\": \"\",\n          \"uri\": \"\"\n        },\n        \"panel\": {\n          \"displayName\": \"\",\n          \"panelId\": \"\",\n          \"panelPosition\": 0,\n          \"totalPanels\": 0\n        },\n        \"promotionIds\": [],\n        \"searchInfo\": {\n          \"offset\": 0,\n          \"orderBy\": \"\",\n          \"searchQuery\": \"\"\n        },\n        \"sessionId\": \"\",\n        \"tagIds\": [],\n        \"transactionInfo\": {\n          \"cost\": \"\",\n          \"currency\": \"\",\n          \"discountValue\": \"\",\n          \"tax\": \"\",\n          \"transactionId\": \"\",\n          \"value\": \"\"\n        },\n        \"userInfo\": {\n          \"userAgent\": \"\",\n          \"userId\": \"\"\n        },\n        \"userPseudoId\": \"\"\n      }\n    ]\n  }\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/v1beta/:parent/userEvents:import"

	payload := strings.NewReader("{\n  \"bigquerySource\": {\n    \"dataSchema\": \"\",\n    \"datasetId\": \"\",\n    \"gcsStagingDir\": \"\",\n    \"partitionDate\": {\n      \"day\": 0,\n      \"month\": 0,\n      \"year\": 0\n    },\n    \"projectId\": \"\",\n    \"tableId\": \"\"\n  },\n  \"errorConfig\": {\n    \"gcsPrefix\": \"\"\n  },\n  \"gcsSource\": {\n    \"dataSchema\": \"\",\n    \"inputUris\": []\n  },\n  \"inlineSource\": {\n    \"userEvents\": [\n      {\n        \"attributes\": {},\n        \"attributionToken\": \"\",\n        \"completionInfo\": {\n          \"selectedPosition\": 0,\n          \"selectedSuggestion\": \"\"\n        },\n        \"directUserRequest\": false,\n        \"documents\": [\n          {\n            \"id\": \"\",\n            \"name\": \"\",\n            \"promotionIds\": [],\n            \"quantity\": 0\n          }\n        ],\n        \"eventTime\": \"\",\n        \"eventType\": \"\",\n        \"filter\": \"\",\n        \"mediaInfo\": {\n          \"mediaProgressDuration\": \"\",\n          \"mediaProgressPercentage\": \"\"\n        },\n        \"pageInfo\": {\n          \"pageCategory\": \"\",\n          \"pageviewId\": \"\",\n          \"referrerUri\": \"\",\n          \"uri\": \"\"\n        },\n        \"panel\": {\n          \"displayName\": \"\",\n          \"panelId\": \"\",\n          \"panelPosition\": 0,\n          \"totalPanels\": 0\n        },\n        \"promotionIds\": [],\n        \"searchInfo\": {\n          \"offset\": 0,\n          \"orderBy\": \"\",\n          \"searchQuery\": \"\"\n        },\n        \"sessionId\": \"\",\n        \"tagIds\": [],\n        \"transactionInfo\": {\n          \"cost\": \"\",\n          \"currency\": \"\",\n          \"discountValue\": \"\",\n          \"tax\": \"\",\n          \"transactionId\": \"\",\n          \"value\": \"\"\n        },\n        \"userInfo\": {\n          \"userAgent\": \"\",\n          \"userId\": \"\"\n        },\n        \"userPseudoId\": \"\"\n      }\n    ]\n  }\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("content-type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
POST /baseUrl/v1beta/:parent/userEvents:import HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 1709

{
  "bigquerySource": {
    "dataSchema": "",
    "datasetId": "",
    "gcsStagingDir": "",
    "partitionDate": {
      "day": 0,
      "month": 0,
      "year": 0
    },
    "projectId": "",
    "tableId": ""
  },
  "errorConfig": {
    "gcsPrefix": ""
  },
  "gcsSource": {
    "dataSchema": "",
    "inputUris": []
  },
  "inlineSource": {
    "userEvents": [
      {
        "attributes": {},
        "attributionToken": "",
        "completionInfo": {
          "selectedPosition": 0,
          "selectedSuggestion": ""
        },
        "directUserRequest": false,
        "documents": [
          {
            "id": "",
            "name": "",
            "promotionIds": [],
            "quantity": 0
          }
        ],
        "eventTime": "",
        "eventType": "",
        "filter": "",
        "mediaInfo": {
          "mediaProgressDuration": "",
          "mediaProgressPercentage": ""
        },
        "pageInfo": {
          "pageCategory": "",
          "pageviewId": "",
          "referrerUri": "",
          "uri": ""
        },
        "panel": {
          "displayName": "",
          "panelId": "",
          "panelPosition": 0,
          "totalPanels": 0
        },
        "promotionIds": [],
        "searchInfo": {
          "offset": 0,
          "orderBy": "",
          "searchQuery": ""
        },
        "sessionId": "",
        "tagIds": [],
        "transactionInfo": {
          "cost": "",
          "currency": "",
          "discountValue": "",
          "tax": "",
          "transactionId": "",
          "value": ""
        },
        "userInfo": {
          "userAgent": "",
          "userId": ""
        },
        "userPseudoId": ""
      }
    ]
  }
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1beta/:parent/userEvents:import")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"bigquerySource\": {\n    \"dataSchema\": \"\",\n    \"datasetId\": \"\",\n    \"gcsStagingDir\": \"\",\n    \"partitionDate\": {\n      \"day\": 0,\n      \"month\": 0,\n      \"year\": 0\n    },\n    \"projectId\": \"\",\n    \"tableId\": \"\"\n  },\n  \"errorConfig\": {\n    \"gcsPrefix\": \"\"\n  },\n  \"gcsSource\": {\n    \"dataSchema\": \"\",\n    \"inputUris\": []\n  },\n  \"inlineSource\": {\n    \"userEvents\": [\n      {\n        \"attributes\": {},\n        \"attributionToken\": \"\",\n        \"completionInfo\": {\n          \"selectedPosition\": 0,\n          \"selectedSuggestion\": \"\"\n        },\n        \"directUserRequest\": false,\n        \"documents\": [\n          {\n            \"id\": \"\",\n            \"name\": \"\",\n            \"promotionIds\": [],\n            \"quantity\": 0\n          }\n        ],\n        \"eventTime\": \"\",\n        \"eventType\": \"\",\n        \"filter\": \"\",\n        \"mediaInfo\": {\n          \"mediaProgressDuration\": \"\",\n          \"mediaProgressPercentage\": \"\"\n        },\n        \"pageInfo\": {\n          \"pageCategory\": \"\",\n          \"pageviewId\": \"\",\n          \"referrerUri\": \"\",\n          \"uri\": \"\"\n        },\n        \"panel\": {\n          \"displayName\": \"\",\n          \"panelId\": \"\",\n          \"panelPosition\": 0,\n          \"totalPanels\": 0\n        },\n        \"promotionIds\": [],\n        \"searchInfo\": {\n          \"offset\": 0,\n          \"orderBy\": \"\",\n          \"searchQuery\": \"\"\n        },\n        \"sessionId\": \"\",\n        \"tagIds\": [],\n        \"transactionInfo\": {\n          \"cost\": \"\",\n          \"currency\": \"\",\n          \"discountValue\": \"\",\n          \"tax\": \"\",\n          \"transactionId\": \"\",\n          \"value\": \"\"\n        },\n        \"userInfo\": {\n          \"userAgent\": \"\",\n          \"userId\": \"\"\n        },\n        \"userPseudoId\": \"\"\n      }\n    ]\n  }\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/v1beta/:parent/userEvents:import"))
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"bigquerySource\": {\n    \"dataSchema\": \"\",\n    \"datasetId\": \"\",\n    \"gcsStagingDir\": \"\",\n    \"partitionDate\": {\n      \"day\": 0,\n      \"month\": 0,\n      \"year\": 0\n    },\n    \"projectId\": \"\",\n    \"tableId\": \"\"\n  },\n  \"errorConfig\": {\n    \"gcsPrefix\": \"\"\n  },\n  \"gcsSource\": {\n    \"dataSchema\": \"\",\n    \"inputUris\": []\n  },\n  \"inlineSource\": {\n    \"userEvents\": [\n      {\n        \"attributes\": {},\n        \"attributionToken\": \"\",\n        \"completionInfo\": {\n          \"selectedPosition\": 0,\n          \"selectedSuggestion\": \"\"\n        },\n        \"directUserRequest\": false,\n        \"documents\": [\n          {\n            \"id\": \"\",\n            \"name\": \"\",\n            \"promotionIds\": [],\n            \"quantity\": 0\n          }\n        ],\n        \"eventTime\": \"\",\n        \"eventType\": \"\",\n        \"filter\": \"\",\n        \"mediaInfo\": {\n          \"mediaProgressDuration\": \"\",\n          \"mediaProgressPercentage\": \"\"\n        },\n        \"pageInfo\": {\n          \"pageCategory\": \"\",\n          \"pageviewId\": \"\",\n          \"referrerUri\": \"\",\n          \"uri\": \"\"\n        },\n        \"panel\": {\n          \"displayName\": \"\",\n          \"panelId\": \"\",\n          \"panelPosition\": 0,\n          \"totalPanels\": 0\n        },\n        \"promotionIds\": [],\n        \"searchInfo\": {\n          \"offset\": 0,\n          \"orderBy\": \"\",\n          \"searchQuery\": \"\"\n        },\n        \"sessionId\": \"\",\n        \"tagIds\": [],\n        \"transactionInfo\": {\n          \"cost\": \"\",\n          \"currency\": \"\",\n          \"discountValue\": \"\",\n          \"tax\": \"\",\n          \"transactionId\": \"\",\n          \"value\": \"\"\n        },\n        \"userInfo\": {\n          \"userAgent\": \"\",\n          \"userId\": \"\"\n        },\n        \"userPseudoId\": \"\"\n      }\n    ]\n  }\n}"))
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n  \"bigquerySource\": {\n    \"dataSchema\": \"\",\n    \"datasetId\": \"\",\n    \"gcsStagingDir\": \"\",\n    \"partitionDate\": {\n      \"day\": 0,\n      \"month\": 0,\n      \"year\": 0\n    },\n    \"projectId\": \"\",\n    \"tableId\": \"\"\n  },\n  \"errorConfig\": {\n    \"gcsPrefix\": \"\"\n  },\n  \"gcsSource\": {\n    \"dataSchema\": \"\",\n    \"inputUris\": []\n  },\n  \"inlineSource\": {\n    \"userEvents\": [\n      {\n        \"attributes\": {},\n        \"attributionToken\": \"\",\n        \"completionInfo\": {\n          \"selectedPosition\": 0,\n          \"selectedSuggestion\": \"\"\n        },\n        \"directUserRequest\": false,\n        \"documents\": [\n          {\n            \"id\": \"\",\n            \"name\": \"\",\n            \"promotionIds\": [],\n            \"quantity\": 0\n          }\n        ],\n        \"eventTime\": \"\",\n        \"eventType\": \"\",\n        \"filter\": \"\",\n        \"mediaInfo\": {\n          \"mediaProgressDuration\": \"\",\n          \"mediaProgressPercentage\": \"\"\n        },\n        \"pageInfo\": {\n          \"pageCategory\": \"\",\n          \"pageviewId\": \"\",\n          \"referrerUri\": \"\",\n          \"uri\": \"\"\n        },\n        \"panel\": {\n          \"displayName\": \"\",\n          \"panelId\": \"\",\n          \"panelPosition\": 0,\n          \"totalPanels\": 0\n        },\n        \"promotionIds\": [],\n        \"searchInfo\": {\n          \"offset\": 0,\n          \"orderBy\": \"\",\n          \"searchQuery\": \"\"\n        },\n        \"sessionId\": \"\",\n        \"tagIds\": [],\n        \"transactionInfo\": {\n          \"cost\": \"\",\n          \"currency\": \"\",\n          \"discountValue\": \"\",\n          \"tax\": \"\",\n          \"transactionId\": \"\",\n          \"value\": \"\"\n        },\n        \"userInfo\": {\n          \"userAgent\": \"\",\n          \"userId\": \"\"\n        },\n        \"userPseudoId\": \"\"\n      }\n    ]\n  }\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/v1beta/:parent/userEvents:import")
  .post(body)
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1beta/:parent/userEvents:import")
  .header("content-type", "application/json")
  .body("{\n  \"bigquerySource\": {\n    \"dataSchema\": \"\",\n    \"datasetId\": \"\",\n    \"gcsStagingDir\": \"\",\n    \"partitionDate\": {\n      \"day\": 0,\n      \"month\": 0,\n      \"year\": 0\n    },\n    \"projectId\": \"\",\n    \"tableId\": \"\"\n  },\n  \"errorConfig\": {\n    \"gcsPrefix\": \"\"\n  },\n  \"gcsSource\": {\n    \"dataSchema\": \"\",\n    \"inputUris\": []\n  },\n  \"inlineSource\": {\n    \"userEvents\": [\n      {\n        \"attributes\": {},\n        \"attributionToken\": \"\",\n        \"completionInfo\": {\n          \"selectedPosition\": 0,\n          \"selectedSuggestion\": \"\"\n        },\n        \"directUserRequest\": false,\n        \"documents\": [\n          {\n            \"id\": \"\",\n            \"name\": \"\",\n            \"promotionIds\": [],\n            \"quantity\": 0\n          }\n        ],\n        \"eventTime\": \"\",\n        \"eventType\": \"\",\n        \"filter\": \"\",\n        \"mediaInfo\": {\n          \"mediaProgressDuration\": \"\",\n          \"mediaProgressPercentage\": \"\"\n        },\n        \"pageInfo\": {\n          \"pageCategory\": \"\",\n          \"pageviewId\": \"\",\n          \"referrerUri\": \"\",\n          \"uri\": \"\"\n        },\n        \"panel\": {\n          \"displayName\": \"\",\n          \"panelId\": \"\",\n          \"panelPosition\": 0,\n          \"totalPanels\": 0\n        },\n        \"promotionIds\": [],\n        \"searchInfo\": {\n          \"offset\": 0,\n          \"orderBy\": \"\",\n          \"searchQuery\": \"\"\n        },\n        \"sessionId\": \"\",\n        \"tagIds\": [],\n        \"transactionInfo\": {\n          \"cost\": \"\",\n          \"currency\": \"\",\n          \"discountValue\": \"\",\n          \"tax\": \"\",\n          \"transactionId\": \"\",\n          \"value\": \"\"\n        },\n        \"userInfo\": {\n          \"userAgent\": \"\",\n          \"userId\": \"\"\n        },\n        \"userPseudoId\": \"\"\n      }\n    ]\n  }\n}")
  .asString();
const data = JSON.stringify({
  bigquerySource: {
    dataSchema: '',
    datasetId: '',
    gcsStagingDir: '',
    partitionDate: {
      day: 0,
      month: 0,
      year: 0
    },
    projectId: '',
    tableId: ''
  },
  errorConfig: {
    gcsPrefix: ''
  },
  gcsSource: {
    dataSchema: '',
    inputUris: []
  },
  inlineSource: {
    userEvents: [
      {
        attributes: {},
        attributionToken: '',
        completionInfo: {
          selectedPosition: 0,
          selectedSuggestion: ''
        },
        directUserRequest: false,
        documents: [
          {
            id: '',
            name: '',
            promotionIds: [],
            quantity: 0
          }
        ],
        eventTime: '',
        eventType: '',
        filter: '',
        mediaInfo: {
          mediaProgressDuration: '',
          mediaProgressPercentage: ''
        },
        pageInfo: {
          pageCategory: '',
          pageviewId: '',
          referrerUri: '',
          uri: ''
        },
        panel: {
          displayName: '',
          panelId: '',
          panelPosition: 0,
          totalPanels: 0
        },
        promotionIds: [],
        searchInfo: {
          offset: 0,
          orderBy: '',
          searchQuery: ''
        },
        sessionId: '',
        tagIds: [],
        transactionInfo: {
          cost: '',
          currency: '',
          discountValue: '',
          tax: '',
          transactionId: '',
          value: ''
        },
        userInfo: {
          userAgent: '',
          userId: ''
        },
        userPseudoId: ''
      }
    ]
  }
});

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('POST', '{{baseUrl}}/v1beta/:parent/userEvents:import');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'POST',
  url: '{{baseUrl}}/v1beta/:parent/userEvents:import',
  headers: {'content-type': 'application/json'},
  data: {
    bigquerySource: {
      dataSchema: '',
      datasetId: '',
      gcsStagingDir: '',
      partitionDate: {day: 0, month: 0, year: 0},
      projectId: '',
      tableId: ''
    },
    errorConfig: {gcsPrefix: ''},
    gcsSource: {dataSchema: '', inputUris: []},
    inlineSource: {
      userEvents: [
        {
          attributes: {},
          attributionToken: '',
          completionInfo: {selectedPosition: 0, selectedSuggestion: ''},
          directUserRequest: false,
          documents: [{id: '', name: '', promotionIds: [], quantity: 0}],
          eventTime: '',
          eventType: '',
          filter: '',
          mediaInfo: {mediaProgressDuration: '', mediaProgressPercentage: ''},
          pageInfo: {pageCategory: '', pageviewId: '', referrerUri: '', uri: ''},
          panel: {displayName: '', panelId: '', panelPosition: 0, totalPanels: 0},
          promotionIds: [],
          searchInfo: {offset: 0, orderBy: '', searchQuery: ''},
          sessionId: '',
          tagIds: [],
          transactionInfo: {
            cost: '',
            currency: '',
            discountValue: '',
            tax: '',
            transactionId: '',
            value: ''
          },
          userInfo: {userAgent: '', userId: ''},
          userPseudoId: ''
        }
      ]
    }
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/v1beta/:parent/userEvents:import';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"bigquerySource":{"dataSchema":"","datasetId":"","gcsStagingDir":"","partitionDate":{"day":0,"month":0,"year":0},"projectId":"","tableId":""},"errorConfig":{"gcsPrefix":""},"gcsSource":{"dataSchema":"","inputUris":[]},"inlineSource":{"userEvents":[{"attributes":{},"attributionToken":"","completionInfo":{"selectedPosition":0,"selectedSuggestion":""},"directUserRequest":false,"documents":[{"id":"","name":"","promotionIds":[],"quantity":0}],"eventTime":"","eventType":"","filter":"","mediaInfo":{"mediaProgressDuration":"","mediaProgressPercentage":""},"pageInfo":{"pageCategory":"","pageviewId":"","referrerUri":"","uri":""},"panel":{"displayName":"","panelId":"","panelPosition":0,"totalPanels":0},"promotionIds":[],"searchInfo":{"offset":0,"orderBy":"","searchQuery":""},"sessionId":"","tagIds":[],"transactionInfo":{"cost":"","currency":"","discountValue":"","tax":"","transactionId":"","value":""},"userInfo":{"userAgent":"","userId":""},"userPseudoId":""}]}}'
};

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}}/v1beta/:parent/userEvents:import',
  method: 'POST',
  headers: {
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "bigquerySource": {\n    "dataSchema": "",\n    "datasetId": "",\n    "gcsStagingDir": "",\n    "partitionDate": {\n      "day": 0,\n      "month": 0,\n      "year": 0\n    },\n    "projectId": "",\n    "tableId": ""\n  },\n  "errorConfig": {\n    "gcsPrefix": ""\n  },\n  "gcsSource": {\n    "dataSchema": "",\n    "inputUris": []\n  },\n  "inlineSource": {\n    "userEvents": [\n      {\n        "attributes": {},\n        "attributionToken": "",\n        "completionInfo": {\n          "selectedPosition": 0,\n          "selectedSuggestion": ""\n        },\n        "directUserRequest": false,\n        "documents": [\n          {\n            "id": "",\n            "name": "",\n            "promotionIds": [],\n            "quantity": 0\n          }\n        ],\n        "eventTime": "",\n        "eventType": "",\n        "filter": "",\n        "mediaInfo": {\n          "mediaProgressDuration": "",\n          "mediaProgressPercentage": ""\n        },\n        "pageInfo": {\n          "pageCategory": "",\n          "pageviewId": "",\n          "referrerUri": "",\n          "uri": ""\n        },\n        "panel": {\n          "displayName": "",\n          "panelId": "",\n          "panelPosition": 0,\n          "totalPanels": 0\n        },\n        "promotionIds": [],\n        "searchInfo": {\n          "offset": 0,\n          "orderBy": "",\n          "searchQuery": ""\n        },\n        "sessionId": "",\n        "tagIds": [],\n        "transactionInfo": {\n          "cost": "",\n          "currency": "",\n          "discountValue": "",\n          "tax": "",\n          "transactionId": "",\n          "value": ""\n        },\n        "userInfo": {\n          "userAgent": "",\n          "userId": ""\n        },\n        "userPseudoId": ""\n      }\n    ]\n  }\n}'
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"bigquerySource\": {\n    \"dataSchema\": \"\",\n    \"datasetId\": \"\",\n    \"gcsStagingDir\": \"\",\n    \"partitionDate\": {\n      \"day\": 0,\n      \"month\": 0,\n      \"year\": 0\n    },\n    \"projectId\": \"\",\n    \"tableId\": \"\"\n  },\n  \"errorConfig\": {\n    \"gcsPrefix\": \"\"\n  },\n  \"gcsSource\": {\n    \"dataSchema\": \"\",\n    \"inputUris\": []\n  },\n  \"inlineSource\": {\n    \"userEvents\": [\n      {\n        \"attributes\": {},\n        \"attributionToken\": \"\",\n        \"completionInfo\": {\n          \"selectedPosition\": 0,\n          \"selectedSuggestion\": \"\"\n        },\n        \"directUserRequest\": false,\n        \"documents\": [\n          {\n            \"id\": \"\",\n            \"name\": \"\",\n            \"promotionIds\": [],\n            \"quantity\": 0\n          }\n        ],\n        \"eventTime\": \"\",\n        \"eventType\": \"\",\n        \"filter\": \"\",\n        \"mediaInfo\": {\n          \"mediaProgressDuration\": \"\",\n          \"mediaProgressPercentage\": \"\"\n        },\n        \"pageInfo\": {\n          \"pageCategory\": \"\",\n          \"pageviewId\": \"\",\n          \"referrerUri\": \"\",\n          \"uri\": \"\"\n        },\n        \"panel\": {\n          \"displayName\": \"\",\n          \"panelId\": \"\",\n          \"panelPosition\": 0,\n          \"totalPanels\": 0\n        },\n        \"promotionIds\": [],\n        \"searchInfo\": {\n          \"offset\": 0,\n          \"orderBy\": \"\",\n          \"searchQuery\": \"\"\n        },\n        \"sessionId\": \"\",\n        \"tagIds\": [],\n        \"transactionInfo\": {\n          \"cost\": \"\",\n          \"currency\": \"\",\n          \"discountValue\": \"\",\n          \"tax\": \"\",\n          \"transactionId\": \"\",\n          \"value\": \"\"\n        },\n        \"userInfo\": {\n          \"userAgent\": \"\",\n          \"userId\": \"\"\n        },\n        \"userPseudoId\": \"\"\n      }\n    ]\n  }\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/v1beta/:parent/userEvents:import")
  .post(body)
  .addHeader("content-type", "application/json")
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'POST',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/v1beta/:parent/userEvents:import',
  headers: {
    'content-type': 'application/json'
  }
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on('data', function (chunk) {
    chunks.push(chunk);
  });

  res.on('end', function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.write(JSON.stringify({
  bigquerySource: {
    dataSchema: '',
    datasetId: '',
    gcsStagingDir: '',
    partitionDate: {day: 0, month: 0, year: 0},
    projectId: '',
    tableId: ''
  },
  errorConfig: {gcsPrefix: ''},
  gcsSource: {dataSchema: '', inputUris: []},
  inlineSource: {
    userEvents: [
      {
        attributes: {},
        attributionToken: '',
        completionInfo: {selectedPosition: 0, selectedSuggestion: ''},
        directUserRequest: false,
        documents: [{id: '', name: '', promotionIds: [], quantity: 0}],
        eventTime: '',
        eventType: '',
        filter: '',
        mediaInfo: {mediaProgressDuration: '', mediaProgressPercentage: ''},
        pageInfo: {pageCategory: '', pageviewId: '', referrerUri: '', uri: ''},
        panel: {displayName: '', panelId: '', panelPosition: 0, totalPanels: 0},
        promotionIds: [],
        searchInfo: {offset: 0, orderBy: '', searchQuery: ''},
        sessionId: '',
        tagIds: [],
        transactionInfo: {
          cost: '',
          currency: '',
          discountValue: '',
          tax: '',
          transactionId: '',
          value: ''
        },
        userInfo: {userAgent: '', userId: ''},
        userPseudoId: ''
      }
    ]
  }
}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/v1beta/:parent/userEvents:import',
  headers: {'content-type': 'application/json'},
  body: {
    bigquerySource: {
      dataSchema: '',
      datasetId: '',
      gcsStagingDir: '',
      partitionDate: {day: 0, month: 0, year: 0},
      projectId: '',
      tableId: ''
    },
    errorConfig: {gcsPrefix: ''},
    gcsSource: {dataSchema: '', inputUris: []},
    inlineSource: {
      userEvents: [
        {
          attributes: {},
          attributionToken: '',
          completionInfo: {selectedPosition: 0, selectedSuggestion: ''},
          directUserRequest: false,
          documents: [{id: '', name: '', promotionIds: [], quantity: 0}],
          eventTime: '',
          eventType: '',
          filter: '',
          mediaInfo: {mediaProgressDuration: '', mediaProgressPercentage: ''},
          pageInfo: {pageCategory: '', pageviewId: '', referrerUri: '', uri: ''},
          panel: {displayName: '', panelId: '', panelPosition: 0, totalPanels: 0},
          promotionIds: [],
          searchInfo: {offset: 0, orderBy: '', searchQuery: ''},
          sessionId: '',
          tagIds: [],
          transactionInfo: {
            cost: '',
            currency: '',
            discountValue: '',
            tax: '',
            transactionId: '',
            value: ''
          },
          userInfo: {userAgent: '', userId: ''},
          userPseudoId: ''
        }
      ]
    }
  },
  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}}/v1beta/:parent/userEvents:import');

req.headers({
  'content-type': 'application/json'
});

req.type('json');
req.send({
  bigquerySource: {
    dataSchema: '',
    datasetId: '',
    gcsStagingDir: '',
    partitionDate: {
      day: 0,
      month: 0,
      year: 0
    },
    projectId: '',
    tableId: ''
  },
  errorConfig: {
    gcsPrefix: ''
  },
  gcsSource: {
    dataSchema: '',
    inputUris: []
  },
  inlineSource: {
    userEvents: [
      {
        attributes: {},
        attributionToken: '',
        completionInfo: {
          selectedPosition: 0,
          selectedSuggestion: ''
        },
        directUserRequest: false,
        documents: [
          {
            id: '',
            name: '',
            promotionIds: [],
            quantity: 0
          }
        ],
        eventTime: '',
        eventType: '',
        filter: '',
        mediaInfo: {
          mediaProgressDuration: '',
          mediaProgressPercentage: ''
        },
        pageInfo: {
          pageCategory: '',
          pageviewId: '',
          referrerUri: '',
          uri: ''
        },
        panel: {
          displayName: '',
          panelId: '',
          panelPosition: 0,
          totalPanels: 0
        },
        promotionIds: [],
        searchInfo: {
          offset: 0,
          orderBy: '',
          searchQuery: ''
        },
        sessionId: '',
        tagIds: [],
        transactionInfo: {
          cost: '',
          currency: '',
          discountValue: '',
          tax: '',
          transactionId: '',
          value: ''
        },
        userInfo: {
          userAgent: '',
          userId: ''
        },
        userPseudoId: ''
      }
    ]
  }
});

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}}/v1beta/:parent/userEvents:import',
  headers: {'content-type': 'application/json'},
  data: {
    bigquerySource: {
      dataSchema: '',
      datasetId: '',
      gcsStagingDir: '',
      partitionDate: {day: 0, month: 0, year: 0},
      projectId: '',
      tableId: ''
    },
    errorConfig: {gcsPrefix: ''},
    gcsSource: {dataSchema: '', inputUris: []},
    inlineSource: {
      userEvents: [
        {
          attributes: {},
          attributionToken: '',
          completionInfo: {selectedPosition: 0, selectedSuggestion: ''},
          directUserRequest: false,
          documents: [{id: '', name: '', promotionIds: [], quantity: 0}],
          eventTime: '',
          eventType: '',
          filter: '',
          mediaInfo: {mediaProgressDuration: '', mediaProgressPercentage: ''},
          pageInfo: {pageCategory: '', pageviewId: '', referrerUri: '', uri: ''},
          panel: {displayName: '', panelId: '', panelPosition: 0, totalPanels: 0},
          promotionIds: [],
          searchInfo: {offset: 0, orderBy: '', searchQuery: ''},
          sessionId: '',
          tagIds: [],
          transactionInfo: {
            cost: '',
            currency: '',
            discountValue: '',
            tax: '',
            transactionId: '',
            value: ''
          },
          userInfo: {userAgent: '', userId: ''},
          userPseudoId: ''
        }
      ]
    }
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/v1beta/:parent/userEvents:import';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"bigquerySource":{"dataSchema":"","datasetId":"","gcsStagingDir":"","partitionDate":{"day":0,"month":0,"year":0},"projectId":"","tableId":""},"errorConfig":{"gcsPrefix":""},"gcsSource":{"dataSchema":"","inputUris":[]},"inlineSource":{"userEvents":[{"attributes":{},"attributionToken":"","completionInfo":{"selectedPosition":0,"selectedSuggestion":""},"directUserRequest":false,"documents":[{"id":"","name":"","promotionIds":[],"quantity":0}],"eventTime":"","eventType":"","filter":"","mediaInfo":{"mediaProgressDuration":"","mediaProgressPercentage":""},"pageInfo":{"pageCategory":"","pageviewId":"","referrerUri":"","uri":""},"panel":{"displayName":"","panelId":"","panelPosition":0,"totalPanels":0},"promotionIds":[],"searchInfo":{"offset":0,"orderBy":"","searchQuery":""},"sessionId":"","tagIds":[],"transactionInfo":{"cost":"","currency":"","discountValue":"","tax":"","transactionId":"","value":""},"userInfo":{"userAgent":"","userId":""},"userPseudoId":""}]}}'
};

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 = @{ @"bigquerySource": @{ @"dataSchema": @"", @"datasetId": @"", @"gcsStagingDir": @"", @"partitionDate": @{ @"day": @0, @"month": @0, @"year": @0 }, @"projectId": @"", @"tableId": @"" },
                              @"errorConfig": @{ @"gcsPrefix": @"" },
                              @"gcsSource": @{ @"dataSchema": @"", @"inputUris": @[  ] },
                              @"inlineSource": @{ @"userEvents": @[ @{ @"attributes": @{  }, @"attributionToken": @"", @"completionInfo": @{ @"selectedPosition": @0, @"selectedSuggestion": @"" }, @"directUserRequest": @NO, @"documents": @[ @{ @"id": @"", @"name": @"", @"promotionIds": @[  ], @"quantity": @0 } ], @"eventTime": @"", @"eventType": @"", @"filter": @"", @"mediaInfo": @{ @"mediaProgressDuration": @"", @"mediaProgressPercentage": @"" }, @"pageInfo": @{ @"pageCategory": @"", @"pageviewId": @"", @"referrerUri": @"", @"uri": @"" }, @"panel": @{ @"displayName": @"", @"panelId": @"", @"panelPosition": @0, @"totalPanels": @0 }, @"promotionIds": @[  ], @"searchInfo": @{ @"offset": @0, @"orderBy": @"", @"searchQuery": @"" }, @"sessionId": @"", @"tagIds": @[  ], @"transactionInfo": @{ @"cost": @"", @"currency": @"", @"discountValue": @"", @"tax": @"", @"transactionId": @"", @"value": @"" }, @"userInfo": @{ @"userAgent": @"", @"userId": @"" }, @"userPseudoId": @"" } ] } };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1beta/:parent/userEvents:import"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/v1beta/:parent/userEvents:import" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n  \"bigquerySource\": {\n    \"dataSchema\": \"\",\n    \"datasetId\": \"\",\n    \"gcsStagingDir\": \"\",\n    \"partitionDate\": {\n      \"day\": 0,\n      \"month\": 0,\n      \"year\": 0\n    },\n    \"projectId\": \"\",\n    \"tableId\": \"\"\n  },\n  \"errorConfig\": {\n    \"gcsPrefix\": \"\"\n  },\n  \"gcsSource\": {\n    \"dataSchema\": \"\",\n    \"inputUris\": []\n  },\n  \"inlineSource\": {\n    \"userEvents\": [\n      {\n        \"attributes\": {},\n        \"attributionToken\": \"\",\n        \"completionInfo\": {\n          \"selectedPosition\": 0,\n          \"selectedSuggestion\": \"\"\n        },\n        \"directUserRequest\": false,\n        \"documents\": [\n          {\n            \"id\": \"\",\n            \"name\": \"\",\n            \"promotionIds\": [],\n            \"quantity\": 0\n          }\n        ],\n        \"eventTime\": \"\",\n        \"eventType\": \"\",\n        \"filter\": \"\",\n        \"mediaInfo\": {\n          \"mediaProgressDuration\": \"\",\n          \"mediaProgressPercentage\": \"\"\n        },\n        \"pageInfo\": {\n          \"pageCategory\": \"\",\n          \"pageviewId\": \"\",\n          \"referrerUri\": \"\",\n          \"uri\": \"\"\n        },\n        \"panel\": {\n          \"displayName\": \"\",\n          \"panelId\": \"\",\n          \"panelPosition\": 0,\n          \"totalPanels\": 0\n        },\n        \"promotionIds\": [],\n        \"searchInfo\": {\n          \"offset\": 0,\n          \"orderBy\": \"\",\n          \"searchQuery\": \"\"\n        },\n        \"sessionId\": \"\",\n        \"tagIds\": [],\n        \"transactionInfo\": {\n          \"cost\": \"\",\n          \"currency\": \"\",\n          \"discountValue\": \"\",\n          \"tax\": \"\",\n          \"transactionId\": \"\",\n          \"value\": \"\"\n        },\n        \"userInfo\": {\n          \"userAgent\": \"\",\n          \"userId\": \"\"\n        },\n        \"userPseudoId\": \"\"\n      }\n    ]\n  }\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/v1beta/:parent/userEvents:import",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => json_encode([
    'bigquerySource' => [
        'dataSchema' => '',
        'datasetId' => '',
        'gcsStagingDir' => '',
        'partitionDate' => [
                'day' => 0,
                'month' => 0,
                'year' => 0
        ],
        'projectId' => '',
        'tableId' => ''
    ],
    'errorConfig' => [
        'gcsPrefix' => ''
    ],
    'gcsSource' => [
        'dataSchema' => '',
        'inputUris' => [
                
        ]
    ],
    'inlineSource' => [
        'userEvents' => [
                [
                                'attributes' => [
                                                                
                                ],
                                'attributionToken' => '',
                                'completionInfo' => [
                                                                'selectedPosition' => 0,
                                                                'selectedSuggestion' => ''
                                ],
                                'directUserRequest' => null,
                                'documents' => [
                                                                [
                                                                                                                                'id' => '',
                                                                                                                                'name' => '',
                                                                                                                                'promotionIds' => [
                                                                                                                                                                                                                                                                
                                                                                                                                ],
                                                                                                                                'quantity' => 0
                                                                ]
                                ],
                                'eventTime' => '',
                                'eventType' => '',
                                'filter' => '',
                                'mediaInfo' => [
                                                                'mediaProgressDuration' => '',
                                                                'mediaProgressPercentage' => ''
                                ],
                                'pageInfo' => [
                                                                'pageCategory' => '',
                                                                'pageviewId' => '',
                                                                'referrerUri' => '',
                                                                'uri' => ''
                                ],
                                'panel' => [
                                                                'displayName' => '',
                                                                'panelId' => '',
                                                                'panelPosition' => 0,
                                                                'totalPanels' => 0
                                ],
                                'promotionIds' => [
                                                                
                                ],
                                'searchInfo' => [
                                                                'offset' => 0,
                                                                'orderBy' => '',
                                                                'searchQuery' => ''
                                ],
                                'sessionId' => '',
                                'tagIds' => [
                                                                
                                ],
                                'transactionInfo' => [
                                                                'cost' => '',
                                                                'currency' => '',
                                                                'discountValue' => '',
                                                                'tax' => '',
                                                                'transactionId' => '',
                                                                'value' => ''
                                ],
                                'userInfo' => [
                                                                'userAgent' => '',
                                                                'userId' => ''
                                ],
                                'userPseudoId' => ''
                ]
        ]
    ]
  ]),
  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}}/v1beta/:parent/userEvents:import', [
  'body' => '{
  "bigquerySource": {
    "dataSchema": "",
    "datasetId": "",
    "gcsStagingDir": "",
    "partitionDate": {
      "day": 0,
      "month": 0,
      "year": 0
    },
    "projectId": "",
    "tableId": ""
  },
  "errorConfig": {
    "gcsPrefix": ""
  },
  "gcsSource": {
    "dataSchema": "",
    "inputUris": []
  },
  "inlineSource": {
    "userEvents": [
      {
        "attributes": {},
        "attributionToken": "",
        "completionInfo": {
          "selectedPosition": 0,
          "selectedSuggestion": ""
        },
        "directUserRequest": false,
        "documents": [
          {
            "id": "",
            "name": "",
            "promotionIds": [],
            "quantity": 0
          }
        ],
        "eventTime": "",
        "eventType": "",
        "filter": "",
        "mediaInfo": {
          "mediaProgressDuration": "",
          "mediaProgressPercentage": ""
        },
        "pageInfo": {
          "pageCategory": "",
          "pageviewId": "",
          "referrerUri": "",
          "uri": ""
        },
        "panel": {
          "displayName": "",
          "panelId": "",
          "panelPosition": 0,
          "totalPanels": 0
        },
        "promotionIds": [],
        "searchInfo": {
          "offset": 0,
          "orderBy": "",
          "searchQuery": ""
        },
        "sessionId": "",
        "tagIds": [],
        "transactionInfo": {
          "cost": "",
          "currency": "",
          "discountValue": "",
          "tax": "",
          "transactionId": "",
          "value": ""
        },
        "userInfo": {
          "userAgent": "",
          "userId": ""
        },
        "userPseudoId": ""
      }
    ]
  }
}',
  'headers' => [
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/v1beta/:parent/userEvents:import');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'bigquerySource' => [
    'dataSchema' => '',
    'datasetId' => '',
    'gcsStagingDir' => '',
    'partitionDate' => [
        'day' => 0,
        'month' => 0,
        'year' => 0
    ],
    'projectId' => '',
    'tableId' => ''
  ],
  'errorConfig' => [
    'gcsPrefix' => ''
  ],
  'gcsSource' => [
    'dataSchema' => '',
    'inputUris' => [
        
    ]
  ],
  'inlineSource' => [
    'userEvents' => [
        [
                'attributes' => [
                                
                ],
                'attributionToken' => '',
                'completionInfo' => [
                                'selectedPosition' => 0,
                                'selectedSuggestion' => ''
                ],
                'directUserRequest' => null,
                'documents' => [
                                [
                                                                'id' => '',
                                                                'name' => '',
                                                                'promotionIds' => [
                                                                                                                                
                                                                ],
                                                                'quantity' => 0
                                ]
                ],
                'eventTime' => '',
                'eventType' => '',
                'filter' => '',
                'mediaInfo' => [
                                'mediaProgressDuration' => '',
                                'mediaProgressPercentage' => ''
                ],
                'pageInfo' => [
                                'pageCategory' => '',
                                'pageviewId' => '',
                                'referrerUri' => '',
                                'uri' => ''
                ],
                'panel' => [
                                'displayName' => '',
                                'panelId' => '',
                                'panelPosition' => 0,
                                'totalPanels' => 0
                ],
                'promotionIds' => [
                                
                ],
                'searchInfo' => [
                                'offset' => 0,
                                'orderBy' => '',
                                'searchQuery' => ''
                ],
                'sessionId' => '',
                'tagIds' => [
                                
                ],
                'transactionInfo' => [
                                'cost' => '',
                                'currency' => '',
                                'discountValue' => '',
                                'tax' => '',
                                'transactionId' => '',
                                'value' => ''
                ],
                'userInfo' => [
                                'userAgent' => '',
                                'userId' => ''
                ],
                'userPseudoId' => ''
        ]
    ]
  ]
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'bigquerySource' => [
    'dataSchema' => '',
    'datasetId' => '',
    'gcsStagingDir' => '',
    'partitionDate' => [
        'day' => 0,
        'month' => 0,
        'year' => 0
    ],
    'projectId' => '',
    'tableId' => ''
  ],
  'errorConfig' => [
    'gcsPrefix' => ''
  ],
  'gcsSource' => [
    'dataSchema' => '',
    'inputUris' => [
        
    ]
  ],
  'inlineSource' => [
    'userEvents' => [
        [
                'attributes' => [
                                
                ],
                'attributionToken' => '',
                'completionInfo' => [
                                'selectedPosition' => 0,
                                'selectedSuggestion' => ''
                ],
                'directUserRequest' => null,
                'documents' => [
                                [
                                                                'id' => '',
                                                                'name' => '',
                                                                'promotionIds' => [
                                                                                                                                
                                                                ],
                                                                'quantity' => 0
                                ]
                ],
                'eventTime' => '',
                'eventType' => '',
                'filter' => '',
                'mediaInfo' => [
                                'mediaProgressDuration' => '',
                                'mediaProgressPercentage' => ''
                ],
                'pageInfo' => [
                                'pageCategory' => '',
                                'pageviewId' => '',
                                'referrerUri' => '',
                                'uri' => ''
                ],
                'panel' => [
                                'displayName' => '',
                                'panelId' => '',
                                'panelPosition' => 0,
                                'totalPanels' => 0
                ],
                'promotionIds' => [
                                
                ],
                'searchInfo' => [
                                'offset' => 0,
                                'orderBy' => '',
                                'searchQuery' => ''
                ],
                'sessionId' => '',
                'tagIds' => [
                                
                ],
                'transactionInfo' => [
                                'cost' => '',
                                'currency' => '',
                                'discountValue' => '',
                                'tax' => '',
                                'transactionId' => '',
                                'value' => ''
                ],
                'userInfo' => [
                                'userAgent' => '',
                                'userId' => ''
                ],
                'userPseudoId' => ''
        ]
    ]
  ]
]));
$request->setRequestUrl('{{baseUrl}}/v1beta/:parent/userEvents:import');
$request->setRequestMethod('POST');
$request->setBody($body);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1beta/:parent/userEvents:import' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "bigquerySource": {
    "dataSchema": "",
    "datasetId": "",
    "gcsStagingDir": "",
    "partitionDate": {
      "day": 0,
      "month": 0,
      "year": 0
    },
    "projectId": "",
    "tableId": ""
  },
  "errorConfig": {
    "gcsPrefix": ""
  },
  "gcsSource": {
    "dataSchema": "",
    "inputUris": []
  },
  "inlineSource": {
    "userEvents": [
      {
        "attributes": {},
        "attributionToken": "",
        "completionInfo": {
          "selectedPosition": 0,
          "selectedSuggestion": ""
        },
        "directUserRequest": false,
        "documents": [
          {
            "id": "",
            "name": "",
            "promotionIds": [],
            "quantity": 0
          }
        ],
        "eventTime": "",
        "eventType": "",
        "filter": "",
        "mediaInfo": {
          "mediaProgressDuration": "",
          "mediaProgressPercentage": ""
        },
        "pageInfo": {
          "pageCategory": "",
          "pageviewId": "",
          "referrerUri": "",
          "uri": ""
        },
        "panel": {
          "displayName": "",
          "panelId": "",
          "panelPosition": 0,
          "totalPanels": 0
        },
        "promotionIds": [],
        "searchInfo": {
          "offset": 0,
          "orderBy": "",
          "searchQuery": ""
        },
        "sessionId": "",
        "tagIds": [],
        "transactionInfo": {
          "cost": "",
          "currency": "",
          "discountValue": "",
          "tax": "",
          "transactionId": "",
          "value": ""
        },
        "userInfo": {
          "userAgent": "",
          "userId": ""
        },
        "userPseudoId": ""
      }
    ]
  }
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1beta/:parent/userEvents:import' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "bigquerySource": {
    "dataSchema": "",
    "datasetId": "",
    "gcsStagingDir": "",
    "partitionDate": {
      "day": 0,
      "month": 0,
      "year": 0
    },
    "projectId": "",
    "tableId": ""
  },
  "errorConfig": {
    "gcsPrefix": ""
  },
  "gcsSource": {
    "dataSchema": "",
    "inputUris": []
  },
  "inlineSource": {
    "userEvents": [
      {
        "attributes": {},
        "attributionToken": "",
        "completionInfo": {
          "selectedPosition": 0,
          "selectedSuggestion": ""
        },
        "directUserRequest": false,
        "documents": [
          {
            "id": "",
            "name": "",
            "promotionIds": [],
            "quantity": 0
          }
        ],
        "eventTime": "",
        "eventType": "",
        "filter": "",
        "mediaInfo": {
          "mediaProgressDuration": "",
          "mediaProgressPercentage": ""
        },
        "pageInfo": {
          "pageCategory": "",
          "pageviewId": "",
          "referrerUri": "",
          "uri": ""
        },
        "panel": {
          "displayName": "",
          "panelId": "",
          "panelPosition": 0,
          "totalPanels": 0
        },
        "promotionIds": [],
        "searchInfo": {
          "offset": 0,
          "orderBy": "",
          "searchQuery": ""
        },
        "sessionId": "",
        "tagIds": [],
        "transactionInfo": {
          "cost": "",
          "currency": "",
          "discountValue": "",
          "tax": "",
          "transactionId": "",
          "value": ""
        },
        "userInfo": {
          "userAgent": "",
          "userId": ""
        },
        "userPseudoId": ""
      }
    ]
  }
}'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "{\n  \"bigquerySource\": {\n    \"dataSchema\": \"\",\n    \"datasetId\": \"\",\n    \"gcsStagingDir\": \"\",\n    \"partitionDate\": {\n      \"day\": 0,\n      \"month\": 0,\n      \"year\": 0\n    },\n    \"projectId\": \"\",\n    \"tableId\": \"\"\n  },\n  \"errorConfig\": {\n    \"gcsPrefix\": \"\"\n  },\n  \"gcsSource\": {\n    \"dataSchema\": \"\",\n    \"inputUris\": []\n  },\n  \"inlineSource\": {\n    \"userEvents\": [\n      {\n        \"attributes\": {},\n        \"attributionToken\": \"\",\n        \"completionInfo\": {\n          \"selectedPosition\": 0,\n          \"selectedSuggestion\": \"\"\n        },\n        \"directUserRequest\": false,\n        \"documents\": [\n          {\n            \"id\": \"\",\n            \"name\": \"\",\n            \"promotionIds\": [],\n            \"quantity\": 0\n          }\n        ],\n        \"eventTime\": \"\",\n        \"eventType\": \"\",\n        \"filter\": \"\",\n        \"mediaInfo\": {\n          \"mediaProgressDuration\": \"\",\n          \"mediaProgressPercentage\": \"\"\n        },\n        \"pageInfo\": {\n          \"pageCategory\": \"\",\n          \"pageviewId\": \"\",\n          \"referrerUri\": \"\",\n          \"uri\": \"\"\n        },\n        \"panel\": {\n          \"displayName\": \"\",\n          \"panelId\": \"\",\n          \"panelPosition\": 0,\n          \"totalPanels\": 0\n        },\n        \"promotionIds\": [],\n        \"searchInfo\": {\n          \"offset\": 0,\n          \"orderBy\": \"\",\n          \"searchQuery\": \"\"\n        },\n        \"sessionId\": \"\",\n        \"tagIds\": [],\n        \"transactionInfo\": {\n          \"cost\": \"\",\n          \"currency\": \"\",\n          \"discountValue\": \"\",\n          \"tax\": \"\",\n          \"transactionId\": \"\",\n          \"value\": \"\"\n        },\n        \"userInfo\": {\n          \"userAgent\": \"\",\n          \"userId\": \"\"\n        },\n        \"userPseudoId\": \"\"\n      }\n    ]\n  }\n}"

headers = { 'content-type': "application/json" }

conn.request("POST", "/baseUrl/v1beta/:parent/userEvents:import", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/v1beta/:parent/userEvents:import"

payload = {
    "bigquerySource": {
        "dataSchema": "",
        "datasetId": "",
        "gcsStagingDir": "",
        "partitionDate": {
            "day": 0,
            "month": 0,
            "year": 0
        },
        "projectId": "",
        "tableId": ""
    },
    "errorConfig": { "gcsPrefix": "" },
    "gcsSource": {
        "dataSchema": "",
        "inputUris": []
    },
    "inlineSource": { "userEvents": [
            {
                "attributes": {},
                "attributionToken": "",
                "completionInfo": {
                    "selectedPosition": 0,
                    "selectedSuggestion": ""
                },
                "directUserRequest": False,
                "documents": [
                    {
                        "id": "",
                        "name": "",
                        "promotionIds": [],
                        "quantity": 0
                    }
                ],
                "eventTime": "",
                "eventType": "",
                "filter": "",
                "mediaInfo": {
                    "mediaProgressDuration": "",
                    "mediaProgressPercentage": ""
                },
                "pageInfo": {
                    "pageCategory": "",
                    "pageviewId": "",
                    "referrerUri": "",
                    "uri": ""
                },
                "panel": {
                    "displayName": "",
                    "panelId": "",
                    "panelPosition": 0,
                    "totalPanels": 0
                },
                "promotionIds": [],
                "searchInfo": {
                    "offset": 0,
                    "orderBy": "",
                    "searchQuery": ""
                },
                "sessionId": "",
                "tagIds": [],
                "transactionInfo": {
                    "cost": "",
                    "currency": "",
                    "discountValue": "",
                    "tax": "",
                    "transactionId": "",
                    "value": ""
                },
                "userInfo": {
                    "userAgent": "",
                    "userId": ""
                },
                "userPseudoId": ""
            }
        ] }
}
headers = {"content-type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/v1beta/:parent/userEvents:import"

payload <- "{\n  \"bigquerySource\": {\n    \"dataSchema\": \"\",\n    \"datasetId\": \"\",\n    \"gcsStagingDir\": \"\",\n    \"partitionDate\": {\n      \"day\": 0,\n      \"month\": 0,\n      \"year\": 0\n    },\n    \"projectId\": \"\",\n    \"tableId\": \"\"\n  },\n  \"errorConfig\": {\n    \"gcsPrefix\": \"\"\n  },\n  \"gcsSource\": {\n    \"dataSchema\": \"\",\n    \"inputUris\": []\n  },\n  \"inlineSource\": {\n    \"userEvents\": [\n      {\n        \"attributes\": {},\n        \"attributionToken\": \"\",\n        \"completionInfo\": {\n          \"selectedPosition\": 0,\n          \"selectedSuggestion\": \"\"\n        },\n        \"directUserRequest\": false,\n        \"documents\": [\n          {\n            \"id\": \"\",\n            \"name\": \"\",\n            \"promotionIds\": [],\n            \"quantity\": 0\n          }\n        ],\n        \"eventTime\": \"\",\n        \"eventType\": \"\",\n        \"filter\": \"\",\n        \"mediaInfo\": {\n          \"mediaProgressDuration\": \"\",\n          \"mediaProgressPercentage\": \"\"\n        },\n        \"pageInfo\": {\n          \"pageCategory\": \"\",\n          \"pageviewId\": \"\",\n          \"referrerUri\": \"\",\n          \"uri\": \"\"\n        },\n        \"panel\": {\n          \"displayName\": \"\",\n          \"panelId\": \"\",\n          \"panelPosition\": 0,\n          \"totalPanels\": 0\n        },\n        \"promotionIds\": [],\n        \"searchInfo\": {\n          \"offset\": 0,\n          \"orderBy\": \"\",\n          \"searchQuery\": \"\"\n        },\n        \"sessionId\": \"\",\n        \"tagIds\": [],\n        \"transactionInfo\": {\n          \"cost\": \"\",\n          \"currency\": \"\",\n          \"discountValue\": \"\",\n          \"tax\": \"\",\n          \"transactionId\": \"\",\n          \"value\": \"\"\n        },\n        \"userInfo\": {\n          \"userAgent\": \"\",\n          \"userId\": \"\"\n        },\n        \"userPseudoId\": \"\"\n      }\n    ]\n  }\n}"

encode <- "json"

response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/v1beta/:parent/userEvents:import")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n  \"bigquerySource\": {\n    \"dataSchema\": \"\",\n    \"datasetId\": \"\",\n    \"gcsStagingDir\": \"\",\n    \"partitionDate\": {\n      \"day\": 0,\n      \"month\": 0,\n      \"year\": 0\n    },\n    \"projectId\": \"\",\n    \"tableId\": \"\"\n  },\n  \"errorConfig\": {\n    \"gcsPrefix\": \"\"\n  },\n  \"gcsSource\": {\n    \"dataSchema\": \"\",\n    \"inputUris\": []\n  },\n  \"inlineSource\": {\n    \"userEvents\": [\n      {\n        \"attributes\": {},\n        \"attributionToken\": \"\",\n        \"completionInfo\": {\n          \"selectedPosition\": 0,\n          \"selectedSuggestion\": \"\"\n        },\n        \"directUserRequest\": false,\n        \"documents\": [\n          {\n            \"id\": \"\",\n            \"name\": \"\",\n            \"promotionIds\": [],\n            \"quantity\": 0\n          }\n        ],\n        \"eventTime\": \"\",\n        \"eventType\": \"\",\n        \"filter\": \"\",\n        \"mediaInfo\": {\n          \"mediaProgressDuration\": \"\",\n          \"mediaProgressPercentage\": \"\"\n        },\n        \"pageInfo\": {\n          \"pageCategory\": \"\",\n          \"pageviewId\": \"\",\n          \"referrerUri\": \"\",\n          \"uri\": \"\"\n        },\n        \"panel\": {\n          \"displayName\": \"\",\n          \"panelId\": \"\",\n          \"panelPosition\": 0,\n          \"totalPanels\": 0\n        },\n        \"promotionIds\": [],\n        \"searchInfo\": {\n          \"offset\": 0,\n          \"orderBy\": \"\",\n          \"searchQuery\": \"\"\n        },\n        \"sessionId\": \"\",\n        \"tagIds\": [],\n        \"transactionInfo\": {\n          \"cost\": \"\",\n          \"currency\": \"\",\n          \"discountValue\": \"\",\n          \"tax\": \"\",\n          \"transactionId\": \"\",\n          \"value\": \"\"\n        },\n        \"userInfo\": {\n          \"userAgent\": \"\",\n          \"userId\": \"\"\n        },\n        \"userPseudoId\": \"\"\n      }\n    ]\n  }\n}"

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
  headers: {'Content-Type' => 'application/json'}
)

response = conn.post('/baseUrl/v1beta/:parent/userEvents:import') do |req|
  req.body = "{\n  \"bigquerySource\": {\n    \"dataSchema\": \"\",\n    \"datasetId\": \"\",\n    \"gcsStagingDir\": \"\",\n    \"partitionDate\": {\n      \"day\": 0,\n      \"month\": 0,\n      \"year\": 0\n    },\n    \"projectId\": \"\",\n    \"tableId\": \"\"\n  },\n  \"errorConfig\": {\n    \"gcsPrefix\": \"\"\n  },\n  \"gcsSource\": {\n    \"dataSchema\": \"\",\n    \"inputUris\": []\n  },\n  \"inlineSource\": {\n    \"userEvents\": [\n      {\n        \"attributes\": {},\n        \"attributionToken\": \"\",\n        \"completionInfo\": {\n          \"selectedPosition\": 0,\n          \"selectedSuggestion\": \"\"\n        },\n        \"directUserRequest\": false,\n        \"documents\": [\n          {\n            \"id\": \"\",\n            \"name\": \"\",\n            \"promotionIds\": [],\n            \"quantity\": 0\n          }\n        ],\n        \"eventTime\": \"\",\n        \"eventType\": \"\",\n        \"filter\": \"\",\n        \"mediaInfo\": {\n          \"mediaProgressDuration\": \"\",\n          \"mediaProgressPercentage\": \"\"\n        },\n        \"pageInfo\": {\n          \"pageCategory\": \"\",\n          \"pageviewId\": \"\",\n          \"referrerUri\": \"\",\n          \"uri\": \"\"\n        },\n        \"panel\": {\n          \"displayName\": \"\",\n          \"panelId\": \"\",\n          \"panelPosition\": 0,\n          \"totalPanels\": 0\n        },\n        \"promotionIds\": [],\n        \"searchInfo\": {\n          \"offset\": 0,\n          \"orderBy\": \"\",\n          \"searchQuery\": \"\"\n        },\n        \"sessionId\": \"\",\n        \"tagIds\": [],\n        \"transactionInfo\": {\n          \"cost\": \"\",\n          \"currency\": \"\",\n          \"discountValue\": \"\",\n          \"tax\": \"\",\n          \"transactionId\": \"\",\n          \"value\": \"\"\n        },\n        \"userInfo\": {\n          \"userAgent\": \"\",\n          \"userId\": \"\"\n        },\n        \"userPseudoId\": \"\"\n      }\n    ]\n  }\n}"
end

puts response.status
puts response.body
use serde_json::json;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/v1beta/:parent/userEvents:import";

    let payload = json!({
        "bigquerySource": json!({
            "dataSchema": "",
            "datasetId": "",
            "gcsStagingDir": "",
            "partitionDate": json!({
                "day": 0,
                "month": 0,
                "year": 0
            }),
            "projectId": "",
            "tableId": ""
        }),
        "errorConfig": json!({"gcsPrefix": ""}),
        "gcsSource": json!({
            "dataSchema": "",
            "inputUris": ()
        }),
        "inlineSource": json!({"userEvents": (
                json!({
                    "attributes": json!({}),
                    "attributionToken": "",
                    "completionInfo": json!({
                        "selectedPosition": 0,
                        "selectedSuggestion": ""
                    }),
                    "directUserRequest": false,
                    "documents": (
                        json!({
                            "id": "",
                            "name": "",
                            "promotionIds": (),
                            "quantity": 0
                        })
                    ),
                    "eventTime": "",
                    "eventType": "",
                    "filter": "",
                    "mediaInfo": json!({
                        "mediaProgressDuration": "",
                        "mediaProgressPercentage": ""
                    }),
                    "pageInfo": json!({
                        "pageCategory": "",
                        "pageviewId": "",
                        "referrerUri": "",
                        "uri": ""
                    }),
                    "panel": json!({
                        "displayName": "",
                        "panelId": "",
                        "panelPosition": 0,
                        "totalPanels": 0
                    }),
                    "promotionIds": (),
                    "searchInfo": json!({
                        "offset": 0,
                        "orderBy": "",
                        "searchQuery": ""
                    }),
                    "sessionId": "",
                    "tagIds": (),
                    "transactionInfo": json!({
                        "cost": "",
                        "currency": "",
                        "discountValue": "",
                        "tax": "",
                        "transactionId": "",
                        "value": ""
                    }),
                    "userInfo": json!({
                        "userAgent": "",
                        "userId": ""
                    }),
                    "userPseudoId": ""
                })
            )})
    });

    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}}/v1beta/:parent/userEvents:import \
  --header 'content-type: application/json' \
  --data '{
  "bigquerySource": {
    "dataSchema": "",
    "datasetId": "",
    "gcsStagingDir": "",
    "partitionDate": {
      "day": 0,
      "month": 0,
      "year": 0
    },
    "projectId": "",
    "tableId": ""
  },
  "errorConfig": {
    "gcsPrefix": ""
  },
  "gcsSource": {
    "dataSchema": "",
    "inputUris": []
  },
  "inlineSource": {
    "userEvents": [
      {
        "attributes": {},
        "attributionToken": "",
        "completionInfo": {
          "selectedPosition": 0,
          "selectedSuggestion": ""
        },
        "directUserRequest": false,
        "documents": [
          {
            "id": "",
            "name": "",
            "promotionIds": [],
            "quantity": 0
          }
        ],
        "eventTime": "",
        "eventType": "",
        "filter": "",
        "mediaInfo": {
          "mediaProgressDuration": "",
          "mediaProgressPercentage": ""
        },
        "pageInfo": {
          "pageCategory": "",
          "pageviewId": "",
          "referrerUri": "",
          "uri": ""
        },
        "panel": {
          "displayName": "",
          "panelId": "",
          "panelPosition": 0,
          "totalPanels": 0
        },
        "promotionIds": [],
        "searchInfo": {
          "offset": 0,
          "orderBy": "",
          "searchQuery": ""
        },
        "sessionId": "",
        "tagIds": [],
        "transactionInfo": {
          "cost": "",
          "currency": "",
          "discountValue": "",
          "tax": "",
          "transactionId": "",
          "value": ""
        },
        "userInfo": {
          "userAgent": "",
          "userId": ""
        },
        "userPseudoId": ""
      }
    ]
  }
}'
echo '{
  "bigquerySource": {
    "dataSchema": "",
    "datasetId": "",
    "gcsStagingDir": "",
    "partitionDate": {
      "day": 0,
      "month": 0,
      "year": 0
    },
    "projectId": "",
    "tableId": ""
  },
  "errorConfig": {
    "gcsPrefix": ""
  },
  "gcsSource": {
    "dataSchema": "",
    "inputUris": []
  },
  "inlineSource": {
    "userEvents": [
      {
        "attributes": {},
        "attributionToken": "",
        "completionInfo": {
          "selectedPosition": 0,
          "selectedSuggestion": ""
        },
        "directUserRequest": false,
        "documents": [
          {
            "id": "",
            "name": "",
            "promotionIds": [],
            "quantity": 0
          }
        ],
        "eventTime": "",
        "eventType": "",
        "filter": "",
        "mediaInfo": {
          "mediaProgressDuration": "",
          "mediaProgressPercentage": ""
        },
        "pageInfo": {
          "pageCategory": "",
          "pageviewId": "",
          "referrerUri": "",
          "uri": ""
        },
        "panel": {
          "displayName": "",
          "panelId": "",
          "panelPosition": 0,
          "totalPanels": 0
        },
        "promotionIds": [],
        "searchInfo": {
          "offset": 0,
          "orderBy": "",
          "searchQuery": ""
        },
        "sessionId": "",
        "tagIds": [],
        "transactionInfo": {
          "cost": "",
          "currency": "",
          "discountValue": "",
          "tax": "",
          "transactionId": "",
          "value": ""
        },
        "userInfo": {
          "userAgent": "",
          "userId": ""
        },
        "userPseudoId": ""
      }
    ]
  }
}' |  \
  http POST {{baseUrl}}/v1beta/:parent/userEvents:import \
  content-type:application/json
wget --quiet \
  --method POST \
  --header 'content-type: application/json' \
  --body-data '{\n  "bigquerySource": {\n    "dataSchema": "",\n    "datasetId": "",\n    "gcsStagingDir": "",\n    "partitionDate": {\n      "day": 0,\n      "month": 0,\n      "year": 0\n    },\n    "projectId": "",\n    "tableId": ""\n  },\n  "errorConfig": {\n    "gcsPrefix": ""\n  },\n  "gcsSource": {\n    "dataSchema": "",\n    "inputUris": []\n  },\n  "inlineSource": {\n    "userEvents": [\n      {\n        "attributes": {},\n        "attributionToken": "",\n        "completionInfo": {\n          "selectedPosition": 0,\n          "selectedSuggestion": ""\n        },\n        "directUserRequest": false,\n        "documents": [\n          {\n            "id": "",\n            "name": "",\n            "promotionIds": [],\n            "quantity": 0\n          }\n        ],\n        "eventTime": "",\n        "eventType": "",\n        "filter": "",\n        "mediaInfo": {\n          "mediaProgressDuration": "",\n          "mediaProgressPercentage": ""\n        },\n        "pageInfo": {\n          "pageCategory": "",\n          "pageviewId": "",\n          "referrerUri": "",\n          "uri": ""\n        },\n        "panel": {\n          "displayName": "",\n          "panelId": "",\n          "panelPosition": 0,\n          "totalPanels": 0\n        },\n        "promotionIds": [],\n        "searchInfo": {\n          "offset": 0,\n          "orderBy": "",\n          "searchQuery": ""\n        },\n        "sessionId": "",\n        "tagIds": [],\n        "transactionInfo": {\n          "cost": "",\n          "currency": "",\n          "discountValue": "",\n          "tax": "",\n          "transactionId": "",\n          "value": ""\n        },\n        "userInfo": {\n          "userAgent": "",\n          "userId": ""\n        },\n        "userPseudoId": ""\n      }\n    ]\n  }\n}' \
  --output-document \
  - {{baseUrl}}/v1beta/:parent/userEvents:import
import Foundation

let headers = ["content-type": "application/json"]
let parameters = [
  "bigquerySource": [
    "dataSchema": "",
    "datasetId": "",
    "gcsStagingDir": "",
    "partitionDate": [
      "day": 0,
      "month": 0,
      "year": 0
    ],
    "projectId": "",
    "tableId": ""
  ],
  "errorConfig": ["gcsPrefix": ""],
  "gcsSource": [
    "dataSchema": "",
    "inputUris": []
  ],
  "inlineSource": ["userEvents": [
      [
        "attributes": [],
        "attributionToken": "",
        "completionInfo": [
          "selectedPosition": 0,
          "selectedSuggestion": ""
        ],
        "directUserRequest": false,
        "documents": [
          [
            "id": "",
            "name": "",
            "promotionIds": [],
            "quantity": 0
          ]
        ],
        "eventTime": "",
        "eventType": "",
        "filter": "",
        "mediaInfo": [
          "mediaProgressDuration": "",
          "mediaProgressPercentage": ""
        ],
        "pageInfo": [
          "pageCategory": "",
          "pageviewId": "",
          "referrerUri": "",
          "uri": ""
        ],
        "panel": [
          "displayName": "",
          "panelId": "",
          "panelPosition": 0,
          "totalPanels": 0
        ],
        "promotionIds": [],
        "searchInfo": [
          "offset": 0,
          "orderBy": "",
          "searchQuery": ""
        ],
        "sessionId": "",
        "tagIds": [],
        "transactionInfo": [
          "cost": "",
          "currency": "",
          "discountValue": "",
          "tax": "",
          "transactionId": "",
          "value": ""
        ],
        "userInfo": [
          "userAgent": "",
          "userId": ""
        ],
        "userPseudoId": ""
      ]
    ]]
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1beta/:parent/userEvents:import")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
POST discoveryengine.projects.locations.dataStores.userEvents.write
{{baseUrl}}/v1beta/:parent/userEvents:write
QUERY PARAMS

parent
BODY json

{
  "attributes": {},
  "attributionToken": "",
  "completionInfo": {
    "selectedPosition": 0,
    "selectedSuggestion": ""
  },
  "directUserRequest": false,
  "documents": [
    {
      "id": "",
      "name": "",
      "promotionIds": [],
      "quantity": 0
    }
  ],
  "eventTime": "",
  "eventType": "",
  "filter": "",
  "mediaInfo": {
    "mediaProgressDuration": "",
    "mediaProgressPercentage": ""
  },
  "pageInfo": {
    "pageCategory": "",
    "pageviewId": "",
    "referrerUri": "",
    "uri": ""
  },
  "panel": {
    "displayName": "",
    "panelId": "",
    "panelPosition": 0,
    "totalPanels": 0
  },
  "promotionIds": [],
  "searchInfo": {
    "offset": 0,
    "orderBy": "",
    "searchQuery": ""
  },
  "sessionId": "",
  "tagIds": [],
  "transactionInfo": {
    "cost": "",
    "currency": "",
    "discountValue": "",
    "tax": "",
    "transactionId": "",
    "value": ""
  },
  "userInfo": {
    "userAgent": "",
    "userId": ""
  },
  "userPseudoId": ""
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1beta/:parent/userEvents:write");

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  \"attributionToken\": \"\",\n  \"completionInfo\": {\n    \"selectedPosition\": 0,\n    \"selectedSuggestion\": \"\"\n  },\n  \"directUserRequest\": false,\n  \"documents\": [\n    {\n      \"id\": \"\",\n      \"name\": \"\",\n      \"promotionIds\": [],\n      \"quantity\": 0\n    }\n  ],\n  \"eventTime\": \"\",\n  \"eventType\": \"\",\n  \"filter\": \"\",\n  \"mediaInfo\": {\n    \"mediaProgressDuration\": \"\",\n    \"mediaProgressPercentage\": \"\"\n  },\n  \"pageInfo\": {\n    \"pageCategory\": \"\",\n    \"pageviewId\": \"\",\n    \"referrerUri\": \"\",\n    \"uri\": \"\"\n  },\n  \"panel\": {\n    \"displayName\": \"\",\n    \"panelId\": \"\",\n    \"panelPosition\": 0,\n    \"totalPanels\": 0\n  },\n  \"promotionIds\": [],\n  \"searchInfo\": {\n    \"offset\": 0,\n    \"orderBy\": \"\",\n    \"searchQuery\": \"\"\n  },\n  \"sessionId\": \"\",\n  \"tagIds\": [],\n  \"transactionInfo\": {\n    \"cost\": \"\",\n    \"currency\": \"\",\n    \"discountValue\": \"\",\n    \"tax\": \"\",\n    \"transactionId\": \"\",\n    \"value\": \"\"\n  },\n  \"userInfo\": {\n    \"userAgent\": \"\",\n    \"userId\": \"\"\n  },\n  \"userPseudoId\": \"\"\n}");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/post "{{baseUrl}}/v1beta/:parent/userEvents:write" {:content-type :json
                                                                            :form-params {:attributes {}
                                                                                          :attributionToken ""
                                                                                          :completionInfo {:selectedPosition 0
                                                                                                           :selectedSuggestion ""}
                                                                                          :directUserRequest false
                                                                                          :documents [{:id ""
                                                                                                       :name ""
                                                                                                       :promotionIds []
                                                                                                       :quantity 0}]
                                                                                          :eventTime ""
                                                                                          :eventType ""
                                                                                          :filter ""
                                                                                          :mediaInfo {:mediaProgressDuration ""
                                                                                                      :mediaProgressPercentage ""}
                                                                                          :pageInfo {:pageCategory ""
                                                                                                     :pageviewId ""
                                                                                                     :referrerUri ""
                                                                                                     :uri ""}
                                                                                          :panel {:displayName ""
                                                                                                  :panelId ""
                                                                                                  :panelPosition 0
                                                                                                  :totalPanels 0}
                                                                                          :promotionIds []
                                                                                          :searchInfo {:offset 0
                                                                                                       :orderBy ""
                                                                                                       :searchQuery ""}
                                                                                          :sessionId ""
                                                                                          :tagIds []
                                                                                          :transactionInfo {:cost ""
                                                                                                            :currency ""
                                                                                                            :discountValue ""
                                                                                                            :tax ""
                                                                                                            :transactionId ""
                                                                                                            :value ""}
                                                                                          :userInfo {:userAgent ""
                                                                                                     :userId ""}
                                                                                          :userPseudoId ""}})
require "http/client"

url = "{{baseUrl}}/v1beta/:parent/userEvents:write"
headers = HTTP::Headers{
  "content-type" => "application/json"
}
reqBody = "{\n  \"attributes\": {},\n  \"attributionToken\": \"\",\n  \"completionInfo\": {\n    \"selectedPosition\": 0,\n    \"selectedSuggestion\": \"\"\n  },\n  \"directUserRequest\": false,\n  \"documents\": [\n    {\n      \"id\": \"\",\n      \"name\": \"\",\n      \"promotionIds\": [],\n      \"quantity\": 0\n    }\n  ],\n  \"eventTime\": \"\",\n  \"eventType\": \"\",\n  \"filter\": \"\",\n  \"mediaInfo\": {\n    \"mediaProgressDuration\": \"\",\n    \"mediaProgressPercentage\": \"\"\n  },\n  \"pageInfo\": {\n    \"pageCategory\": \"\",\n    \"pageviewId\": \"\",\n    \"referrerUri\": \"\",\n    \"uri\": \"\"\n  },\n  \"panel\": {\n    \"displayName\": \"\",\n    \"panelId\": \"\",\n    \"panelPosition\": 0,\n    \"totalPanels\": 0\n  },\n  \"promotionIds\": [],\n  \"searchInfo\": {\n    \"offset\": 0,\n    \"orderBy\": \"\",\n    \"searchQuery\": \"\"\n  },\n  \"sessionId\": \"\",\n  \"tagIds\": [],\n  \"transactionInfo\": {\n    \"cost\": \"\",\n    \"currency\": \"\",\n    \"discountValue\": \"\",\n    \"tax\": \"\",\n    \"transactionId\": \"\",\n    \"value\": \"\"\n  },\n  \"userInfo\": {\n    \"userAgent\": \"\",\n    \"userId\": \"\"\n  },\n  \"userPseudoId\": \"\"\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}}/v1beta/:parent/userEvents:write"),
    Content = new StringContent("{\n  \"attributes\": {},\n  \"attributionToken\": \"\",\n  \"completionInfo\": {\n    \"selectedPosition\": 0,\n    \"selectedSuggestion\": \"\"\n  },\n  \"directUserRequest\": false,\n  \"documents\": [\n    {\n      \"id\": \"\",\n      \"name\": \"\",\n      \"promotionIds\": [],\n      \"quantity\": 0\n    }\n  ],\n  \"eventTime\": \"\",\n  \"eventType\": \"\",\n  \"filter\": \"\",\n  \"mediaInfo\": {\n    \"mediaProgressDuration\": \"\",\n    \"mediaProgressPercentage\": \"\"\n  },\n  \"pageInfo\": {\n    \"pageCategory\": \"\",\n    \"pageviewId\": \"\",\n    \"referrerUri\": \"\",\n    \"uri\": \"\"\n  },\n  \"panel\": {\n    \"displayName\": \"\",\n    \"panelId\": \"\",\n    \"panelPosition\": 0,\n    \"totalPanels\": 0\n  },\n  \"promotionIds\": [],\n  \"searchInfo\": {\n    \"offset\": 0,\n    \"orderBy\": \"\",\n    \"searchQuery\": \"\"\n  },\n  \"sessionId\": \"\",\n  \"tagIds\": [],\n  \"transactionInfo\": {\n    \"cost\": \"\",\n    \"currency\": \"\",\n    \"discountValue\": \"\",\n    \"tax\": \"\",\n    \"transactionId\": \"\",\n    \"value\": \"\"\n  },\n  \"userInfo\": {\n    \"userAgent\": \"\",\n    \"userId\": \"\"\n  },\n  \"userPseudoId\": \"\"\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}}/v1beta/:parent/userEvents:write");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"attributes\": {},\n  \"attributionToken\": \"\",\n  \"completionInfo\": {\n    \"selectedPosition\": 0,\n    \"selectedSuggestion\": \"\"\n  },\n  \"directUserRequest\": false,\n  \"documents\": [\n    {\n      \"id\": \"\",\n      \"name\": \"\",\n      \"promotionIds\": [],\n      \"quantity\": 0\n    }\n  ],\n  \"eventTime\": \"\",\n  \"eventType\": \"\",\n  \"filter\": \"\",\n  \"mediaInfo\": {\n    \"mediaProgressDuration\": \"\",\n    \"mediaProgressPercentage\": \"\"\n  },\n  \"pageInfo\": {\n    \"pageCategory\": \"\",\n    \"pageviewId\": \"\",\n    \"referrerUri\": \"\",\n    \"uri\": \"\"\n  },\n  \"panel\": {\n    \"displayName\": \"\",\n    \"panelId\": \"\",\n    \"panelPosition\": 0,\n    \"totalPanels\": 0\n  },\n  \"promotionIds\": [],\n  \"searchInfo\": {\n    \"offset\": 0,\n    \"orderBy\": \"\",\n    \"searchQuery\": \"\"\n  },\n  \"sessionId\": \"\",\n  \"tagIds\": [],\n  \"transactionInfo\": {\n    \"cost\": \"\",\n    \"currency\": \"\",\n    \"discountValue\": \"\",\n    \"tax\": \"\",\n    \"transactionId\": \"\",\n    \"value\": \"\"\n  },\n  \"userInfo\": {\n    \"userAgent\": \"\",\n    \"userId\": \"\"\n  },\n  \"userPseudoId\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/v1beta/:parent/userEvents:write"

	payload := strings.NewReader("{\n  \"attributes\": {},\n  \"attributionToken\": \"\",\n  \"completionInfo\": {\n    \"selectedPosition\": 0,\n    \"selectedSuggestion\": \"\"\n  },\n  \"directUserRequest\": false,\n  \"documents\": [\n    {\n      \"id\": \"\",\n      \"name\": \"\",\n      \"promotionIds\": [],\n      \"quantity\": 0\n    }\n  ],\n  \"eventTime\": \"\",\n  \"eventType\": \"\",\n  \"filter\": \"\",\n  \"mediaInfo\": {\n    \"mediaProgressDuration\": \"\",\n    \"mediaProgressPercentage\": \"\"\n  },\n  \"pageInfo\": {\n    \"pageCategory\": \"\",\n    \"pageviewId\": \"\",\n    \"referrerUri\": \"\",\n    \"uri\": \"\"\n  },\n  \"panel\": {\n    \"displayName\": \"\",\n    \"panelId\": \"\",\n    \"panelPosition\": 0,\n    \"totalPanels\": 0\n  },\n  \"promotionIds\": [],\n  \"searchInfo\": {\n    \"offset\": 0,\n    \"orderBy\": \"\",\n    \"searchQuery\": \"\"\n  },\n  \"sessionId\": \"\",\n  \"tagIds\": [],\n  \"transactionInfo\": {\n    \"cost\": \"\",\n    \"currency\": \"\",\n    \"discountValue\": \"\",\n    \"tax\": \"\",\n    \"transactionId\": \"\",\n    \"value\": \"\"\n  },\n  \"userInfo\": {\n    \"userAgent\": \"\",\n    \"userId\": \"\"\n  },\n  \"userPseudoId\": \"\"\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/v1beta/:parent/userEvents:write HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 991

{
  "attributes": {},
  "attributionToken": "",
  "completionInfo": {
    "selectedPosition": 0,
    "selectedSuggestion": ""
  },
  "directUserRequest": false,
  "documents": [
    {
      "id": "",
      "name": "",
      "promotionIds": [],
      "quantity": 0
    }
  ],
  "eventTime": "",
  "eventType": "",
  "filter": "",
  "mediaInfo": {
    "mediaProgressDuration": "",
    "mediaProgressPercentage": ""
  },
  "pageInfo": {
    "pageCategory": "",
    "pageviewId": "",
    "referrerUri": "",
    "uri": ""
  },
  "panel": {
    "displayName": "",
    "panelId": "",
    "panelPosition": 0,
    "totalPanels": 0
  },
  "promotionIds": [],
  "searchInfo": {
    "offset": 0,
    "orderBy": "",
    "searchQuery": ""
  },
  "sessionId": "",
  "tagIds": [],
  "transactionInfo": {
    "cost": "",
    "currency": "",
    "discountValue": "",
    "tax": "",
    "transactionId": "",
    "value": ""
  },
  "userInfo": {
    "userAgent": "",
    "userId": ""
  },
  "userPseudoId": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1beta/:parent/userEvents:write")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"attributes\": {},\n  \"attributionToken\": \"\",\n  \"completionInfo\": {\n    \"selectedPosition\": 0,\n    \"selectedSuggestion\": \"\"\n  },\n  \"directUserRequest\": false,\n  \"documents\": [\n    {\n      \"id\": \"\",\n      \"name\": \"\",\n      \"promotionIds\": [],\n      \"quantity\": 0\n    }\n  ],\n  \"eventTime\": \"\",\n  \"eventType\": \"\",\n  \"filter\": \"\",\n  \"mediaInfo\": {\n    \"mediaProgressDuration\": \"\",\n    \"mediaProgressPercentage\": \"\"\n  },\n  \"pageInfo\": {\n    \"pageCategory\": \"\",\n    \"pageviewId\": \"\",\n    \"referrerUri\": \"\",\n    \"uri\": \"\"\n  },\n  \"panel\": {\n    \"displayName\": \"\",\n    \"panelId\": \"\",\n    \"panelPosition\": 0,\n    \"totalPanels\": 0\n  },\n  \"promotionIds\": [],\n  \"searchInfo\": {\n    \"offset\": 0,\n    \"orderBy\": \"\",\n    \"searchQuery\": \"\"\n  },\n  \"sessionId\": \"\",\n  \"tagIds\": [],\n  \"transactionInfo\": {\n    \"cost\": \"\",\n    \"currency\": \"\",\n    \"discountValue\": \"\",\n    \"tax\": \"\",\n    \"transactionId\": \"\",\n    \"value\": \"\"\n  },\n  \"userInfo\": {\n    \"userAgent\": \"\",\n    \"userId\": \"\"\n  },\n  \"userPseudoId\": \"\"\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/v1beta/:parent/userEvents:write"))
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"attributes\": {},\n  \"attributionToken\": \"\",\n  \"completionInfo\": {\n    \"selectedPosition\": 0,\n    \"selectedSuggestion\": \"\"\n  },\n  \"directUserRequest\": false,\n  \"documents\": [\n    {\n      \"id\": \"\",\n      \"name\": \"\",\n      \"promotionIds\": [],\n      \"quantity\": 0\n    }\n  ],\n  \"eventTime\": \"\",\n  \"eventType\": \"\",\n  \"filter\": \"\",\n  \"mediaInfo\": {\n    \"mediaProgressDuration\": \"\",\n    \"mediaProgressPercentage\": \"\"\n  },\n  \"pageInfo\": {\n    \"pageCategory\": \"\",\n    \"pageviewId\": \"\",\n    \"referrerUri\": \"\",\n    \"uri\": \"\"\n  },\n  \"panel\": {\n    \"displayName\": \"\",\n    \"panelId\": \"\",\n    \"panelPosition\": 0,\n    \"totalPanels\": 0\n  },\n  \"promotionIds\": [],\n  \"searchInfo\": {\n    \"offset\": 0,\n    \"orderBy\": \"\",\n    \"searchQuery\": \"\"\n  },\n  \"sessionId\": \"\",\n  \"tagIds\": [],\n  \"transactionInfo\": {\n    \"cost\": \"\",\n    \"currency\": \"\",\n    \"discountValue\": \"\",\n    \"tax\": \"\",\n    \"transactionId\": \"\",\n    \"value\": \"\"\n  },\n  \"userInfo\": {\n    \"userAgent\": \"\",\n    \"userId\": \"\"\n  },\n  \"userPseudoId\": \"\"\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  \"attributionToken\": \"\",\n  \"completionInfo\": {\n    \"selectedPosition\": 0,\n    \"selectedSuggestion\": \"\"\n  },\n  \"directUserRequest\": false,\n  \"documents\": [\n    {\n      \"id\": \"\",\n      \"name\": \"\",\n      \"promotionIds\": [],\n      \"quantity\": 0\n    }\n  ],\n  \"eventTime\": \"\",\n  \"eventType\": \"\",\n  \"filter\": \"\",\n  \"mediaInfo\": {\n    \"mediaProgressDuration\": \"\",\n    \"mediaProgressPercentage\": \"\"\n  },\n  \"pageInfo\": {\n    \"pageCategory\": \"\",\n    \"pageviewId\": \"\",\n    \"referrerUri\": \"\",\n    \"uri\": \"\"\n  },\n  \"panel\": {\n    \"displayName\": \"\",\n    \"panelId\": \"\",\n    \"panelPosition\": 0,\n    \"totalPanels\": 0\n  },\n  \"promotionIds\": [],\n  \"searchInfo\": {\n    \"offset\": 0,\n    \"orderBy\": \"\",\n    \"searchQuery\": \"\"\n  },\n  \"sessionId\": \"\",\n  \"tagIds\": [],\n  \"transactionInfo\": {\n    \"cost\": \"\",\n    \"currency\": \"\",\n    \"discountValue\": \"\",\n    \"tax\": \"\",\n    \"transactionId\": \"\",\n    \"value\": \"\"\n  },\n  \"userInfo\": {\n    \"userAgent\": \"\",\n    \"userId\": \"\"\n  },\n  \"userPseudoId\": \"\"\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/v1beta/:parent/userEvents:write")
  .post(body)
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1beta/:parent/userEvents:write")
  .header("content-type", "application/json")
  .body("{\n  \"attributes\": {},\n  \"attributionToken\": \"\",\n  \"completionInfo\": {\n    \"selectedPosition\": 0,\n    \"selectedSuggestion\": \"\"\n  },\n  \"directUserRequest\": false,\n  \"documents\": [\n    {\n      \"id\": \"\",\n      \"name\": \"\",\n      \"promotionIds\": [],\n      \"quantity\": 0\n    }\n  ],\n  \"eventTime\": \"\",\n  \"eventType\": \"\",\n  \"filter\": \"\",\n  \"mediaInfo\": {\n    \"mediaProgressDuration\": \"\",\n    \"mediaProgressPercentage\": \"\"\n  },\n  \"pageInfo\": {\n    \"pageCategory\": \"\",\n    \"pageviewId\": \"\",\n    \"referrerUri\": \"\",\n    \"uri\": \"\"\n  },\n  \"panel\": {\n    \"displayName\": \"\",\n    \"panelId\": \"\",\n    \"panelPosition\": 0,\n    \"totalPanels\": 0\n  },\n  \"promotionIds\": [],\n  \"searchInfo\": {\n    \"offset\": 0,\n    \"orderBy\": \"\",\n    \"searchQuery\": \"\"\n  },\n  \"sessionId\": \"\",\n  \"tagIds\": [],\n  \"transactionInfo\": {\n    \"cost\": \"\",\n    \"currency\": \"\",\n    \"discountValue\": \"\",\n    \"tax\": \"\",\n    \"transactionId\": \"\",\n    \"value\": \"\"\n  },\n  \"userInfo\": {\n    \"userAgent\": \"\",\n    \"userId\": \"\"\n  },\n  \"userPseudoId\": \"\"\n}")
  .asString();
const data = JSON.stringify({
  attributes: {},
  attributionToken: '',
  completionInfo: {
    selectedPosition: 0,
    selectedSuggestion: ''
  },
  directUserRequest: false,
  documents: [
    {
      id: '',
      name: '',
      promotionIds: [],
      quantity: 0
    }
  ],
  eventTime: '',
  eventType: '',
  filter: '',
  mediaInfo: {
    mediaProgressDuration: '',
    mediaProgressPercentage: ''
  },
  pageInfo: {
    pageCategory: '',
    pageviewId: '',
    referrerUri: '',
    uri: ''
  },
  panel: {
    displayName: '',
    panelId: '',
    panelPosition: 0,
    totalPanels: 0
  },
  promotionIds: [],
  searchInfo: {
    offset: 0,
    orderBy: '',
    searchQuery: ''
  },
  sessionId: '',
  tagIds: [],
  transactionInfo: {
    cost: '',
    currency: '',
    discountValue: '',
    tax: '',
    transactionId: '',
    value: ''
  },
  userInfo: {
    userAgent: '',
    userId: ''
  },
  userPseudoId: ''
});

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('POST', '{{baseUrl}}/v1beta/:parent/userEvents:write');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'POST',
  url: '{{baseUrl}}/v1beta/:parent/userEvents:write',
  headers: {'content-type': 'application/json'},
  data: {
    attributes: {},
    attributionToken: '',
    completionInfo: {selectedPosition: 0, selectedSuggestion: ''},
    directUserRequest: false,
    documents: [{id: '', name: '', promotionIds: [], quantity: 0}],
    eventTime: '',
    eventType: '',
    filter: '',
    mediaInfo: {mediaProgressDuration: '', mediaProgressPercentage: ''},
    pageInfo: {pageCategory: '', pageviewId: '', referrerUri: '', uri: ''},
    panel: {displayName: '', panelId: '', panelPosition: 0, totalPanels: 0},
    promotionIds: [],
    searchInfo: {offset: 0, orderBy: '', searchQuery: ''},
    sessionId: '',
    tagIds: [],
    transactionInfo: {
      cost: '',
      currency: '',
      discountValue: '',
      tax: '',
      transactionId: '',
      value: ''
    },
    userInfo: {userAgent: '', userId: ''},
    userPseudoId: ''
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/v1beta/:parent/userEvents:write';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"attributes":{},"attributionToken":"","completionInfo":{"selectedPosition":0,"selectedSuggestion":""},"directUserRequest":false,"documents":[{"id":"","name":"","promotionIds":[],"quantity":0}],"eventTime":"","eventType":"","filter":"","mediaInfo":{"mediaProgressDuration":"","mediaProgressPercentage":""},"pageInfo":{"pageCategory":"","pageviewId":"","referrerUri":"","uri":""},"panel":{"displayName":"","panelId":"","panelPosition":0,"totalPanels":0},"promotionIds":[],"searchInfo":{"offset":0,"orderBy":"","searchQuery":""},"sessionId":"","tagIds":[],"transactionInfo":{"cost":"","currency":"","discountValue":"","tax":"","transactionId":"","value":""},"userInfo":{"userAgent":"","userId":""},"userPseudoId":""}'
};

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}}/v1beta/:parent/userEvents:write',
  method: 'POST',
  headers: {
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "attributes": {},\n  "attributionToken": "",\n  "completionInfo": {\n    "selectedPosition": 0,\n    "selectedSuggestion": ""\n  },\n  "directUserRequest": false,\n  "documents": [\n    {\n      "id": "",\n      "name": "",\n      "promotionIds": [],\n      "quantity": 0\n    }\n  ],\n  "eventTime": "",\n  "eventType": "",\n  "filter": "",\n  "mediaInfo": {\n    "mediaProgressDuration": "",\n    "mediaProgressPercentage": ""\n  },\n  "pageInfo": {\n    "pageCategory": "",\n    "pageviewId": "",\n    "referrerUri": "",\n    "uri": ""\n  },\n  "panel": {\n    "displayName": "",\n    "panelId": "",\n    "panelPosition": 0,\n    "totalPanels": 0\n  },\n  "promotionIds": [],\n  "searchInfo": {\n    "offset": 0,\n    "orderBy": "",\n    "searchQuery": ""\n  },\n  "sessionId": "",\n  "tagIds": [],\n  "transactionInfo": {\n    "cost": "",\n    "currency": "",\n    "discountValue": "",\n    "tax": "",\n    "transactionId": "",\n    "value": ""\n  },\n  "userInfo": {\n    "userAgent": "",\n    "userId": ""\n  },\n  "userPseudoId": ""\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  \"attributionToken\": \"\",\n  \"completionInfo\": {\n    \"selectedPosition\": 0,\n    \"selectedSuggestion\": \"\"\n  },\n  \"directUserRequest\": false,\n  \"documents\": [\n    {\n      \"id\": \"\",\n      \"name\": \"\",\n      \"promotionIds\": [],\n      \"quantity\": 0\n    }\n  ],\n  \"eventTime\": \"\",\n  \"eventType\": \"\",\n  \"filter\": \"\",\n  \"mediaInfo\": {\n    \"mediaProgressDuration\": \"\",\n    \"mediaProgressPercentage\": \"\"\n  },\n  \"pageInfo\": {\n    \"pageCategory\": \"\",\n    \"pageviewId\": \"\",\n    \"referrerUri\": \"\",\n    \"uri\": \"\"\n  },\n  \"panel\": {\n    \"displayName\": \"\",\n    \"panelId\": \"\",\n    \"panelPosition\": 0,\n    \"totalPanels\": 0\n  },\n  \"promotionIds\": [],\n  \"searchInfo\": {\n    \"offset\": 0,\n    \"orderBy\": \"\",\n    \"searchQuery\": \"\"\n  },\n  \"sessionId\": \"\",\n  \"tagIds\": [],\n  \"transactionInfo\": {\n    \"cost\": \"\",\n    \"currency\": \"\",\n    \"discountValue\": \"\",\n    \"tax\": \"\",\n    \"transactionId\": \"\",\n    \"value\": \"\"\n  },\n  \"userInfo\": {\n    \"userAgent\": \"\",\n    \"userId\": \"\"\n  },\n  \"userPseudoId\": \"\"\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/v1beta/:parent/userEvents:write")
  .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/v1beta/:parent/userEvents:write',
  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: {},
  attributionToken: '',
  completionInfo: {selectedPosition: 0, selectedSuggestion: ''},
  directUserRequest: false,
  documents: [{id: '', name: '', promotionIds: [], quantity: 0}],
  eventTime: '',
  eventType: '',
  filter: '',
  mediaInfo: {mediaProgressDuration: '', mediaProgressPercentage: ''},
  pageInfo: {pageCategory: '', pageviewId: '', referrerUri: '', uri: ''},
  panel: {displayName: '', panelId: '', panelPosition: 0, totalPanels: 0},
  promotionIds: [],
  searchInfo: {offset: 0, orderBy: '', searchQuery: ''},
  sessionId: '',
  tagIds: [],
  transactionInfo: {
    cost: '',
    currency: '',
    discountValue: '',
    tax: '',
    transactionId: '',
    value: ''
  },
  userInfo: {userAgent: '', userId: ''},
  userPseudoId: ''
}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/v1beta/:parent/userEvents:write',
  headers: {'content-type': 'application/json'},
  body: {
    attributes: {},
    attributionToken: '',
    completionInfo: {selectedPosition: 0, selectedSuggestion: ''},
    directUserRequest: false,
    documents: [{id: '', name: '', promotionIds: [], quantity: 0}],
    eventTime: '',
    eventType: '',
    filter: '',
    mediaInfo: {mediaProgressDuration: '', mediaProgressPercentage: ''},
    pageInfo: {pageCategory: '', pageviewId: '', referrerUri: '', uri: ''},
    panel: {displayName: '', panelId: '', panelPosition: 0, totalPanels: 0},
    promotionIds: [],
    searchInfo: {offset: 0, orderBy: '', searchQuery: ''},
    sessionId: '',
    tagIds: [],
    transactionInfo: {
      cost: '',
      currency: '',
      discountValue: '',
      tax: '',
      transactionId: '',
      value: ''
    },
    userInfo: {userAgent: '', userId: ''},
    userPseudoId: ''
  },
  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}}/v1beta/:parent/userEvents:write');

req.headers({
  'content-type': 'application/json'
});

req.type('json');
req.send({
  attributes: {},
  attributionToken: '',
  completionInfo: {
    selectedPosition: 0,
    selectedSuggestion: ''
  },
  directUserRequest: false,
  documents: [
    {
      id: '',
      name: '',
      promotionIds: [],
      quantity: 0
    }
  ],
  eventTime: '',
  eventType: '',
  filter: '',
  mediaInfo: {
    mediaProgressDuration: '',
    mediaProgressPercentage: ''
  },
  pageInfo: {
    pageCategory: '',
    pageviewId: '',
    referrerUri: '',
    uri: ''
  },
  panel: {
    displayName: '',
    panelId: '',
    panelPosition: 0,
    totalPanels: 0
  },
  promotionIds: [],
  searchInfo: {
    offset: 0,
    orderBy: '',
    searchQuery: ''
  },
  sessionId: '',
  tagIds: [],
  transactionInfo: {
    cost: '',
    currency: '',
    discountValue: '',
    tax: '',
    transactionId: '',
    value: ''
  },
  userInfo: {
    userAgent: '',
    userId: ''
  },
  userPseudoId: ''
});

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}}/v1beta/:parent/userEvents:write',
  headers: {'content-type': 'application/json'},
  data: {
    attributes: {},
    attributionToken: '',
    completionInfo: {selectedPosition: 0, selectedSuggestion: ''},
    directUserRequest: false,
    documents: [{id: '', name: '', promotionIds: [], quantity: 0}],
    eventTime: '',
    eventType: '',
    filter: '',
    mediaInfo: {mediaProgressDuration: '', mediaProgressPercentage: ''},
    pageInfo: {pageCategory: '', pageviewId: '', referrerUri: '', uri: ''},
    panel: {displayName: '', panelId: '', panelPosition: 0, totalPanels: 0},
    promotionIds: [],
    searchInfo: {offset: 0, orderBy: '', searchQuery: ''},
    sessionId: '',
    tagIds: [],
    transactionInfo: {
      cost: '',
      currency: '',
      discountValue: '',
      tax: '',
      transactionId: '',
      value: ''
    },
    userInfo: {userAgent: '', userId: ''},
    userPseudoId: ''
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/v1beta/:parent/userEvents:write';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"attributes":{},"attributionToken":"","completionInfo":{"selectedPosition":0,"selectedSuggestion":""},"directUserRequest":false,"documents":[{"id":"","name":"","promotionIds":[],"quantity":0}],"eventTime":"","eventType":"","filter":"","mediaInfo":{"mediaProgressDuration":"","mediaProgressPercentage":""},"pageInfo":{"pageCategory":"","pageviewId":"","referrerUri":"","uri":""},"panel":{"displayName":"","panelId":"","panelPosition":0,"totalPanels":0},"promotionIds":[],"searchInfo":{"offset":0,"orderBy":"","searchQuery":""},"sessionId":"","tagIds":[],"transactionInfo":{"cost":"","currency":"","discountValue":"","tax":"","transactionId":"","value":""},"userInfo":{"userAgent":"","userId":""},"userPseudoId":""}'
};

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": @{  },
                              @"attributionToken": @"",
                              @"completionInfo": @{ @"selectedPosition": @0, @"selectedSuggestion": @"" },
                              @"directUserRequest": @NO,
                              @"documents": @[ @{ @"id": @"", @"name": @"", @"promotionIds": @[  ], @"quantity": @0 } ],
                              @"eventTime": @"",
                              @"eventType": @"",
                              @"filter": @"",
                              @"mediaInfo": @{ @"mediaProgressDuration": @"", @"mediaProgressPercentage": @"" },
                              @"pageInfo": @{ @"pageCategory": @"", @"pageviewId": @"", @"referrerUri": @"", @"uri": @"" },
                              @"panel": @{ @"displayName": @"", @"panelId": @"", @"panelPosition": @0, @"totalPanels": @0 },
                              @"promotionIds": @[  ],
                              @"searchInfo": @{ @"offset": @0, @"orderBy": @"", @"searchQuery": @"" },
                              @"sessionId": @"",
                              @"tagIds": @[  ],
                              @"transactionInfo": @{ @"cost": @"", @"currency": @"", @"discountValue": @"", @"tax": @"", @"transactionId": @"", @"value": @"" },
                              @"userInfo": @{ @"userAgent": @"", @"userId": @"" },
                              @"userPseudoId": @"" };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1beta/:parent/userEvents:write"]
                                                       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}}/v1beta/:parent/userEvents:write" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n  \"attributes\": {},\n  \"attributionToken\": \"\",\n  \"completionInfo\": {\n    \"selectedPosition\": 0,\n    \"selectedSuggestion\": \"\"\n  },\n  \"directUserRequest\": false,\n  \"documents\": [\n    {\n      \"id\": \"\",\n      \"name\": \"\",\n      \"promotionIds\": [],\n      \"quantity\": 0\n    }\n  ],\n  \"eventTime\": \"\",\n  \"eventType\": \"\",\n  \"filter\": \"\",\n  \"mediaInfo\": {\n    \"mediaProgressDuration\": \"\",\n    \"mediaProgressPercentage\": \"\"\n  },\n  \"pageInfo\": {\n    \"pageCategory\": \"\",\n    \"pageviewId\": \"\",\n    \"referrerUri\": \"\",\n    \"uri\": \"\"\n  },\n  \"panel\": {\n    \"displayName\": \"\",\n    \"panelId\": \"\",\n    \"panelPosition\": 0,\n    \"totalPanels\": 0\n  },\n  \"promotionIds\": [],\n  \"searchInfo\": {\n    \"offset\": 0,\n    \"orderBy\": \"\",\n    \"searchQuery\": \"\"\n  },\n  \"sessionId\": \"\",\n  \"tagIds\": [],\n  \"transactionInfo\": {\n    \"cost\": \"\",\n    \"currency\": \"\",\n    \"discountValue\": \"\",\n    \"tax\": \"\",\n    \"transactionId\": \"\",\n    \"value\": \"\"\n  },\n  \"userInfo\": {\n    \"userAgent\": \"\",\n    \"userId\": \"\"\n  },\n  \"userPseudoId\": \"\"\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/v1beta/:parent/userEvents:write",
  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' => [
        
    ],
    'attributionToken' => '',
    'completionInfo' => [
        'selectedPosition' => 0,
        'selectedSuggestion' => ''
    ],
    'directUserRequest' => null,
    'documents' => [
        [
                'id' => '',
                'name' => '',
                'promotionIds' => [
                                
                ],
                'quantity' => 0
        ]
    ],
    'eventTime' => '',
    'eventType' => '',
    'filter' => '',
    'mediaInfo' => [
        'mediaProgressDuration' => '',
        'mediaProgressPercentage' => ''
    ],
    'pageInfo' => [
        'pageCategory' => '',
        'pageviewId' => '',
        'referrerUri' => '',
        'uri' => ''
    ],
    'panel' => [
        'displayName' => '',
        'panelId' => '',
        'panelPosition' => 0,
        'totalPanels' => 0
    ],
    'promotionIds' => [
        
    ],
    'searchInfo' => [
        'offset' => 0,
        'orderBy' => '',
        'searchQuery' => ''
    ],
    'sessionId' => '',
    'tagIds' => [
        
    ],
    'transactionInfo' => [
        'cost' => '',
        'currency' => '',
        'discountValue' => '',
        'tax' => '',
        'transactionId' => '',
        'value' => ''
    ],
    'userInfo' => [
        'userAgent' => '',
        'userId' => ''
    ],
    'userPseudoId' => ''
  ]),
  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}}/v1beta/:parent/userEvents:write', [
  'body' => '{
  "attributes": {},
  "attributionToken": "",
  "completionInfo": {
    "selectedPosition": 0,
    "selectedSuggestion": ""
  },
  "directUserRequest": false,
  "documents": [
    {
      "id": "",
      "name": "",
      "promotionIds": [],
      "quantity": 0
    }
  ],
  "eventTime": "",
  "eventType": "",
  "filter": "",
  "mediaInfo": {
    "mediaProgressDuration": "",
    "mediaProgressPercentage": ""
  },
  "pageInfo": {
    "pageCategory": "",
    "pageviewId": "",
    "referrerUri": "",
    "uri": ""
  },
  "panel": {
    "displayName": "",
    "panelId": "",
    "panelPosition": 0,
    "totalPanels": 0
  },
  "promotionIds": [],
  "searchInfo": {
    "offset": 0,
    "orderBy": "",
    "searchQuery": ""
  },
  "sessionId": "",
  "tagIds": [],
  "transactionInfo": {
    "cost": "",
    "currency": "",
    "discountValue": "",
    "tax": "",
    "transactionId": "",
    "value": ""
  },
  "userInfo": {
    "userAgent": "",
    "userId": ""
  },
  "userPseudoId": ""
}',
  'headers' => [
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/v1beta/:parent/userEvents:write');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'attributes' => [
    
  ],
  'attributionToken' => '',
  'completionInfo' => [
    'selectedPosition' => 0,
    'selectedSuggestion' => ''
  ],
  'directUserRequest' => null,
  'documents' => [
    [
        'id' => '',
        'name' => '',
        'promotionIds' => [
                
        ],
        'quantity' => 0
    ]
  ],
  'eventTime' => '',
  'eventType' => '',
  'filter' => '',
  'mediaInfo' => [
    'mediaProgressDuration' => '',
    'mediaProgressPercentage' => ''
  ],
  'pageInfo' => [
    'pageCategory' => '',
    'pageviewId' => '',
    'referrerUri' => '',
    'uri' => ''
  ],
  'panel' => [
    'displayName' => '',
    'panelId' => '',
    'panelPosition' => 0,
    'totalPanels' => 0
  ],
  'promotionIds' => [
    
  ],
  'searchInfo' => [
    'offset' => 0,
    'orderBy' => '',
    'searchQuery' => ''
  ],
  'sessionId' => '',
  'tagIds' => [
    
  ],
  'transactionInfo' => [
    'cost' => '',
    'currency' => '',
    'discountValue' => '',
    'tax' => '',
    'transactionId' => '',
    'value' => ''
  ],
  'userInfo' => [
    'userAgent' => '',
    'userId' => ''
  ],
  'userPseudoId' => ''
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'attributes' => [
    
  ],
  'attributionToken' => '',
  'completionInfo' => [
    'selectedPosition' => 0,
    'selectedSuggestion' => ''
  ],
  'directUserRequest' => null,
  'documents' => [
    [
        'id' => '',
        'name' => '',
        'promotionIds' => [
                
        ],
        'quantity' => 0
    ]
  ],
  'eventTime' => '',
  'eventType' => '',
  'filter' => '',
  'mediaInfo' => [
    'mediaProgressDuration' => '',
    'mediaProgressPercentage' => ''
  ],
  'pageInfo' => [
    'pageCategory' => '',
    'pageviewId' => '',
    'referrerUri' => '',
    'uri' => ''
  ],
  'panel' => [
    'displayName' => '',
    'panelId' => '',
    'panelPosition' => 0,
    'totalPanels' => 0
  ],
  'promotionIds' => [
    
  ],
  'searchInfo' => [
    'offset' => 0,
    'orderBy' => '',
    'searchQuery' => ''
  ],
  'sessionId' => '',
  'tagIds' => [
    
  ],
  'transactionInfo' => [
    'cost' => '',
    'currency' => '',
    'discountValue' => '',
    'tax' => '',
    'transactionId' => '',
    'value' => ''
  ],
  'userInfo' => [
    'userAgent' => '',
    'userId' => ''
  ],
  'userPseudoId' => ''
]));
$request->setRequestUrl('{{baseUrl}}/v1beta/:parent/userEvents:write');
$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}}/v1beta/:parent/userEvents:write' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "attributes": {},
  "attributionToken": "",
  "completionInfo": {
    "selectedPosition": 0,
    "selectedSuggestion": ""
  },
  "directUserRequest": false,
  "documents": [
    {
      "id": "",
      "name": "",
      "promotionIds": [],
      "quantity": 0
    }
  ],
  "eventTime": "",
  "eventType": "",
  "filter": "",
  "mediaInfo": {
    "mediaProgressDuration": "",
    "mediaProgressPercentage": ""
  },
  "pageInfo": {
    "pageCategory": "",
    "pageviewId": "",
    "referrerUri": "",
    "uri": ""
  },
  "panel": {
    "displayName": "",
    "panelId": "",
    "panelPosition": 0,
    "totalPanels": 0
  },
  "promotionIds": [],
  "searchInfo": {
    "offset": 0,
    "orderBy": "",
    "searchQuery": ""
  },
  "sessionId": "",
  "tagIds": [],
  "transactionInfo": {
    "cost": "",
    "currency": "",
    "discountValue": "",
    "tax": "",
    "transactionId": "",
    "value": ""
  },
  "userInfo": {
    "userAgent": "",
    "userId": ""
  },
  "userPseudoId": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1beta/:parent/userEvents:write' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "attributes": {},
  "attributionToken": "",
  "completionInfo": {
    "selectedPosition": 0,
    "selectedSuggestion": ""
  },
  "directUserRequest": false,
  "documents": [
    {
      "id": "",
      "name": "",
      "promotionIds": [],
      "quantity": 0
    }
  ],
  "eventTime": "",
  "eventType": "",
  "filter": "",
  "mediaInfo": {
    "mediaProgressDuration": "",
    "mediaProgressPercentage": ""
  },
  "pageInfo": {
    "pageCategory": "",
    "pageviewId": "",
    "referrerUri": "",
    "uri": ""
  },
  "panel": {
    "displayName": "",
    "panelId": "",
    "panelPosition": 0,
    "totalPanels": 0
  },
  "promotionIds": [],
  "searchInfo": {
    "offset": 0,
    "orderBy": "",
    "searchQuery": ""
  },
  "sessionId": "",
  "tagIds": [],
  "transactionInfo": {
    "cost": "",
    "currency": "",
    "discountValue": "",
    "tax": "",
    "transactionId": "",
    "value": ""
  },
  "userInfo": {
    "userAgent": "",
    "userId": ""
  },
  "userPseudoId": ""
}'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "{\n  \"attributes\": {},\n  \"attributionToken\": \"\",\n  \"completionInfo\": {\n    \"selectedPosition\": 0,\n    \"selectedSuggestion\": \"\"\n  },\n  \"directUserRequest\": false,\n  \"documents\": [\n    {\n      \"id\": \"\",\n      \"name\": \"\",\n      \"promotionIds\": [],\n      \"quantity\": 0\n    }\n  ],\n  \"eventTime\": \"\",\n  \"eventType\": \"\",\n  \"filter\": \"\",\n  \"mediaInfo\": {\n    \"mediaProgressDuration\": \"\",\n    \"mediaProgressPercentage\": \"\"\n  },\n  \"pageInfo\": {\n    \"pageCategory\": \"\",\n    \"pageviewId\": \"\",\n    \"referrerUri\": \"\",\n    \"uri\": \"\"\n  },\n  \"panel\": {\n    \"displayName\": \"\",\n    \"panelId\": \"\",\n    \"panelPosition\": 0,\n    \"totalPanels\": 0\n  },\n  \"promotionIds\": [],\n  \"searchInfo\": {\n    \"offset\": 0,\n    \"orderBy\": \"\",\n    \"searchQuery\": \"\"\n  },\n  \"sessionId\": \"\",\n  \"tagIds\": [],\n  \"transactionInfo\": {\n    \"cost\": \"\",\n    \"currency\": \"\",\n    \"discountValue\": \"\",\n    \"tax\": \"\",\n    \"transactionId\": \"\",\n    \"value\": \"\"\n  },\n  \"userInfo\": {\n    \"userAgent\": \"\",\n    \"userId\": \"\"\n  },\n  \"userPseudoId\": \"\"\n}"

headers = { 'content-type': "application/json" }

conn.request("POST", "/baseUrl/v1beta/:parent/userEvents:write", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/v1beta/:parent/userEvents:write"

payload = {
    "attributes": {},
    "attributionToken": "",
    "completionInfo": {
        "selectedPosition": 0,
        "selectedSuggestion": ""
    },
    "directUserRequest": False,
    "documents": [
        {
            "id": "",
            "name": "",
            "promotionIds": [],
            "quantity": 0
        }
    ],
    "eventTime": "",
    "eventType": "",
    "filter": "",
    "mediaInfo": {
        "mediaProgressDuration": "",
        "mediaProgressPercentage": ""
    },
    "pageInfo": {
        "pageCategory": "",
        "pageviewId": "",
        "referrerUri": "",
        "uri": ""
    },
    "panel": {
        "displayName": "",
        "panelId": "",
        "panelPosition": 0,
        "totalPanels": 0
    },
    "promotionIds": [],
    "searchInfo": {
        "offset": 0,
        "orderBy": "",
        "searchQuery": ""
    },
    "sessionId": "",
    "tagIds": [],
    "transactionInfo": {
        "cost": "",
        "currency": "",
        "discountValue": "",
        "tax": "",
        "transactionId": "",
        "value": ""
    },
    "userInfo": {
        "userAgent": "",
        "userId": ""
    },
    "userPseudoId": ""
}
headers = {"content-type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/v1beta/:parent/userEvents:write"

payload <- "{\n  \"attributes\": {},\n  \"attributionToken\": \"\",\n  \"completionInfo\": {\n    \"selectedPosition\": 0,\n    \"selectedSuggestion\": \"\"\n  },\n  \"directUserRequest\": false,\n  \"documents\": [\n    {\n      \"id\": \"\",\n      \"name\": \"\",\n      \"promotionIds\": [],\n      \"quantity\": 0\n    }\n  ],\n  \"eventTime\": \"\",\n  \"eventType\": \"\",\n  \"filter\": \"\",\n  \"mediaInfo\": {\n    \"mediaProgressDuration\": \"\",\n    \"mediaProgressPercentage\": \"\"\n  },\n  \"pageInfo\": {\n    \"pageCategory\": \"\",\n    \"pageviewId\": \"\",\n    \"referrerUri\": \"\",\n    \"uri\": \"\"\n  },\n  \"panel\": {\n    \"displayName\": \"\",\n    \"panelId\": \"\",\n    \"panelPosition\": 0,\n    \"totalPanels\": 0\n  },\n  \"promotionIds\": [],\n  \"searchInfo\": {\n    \"offset\": 0,\n    \"orderBy\": \"\",\n    \"searchQuery\": \"\"\n  },\n  \"sessionId\": \"\",\n  \"tagIds\": [],\n  \"transactionInfo\": {\n    \"cost\": \"\",\n    \"currency\": \"\",\n    \"discountValue\": \"\",\n    \"tax\": \"\",\n    \"transactionId\": \"\",\n    \"value\": \"\"\n  },\n  \"userInfo\": {\n    \"userAgent\": \"\",\n    \"userId\": \"\"\n  },\n  \"userPseudoId\": \"\"\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}}/v1beta/:parent/userEvents:write")

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  \"attributionToken\": \"\",\n  \"completionInfo\": {\n    \"selectedPosition\": 0,\n    \"selectedSuggestion\": \"\"\n  },\n  \"directUserRequest\": false,\n  \"documents\": [\n    {\n      \"id\": \"\",\n      \"name\": \"\",\n      \"promotionIds\": [],\n      \"quantity\": 0\n    }\n  ],\n  \"eventTime\": \"\",\n  \"eventType\": \"\",\n  \"filter\": \"\",\n  \"mediaInfo\": {\n    \"mediaProgressDuration\": \"\",\n    \"mediaProgressPercentage\": \"\"\n  },\n  \"pageInfo\": {\n    \"pageCategory\": \"\",\n    \"pageviewId\": \"\",\n    \"referrerUri\": \"\",\n    \"uri\": \"\"\n  },\n  \"panel\": {\n    \"displayName\": \"\",\n    \"panelId\": \"\",\n    \"panelPosition\": 0,\n    \"totalPanels\": 0\n  },\n  \"promotionIds\": [],\n  \"searchInfo\": {\n    \"offset\": 0,\n    \"orderBy\": \"\",\n    \"searchQuery\": \"\"\n  },\n  \"sessionId\": \"\",\n  \"tagIds\": [],\n  \"transactionInfo\": {\n    \"cost\": \"\",\n    \"currency\": \"\",\n    \"discountValue\": \"\",\n    \"tax\": \"\",\n    \"transactionId\": \"\",\n    \"value\": \"\"\n  },\n  \"userInfo\": {\n    \"userAgent\": \"\",\n    \"userId\": \"\"\n  },\n  \"userPseudoId\": \"\"\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/v1beta/:parent/userEvents:write') do |req|
  req.body = "{\n  \"attributes\": {},\n  \"attributionToken\": \"\",\n  \"completionInfo\": {\n    \"selectedPosition\": 0,\n    \"selectedSuggestion\": \"\"\n  },\n  \"directUserRequest\": false,\n  \"documents\": [\n    {\n      \"id\": \"\",\n      \"name\": \"\",\n      \"promotionIds\": [],\n      \"quantity\": 0\n    }\n  ],\n  \"eventTime\": \"\",\n  \"eventType\": \"\",\n  \"filter\": \"\",\n  \"mediaInfo\": {\n    \"mediaProgressDuration\": \"\",\n    \"mediaProgressPercentage\": \"\"\n  },\n  \"pageInfo\": {\n    \"pageCategory\": \"\",\n    \"pageviewId\": \"\",\n    \"referrerUri\": \"\",\n    \"uri\": \"\"\n  },\n  \"panel\": {\n    \"displayName\": \"\",\n    \"panelId\": \"\",\n    \"panelPosition\": 0,\n    \"totalPanels\": 0\n  },\n  \"promotionIds\": [],\n  \"searchInfo\": {\n    \"offset\": 0,\n    \"orderBy\": \"\",\n    \"searchQuery\": \"\"\n  },\n  \"sessionId\": \"\",\n  \"tagIds\": [],\n  \"transactionInfo\": {\n    \"cost\": \"\",\n    \"currency\": \"\",\n    \"discountValue\": \"\",\n    \"tax\": \"\",\n    \"transactionId\": \"\",\n    \"value\": \"\"\n  },\n  \"userInfo\": {\n    \"userAgent\": \"\",\n    \"userId\": \"\"\n  },\n  \"userPseudoId\": \"\"\n}"
end

puts response.status
puts response.body
use serde_json::json;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/v1beta/:parent/userEvents:write";

    let payload = json!({
        "attributes": json!({}),
        "attributionToken": "",
        "completionInfo": json!({
            "selectedPosition": 0,
            "selectedSuggestion": ""
        }),
        "directUserRequest": false,
        "documents": (
            json!({
                "id": "",
                "name": "",
                "promotionIds": (),
                "quantity": 0
            })
        ),
        "eventTime": "",
        "eventType": "",
        "filter": "",
        "mediaInfo": json!({
            "mediaProgressDuration": "",
            "mediaProgressPercentage": ""
        }),
        "pageInfo": json!({
            "pageCategory": "",
            "pageviewId": "",
            "referrerUri": "",
            "uri": ""
        }),
        "panel": json!({
            "displayName": "",
            "panelId": "",
            "panelPosition": 0,
            "totalPanels": 0
        }),
        "promotionIds": (),
        "searchInfo": json!({
            "offset": 0,
            "orderBy": "",
            "searchQuery": ""
        }),
        "sessionId": "",
        "tagIds": (),
        "transactionInfo": json!({
            "cost": "",
            "currency": "",
            "discountValue": "",
            "tax": "",
            "transactionId": "",
            "value": ""
        }),
        "userInfo": json!({
            "userAgent": "",
            "userId": ""
        }),
        "userPseudoId": ""
    });

    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}}/v1beta/:parent/userEvents:write \
  --header 'content-type: application/json' \
  --data '{
  "attributes": {},
  "attributionToken": "",
  "completionInfo": {
    "selectedPosition": 0,
    "selectedSuggestion": ""
  },
  "directUserRequest": false,
  "documents": [
    {
      "id": "",
      "name": "",
      "promotionIds": [],
      "quantity": 0
    }
  ],
  "eventTime": "",
  "eventType": "",
  "filter": "",
  "mediaInfo": {
    "mediaProgressDuration": "",
    "mediaProgressPercentage": ""
  },
  "pageInfo": {
    "pageCategory": "",
    "pageviewId": "",
    "referrerUri": "",
    "uri": ""
  },
  "panel": {
    "displayName": "",
    "panelId": "",
    "panelPosition": 0,
    "totalPanels": 0
  },
  "promotionIds": [],
  "searchInfo": {
    "offset": 0,
    "orderBy": "",
    "searchQuery": ""
  },
  "sessionId": "",
  "tagIds": [],
  "transactionInfo": {
    "cost": "",
    "currency": "",
    "discountValue": "",
    "tax": "",
    "transactionId": "",
    "value": ""
  },
  "userInfo": {
    "userAgent": "",
    "userId": ""
  },
  "userPseudoId": ""
}'
echo '{
  "attributes": {},
  "attributionToken": "",
  "completionInfo": {
    "selectedPosition": 0,
    "selectedSuggestion": ""
  },
  "directUserRequest": false,
  "documents": [
    {
      "id": "",
      "name": "",
      "promotionIds": [],
      "quantity": 0
    }
  ],
  "eventTime": "",
  "eventType": "",
  "filter": "",
  "mediaInfo": {
    "mediaProgressDuration": "",
    "mediaProgressPercentage": ""
  },
  "pageInfo": {
    "pageCategory": "",
    "pageviewId": "",
    "referrerUri": "",
    "uri": ""
  },
  "panel": {
    "displayName": "",
    "panelId": "",
    "panelPosition": 0,
    "totalPanels": 0
  },
  "promotionIds": [],
  "searchInfo": {
    "offset": 0,
    "orderBy": "",
    "searchQuery": ""
  },
  "sessionId": "",
  "tagIds": [],
  "transactionInfo": {
    "cost": "",
    "currency": "",
    "discountValue": "",
    "tax": "",
    "transactionId": "",
    "value": ""
  },
  "userInfo": {
    "userAgent": "",
    "userId": ""
  },
  "userPseudoId": ""
}' |  \
  http POST {{baseUrl}}/v1beta/:parent/userEvents:write \
  content-type:application/json
wget --quiet \
  --method POST \
  --header 'content-type: application/json' \
  --body-data '{\n  "attributes": {},\n  "attributionToken": "",\n  "completionInfo": {\n    "selectedPosition": 0,\n    "selectedSuggestion": ""\n  },\n  "directUserRequest": false,\n  "documents": [\n    {\n      "id": "",\n      "name": "",\n      "promotionIds": [],\n      "quantity": 0\n    }\n  ],\n  "eventTime": "",\n  "eventType": "",\n  "filter": "",\n  "mediaInfo": {\n    "mediaProgressDuration": "",\n    "mediaProgressPercentage": ""\n  },\n  "pageInfo": {\n    "pageCategory": "",\n    "pageviewId": "",\n    "referrerUri": "",\n    "uri": ""\n  },\n  "panel": {\n    "displayName": "",\n    "panelId": "",\n    "panelPosition": 0,\n    "totalPanels": 0\n  },\n  "promotionIds": [],\n  "searchInfo": {\n    "offset": 0,\n    "orderBy": "",\n    "searchQuery": ""\n  },\n  "sessionId": "",\n  "tagIds": [],\n  "transactionInfo": {\n    "cost": "",\n    "currency": "",\n    "discountValue": "",\n    "tax": "",\n    "transactionId": "",\n    "value": ""\n  },\n  "userInfo": {\n    "userAgent": "",\n    "userId": ""\n  },\n  "userPseudoId": ""\n}' \
  --output-document \
  - {{baseUrl}}/v1beta/:parent/userEvents:write
import Foundation

let headers = ["content-type": "application/json"]
let parameters = [
  "attributes": [],
  "attributionToken": "",
  "completionInfo": [
    "selectedPosition": 0,
    "selectedSuggestion": ""
  ],
  "directUserRequest": false,
  "documents": [
    [
      "id": "",
      "name": "",
      "promotionIds": [],
      "quantity": 0
    ]
  ],
  "eventTime": "",
  "eventType": "",
  "filter": "",
  "mediaInfo": [
    "mediaProgressDuration": "",
    "mediaProgressPercentage": ""
  ],
  "pageInfo": [
    "pageCategory": "",
    "pageviewId": "",
    "referrerUri": "",
    "uri": ""
  ],
  "panel": [
    "displayName": "",
    "panelId": "",
    "panelPosition": 0,
    "totalPanels": 0
  ],
  "promotionIds": [],
  "searchInfo": [
    "offset": 0,
    "orderBy": "",
    "searchQuery": ""
  ],
  "sessionId": "",
  "tagIds": [],
  "transactionInfo": [
    "cost": "",
    "currency": "",
    "discountValue": "",
    "tax": "",
    "transactionId": "",
    "value": ""
  ],
  "userInfo": [
    "userAgent": "",
    "userId": ""
  ],
  "userPseudoId": ""
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1beta/:parent/userEvents:write")! 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 discoveryengine.projects.operations.get
{{baseUrl}}/v1beta/: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}}/v1beta/:name");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/get "{{baseUrl}}/v1beta/:name")
require "http/client"

url = "{{baseUrl}}/v1beta/: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}}/v1beta/:name"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1beta/:name");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/v1beta/: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/v1beta/:name HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1beta/:name")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/v1beta/: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}}/v1beta/:name")
  .get()
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1beta/: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}}/v1beta/:name');

xhr.send(data);
import axios from 'axios';

const options = {method: 'GET', url: '{{baseUrl}}/v1beta/:name'};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/v1beta/: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}}/v1beta/:name',
  method: 'GET',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/v1beta/:name")
  .get()
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/v1beta/: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}}/v1beta/: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}}/v1beta/: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}}/v1beta/:name'};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/v1beta/: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}}/v1beta/: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}}/v1beta/:name" in

Client.call `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/v1beta/: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}}/v1beta/:name');

echo $response->getBody();
setUrl('{{baseUrl}}/v1beta/:name');
$request->setMethod(HTTP_METH_GET);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/v1beta/:name');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1beta/:name' -Method GET 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1beta/:name' -Method GET 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("GET", "/baseUrl/v1beta/:name")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/v1beta/:name"

response = requests.get(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/v1beta/:name"

response <- VERB("GET", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/v1beta/: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/v1beta/:name') do |req|
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/v1beta/: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}}/v1beta/:name
http GET {{baseUrl}}/v1beta/:name
wget --quiet \
  --method GET \
  --output-document \
  - {{baseUrl}}/v1beta/:name
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1beta/: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 discoveryengine.projects.operations.list
{{baseUrl}}/v1beta/: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}}/v1beta/:name/operations");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/get "{{baseUrl}}/v1beta/:name/operations")
require "http/client"

url = "{{baseUrl}}/v1beta/: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}}/v1beta/: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}}/v1beta/:name/operations");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/v1beta/: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/v1beta/:name/operations HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1beta/:name/operations")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/v1beta/: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}}/v1beta/:name/operations")
  .get()
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1beta/: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}}/v1beta/:name/operations');

xhr.send(data);
import axios from 'axios';

const options = {method: 'GET', url: '{{baseUrl}}/v1beta/:name/operations'};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/v1beta/: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}}/v1beta/:name/operations',
  method: 'GET',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/v1beta/: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/v1beta/: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}}/v1beta/: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}}/v1beta/: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}}/v1beta/: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}}/v1beta/: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}}/v1beta/: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}}/v1beta/:name/operations" in

Client.call `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/v1beta/: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}}/v1beta/:name/operations');

echo $response->getBody();
setUrl('{{baseUrl}}/v1beta/:name/operations');
$request->setMethod(HTTP_METH_GET);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/v1beta/:name/operations');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1beta/:name/operations' -Method GET 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1beta/:name/operations' -Method GET 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("GET", "/baseUrl/v1beta/:name/operations")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/v1beta/:name/operations"

response = requests.get(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/v1beta/:name/operations"

response <- VERB("GET", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/v1beta/: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/v1beta/:name/operations') do |req|
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/v1beta/: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}}/v1beta/:name/operations
http GET {{baseUrl}}/v1beta/:name/operations
wget --quiet \
  --method GET \
  --output-document \
  - {{baseUrl}}/v1beta/:name/operations
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1beta/: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()