Google Vault API
POST
vault.matters.addPermissions
{{baseUrl}}/v1/matters/:matterId:addPermissions
QUERY PARAMS
matterId
BODY json
{
"ccMe": false,
"matterPermission": {
"accountId": "",
"role": ""
},
"sendEmails": false
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/matters/:matterId:addPermissions");
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 \"ccMe\": false,\n \"matterPermission\": {\n \"accountId\": \"\",\n \"role\": \"\"\n },\n \"sendEmails\": false\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1/matters/:matterId:addPermissions" {:content-type :json
:form-params {:ccMe false
:matterPermission {:accountId ""
:role ""}
:sendEmails false}})
require "http/client"
url = "{{baseUrl}}/v1/matters/:matterId:addPermissions"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"ccMe\": false,\n \"matterPermission\": {\n \"accountId\": \"\",\n \"role\": \"\"\n },\n \"sendEmails\": 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}}/v1/matters/:matterId:addPermissions"),
Content = new StringContent("{\n \"ccMe\": false,\n \"matterPermission\": {\n \"accountId\": \"\",\n \"role\": \"\"\n },\n \"sendEmails\": 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}}/v1/matters/:matterId:addPermissions");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"ccMe\": false,\n \"matterPermission\": {\n \"accountId\": \"\",\n \"role\": \"\"\n },\n \"sendEmails\": false\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/matters/:matterId:addPermissions"
payload := strings.NewReader("{\n \"ccMe\": false,\n \"matterPermission\": {\n \"accountId\": \"\",\n \"role\": \"\"\n },\n \"sendEmails\": 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/v1/matters/:matterId:addPermissions HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 107
{
"ccMe": false,
"matterPermission": {
"accountId": "",
"role": ""
},
"sendEmails": false
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1/matters/:matterId:addPermissions")
.setHeader("content-type", "application/json")
.setBody("{\n \"ccMe\": false,\n \"matterPermission\": {\n \"accountId\": \"\",\n \"role\": \"\"\n },\n \"sendEmails\": false\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/matters/:matterId:addPermissions"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"ccMe\": false,\n \"matterPermission\": {\n \"accountId\": \"\",\n \"role\": \"\"\n },\n \"sendEmails\": 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 \"ccMe\": false,\n \"matterPermission\": {\n \"accountId\": \"\",\n \"role\": \"\"\n },\n \"sendEmails\": false\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/matters/:matterId:addPermissions")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1/matters/:matterId:addPermissions")
.header("content-type", "application/json")
.body("{\n \"ccMe\": false,\n \"matterPermission\": {\n \"accountId\": \"\",\n \"role\": \"\"\n },\n \"sendEmails\": false\n}")
.asString();
const data = JSON.stringify({
ccMe: false,
matterPermission: {
accountId: '',
role: ''
},
sendEmails: 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}}/v1/matters/:matterId:addPermissions');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/matters/:matterId:addPermissions',
headers: {'content-type': 'application/json'},
data: {ccMe: false, matterPermission: {accountId: '', role: ''}, sendEmails: false}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/matters/:matterId:addPermissions';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"ccMe":false,"matterPermission":{"accountId":"","role":""},"sendEmails":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}}/v1/matters/:matterId:addPermissions',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "ccMe": false,\n "matterPermission": {\n "accountId": "",\n "role": ""\n },\n "sendEmails": 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 \"ccMe\": false,\n \"matterPermission\": {\n \"accountId\": \"\",\n \"role\": \"\"\n },\n \"sendEmails\": false\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1/matters/:matterId:addPermissions")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/matters/:matterId:addPermissions',
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({ccMe: false, matterPermission: {accountId: '', role: ''}, sendEmails: false}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/matters/:matterId:addPermissions',
headers: {'content-type': 'application/json'},
body: {ccMe: false, matterPermission: {accountId: '', role: ''}, sendEmails: 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}}/v1/matters/:matterId:addPermissions');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
ccMe: false,
matterPermission: {
accountId: '',
role: ''
},
sendEmails: 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}}/v1/matters/:matterId:addPermissions',
headers: {'content-type': 'application/json'},
data: {ccMe: false, matterPermission: {accountId: '', role: ''}, sendEmails: false}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/matters/:matterId:addPermissions';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"ccMe":false,"matterPermission":{"accountId":"","role":""},"sendEmails":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 = @{ @"ccMe": @NO,
@"matterPermission": @{ @"accountId": @"", @"role": @"" },
@"sendEmails": @NO };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/matters/:matterId:addPermissions"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/matters/:matterId:addPermissions" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"ccMe\": false,\n \"matterPermission\": {\n \"accountId\": \"\",\n \"role\": \"\"\n },\n \"sendEmails\": false\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/matters/:matterId:addPermissions",
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([
'ccMe' => null,
'matterPermission' => [
'accountId' => '',
'role' => ''
],
'sendEmails' => 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}}/v1/matters/:matterId:addPermissions', [
'body' => '{
"ccMe": false,
"matterPermission": {
"accountId": "",
"role": ""
},
"sendEmails": false
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1/matters/:matterId:addPermissions');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'ccMe' => null,
'matterPermission' => [
'accountId' => '',
'role' => ''
],
'sendEmails' => null
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'ccMe' => null,
'matterPermission' => [
'accountId' => '',
'role' => ''
],
'sendEmails' => null
]));
$request->setRequestUrl('{{baseUrl}}/v1/matters/:matterId:addPermissions');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/matters/:matterId:addPermissions' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"ccMe": false,
"matterPermission": {
"accountId": "",
"role": ""
},
"sendEmails": false
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/matters/:matterId:addPermissions' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"ccMe": false,
"matterPermission": {
"accountId": "",
"role": ""
},
"sendEmails": false
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"ccMe\": false,\n \"matterPermission\": {\n \"accountId\": \"\",\n \"role\": \"\"\n },\n \"sendEmails\": false\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1/matters/:matterId:addPermissions", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/matters/:matterId:addPermissions"
payload = {
"ccMe": False,
"matterPermission": {
"accountId": "",
"role": ""
},
"sendEmails": False
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/matters/:matterId:addPermissions"
payload <- "{\n \"ccMe\": false,\n \"matterPermission\": {\n \"accountId\": \"\",\n \"role\": \"\"\n },\n \"sendEmails\": 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}}/v1/matters/:matterId:addPermissions")
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 \"ccMe\": false,\n \"matterPermission\": {\n \"accountId\": \"\",\n \"role\": \"\"\n },\n \"sendEmails\": 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/v1/matters/:matterId:addPermissions') do |req|
req.body = "{\n \"ccMe\": false,\n \"matterPermission\": {\n \"accountId\": \"\",\n \"role\": \"\"\n },\n \"sendEmails\": false\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/matters/:matterId:addPermissions";
let payload = json!({
"ccMe": false,
"matterPermission": json!({
"accountId": "",
"role": ""
}),
"sendEmails": 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}}/v1/matters/:matterId:addPermissions \
--header 'content-type: application/json' \
--data '{
"ccMe": false,
"matterPermission": {
"accountId": "",
"role": ""
},
"sendEmails": false
}'
echo '{
"ccMe": false,
"matterPermission": {
"accountId": "",
"role": ""
},
"sendEmails": false
}' | \
http POST {{baseUrl}}/v1/matters/:matterId:addPermissions \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "ccMe": false,\n "matterPermission": {\n "accountId": "",\n "role": ""\n },\n "sendEmails": false\n}' \
--output-document \
- {{baseUrl}}/v1/matters/:matterId:addPermissions
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"ccMe": false,
"matterPermission": [
"accountId": "",
"role": ""
],
"sendEmails": false
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/matters/:matterId:addPermissions")! 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
vault.matters.close
{{baseUrl}}/v1/matters/:matterId:close
QUERY PARAMS
matterId
BODY json
{}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/matters/:matterId:close");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1/matters/:matterId:close" {:content-type :json})
require "http/client"
url = "{{baseUrl}}/v1/matters/:matterId:close"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/v1/matters/:matterId:close"),
Content = new StringContent("{}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/matters/:matterId:close");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/matters/:matterId:close"
payload := strings.NewReader("{}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/v1/matters/:matterId:close HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 2
{}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1/matters/:matterId:close")
.setHeader("content-type", "application/json")
.setBody("{}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/matters/:matterId:close"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/matters/:matterId:close")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1/matters/:matterId:close")
.header("content-type", "application/json")
.body("{}")
.asString();
const data = JSON.stringify({});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v1/matters/:matterId:close');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/matters/:matterId:close',
headers: {'content-type': 'application/json'},
data: {}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/matters/:matterId:close';
const options = {method: 'POST', headers: {'content-type': 'application/json'}, body: '{}'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/matters/:matterId:close',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{}")
val request = Request.Builder()
.url("{{baseUrl}}/v1/matters/:matterId:close")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/matters/:matterId:close',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/matters/:matterId:close',
headers: {'content-type': 'application/json'},
body: {},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/v1/matters/:matterId:close');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/matters/:matterId:close',
headers: {'content-type': 'application/json'},
data: {}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/matters/:matterId:close';
const options = {method: 'POST', headers: {'content-type': 'application/json'}, body: '{}'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/matters/:matterId:close"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/matters/:matterId:close" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/matters/:matterId:close",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/v1/matters/:matterId:close', [
'body' => '{}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1/matters/:matterId:close');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
]));
$request->setRequestUrl('{{baseUrl}}/v1/matters/:matterId:close');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/matters/:matterId:close' -Method POST -Headers $headers -ContentType 'application/json' -Body '{}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/matters/:matterId:close' -Method POST -Headers $headers -ContentType 'application/json' -Body '{}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1/matters/:matterId:close", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/matters/:matterId:close"
payload = {}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/matters/:matterId:close"
payload <- "{}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/matters/:matterId:close")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/v1/matters/:matterId:close') do |req|
req.body = "{}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/matters/:matterId:close";
let payload = json!({});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/v1/matters/:matterId:close \
--header 'content-type: application/json' \
--data '{}'
echo '{}' | \
http POST {{baseUrl}}/v1/matters/:matterId:close \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{}' \
--output-document \
- {{baseUrl}}/v1/matters/:matterId:close
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/matters/:matterId:close")! 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
vault.matters.count
{{baseUrl}}/v1/matters/:matterId:count
QUERY PARAMS
matterId
BODY json
{
"query": {
"accountInfo": {
"emails": []
},
"corpus": "",
"dataScope": "",
"driveOptions": {
"clientSideEncryptedOption": "",
"includeSharedDrives": false,
"includeTeamDrives": false,
"versionDate": ""
},
"endTime": "",
"hangoutsChatInfo": {
"roomId": []
},
"hangoutsChatOptions": {
"includeRooms": false
},
"mailOptions": {
"clientSideEncryptedOption": "",
"excludeDrafts": false
},
"method": "",
"orgUnitInfo": {
"orgUnitId": ""
},
"searchMethod": "",
"sharedDriveInfo": {
"sharedDriveIds": []
},
"sitesUrlInfo": {
"urls": []
},
"startTime": "",
"teamDriveInfo": {
"teamDriveIds": []
},
"terms": "",
"timeZone": "",
"voiceOptions": {
"coveredData": []
}
},
"view": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/matters/:matterId:count");
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 \"query\": {\n \"accountInfo\": {\n \"emails\": []\n },\n \"corpus\": \"\",\n \"dataScope\": \"\",\n \"driveOptions\": {\n \"clientSideEncryptedOption\": \"\",\n \"includeSharedDrives\": false,\n \"includeTeamDrives\": false,\n \"versionDate\": \"\"\n },\n \"endTime\": \"\",\n \"hangoutsChatInfo\": {\n \"roomId\": []\n },\n \"hangoutsChatOptions\": {\n \"includeRooms\": false\n },\n \"mailOptions\": {\n \"clientSideEncryptedOption\": \"\",\n \"excludeDrafts\": false\n },\n \"method\": \"\",\n \"orgUnitInfo\": {\n \"orgUnitId\": \"\"\n },\n \"searchMethod\": \"\",\n \"sharedDriveInfo\": {\n \"sharedDriveIds\": []\n },\n \"sitesUrlInfo\": {\n \"urls\": []\n },\n \"startTime\": \"\",\n \"teamDriveInfo\": {\n \"teamDriveIds\": []\n },\n \"terms\": \"\",\n \"timeZone\": \"\",\n \"voiceOptions\": {\n \"coveredData\": []\n }\n },\n \"view\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1/matters/:matterId:count" {:content-type :json
:form-params {:query {:accountInfo {:emails []}
:corpus ""
:dataScope ""
:driveOptions {:clientSideEncryptedOption ""
:includeSharedDrives false
:includeTeamDrives false
:versionDate ""}
:endTime ""
:hangoutsChatInfo {:roomId []}
:hangoutsChatOptions {:includeRooms false}
:mailOptions {:clientSideEncryptedOption ""
:excludeDrafts false}
:method ""
:orgUnitInfo {:orgUnitId ""}
:searchMethod ""
:sharedDriveInfo {:sharedDriveIds []}
:sitesUrlInfo {:urls []}
:startTime ""
:teamDriveInfo {:teamDriveIds []}
:terms ""
:timeZone ""
:voiceOptions {:coveredData []}}
:view ""}})
require "http/client"
url = "{{baseUrl}}/v1/matters/:matterId:count"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"query\": {\n \"accountInfo\": {\n \"emails\": []\n },\n \"corpus\": \"\",\n \"dataScope\": \"\",\n \"driveOptions\": {\n \"clientSideEncryptedOption\": \"\",\n \"includeSharedDrives\": false,\n \"includeTeamDrives\": false,\n \"versionDate\": \"\"\n },\n \"endTime\": \"\",\n \"hangoutsChatInfo\": {\n \"roomId\": []\n },\n \"hangoutsChatOptions\": {\n \"includeRooms\": false\n },\n \"mailOptions\": {\n \"clientSideEncryptedOption\": \"\",\n \"excludeDrafts\": false\n },\n \"method\": \"\",\n \"orgUnitInfo\": {\n \"orgUnitId\": \"\"\n },\n \"searchMethod\": \"\",\n \"sharedDriveInfo\": {\n \"sharedDriveIds\": []\n },\n \"sitesUrlInfo\": {\n \"urls\": []\n },\n \"startTime\": \"\",\n \"teamDriveInfo\": {\n \"teamDriveIds\": []\n },\n \"terms\": \"\",\n \"timeZone\": \"\",\n \"voiceOptions\": {\n \"coveredData\": []\n }\n },\n \"view\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/v1/matters/:matterId:count"),
Content = new StringContent("{\n \"query\": {\n \"accountInfo\": {\n \"emails\": []\n },\n \"corpus\": \"\",\n \"dataScope\": \"\",\n \"driveOptions\": {\n \"clientSideEncryptedOption\": \"\",\n \"includeSharedDrives\": false,\n \"includeTeamDrives\": false,\n \"versionDate\": \"\"\n },\n \"endTime\": \"\",\n \"hangoutsChatInfo\": {\n \"roomId\": []\n },\n \"hangoutsChatOptions\": {\n \"includeRooms\": false\n },\n \"mailOptions\": {\n \"clientSideEncryptedOption\": \"\",\n \"excludeDrafts\": false\n },\n \"method\": \"\",\n \"orgUnitInfo\": {\n \"orgUnitId\": \"\"\n },\n \"searchMethod\": \"\",\n \"sharedDriveInfo\": {\n \"sharedDriveIds\": []\n },\n \"sitesUrlInfo\": {\n \"urls\": []\n },\n \"startTime\": \"\",\n \"teamDriveInfo\": {\n \"teamDriveIds\": []\n },\n \"terms\": \"\",\n \"timeZone\": \"\",\n \"voiceOptions\": {\n \"coveredData\": []\n }\n },\n \"view\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/matters/:matterId:count");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"query\": {\n \"accountInfo\": {\n \"emails\": []\n },\n \"corpus\": \"\",\n \"dataScope\": \"\",\n \"driveOptions\": {\n \"clientSideEncryptedOption\": \"\",\n \"includeSharedDrives\": false,\n \"includeTeamDrives\": false,\n \"versionDate\": \"\"\n },\n \"endTime\": \"\",\n \"hangoutsChatInfo\": {\n \"roomId\": []\n },\n \"hangoutsChatOptions\": {\n \"includeRooms\": false\n },\n \"mailOptions\": {\n \"clientSideEncryptedOption\": \"\",\n \"excludeDrafts\": false\n },\n \"method\": \"\",\n \"orgUnitInfo\": {\n \"orgUnitId\": \"\"\n },\n \"searchMethod\": \"\",\n \"sharedDriveInfo\": {\n \"sharedDriveIds\": []\n },\n \"sitesUrlInfo\": {\n \"urls\": []\n },\n \"startTime\": \"\",\n \"teamDriveInfo\": {\n \"teamDriveIds\": []\n },\n \"terms\": \"\",\n \"timeZone\": \"\",\n \"voiceOptions\": {\n \"coveredData\": []\n }\n },\n \"view\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/matters/:matterId:count"
payload := strings.NewReader("{\n \"query\": {\n \"accountInfo\": {\n \"emails\": []\n },\n \"corpus\": \"\",\n \"dataScope\": \"\",\n \"driveOptions\": {\n \"clientSideEncryptedOption\": \"\",\n \"includeSharedDrives\": false,\n \"includeTeamDrives\": false,\n \"versionDate\": \"\"\n },\n \"endTime\": \"\",\n \"hangoutsChatInfo\": {\n \"roomId\": []\n },\n \"hangoutsChatOptions\": {\n \"includeRooms\": false\n },\n \"mailOptions\": {\n \"clientSideEncryptedOption\": \"\",\n \"excludeDrafts\": false\n },\n \"method\": \"\",\n \"orgUnitInfo\": {\n \"orgUnitId\": \"\"\n },\n \"searchMethod\": \"\",\n \"sharedDriveInfo\": {\n \"sharedDriveIds\": []\n },\n \"sitesUrlInfo\": {\n \"urls\": []\n },\n \"startTime\": \"\",\n \"teamDriveInfo\": {\n \"teamDriveIds\": []\n },\n \"terms\": \"\",\n \"timeZone\": \"\",\n \"voiceOptions\": {\n \"coveredData\": []\n }\n },\n \"view\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/v1/matters/:matterId:count HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 875
{
"query": {
"accountInfo": {
"emails": []
},
"corpus": "",
"dataScope": "",
"driveOptions": {
"clientSideEncryptedOption": "",
"includeSharedDrives": false,
"includeTeamDrives": false,
"versionDate": ""
},
"endTime": "",
"hangoutsChatInfo": {
"roomId": []
},
"hangoutsChatOptions": {
"includeRooms": false
},
"mailOptions": {
"clientSideEncryptedOption": "",
"excludeDrafts": false
},
"method": "",
"orgUnitInfo": {
"orgUnitId": ""
},
"searchMethod": "",
"sharedDriveInfo": {
"sharedDriveIds": []
},
"sitesUrlInfo": {
"urls": []
},
"startTime": "",
"teamDriveInfo": {
"teamDriveIds": []
},
"terms": "",
"timeZone": "",
"voiceOptions": {
"coveredData": []
}
},
"view": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1/matters/:matterId:count")
.setHeader("content-type", "application/json")
.setBody("{\n \"query\": {\n \"accountInfo\": {\n \"emails\": []\n },\n \"corpus\": \"\",\n \"dataScope\": \"\",\n \"driveOptions\": {\n \"clientSideEncryptedOption\": \"\",\n \"includeSharedDrives\": false,\n \"includeTeamDrives\": false,\n \"versionDate\": \"\"\n },\n \"endTime\": \"\",\n \"hangoutsChatInfo\": {\n \"roomId\": []\n },\n \"hangoutsChatOptions\": {\n \"includeRooms\": false\n },\n \"mailOptions\": {\n \"clientSideEncryptedOption\": \"\",\n \"excludeDrafts\": false\n },\n \"method\": \"\",\n \"orgUnitInfo\": {\n \"orgUnitId\": \"\"\n },\n \"searchMethod\": \"\",\n \"sharedDriveInfo\": {\n \"sharedDriveIds\": []\n },\n \"sitesUrlInfo\": {\n \"urls\": []\n },\n \"startTime\": \"\",\n \"teamDriveInfo\": {\n \"teamDriveIds\": []\n },\n \"terms\": \"\",\n \"timeZone\": \"\",\n \"voiceOptions\": {\n \"coveredData\": []\n }\n },\n \"view\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/matters/:matterId:count"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"query\": {\n \"accountInfo\": {\n \"emails\": []\n },\n \"corpus\": \"\",\n \"dataScope\": \"\",\n \"driveOptions\": {\n \"clientSideEncryptedOption\": \"\",\n \"includeSharedDrives\": false,\n \"includeTeamDrives\": false,\n \"versionDate\": \"\"\n },\n \"endTime\": \"\",\n \"hangoutsChatInfo\": {\n \"roomId\": []\n },\n \"hangoutsChatOptions\": {\n \"includeRooms\": false\n },\n \"mailOptions\": {\n \"clientSideEncryptedOption\": \"\",\n \"excludeDrafts\": false\n },\n \"method\": \"\",\n \"orgUnitInfo\": {\n \"orgUnitId\": \"\"\n },\n \"searchMethod\": \"\",\n \"sharedDriveInfo\": {\n \"sharedDriveIds\": []\n },\n \"sitesUrlInfo\": {\n \"urls\": []\n },\n \"startTime\": \"\",\n \"teamDriveInfo\": {\n \"teamDriveIds\": []\n },\n \"terms\": \"\",\n \"timeZone\": \"\",\n \"voiceOptions\": {\n \"coveredData\": []\n }\n },\n \"view\": \"\"\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 \"query\": {\n \"accountInfo\": {\n \"emails\": []\n },\n \"corpus\": \"\",\n \"dataScope\": \"\",\n \"driveOptions\": {\n \"clientSideEncryptedOption\": \"\",\n \"includeSharedDrives\": false,\n \"includeTeamDrives\": false,\n \"versionDate\": \"\"\n },\n \"endTime\": \"\",\n \"hangoutsChatInfo\": {\n \"roomId\": []\n },\n \"hangoutsChatOptions\": {\n \"includeRooms\": false\n },\n \"mailOptions\": {\n \"clientSideEncryptedOption\": \"\",\n \"excludeDrafts\": false\n },\n \"method\": \"\",\n \"orgUnitInfo\": {\n \"orgUnitId\": \"\"\n },\n \"searchMethod\": \"\",\n \"sharedDriveInfo\": {\n \"sharedDriveIds\": []\n },\n \"sitesUrlInfo\": {\n \"urls\": []\n },\n \"startTime\": \"\",\n \"teamDriveInfo\": {\n \"teamDriveIds\": []\n },\n \"terms\": \"\",\n \"timeZone\": \"\",\n \"voiceOptions\": {\n \"coveredData\": []\n }\n },\n \"view\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/matters/:matterId:count")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1/matters/:matterId:count")
.header("content-type", "application/json")
.body("{\n \"query\": {\n \"accountInfo\": {\n \"emails\": []\n },\n \"corpus\": \"\",\n \"dataScope\": \"\",\n \"driveOptions\": {\n \"clientSideEncryptedOption\": \"\",\n \"includeSharedDrives\": false,\n \"includeTeamDrives\": false,\n \"versionDate\": \"\"\n },\n \"endTime\": \"\",\n \"hangoutsChatInfo\": {\n \"roomId\": []\n },\n \"hangoutsChatOptions\": {\n \"includeRooms\": false\n },\n \"mailOptions\": {\n \"clientSideEncryptedOption\": \"\",\n \"excludeDrafts\": false\n },\n \"method\": \"\",\n \"orgUnitInfo\": {\n \"orgUnitId\": \"\"\n },\n \"searchMethod\": \"\",\n \"sharedDriveInfo\": {\n \"sharedDriveIds\": []\n },\n \"sitesUrlInfo\": {\n \"urls\": []\n },\n \"startTime\": \"\",\n \"teamDriveInfo\": {\n \"teamDriveIds\": []\n },\n \"terms\": \"\",\n \"timeZone\": \"\",\n \"voiceOptions\": {\n \"coveredData\": []\n }\n },\n \"view\": \"\"\n}")
.asString();
const data = JSON.stringify({
query: {
accountInfo: {
emails: []
},
corpus: '',
dataScope: '',
driveOptions: {
clientSideEncryptedOption: '',
includeSharedDrives: false,
includeTeamDrives: false,
versionDate: ''
},
endTime: '',
hangoutsChatInfo: {
roomId: []
},
hangoutsChatOptions: {
includeRooms: false
},
mailOptions: {
clientSideEncryptedOption: '',
excludeDrafts: false
},
method: '',
orgUnitInfo: {
orgUnitId: ''
},
searchMethod: '',
sharedDriveInfo: {
sharedDriveIds: []
},
sitesUrlInfo: {
urls: []
},
startTime: '',
teamDriveInfo: {
teamDriveIds: []
},
terms: '',
timeZone: '',
voiceOptions: {
coveredData: []
}
},
view: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v1/matters/:matterId:count');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/matters/:matterId:count',
headers: {'content-type': 'application/json'},
data: {
query: {
accountInfo: {emails: []},
corpus: '',
dataScope: '',
driveOptions: {
clientSideEncryptedOption: '',
includeSharedDrives: false,
includeTeamDrives: false,
versionDate: ''
},
endTime: '',
hangoutsChatInfo: {roomId: []},
hangoutsChatOptions: {includeRooms: false},
mailOptions: {clientSideEncryptedOption: '', excludeDrafts: false},
method: '',
orgUnitInfo: {orgUnitId: ''},
searchMethod: '',
sharedDriveInfo: {sharedDriveIds: []},
sitesUrlInfo: {urls: []},
startTime: '',
teamDriveInfo: {teamDriveIds: []},
terms: '',
timeZone: '',
voiceOptions: {coveredData: []}
},
view: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/matters/:matterId:count';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"query":{"accountInfo":{"emails":[]},"corpus":"","dataScope":"","driveOptions":{"clientSideEncryptedOption":"","includeSharedDrives":false,"includeTeamDrives":false,"versionDate":""},"endTime":"","hangoutsChatInfo":{"roomId":[]},"hangoutsChatOptions":{"includeRooms":false},"mailOptions":{"clientSideEncryptedOption":"","excludeDrafts":false},"method":"","orgUnitInfo":{"orgUnitId":""},"searchMethod":"","sharedDriveInfo":{"sharedDriveIds":[]},"sitesUrlInfo":{"urls":[]},"startTime":"","teamDriveInfo":{"teamDriveIds":[]},"terms":"","timeZone":"","voiceOptions":{"coveredData":[]}},"view":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/matters/:matterId:count',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "query": {\n "accountInfo": {\n "emails": []\n },\n "corpus": "",\n "dataScope": "",\n "driveOptions": {\n "clientSideEncryptedOption": "",\n "includeSharedDrives": false,\n "includeTeamDrives": false,\n "versionDate": ""\n },\n "endTime": "",\n "hangoutsChatInfo": {\n "roomId": []\n },\n "hangoutsChatOptions": {\n "includeRooms": false\n },\n "mailOptions": {\n "clientSideEncryptedOption": "",\n "excludeDrafts": false\n },\n "method": "",\n "orgUnitInfo": {\n "orgUnitId": ""\n },\n "searchMethod": "",\n "sharedDriveInfo": {\n "sharedDriveIds": []\n },\n "sitesUrlInfo": {\n "urls": []\n },\n "startTime": "",\n "teamDriveInfo": {\n "teamDriveIds": []\n },\n "terms": "",\n "timeZone": "",\n "voiceOptions": {\n "coveredData": []\n }\n },\n "view": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"query\": {\n \"accountInfo\": {\n \"emails\": []\n },\n \"corpus\": \"\",\n \"dataScope\": \"\",\n \"driveOptions\": {\n \"clientSideEncryptedOption\": \"\",\n \"includeSharedDrives\": false,\n \"includeTeamDrives\": false,\n \"versionDate\": \"\"\n },\n \"endTime\": \"\",\n \"hangoutsChatInfo\": {\n \"roomId\": []\n },\n \"hangoutsChatOptions\": {\n \"includeRooms\": false\n },\n \"mailOptions\": {\n \"clientSideEncryptedOption\": \"\",\n \"excludeDrafts\": false\n },\n \"method\": \"\",\n \"orgUnitInfo\": {\n \"orgUnitId\": \"\"\n },\n \"searchMethod\": \"\",\n \"sharedDriveInfo\": {\n \"sharedDriveIds\": []\n },\n \"sitesUrlInfo\": {\n \"urls\": []\n },\n \"startTime\": \"\",\n \"teamDriveInfo\": {\n \"teamDriveIds\": []\n },\n \"terms\": \"\",\n \"timeZone\": \"\",\n \"voiceOptions\": {\n \"coveredData\": []\n }\n },\n \"view\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1/matters/:matterId:count")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/matters/:matterId:count',
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({
query: {
accountInfo: {emails: []},
corpus: '',
dataScope: '',
driveOptions: {
clientSideEncryptedOption: '',
includeSharedDrives: false,
includeTeamDrives: false,
versionDate: ''
},
endTime: '',
hangoutsChatInfo: {roomId: []},
hangoutsChatOptions: {includeRooms: false},
mailOptions: {clientSideEncryptedOption: '', excludeDrafts: false},
method: '',
orgUnitInfo: {orgUnitId: ''},
searchMethod: '',
sharedDriveInfo: {sharedDriveIds: []},
sitesUrlInfo: {urls: []},
startTime: '',
teamDriveInfo: {teamDriveIds: []},
terms: '',
timeZone: '',
voiceOptions: {coveredData: []}
},
view: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/matters/:matterId:count',
headers: {'content-type': 'application/json'},
body: {
query: {
accountInfo: {emails: []},
corpus: '',
dataScope: '',
driveOptions: {
clientSideEncryptedOption: '',
includeSharedDrives: false,
includeTeamDrives: false,
versionDate: ''
},
endTime: '',
hangoutsChatInfo: {roomId: []},
hangoutsChatOptions: {includeRooms: false},
mailOptions: {clientSideEncryptedOption: '', excludeDrafts: false},
method: '',
orgUnitInfo: {orgUnitId: ''},
searchMethod: '',
sharedDriveInfo: {sharedDriveIds: []},
sitesUrlInfo: {urls: []},
startTime: '',
teamDriveInfo: {teamDriveIds: []},
terms: '',
timeZone: '',
voiceOptions: {coveredData: []}
},
view: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/v1/matters/:matterId:count');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
query: {
accountInfo: {
emails: []
},
corpus: '',
dataScope: '',
driveOptions: {
clientSideEncryptedOption: '',
includeSharedDrives: false,
includeTeamDrives: false,
versionDate: ''
},
endTime: '',
hangoutsChatInfo: {
roomId: []
},
hangoutsChatOptions: {
includeRooms: false
},
mailOptions: {
clientSideEncryptedOption: '',
excludeDrafts: false
},
method: '',
orgUnitInfo: {
orgUnitId: ''
},
searchMethod: '',
sharedDriveInfo: {
sharedDriveIds: []
},
sitesUrlInfo: {
urls: []
},
startTime: '',
teamDriveInfo: {
teamDriveIds: []
},
terms: '',
timeZone: '',
voiceOptions: {
coveredData: []
}
},
view: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/matters/:matterId:count',
headers: {'content-type': 'application/json'},
data: {
query: {
accountInfo: {emails: []},
corpus: '',
dataScope: '',
driveOptions: {
clientSideEncryptedOption: '',
includeSharedDrives: false,
includeTeamDrives: false,
versionDate: ''
},
endTime: '',
hangoutsChatInfo: {roomId: []},
hangoutsChatOptions: {includeRooms: false},
mailOptions: {clientSideEncryptedOption: '', excludeDrafts: false},
method: '',
orgUnitInfo: {orgUnitId: ''},
searchMethod: '',
sharedDriveInfo: {sharedDriveIds: []},
sitesUrlInfo: {urls: []},
startTime: '',
teamDriveInfo: {teamDriveIds: []},
terms: '',
timeZone: '',
voiceOptions: {coveredData: []}
},
view: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/matters/:matterId:count';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"query":{"accountInfo":{"emails":[]},"corpus":"","dataScope":"","driveOptions":{"clientSideEncryptedOption":"","includeSharedDrives":false,"includeTeamDrives":false,"versionDate":""},"endTime":"","hangoutsChatInfo":{"roomId":[]},"hangoutsChatOptions":{"includeRooms":false},"mailOptions":{"clientSideEncryptedOption":"","excludeDrafts":false},"method":"","orgUnitInfo":{"orgUnitId":""},"searchMethod":"","sharedDriveInfo":{"sharedDriveIds":[]},"sitesUrlInfo":{"urls":[]},"startTime":"","teamDriveInfo":{"teamDriveIds":[]},"terms":"","timeZone":"","voiceOptions":{"coveredData":[]}},"view":""}'
};
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 = @{ @"query": @{ @"accountInfo": @{ @"emails": @[ ] }, @"corpus": @"", @"dataScope": @"", @"driveOptions": @{ @"clientSideEncryptedOption": @"", @"includeSharedDrives": @NO, @"includeTeamDrives": @NO, @"versionDate": @"" }, @"endTime": @"", @"hangoutsChatInfo": @{ @"roomId": @[ ] }, @"hangoutsChatOptions": @{ @"includeRooms": @NO }, @"mailOptions": @{ @"clientSideEncryptedOption": @"", @"excludeDrafts": @NO }, @"method": @"", @"orgUnitInfo": @{ @"orgUnitId": @"" }, @"searchMethod": @"", @"sharedDriveInfo": @{ @"sharedDriveIds": @[ ] }, @"sitesUrlInfo": @{ @"urls": @[ ] }, @"startTime": @"", @"teamDriveInfo": @{ @"teamDriveIds": @[ ] }, @"terms": @"", @"timeZone": @"", @"voiceOptions": @{ @"coveredData": @[ ] } },
@"view": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/matters/:matterId:count"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/matters/:matterId:count" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"query\": {\n \"accountInfo\": {\n \"emails\": []\n },\n \"corpus\": \"\",\n \"dataScope\": \"\",\n \"driveOptions\": {\n \"clientSideEncryptedOption\": \"\",\n \"includeSharedDrives\": false,\n \"includeTeamDrives\": false,\n \"versionDate\": \"\"\n },\n \"endTime\": \"\",\n \"hangoutsChatInfo\": {\n \"roomId\": []\n },\n \"hangoutsChatOptions\": {\n \"includeRooms\": false\n },\n \"mailOptions\": {\n \"clientSideEncryptedOption\": \"\",\n \"excludeDrafts\": false\n },\n \"method\": \"\",\n \"orgUnitInfo\": {\n \"orgUnitId\": \"\"\n },\n \"searchMethod\": \"\",\n \"sharedDriveInfo\": {\n \"sharedDriveIds\": []\n },\n \"sitesUrlInfo\": {\n \"urls\": []\n },\n \"startTime\": \"\",\n \"teamDriveInfo\": {\n \"teamDriveIds\": []\n },\n \"terms\": \"\",\n \"timeZone\": \"\",\n \"voiceOptions\": {\n \"coveredData\": []\n }\n },\n \"view\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/matters/:matterId:count",
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([
'query' => [
'accountInfo' => [
'emails' => [
]
],
'corpus' => '',
'dataScope' => '',
'driveOptions' => [
'clientSideEncryptedOption' => '',
'includeSharedDrives' => null,
'includeTeamDrives' => null,
'versionDate' => ''
],
'endTime' => '',
'hangoutsChatInfo' => [
'roomId' => [
]
],
'hangoutsChatOptions' => [
'includeRooms' => null
],
'mailOptions' => [
'clientSideEncryptedOption' => '',
'excludeDrafts' => null
],
'method' => '',
'orgUnitInfo' => [
'orgUnitId' => ''
],
'searchMethod' => '',
'sharedDriveInfo' => [
'sharedDriveIds' => [
]
],
'sitesUrlInfo' => [
'urls' => [
]
],
'startTime' => '',
'teamDriveInfo' => [
'teamDriveIds' => [
]
],
'terms' => '',
'timeZone' => '',
'voiceOptions' => [
'coveredData' => [
]
]
],
'view' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/v1/matters/:matterId:count', [
'body' => '{
"query": {
"accountInfo": {
"emails": []
},
"corpus": "",
"dataScope": "",
"driveOptions": {
"clientSideEncryptedOption": "",
"includeSharedDrives": false,
"includeTeamDrives": false,
"versionDate": ""
},
"endTime": "",
"hangoutsChatInfo": {
"roomId": []
},
"hangoutsChatOptions": {
"includeRooms": false
},
"mailOptions": {
"clientSideEncryptedOption": "",
"excludeDrafts": false
},
"method": "",
"orgUnitInfo": {
"orgUnitId": ""
},
"searchMethod": "",
"sharedDriveInfo": {
"sharedDriveIds": []
},
"sitesUrlInfo": {
"urls": []
},
"startTime": "",
"teamDriveInfo": {
"teamDriveIds": []
},
"terms": "",
"timeZone": "",
"voiceOptions": {
"coveredData": []
}
},
"view": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1/matters/:matterId:count');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'query' => [
'accountInfo' => [
'emails' => [
]
],
'corpus' => '',
'dataScope' => '',
'driveOptions' => [
'clientSideEncryptedOption' => '',
'includeSharedDrives' => null,
'includeTeamDrives' => null,
'versionDate' => ''
],
'endTime' => '',
'hangoutsChatInfo' => [
'roomId' => [
]
],
'hangoutsChatOptions' => [
'includeRooms' => null
],
'mailOptions' => [
'clientSideEncryptedOption' => '',
'excludeDrafts' => null
],
'method' => '',
'orgUnitInfo' => [
'orgUnitId' => ''
],
'searchMethod' => '',
'sharedDriveInfo' => [
'sharedDriveIds' => [
]
],
'sitesUrlInfo' => [
'urls' => [
]
],
'startTime' => '',
'teamDriveInfo' => [
'teamDriveIds' => [
]
],
'terms' => '',
'timeZone' => '',
'voiceOptions' => [
'coveredData' => [
]
]
],
'view' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'query' => [
'accountInfo' => [
'emails' => [
]
],
'corpus' => '',
'dataScope' => '',
'driveOptions' => [
'clientSideEncryptedOption' => '',
'includeSharedDrives' => null,
'includeTeamDrives' => null,
'versionDate' => ''
],
'endTime' => '',
'hangoutsChatInfo' => [
'roomId' => [
]
],
'hangoutsChatOptions' => [
'includeRooms' => null
],
'mailOptions' => [
'clientSideEncryptedOption' => '',
'excludeDrafts' => null
],
'method' => '',
'orgUnitInfo' => [
'orgUnitId' => ''
],
'searchMethod' => '',
'sharedDriveInfo' => [
'sharedDriveIds' => [
]
],
'sitesUrlInfo' => [
'urls' => [
]
],
'startTime' => '',
'teamDriveInfo' => [
'teamDriveIds' => [
]
],
'terms' => '',
'timeZone' => '',
'voiceOptions' => [
'coveredData' => [
]
]
],
'view' => ''
]));
$request->setRequestUrl('{{baseUrl}}/v1/matters/:matterId:count');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/matters/:matterId:count' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"query": {
"accountInfo": {
"emails": []
},
"corpus": "",
"dataScope": "",
"driveOptions": {
"clientSideEncryptedOption": "",
"includeSharedDrives": false,
"includeTeamDrives": false,
"versionDate": ""
},
"endTime": "",
"hangoutsChatInfo": {
"roomId": []
},
"hangoutsChatOptions": {
"includeRooms": false
},
"mailOptions": {
"clientSideEncryptedOption": "",
"excludeDrafts": false
},
"method": "",
"orgUnitInfo": {
"orgUnitId": ""
},
"searchMethod": "",
"sharedDriveInfo": {
"sharedDriveIds": []
},
"sitesUrlInfo": {
"urls": []
},
"startTime": "",
"teamDriveInfo": {
"teamDriveIds": []
},
"terms": "",
"timeZone": "",
"voiceOptions": {
"coveredData": []
}
},
"view": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/matters/:matterId:count' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"query": {
"accountInfo": {
"emails": []
},
"corpus": "",
"dataScope": "",
"driveOptions": {
"clientSideEncryptedOption": "",
"includeSharedDrives": false,
"includeTeamDrives": false,
"versionDate": ""
},
"endTime": "",
"hangoutsChatInfo": {
"roomId": []
},
"hangoutsChatOptions": {
"includeRooms": false
},
"mailOptions": {
"clientSideEncryptedOption": "",
"excludeDrafts": false
},
"method": "",
"orgUnitInfo": {
"orgUnitId": ""
},
"searchMethod": "",
"sharedDriveInfo": {
"sharedDriveIds": []
},
"sitesUrlInfo": {
"urls": []
},
"startTime": "",
"teamDriveInfo": {
"teamDriveIds": []
},
"terms": "",
"timeZone": "",
"voiceOptions": {
"coveredData": []
}
},
"view": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"query\": {\n \"accountInfo\": {\n \"emails\": []\n },\n \"corpus\": \"\",\n \"dataScope\": \"\",\n \"driveOptions\": {\n \"clientSideEncryptedOption\": \"\",\n \"includeSharedDrives\": false,\n \"includeTeamDrives\": false,\n \"versionDate\": \"\"\n },\n \"endTime\": \"\",\n \"hangoutsChatInfo\": {\n \"roomId\": []\n },\n \"hangoutsChatOptions\": {\n \"includeRooms\": false\n },\n \"mailOptions\": {\n \"clientSideEncryptedOption\": \"\",\n \"excludeDrafts\": false\n },\n \"method\": \"\",\n \"orgUnitInfo\": {\n \"orgUnitId\": \"\"\n },\n \"searchMethod\": \"\",\n \"sharedDriveInfo\": {\n \"sharedDriveIds\": []\n },\n \"sitesUrlInfo\": {\n \"urls\": []\n },\n \"startTime\": \"\",\n \"teamDriveInfo\": {\n \"teamDriveIds\": []\n },\n \"terms\": \"\",\n \"timeZone\": \"\",\n \"voiceOptions\": {\n \"coveredData\": []\n }\n },\n \"view\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1/matters/:matterId:count", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/matters/:matterId:count"
payload = {
"query": {
"accountInfo": { "emails": [] },
"corpus": "",
"dataScope": "",
"driveOptions": {
"clientSideEncryptedOption": "",
"includeSharedDrives": False,
"includeTeamDrives": False,
"versionDate": ""
},
"endTime": "",
"hangoutsChatInfo": { "roomId": [] },
"hangoutsChatOptions": { "includeRooms": False },
"mailOptions": {
"clientSideEncryptedOption": "",
"excludeDrafts": False
},
"method": "",
"orgUnitInfo": { "orgUnitId": "" },
"searchMethod": "",
"sharedDriveInfo": { "sharedDriveIds": [] },
"sitesUrlInfo": { "urls": [] },
"startTime": "",
"teamDriveInfo": { "teamDriveIds": [] },
"terms": "",
"timeZone": "",
"voiceOptions": { "coveredData": [] }
},
"view": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/matters/:matterId:count"
payload <- "{\n \"query\": {\n \"accountInfo\": {\n \"emails\": []\n },\n \"corpus\": \"\",\n \"dataScope\": \"\",\n \"driveOptions\": {\n \"clientSideEncryptedOption\": \"\",\n \"includeSharedDrives\": false,\n \"includeTeamDrives\": false,\n \"versionDate\": \"\"\n },\n \"endTime\": \"\",\n \"hangoutsChatInfo\": {\n \"roomId\": []\n },\n \"hangoutsChatOptions\": {\n \"includeRooms\": false\n },\n \"mailOptions\": {\n \"clientSideEncryptedOption\": \"\",\n \"excludeDrafts\": false\n },\n \"method\": \"\",\n \"orgUnitInfo\": {\n \"orgUnitId\": \"\"\n },\n \"searchMethod\": \"\",\n \"sharedDriveInfo\": {\n \"sharedDriveIds\": []\n },\n \"sitesUrlInfo\": {\n \"urls\": []\n },\n \"startTime\": \"\",\n \"teamDriveInfo\": {\n \"teamDriveIds\": []\n },\n \"terms\": \"\",\n \"timeZone\": \"\",\n \"voiceOptions\": {\n \"coveredData\": []\n }\n },\n \"view\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/matters/:matterId:count")
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 \"query\": {\n \"accountInfo\": {\n \"emails\": []\n },\n \"corpus\": \"\",\n \"dataScope\": \"\",\n \"driveOptions\": {\n \"clientSideEncryptedOption\": \"\",\n \"includeSharedDrives\": false,\n \"includeTeamDrives\": false,\n \"versionDate\": \"\"\n },\n \"endTime\": \"\",\n \"hangoutsChatInfo\": {\n \"roomId\": []\n },\n \"hangoutsChatOptions\": {\n \"includeRooms\": false\n },\n \"mailOptions\": {\n \"clientSideEncryptedOption\": \"\",\n \"excludeDrafts\": false\n },\n \"method\": \"\",\n \"orgUnitInfo\": {\n \"orgUnitId\": \"\"\n },\n \"searchMethod\": \"\",\n \"sharedDriveInfo\": {\n \"sharedDriveIds\": []\n },\n \"sitesUrlInfo\": {\n \"urls\": []\n },\n \"startTime\": \"\",\n \"teamDriveInfo\": {\n \"teamDriveIds\": []\n },\n \"terms\": \"\",\n \"timeZone\": \"\",\n \"voiceOptions\": {\n \"coveredData\": []\n }\n },\n \"view\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/v1/matters/:matterId:count') do |req|
req.body = "{\n \"query\": {\n \"accountInfo\": {\n \"emails\": []\n },\n \"corpus\": \"\",\n \"dataScope\": \"\",\n \"driveOptions\": {\n \"clientSideEncryptedOption\": \"\",\n \"includeSharedDrives\": false,\n \"includeTeamDrives\": false,\n \"versionDate\": \"\"\n },\n \"endTime\": \"\",\n \"hangoutsChatInfo\": {\n \"roomId\": []\n },\n \"hangoutsChatOptions\": {\n \"includeRooms\": false\n },\n \"mailOptions\": {\n \"clientSideEncryptedOption\": \"\",\n \"excludeDrafts\": false\n },\n \"method\": \"\",\n \"orgUnitInfo\": {\n \"orgUnitId\": \"\"\n },\n \"searchMethod\": \"\",\n \"sharedDriveInfo\": {\n \"sharedDriveIds\": []\n },\n \"sitesUrlInfo\": {\n \"urls\": []\n },\n \"startTime\": \"\",\n \"teamDriveInfo\": {\n \"teamDriveIds\": []\n },\n \"terms\": \"\",\n \"timeZone\": \"\",\n \"voiceOptions\": {\n \"coveredData\": []\n }\n },\n \"view\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/matters/:matterId:count";
let payload = json!({
"query": json!({
"accountInfo": json!({"emails": ()}),
"corpus": "",
"dataScope": "",
"driveOptions": json!({
"clientSideEncryptedOption": "",
"includeSharedDrives": false,
"includeTeamDrives": false,
"versionDate": ""
}),
"endTime": "",
"hangoutsChatInfo": json!({"roomId": ()}),
"hangoutsChatOptions": json!({"includeRooms": false}),
"mailOptions": json!({
"clientSideEncryptedOption": "",
"excludeDrafts": false
}),
"method": "",
"orgUnitInfo": json!({"orgUnitId": ""}),
"searchMethod": "",
"sharedDriveInfo": json!({"sharedDriveIds": ()}),
"sitesUrlInfo": json!({"urls": ()}),
"startTime": "",
"teamDriveInfo": json!({"teamDriveIds": ()}),
"terms": "",
"timeZone": "",
"voiceOptions": json!({"coveredData": ()})
}),
"view": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/v1/matters/:matterId:count \
--header 'content-type: application/json' \
--data '{
"query": {
"accountInfo": {
"emails": []
},
"corpus": "",
"dataScope": "",
"driveOptions": {
"clientSideEncryptedOption": "",
"includeSharedDrives": false,
"includeTeamDrives": false,
"versionDate": ""
},
"endTime": "",
"hangoutsChatInfo": {
"roomId": []
},
"hangoutsChatOptions": {
"includeRooms": false
},
"mailOptions": {
"clientSideEncryptedOption": "",
"excludeDrafts": false
},
"method": "",
"orgUnitInfo": {
"orgUnitId": ""
},
"searchMethod": "",
"sharedDriveInfo": {
"sharedDriveIds": []
},
"sitesUrlInfo": {
"urls": []
},
"startTime": "",
"teamDriveInfo": {
"teamDriveIds": []
},
"terms": "",
"timeZone": "",
"voiceOptions": {
"coveredData": []
}
},
"view": ""
}'
echo '{
"query": {
"accountInfo": {
"emails": []
},
"corpus": "",
"dataScope": "",
"driveOptions": {
"clientSideEncryptedOption": "",
"includeSharedDrives": false,
"includeTeamDrives": false,
"versionDate": ""
},
"endTime": "",
"hangoutsChatInfo": {
"roomId": []
},
"hangoutsChatOptions": {
"includeRooms": false
},
"mailOptions": {
"clientSideEncryptedOption": "",
"excludeDrafts": false
},
"method": "",
"orgUnitInfo": {
"orgUnitId": ""
},
"searchMethod": "",
"sharedDriveInfo": {
"sharedDriveIds": []
},
"sitesUrlInfo": {
"urls": []
},
"startTime": "",
"teamDriveInfo": {
"teamDriveIds": []
},
"terms": "",
"timeZone": "",
"voiceOptions": {
"coveredData": []
}
},
"view": ""
}' | \
http POST {{baseUrl}}/v1/matters/:matterId:count \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "query": {\n "accountInfo": {\n "emails": []\n },\n "corpus": "",\n "dataScope": "",\n "driveOptions": {\n "clientSideEncryptedOption": "",\n "includeSharedDrives": false,\n "includeTeamDrives": false,\n "versionDate": ""\n },\n "endTime": "",\n "hangoutsChatInfo": {\n "roomId": []\n },\n "hangoutsChatOptions": {\n "includeRooms": false\n },\n "mailOptions": {\n "clientSideEncryptedOption": "",\n "excludeDrafts": false\n },\n "method": "",\n "orgUnitInfo": {\n "orgUnitId": ""\n },\n "searchMethod": "",\n "sharedDriveInfo": {\n "sharedDriveIds": []\n },\n "sitesUrlInfo": {\n "urls": []\n },\n "startTime": "",\n "teamDriveInfo": {\n "teamDriveIds": []\n },\n "terms": "",\n "timeZone": "",\n "voiceOptions": {\n "coveredData": []\n }\n },\n "view": ""\n}' \
--output-document \
- {{baseUrl}}/v1/matters/:matterId:count
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"query": [
"accountInfo": ["emails": []],
"corpus": "",
"dataScope": "",
"driveOptions": [
"clientSideEncryptedOption": "",
"includeSharedDrives": false,
"includeTeamDrives": false,
"versionDate": ""
],
"endTime": "",
"hangoutsChatInfo": ["roomId": []],
"hangoutsChatOptions": ["includeRooms": false],
"mailOptions": [
"clientSideEncryptedOption": "",
"excludeDrafts": false
],
"method": "",
"orgUnitInfo": ["orgUnitId": ""],
"searchMethod": "",
"sharedDriveInfo": ["sharedDriveIds": []],
"sitesUrlInfo": ["urls": []],
"startTime": "",
"teamDriveInfo": ["teamDriveIds": []],
"terms": "",
"timeZone": "",
"voiceOptions": ["coveredData": []]
],
"view": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/matters/:matterId:count")! 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
vault.matters.create
{{baseUrl}}/v1/matters
BODY json
{
"description": "",
"matterId": "",
"matterPermissions": [
{
"accountId": "",
"role": ""
}
],
"name": "",
"state": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/matters");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"description\": \"\",\n \"matterId\": \"\",\n \"matterPermissions\": [\n {\n \"accountId\": \"\",\n \"role\": \"\"\n }\n ],\n \"name\": \"\",\n \"state\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1/matters" {:content-type :json
:form-params {:description ""
:matterId ""
:matterPermissions [{:accountId ""
:role ""}]
:name ""
:state ""}})
require "http/client"
url = "{{baseUrl}}/v1/matters"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"description\": \"\",\n \"matterId\": \"\",\n \"matterPermissions\": [\n {\n \"accountId\": \"\",\n \"role\": \"\"\n }\n ],\n \"name\": \"\",\n \"state\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/v1/matters"),
Content = new StringContent("{\n \"description\": \"\",\n \"matterId\": \"\",\n \"matterPermissions\": [\n {\n \"accountId\": \"\",\n \"role\": \"\"\n }\n ],\n \"name\": \"\",\n \"state\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/matters");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"description\": \"\",\n \"matterId\": \"\",\n \"matterPermissions\": [\n {\n \"accountId\": \"\",\n \"role\": \"\"\n }\n ],\n \"name\": \"\",\n \"state\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/matters"
payload := strings.NewReader("{\n \"description\": \"\",\n \"matterId\": \"\",\n \"matterPermissions\": [\n {\n \"accountId\": \"\",\n \"role\": \"\"\n }\n ],\n \"name\": \"\",\n \"state\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/v1/matters HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 152
{
"description": "",
"matterId": "",
"matterPermissions": [
{
"accountId": "",
"role": ""
}
],
"name": "",
"state": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1/matters")
.setHeader("content-type", "application/json")
.setBody("{\n \"description\": \"\",\n \"matterId\": \"\",\n \"matterPermissions\": [\n {\n \"accountId\": \"\",\n \"role\": \"\"\n }\n ],\n \"name\": \"\",\n \"state\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/matters"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"description\": \"\",\n \"matterId\": \"\",\n \"matterPermissions\": [\n {\n \"accountId\": \"\",\n \"role\": \"\"\n }\n ],\n \"name\": \"\",\n \"state\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"description\": \"\",\n \"matterId\": \"\",\n \"matterPermissions\": [\n {\n \"accountId\": \"\",\n \"role\": \"\"\n }\n ],\n \"name\": \"\",\n \"state\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/matters")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1/matters")
.header("content-type", "application/json")
.body("{\n \"description\": \"\",\n \"matterId\": \"\",\n \"matterPermissions\": [\n {\n \"accountId\": \"\",\n \"role\": \"\"\n }\n ],\n \"name\": \"\",\n \"state\": \"\"\n}")
.asString();
const data = JSON.stringify({
description: '',
matterId: '',
matterPermissions: [
{
accountId: '',
role: ''
}
],
name: '',
state: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v1/matters');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/matters',
headers: {'content-type': 'application/json'},
data: {
description: '',
matterId: '',
matterPermissions: [{accountId: '', role: ''}],
name: '',
state: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/matters';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"description":"","matterId":"","matterPermissions":[{"accountId":"","role":""}],"name":"","state":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/matters',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "description": "",\n "matterId": "",\n "matterPermissions": [\n {\n "accountId": "",\n "role": ""\n }\n ],\n "name": "",\n "state": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"description\": \"\",\n \"matterId\": \"\",\n \"matterPermissions\": [\n {\n \"accountId\": \"\",\n \"role\": \"\"\n }\n ],\n \"name\": \"\",\n \"state\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1/matters")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/matters',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
description: '',
matterId: '',
matterPermissions: [{accountId: '', role: ''}],
name: '',
state: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/matters',
headers: {'content-type': 'application/json'},
body: {
description: '',
matterId: '',
matterPermissions: [{accountId: '', role: ''}],
name: '',
state: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/v1/matters');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
description: '',
matterId: '',
matterPermissions: [
{
accountId: '',
role: ''
}
],
name: '',
state: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/matters',
headers: {'content-type': 'application/json'},
data: {
description: '',
matterId: '',
matterPermissions: [{accountId: '', role: ''}],
name: '',
state: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/matters';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"description":"","matterId":"","matterPermissions":[{"accountId":"","role":""}],"name":"","state":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"description": @"",
@"matterId": @"",
@"matterPermissions": @[ @{ @"accountId": @"", @"role": @"" } ],
@"name": @"",
@"state": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/matters"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/matters" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"description\": \"\",\n \"matterId\": \"\",\n \"matterPermissions\": [\n {\n \"accountId\": \"\",\n \"role\": \"\"\n }\n ],\n \"name\": \"\",\n \"state\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/matters",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'description' => '',
'matterId' => '',
'matterPermissions' => [
[
'accountId' => '',
'role' => ''
]
],
'name' => '',
'state' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/v1/matters', [
'body' => '{
"description": "",
"matterId": "",
"matterPermissions": [
{
"accountId": "",
"role": ""
}
],
"name": "",
"state": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1/matters');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'description' => '',
'matterId' => '',
'matterPermissions' => [
[
'accountId' => '',
'role' => ''
]
],
'name' => '',
'state' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'description' => '',
'matterId' => '',
'matterPermissions' => [
[
'accountId' => '',
'role' => ''
]
],
'name' => '',
'state' => ''
]));
$request->setRequestUrl('{{baseUrl}}/v1/matters');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/matters' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"description": "",
"matterId": "",
"matterPermissions": [
{
"accountId": "",
"role": ""
}
],
"name": "",
"state": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/matters' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"description": "",
"matterId": "",
"matterPermissions": [
{
"accountId": "",
"role": ""
}
],
"name": "",
"state": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"description\": \"\",\n \"matterId\": \"\",\n \"matterPermissions\": [\n {\n \"accountId\": \"\",\n \"role\": \"\"\n }\n ],\n \"name\": \"\",\n \"state\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1/matters", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/matters"
payload = {
"description": "",
"matterId": "",
"matterPermissions": [
{
"accountId": "",
"role": ""
}
],
"name": "",
"state": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/matters"
payload <- "{\n \"description\": \"\",\n \"matterId\": \"\",\n \"matterPermissions\": [\n {\n \"accountId\": \"\",\n \"role\": \"\"\n }\n ],\n \"name\": \"\",\n \"state\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/matters")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"description\": \"\",\n \"matterId\": \"\",\n \"matterPermissions\": [\n {\n \"accountId\": \"\",\n \"role\": \"\"\n }\n ],\n \"name\": \"\",\n \"state\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/v1/matters') do |req|
req.body = "{\n \"description\": \"\",\n \"matterId\": \"\",\n \"matterPermissions\": [\n {\n \"accountId\": \"\",\n \"role\": \"\"\n }\n ],\n \"name\": \"\",\n \"state\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/matters";
let payload = json!({
"description": "",
"matterId": "",
"matterPermissions": (
json!({
"accountId": "",
"role": ""
})
),
"name": "",
"state": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/v1/matters \
--header 'content-type: application/json' \
--data '{
"description": "",
"matterId": "",
"matterPermissions": [
{
"accountId": "",
"role": ""
}
],
"name": "",
"state": ""
}'
echo '{
"description": "",
"matterId": "",
"matterPermissions": [
{
"accountId": "",
"role": ""
}
],
"name": "",
"state": ""
}' | \
http POST {{baseUrl}}/v1/matters \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "description": "",\n "matterId": "",\n "matterPermissions": [\n {\n "accountId": "",\n "role": ""\n }\n ],\n "name": "",\n "state": ""\n}' \
--output-document \
- {{baseUrl}}/v1/matters
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"description": "",
"matterId": "",
"matterPermissions": [
[
"accountId": "",
"role": ""
]
],
"name": "",
"state": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/matters")! 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
vault.matters.delete
{{baseUrl}}/v1/matters/:matterId
QUERY PARAMS
matterId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/matters/:matterId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/v1/matters/:matterId")
require "http/client"
url = "{{baseUrl}}/v1/matters/:matterId"
response = HTTP::Client.delete url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Delete,
RequestUri = new Uri("{{baseUrl}}/v1/matters/:matterId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/matters/:matterId");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/matters/:matterId"
req, _ := http.NewRequest("DELETE", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
DELETE /baseUrl/v1/matters/:matterId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/v1/matters/:matterId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/matters/:matterId"))
.method("DELETE", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/matters/:matterId")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/v1/matters/:matterId")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('DELETE', '{{baseUrl}}/v1/matters/:matterId');
xhr.send(data);
import axios from 'axios';
const options = {method: 'DELETE', url: '{{baseUrl}}/v1/matters/:matterId'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/matters/:matterId';
const options = {method: 'DELETE'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/matters/:matterId',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1/matters/:matterId")
.delete(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/matters/:matterId',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'DELETE', url: '{{baseUrl}}/v1/matters/:matterId'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/v1/matters/:matterId');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {method: 'DELETE', url: '{{baseUrl}}/v1/matters/:matterId'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/matters/:matterId';
const options = {method: 'DELETE'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/matters/:matterId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"DELETE"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/matters/:matterId" in
Client.call `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/matters/:matterId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('DELETE', '{{baseUrl}}/v1/matters/:matterId');
echo $response->getBody();
setUrl('{{baseUrl}}/v1/matters/:matterId');
$request->setMethod(HTTP_METH_DELETE);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/matters/:matterId');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/matters/:matterId' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/matters/:matterId' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/v1/matters/:matterId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/matters/:matterId"
response = requests.delete(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/matters/:matterId"
response <- VERB("DELETE", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/matters/:matterId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.delete('/baseUrl/v1/matters/:matterId') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/matters/:matterId";
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("DELETE").unwrap(), url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request DELETE \
--url {{baseUrl}}/v1/matters/:matterId
http DELETE {{baseUrl}}/v1/matters/:matterId
wget --quiet \
--method DELETE \
--output-document \
- {{baseUrl}}/v1/matters/:matterId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/matters/:matterId")! 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
vault.matters.exports.create
{{baseUrl}}/v1/matters/:matterId/exports
QUERY PARAMS
matterId
BODY json
{
"cloudStorageSink": {
"files": [
{
"bucketName": "",
"md5Hash": "",
"objectName": "",
"size": ""
}
]
},
"createTime": "",
"exportOptions": {
"driveOptions": {
"includeAccessInfo": false
},
"groupsOptions": {
"exportFormat": ""
},
"hangoutsChatOptions": {
"exportFormat": ""
},
"mailOptions": {
"exportFormat": "",
"showConfidentialModeContent": false,
"useNewExport": false
},
"region": "",
"voiceOptions": {
"exportFormat": ""
}
},
"id": "",
"matterId": "",
"name": "",
"query": {
"accountInfo": {
"emails": []
},
"corpus": "",
"dataScope": "",
"driveOptions": {
"clientSideEncryptedOption": "",
"includeSharedDrives": false,
"includeTeamDrives": false,
"versionDate": ""
},
"endTime": "",
"hangoutsChatInfo": {
"roomId": []
},
"hangoutsChatOptions": {
"includeRooms": false
},
"mailOptions": {
"clientSideEncryptedOption": "",
"excludeDrafts": false
},
"method": "",
"orgUnitInfo": {
"orgUnitId": ""
},
"searchMethod": "",
"sharedDriveInfo": {
"sharedDriveIds": []
},
"sitesUrlInfo": {
"urls": []
},
"startTime": "",
"teamDriveInfo": {
"teamDriveIds": []
},
"terms": "",
"timeZone": "",
"voiceOptions": {
"coveredData": []
}
},
"requester": {
"displayName": "",
"email": ""
},
"stats": {
"exportedArtifactCount": "",
"sizeInBytes": "",
"totalArtifactCount": ""
},
"status": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/matters/:matterId/exports");
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 \"cloudStorageSink\": {\n \"files\": [\n {\n \"bucketName\": \"\",\n \"md5Hash\": \"\",\n \"objectName\": \"\",\n \"size\": \"\"\n }\n ]\n },\n \"createTime\": \"\",\n \"exportOptions\": {\n \"driveOptions\": {\n \"includeAccessInfo\": false\n },\n \"groupsOptions\": {\n \"exportFormat\": \"\"\n },\n \"hangoutsChatOptions\": {\n \"exportFormat\": \"\"\n },\n \"mailOptions\": {\n \"exportFormat\": \"\",\n \"showConfidentialModeContent\": false,\n \"useNewExport\": false\n },\n \"region\": \"\",\n \"voiceOptions\": {\n \"exportFormat\": \"\"\n }\n },\n \"id\": \"\",\n \"matterId\": \"\",\n \"name\": \"\",\n \"query\": {\n \"accountInfo\": {\n \"emails\": []\n },\n \"corpus\": \"\",\n \"dataScope\": \"\",\n \"driveOptions\": {\n \"clientSideEncryptedOption\": \"\",\n \"includeSharedDrives\": false,\n \"includeTeamDrives\": false,\n \"versionDate\": \"\"\n },\n \"endTime\": \"\",\n \"hangoutsChatInfo\": {\n \"roomId\": []\n },\n \"hangoutsChatOptions\": {\n \"includeRooms\": false\n },\n \"mailOptions\": {\n \"clientSideEncryptedOption\": \"\",\n \"excludeDrafts\": false\n },\n \"method\": \"\",\n \"orgUnitInfo\": {\n \"orgUnitId\": \"\"\n },\n \"searchMethod\": \"\",\n \"sharedDriveInfo\": {\n \"sharedDriveIds\": []\n },\n \"sitesUrlInfo\": {\n \"urls\": []\n },\n \"startTime\": \"\",\n \"teamDriveInfo\": {\n \"teamDriveIds\": []\n },\n \"terms\": \"\",\n \"timeZone\": \"\",\n \"voiceOptions\": {\n \"coveredData\": []\n }\n },\n \"requester\": {\n \"displayName\": \"\",\n \"email\": \"\"\n },\n \"stats\": {\n \"exportedArtifactCount\": \"\",\n \"sizeInBytes\": \"\",\n \"totalArtifactCount\": \"\"\n },\n \"status\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1/matters/:matterId/exports" {:content-type :json
:form-params {:cloudStorageSink {:files [{:bucketName ""
:md5Hash ""
:objectName ""
:size ""}]}
:createTime ""
:exportOptions {:driveOptions {:includeAccessInfo false}
:groupsOptions {:exportFormat ""}
:hangoutsChatOptions {:exportFormat ""}
:mailOptions {:exportFormat ""
:showConfidentialModeContent false
:useNewExport false}
:region ""
:voiceOptions {:exportFormat ""}}
:id ""
:matterId ""
:name ""
:query {:accountInfo {:emails []}
:corpus ""
:dataScope ""
:driveOptions {:clientSideEncryptedOption ""
:includeSharedDrives false
:includeTeamDrives false
:versionDate ""}
:endTime ""
:hangoutsChatInfo {:roomId []}
:hangoutsChatOptions {:includeRooms false}
:mailOptions {:clientSideEncryptedOption ""
:excludeDrafts false}
:method ""
:orgUnitInfo {:orgUnitId ""}
:searchMethod ""
:sharedDriveInfo {:sharedDriveIds []}
:sitesUrlInfo {:urls []}
:startTime ""
:teamDriveInfo {:teamDriveIds []}
:terms ""
:timeZone ""
:voiceOptions {:coveredData []}}
:requester {:displayName ""
:email ""}
:stats {:exportedArtifactCount ""
:sizeInBytes ""
:totalArtifactCount ""}
:status ""}})
require "http/client"
url = "{{baseUrl}}/v1/matters/:matterId/exports"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"cloudStorageSink\": {\n \"files\": [\n {\n \"bucketName\": \"\",\n \"md5Hash\": \"\",\n \"objectName\": \"\",\n \"size\": \"\"\n }\n ]\n },\n \"createTime\": \"\",\n \"exportOptions\": {\n \"driveOptions\": {\n \"includeAccessInfo\": false\n },\n \"groupsOptions\": {\n \"exportFormat\": \"\"\n },\n \"hangoutsChatOptions\": {\n \"exportFormat\": \"\"\n },\n \"mailOptions\": {\n \"exportFormat\": \"\",\n \"showConfidentialModeContent\": false,\n \"useNewExport\": false\n },\n \"region\": \"\",\n \"voiceOptions\": {\n \"exportFormat\": \"\"\n }\n },\n \"id\": \"\",\n \"matterId\": \"\",\n \"name\": \"\",\n \"query\": {\n \"accountInfo\": {\n \"emails\": []\n },\n \"corpus\": \"\",\n \"dataScope\": \"\",\n \"driveOptions\": {\n \"clientSideEncryptedOption\": \"\",\n \"includeSharedDrives\": false,\n \"includeTeamDrives\": false,\n \"versionDate\": \"\"\n },\n \"endTime\": \"\",\n \"hangoutsChatInfo\": {\n \"roomId\": []\n },\n \"hangoutsChatOptions\": {\n \"includeRooms\": false\n },\n \"mailOptions\": {\n \"clientSideEncryptedOption\": \"\",\n \"excludeDrafts\": false\n },\n \"method\": \"\",\n \"orgUnitInfo\": {\n \"orgUnitId\": \"\"\n },\n \"searchMethod\": \"\",\n \"sharedDriveInfo\": {\n \"sharedDriveIds\": []\n },\n \"sitesUrlInfo\": {\n \"urls\": []\n },\n \"startTime\": \"\",\n \"teamDriveInfo\": {\n \"teamDriveIds\": []\n },\n \"terms\": \"\",\n \"timeZone\": \"\",\n \"voiceOptions\": {\n \"coveredData\": []\n }\n },\n \"requester\": {\n \"displayName\": \"\",\n \"email\": \"\"\n },\n \"stats\": {\n \"exportedArtifactCount\": \"\",\n \"sizeInBytes\": \"\",\n \"totalArtifactCount\": \"\"\n },\n \"status\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/v1/matters/:matterId/exports"),
Content = new StringContent("{\n \"cloudStorageSink\": {\n \"files\": [\n {\n \"bucketName\": \"\",\n \"md5Hash\": \"\",\n \"objectName\": \"\",\n \"size\": \"\"\n }\n ]\n },\n \"createTime\": \"\",\n \"exportOptions\": {\n \"driveOptions\": {\n \"includeAccessInfo\": false\n },\n \"groupsOptions\": {\n \"exportFormat\": \"\"\n },\n \"hangoutsChatOptions\": {\n \"exportFormat\": \"\"\n },\n \"mailOptions\": {\n \"exportFormat\": \"\",\n \"showConfidentialModeContent\": false,\n \"useNewExport\": false\n },\n \"region\": \"\",\n \"voiceOptions\": {\n \"exportFormat\": \"\"\n }\n },\n \"id\": \"\",\n \"matterId\": \"\",\n \"name\": \"\",\n \"query\": {\n \"accountInfo\": {\n \"emails\": []\n },\n \"corpus\": \"\",\n \"dataScope\": \"\",\n \"driveOptions\": {\n \"clientSideEncryptedOption\": \"\",\n \"includeSharedDrives\": false,\n \"includeTeamDrives\": false,\n \"versionDate\": \"\"\n },\n \"endTime\": \"\",\n \"hangoutsChatInfo\": {\n \"roomId\": []\n },\n \"hangoutsChatOptions\": {\n \"includeRooms\": false\n },\n \"mailOptions\": {\n \"clientSideEncryptedOption\": \"\",\n \"excludeDrafts\": false\n },\n \"method\": \"\",\n \"orgUnitInfo\": {\n \"orgUnitId\": \"\"\n },\n \"searchMethod\": \"\",\n \"sharedDriveInfo\": {\n \"sharedDriveIds\": []\n },\n \"sitesUrlInfo\": {\n \"urls\": []\n },\n \"startTime\": \"\",\n \"teamDriveInfo\": {\n \"teamDriveIds\": []\n },\n \"terms\": \"\",\n \"timeZone\": \"\",\n \"voiceOptions\": {\n \"coveredData\": []\n }\n },\n \"requester\": {\n \"displayName\": \"\",\n \"email\": \"\"\n },\n \"stats\": {\n \"exportedArtifactCount\": \"\",\n \"sizeInBytes\": \"\",\n \"totalArtifactCount\": \"\"\n },\n \"status\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/matters/:matterId/exports");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"cloudStorageSink\": {\n \"files\": [\n {\n \"bucketName\": \"\",\n \"md5Hash\": \"\",\n \"objectName\": \"\",\n \"size\": \"\"\n }\n ]\n },\n \"createTime\": \"\",\n \"exportOptions\": {\n \"driveOptions\": {\n \"includeAccessInfo\": false\n },\n \"groupsOptions\": {\n \"exportFormat\": \"\"\n },\n \"hangoutsChatOptions\": {\n \"exportFormat\": \"\"\n },\n \"mailOptions\": {\n \"exportFormat\": \"\",\n \"showConfidentialModeContent\": false,\n \"useNewExport\": false\n },\n \"region\": \"\",\n \"voiceOptions\": {\n \"exportFormat\": \"\"\n }\n },\n \"id\": \"\",\n \"matterId\": \"\",\n \"name\": \"\",\n \"query\": {\n \"accountInfo\": {\n \"emails\": []\n },\n \"corpus\": \"\",\n \"dataScope\": \"\",\n \"driveOptions\": {\n \"clientSideEncryptedOption\": \"\",\n \"includeSharedDrives\": false,\n \"includeTeamDrives\": false,\n \"versionDate\": \"\"\n },\n \"endTime\": \"\",\n \"hangoutsChatInfo\": {\n \"roomId\": []\n },\n \"hangoutsChatOptions\": {\n \"includeRooms\": false\n },\n \"mailOptions\": {\n \"clientSideEncryptedOption\": \"\",\n \"excludeDrafts\": false\n },\n \"method\": \"\",\n \"orgUnitInfo\": {\n \"orgUnitId\": \"\"\n },\n \"searchMethod\": \"\",\n \"sharedDriveInfo\": {\n \"sharedDriveIds\": []\n },\n \"sitesUrlInfo\": {\n \"urls\": []\n },\n \"startTime\": \"\",\n \"teamDriveInfo\": {\n \"teamDriveIds\": []\n },\n \"terms\": \"\",\n \"timeZone\": \"\",\n \"voiceOptions\": {\n \"coveredData\": []\n }\n },\n \"requester\": {\n \"displayName\": \"\",\n \"email\": \"\"\n },\n \"stats\": {\n \"exportedArtifactCount\": \"\",\n \"sizeInBytes\": \"\",\n \"totalArtifactCount\": \"\"\n },\n \"status\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/matters/:matterId/exports"
payload := strings.NewReader("{\n \"cloudStorageSink\": {\n \"files\": [\n {\n \"bucketName\": \"\",\n \"md5Hash\": \"\",\n \"objectName\": \"\",\n \"size\": \"\"\n }\n ]\n },\n \"createTime\": \"\",\n \"exportOptions\": {\n \"driveOptions\": {\n \"includeAccessInfo\": false\n },\n \"groupsOptions\": {\n \"exportFormat\": \"\"\n },\n \"hangoutsChatOptions\": {\n \"exportFormat\": \"\"\n },\n \"mailOptions\": {\n \"exportFormat\": \"\",\n \"showConfidentialModeContent\": false,\n \"useNewExport\": false\n },\n \"region\": \"\",\n \"voiceOptions\": {\n \"exportFormat\": \"\"\n }\n },\n \"id\": \"\",\n \"matterId\": \"\",\n \"name\": \"\",\n \"query\": {\n \"accountInfo\": {\n \"emails\": []\n },\n \"corpus\": \"\",\n \"dataScope\": \"\",\n \"driveOptions\": {\n \"clientSideEncryptedOption\": \"\",\n \"includeSharedDrives\": false,\n \"includeTeamDrives\": false,\n \"versionDate\": \"\"\n },\n \"endTime\": \"\",\n \"hangoutsChatInfo\": {\n \"roomId\": []\n },\n \"hangoutsChatOptions\": {\n \"includeRooms\": false\n },\n \"mailOptions\": {\n \"clientSideEncryptedOption\": \"\",\n \"excludeDrafts\": false\n },\n \"method\": \"\",\n \"orgUnitInfo\": {\n \"orgUnitId\": \"\"\n },\n \"searchMethod\": \"\",\n \"sharedDriveInfo\": {\n \"sharedDriveIds\": []\n },\n \"sitesUrlInfo\": {\n \"urls\": []\n },\n \"startTime\": \"\",\n \"teamDriveInfo\": {\n \"teamDriveIds\": []\n },\n \"terms\": \"\",\n \"timeZone\": \"\",\n \"voiceOptions\": {\n \"coveredData\": []\n }\n },\n \"requester\": {\n \"displayName\": \"\",\n \"email\": \"\"\n },\n \"stats\": {\n \"exportedArtifactCount\": \"\",\n \"sizeInBytes\": \"\",\n \"totalArtifactCount\": \"\"\n },\n \"status\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/v1/matters/:matterId/exports HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 1666
{
"cloudStorageSink": {
"files": [
{
"bucketName": "",
"md5Hash": "",
"objectName": "",
"size": ""
}
]
},
"createTime": "",
"exportOptions": {
"driveOptions": {
"includeAccessInfo": false
},
"groupsOptions": {
"exportFormat": ""
},
"hangoutsChatOptions": {
"exportFormat": ""
},
"mailOptions": {
"exportFormat": "",
"showConfidentialModeContent": false,
"useNewExport": false
},
"region": "",
"voiceOptions": {
"exportFormat": ""
}
},
"id": "",
"matterId": "",
"name": "",
"query": {
"accountInfo": {
"emails": []
},
"corpus": "",
"dataScope": "",
"driveOptions": {
"clientSideEncryptedOption": "",
"includeSharedDrives": false,
"includeTeamDrives": false,
"versionDate": ""
},
"endTime": "",
"hangoutsChatInfo": {
"roomId": []
},
"hangoutsChatOptions": {
"includeRooms": false
},
"mailOptions": {
"clientSideEncryptedOption": "",
"excludeDrafts": false
},
"method": "",
"orgUnitInfo": {
"orgUnitId": ""
},
"searchMethod": "",
"sharedDriveInfo": {
"sharedDriveIds": []
},
"sitesUrlInfo": {
"urls": []
},
"startTime": "",
"teamDriveInfo": {
"teamDriveIds": []
},
"terms": "",
"timeZone": "",
"voiceOptions": {
"coveredData": []
}
},
"requester": {
"displayName": "",
"email": ""
},
"stats": {
"exportedArtifactCount": "",
"sizeInBytes": "",
"totalArtifactCount": ""
},
"status": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1/matters/:matterId/exports")
.setHeader("content-type", "application/json")
.setBody("{\n \"cloudStorageSink\": {\n \"files\": [\n {\n \"bucketName\": \"\",\n \"md5Hash\": \"\",\n \"objectName\": \"\",\n \"size\": \"\"\n }\n ]\n },\n \"createTime\": \"\",\n \"exportOptions\": {\n \"driveOptions\": {\n \"includeAccessInfo\": false\n },\n \"groupsOptions\": {\n \"exportFormat\": \"\"\n },\n \"hangoutsChatOptions\": {\n \"exportFormat\": \"\"\n },\n \"mailOptions\": {\n \"exportFormat\": \"\",\n \"showConfidentialModeContent\": false,\n \"useNewExport\": false\n },\n \"region\": \"\",\n \"voiceOptions\": {\n \"exportFormat\": \"\"\n }\n },\n \"id\": \"\",\n \"matterId\": \"\",\n \"name\": \"\",\n \"query\": {\n \"accountInfo\": {\n \"emails\": []\n },\n \"corpus\": \"\",\n \"dataScope\": \"\",\n \"driveOptions\": {\n \"clientSideEncryptedOption\": \"\",\n \"includeSharedDrives\": false,\n \"includeTeamDrives\": false,\n \"versionDate\": \"\"\n },\n \"endTime\": \"\",\n \"hangoutsChatInfo\": {\n \"roomId\": []\n },\n \"hangoutsChatOptions\": {\n \"includeRooms\": false\n },\n \"mailOptions\": {\n \"clientSideEncryptedOption\": \"\",\n \"excludeDrafts\": false\n },\n \"method\": \"\",\n \"orgUnitInfo\": {\n \"orgUnitId\": \"\"\n },\n \"searchMethod\": \"\",\n \"sharedDriveInfo\": {\n \"sharedDriveIds\": []\n },\n \"sitesUrlInfo\": {\n \"urls\": []\n },\n \"startTime\": \"\",\n \"teamDriveInfo\": {\n \"teamDriveIds\": []\n },\n \"terms\": \"\",\n \"timeZone\": \"\",\n \"voiceOptions\": {\n \"coveredData\": []\n }\n },\n \"requester\": {\n \"displayName\": \"\",\n \"email\": \"\"\n },\n \"stats\": {\n \"exportedArtifactCount\": \"\",\n \"sizeInBytes\": \"\",\n \"totalArtifactCount\": \"\"\n },\n \"status\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/matters/:matterId/exports"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"cloudStorageSink\": {\n \"files\": [\n {\n \"bucketName\": \"\",\n \"md5Hash\": \"\",\n \"objectName\": \"\",\n \"size\": \"\"\n }\n ]\n },\n \"createTime\": \"\",\n \"exportOptions\": {\n \"driveOptions\": {\n \"includeAccessInfo\": false\n },\n \"groupsOptions\": {\n \"exportFormat\": \"\"\n },\n \"hangoutsChatOptions\": {\n \"exportFormat\": \"\"\n },\n \"mailOptions\": {\n \"exportFormat\": \"\",\n \"showConfidentialModeContent\": false,\n \"useNewExport\": false\n },\n \"region\": \"\",\n \"voiceOptions\": {\n \"exportFormat\": \"\"\n }\n },\n \"id\": \"\",\n \"matterId\": \"\",\n \"name\": \"\",\n \"query\": {\n \"accountInfo\": {\n \"emails\": []\n },\n \"corpus\": \"\",\n \"dataScope\": \"\",\n \"driveOptions\": {\n \"clientSideEncryptedOption\": \"\",\n \"includeSharedDrives\": false,\n \"includeTeamDrives\": false,\n \"versionDate\": \"\"\n },\n \"endTime\": \"\",\n \"hangoutsChatInfo\": {\n \"roomId\": []\n },\n \"hangoutsChatOptions\": {\n \"includeRooms\": false\n },\n \"mailOptions\": {\n \"clientSideEncryptedOption\": \"\",\n \"excludeDrafts\": false\n },\n \"method\": \"\",\n \"orgUnitInfo\": {\n \"orgUnitId\": \"\"\n },\n \"searchMethod\": \"\",\n \"sharedDriveInfo\": {\n \"sharedDriveIds\": []\n },\n \"sitesUrlInfo\": {\n \"urls\": []\n },\n \"startTime\": \"\",\n \"teamDriveInfo\": {\n \"teamDriveIds\": []\n },\n \"terms\": \"\",\n \"timeZone\": \"\",\n \"voiceOptions\": {\n \"coveredData\": []\n }\n },\n \"requester\": {\n \"displayName\": \"\",\n \"email\": \"\"\n },\n \"stats\": {\n \"exportedArtifactCount\": \"\",\n \"sizeInBytes\": \"\",\n \"totalArtifactCount\": \"\"\n },\n \"status\": \"\"\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 \"cloudStorageSink\": {\n \"files\": [\n {\n \"bucketName\": \"\",\n \"md5Hash\": \"\",\n \"objectName\": \"\",\n \"size\": \"\"\n }\n ]\n },\n \"createTime\": \"\",\n \"exportOptions\": {\n \"driveOptions\": {\n \"includeAccessInfo\": false\n },\n \"groupsOptions\": {\n \"exportFormat\": \"\"\n },\n \"hangoutsChatOptions\": {\n \"exportFormat\": \"\"\n },\n \"mailOptions\": {\n \"exportFormat\": \"\",\n \"showConfidentialModeContent\": false,\n \"useNewExport\": false\n },\n \"region\": \"\",\n \"voiceOptions\": {\n \"exportFormat\": \"\"\n }\n },\n \"id\": \"\",\n \"matterId\": \"\",\n \"name\": \"\",\n \"query\": {\n \"accountInfo\": {\n \"emails\": []\n },\n \"corpus\": \"\",\n \"dataScope\": \"\",\n \"driveOptions\": {\n \"clientSideEncryptedOption\": \"\",\n \"includeSharedDrives\": false,\n \"includeTeamDrives\": false,\n \"versionDate\": \"\"\n },\n \"endTime\": \"\",\n \"hangoutsChatInfo\": {\n \"roomId\": []\n },\n \"hangoutsChatOptions\": {\n \"includeRooms\": false\n },\n \"mailOptions\": {\n \"clientSideEncryptedOption\": \"\",\n \"excludeDrafts\": false\n },\n \"method\": \"\",\n \"orgUnitInfo\": {\n \"orgUnitId\": \"\"\n },\n \"searchMethod\": \"\",\n \"sharedDriveInfo\": {\n \"sharedDriveIds\": []\n },\n \"sitesUrlInfo\": {\n \"urls\": []\n },\n \"startTime\": \"\",\n \"teamDriveInfo\": {\n \"teamDriveIds\": []\n },\n \"terms\": \"\",\n \"timeZone\": \"\",\n \"voiceOptions\": {\n \"coveredData\": []\n }\n },\n \"requester\": {\n \"displayName\": \"\",\n \"email\": \"\"\n },\n \"stats\": {\n \"exportedArtifactCount\": \"\",\n \"sizeInBytes\": \"\",\n \"totalArtifactCount\": \"\"\n },\n \"status\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/matters/:matterId/exports")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1/matters/:matterId/exports")
.header("content-type", "application/json")
.body("{\n \"cloudStorageSink\": {\n \"files\": [\n {\n \"bucketName\": \"\",\n \"md5Hash\": \"\",\n \"objectName\": \"\",\n \"size\": \"\"\n }\n ]\n },\n \"createTime\": \"\",\n \"exportOptions\": {\n \"driveOptions\": {\n \"includeAccessInfo\": false\n },\n \"groupsOptions\": {\n \"exportFormat\": \"\"\n },\n \"hangoutsChatOptions\": {\n \"exportFormat\": \"\"\n },\n \"mailOptions\": {\n \"exportFormat\": \"\",\n \"showConfidentialModeContent\": false,\n \"useNewExport\": false\n },\n \"region\": \"\",\n \"voiceOptions\": {\n \"exportFormat\": \"\"\n }\n },\n \"id\": \"\",\n \"matterId\": \"\",\n \"name\": \"\",\n \"query\": {\n \"accountInfo\": {\n \"emails\": []\n },\n \"corpus\": \"\",\n \"dataScope\": \"\",\n \"driveOptions\": {\n \"clientSideEncryptedOption\": \"\",\n \"includeSharedDrives\": false,\n \"includeTeamDrives\": false,\n \"versionDate\": \"\"\n },\n \"endTime\": \"\",\n \"hangoutsChatInfo\": {\n \"roomId\": []\n },\n \"hangoutsChatOptions\": {\n \"includeRooms\": false\n },\n \"mailOptions\": {\n \"clientSideEncryptedOption\": \"\",\n \"excludeDrafts\": false\n },\n \"method\": \"\",\n \"orgUnitInfo\": {\n \"orgUnitId\": \"\"\n },\n \"searchMethod\": \"\",\n \"sharedDriveInfo\": {\n \"sharedDriveIds\": []\n },\n \"sitesUrlInfo\": {\n \"urls\": []\n },\n \"startTime\": \"\",\n \"teamDriveInfo\": {\n \"teamDriveIds\": []\n },\n \"terms\": \"\",\n \"timeZone\": \"\",\n \"voiceOptions\": {\n \"coveredData\": []\n }\n },\n \"requester\": {\n \"displayName\": \"\",\n \"email\": \"\"\n },\n \"stats\": {\n \"exportedArtifactCount\": \"\",\n \"sizeInBytes\": \"\",\n \"totalArtifactCount\": \"\"\n },\n \"status\": \"\"\n}")
.asString();
const data = JSON.stringify({
cloudStorageSink: {
files: [
{
bucketName: '',
md5Hash: '',
objectName: '',
size: ''
}
]
},
createTime: '',
exportOptions: {
driveOptions: {
includeAccessInfo: false
},
groupsOptions: {
exportFormat: ''
},
hangoutsChatOptions: {
exportFormat: ''
},
mailOptions: {
exportFormat: '',
showConfidentialModeContent: false,
useNewExport: false
},
region: '',
voiceOptions: {
exportFormat: ''
}
},
id: '',
matterId: '',
name: '',
query: {
accountInfo: {
emails: []
},
corpus: '',
dataScope: '',
driveOptions: {
clientSideEncryptedOption: '',
includeSharedDrives: false,
includeTeamDrives: false,
versionDate: ''
},
endTime: '',
hangoutsChatInfo: {
roomId: []
},
hangoutsChatOptions: {
includeRooms: false
},
mailOptions: {
clientSideEncryptedOption: '',
excludeDrafts: false
},
method: '',
orgUnitInfo: {
orgUnitId: ''
},
searchMethod: '',
sharedDriveInfo: {
sharedDriveIds: []
},
sitesUrlInfo: {
urls: []
},
startTime: '',
teamDriveInfo: {
teamDriveIds: []
},
terms: '',
timeZone: '',
voiceOptions: {
coveredData: []
}
},
requester: {
displayName: '',
email: ''
},
stats: {
exportedArtifactCount: '',
sizeInBytes: '',
totalArtifactCount: ''
},
status: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v1/matters/:matterId/exports');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/matters/:matterId/exports',
headers: {'content-type': 'application/json'},
data: {
cloudStorageSink: {files: [{bucketName: '', md5Hash: '', objectName: '', size: ''}]},
createTime: '',
exportOptions: {
driveOptions: {includeAccessInfo: false},
groupsOptions: {exportFormat: ''},
hangoutsChatOptions: {exportFormat: ''},
mailOptions: {exportFormat: '', showConfidentialModeContent: false, useNewExport: false},
region: '',
voiceOptions: {exportFormat: ''}
},
id: '',
matterId: '',
name: '',
query: {
accountInfo: {emails: []},
corpus: '',
dataScope: '',
driveOptions: {
clientSideEncryptedOption: '',
includeSharedDrives: false,
includeTeamDrives: false,
versionDate: ''
},
endTime: '',
hangoutsChatInfo: {roomId: []},
hangoutsChatOptions: {includeRooms: false},
mailOptions: {clientSideEncryptedOption: '', excludeDrafts: false},
method: '',
orgUnitInfo: {orgUnitId: ''},
searchMethod: '',
sharedDriveInfo: {sharedDriveIds: []},
sitesUrlInfo: {urls: []},
startTime: '',
teamDriveInfo: {teamDriveIds: []},
terms: '',
timeZone: '',
voiceOptions: {coveredData: []}
},
requester: {displayName: '', email: ''},
stats: {exportedArtifactCount: '', sizeInBytes: '', totalArtifactCount: ''},
status: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/matters/:matterId/exports';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"cloudStorageSink":{"files":[{"bucketName":"","md5Hash":"","objectName":"","size":""}]},"createTime":"","exportOptions":{"driveOptions":{"includeAccessInfo":false},"groupsOptions":{"exportFormat":""},"hangoutsChatOptions":{"exportFormat":""},"mailOptions":{"exportFormat":"","showConfidentialModeContent":false,"useNewExport":false},"region":"","voiceOptions":{"exportFormat":""}},"id":"","matterId":"","name":"","query":{"accountInfo":{"emails":[]},"corpus":"","dataScope":"","driveOptions":{"clientSideEncryptedOption":"","includeSharedDrives":false,"includeTeamDrives":false,"versionDate":""},"endTime":"","hangoutsChatInfo":{"roomId":[]},"hangoutsChatOptions":{"includeRooms":false},"mailOptions":{"clientSideEncryptedOption":"","excludeDrafts":false},"method":"","orgUnitInfo":{"orgUnitId":""},"searchMethod":"","sharedDriveInfo":{"sharedDriveIds":[]},"sitesUrlInfo":{"urls":[]},"startTime":"","teamDriveInfo":{"teamDriveIds":[]},"terms":"","timeZone":"","voiceOptions":{"coveredData":[]}},"requester":{"displayName":"","email":""},"stats":{"exportedArtifactCount":"","sizeInBytes":"","totalArtifactCount":""},"status":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/matters/:matterId/exports',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "cloudStorageSink": {\n "files": [\n {\n "bucketName": "",\n "md5Hash": "",\n "objectName": "",\n "size": ""\n }\n ]\n },\n "createTime": "",\n "exportOptions": {\n "driveOptions": {\n "includeAccessInfo": false\n },\n "groupsOptions": {\n "exportFormat": ""\n },\n "hangoutsChatOptions": {\n "exportFormat": ""\n },\n "mailOptions": {\n "exportFormat": "",\n "showConfidentialModeContent": false,\n "useNewExport": false\n },\n "region": "",\n "voiceOptions": {\n "exportFormat": ""\n }\n },\n "id": "",\n "matterId": "",\n "name": "",\n "query": {\n "accountInfo": {\n "emails": []\n },\n "corpus": "",\n "dataScope": "",\n "driveOptions": {\n "clientSideEncryptedOption": "",\n "includeSharedDrives": false,\n "includeTeamDrives": false,\n "versionDate": ""\n },\n "endTime": "",\n "hangoutsChatInfo": {\n "roomId": []\n },\n "hangoutsChatOptions": {\n "includeRooms": false\n },\n "mailOptions": {\n "clientSideEncryptedOption": "",\n "excludeDrafts": false\n },\n "method": "",\n "orgUnitInfo": {\n "orgUnitId": ""\n },\n "searchMethod": "",\n "sharedDriveInfo": {\n "sharedDriveIds": []\n },\n "sitesUrlInfo": {\n "urls": []\n },\n "startTime": "",\n "teamDriveInfo": {\n "teamDriveIds": []\n },\n "terms": "",\n "timeZone": "",\n "voiceOptions": {\n "coveredData": []\n }\n },\n "requester": {\n "displayName": "",\n "email": ""\n },\n "stats": {\n "exportedArtifactCount": "",\n "sizeInBytes": "",\n "totalArtifactCount": ""\n },\n "status": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"cloudStorageSink\": {\n \"files\": [\n {\n \"bucketName\": \"\",\n \"md5Hash\": \"\",\n \"objectName\": \"\",\n \"size\": \"\"\n }\n ]\n },\n \"createTime\": \"\",\n \"exportOptions\": {\n \"driveOptions\": {\n \"includeAccessInfo\": false\n },\n \"groupsOptions\": {\n \"exportFormat\": \"\"\n },\n \"hangoutsChatOptions\": {\n \"exportFormat\": \"\"\n },\n \"mailOptions\": {\n \"exportFormat\": \"\",\n \"showConfidentialModeContent\": false,\n \"useNewExport\": false\n },\n \"region\": \"\",\n \"voiceOptions\": {\n \"exportFormat\": \"\"\n }\n },\n \"id\": \"\",\n \"matterId\": \"\",\n \"name\": \"\",\n \"query\": {\n \"accountInfo\": {\n \"emails\": []\n },\n \"corpus\": \"\",\n \"dataScope\": \"\",\n \"driveOptions\": {\n \"clientSideEncryptedOption\": \"\",\n \"includeSharedDrives\": false,\n \"includeTeamDrives\": false,\n \"versionDate\": \"\"\n },\n \"endTime\": \"\",\n \"hangoutsChatInfo\": {\n \"roomId\": []\n },\n \"hangoutsChatOptions\": {\n \"includeRooms\": false\n },\n \"mailOptions\": {\n \"clientSideEncryptedOption\": \"\",\n \"excludeDrafts\": false\n },\n \"method\": \"\",\n \"orgUnitInfo\": {\n \"orgUnitId\": \"\"\n },\n \"searchMethod\": \"\",\n \"sharedDriveInfo\": {\n \"sharedDriveIds\": []\n },\n \"sitesUrlInfo\": {\n \"urls\": []\n },\n \"startTime\": \"\",\n \"teamDriveInfo\": {\n \"teamDriveIds\": []\n },\n \"terms\": \"\",\n \"timeZone\": \"\",\n \"voiceOptions\": {\n \"coveredData\": []\n }\n },\n \"requester\": {\n \"displayName\": \"\",\n \"email\": \"\"\n },\n \"stats\": {\n \"exportedArtifactCount\": \"\",\n \"sizeInBytes\": \"\",\n \"totalArtifactCount\": \"\"\n },\n \"status\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1/matters/:matterId/exports")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/matters/:matterId/exports',
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({
cloudStorageSink: {files: [{bucketName: '', md5Hash: '', objectName: '', size: ''}]},
createTime: '',
exportOptions: {
driveOptions: {includeAccessInfo: false},
groupsOptions: {exportFormat: ''},
hangoutsChatOptions: {exportFormat: ''},
mailOptions: {exportFormat: '', showConfidentialModeContent: false, useNewExport: false},
region: '',
voiceOptions: {exportFormat: ''}
},
id: '',
matterId: '',
name: '',
query: {
accountInfo: {emails: []},
corpus: '',
dataScope: '',
driveOptions: {
clientSideEncryptedOption: '',
includeSharedDrives: false,
includeTeamDrives: false,
versionDate: ''
},
endTime: '',
hangoutsChatInfo: {roomId: []},
hangoutsChatOptions: {includeRooms: false},
mailOptions: {clientSideEncryptedOption: '', excludeDrafts: false},
method: '',
orgUnitInfo: {orgUnitId: ''},
searchMethod: '',
sharedDriveInfo: {sharedDriveIds: []},
sitesUrlInfo: {urls: []},
startTime: '',
teamDriveInfo: {teamDriveIds: []},
terms: '',
timeZone: '',
voiceOptions: {coveredData: []}
},
requester: {displayName: '', email: ''},
stats: {exportedArtifactCount: '', sizeInBytes: '', totalArtifactCount: ''},
status: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/matters/:matterId/exports',
headers: {'content-type': 'application/json'},
body: {
cloudStorageSink: {files: [{bucketName: '', md5Hash: '', objectName: '', size: ''}]},
createTime: '',
exportOptions: {
driveOptions: {includeAccessInfo: false},
groupsOptions: {exportFormat: ''},
hangoutsChatOptions: {exportFormat: ''},
mailOptions: {exportFormat: '', showConfidentialModeContent: false, useNewExport: false},
region: '',
voiceOptions: {exportFormat: ''}
},
id: '',
matterId: '',
name: '',
query: {
accountInfo: {emails: []},
corpus: '',
dataScope: '',
driveOptions: {
clientSideEncryptedOption: '',
includeSharedDrives: false,
includeTeamDrives: false,
versionDate: ''
},
endTime: '',
hangoutsChatInfo: {roomId: []},
hangoutsChatOptions: {includeRooms: false},
mailOptions: {clientSideEncryptedOption: '', excludeDrafts: false},
method: '',
orgUnitInfo: {orgUnitId: ''},
searchMethod: '',
sharedDriveInfo: {sharedDriveIds: []},
sitesUrlInfo: {urls: []},
startTime: '',
teamDriveInfo: {teamDriveIds: []},
terms: '',
timeZone: '',
voiceOptions: {coveredData: []}
},
requester: {displayName: '', email: ''},
stats: {exportedArtifactCount: '', sizeInBytes: '', totalArtifactCount: ''},
status: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/v1/matters/:matterId/exports');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
cloudStorageSink: {
files: [
{
bucketName: '',
md5Hash: '',
objectName: '',
size: ''
}
]
},
createTime: '',
exportOptions: {
driveOptions: {
includeAccessInfo: false
},
groupsOptions: {
exportFormat: ''
},
hangoutsChatOptions: {
exportFormat: ''
},
mailOptions: {
exportFormat: '',
showConfidentialModeContent: false,
useNewExport: false
},
region: '',
voiceOptions: {
exportFormat: ''
}
},
id: '',
matterId: '',
name: '',
query: {
accountInfo: {
emails: []
},
corpus: '',
dataScope: '',
driveOptions: {
clientSideEncryptedOption: '',
includeSharedDrives: false,
includeTeamDrives: false,
versionDate: ''
},
endTime: '',
hangoutsChatInfo: {
roomId: []
},
hangoutsChatOptions: {
includeRooms: false
},
mailOptions: {
clientSideEncryptedOption: '',
excludeDrafts: false
},
method: '',
orgUnitInfo: {
orgUnitId: ''
},
searchMethod: '',
sharedDriveInfo: {
sharedDriveIds: []
},
sitesUrlInfo: {
urls: []
},
startTime: '',
teamDriveInfo: {
teamDriveIds: []
},
terms: '',
timeZone: '',
voiceOptions: {
coveredData: []
}
},
requester: {
displayName: '',
email: ''
},
stats: {
exportedArtifactCount: '',
sizeInBytes: '',
totalArtifactCount: ''
},
status: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/matters/:matterId/exports',
headers: {'content-type': 'application/json'},
data: {
cloudStorageSink: {files: [{bucketName: '', md5Hash: '', objectName: '', size: ''}]},
createTime: '',
exportOptions: {
driveOptions: {includeAccessInfo: false},
groupsOptions: {exportFormat: ''},
hangoutsChatOptions: {exportFormat: ''},
mailOptions: {exportFormat: '', showConfidentialModeContent: false, useNewExport: false},
region: '',
voiceOptions: {exportFormat: ''}
},
id: '',
matterId: '',
name: '',
query: {
accountInfo: {emails: []},
corpus: '',
dataScope: '',
driveOptions: {
clientSideEncryptedOption: '',
includeSharedDrives: false,
includeTeamDrives: false,
versionDate: ''
},
endTime: '',
hangoutsChatInfo: {roomId: []},
hangoutsChatOptions: {includeRooms: false},
mailOptions: {clientSideEncryptedOption: '', excludeDrafts: false},
method: '',
orgUnitInfo: {orgUnitId: ''},
searchMethod: '',
sharedDriveInfo: {sharedDriveIds: []},
sitesUrlInfo: {urls: []},
startTime: '',
teamDriveInfo: {teamDriveIds: []},
terms: '',
timeZone: '',
voiceOptions: {coveredData: []}
},
requester: {displayName: '', email: ''},
stats: {exportedArtifactCount: '', sizeInBytes: '', totalArtifactCount: ''},
status: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/matters/:matterId/exports';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"cloudStorageSink":{"files":[{"bucketName":"","md5Hash":"","objectName":"","size":""}]},"createTime":"","exportOptions":{"driveOptions":{"includeAccessInfo":false},"groupsOptions":{"exportFormat":""},"hangoutsChatOptions":{"exportFormat":""},"mailOptions":{"exportFormat":"","showConfidentialModeContent":false,"useNewExport":false},"region":"","voiceOptions":{"exportFormat":""}},"id":"","matterId":"","name":"","query":{"accountInfo":{"emails":[]},"corpus":"","dataScope":"","driveOptions":{"clientSideEncryptedOption":"","includeSharedDrives":false,"includeTeamDrives":false,"versionDate":""},"endTime":"","hangoutsChatInfo":{"roomId":[]},"hangoutsChatOptions":{"includeRooms":false},"mailOptions":{"clientSideEncryptedOption":"","excludeDrafts":false},"method":"","orgUnitInfo":{"orgUnitId":""},"searchMethod":"","sharedDriveInfo":{"sharedDriveIds":[]},"sitesUrlInfo":{"urls":[]},"startTime":"","teamDriveInfo":{"teamDriveIds":[]},"terms":"","timeZone":"","voiceOptions":{"coveredData":[]}},"requester":{"displayName":"","email":""},"stats":{"exportedArtifactCount":"","sizeInBytes":"","totalArtifactCount":""},"status":""}'
};
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 = @{ @"cloudStorageSink": @{ @"files": @[ @{ @"bucketName": @"", @"md5Hash": @"", @"objectName": @"", @"size": @"" } ] },
@"createTime": @"",
@"exportOptions": @{ @"driveOptions": @{ @"includeAccessInfo": @NO }, @"groupsOptions": @{ @"exportFormat": @"" }, @"hangoutsChatOptions": @{ @"exportFormat": @"" }, @"mailOptions": @{ @"exportFormat": @"", @"showConfidentialModeContent": @NO, @"useNewExport": @NO }, @"region": @"", @"voiceOptions": @{ @"exportFormat": @"" } },
@"id": @"",
@"matterId": @"",
@"name": @"",
@"query": @{ @"accountInfo": @{ @"emails": @[ ] }, @"corpus": @"", @"dataScope": @"", @"driveOptions": @{ @"clientSideEncryptedOption": @"", @"includeSharedDrives": @NO, @"includeTeamDrives": @NO, @"versionDate": @"" }, @"endTime": @"", @"hangoutsChatInfo": @{ @"roomId": @[ ] }, @"hangoutsChatOptions": @{ @"includeRooms": @NO }, @"mailOptions": @{ @"clientSideEncryptedOption": @"", @"excludeDrafts": @NO }, @"method": @"", @"orgUnitInfo": @{ @"orgUnitId": @"" }, @"searchMethod": @"", @"sharedDriveInfo": @{ @"sharedDriveIds": @[ ] }, @"sitesUrlInfo": @{ @"urls": @[ ] }, @"startTime": @"", @"teamDriveInfo": @{ @"teamDriveIds": @[ ] }, @"terms": @"", @"timeZone": @"", @"voiceOptions": @{ @"coveredData": @[ ] } },
@"requester": @{ @"displayName": @"", @"email": @"" },
@"stats": @{ @"exportedArtifactCount": @"", @"sizeInBytes": @"", @"totalArtifactCount": @"" },
@"status": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/matters/:matterId/exports"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/matters/:matterId/exports" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"cloudStorageSink\": {\n \"files\": [\n {\n \"bucketName\": \"\",\n \"md5Hash\": \"\",\n \"objectName\": \"\",\n \"size\": \"\"\n }\n ]\n },\n \"createTime\": \"\",\n \"exportOptions\": {\n \"driveOptions\": {\n \"includeAccessInfo\": false\n },\n \"groupsOptions\": {\n \"exportFormat\": \"\"\n },\n \"hangoutsChatOptions\": {\n \"exportFormat\": \"\"\n },\n \"mailOptions\": {\n \"exportFormat\": \"\",\n \"showConfidentialModeContent\": false,\n \"useNewExport\": false\n },\n \"region\": \"\",\n \"voiceOptions\": {\n \"exportFormat\": \"\"\n }\n },\n \"id\": \"\",\n \"matterId\": \"\",\n \"name\": \"\",\n \"query\": {\n \"accountInfo\": {\n \"emails\": []\n },\n \"corpus\": \"\",\n \"dataScope\": \"\",\n \"driveOptions\": {\n \"clientSideEncryptedOption\": \"\",\n \"includeSharedDrives\": false,\n \"includeTeamDrives\": false,\n \"versionDate\": \"\"\n },\n \"endTime\": \"\",\n \"hangoutsChatInfo\": {\n \"roomId\": []\n },\n \"hangoutsChatOptions\": {\n \"includeRooms\": false\n },\n \"mailOptions\": {\n \"clientSideEncryptedOption\": \"\",\n \"excludeDrafts\": false\n },\n \"method\": \"\",\n \"orgUnitInfo\": {\n \"orgUnitId\": \"\"\n },\n \"searchMethod\": \"\",\n \"sharedDriveInfo\": {\n \"sharedDriveIds\": []\n },\n \"sitesUrlInfo\": {\n \"urls\": []\n },\n \"startTime\": \"\",\n \"teamDriveInfo\": {\n \"teamDriveIds\": []\n },\n \"terms\": \"\",\n \"timeZone\": \"\",\n \"voiceOptions\": {\n \"coveredData\": []\n }\n },\n \"requester\": {\n \"displayName\": \"\",\n \"email\": \"\"\n },\n \"stats\": {\n \"exportedArtifactCount\": \"\",\n \"sizeInBytes\": \"\",\n \"totalArtifactCount\": \"\"\n },\n \"status\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/matters/:matterId/exports",
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([
'cloudStorageSink' => [
'files' => [
[
'bucketName' => '',
'md5Hash' => '',
'objectName' => '',
'size' => ''
]
]
],
'createTime' => '',
'exportOptions' => [
'driveOptions' => [
'includeAccessInfo' => null
],
'groupsOptions' => [
'exportFormat' => ''
],
'hangoutsChatOptions' => [
'exportFormat' => ''
],
'mailOptions' => [
'exportFormat' => '',
'showConfidentialModeContent' => null,
'useNewExport' => null
],
'region' => '',
'voiceOptions' => [
'exportFormat' => ''
]
],
'id' => '',
'matterId' => '',
'name' => '',
'query' => [
'accountInfo' => [
'emails' => [
]
],
'corpus' => '',
'dataScope' => '',
'driveOptions' => [
'clientSideEncryptedOption' => '',
'includeSharedDrives' => null,
'includeTeamDrives' => null,
'versionDate' => ''
],
'endTime' => '',
'hangoutsChatInfo' => [
'roomId' => [
]
],
'hangoutsChatOptions' => [
'includeRooms' => null
],
'mailOptions' => [
'clientSideEncryptedOption' => '',
'excludeDrafts' => null
],
'method' => '',
'orgUnitInfo' => [
'orgUnitId' => ''
],
'searchMethod' => '',
'sharedDriveInfo' => [
'sharedDriveIds' => [
]
],
'sitesUrlInfo' => [
'urls' => [
]
],
'startTime' => '',
'teamDriveInfo' => [
'teamDriveIds' => [
]
],
'terms' => '',
'timeZone' => '',
'voiceOptions' => [
'coveredData' => [
]
]
],
'requester' => [
'displayName' => '',
'email' => ''
],
'stats' => [
'exportedArtifactCount' => '',
'sizeInBytes' => '',
'totalArtifactCount' => ''
],
'status' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/v1/matters/:matterId/exports', [
'body' => '{
"cloudStorageSink": {
"files": [
{
"bucketName": "",
"md5Hash": "",
"objectName": "",
"size": ""
}
]
},
"createTime": "",
"exportOptions": {
"driveOptions": {
"includeAccessInfo": false
},
"groupsOptions": {
"exportFormat": ""
},
"hangoutsChatOptions": {
"exportFormat": ""
},
"mailOptions": {
"exportFormat": "",
"showConfidentialModeContent": false,
"useNewExport": false
},
"region": "",
"voiceOptions": {
"exportFormat": ""
}
},
"id": "",
"matterId": "",
"name": "",
"query": {
"accountInfo": {
"emails": []
},
"corpus": "",
"dataScope": "",
"driveOptions": {
"clientSideEncryptedOption": "",
"includeSharedDrives": false,
"includeTeamDrives": false,
"versionDate": ""
},
"endTime": "",
"hangoutsChatInfo": {
"roomId": []
},
"hangoutsChatOptions": {
"includeRooms": false
},
"mailOptions": {
"clientSideEncryptedOption": "",
"excludeDrafts": false
},
"method": "",
"orgUnitInfo": {
"orgUnitId": ""
},
"searchMethod": "",
"sharedDriveInfo": {
"sharedDriveIds": []
},
"sitesUrlInfo": {
"urls": []
},
"startTime": "",
"teamDriveInfo": {
"teamDriveIds": []
},
"terms": "",
"timeZone": "",
"voiceOptions": {
"coveredData": []
}
},
"requester": {
"displayName": "",
"email": ""
},
"stats": {
"exportedArtifactCount": "",
"sizeInBytes": "",
"totalArtifactCount": ""
},
"status": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1/matters/:matterId/exports');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'cloudStorageSink' => [
'files' => [
[
'bucketName' => '',
'md5Hash' => '',
'objectName' => '',
'size' => ''
]
]
],
'createTime' => '',
'exportOptions' => [
'driveOptions' => [
'includeAccessInfo' => null
],
'groupsOptions' => [
'exportFormat' => ''
],
'hangoutsChatOptions' => [
'exportFormat' => ''
],
'mailOptions' => [
'exportFormat' => '',
'showConfidentialModeContent' => null,
'useNewExport' => null
],
'region' => '',
'voiceOptions' => [
'exportFormat' => ''
]
],
'id' => '',
'matterId' => '',
'name' => '',
'query' => [
'accountInfo' => [
'emails' => [
]
],
'corpus' => '',
'dataScope' => '',
'driveOptions' => [
'clientSideEncryptedOption' => '',
'includeSharedDrives' => null,
'includeTeamDrives' => null,
'versionDate' => ''
],
'endTime' => '',
'hangoutsChatInfo' => [
'roomId' => [
]
],
'hangoutsChatOptions' => [
'includeRooms' => null
],
'mailOptions' => [
'clientSideEncryptedOption' => '',
'excludeDrafts' => null
],
'method' => '',
'orgUnitInfo' => [
'orgUnitId' => ''
],
'searchMethod' => '',
'sharedDriveInfo' => [
'sharedDriveIds' => [
]
],
'sitesUrlInfo' => [
'urls' => [
]
],
'startTime' => '',
'teamDriveInfo' => [
'teamDriveIds' => [
]
],
'terms' => '',
'timeZone' => '',
'voiceOptions' => [
'coveredData' => [
]
]
],
'requester' => [
'displayName' => '',
'email' => ''
],
'stats' => [
'exportedArtifactCount' => '',
'sizeInBytes' => '',
'totalArtifactCount' => ''
],
'status' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'cloudStorageSink' => [
'files' => [
[
'bucketName' => '',
'md5Hash' => '',
'objectName' => '',
'size' => ''
]
]
],
'createTime' => '',
'exportOptions' => [
'driveOptions' => [
'includeAccessInfo' => null
],
'groupsOptions' => [
'exportFormat' => ''
],
'hangoutsChatOptions' => [
'exportFormat' => ''
],
'mailOptions' => [
'exportFormat' => '',
'showConfidentialModeContent' => null,
'useNewExport' => null
],
'region' => '',
'voiceOptions' => [
'exportFormat' => ''
]
],
'id' => '',
'matterId' => '',
'name' => '',
'query' => [
'accountInfo' => [
'emails' => [
]
],
'corpus' => '',
'dataScope' => '',
'driveOptions' => [
'clientSideEncryptedOption' => '',
'includeSharedDrives' => null,
'includeTeamDrives' => null,
'versionDate' => ''
],
'endTime' => '',
'hangoutsChatInfo' => [
'roomId' => [
]
],
'hangoutsChatOptions' => [
'includeRooms' => null
],
'mailOptions' => [
'clientSideEncryptedOption' => '',
'excludeDrafts' => null
],
'method' => '',
'orgUnitInfo' => [
'orgUnitId' => ''
],
'searchMethod' => '',
'sharedDriveInfo' => [
'sharedDriveIds' => [
]
],
'sitesUrlInfo' => [
'urls' => [
]
],
'startTime' => '',
'teamDriveInfo' => [
'teamDriveIds' => [
]
],
'terms' => '',
'timeZone' => '',
'voiceOptions' => [
'coveredData' => [
]
]
],
'requester' => [
'displayName' => '',
'email' => ''
],
'stats' => [
'exportedArtifactCount' => '',
'sizeInBytes' => '',
'totalArtifactCount' => ''
],
'status' => ''
]));
$request->setRequestUrl('{{baseUrl}}/v1/matters/:matterId/exports');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/matters/:matterId/exports' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"cloudStorageSink": {
"files": [
{
"bucketName": "",
"md5Hash": "",
"objectName": "",
"size": ""
}
]
},
"createTime": "",
"exportOptions": {
"driveOptions": {
"includeAccessInfo": false
},
"groupsOptions": {
"exportFormat": ""
},
"hangoutsChatOptions": {
"exportFormat": ""
},
"mailOptions": {
"exportFormat": "",
"showConfidentialModeContent": false,
"useNewExport": false
},
"region": "",
"voiceOptions": {
"exportFormat": ""
}
},
"id": "",
"matterId": "",
"name": "",
"query": {
"accountInfo": {
"emails": []
},
"corpus": "",
"dataScope": "",
"driveOptions": {
"clientSideEncryptedOption": "",
"includeSharedDrives": false,
"includeTeamDrives": false,
"versionDate": ""
},
"endTime": "",
"hangoutsChatInfo": {
"roomId": []
},
"hangoutsChatOptions": {
"includeRooms": false
},
"mailOptions": {
"clientSideEncryptedOption": "",
"excludeDrafts": false
},
"method": "",
"orgUnitInfo": {
"orgUnitId": ""
},
"searchMethod": "",
"sharedDriveInfo": {
"sharedDriveIds": []
},
"sitesUrlInfo": {
"urls": []
},
"startTime": "",
"teamDriveInfo": {
"teamDriveIds": []
},
"terms": "",
"timeZone": "",
"voiceOptions": {
"coveredData": []
}
},
"requester": {
"displayName": "",
"email": ""
},
"stats": {
"exportedArtifactCount": "",
"sizeInBytes": "",
"totalArtifactCount": ""
},
"status": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/matters/:matterId/exports' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"cloudStorageSink": {
"files": [
{
"bucketName": "",
"md5Hash": "",
"objectName": "",
"size": ""
}
]
},
"createTime": "",
"exportOptions": {
"driveOptions": {
"includeAccessInfo": false
},
"groupsOptions": {
"exportFormat": ""
},
"hangoutsChatOptions": {
"exportFormat": ""
},
"mailOptions": {
"exportFormat": "",
"showConfidentialModeContent": false,
"useNewExport": false
},
"region": "",
"voiceOptions": {
"exportFormat": ""
}
},
"id": "",
"matterId": "",
"name": "",
"query": {
"accountInfo": {
"emails": []
},
"corpus": "",
"dataScope": "",
"driveOptions": {
"clientSideEncryptedOption": "",
"includeSharedDrives": false,
"includeTeamDrives": false,
"versionDate": ""
},
"endTime": "",
"hangoutsChatInfo": {
"roomId": []
},
"hangoutsChatOptions": {
"includeRooms": false
},
"mailOptions": {
"clientSideEncryptedOption": "",
"excludeDrafts": false
},
"method": "",
"orgUnitInfo": {
"orgUnitId": ""
},
"searchMethod": "",
"sharedDriveInfo": {
"sharedDriveIds": []
},
"sitesUrlInfo": {
"urls": []
},
"startTime": "",
"teamDriveInfo": {
"teamDriveIds": []
},
"terms": "",
"timeZone": "",
"voiceOptions": {
"coveredData": []
}
},
"requester": {
"displayName": "",
"email": ""
},
"stats": {
"exportedArtifactCount": "",
"sizeInBytes": "",
"totalArtifactCount": ""
},
"status": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"cloudStorageSink\": {\n \"files\": [\n {\n \"bucketName\": \"\",\n \"md5Hash\": \"\",\n \"objectName\": \"\",\n \"size\": \"\"\n }\n ]\n },\n \"createTime\": \"\",\n \"exportOptions\": {\n \"driveOptions\": {\n \"includeAccessInfo\": false\n },\n \"groupsOptions\": {\n \"exportFormat\": \"\"\n },\n \"hangoutsChatOptions\": {\n \"exportFormat\": \"\"\n },\n \"mailOptions\": {\n \"exportFormat\": \"\",\n \"showConfidentialModeContent\": false,\n \"useNewExport\": false\n },\n \"region\": \"\",\n \"voiceOptions\": {\n \"exportFormat\": \"\"\n }\n },\n \"id\": \"\",\n \"matterId\": \"\",\n \"name\": \"\",\n \"query\": {\n \"accountInfo\": {\n \"emails\": []\n },\n \"corpus\": \"\",\n \"dataScope\": \"\",\n \"driveOptions\": {\n \"clientSideEncryptedOption\": \"\",\n \"includeSharedDrives\": false,\n \"includeTeamDrives\": false,\n \"versionDate\": \"\"\n },\n \"endTime\": \"\",\n \"hangoutsChatInfo\": {\n \"roomId\": []\n },\n \"hangoutsChatOptions\": {\n \"includeRooms\": false\n },\n \"mailOptions\": {\n \"clientSideEncryptedOption\": \"\",\n \"excludeDrafts\": false\n },\n \"method\": \"\",\n \"orgUnitInfo\": {\n \"orgUnitId\": \"\"\n },\n \"searchMethod\": \"\",\n \"sharedDriveInfo\": {\n \"sharedDriveIds\": []\n },\n \"sitesUrlInfo\": {\n \"urls\": []\n },\n \"startTime\": \"\",\n \"teamDriveInfo\": {\n \"teamDriveIds\": []\n },\n \"terms\": \"\",\n \"timeZone\": \"\",\n \"voiceOptions\": {\n \"coveredData\": []\n }\n },\n \"requester\": {\n \"displayName\": \"\",\n \"email\": \"\"\n },\n \"stats\": {\n \"exportedArtifactCount\": \"\",\n \"sizeInBytes\": \"\",\n \"totalArtifactCount\": \"\"\n },\n \"status\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1/matters/:matterId/exports", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/matters/:matterId/exports"
payload = {
"cloudStorageSink": { "files": [
{
"bucketName": "",
"md5Hash": "",
"objectName": "",
"size": ""
}
] },
"createTime": "",
"exportOptions": {
"driveOptions": { "includeAccessInfo": False },
"groupsOptions": { "exportFormat": "" },
"hangoutsChatOptions": { "exportFormat": "" },
"mailOptions": {
"exportFormat": "",
"showConfidentialModeContent": False,
"useNewExport": False
},
"region": "",
"voiceOptions": { "exportFormat": "" }
},
"id": "",
"matterId": "",
"name": "",
"query": {
"accountInfo": { "emails": [] },
"corpus": "",
"dataScope": "",
"driveOptions": {
"clientSideEncryptedOption": "",
"includeSharedDrives": False,
"includeTeamDrives": False,
"versionDate": ""
},
"endTime": "",
"hangoutsChatInfo": { "roomId": [] },
"hangoutsChatOptions": { "includeRooms": False },
"mailOptions": {
"clientSideEncryptedOption": "",
"excludeDrafts": False
},
"method": "",
"orgUnitInfo": { "orgUnitId": "" },
"searchMethod": "",
"sharedDriveInfo": { "sharedDriveIds": [] },
"sitesUrlInfo": { "urls": [] },
"startTime": "",
"teamDriveInfo": { "teamDriveIds": [] },
"terms": "",
"timeZone": "",
"voiceOptions": { "coveredData": [] }
},
"requester": {
"displayName": "",
"email": ""
},
"stats": {
"exportedArtifactCount": "",
"sizeInBytes": "",
"totalArtifactCount": ""
},
"status": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/matters/:matterId/exports"
payload <- "{\n \"cloudStorageSink\": {\n \"files\": [\n {\n \"bucketName\": \"\",\n \"md5Hash\": \"\",\n \"objectName\": \"\",\n \"size\": \"\"\n }\n ]\n },\n \"createTime\": \"\",\n \"exportOptions\": {\n \"driveOptions\": {\n \"includeAccessInfo\": false\n },\n \"groupsOptions\": {\n \"exportFormat\": \"\"\n },\n \"hangoutsChatOptions\": {\n \"exportFormat\": \"\"\n },\n \"mailOptions\": {\n \"exportFormat\": \"\",\n \"showConfidentialModeContent\": false,\n \"useNewExport\": false\n },\n \"region\": \"\",\n \"voiceOptions\": {\n \"exportFormat\": \"\"\n }\n },\n \"id\": \"\",\n \"matterId\": \"\",\n \"name\": \"\",\n \"query\": {\n \"accountInfo\": {\n \"emails\": []\n },\n \"corpus\": \"\",\n \"dataScope\": \"\",\n \"driveOptions\": {\n \"clientSideEncryptedOption\": \"\",\n \"includeSharedDrives\": false,\n \"includeTeamDrives\": false,\n \"versionDate\": \"\"\n },\n \"endTime\": \"\",\n \"hangoutsChatInfo\": {\n \"roomId\": []\n },\n \"hangoutsChatOptions\": {\n \"includeRooms\": false\n },\n \"mailOptions\": {\n \"clientSideEncryptedOption\": \"\",\n \"excludeDrafts\": false\n },\n \"method\": \"\",\n \"orgUnitInfo\": {\n \"orgUnitId\": \"\"\n },\n \"searchMethod\": \"\",\n \"sharedDriveInfo\": {\n \"sharedDriveIds\": []\n },\n \"sitesUrlInfo\": {\n \"urls\": []\n },\n \"startTime\": \"\",\n \"teamDriveInfo\": {\n \"teamDriveIds\": []\n },\n \"terms\": \"\",\n \"timeZone\": \"\",\n \"voiceOptions\": {\n \"coveredData\": []\n }\n },\n \"requester\": {\n \"displayName\": \"\",\n \"email\": \"\"\n },\n \"stats\": {\n \"exportedArtifactCount\": \"\",\n \"sizeInBytes\": \"\",\n \"totalArtifactCount\": \"\"\n },\n \"status\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/matters/:matterId/exports")
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 \"cloudStorageSink\": {\n \"files\": [\n {\n \"bucketName\": \"\",\n \"md5Hash\": \"\",\n \"objectName\": \"\",\n \"size\": \"\"\n }\n ]\n },\n \"createTime\": \"\",\n \"exportOptions\": {\n \"driveOptions\": {\n \"includeAccessInfo\": false\n },\n \"groupsOptions\": {\n \"exportFormat\": \"\"\n },\n \"hangoutsChatOptions\": {\n \"exportFormat\": \"\"\n },\n \"mailOptions\": {\n \"exportFormat\": \"\",\n \"showConfidentialModeContent\": false,\n \"useNewExport\": false\n },\n \"region\": \"\",\n \"voiceOptions\": {\n \"exportFormat\": \"\"\n }\n },\n \"id\": \"\",\n \"matterId\": \"\",\n \"name\": \"\",\n \"query\": {\n \"accountInfo\": {\n \"emails\": []\n },\n \"corpus\": \"\",\n \"dataScope\": \"\",\n \"driveOptions\": {\n \"clientSideEncryptedOption\": \"\",\n \"includeSharedDrives\": false,\n \"includeTeamDrives\": false,\n \"versionDate\": \"\"\n },\n \"endTime\": \"\",\n \"hangoutsChatInfo\": {\n \"roomId\": []\n },\n \"hangoutsChatOptions\": {\n \"includeRooms\": false\n },\n \"mailOptions\": {\n \"clientSideEncryptedOption\": \"\",\n \"excludeDrafts\": false\n },\n \"method\": \"\",\n \"orgUnitInfo\": {\n \"orgUnitId\": \"\"\n },\n \"searchMethod\": \"\",\n \"sharedDriveInfo\": {\n \"sharedDriveIds\": []\n },\n \"sitesUrlInfo\": {\n \"urls\": []\n },\n \"startTime\": \"\",\n \"teamDriveInfo\": {\n \"teamDriveIds\": []\n },\n \"terms\": \"\",\n \"timeZone\": \"\",\n \"voiceOptions\": {\n \"coveredData\": []\n }\n },\n \"requester\": {\n \"displayName\": \"\",\n \"email\": \"\"\n },\n \"stats\": {\n \"exportedArtifactCount\": \"\",\n \"sizeInBytes\": \"\",\n \"totalArtifactCount\": \"\"\n },\n \"status\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/v1/matters/:matterId/exports') do |req|
req.body = "{\n \"cloudStorageSink\": {\n \"files\": [\n {\n \"bucketName\": \"\",\n \"md5Hash\": \"\",\n \"objectName\": \"\",\n \"size\": \"\"\n }\n ]\n },\n \"createTime\": \"\",\n \"exportOptions\": {\n \"driveOptions\": {\n \"includeAccessInfo\": false\n },\n \"groupsOptions\": {\n \"exportFormat\": \"\"\n },\n \"hangoutsChatOptions\": {\n \"exportFormat\": \"\"\n },\n \"mailOptions\": {\n \"exportFormat\": \"\",\n \"showConfidentialModeContent\": false,\n \"useNewExport\": false\n },\n \"region\": \"\",\n \"voiceOptions\": {\n \"exportFormat\": \"\"\n }\n },\n \"id\": \"\",\n \"matterId\": \"\",\n \"name\": \"\",\n \"query\": {\n \"accountInfo\": {\n \"emails\": []\n },\n \"corpus\": \"\",\n \"dataScope\": \"\",\n \"driveOptions\": {\n \"clientSideEncryptedOption\": \"\",\n \"includeSharedDrives\": false,\n \"includeTeamDrives\": false,\n \"versionDate\": \"\"\n },\n \"endTime\": \"\",\n \"hangoutsChatInfo\": {\n \"roomId\": []\n },\n \"hangoutsChatOptions\": {\n \"includeRooms\": false\n },\n \"mailOptions\": {\n \"clientSideEncryptedOption\": \"\",\n \"excludeDrafts\": false\n },\n \"method\": \"\",\n \"orgUnitInfo\": {\n \"orgUnitId\": \"\"\n },\n \"searchMethod\": \"\",\n \"sharedDriveInfo\": {\n \"sharedDriveIds\": []\n },\n \"sitesUrlInfo\": {\n \"urls\": []\n },\n \"startTime\": \"\",\n \"teamDriveInfo\": {\n \"teamDriveIds\": []\n },\n \"terms\": \"\",\n \"timeZone\": \"\",\n \"voiceOptions\": {\n \"coveredData\": []\n }\n },\n \"requester\": {\n \"displayName\": \"\",\n \"email\": \"\"\n },\n \"stats\": {\n \"exportedArtifactCount\": \"\",\n \"sizeInBytes\": \"\",\n \"totalArtifactCount\": \"\"\n },\n \"status\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/matters/:matterId/exports";
let payload = json!({
"cloudStorageSink": json!({"files": (
json!({
"bucketName": "",
"md5Hash": "",
"objectName": "",
"size": ""
})
)}),
"createTime": "",
"exportOptions": json!({
"driveOptions": json!({"includeAccessInfo": false}),
"groupsOptions": json!({"exportFormat": ""}),
"hangoutsChatOptions": json!({"exportFormat": ""}),
"mailOptions": json!({
"exportFormat": "",
"showConfidentialModeContent": false,
"useNewExport": false
}),
"region": "",
"voiceOptions": json!({"exportFormat": ""})
}),
"id": "",
"matterId": "",
"name": "",
"query": json!({
"accountInfo": json!({"emails": ()}),
"corpus": "",
"dataScope": "",
"driveOptions": json!({
"clientSideEncryptedOption": "",
"includeSharedDrives": false,
"includeTeamDrives": false,
"versionDate": ""
}),
"endTime": "",
"hangoutsChatInfo": json!({"roomId": ()}),
"hangoutsChatOptions": json!({"includeRooms": false}),
"mailOptions": json!({
"clientSideEncryptedOption": "",
"excludeDrafts": false
}),
"method": "",
"orgUnitInfo": json!({"orgUnitId": ""}),
"searchMethod": "",
"sharedDriveInfo": json!({"sharedDriveIds": ()}),
"sitesUrlInfo": json!({"urls": ()}),
"startTime": "",
"teamDriveInfo": json!({"teamDriveIds": ()}),
"terms": "",
"timeZone": "",
"voiceOptions": json!({"coveredData": ()})
}),
"requester": json!({
"displayName": "",
"email": ""
}),
"stats": json!({
"exportedArtifactCount": "",
"sizeInBytes": "",
"totalArtifactCount": ""
}),
"status": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/v1/matters/:matterId/exports \
--header 'content-type: application/json' \
--data '{
"cloudStorageSink": {
"files": [
{
"bucketName": "",
"md5Hash": "",
"objectName": "",
"size": ""
}
]
},
"createTime": "",
"exportOptions": {
"driveOptions": {
"includeAccessInfo": false
},
"groupsOptions": {
"exportFormat": ""
},
"hangoutsChatOptions": {
"exportFormat": ""
},
"mailOptions": {
"exportFormat": "",
"showConfidentialModeContent": false,
"useNewExport": false
},
"region": "",
"voiceOptions": {
"exportFormat": ""
}
},
"id": "",
"matterId": "",
"name": "",
"query": {
"accountInfo": {
"emails": []
},
"corpus": "",
"dataScope": "",
"driveOptions": {
"clientSideEncryptedOption": "",
"includeSharedDrives": false,
"includeTeamDrives": false,
"versionDate": ""
},
"endTime": "",
"hangoutsChatInfo": {
"roomId": []
},
"hangoutsChatOptions": {
"includeRooms": false
},
"mailOptions": {
"clientSideEncryptedOption": "",
"excludeDrafts": false
},
"method": "",
"orgUnitInfo": {
"orgUnitId": ""
},
"searchMethod": "",
"sharedDriveInfo": {
"sharedDriveIds": []
},
"sitesUrlInfo": {
"urls": []
},
"startTime": "",
"teamDriveInfo": {
"teamDriveIds": []
},
"terms": "",
"timeZone": "",
"voiceOptions": {
"coveredData": []
}
},
"requester": {
"displayName": "",
"email": ""
},
"stats": {
"exportedArtifactCount": "",
"sizeInBytes": "",
"totalArtifactCount": ""
},
"status": ""
}'
echo '{
"cloudStorageSink": {
"files": [
{
"bucketName": "",
"md5Hash": "",
"objectName": "",
"size": ""
}
]
},
"createTime": "",
"exportOptions": {
"driveOptions": {
"includeAccessInfo": false
},
"groupsOptions": {
"exportFormat": ""
},
"hangoutsChatOptions": {
"exportFormat": ""
},
"mailOptions": {
"exportFormat": "",
"showConfidentialModeContent": false,
"useNewExport": false
},
"region": "",
"voiceOptions": {
"exportFormat": ""
}
},
"id": "",
"matterId": "",
"name": "",
"query": {
"accountInfo": {
"emails": []
},
"corpus": "",
"dataScope": "",
"driveOptions": {
"clientSideEncryptedOption": "",
"includeSharedDrives": false,
"includeTeamDrives": false,
"versionDate": ""
},
"endTime": "",
"hangoutsChatInfo": {
"roomId": []
},
"hangoutsChatOptions": {
"includeRooms": false
},
"mailOptions": {
"clientSideEncryptedOption": "",
"excludeDrafts": false
},
"method": "",
"orgUnitInfo": {
"orgUnitId": ""
},
"searchMethod": "",
"sharedDriveInfo": {
"sharedDriveIds": []
},
"sitesUrlInfo": {
"urls": []
},
"startTime": "",
"teamDriveInfo": {
"teamDriveIds": []
},
"terms": "",
"timeZone": "",
"voiceOptions": {
"coveredData": []
}
},
"requester": {
"displayName": "",
"email": ""
},
"stats": {
"exportedArtifactCount": "",
"sizeInBytes": "",
"totalArtifactCount": ""
},
"status": ""
}' | \
http POST {{baseUrl}}/v1/matters/:matterId/exports \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "cloudStorageSink": {\n "files": [\n {\n "bucketName": "",\n "md5Hash": "",\n "objectName": "",\n "size": ""\n }\n ]\n },\n "createTime": "",\n "exportOptions": {\n "driveOptions": {\n "includeAccessInfo": false\n },\n "groupsOptions": {\n "exportFormat": ""\n },\n "hangoutsChatOptions": {\n "exportFormat": ""\n },\n "mailOptions": {\n "exportFormat": "",\n "showConfidentialModeContent": false,\n "useNewExport": false\n },\n "region": "",\n "voiceOptions": {\n "exportFormat": ""\n }\n },\n "id": "",\n "matterId": "",\n "name": "",\n "query": {\n "accountInfo": {\n "emails": []\n },\n "corpus": "",\n "dataScope": "",\n "driveOptions": {\n "clientSideEncryptedOption": "",\n "includeSharedDrives": false,\n "includeTeamDrives": false,\n "versionDate": ""\n },\n "endTime": "",\n "hangoutsChatInfo": {\n "roomId": []\n },\n "hangoutsChatOptions": {\n "includeRooms": false\n },\n "mailOptions": {\n "clientSideEncryptedOption": "",\n "excludeDrafts": false\n },\n "method": "",\n "orgUnitInfo": {\n "orgUnitId": ""\n },\n "searchMethod": "",\n "sharedDriveInfo": {\n "sharedDriveIds": []\n },\n "sitesUrlInfo": {\n "urls": []\n },\n "startTime": "",\n "teamDriveInfo": {\n "teamDriveIds": []\n },\n "terms": "",\n "timeZone": "",\n "voiceOptions": {\n "coveredData": []\n }\n },\n "requester": {\n "displayName": "",\n "email": ""\n },\n "stats": {\n "exportedArtifactCount": "",\n "sizeInBytes": "",\n "totalArtifactCount": ""\n },\n "status": ""\n}' \
--output-document \
- {{baseUrl}}/v1/matters/:matterId/exports
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"cloudStorageSink": ["files": [
[
"bucketName": "",
"md5Hash": "",
"objectName": "",
"size": ""
]
]],
"createTime": "",
"exportOptions": [
"driveOptions": ["includeAccessInfo": false],
"groupsOptions": ["exportFormat": ""],
"hangoutsChatOptions": ["exportFormat": ""],
"mailOptions": [
"exportFormat": "",
"showConfidentialModeContent": false,
"useNewExport": false
],
"region": "",
"voiceOptions": ["exportFormat": ""]
],
"id": "",
"matterId": "",
"name": "",
"query": [
"accountInfo": ["emails": []],
"corpus": "",
"dataScope": "",
"driveOptions": [
"clientSideEncryptedOption": "",
"includeSharedDrives": false,
"includeTeamDrives": false,
"versionDate": ""
],
"endTime": "",
"hangoutsChatInfo": ["roomId": []],
"hangoutsChatOptions": ["includeRooms": false],
"mailOptions": [
"clientSideEncryptedOption": "",
"excludeDrafts": false
],
"method": "",
"orgUnitInfo": ["orgUnitId": ""],
"searchMethod": "",
"sharedDriveInfo": ["sharedDriveIds": []],
"sitesUrlInfo": ["urls": []],
"startTime": "",
"teamDriveInfo": ["teamDriveIds": []],
"terms": "",
"timeZone": "",
"voiceOptions": ["coveredData": []]
],
"requester": [
"displayName": "",
"email": ""
],
"stats": [
"exportedArtifactCount": "",
"sizeInBytes": "",
"totalArtifactCount": ""
],
"status": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/matters/:matterId/exports")! 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
vault.matters.exports.delete
{{baseUrl}}/v1/matters/:matterId/exports/:exportId
QUERY PARAMS
matterId
exportId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/matters/:matterId/exports/:exportId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/v1/matters/:matterId/exports/:exportId")
require "http/client"
url = "{{baseUrl}}/v1/matters/:matterId/exports/:exportId"
response = HTTP::Client.delete url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Delete,
RequestUri = new Uri("{{baseUrl}}/v1/matters/:matterId/exports/:exportId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/matters/:matterId/exports/:exportId");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/matters/:matterId/exports/:exportId"
req, _ := http.NewRequest("DELETE", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
DELETE /baseUrl/v1/matters/:matterId/exports/:exportId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/v1/matters/:matterId/exports/:exportId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/matters/:matterId/exports/:exportId"))
.method("DELETE", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/matters/:matterId/exports/:exportId")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/v1/matters/:matterId/exports/:exportId")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('DELETE', '{{baseUrl}}/v1/matters/:matterId/exports/:exportId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'DELETE',
url: '{{baseUrl}}/v1/matters/:matterId/exports/:exportId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/matters/:matterId/exports/:exportId';
const options = {method: 'DELETE'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/matters/:matterId/exports/:exportId',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1/matters/:matterId/exports/:exportId")
.delete(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/matters/:matterId/exports/:exportId',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'DELETE',
url: '{{baseUrl}}/v1/matters/:matterId/exports/:exportId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/v1/matters/:matterId/exports/:exportId');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'DELETE',
url: '{{baseUrl}}/v1/matters/:matterId/exports/:exportId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/matters/:matterId/exports/:exportId';
const options = {method: 'DELETE'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/matters/:matterId/exports/:exportId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"DELETE"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/matters/:matterId/exports/:exportId" in
Client.call `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/matters/:matterId/exports/:exportId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('DELETE', '{{baseUrl}}/v1/matters/:matterId/exports/:exportId');
echo $response->getBody();
setUrl('{{baseUrl}}/v1/matters/:matterId/exports/:exportId');
$request->setMethod(HTTP_METH_DELETE);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/matters/:matterId/exports/:exportId');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/matters/:matterId/exports/:exportId' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/matters/:matterId/exports/:exportId' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/v1/matters/:matterId/exports/:exportId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/matters/:matterId/exports/:exportId"
response = requests.delete(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/matters/:matterId/exports/:exportId"
response <- VERB("DELETE", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/matters/:matterId/exports/:exportId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.delete('/baseUrl/v1/matters/:matterId/exports/:exportId') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/matters/:matterId/exports/:exportId";
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("DELETE").unwrap(), url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request DELETE \
--url {{baseUrl}}/v1/matters/:matterId/exports/:exportId
http DELETE {{baseUrl}}/v1/matters/:matterId/exports/:exportId
wget --quiet \
--method DELETE \
--output-document \
- {{baseUrl}}/v1/matters/:matterId/exports/:exportId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/matters/:matterId/exports/:exportId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "DELETE"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
vault.matters.exports.get
{{baseUrl}}/v1/matters/:matterId/exports/:exportId
QUERY PARAMS
matterId
exportId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/matters/:matterId/exports/:exportId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v1/matters/:matterId/exports/:exportId")
require "http/client"
url = "{{baseUrl}}/v1/matters/:matterId/exports/:exportId"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/v1/matters/:matterId/exports/:exportId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/matters/:matterId/exports/:exportId");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/matters/:matterId/exports/:exportId"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/v1/matters/:matterId/exports/:exportId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1/matters/:matterId/exports/:exportId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/matters/:matterId/exports/:exportId"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/matters/:matterId/exports/:exportId")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1/matters/:matterId/exports/:exportId")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/v1/matters/:matterId/exports/:exportId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/v1/matters/:matterId/exports/:exportId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/matters/:matterId/exports/:exportId';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/matters/:matterId/exports/:exportId',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1/matters/:matterId/exports/:exportId")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/matters/:matterId/exports/:exportId',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/v1/matters/:matterId/exports/:exportId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v1/matters/:matterId/exports/:exportId');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/v1/matters/:matterId/exports/:exportId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/matters/:matterId/exports/:exportId';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/matters/:matterId/exports/:exportId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/matters/:matterId/exports/:exportId" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/matters/:matterId/exports/:exportId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/v1/matters/:matterId/exports/:exportId');
echo $response->getBody();
setUrl('{{baseUrl}}/v1/matters/:matterId/exports/:exportId');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/matters/:matterId/exports/:exportId');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/matters/:matterId/exports/:exportId' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/matters/:matterId/exports/:exportId' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v1/matters/:matterId/exports/:exportId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/matters/:matterId/exports/:exportId"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/matters/:matterId/exports/:exportId"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/matters/:matterId/exports/:exportId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/v1/matters/:matterId/exports/:exportId') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/matters/:matterId/exports/:exportId";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/v1/matters/:matterId/exports/:exportId
http GET {{baseUrl}}/v1/matters/:matterId/exports/:exportId
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v1/matters/:matterId/exports/:exportId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/matters/:matterId/exports/:exportId")! 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
vault.matters.exports.list
{{baseUrl}}/v1/matters/:matterId/exports
QUERY PARAMS
matterId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/matters/:matterId/exports");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v1/matters/:matterId/exports")
require "http/client"
url = "{{baseUrl}}/v1/matters/:matterId/exports"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/v1/matters/:matterId/exports"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/matters/:matterId/exports");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/matters/:matterId/exports"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/v1/matters/:matterId/exports HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1/matters/:matterId/exports")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/matters/:matterId/exports"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/matters/:matterId/exports")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1/matters/:matterId/exports")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/v1/matters/:matterId/exports');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/v1/matters/:matterId/exports'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/matters/:matterId/exports';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/matters/:matterId/exports',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1/matters/:matterId/exports")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/matters/:matterId/exports',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'GET', url: '{{baseUrl}}/v1/matters/:matterId/exports'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v1/matters/:matterId/exports');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {method: 'GET', url: '{{baseUrl}}/v1/matters/:matterId/exports'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/matters/:matterId/exports';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/matters/:matterId/exports"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/matters/:matterId/exports" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/matters/:matterId/exports",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/v1/matters/:matterId/exports');
echo $response->getBody();
setUrl('{{baseUrl}}/v1/matters/:matterId/exports');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/matters/:matterId/exports');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/matters/:matterId/exports' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/matters/:matterId/exports' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v1/matters/:matterId/exports")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/matters/:matterId/exports"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/matters/:matterId/exports"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/matters/:matterId/exports")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/v1/matters/:matterId/exports') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/matters/:matterId/exports";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/v1/matters/:matterId/exports
http GET {{baseUrl}}/v1/matters/:matterId/exports
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v1/matters/:matterId/exports
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/matters/:matterId/exports")! 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
vault.matters.get
{{baseUrl}}/v1/matters/:matterId
QUERY PARAMS
matterId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/matters/:matterId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v1/matters/:matterId")
require "http/client"
url = "{{baseUrl}}/v1/matters/:matterId"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/v1/matters/:matterId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/matters/:matterId");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/matters/:matterId"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/v1/matters/:matterId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1/matters/:matterId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/matters/:matterId"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/matters/:matterId")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1/matters/:matterId")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/v1/matters/:matterId');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/v1/matters/:matterId'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/matters/:matterId';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/matters/:matterId',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1/matters/:matterId")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/matters/:matterId',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'GET', url: '{{baseUrl}}/v1/matters/:matterId'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v1/matters/:matterId');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {method: 'GET', url: '{{baseUrl}}/v1/matters/:matterId'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/matters/:matterId';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/matters/:matterId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/matters/:matterId" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/matters/:matterId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/v1/matters/:matterId');
echo $response->getBody();
setUrl('{{baseUrl}}/v1/matters/:matterId');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/matters/:matterId');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/matters/:matterId' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/matters/:matterId' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v1/matters/:matterId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/matters/:matterId"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/matters/:matterId"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/matters/:matterId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/v1/matters/:matterId') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/matters/:matterId";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/v1/matters/:matterId
http GET {{baseUrl}}/v1/matters/:matterId
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v1/matters/:matterId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/matters/:matterId")! 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
vault.matters.holds.accounts.create
{{baseUrl}}/v1/matters/:matterId/holds/:holdId/accounts
QUERY PARAMS
matterId
holdId
BODY json
{
"accountId": "",
"email": "",
"firstName": "",
"holdTime": "",
"lastName": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/matters/:matterId/holds/:holdId/accounts");
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 \"accountId\": \"\",\n \"email\": \"\",\n \"firstName\": \"\",\n \"holdTime\": \"\",\n \"lastName\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1/matters/:matterId/holds/:holdId/accounts" {:content-type :json
:form-params {:accountId ""
:email ""
:firstName ""
:holdTime ""
:lastName ""}})
require "http/client"
url = "{{baseUrl}}/v1/matters/:matterId/holds/:holdId/accounts"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"accountId\": \"\",\n \"email\": \"\",\n \"firstName\": \"\",\n \"holdTime\": \"\",\n \"lastName\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/v1/matters/:matterId/holds/:holdId/accounts"),
Content = new StringContent("{\n \"accountId\": \"\",\n \"email\": \"\",\n \"firstName\": \"\",\n \"holdTime\": \"\",\n \"lastName\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/matters/:matterId/holds/:holdId/accounts");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"accountId\": \"\",\n \"email\": \"\",\n \"firstName\": \"\",\n \"holdTime\": \"\",\n \"lastName\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/matters/:matterId/holds/:holdId/accounts"
payload := strings.NewReader("{\n \"accountId\": \"\",\n \"email\": \"\",\n \"firstName\": \"\",\n \"holdTime\": \"\",\n \"lastName\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/v1/matters/:matterId/holds/:holdId/accounts HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 91
{
"accountId": "",
"email": "",
"firstName": "",
"holdTime": "",
"lastName": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1/matters/:matterId/holds/:holdId/accounts")
.setHeader("content-type", "application/json")
.setBody("{\n \"accountId\": \"\",\n \"email\": \"\",\n \"firstName\": \"\",\n \"holdTime\": \"\",\n \"lastName\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/matters/:matterId/holds/:holdId/accounts"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"accountId\": \"\",\n \"email\": \"\",\n \"firstName\": \"\",\n \"holdTime\": \"\",\n \"lastName\": \"\"\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 \"accountId\": \"\",\n \"email\": \"\",\n \"firstName\": \"\",\n \"holdTime\": \"\",\n \"lastName\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/matters/:matterId/holds/:holdId/accounts")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1/matters/:matterId/holds/:holdId/accounts")
.header("content-type", "application/json")
.body("{\n \"accountId\": \"\",\n \"email\": \"\",\n \"firstName\": \"\",\n \"holdTime\": \"\",\n \"lastName\": \"\"\n}")
.asString();
const data = JSON.stringify({
accountId: '',
email: '',
firstName: '',
holdTime: '',
lastName: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v1/matters/:matterId/holds/:holdId/accounts');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/matters/:matterId/holds/:holdId/accounts',
headers: {'content-type': 'application/json'},
data: {accountId: '', email: '', firstName: '', holdTime: '', lastName: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/matters/:matterId/holds/:holdId/accounts';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"accountId":"","email":"","firstName":"","holdTime":"","lastName":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/matters/:matterId/holds/:holdId/accounts',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "accountId": "",\n "email": "",\n "firstName": "",\n "holdTime": "",\n "lastName": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"accountId\": \"\",\n \"email\": \"\",\n \"firstName\": \"\",\n \"holdTime\": \"\",\n \"lastName\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1/matters/:matterId/holds/:holdId/accounts")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/matters/:matterId/holds/:holdId/accounts',
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({accountId: '', email: '', firstName: '', holdTime: '', lastName: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/matters/:matterId/holds/:holdId/accounts',
headers: {'content-type': 'application/json'},
body: {accountId: '', email: '', firstName: '', holdTime: '', lastName: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/v1/matters/:matterId/holds/:holdId/accounts');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
accountId: '',
email: '',
firstName: '',
holdTime: '',
lastName: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/matters/:matterId/holds/:holdId/accounts',
headers: {'content-type': 'application/json'},
data: {accountId: '', email: '', firstName: '', holdTime: '', lastName: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/matters/:matterId/holds/:holdId/accounts';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"accountId":"","email":"","firstName":"","holdTime":"","lastName":""}'
};
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 = @{ @"accountId": @"",
@"email": @"",
@"firstName": @"",
@"holdTime": @"",
@"lastName": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/matters/:matterId/holds/:holdId/accounts"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/matters/:matterId/holds/:holdId/accounts" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"accountId\": \"\",\n \"email\": \"\",\n \"firstName\": \"\",\n \"holdTime\": \"\",\n \"lastName\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/matters/:matterId/holds/:holdId/accounts",
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([
'accountId' => '',
'email' => '',
'firstName' => '',
'holdTime' => '',
'lastName' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/v1/matters/:matterId/holds/:holdId/accounts', [
'body' => '{
"accountId": "",
"email": "",
"firstName": "",
"holdTime": "",
"lastName": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1/matters/:matterId/holds/:holdId/accounts');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'accountId' => '',
'email' => '',
'firstName' => '',
'holdTime' => '',
'lastName' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'accountId' => '',
'email' => '',
'firstName' => '',
'holdTime' => '',
'lastName' => ''
]));
$request->setRequestUrl('{{baseUrl}}/v1/matters/:matterId/holds/:holdId/accounts');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/matters/:matterId/holds/:holdId/accounts' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"accountId": "",
"email": "",
"firstName": "",
"holdTime": "",
"lastName": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/matters/:matterId/holds/:holdId/accounts' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"accountId": "",
"email": "",
"firstName": "",
"holdTime": "",
"lastName": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"accountId\": \"\",\n \"email\": \"\",\n \"firstName\": \"\",\n \"holdTime\": \"\",\n \"lastName\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1/matters/:matterId/holds/:holdId/accounts", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/matters/:matterId/holds/:holdId/accounts"
payload = {
"accountId": "",
"email": "",
"firstName": "",
"holdTime": "",
"lastName": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/matters/:matterId/holds/:holdId/accounts"
payload <- "{\n \"accountId\": \"\",\n \"email\": \"\",\n \"firstName\": \"\",\n \"holdTime\": \"\",\n \"lastName\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/matters/:matterId/holds/:holdId/accounts")
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 \"accountId\": \"\",\n \"email\": \"\",\n \"firstName\": \"\",\n \"holdTime\": \"\",\n \"lastName\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/v1/matters/:matterId/holds/:holdId/accounts') do |req|
req.body = "{\n \"accountId\": \"\",\n \"email\": \"\",\n \"firstName\": \"\",\n \"holdTime\": \"\",\n \"lastName\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/matters/:matterId/holds/:holdId/accounts";
let payload = json!({
"accountId": "",
"email": "",
"firstName": "",
"holdTime": "",
"lastName": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/v1/matters/:matterId/holds/:holdId/accounts \
--header 'content-type: application/json' \
--data '{
"accountId": "",
"email": "",
"firstName": "",
"holdTime": "",
"lastName": ""
}'
echo '{
"accountId": "",
"email": "",
"firstName": "",
"holdTime": "",
"lastName": ""
}' | \
http POST {{baseUrl}}/v1/matters/:matterId/holds/:holdId/accounts \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "accountId": "",\n "email": "",\n "firstName": "",\n "holdTime": "",\n "lastName": ""\n}' \
--output-document \
- {{baseUrl}}/v1/matters/:matterId/holds/:holdId/accounts
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"accountId": "",
"email": "",
"firstName": "",
"holdTime": "",
"lastName": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/matters/:matterId/holds/:holdId/accounts")! 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
vault.matters.holds.accounts.delete
{{baseUrl}}/v1/matters/:matterId/holds/:holdId/accounts/:accountId
QUERY PARAMS
matterId
holdId
accountId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/matters/:matterId/holds/:holdId/accounts/:accountId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/v1/matters/:matterId/holds/:holdId/accounts/:accountId")
require "http/client"
url = "{{baseUrl}}/v1/matters/:matterId/holds/:holdId/accounts/:accountId"
response = HTTP::Client.delete url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Delete,
RequestUri = new Uri("{{baseUrl}}/v1/matters/:matterId/holds/:holdId/accounts/:accountId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/matters/:matterId/holds/:holdId/accounts/:accountId");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/matters/:matterId/holds/:holdId/accounts/:accountId"
req, _ := http.NewRequest("DELETE", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
DELETE /baseUrl/v1/matters/:matterId/holds/:holdId/accounts/:accountId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/v1/matters/:matterId/holds/:holdId/accounts/:accountId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/matters/:matterId/holds/:holdId/accounts/:accountId"))
.method("DELETE", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/matters/:matterId/holds/:holdId/accounts/:accountId")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/v1/matters/:matterId/holds/:holdId/accounts/:accountId")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('DELETE', '{{baseUrl}}/v1/matters/:matterId/holds/:holdId/accounts/:accountId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'DELETE',
url: '{{baseUrl}}/v1/matters/:matterId/holds/:holdId/accounts/:accountId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/matters/:matterId/holds/:holdId/accounts/:accountId';
const options = {method: 'DELETE'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/matters/:matterId/holds/:holdId/accounts/:accountId',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1/matters/:matterId/holds/:holdId/accounts/:accountId")
.delete(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/matters/:matterId/holds/:holdId/accounts/:accountId',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'DELETE',
url: '{{baseUrl}}/v1/matters/:matterId/holds/:holdId/accounts/:accountId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/v1/matters/:matterId/holds/:holdId/accounts/:accountId');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'DELETE',
url: '{{baseUrl}}/v1/matters/:matterId/holds/:holdId/accounts/:accountId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/matters/:matterId/holds/:holdId/accounts/:accountId';
const options = {method: 'DELETE'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/matters/:matterId/holds/:holdId/accounts/:accountId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"DELETE"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/matters/:matterId/holds/:holdId/accounts/:accountId" in
Client.call `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/matters/:matterId/holds/:holdId/accounts/:accountId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('DELETE', '{{baseUrl}}/v1/matters/:matterId/holds/:holdId/accounts/:accountId');
echo $response->getBody();
setUrl('{{baseUrl}}/v1/matters/:matterId/holds/:holdId/accounts/:accountId');
$request->setMethod(HTTP_METH_DELETE);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/matters/:matterId/holds/:holdId/accounts/:accountId');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/matters/:matterId/holds/:holdId/accounts/:accountId' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/matters/:matterId/holds/:holdId/accounts/:accountId' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/v1/matters/:matterId/holds/:holdId/accounts/:accountId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/matters/:matterId/holds/:holdId/accounts/:accountId"
response = requests.delete(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/matters/:matterId/holds/:holdId/accounts/:accountId"
response <- VERB("DELETE", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/matters/:matterId/holds/:holdId/accounts/:accountId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.delete('/baseUrl/v1/matters/:matterId/holds/:holdId/accounts/:accountId') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/matters/:matterId/holds/:holdId/accounts/:accountId";
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("DELETE").unwrap(), url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request DELETE \
--url {{baseUrl}}/v1/matters/:matterId/holds/:holdId/accounts/:accountId
http DELETE {{baseUrl}}/v1/matters/:matterId/holds/:holdId/accounts/:accountId
wget --quiet \
--method DELETE \
--output-document \
- {{baseUrl}}/v1/matters/:matterId/holds/:holdId/accounts/:accountId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/matters/:matterId/holds/:holdId/accounts/:accountId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "DELETE"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
vault.matters.holds.accounts.list
{{baseUrl}}/v1/matters/:matterId/holds/:holdId/accounts
QUERY PARAMS
matterId
holdId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/matters/:matterId/holds/:holdId/accounts");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v1/matters/:matterId/holds/:holdId/accounts")
require "http/client"
url = "{{baseUrl}}/v1/matters/:matterId/holds/:holdId/accounts"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/v1/matters/:matterId/holds/:holdId/accounts"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/matters/:matterId/holds/:holdId/accounts");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/matters/:matterId/holds/:holdId/accounts"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/v1/matters/:matterId/holds/:holdId/accounts HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1/matters/:matterId/holds/:holdId/accounts")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/matters/:matterId/holds/:holdId/accounts"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/matters/:matterId/holds/:holdId/accounts")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1/matters/:matterId/holds/:holdId/accounts")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/v1/matters/:matterId/holds/:holdId/accounts');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/v1/matters/:matterId/holds/:holdId/accounts'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/matters/:matterId/holds/:holdId/accounts';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/matters/:matterId/holds/:holdId/accounts',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1/matters/:matterId/holds/:holdId/accounts")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/matters/:matterId/holds/:holdId/accounts',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/v1/matters/:matterId/holds/:holdId/accounts'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v1/matters/:matterId/holds/:holdId/accounts');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/v1/matters/:matterId/holds/:holdId/accounts'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/matters/:matterId/holds/:holdId/accounts';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/matters/:matterId/holds/:holdId/accounts"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/matters/:matterId/holds/:holdId/accounts" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/matters/:matterId/holds/:holdId/accounts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/v1/matters/:matterId/holds/:holdId/accounts');
echo $response->getBody();
setUrl('{{baseUrl}}/v1/matters/:matterId/holds/:holdId/accounts');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/matters/:matterId/holds/:holdId/accounts');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/matters/:matterId/holds/:holdId/accounts' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/matters/:matterId/holds/:holdId/accounts' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v1/matters/:matterId/holds/:holdId/accounts")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/matters/:matterId/holds/:holdId/accounts"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/matters/:matterId/holds/:holdId/accounts"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/matters/:matterId/holds/:holdId/accounts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/v1/matters/:matterId/holds/:holdId/accounts') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/matters/:matterId/holds/:holdId/accounts";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/v1/matters/:matterId/holds/:holdId/accounts
http GET {{baseUrl}}/v1/matters/:matterId/holds/:holdId/accounts
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v1/matters/:matterId/holds/:holdId/accounts
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/matters/:matterId/holds/:holdId/accounts")! 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
vault.matters.holds.addHeldAccounts
{{baseUrl}}/v1/matters/:matterId/holds/:holdId:addHeldAccounts
QUERY PARAMS
matterId
holdId
BODY json
{
"accountIds": [],
"emails": []
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/matters/:matterId/holds/:holdId:addHeldAccounts");
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 \"accountIds\": [],\n \"emails\": []\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1/matters/:matterId/holds/:holdId:addHeldAccounts" {:content-type :json
:form-params {:accountIds []
:emails []}})
require "http/client"
url = "{{baseUrl}}/v1/matters/:matterId/holds/:holdId:addHeldAccounts"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"accountIds\": [],\n \"emails\": []\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/v1/matters/:matterId/holds/:holdId:addHeldAccounts"),
Content = new StringContent("{\n \"accountIds\": [],\n \"emails\": []\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/matters/:matterId/holds/:holdId:addHeldAccounts");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"accountIds\": [],\n \"emails\": []\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/matters/:matterId/holds/:holdId:addHeldAccounts"
payload := strings.NewReader("{\n \"accountIds\": [],\n \"emails\": []\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/v1/matters/:matterId/holds/:holdId:addHeldAccounts HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 38
{
"accountIds": [],
"emails": []
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1/matters/:matterId/holds/:holdId:addHeldAccounts")
.setHeader("content-type", "application/json")
.setBody("{\n \"accountIds\": [],\n \"emails\": []\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/matters/:matterId/holds/:holdId:addHeldAccounts"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"accountIds\": [],\n \"emails\": []\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 \"accountIds\": [],\n \"emails\": []\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/matters/:matterId/holds/:holdId:addHeldAccounts")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1/matters/:matterId/holds/:holdId:addHeldAccounts")
.header("content-type", "application/json")
.body("{\n \"accountIds\": [],\n \"emails\": []\n}")
.asString();
const data = JSON.stringify({
accountIds: [],
emails: []
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v1/matters/:matterId/holds/:holdId:addHeldAccounts');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/matters/:matterId/holds/:holdId:addHeldAccounts',
headers: {'content-type': 'application/json'},
data: {accountIds: [], emails: []}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/matters/:matterId/holds/:holdId:addHeldAccounts';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"accountIds":[],"emails":[]}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/matters/:matterId/holds/:holdId:addHeldAccounts',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "accountIds": [],\n "emails": []\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"accountIds\": [],\n \"emails\": []\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1/matters/:matterId/holds/:holdId:addHeldAccounts")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/matters/:matterId/holds/:holdId:addHeldAccounts',
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({accountIds: [], emails: []}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/matters/:matterId/holds/:holdId:addHeldAccounts',
headers: {'content-type': 'application/json'},
body: {accountIds: [], emails: []},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/v1/matters/:matterId/holds/:holdId:addHeldAccounts');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
accountIds: [],
emails: []
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/matters/:matterId/holds/:holdId:addHeldAccounts',
headers: {'content-type': 'application/json'},
data: {accountIds: [], emails: []}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/matters/:matterId/holds/:holdId:addHeldAccounts';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"accountIds":[],"emails":[]}'
};
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 = @{ @"accountIds": @[ ],
@"emails": @[ ] };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/matters/:matterId/holds/:holdId:addHeldAccounts"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/matters/:matterId/holds/:holdId:addHeldAccounts" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"accountIds\": [],\n \"emails\": []\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/matters/:matterId/holds/:holdId:addHeldAccounts",
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([
'accountIds' => [
],
'emails' => [
]
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/v1/matters/:matterId/holds/:holdId:addHeldAccounts', [
'body' => '{
"accountIds": [],
"emails": []
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1/matters/:matterId/holds/:holdId:addHeldAccounts');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'accountIds' => [
],
'emails' => [
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'accountIds' => [
],
'emails' => [
]
]));
$request->setRequestUrl('{{baseUrl}}/v1/matters/:matterId/holds/:holdId:addHeldAccounts');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/matters/:matterId/holds/:holdId:addHeldAccounts' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"accountIds": [],
"emails": []
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/matters/:matterId/holds/:holdId:addHeldAccounts' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"accountIds": [],
"emails": []
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"accountIds\": [],\n \"emails\": []\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1/matters/:matterId/holds/:holdId:addHeldAccounts", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/matters/:matterId/holds/:holdId:addHeldAccounts"
payload = {
"accountIds": [],
"emails": []
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/matters/:matterId/holds/:holdId:addHeldAccounts"
payload <- "{\n \"accountIds\": [],\n \"emails\": []\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/matters/:matterId/holds/:holdId:addHeldAccounts")
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 \"accountIds\": [],\n \"emails\": []\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/v1/matters/:matterId/holds/:holdId:addHeldAccounts') do |req|
req.body = "{\n \"accountIds\": [],\n \"emails\": []\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/matters/:matterId/holds/:holdId:addHeldAccounts";
let payload = json!({
"accountIds": (),
"emails": ()
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/v1/matters/:matterId/holds/:holdId:addHeldAccounts \
--header 'content-type: application/json' \
--data '{
"accountIds": [],
"emails": []
}'
echo '{
"accountIds": [],
"emails": []
}' | \
http POST {{baseUrl}}/v1/matters/:matterId/holds/:holdId:addHeldAccounts \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "accountIds": [],\n "emails": []\n}' \
--output-document \
- {{baseUrl}}/v1/matters/:matterId/holds/:holdId:addHeldAccounts
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"accountIds": [],
"emails": []
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/matters/:matterId/holds/:holdId:addHeldAccounts")! 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
vault.matters.holds.create
{{baseUrl}}/v1/matters/:matterId/holds
QUERY PARAMS
matterId
BODY json
{
"accounts": [
{
"accountId": "",
"email": "",
"firstName": "",
"holdTime": "",
"lastName": ""
}
],
"corpus": "",
"holdId": "",
"name": "",
"orgUnit": {
"holdTime": "",
"orgUnitId": ""
},
"query": {
"driveQuery": {
"includeSharedDriveFiles": false,
"includeTeamDriveFiles": false
},
"groupsQuery": {
"endTime": "",
"startTime": "",
"terms": ""
},
"hangoutsChatQuery": {
"includeRooms": false
},
"mailQuery": {
"endTime": "",
"startTime": "",
"terms": ""
},
"voiceQuery": {
"coveredData": []
}
},
"updateTime": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/matters/:matterId/holds");
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 \"accounts\": [\n {\n \"accountId\": \"\",\n \"email\": \"\",\n \"firstName\": \"\",\n \"holdTime\": \"\",\n \"lastName\": \"\"\n }\n ],\n \"corpus\": \"\",\n \"holdId\": \"\",\n \"name\": \"\",\n \"orgUnit\": {\n \"holdTime\": \"\",\n \"orgUnitId\": \"\"\n },\n \"query\": {\n \"driveQuery\": {\n \"includeSharedDriveFiles\": false,\n \"includeTeamDriveFiles\": false\n },\n \"groupsQuery\": {\n \"endTime\": \"\",\n \"startTime\": \"\",\n \"terms\": \"\"\n },\n \"hangoutsChatQuery\": {\n \"includeRooms\": false\n },\n \"mailQuery\": {\n \"endTime\": \"\",\n \"startTime\": \"\",\n \"terms\": \"\"\n },\n \"voiceQuery\": {\n \"coveredData\": []\n }\n },\n \"updateTime\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1/matters/:matterId/holds" {:content-type :json
:form-params {:accounts [{:accountId ""
:email ""
:firstName ""
:holdTime ""
:lastName ""}]
:corpus ""
:holdId ""
:name ""
:orgUnit {:holdTime ""
:orgUnitId ""}
:query {:driveQuery {:includeSharedDriveFiles false
:includeTeamDriveFiles false}
:groupsQuery {:endTime ""
:startTime ""
:terms ""}
:hangoutsChatQuery {:includeRooms false}
:mailQuery {:endTime ""
:startTime ""
:terms ""}
:voiceQuery {:coveredData []}}
:updateTime ""}})
require "http/client"
url = "{{baseUrl}}/v1/matters/:matterId/holds"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"accounts\": [\n {\n \"accountId\": \"\",\n \"email\": \"\",\n \"firstName\": \"\",\n \"holdTime\": \"\",\n \"lastName\": \"\"\n }\n ],\n \"corpus\": \"\",\n \"holdId\": \"\",\n \"name\": \"\",\n \"orgUnit\": {\n \"holdTime\": \"\",\n \"orgUnitId\": \"\"\n },\n \"query\": {\n \"driveQuery\": {\n \"includeSharedDriveFiles\": false,\n \"includeTeamDriveFiles\": false\n },\n \"groupsQuery\": {\n \"endTime\": \"\",\n \"startTime\": \"\",\n \"terms\": \"\"\n },\n \"hangoutsChatQuery\": {\n \"includeRooms\": false\n },\n \"mailQuery\": {\n \"endTime\": \"\",\n \"startTime\": \"\",\n \"terms\": \"\"\n },\n \"voiceQuery\": {\n \"coveredData\": []\n }\n },\n \"updateTime\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/v1/matters/:matterId/holds"),
Content = new StringContent("{\n \"accounts\": [\n {\n \"accountId\": \"\",\n \"email\": \"\",\n \"firstName\": \"\",\n \"holdTime\": \"\",\n \"lastName\": \"\"\n }\n ],\n \"corpus\": \"\",\n \"holdId\": \"\",\n \"name\": \"\",\n \"orgUnit\": {\n \"holdTime\": \"\",\n \"orgUnitId\": \"\"\n },\n \"query\": {\n \"driveQuery\": {\n \"includeSharedDriveFiles\": false,\n \"includeTeamDriveFiles\": false\n },\n \"groupsQuery\": {\n \"endTime\": \"\",\n \"startTime\": \"\",\n \"terms\": \"\"\n },\n \"hangoutsChatQuery\": {\n \"includeRooms\": false\n },\n \"mailQuery\": {\n \"endTime\": \"\",\n \"startTime\": \"\",\n \"terms\": \"\"\n },\n \"voiceQuery\": {\n \"coveredData\": []\n }\n },\n \"updateTime\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/matters/:matterId/holds");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"accounts\": [\n {\n \"accountId\": \"\",\n \"email\": \"\",\n \"firstName\": \"\",\n \"holdTime\": \"\",\n \"lastName\": \"\"\n }\n ],\n \"corpus\": \"\",\n \"holdId\": \"\",\n \"name\": \"\",\n \"orgUnit\": {\n \"holdTime\": \"\",\n \"orgUnitId\": \"\"\n },\n \"query\": {\n \"driveQuery\": {\n \"includeSharedDriveFiles\": false,\n \"includeTeamDriveFiles\": false\n },\n \"groupsQuery\": {\n \"endTime\": \"\",\n \"startTime\": \"\",\n \"terms\": \"\"\n },\n \"hangoutsChatQuery\": {\n \"includeRooms\": false\n },\n \"mailQuery\": {\n \"endTime\": \"\",\n \"startTime\": \"\",\n \"terms\": \"\"\n },\n \"voiceQuery\": {\n \"coveredData\": []\n }\n },\n \"updateTime\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/matters/:matterId/holds"
payload := strings.NewReader("{\n \"accounts\": [\n {\n \"accountId\": \"\",\n \"email\": \"\",\n \"firstName\": \"\",\n \"holdTime\": \"\",\n \"lastName\": \"\"\n }\n ],\n \"corpus\": \"\",\n \"holdId\": \"\",\n \"name\": \"\",\n \"orgUnit\": {\n \"holdTime\": \"\",\n \"orgUnitId\": \"\"\n },\n \"query\": {\n \"driveQuery\": {\n \"includeSharedDriveFiles\": false,\n \"includeTeamDriveFiles\": false\n },\n \"groupsQuery\": {\n \"endTime\": \"\",\n \"startTime\": \"\",\n \"terms\": \"\"\n },\n \"hangoutsChatQuery\": {\n \"includeRooms\": false\n },\n \"mailQuery\": {\n \"endTime\": \"\",\n \"startTime\": \"\",\n \"terms\": \"\"\n },\n \"voiceQuery\": {\n \"coveredData\": []\n }\n },\n \"updateTime\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/v1/matters/:matterId/holds HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 681
{
"accounts": [
{
"accountId": "",
"email": "",
"firstName": "",
"holdTime": "",
"lastName": ""
}
],
"corpus": "",
"holdId": "",
"name": "",
"orgUnit": {
"holdTime": "",
"orgUnitId": ""
},
"query": {
"driveQuery": {
"includeSharedDriveFiles": false,
"includeTeamDriveFiles": false
},
"groupsQuery": {
"endTime": "",
"startTime": "",
"terms": ""
},
"hangoutsChatQuery": {
"includeRooms": false
},
"mailQuery": {
"endTime": "",
"startTime": "",
"terms": ""
},
"voiceQuery": {
"coveredData": []
}
},
"updateTime": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1/matters/:matterId/holds")
.setHeader("content-type", "application/json")
.setBody("{\n \"accounts\": [\n {\n \"accountId\": \"\",\n \"email\": \"\",\n \"firstName\": \"\",\n \"holdTime\": \"\",\n \"lastName\": \"\"\n }\n ],\n \"corpus\": \"\",\n \"holdId\": \"\",\n \"name\": \"\",\n \"orgUnit\": {\n \"holdTime\": \"\",\n \"orgUnitId\": \"\"\n },\n \"query\": {\n \"driveQuery\": {\n \"includeSharedDriveFiles\": false,\n \"includeTeamDriveFiles\": false\n },\n \"groupsQuery\": {\n \"endTime\": \"\",\n \"startTime\": \"\",\n \"terms\": \"\"\n },\n \"hangoutsChatQuery\": {\n \"includeRooms\": false\n },\n \"mailQuery\": {\n \"endTime\": \"\",\n \"startTime\": \"\",\n \"terms\": \"\"\n },\n \"voiceQuery\": {\n \"coveredData\": []\n }\n },\n \"updateTime\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/matters/:matterId/holds"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"accounts\": [\n {\n \"accountId\": \"\",\n \"email\": \"\",\n \"firstName\": \"\",\n \"holdTime\": \"\",\n \"lastName\": \"\"\n }\n ],\n \"corpus\": \"\",\n \"holdId\": \"\",\n \"name\": \"\",\n \"orgUnit\": {\n \"holdTime\": \"\",\n \"orgUnitId\": \"\"\n },\n \"query\": {\n \"driveQuery\": {\n \"includeSharedDriveFiles\": false,\n \"includeTeamDriveFiles\": false\n },\n \"groupsQuery\": {\n \"endTime\": \"\",\n \"startTime\": \"\",\n \"terms\": \"\"\n },\n \"hangoutsChatQuery\": {\n \"includeRooms\": false\n },\n \"mailQuery\": {\n \"endTime\": \"\",\n \"startTime\": \"\",\n \"terms\": \"\"\n },\n \"voiceQuery\": {\n \"coveredData\": []\n }\n },\n \"updateTime\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"accounts\": [\n {\n \"accountId\": \"\",\n \"email\": \"\",\n \"firstName\": \"\",\n \"holdTime\": \"\",\n \"lastName\": \"\"\n }\n ],\n \"corpus\": \"\",\n \"holdId\": \"\",\n \"name\": \"\",\n \"orgUnit\": {\n \"holdTime\": \"\",\n \"orgUnitId\": \"\"\n },\n \"query\": {\n \"driveQuery\": {\n \"includeSharedDriveFiles\": false,\n \"includeTeamDriveFiles\": false\n },\n \"groupsQuery\": {\n \"endTime\": \"\",\n \"startTime\": \"\",\n \"terms\": \"\"\n },\n \"hangoutsChatQuery\": {\n \"includeRooms\": false\n },\n \"mailQuery\": {\n \"endTime\": \"\",\n \"startTime\": \"\",\n \"terms\": \"\"\n },\n \"voiceQuery\": {\n \"coveredData\": []\n }\n },\n \"updateTime\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/matters/:matterId/holds")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1/matters/:matterId/holds")
.header("content-type", "application/json")
.body("{\n \"accounts\": [\n {\n \"accountId\": \"\",\n \"email\": \"\",\n \"firstName\": \"\",\n \"holdTime\": \"\",\n \"lastName\": \"\"\n }\n ],\n \"corpus\": \"\",\n \"holdId\": \"\",\n \"name\": \"\",\n \"orgUnit\": {\n \"holdTime\": \"\",\n \"orgUnitId\": \"\"\n },\n \"query\": {\n \"driveQuery\": {\n \"includeSharedDriveFiles\": false,\n \"includeTeamDriveFiles\": false\n },\n \"groupsQuery\": {\n \"endTime\": \"\",\n \"startTime\": \"\",\n \"terms\": \"\"\n },\n \"hangoutsChatQuery\": {\n \"includeRooms\": false\n },\n \"mailQuery\": {\n \"endTime\": \"\",\n \"startTime\": \"\",\n \"terms\": \"\"\n },\n \"voiceQuery\": {\n \"coveredData\": []\n }\n },\n \"updateTime\": \"\"\n}")
.asString();
const data = JSON.stringify({
accounts: [
{
accountId: '',
email: '',
firstName: '',
holdTime: '',
lastName: ''
}
],
corpus: '',
holdId: '',
name: '',
orgUnit: {
holdTime: '',
orgUnitId: ''
},
query: {
driveQuery: {
includeSharedDriveFiles: false,
includeTeamDriveFiles: false
},
groupsQuery: {
endTime: '',
startTime: '',
terms: ''
},
hangoutsChatQuery: {
includeRooms: false
},
mailQuery: {
endTime: '',
startTime: '',
terms: ''
},
voiceQuery: {
coveredData: []
}
},
updateTime: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v1/matters/:matterId/holds');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/matters/:matterId/holds',
headers: {'content-type': 'application/json'},
data: {
accounts: [{accountId: '', email: '', firstName: '', holdTime: '', lastName: ''}],
corpus: '',
holdId: '',
name: '',
orgUnit: {holdTime: '', orgUnitId: ''},
query: {
driveQuery: {includeSharedDriveFiles: false, includeTeamDriveFiles: false},
groupsQuery: {endTime: '', startTime: '', terms: ''},
hangoutsChatQuery: {includeRooms: false},
mailQuery: {endTime: '', startTime: '', terms: ''},
voiceQuery: {coveredData: []}
},
updateTime: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/matters/:matterId/holds';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"accounts":[{"accountId":"","email":"","firstName":"","holdTime":"","lastName":""}],"corpus":"","holdId":"","name":"","orgUnit":{"holdTime":"","orgUnitId":""},"query":{"driveQuery":{"includeSharedDriveFiles":false,"includeTeamDriveFiles":false},"groupsQuery":{"endTime":"","startTime":"","terms":""},"hangoutsChatQuery":{"includeRooms":false},"mailQuery":{"endTime":"","startTime":"","terms":""},"voiceQuery":{"coveredData":[]}},"updateTime":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/matters/:matterId/holds',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "accounts": [\n {\n "accountId": "",\n "email": "",\n "firstName": "",\n "holdTime": "",\n "lastName": ""\n }\n ],\n "corpus": "",\n "holdId": "",\n "name": "",\n "orgUnit": {\n "holdTime": "",\n "orgUnitId": ""\n },\n "query": {\n "driveQuery": {\n "includeSharedDriveFiles": false,\n "includeTeamDriveFiles": false\n },\n "groupsQuery": {\n "endTime": "",\n "startTime": "",\n "terms": ""\n },\n "hangoutsChatQuery": {\n "includeRooms": false\n },\n "mailQuery": {\n "endTime": "",\n "startTime": "",\n "terms": ""\n },\n "voiceQuery": {\n "coveredData": []\n }\n },\n "updateTime": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"accounts\": [\n {\n \"accountId\": \"\",\n \"email\": \"\",\n \"firstName\": \"\",\n \"holdTime\": \"\",\n \"lastName\": \"\"\n }\n ],\n \"corpus\": \"\",\n \"holdId\": \"\",\n \"name\": \"\",\n \"orgUnit\": {\n \"holdTime\": \"\",\n \"orgUnitId\": \"\"\n },\n \"query\": {\n \"driveQuery\": {\n \"includeSharedDriveFiles\": false,\n \"includeTeamDriveFiles\": false\n },\n \"groupsQuery\": {\n \"endTime\": \"\",\n \"startTime\": \"\",\n \"terms\": \"\"\n },\n \"hangoutsChatQuery\": {\n \"includeRooms\": false\n },\n \"mailQuery\": {\n \"endTime\": \"\",\n \"startTime\": \"\",\n \"terms\": \"\"\n },\n \"voiceQuery\": {\n \"coveredData\": []\n }\n },\n \"updateTime\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1/matters/:matterId/holds")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/matters/:matterId/holds',
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({
accounts: [{accountId: '', email: '', firstName: '', holdTime: '', lastName: ''}],
corpus: '',
holdId: '',
name: '',
orgUnit: {holdTime: '', orgUnitId: ''},
query: {
driveQuery: {includeSharedDriveFiles: false, includeTeamDriveFiles: false},
groupsQuery: {endTime: '', startTime: '', terms: ''},
hangoutsChatQuery: {includeRooms: false},
mailQuery: {endTime: '', startTime: '', terms: ''},
voiceQuery: {coveredData: []}
},
updateTime: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/matters/:matterId/holds',
headers: {'content-type': 'application/json'},
body: {
accounts: [{accountId: '', email: '', firstName: '', holdTime: '', lastName: ''}],
corpus: '',
holdId: '',
name: '',
orgUnit: {holdTime: '', orgUnitId: ''},
query: {
driveQuery: {includeSharedDriveFiles: false, includeTeamDriveFiles: false},
groupsQuery: {endTime: '', startTime: '', terms: ''},
hangoutsChatQuery: {includeRooms: false},
mailQuery: {endTime: '', startTime: '', terms: ''},
voiceQuery: {coveredData: []}
},
updateTime: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/v1/matters/:matterId/holds');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
accounts: [
{
accountId: '',
email: '',
firstName: '',
holdTime: '',
lastName: ''
}
],
corpus: '',
holdId: '',
name: '',
orgUnit: {
holdTime: '',
orgUnitId: ''
},
query: {
driveQuery: {
includeSharedDriveFiles: false,
includeTeamDriveFiles: false
},
groupsQuery: {
endTime: '',
startTime: '',
terms: ''
},
hangoutsChatQuery: {
includeRooms: false
},
mailQuery: {
endTime: '',
startTime: '',
terms: ''
},
voiceQuery: {
coveredData: []
}
},
updateTime: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/matters/:matterId/holds',
headers: {'content-type': 'application/json'},
data: {
accounts: [{accountId: '', email: '', firstName: '', holdTime: '', lastName: ''}],
corpus: '',
holdId: '',
name: '',
orgUnit: {holdTime: '', orgUnitId: ''},
query: {
driveQuery: {includeSharedDriveFiles: false, includeTeamDriveFiles: false},
groupsQuery: {endTime: '', startTime: '', terms: ''},
hangoutsChatQuery: {includeRooms: false},
mailQuery: {endTime: '', startTime: '', terms: ''},
voiceQuery: {coveredData: []}
},
updateTime: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/matters/:matterId/holds';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"accounts":[{"accountId":"","email":"","firstName":"","holdTime":"","lastName":""}],"corpus":"","holdId":"","name":"","orgUnit":{"holdTime":"","orgUnitId":""},"query":{"driveQuery":{"includeSharedDriveFiles":false,"includeTeamDriveFiles":false},"groupsQuery":{"endTime":"","startTime":"","terms":""},"hangoutsChatQuery":{"includeRooms":false},"mailQuery":{"endTime":"","startTime":"","terms":""},"voiceQuery":{"coveredData":[]}},"updateTime":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"accounts": @[ @{ @"accountId": @"", @"email": @"", @"firstName": @"", @"holdTime": @"", @"lastName": @"" } ],
@"corpus": @"",
@"holdId": @"",
@"name": @"",
@"orgUnit": @{ @"holdTime": @"", @"orgUnitId": @"" },
@"query": @{ @"driveQuery": @{ @"includeSharedDriveFiles": @NO, @"includeTeamDriveFiles": @NO }, @"groupsQuery": @{ @"endTime": @"", @"startTime": @"", @"terms": @"" }, @"hangoutsChatQuery": @{ @"includeRooms": @NO }, @"mailQuery": @{ @"endTime": @"", @"startTime": @"", @"terms": @"" }, @"voiceQuery": @{ @"coveredData": @[ ] } },
@"updateTime": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/matters/:matterId/holds"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/matters/:matterId/holds" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"accounts\": [\n {\n \"accountId\": \"\",\n \"email\": \"\",\n \"firstName\": \"\",\n \"holdTime\": \"\",\n \"lastName\": \"\"\n }\n ],\n \"corpus\": \"\",\n \"holdId\": \"\",\n \"name\": \"\",\n \"orgUnit\": {\n \"holdTime\": \"\",\n \"orgUnitId\": \"\"\n },\n \"query\": {\n \"driveQuery\": {\n \"includeSharedDriveFiles\": false,\n \"includeTeamDriveFiles\": false\n },\n \"groupsQuery\": {\n \"endTime\": \"\",\n \"startTime\": \"\",\n \"terms\": \"\"\n },\n \"hangoutsChatQuery\": {\n \"includeRooms\": false\n },\n \"mailQuery\": {\n \"endTime\": \"\",\n \"startTime\": \"\",\n \"terms\": \"\"\n },\n \"voiceQuery\": {\n \"coveredData\": []\n }\n },\n \"updateTime\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/matters/:matterId/holds",
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([
'accounts' => [
[
'accountId' => '',
'email' => '',
'firstName' => '',
'holdTime' => '',
'lastName' => ''
]
],
'corpus' => '',
'holdId' => '',
'name' => '',
'orgUnit' => [
'holdTime' => '',
'orgUnitId' => ''
],
'query' => [
'driveQuery' => [
'includeSharedDriveFiles' => null,
'includeTeamDriveFiles' => null
],
'groupsQuery' => [
'endTime' => '',
'startTime' => '',
'terms' => ''
],
'hangoutsChatQuery' => [
'includeRooms' => null
],
'mailQuery' => [
'endTime' => '',
'startTime' => '',
'terms' => ''
],
'voiceQuery' => [
'coveredData' => [
]
]
],
'updateTime' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/v1/matters/:matterId/holds', [
'body' => '{
"accounts": [
{
"accountId": "",
"email": "",
"firstName": "",
"holdTime": "",
"lastName": ""
}
],
"corpus": "",
"holdId": "",
"name": "",
"orgUnit": {
"holdTime": "",
"orgUnitId": ""
},
"query": {
"driveQuery": {
"includeSharedDriveFiles": false,
"includeTeamDriveFiles": false
},
"groupsQuery": {
"endTime": "",
"startTime": "",
"terms": ""
},
"hangoutsChatQuery": {
"includeRooms": false
},
"mailQuery": {
"endTime": "",
"startTime": "",
"terms": ""
},
"voiceQuery": {
"coveredData": []
}
},
"updateTime": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1/matters/:matterId/holds');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'accounts' => [
[
'accountId' => '',
'email' => '',
'firstName' => '',
'holdTime' => '',
'lastName' => ''
]
],
'corpus' => '',
'holdId' => '',
'name' => '',
'orgUnit' => [
'holdTime' => '',
'orgUnitId' => ''
],
'query' => [
'driveQuery' => [
'includeSharedDriveFiles' => null,
'includeTeamDriveFiles' => null
],
'groupsQuery' => [
'endTime' => '',
'startTime' => '',
'terms' => ''
],
'hangoutsChatQuery' => [
'includeRooms' => null
],
'mailQuery' => [
'endTime' => '',
'startTime' => '',
'terms' => ''
],
'voiceQuery' => [
'coveredData' => [
]
]
],
'updateTime' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'accounts' => [
[
'accountId' => '',
'email' => '',
'firstName' => '',
'holdTime' => '',
'lastName' => ''
]
],
'corpus' => '',
'holdId' => '',
'name' => '',
'orgUnit' => [
'holdTime' => '',
'orgUnitId' => ''
],
'query' => [
'driveQuery' => [
'includeSharedDriveFiles' => null,
'includeTeamDriveFiles' => null
],
'groupsQuery' => [
'endTime' => '',
'startTime' => '',
'terms' => ''
],
'hangoutsChatQuery' => [
'includeRooms' => null
],
'mailQuery' => [
'endTime' => '',
'startTime' => '',
'terms' => ''
],
'voiceQuery' => [
'coveredData' => [
]
]
],
'updateTime' => ''
]));
$request->setRequestUrl('{{baseUrl}}/v1/matters/:matterId/holds');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/matters/:matterId/holds' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"accounts": [
{
"accountId": "",
"email": "",
"firstName": "",
"holdTime": "",
"lastName": ""
}
],
"corpus": "",
"holdId": "",
"name": "",
"orgUnit": {
"holdTime": "",
"orgUnitId": ""
},
"query": {
"driveQuery": {
"includeSharedDriveFiles": false,
"includeTeamDriveFiles": false
},
"groupsQuery": {
"endTime": "",
"startTime": "",
"terms": ""
},
"hangoutsChatQuery": {
"includeRooms": false
},
"mailQuery": {
"endTime": "",
"startTime": "",
"terms": ""
},
"voiceQuery": {
"coveredData": []
}
},
"updateTime": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/matters/:matterId/holds' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"accounts": [
{
"accountId": "",
"email": "",
"firstName": "",
"holdTime": "",
"lastName": ""
}
],
"corpus": "",
"holdId": "",
"name": "",
"orgUnit": {
"holdTime": "",
"orgUnitId": ""
},
"query": {
"driveQuery": {
"includeSharedDriveFiles": false,
"includeTeamDriveFiles": false
},
"groupsQuery": {
"endTime": "",
"startTime": "",
"terms": ""
},
"hangoutsChatQuery": {
"includeRooms": false
},
"mailQuery": {
"endTime": "",
"startTime": "",
"terms": ""
},
"voiceQuery": {
"coveredData": []
}
},
"updateTime": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"accounts\": [\n {\n \"accountId\": \"\",\n \"email\": \"\",\n \"firstName\": \"\",\n \"holdTime\": \"\",\n \"lastName\": \"\"\n }\n ],\n \"corpus\": \"\",\n \"holdId\": \"\",\n \"name\": \"\",\n \"orgUnit\": {\n \"holdTime\": \"\",\n \"orgUnitId\": \"\"\n },\n \"query\": {\n \"driveQuery\": {\n \"includeSharedDriveFiles\": false,\n \"includeTeamDriveFiles\": false\n },\n \"groupsQuery\": {\n \"endTime\": \"\",\n \"startTime\": \"\",\n \"terms\": \"\"\n },\n \"hangoutsChatQuery\": {\n \"includeRooms\": false\n },\n \"mailQuery\": {\n \"endTime\": \"\",\n \"startTime\": \"\",\n \"terms\": \"\"\n },\n \"voiceQuery\": {\n \"coveredData\": []\n }\n },\n \"updateTime\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1/matters/:matterId/holds", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/matters/:matterId/holds"
payload = {
"accounts": [
{
"accountId": "",
"email": "",
"firstName": "",
"holdTime": "",
"lastName": ""
}
],
"corpus": "",
"holdId": "",
"name": "",
"orgUnit": {
"holdTime": "",
"orgUnitId": ""
},
"query": {
"driveQuery": {
"includeSharedDriveFiles": False,
"includeTeamDriveFiles": False
},
"groupsQuery": {
"endTime": "",
"startTime": "",
"terms": ""
},
"hangoutsChatQuery": { "includeRooms": False },
"mailQuery": {
"endTime": "",
"startTime": "",
"terms": ""
},
"voiceQuery": { "coveredData": [] }
},
"updateTime": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/matters/:matterId/holds"
payload <- "{\n \"accounts\": [\n {\n \"accountId\": \"\",\n \"email\": \"\",\n \"firstName\": \"\",\n \"holdTime\": \"\",\n \"lastName\": \"\"\n }\n ],\n \"corpus\": \"\",\n \"holdId\": \"\",\n \"name\": \"\",\n \"orgUnit\": {\n \"holdTime\": \"\",\n \"orgUnitId\": \"\"\n },\n \"query\": {\n \"driveQuery\": {\n \"includeSharedDriveFiles\": false,\n \"includeTeamDriveFiles\": false\n },\n \"groupsQuery\": {\n \"endTime\": \"\",\n \"startTime\": \"\",\n \"terms\": \"\"\n },\n \"hangoutsChatQuery\": {\n \"includeRooms\": false\n },\n \"mailQuery\": {\n \"endTime\": \"\",\n \"startTime\": \"\",\n \"terms\": \"\"\n },\n \"voiceQuery\": {\n \"coveredData\": []\n }\n },\n \"updateTime\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/matters/:matterId/holds")
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 \"accounts\": [\n {\n \"accountId\": \"\",\n \"email\": \"\",\n \"firstName\": \"\",\n \"holdTime\": \"\",\n \"lastName\": \"\"\n }\n ],\n \"corpus\": \"\",\n \"holdId\": \"\",\n \"name\": \"\",\n \"orgUnit\": {\n \"holdTime\": \"\",\n \"orgUnitId\": \"\"\n },\n \"query\": {\n \"driveQuery\": {\n \"includeSharedDriveFiles\": false,\n \"includeTeamDriveFiles\": false\n },\n \"groupsQuery\": {\n \"endTime\": \"\",\n \"startTime\": \"\",\n \"terms\": \"\"\n },\n \"hangoutsChatQuery\": {\n \"includeRooms\": false\n },\n \"mailQuery\": {\n \"endTime\": \"\",\n \"startTime\": \"\",\n \"terms\": \"\"\n },\n \"voiceQuery\": {\n \"coveredData\": []\n }\n },\n \"updateTime\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/v1/matters/:matterId/holds') do |req|
req.body = "{\n \"accounts\": [\n {\n \"accountId\": \"\",\n \"email\": \"\",\n \"firstName\": \"\",\n \"holdTime\": \"\",\n \"lastName\": \"\"\n }\n ],\n \"corpus\": \"\",\n \"holdId\": \"\",\n \"name\": \"\",\n \"orgUnit\": {\n \"holdTime\": \"\",\n \"orgUnitId\": \"\"\n },\n \"query\": {\n \"driveQuery\": {\n \"includeSharedDriveFiles\": false,\n \"includeTeamDriveFiles\": false\n },\n \"groupsQuery\": {\n \"endTime\": \"\",\n \"startTime\": \"\",\n \"terms\": \"\"\n },\n \"hangoutsChatQuery\": {\n \"includeRooms\": false\n },\n \"mailQuery\": {\n \"endTime\": \"\",\n \"startTime\": \"\",\n \"terms\": \"\"\n },\n \"voiceQuery\": {\n \"coveredData\": []\n }\n },\n \"updateTime\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/matters/:matterId/holds";
let payload = json!({
"accounts": (
json!({
"accountId": "",
"email": "",
"firstName": "",
"holdTime": "",
"lastName": ""
})
),
"corpus": "",
"holdId": "",
"name": "",
"orgUnit": json!({
"holdTime": "",
"orgUnitId": ""
}),
"query": json!({
"driveQuery": json!({
"includeSharedDriveFiles": false,
"includeTeamDriveFiles": false
}),
"groupsQuery": json!({
"endTime": "",
"startTime": "",
"terms": ""
}),
"hangoutsChatQuery": json!({"includeRooms": false}),
"mailQuery": json!({
"endTime": "",
"startTime": "",
"terms": ""
}),
"voiceQuery": json!({"coveredData": ()})
}),
"updateTime": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/v1/matters/:matterId/holds \
--header 'content-type: application/json' \
--data '{
"accounts": [
{
"accountId": "",
"email": "",
"firstName": "",
"holdTime": "",
"lastName": ""
}
],
"corpus": "",
"holdId": "",
"name": "",
"orgUnit": {
"holdTime": "",
"orgUnitId": ""
},
"query": {
"driveQuery": {
"includeSharedDriveFiles": false,
"includeTeamDriveFiles": false
},
"groupsQuery": {
"endTime": "",
"startTime": "",
"terms": ""
},
"hangoutsChatQuery": {
"includeRooms": false
},
"mailQuery": {
"endTime": "",
"startTime": "",
"terms": ""
},
"voiceQuery": {
"coveredData": []
}
},
"updateTime": ""
}'
echo '{
"accounts": [
{
"accountId": "",
"email": "",
"firstName": "",
"holdTime": "",
"lastName": ""
}
],
"corpus": "",
"holdId": "",
"name": "",
"orgUnit": {
"holdTime": "",
"orgUnitId": ""
},
"query": {
"driveQuery": {
"includeSharedDriveFiles": false,
"includeTeamDriveFiles": false
},
"groupsQuery": {
"endTime": "",
"startTime": "",
"terms": ""
},
"hangoutsChatQuery": {
"includeRooms": false
},
"mailQuery": {
"endTime": "",
"startTime": "",
"terms": ""
},
"voiceQuery": {
"coveredData": []
}
},
"updateTime": ""
}' | \
http POST {{baseUrl}}/v1/matters/:matterId/holds \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "accounts": [\n {\n "accountId": "",\n "email": "",\n "firstName": "",\n "holdTime": "",\n "lastName": ""\n }\n ],\n "corpus": "",\n "holdId": "",\n "name": "",\n "orgUnit": {\n "holdTime": "",\n "orgUnitId": ""\n },\n "query": {\n "driveQuery": {\n "includeSharedDriveFiles": false,\n "includeTeamDriveFiles": false\n },\n "groupsQuery": {\n "endTime": "",\n "startTime": "",\n "terms": ""\n },\n "hangoutsChatQuery": {\n "includeRooms": false\n },\n "mailQuery": {\n "endTime": "",\n "startTime": "",\n "terms": ""\n },\n "voiceQuery": {\n "coveredData": []\n }\n },\n "updateTime": ""\n}' \
--output-document \
- {{baseUrl}}/v1/matters/:matterId/holds
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"accounts": [
[
"accountId": "",
"email": "",
"firstName": "",
"holdTime": "",
"lastName": ""
]
],
"corpus": "",
"holdId": "",
"name": "",
"orgUnit": [
"holdTime": "",
"orgUnitId": ""
],
"query": [
"driveQuery": [
"includeSharedDriveFiles": false,
"includeTeamDriveFiles": false
],
"groupsQuery": [
"endTime": "",
"startTime": "",
"terms": ""
],
"hangoutsChatQuery": ["includeRooms": false],
"mailQuery": [
"endTime": "",
"startTime": "",
"terms": ""
],
"voiceQuery": ["coveredData": []]
],
"updateTime": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/matters/:matterId/holds")! 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
vault.matters.holds.delete
{{baseUrl}}/v1/matters/:matterId/holds/:holdId
QUERY PARAMS
matterId
holdId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/matters/:matterId/holds/:holdId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/v1/matters/:matterId/holds/:holdId")
require "http/client"
url = "{{baseUrl}}/v1/matters/:matterId/holds/:holdId"
response = HTTP::Client.delete url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Delete,
RequestUri = new Uri("{{baseUrl}}/v1/matters/:matterId/holds/:holdId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/matters/:matterId/holds/:holdId");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/matters/:matterId/holds/:holdId"
req, _ := http.NewRequest("DELETE", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
DELETE /baseUrl/v1/matters/:matterId/holds/:holdId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/v1/matters/:matterId/holds/:holdId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/matters/:matterId/holds/:holdId"))
.method("DELETE", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/matters/:matterId/holds/:holdId")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/v1/matters/:matterId/holds/:holdId")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('DELETE', '{{baseUrl}}/v1/matters/:matterId/holds/:holdId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'DELETE',
url: '{{baseUrl}}/v1/matters/:matterId/holds/:holdId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/matters/:matterId/holds/:holdId';
const options = {method: 'DELETE'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/matters/:matterId/holds/:holdId',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1/matters/:matterId/holds/:holdId")
.delete(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/matters/:matterId/holds/:holdId',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'DELETE',
url: '{{baseUrl}}/v1/matters/:matterId/holds/:holdId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/v1/matters/:matterId/holds/:holdId');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'DELETE',
url: '{{baseUrl}}/v1/matters/:matterId/holds/:holdId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/matters/:matterId/holds/:holdId';
const options = {method: 'DELETE'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/matters/:matterId/holds/:holdId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"DELETE"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/matters/:matterId/holds/:holdId" in
Client.call `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/matters/:matterId/holds/:holdId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('DELETE', '{{baseUrl}}/v1/matters/:matterId/holds/:holdId');
echo $response->getBody();
setUrl('{{baseUrl}}/v1/matters/:matterId/holds/:holdId');
$request->setMethod(HTTP_METH_DELETE);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/matters/:matterId/holds/:holdId');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/matters/:matterId/holds/:holdId' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/matters/:matterId/holds/:holdId' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/v1/matters/:matterId/holds/:holdId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/matters/:matterId/holds/:holdId"
response = requests.delete(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/matters/:matterId/holds/:holdId"
response <- VERB("DELETE", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/matters/:matterId/holds/:holdId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.delete('/baseUrl/v1/matters/:matterId/holds/:holdId') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/matters/:matterId/holds/:holdId";
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("DELETE").unwrap(), url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request DELETE \
--url {{baseUrl}}/v1/matters/:matterId/holds/:holdId
http DELETE {{baseUrl}}/v1/matters/:matterId/holds/:holdId
wget --quiet \
--method DELETE \
--output-document \
- {{baseUrl}}/v1/matters/:matterId/holds/:holdId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/matters/:matterId/holds/:holdId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "DELETE"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
vault.matters.holds.get
{{baseUrl}}/v1/matters/:matterId/holds/:holdId
QUERY PARAMS
matterId
holdId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/matters/:matterId/holds/:holdId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v1/matters/:matterId/holds/:holdId")
require "http/client"
url = "{{baseUrl}}/v1/matters/:matterId/holds/:holdId"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/v1/matters/:matterId/holds/:holdId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/matters/:matterId/holds/:holdId");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/matters/:matterId/holds/:holdId"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/v1/matters/:matterId/holds/:holdId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1/matters/:matterId/holds/:holdId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/matters/:matterId/holds/:holdId"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/matters/:matterId/holds/:holdId")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1/matters/:matterId/holds/:holdId")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/v1/matters/:matterId/holds/:holdId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/v1/matters/:matterId/holds/:holdId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/matters/:matterId/holds/:holdId';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/matters/:matterId/holds/:holdId',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1/matters/:matterId/holds/:holdId")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/matters/:matterId/holds/:holdId',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/v1/matters/:matterId/holds/:holdId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v1/matters/:matterId/holds/:holdId');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/v1/matters/:matterId/holds/:holdId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/matters/:matterId/holds/:holdId';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/matters/:matterId/holds/:holdId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/matters/:matterId/holds/:holdId" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/matters/:matterId/holds/:holdId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/v1/matters/:matterId/holds/:holdId');
echo $response->getBody();
setUrl('{{baseUrl}}/v1/matters/:matterId/holds/:holdId');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/matters/:matterId/holds/:holdId');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/matters/:matterId/holds/:holdId' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/matters/:matterId/holds/:holdId' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v1/matters/:matterId/holds/:holdId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/matters/:matterId/holds/:holdId"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/matters/:matterId/holds/:holdId"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/matters/:matterId/holds/:holdId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/v1/matters/:matterId/holds/:holdId') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/matters/:matterId/holds/:holdId";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/v1/matters/:matterId/holds/:holdId
http GET {{baseUrl}}/v1/matters/:matterId/holds/:holdId
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v1/matters/:matterId/holds/:holdId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/matters/:matterId/holds/:holdId")! 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
vault.matters.holds.list
{{baseUrl}}/v1/matters/:matterId/holds
QUERY PARAMS
matterId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/matters/:matterId/holds");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v1/matters/:matterId/holds")
require "http/client"
url = "{{baseUrl}}/v1/matters/:matterId/holds"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/v1/matters/:matterId/holds"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/matters/:matterId/holds");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/matters/:matterId/holds"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/v1/matters/:matterId/holds HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1/matters/:matterId/holds")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/matters/:matterId/holds"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/matters/:matterId/holds")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1/matters/:matterId/holds")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/v1/matters/:matterId/holds');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/v1/matters/:matterId/holds'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/matters/:matterId/holds';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/matters/:matterId/holds',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1/matters/:matterId/holds")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/matters/:matterId/holds',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'GET', url: '{{baseUrl}}/v1/matters/:matterId/holds'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v1/matters/:matterId/holds');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {method: 'GET', url: '{{baseUrl}}/v1/matters/:matterId/holds'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/matters/:matterId/holds';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/matters/:matterId/holds"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/matters/:matterId/holds" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/matters/:matterId/holds",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/v1/matters/:matterId/holds');
echo $response->getBody();
setUrl('{{baseUrl}}/v1/matters/:matterId/holds');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/matters/:matterId/holds');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/matters/:matterId/holds' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/matters/:matterId/holds' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v1/matters/:matterId/holds")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/matters/:matterId/holds"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/matters/:matterId/holds"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/matters/:matterId/holds")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/v1/matters/:matterId/holds') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/matters/:matterId/holds";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/v1/matters/:matterId/holds
http GET {{baseUrl}}/v1/matters/:matterId/holds
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v1/matters/:matterId/holds
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/matters/:matterId/holds")! 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
vault.matters.holds.removeHeldAccounts
{{baseUrl}}/v1/matters/:matterId/holds/:holdId:removeHeldAccounts
QUERY PARAMS
matterId
holdId
BODY json
{
"accountIds": []
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/matters/:matterId/holds/:holdId:removeHeldAccounts");
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 \"accountIds\": []\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1/matters/:matterId/holds/:holdId:removeHeldAccounts" {:content-type :json
:form-params {:accountIds []}})
require "http/client"
url = "{{baseUrl}}/v1/matters/:matterId/holds/:holdId:removeHeldAccounts"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"accountIds\": []\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/v1/matters/:matterId/holds/:holdId:removeHeldAccounts"),
Content = new StringContent("{\n \"accountIds\": []\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/matters/:matterId/holds/:holdId:removeHeldAccounts");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"accountIds\": []\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/matters/:matterId/holds/:holdId:removeHeldAccounts"
payload := strings.NewReader("{\n \"accountIds\": []\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/v1/matters/:matterId/holds/:holdId:removeHeldAccounts HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 22
{
"accountIds": []
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1/matters/:matterId/holds/:holdId:removeHeldAccounts")
.setHeader("content-type", "application/json")
.setBody("{\n \"accountIds\": []\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/matters/:matterId/holds/:holdId:removeHeldAccounts"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"accountIds\": []\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 \"accountIds\": []\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/matters/:matterId/holds/:holdId:removeHeldAccounts")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1/matters/:matterId/holds/:holdId:removeHeldAccounts")
.header("content-type", "application/json")
.body("{\n \"accountIds\": []\n}")
.asString();
const data = JSON.stringify({
accountIds: []
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v1/matters/:matterId/holds/:holdId:removeHeldAccounts');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/matters/:matterId/holds/:holdId:removeHeldAccounts',
headers: {'content-type': 'application/json'},
data: {accountIds: []}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/matters/:matterId/holds/:holdId:removeHeldAccounts';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"accountIds":[]}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/matters/:matterId/holds/:holdId:removeHeldAccounts',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "accountIds": []\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"accountIds\": []\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1/matters/:matterId/holds/:holdId:removeHeldAccounts")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/matters/:matterId/holds/:holdId:removeHeldAccounts',
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({accountIds: []}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/matters/:matterId/holds/:holdId:removeHeldAccounts',
headers: {'content-type': 'application/json'},
body: {accountIds: []},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/v1/matters/:matterId/holds/:holdId:removeHeldAccounts');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
accountIds: []
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/matters/:matterId/holds/:holdId:removeHeldAccounts',
headers: {'content-type': 'application/json'},
data: {accountIds: []}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/matters/:matterId/holds/:holdId:removeHeldAccounts';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"accountIds":[]}'
};
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 = @{ @"accountIds": @[ ] };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/matters/:matterId/holds/:holdId:removeHeldAccounts"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/matters/:matterId/holds/:holdId:removeHeldAccounts" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"accountIds\": []\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/matters/:matterId/holds/:holdId:removeHeldAccounts",
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([
'accountIds' => [
]
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/v1/matters/:matterId/holds/:holdId:removeHeldAccounts', [
'body' => '{
"accountIds": []
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1/matters/:matterId/holds/:holdId:removeHeldAccounts');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'accountIds' => [
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'accountIds' => [
]
]));
$request->setRequestUrl('{{baseUrl}}/v1/matters/:matterId/holds/:holdId:removeHeldAccounts');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/matters/:matterId/holds/:holdId:removeHeldAccounts' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"accountIds": []
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/matters/:matterId/holds/:holdId:removeHeldAccounts' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"accountIds": []
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"accountIds\": []\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1/matters/:matterId/holds/:holdId:removeHeldAccounts", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/matters/:matterId/holds/:holdId:removeHeldAccounts"
payload = { "accountIds": [] }
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/matters/:matterId/holds/:holdId:removeHeldAccounts"
payload <- "{\n \"accountIds\": []\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/matters/:matterId/holds/:holdId:removeHeldAccounts")
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 \"accountIds\": []\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/v1/matters/:matterId/holds/:holdId:removeHeldAccounts') do |req|
req.body = "{\n \"accountIds\": []\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/matters/:matterId/holds/:holdId:removeHeldAccounts";
let payload = json!({"accountIds": ()});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/v1/matters/:matterId/holds/:holdId:removeHeldAccounts \
--header 'content-type: application/json' \
--data '{
"accountIds": []
}'
echo '{
"accountIds": []
}' | \
http POST {{baseUrl}}/v1/matters/:matterId/holds/:holdId:removeHeldAccounts \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "accountIds": []\n}' \
--output-document \
- {{baseUrl}}/v1/matters/:matterId/holds/:holdId:removeHeldAccounts
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["accountIds": []] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/matters/:matterId/holds/:holdId:removeHeldAccounts")! 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()
PUT
vault.matters.holds.update
{{baseUrl}}/v1/matters/:matterId/holds/:holdId
QUERY PARAMS
matterId
holdId
BODY json
{
"accounts": [
{
"accountId": "",
"email": "",
"firstName": "",
"holdTime": "",
"lastName": ""
}
],
"corpus": "",
"holdId": "",
"name": "",
"orgUnit": {
"holdTime": "",
"orgUnitId": ""
},
"query": {
"driveQuery": {
"includeSharedDriveFiles": false,
"includeTeamDriveFiles": false
},
"groupsQuery": {
"endTime": "",
"startTime": "",
"terms": ""
},
"hangoutsChatQuery": {
"includeRooms": false
},
"mailQuery": {
"endTime": "",
"startTime": "",
"terms": ""
},
"voiceQuery": {
"coveredData": []
}
},
"updateTime": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/matters/:matterId/holds/:holdId");
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 \"accounts\": [\n {\n \"accountId\": \"\",\n \"email\": \"\",\n \"firstName\": \"\",\n \"holdTime\": \"\",\n \"lastName\": \"\"\n }\n ],\n \"corpus\": \"\",\n \"holdId\": \"\",\n \"name\": \"\",\n \"orgUnit\": {\n \"holdTime\": \"\",\n \"orgUnitId\": \"\"\n },\n \"query\": {\n \"driveQuery\": {\n \"includeSharedDriveFiles\": false,\n \"includeTeamDriveFiles\": false\n },\n \"groupsQuery\": {\n \"endTime\": \"\",\n \"startTime\": \"\",\n \"terms\": \"\"\n },\n \"hangoutsChatQuery\": {\n \"includeRooms\": false\n },\n \"mailQuery\": {\n \"endTime\": \"\",\n \"startTime\": \"\",\n \"terms\": \"\"\n },\n \"voiceQuery\": {\n \"coveredData\": []\n }\n },\n \"updateTime\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/v1/matters/:matterId/holds/:holdId" {:content-type :json
:form-params {:accounts [{:accountId ""
:email ""
:firstName ""
:holdTime ""
:lastName ""}]
:corpus ""
:holdId ""
:name ""
:orgUnit {:holdTime ""
:orgUnitId ""}
:query {:driveQuery {:includeSharedDriveFiles false
:includeTeamDriveFiles false}
:groupsQuery {:endTime ""
:startTime ""
:terms ""}
:hangoutsChatQuery {:includeRooms false}
:mailQuery {:endTime ""
:startTime ""
:terms ""}
:voiceQuery {:coveredData []}}
:updateTime ""}})
require "http/client"
url = "{{baseUrl}}/v1/matters/:matterId/holds/:holdId"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"accounts\": [\n {\n \"accountId\": \"\",\n \"email\": \"\",\n \"firstName\": \"\",\n \"holdTime\": \"\",\n \"lastName\": \"\"\n }\n ],\n \"corpus\": \"\",\n \"holdId\": \"\",\n \"name\": \"\",\n \"orgUnit\": {\n \"holdTime\": \"\",\n \"orgUnitId\": \"\"\n },\n \"query\": {\n \"driveQuery\": {\n \"includeSharedDriveFiles\": false,\n \"includeTeamDriveFiles\": false\n },\n \"groupsQuery\": {\n \"endTime\": \"\",\n \"startTime\": \"\",\n \"terms\": \"\"\n },\n \"hangoutsChatQuery\": {\n \"includeRooms\": false\n },\n \"mailQuery\": {\n \"endTime\": \"\",\n \"startTime\": \"\",\n \"terms\": \"\"\n },\n \"voiceQuery\": {\n \"coveredData\": []\n }\n },\n \"updateTime\": \"\"\n}"
response = HTTP::Client.put url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Put,
RequestUri = new Uri("{{baseUrl}}/v1/matters/:matterId/holds/:holdId"),
Content = new StringContent("{\n \"accounts\": [\n {\n \"accountId\": \"\",\n \"email\": \"\",\n \"firstName\": \"\",\n \"holdTime\": \"\",\n \"lastName\": \"\"\n }\n ],\n \"corpus\": \"\",\n \"holdId\": \"\",\n \"name\": \"\",\n \"orgUnit\": {\n \"holdTime\": \"\",\n \"orgUnitId\": \"\"\n },\n \"query\": {\n \"driveQuery\": {\n \"includeSharedDriveFiles\": false,\n \"includeTeamDriveFiles\": false\n },\n \"groupsQuery\": {\n \"endTime\": \"\",\n \"startTime\": \"\",\n \"terms\": \"\"\n },\n \"hangoutsChatQuery\": {\n \"includeRooms\": false\n },\n \"mailQuery\": {\n \"endTime\": \"\",\n \"startTime\": \"\",\n \"terms\": \"\"\n },\n \"voiceQuery\": {\n \"coveredData\": []\n }\n },\n \"updateTime\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/matters/:matterId/holds/:holdId");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"accounts\": [\n {\n \"accountId\": \"\",\n \"email\": \"\",\n \"firstName\": \"\",\n \"holdTime\": \"\",\n \"lastName\": \"\"\n }\n ],\n \"corpus\": \"\",\n \"holdId\": \"\",\n \"name\": \"\",\n \"orgUnit\": {\n \"holdTime\": \"\",\n \"orgUnitId\": \"\"\n },\n \"query\": {\n \"driveQuery\": {\n \"includeSharedDriveFiles\": false,\n \"includeTeamDriveFiles\": false\n },\n \"groupsQuery\": {\n \"endTime\": \"\",\n \"startTime\": \"\",\n \"terms\": \"\"\n },\n \"hangoutsChatQuery\": {\n \"includeRooms\": false\n },\n \"mailQuery\": {\n \"endTime\": \"\",\n \"startTime\": \"\",\n \"terms\": \"\"\n },\n \"voiceQuery\": {\n \"coveredData\": []\n }\n },\n \"updateTime\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/matters/:matterId/holds/:holdId"
payload := strings.NewReader("{\n \"accounts\": [\n {\n \"accountId\": \"\",\n \"email\": \"\",\n \"firstName\": \"\",\n \"holdTime\": \"\",\n \"lastName\": \"\"\n }\n ],\n \"corpus\": \"\",\n \"holdId\": \"\",\n \"name\": \"\",\n \"orgUnit\": {\n \"holdTime\": \"\",\n \"orgUnitId\": \"\"\n },\n \"query\": {\n \"driveQuery\": {\n \"includeSharedDriveFiles\": false,\n \"includeTeamDriveFiles\": false\n },\n \"groupsQuery\": {\n \"endTime\": \"\",\n \"startTime\": \"\",\n \"terms\": \"\"\n },\n \"hangoutsChatQuery\": {\n \"includeRooms\": false\n },\n \"mailQuery\": {\n \"endTime\": \"\",\n \"startTime\": \"\",\n \"terms\": \"\"\n },\n \"voiceQuery\": {\n \"coveredData\": []\n }\n },\n \"updateTime\": \"\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
PUT /baseUrl/v1/matters/:matterId/holds/:holdId HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 681
{
"accounts": [
{
"accountId": "",
"email": "",
"firstName": "",
"holdTime": "",
"lastName": ""
}
],
"corpus": "",
"holdId": "",
"name": "",
"orgUnit": {
"holdTime": "",
"orgUnitId": ""
},
"query": {
"driveQuery": {
"includeSharedDriveFiles": false,
"includeTeamDriveFiles": false
},
"groupsQuery": {
"endTime": "",
"startTime": "",
"terms": ""
},
"hangoutsChatQuery": {
"includeRooms": false
},
"mailQuery": {
"endTime": "",
"startTime": "",
"terms": ""
},
"voiceQuery": {
"coveredData": []
}
},
"updateTime": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/v1/matters/:matterId/holds/:holdId")
.setHeader("content-type", "application/json")
.setBody("{\n \"accounts\": [\n {\n \"accountId\": \"\",\n \"email\": \"\",\n \"firstName\": \"\",\n \"holdTime\": \"\",\n \"lastName\": \"\"\n }\n ],\n \"corpus\": \"\",\n \"holdId\": \"\",\n \"name\": \"\",\n \"orgUnit\": {\n \"holdTime\": \"\",\n \"orgUnitId\": \"\"\n },\n \"query\": {\n \"driveQuery\": {\n \"includeSharedDriveFiles\": false,\n \"includeTeamDriveFiles\": false\n },\n \"groupsQuery\": {\n \"endTime\": \"\",\n \"startTime\": \"\",\n \"terms\": \"\"\n },\n \"hangoutsChatQuery\": {\n \"includeRooms\": false\n },\n \"mailQuery\": {\n \"endTime\": \"\",\n \"startTime\": \"\",\n \"terms\": \"\"\n },\n \"voiceQuery\": {\n \"coveredData\": []\n }\n },\n \"updateTime\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/matters/:matterId/holds/:holdId"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"accounts\": [\n {\n \"accountId\": \"\",\n \"email\": \"\",\n \"firstName\": \"\",\n \"holdTime\": \"\",\n \"lastName\": \"\"\n }\n ],\n \"corpus\": \"\",\n \"holdId\": \"\",\n \"name\": \"\",\n \"orgUnit\": {\n \"holdTime\": \"\",\n \"orgUnitId\": \"\"\n },\n \"query\": {\n \"driveQuery\": {\n \"includeSharedDriveFiles\": false,\n \"includeTeamDriveFiles\": false\n },\n \"groupsQuery\": {\n \"endTime\": \"\",\n \"startTime\": \"\",\n \"terms\": \"\"\n },\n \"hangoutsChatQuery\": {\n \"includeRooms\": false\n },\n \"mailQuery\": {\n \"endTime\": \"\",\n \"startTime\": \"\",\n \"terms\": \"\"\n },\n \"voiceQuery\": {\n \"coveredData\": []\n }\n },\n \"updateTime\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"accounts\": [\n {\n \"accountId\": \"\",\n \"email\": \"\",\n \"firstName\": \"\",\n \"holdTime\": \"\",\n \"lastName\": \"\"\n }\n ],\n \"corpus\": \"\",\n \"holdId\": \"\",\n \"name\": \"\",\n \"orgUnit\": {\n \"holdTime\": \"\",\n \"orgUnitId\": \"\"\n },\n \"query\": {\n \"driveQuery\": {\n \"includeSharedDriveFiles\": false,\n \"includeTeamDriveFiles\": false\n },\n \"groupsQuery\": {\n \"endTime\": \"\",\n \"startTime\": \"\",\n \"terms\": \"\"\n },\n \"hangoutsChatQuery\": {\n \"includeRooms\": false\n },\n \"mailQuery\": {\n \"endTime\": \"\",\n \"startTime\": \"\",\n \"terms\": \"\"\n },\n \"voiceQuery\": {\n \"coveredData\": []\n }\n },\n \"updateTime\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/matters/:matterId/holds/:holdId")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/v1/matters/:matterId/holds/:holdId")
.header("content-type", "application/json")
.body("{\n \"accounts\": [\n {\n \"accountId\": \"\",\n \"email\": \"\",\n \"firstName\": \"\",\n \"holdTime\": \"\",\n \"lastName\": \"\"\n }\n ],\n \"corpus\": \"\",\n \"holdId\": \"\",\n \"name\": \"\",\n \"orgUnit\": {\n \"holdTime\": \"\",\n \"orgUnitId\": \"\"\n },\n \"query\": {\n \"driveQuery\": {\n \"includeSharedDriveFiles\": false,\n \"includeTeamDriveFiles\": false\n },\n \"groupsQuery\": {\n \"endTime\": \"\",\n \"startTime\": \"\",\n \"terms\": \"\"\n },\n \"hangoutsChatQuery\": {\n \"includeRooms\": false\n },\n \"mailQuery\": {\n \"endTime\": \"\",\n \"startTime\": \"\",\n \"terms\": \"\"\n },\n \"voiceQuery\": {\n \"coveredData\": []\n }\n },\n \"updateTime\": \"\"\n}")
.asString();
const data = JSON.stringify({
accounts: [
{
accountId: '',
email: '',
firstName: '',
holdTime: '',
lastName: ''
}
],
corpus: '',
holdId: '',
name: '',
orgUnit: {
holdTime: '',
orgUnitId: ''
},
query: {
driveQuery: {
includeSharedDriveFiles: false,
includeTeamDriveFiles: false
},
groupsQuery: {
endTime: '',
startTime: '',
terms: ''
},
hangoutsChatQuery: {
includeRooms: false
},
mailQuery: {
endTime: '',
startTime: '',
terms: ''
},
voiceQuery: {
coveredData: []
}
},
updateTime: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/v1/matters/:matterId/holds/:holdId');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/v1/matters/:matterId/holds/:holdId',
headers: {'content-type': 'application/json'},
data: {
accounts: [{accountId: '', email: '', firstName: '', holdTime: '', lastName: ''}],
corpus: '',
holdId: '',
name: '',
orgUnit: {holdTime: '', orgUnitId: ''},
query: {
driveQuery: {includeSharedDriveFiles: false, includeTeamDriveFiles: false},
groupsQuery: {endTime: '', startTime: '', terms: ''},
hangoutsChatQuery: {includeRooms: false},
mailQuery: {endTime: '', startTime: '', terms: ''},
voiceQuery: {coveredData: []}
},
updateTime: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/matters/:matterId/holds/:holdId';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"accounts":[{"accountId":"","email":"","firstName":"","holdTime":"","lastName":""}],"corpus":"","holdId":"","name":"","orgUnit":{"holdTime":"","orgUnitId":""},"query":{"driveQuery":{"includeSharedDriveFiles":false,"includeTeamDriveFiles":false},"groupsQuery":{"endTime":"","startTime":"","terms":""},"hangoutsChatQuery":{"includeRooms":false},"mailQuery":{"endTime":"","startTime":"","terms":""},"voiceQuery":{"coveredData":[]}},"updateTime":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/matters/:matterId/holds/:holdId',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "accounts": [\n {\n "accountId": "",\n "email": "",\n "firstName": "",\n "holdTime": "",\n "lastName": ""\n }\n ],\n "corpus": "",\n "holdId": "",\n "name": "",\n "orgUnit": {\n "holdTime": "",\n "orgUnitId": ""\n },\n "query": {\n "driveQuery": {\n "includeSharedDriveFiles": false,\n "includeTeamDriveFiles": false\n },\n "groupsQuery": {\n "endTime": "",\n "startTime": "",\n "terms": ""\n },\n "hangoutsChatQuery": {\n "includeRooms": false\n },\n "mailQuery": {\n "endTime": "",\n "startTime": "",\n "terms": ""\n },\n "voiceQuery": {\n "coveredData": []\n }\n },\n "updateTime": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"accounts\": [\n {\n \"accountId\": \"\",\n \"email\": \"\",\n \"firstName\": \"\",\n \"holdTime\": \"\",\n \"lastName\": \"\"\n }\n ],\n \"corpus\": \"\",\n \"holdId\": \"\",\n \"name\": \"\",\n \"orgUnit\": {\n \"holdTime\": \"\",\n \"orgUnitId\": \"\"\n },\n \"query\": {\n \"driveQuery\": {\n \"includeSharedDriveFiles\": false,\n \"includeTeamDriveFiles\": false\n },\n \"groupsQuery\": {\n \"endTime\": \"\",\n \"startTime\": \"\",\n \"terms\": \"\"\n },\n \"hangoutsChatQuery\": {\n \"includeRooms\": false\n },\n \"mailQuery\": {\n \"endTime\": \"\",\n \"startTime\": \"\",\n \"terms\": \"\"\n },\n \"voiceQuery\": {\n \"coveredData\": []\n }\n },\n \"updateTime\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1/matters/:matterId/holds/:holdId")
.put(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PUT',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/matters/:matterId/holds/:holdId',
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({
accounts: [{accountId: '', email: '', firstName: '', holdTime: '', lastName: ''}],
corpus: '',
holdId: '',
name: '',
orgUnit: {holdTime: '', orgUnitId: ''},
query: {
driveQuery: {includeSharedDriveFiles: false, includeTeamDriveFiles: false},
groupsQuery: {endTime: '', startTime: '', terms: ''},
hangoutsChatQuery: {includeRooms: false},
mailQuery: {endTime: '', startTime: '', terms: ''},
voiceQuery: {coveredData: []}
},
updateTime: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/v1/matters/:matterId/holds/:holdId',
headers: {'content-type': 'application/json'},
body: {
accounts: [{accountId: '', email: '', firstName: '', holdTime: '', lastName: ''}],
corpus: '',
holdId: '',
name: '',
orgUnit: {holdTime: '', orgUnitId: ''},
query: {
driveQuery: {includeSharedDriveFiles: false, includeTeamDriveFiles: false},
groupsQuery: {endTime: '', startTime: '', terms: ''},
hangoutsChatQuery: {includeRooms: false},
mailQuery: {endTime: '', startTime: '', terms: ''},
voiceQuery: {coveredData: []}
},
updateTime: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/v1/matters/:matterId/holds/:holdId');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
accounts: [
{
accountId: '',
email: '',
firstName: '',
holdTime: '',
lastName: ''
}
],
corpus: '',
holdId: '',
name: '',
orgUnit: {
holdTime: '',
orgUnitId: ''
},
query: {
driveQuery: {
includeSharedDriveFiles: false,
includeTeamDriveFiles: false
},
groupsQuery: {
endTime: '',
startTime: '',
terms: ''
},
hangoutsChatQuery: {
includeRooms: false
},
mailQuery: {
endTime: '',
startTime: '',
terms: ''
},
voiceQuery: {
coveredData: []
}
},
updateTime: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PUT',
url: '{{baseUrl}}/v1/matters/:matterId/holds/:holdId',
headers: {'content-type': 'application/json'},
data: {
accounts: [{accountId: '', email: '', firstName: '', holdTime: '', lastName: ''}],
corpus: '',
holdId: '',
name: '',
orgUnit: {holdTime: '', orgUnitId: ''},
query: {
driveQuery: {includeSharedDriveFiles: false, includeTeamDriveFiles: false},
groupsQuery: {endTime: '', startTime: '', terms: ''},
hangoutsChatQuery: {includeRooms: false},
mailQuery: {endTime: '', startTime: '', terms: ''},
voiceQuery: {coveredData: []}
},
updateTime: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/matters/:matterId/holds/:holdId';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"accounts":[{"accountId":"","email":"","firstName":"","holdTime":"","lastName":""}],"corpus":"","holdId":"","name":"","orgUnit":{"holdTime":"","orgUnitId":""},"query":{"driveQuery":{"includeSharedDriveFiles":false,"includeTeamDriveFiles":false},"groupsQuery":{"endTime":"","startTime":"","terms":""},"hangoutsChatQuery":{"includeRooms":false},"mailQuery":{"endTime":"","startTime":"","terms":""},"voiceQuery":{"coveredData":[]}},"updateTime":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"accounts": @[ @{ @"accountId": @"", @"email": @"", @"firstName": @"", @"holdTime": @"", @"lastName": @"" } ],
@"corpus": @"",
@"holdId": @"",
@"name": @"",
@"orgUnit": @{ @"holdTime": @"", @"orgUnitId": @"" },
@"query": @{ @"driveQuery": @{ @"includeSharedDriveFiles": @NO, @"includeTeamDriveFiles": @NO }, @"groupsQuery": @{ @"endTime": @"", @"startTime": @"", @"terms": @"" }, @"hangoutsChatQuery": @{ @"includeRooms": @NO }, @"mailQuery": @{ @"endTime": @"", @"startTime": @"", @"terms": @"" }, @"voiceQuery": @{ @"coveredData": @[ ] } },
@"updateTime": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/matters/:matterId/holds/:holdId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/matters/:matterId/holds/:holdId" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"accounts\": [\n {\n \"accountId\": \"\",\n \"email\": \"\",\n \"firstName\": \"\",\n \"holdTime\": \"\",\n \"lastName\": \"\"\n }\n ],\n \"corpus\": \"\",\n \"holdId\": \"\",\n \"name\": \"\",\n \"orgUnit\": {\n \"holdTime\": \"\",\n \"orgUnitId\": \"\"\n },\n \"query\": {\n \"driveQuery\": {\n \"includeSharedDriveFiles\": false,\n \"includeTeamDriveFiles\": false\n },\n \"groupsQuery\": {\n \"endTime\": \"\",\n \"startTime\": \"\",\n \"terms\": \"\"\n },\n \"hangoutsChatQuery\": {\n \"includeRooms\": false\n },\n \"mailQuery\": {\n \"endTime\": \"\",\n \"startTime\": \"\",\n \"terms\": \"\"\n },\n \"voiceQuery\": {\n \"coveredData\": []\n }\n },\n \"updateTime\": \"\"\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/matters/:matterId/holds/:holdId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'accounts' => [
[
'accountId' => '',
'email' => '',
'firstName' => '',
'holdTime' => '',
'lastName' => ''
]
],
'corpus' => '',
'holdId' => '',
'name' => '',
'orgUnit' => [
'holdTime' => '',
'orgUnitId' => ''
],
'query' => [
'driveQuery' => [
'includeSharedDriveFiles' => null,
'includeTeamDriveFiles' => null
],
'groupsQuery' => [
'endTime' => '',
'startTime' => '',
'terms' => ''
],
'hangoutsChatQuery' => [
'includeRooms' => null
],
'mailQuery' => [
'endTime' => '',
'startTime' => '',
'terms' => ''
],
'voiceQuery' => [
'coveredData' => [
]
]
],
'updateTime' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PUT', '{{baseUrl}}/v1/matters/:matterId/holds/:holdId', [
'body' => '{
"accounts": [
{
"accountId": "",
"email": "",
"firstName": "",
"holdTime": "",
"lastName": ""
}
],
"corpus": "",
"holdId": "",
"name": "",
"orgUnit": {
"holdTime": "",
"orgUnitId": ""
},
"query": {
"driveQuery": {
"includeSharedDriveFiles": false,
"includeTeamDriveFiles": false
},
"groupsQuery": {
"endTime": "",
"startTime": "",
"terms": ""
},
"hangoutsChatQuery": {
"includeRooms": false
},
"mailQuery": {
"endTime": "",
"startTime": "",
"terms": ""
},
"voiceQuery": {
"coveredData": []
}
},
"updateTime": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1/matters/:matterId/holds/:holdId');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'accounts' => [
[
'accountId' => '',
'email' => '',
'firstName' => '',
'holdTime' => '',
'lastName' => ''
]
],
'corpus' => '',
'holdId' => '',
'name' => '',
'orgUnit' => [
'holdTime' => '',
'orgUnitId' => ''
],
'query' => [
'driveQuery' => [
'includeSharedDriveFiles' => null,
'includeTeamDriveFiles' => null
],
'groupsQuery' => [
'endTime' => '',
'startTime' => '',
'terms' => ''
],
'hangoutsChatQuery' => [
'includeRooms' => null
],
'mailQuery' => [
'endTime' => '',
'startTime' => '',
'terms' => ''
],
'voiceQuery' => [
'coveredData' => [
]
]
],
'updateTime' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'accounts' => [
[
'accountId' => '',
'email' => '',
'firstName' => '',
'holdTime' => '',
'lastName' => ''
]
],
'corpus' => '',
'holdId' => '',
'name' => '',
'orgUnit' => [
'holdTime' => '',
'orgUnitId' => ''
],
'query' => [
'driveQuery' => [
'includeSharedDriveFiles' => null,
'includeTeamDriveFiles' => null
],
'groupsQuery' => [
'endTime' => '',
'startTime' => '',
'terms' => ''
],
'hangoutsChatQuery' => [
'includeRooms' => null
],
'mailQuery' => [
'endTime' => '',
'startTime' => '',
'terms' => ''
],
'voiceQuery' => [
'coveredData' => [
]
]
],
'updateTime' => ''
]));
$request->setRequestUrl('{{baseUrl}}/v1/matters/:matterId/holds/:holdId');
$request->setRequestMethod('PUT');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/matters/:matterId/holds/:holdId' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"accounts": [
{
"accountId": "",
"email": "",
"firstName": "",
"holdTime": "",
"lastName": ""
}
],
"corpus": "",
"holdId": "",
"name": "",
"orgUnit": {
"holdTime": "",
"orgUnitId": ""
},
"query": {
"driveQuery": {
"includeSharedDriveFiles": false,
"includeTeamDriveFiles": false
},
"groupsQuery": {
"endTime": "",
"startTime": "",
"terms": ""
},
"hangoutsChatQuery": {
"includeRooms": false
},
"mailQuery": {
"endTime": "",
"startTime": "",
"terms": ""
},
"voiceQuery": {
"coveredData": []
}
},
"updateTime": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/matters/:matterId/holds/:holdId' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"accounts": [
{
"accountId": "",
"email": "",
"firstName": "",
"holdTime": "",
"lastName": ""
}
],
"corpus": "",
"holdId": "",
"name": "",
"orgUnit": {
"holdTime": "",
"orgUnitId": ""
},
"query": {
"driveQuery": {
"includeSharedDriveFiles": false,
"includeTeamDriveFiles": false
},
"groupsQuery": {
"endTime": "",
"startTime": "",
"terms": ""
},
"hangoutsChatQuery": {
"includeRooms": false
},
"mailQuery": {
"endTime": "",
"startTime": "",
"terms": ""
},
"voiceQuery": {
"coveredData": []
}
},
"updateTime": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"accounts\": [\n {\n \"accountId\": \"\",\n \"email\": \"\",\n \"firstName\": \"\",\n \"holdTime\": \"\",\n \"lastName\": \"\"\n }\n ],\n \"corpus\": \"\",\n \"holdId\": \"\",\n \"name\": \"\",\n \"orgUnit\": {\n \"holdTime\": \"\",\n \"orgUnitId\": \"\"\n },\n \"query\": {\n \"driveQuery\": {\n \"includeSharedDriveFiles\": false,\n \"includeTeamDriveFiles\": false\n },\n \"groupsQuery\": {\n \"endTime\": \"\",\n \"startTime\": \"\",\n \"terms\": \"\"\n },\n \"hangoutsChatQuery\": {\n \"includeRooms\": false\n },\n \"mailQuery\": {\n \"endTime\": \"\",\n \"startTime\": \"\",\n \"terms\": \"\"\n },\n \"voiceQuery\": {\n \"coveredData\": []\n }\n },\n \"updateTime\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/v1/matters/:matterId/holds/:holdId", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/matters/:matterId/holds/:holdId"
payload = {
"accounts": [
{
"accountId": "",
"email": "",
"firstName": "",
"holdTime": "",
"lastName": ""
}
],
"corpus": "",
"holdId": "",
"name": "",
"orgUnit": {
"holdTime": "",
"orgUnitId": ""
},
"query": {
"driveQuery": {
"includeSharedDriveFiles": False,
"includeTeamDriveFiles": False
},
"groupsQuery": {
"endTime": "",
"startTime": "",
"terms": ""
},
"hangoutsChatQuery": { "includeRooms": False },
"mailQuery": {
"endTime": "",
"startTime": "",
"terms": ""
},
"voiceQuery": { "coveredData": [] }
},
"updateTime": ""
}
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/matters/:matterId/holds/:holdId"
payload <- "{\n \"accounts\": [\n {\n \"accountId\": \"\",\n \"email\": \"\",\n \"firstName\": \"\",\n \"holdTime\": \"\",\n \"lastName\": \"\"\n }\n ],\n \"corpus\": \"\",\n \"holdId\": \"\",\n \"name\": \"\",\n \"orgUnit\": {\n \"holdTime\": \"\",\n \"orgUnitId\": \"\"\n },\n \"query\": {\n \"driveQuery\": {\n \"includeSharedDriveFiles\": false,\n \"includeTeamDriveFiles\": false\n },\n \"groupsQuery\": {\n \"endTime\": \"\",\n \"startTime\": \"\",\n \"terms\": \"\"\n },\n \"hangoutsChatQuery\": {\n \"includeRooms\": false\n },\n \"mailQuery\": {\n \"endTime\": \"\",\n \"startTime\": \"\",\n \"terms\": \"\"\n },\n \"voiceQuery\": {\n \"coveredData\": []\n }\n },\n \"updateTime\": \"\"\n}"
encode <- "json"
response <- VERB("PUT", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/matters/:matterId/holds/:holdId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"accounts\": [\n {\n \"accountId\": \"\",\n \"email\": \"\",\n \"firstName\": \"\",\n \"holdTime\": \"\",\n \"lastName\": \"\"\n }\n ],\n \"corpus\": \"\",\n \"holdId\": \"\",\n \"name\": \"\",\n \"orgUnit\": {\n \"holdTime\": \"\",\n \"orgUnitId\": \"\"\n },\n \"query\": {\n \"driveQuery\": {\n \"includeSharedDriveFiles\": false,\n \"includeTeamDriveFiles\": false\n },\n \"groupsQuery\": {\n \"endTime\": \"\",\n \"startTime\": \"\",\n \"terms\": \"\"\n },\n \"hangoutsChatQuery\": {\n \"includeRooms\": false\n },\n \"mailQuery\": {\n \"endTime\": \"\",\n \"startTime\": \"\",\n \"terms\": \"\"\n },\n \"voiceQuery\": {\n \"coveredData\": []\n }\n },\n \"updateTime\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.put('/baseUrl/v1/matters/:matterId/holds/:holdId') do |req|
req.body = "{\n \"accounts\": [\n {\n \"accountId\": \"\",\n \"email\": \"\",\n \"firstName\": \"\",\n \"holdTime\": \"\",\n \"lastName\": \"\"\n }\n ],\n \"corpus\": \"\",\n \"holdId\": \"\",\n \"name\": \"\",\n \"orgUnit\": {\n \"holdTime\": \"\",\n \"orgUnitId\": \"\"\n },\n \"query\": {\n \"driveQuery\": {\n \"includeSharedDriveFiles\": false,\n \"includeTeamDriveFiles\": false\n },\n \"groupsQuery\": {\n \"endTime\": \"\",\n \"startTime\": \"\",\n \"terms\": \"\"\n },\n \"hangoutsChatQuery\": {\n \"includeRooms\": false\n },\n \"mailQuery\": {\n \"endTime\": \"\",\n \"startTime\": \"\",\n \"terms\": \"\"\n },\n \"voiceQuery\": {\n \"coveredData\": []\n }\n },\n \"updateTime\": \"\"\n}"
end
puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/matters/:matterId/holds/:holdId";
let payload = json!({
"accounts": (
json!({
"accountId": "",
"email": "",
"firstName": "",
"holdTime": "",
"lastName": ""
})
),
"corpus": "",
"holdId": "",
"name": "",
"orgUnit": json!({
"holdTime": "",
"orgUnitId": ""
}),
"query": json!({
"driveQuery": json!({
"includeSharedDriveFiles": false,
"includeTeamDriveFiles": false
}),
"groupsQuery": json!({
"endTime": "",
"startTime": "",
"terms": ""
}),
"hangoutsChatQuery": json!({"includeRooms": false}),
"mailQuery": json!({
"endTime": "",
"startTime": "",
"terms": ""
}),
"voiceQuery": json!({"coveredData": ()})
}),
"updateTime": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/v1/matters/:matterId/holds/:holdId \
--header 'content-type: application/json' \
--data '{
"accounts": [
{
"accountId": "",
"email": "",
"firstName": "",
"holdTime": "",
"lastName": ""
}
],
"corpus": "",
"holdId": "",
"name": "",
"orgUnit": {
"holdTime": "",
"orgUnitId": ""
},
"query": {
"driveQuery": {
"includeSharedDriveFiles": false,
"includeTeamDriveFiles": false
},
"groupsQuery": {
"endTime": "",
"startTime": "",
"terms": ""
},
"hangoutsChatQuery": {
"includeRooms": false
},
"mailQuery": {
"endTime": "",
"startTime": "",
"terms": ""
},
"voiceQuery": {
"coveredData": []
}
},
"updateTime": ""
}'
echo '{
"accounts": [
{
"accountId": "",
"email": "",
"firstName": "",
"holdTime": "",
"lastName": ""
}
],
"corpus": "",
"holdId": "",
"name": "",
"orgUnit": {
"holdTime": "",
"orgUnitId": ""
},
"query": {
"driveQuery": {
"includeSharedDriveFiles": false,
"includeTeamDriveFiles": false
},
"groupsQuery": {
"endTime": "",
"startTime": "",
"terms": ""
},
"hangoutsChatQuery": {
"includeRooms": false
},
"mailQuery": {
"endTime": "",
"startTime": "",
"terms": ""
},
"voiceQuery": {
"coveredData": []
}
},
"updateTime": ""
}' | \
http PUT {{baseUrl}}/v1/matters/:matterId/holds/:holdId \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '{\n "accounts": [\n {\n "accountId": "",\n "email": "",\n "firstName": "",\n "holdTime": "",\n "lastName": ""\n }\n ],\n "corpus": "",\n "holdId": "",\n "name": "",\n "orgUnit": {\n "holdTime": "",\n "orgUnitId": ""\n },\n "query": {\n "driveQuery": {\n "includeSharedDriveFiles": false,\n "includeTeamDriveFiles": false\n },\n "groupsQuery": {\n "endTime": "",\n "startTime": "",\n "terms": ""\n },\n "hangoutsChatQuery": {\n "includeRooms": false\n },\n "mailQuery": {\n "endTime": "",\n "startTime": "",\n "terms": ""\n },\n "voiceQuery": {\n "coveredData": []\n }\n },\n "updateTime": ""\n}' \
--output-document \
- {{baseUrl}}/v1/matters/:matterId/holds/:holdId
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"accounts": [
[
"accountId": "",
"email": "",
"firstName": "",
"holdTime": "",
"lastName": ""
]
],
"corpus": "",
"holdId": "",
"name": "",
"orgUnit": [
"holdTime": "",
"orgUnitId": ""
],
"query": [
"driveQuery": [
"includeSharedDriveFiles": false,
"includeTeamDriveFiles": false
],
"groupsQuery": [
"endTime": "",
"startTime": "",
"terms": ""
],
"hangoutsChatQuery": ["includeRooms": false],
"mailQuery": [
"endTime": "",
"startTime": "",
"terms": ""
],
"voiceQuery": ["coveredData": []]
],
"updateTime": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/matters/:matterId/holds/:holdId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
vault.matters.list
{{baseUrl}}/v1/matters
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/matters");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v1/matters")
require "http/client"
url = "{{baseUrl}}/v1/matters"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/v1/matters"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/matters");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/matters"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/v1/matters HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1/matters")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/matters"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/matters")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1/matters")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/v1/matters');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/v1/matters'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/matters';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/matters',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1/matters")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/matters',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'GET', url: '{{baseUrl}}/v1/matters'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v1/matters');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {method: 'GET', url: '{{baseUrl}}/v1/matters'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/matters';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/matters"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/matters" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/matters",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/v1/matters');
echo $response->getBody();
setUrl('{{baseUrl}}/v1/matters');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/matters');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/matters' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/matters' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v1/matters")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/matters"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/matters"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/matters")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/v1/matters') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/matters";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/v1/matters
http GET {{baseUrl}}/v1/matters
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v1/matters
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/matters")! 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
vault.matters.removePermissions
{{baseUrl}}/v1/matters/:matterId:removePermissions
QUERY PARAMS
matterId
BODY json
{
"accountId": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/matters/:matterId:removePermissions");
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 \"accountId\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1/matters/:matterId:removePermissions" {:content-type :json
:form-params {:accountId ""}})
require "http/client"
url = "{{baseUrl}}/v1/matters/:matterId:removePermissions"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"accountId\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/v1/matters/:matterId:removePermissions"),
Content = new StringContent("{\n \"accountId\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/matters/:matterId:removePermissions");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"accountId\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/matters/:matterId:removePermissions"
payload := strings.NewReader("{\n \"accountId\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/v1/matters/:matterId:removePermissions HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 21
{
"accountId": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1/matters/:matterId:removePermissions")
.setHeader("content-type", "application/json")
.setBody("{\n \"accountId\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/matters/:matterId:removePermissions"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"accountId\": \"\"\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 \"accountId\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/matters/:matterId:removePermissions")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1/matters/:matterId:removePermissions")
.header("content-type", "application/json")
.body("{\n \"accountId\": \"\"\n}")
.asString();
const data = JSON.stringify({
accountId: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v1/matters/:matterId:removePermissions');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/matters/:matterId:removePermissions',
headers: {'content-type': 'application/json'},
data: {accountId: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/matters/:matterId:removePermissions';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"accountId":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/matters/:matterId:removePermissions',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "accountId": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"accountId\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1/matters/:matterId:removePermissions")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/matters/:matterId:removePermissions',
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({accountId: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/matters/:matterId:removePermissions',
headers: {'content-type': 'application/json'},
body: {accountId: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/v1/matters/:matterId:removePermissions');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
accountId: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/matters/:matterId:removePermissions',
headers: {'content-type': 'application/json'},
data: {accountId: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/matters/:matterId:removePermissions';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"accountId":""}'
};
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 = @{ @"accountId": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/matters/:matterId:removePermissions"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/matters/:matterId:removePermissions" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"accountId\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/matters/:matterId:removePermissions",
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([
'accountId' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/v1/matters/:matterId:removePermissions', [
'body' => '{
"accountId": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1/matters/:matterId:removePermissions');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'accountId' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'accountId' => ''
]));
$request->setRequestUrl('{{baseUrl}}/v1/matters/:matterId:removePermissions');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/matters/:matterId:removePermissions' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"accountId": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/matters/:matterId:removePermissions' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"accountId": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"accountId\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1/matters/:matterId:removePermissions", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/matters/:matterId:removePermissions"
payload = { "accountId": "" }
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/matters/:matterId:removePermissions"
payload <- "{\n \"accountId\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/matters/:matterId:removePermissions")
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 \"accountId\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/v1/matters/:matterId:removePermissions') do |req|
req.body = "{\n \"accountId\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/matters/:matterId:removePermissions";
let payload = json!({"accountId": ""});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/v1/matters/:matterId:removePermissions \
--header 'content-type: application/json' \
--data '{
"accountId": ""
}'
echo '{
"accountId": ""
}' | \
http POST {{baseUrl}}/v1/matters/:matterId:removePermissions \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "accountId": ""\n}' \
--output-document \
- {{baseUrl}}/v1/matters/:matterId:removePermissions
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["accountId": ""] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/matters/:matterId:removePermissions")! 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
vault.matters.reopen
{{baseUrl}}/v1/matters/:matterId:reopen
QUERY PARAMS
matterId
BODY json
{}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/matters/:matterId:reopen");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1/matters/:matterId:reopen" {:content-type :json})
require "http/client"
url = "{{baseUrl}}/v1/matters/:matterId:reopen"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/v1/matters/:matterId:reopen"),
Content = new StringContent("{}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/matters/:matterId:reopen");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/matters/:matterId:reopen"
payload := strings.NewReader("{}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/v1/matters/:matterId:reopen HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 2
{}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1/matters/:matterId:reopen")
.setHeader("content-type", "application/json")
.setBody("{}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/matters/:matterId:reopen"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/matters/:matterId:reopen")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1/matters/:matterId:reopen")
.header("content-type", "application/json")
.body("{}")
.asString();
const data = JSON.stringify({});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v1/matters/:matterId:reopen');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/matters/:matterId:reopen',
headers: {'content-type': 'application/json'},
data: {}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/matters/:matterId:reopen';
const options = {method: 'POST', headers: {'content-type': 'application/json'}, body: '{}'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/matters/:matterId:reopen',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{}")
val request = Request.Builder()
.url("{{baseUrl}}/v1/matters/:matterId:reopen")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/matters/:matterId:reopen',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/matters/:matterId:reopen',
headers: {'content-type': 'application/json'},
body: {},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/v1/matters/:matterId:reopen');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/matters/:matterId:reopen',
headers: {'content-type': 'application/json'},
data: {}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/matters/:matterId:reopen';
const options = {method: 'POST', headers: {'content-type': 'application/json'}, body: '{}'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/matters/:matterId:reopen"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/matters/:matterId:reopen" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/matters/:matterId:reopen",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/v1/matters/:matterId:reopen', [
'body' => '{}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1/matters/:matterId:reopen');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
]));
$request->setRequestUrl('{{baseUrl}}/v1/matters/:matterId:reopen');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/matters/:matterId:reopen' -Method POST -Headers $headers -ContentType 'application/json' -Body '{}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/matters/:matterId:reopen' -Method POST -Headers $headers -ContentType 'application/json' -Body '{}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1/matters/:matterId:reopen", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/matters/:matterId:reopen"
payload = {}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/matters/:matterId:reopen"
payload <- "{}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/matters/:matterId:reopen")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/v1/matters/:matterId:reopen') do |req|
req.body = "{}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/matters/:matterId:reopen";
let payload = json!({});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/v1/matters/:matterId:reopen \
--header 'content-type: application/json' \
--data '{}'
echo '{}' | \
http POST {{baseUrl}}/v1/matters/:matterId:reopen \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{}' \
--output-document \
- {{baseUrl}}/v1/matters/:matterId:reopen
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/matters/:matterId:reopen")! 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
vault.matters.savedQueries.create
{{baseUrl}}/v1/matters/:matterId/savedQueries
QUERY PARAMS
matterId
BODY json
{
"createTime": "",
"displayName": "",
"matterId": "",
"query": {
"accountInfo": {
"emails": []
},
"corpus": "",
"dataScope": "",
"driveOptions": {
"clientSideEncryptedOption": "",
"includeSharedDrives": false,
"includeTeamDrives": false,
"versionDate": ""
},
"endTime": "",
"hangoutsChatInfo": {
"roomId": []
},
"hangoutsChatOptions": {
"includeRooms": false
},
"mailOptions": {
"clientSideEncryptedOption": "",
"excludeDrafts": false
},
"method": "",
"orgUnitInfo": {
"orgUnitId": ""
},
"searchMethod": "",
"sharedDriveInfo": {
"sharedDriveIds": []
},
"sitesUrlInfo": {
"urls": []
},
"startTime": "",
"teamDriveInfo": {
"teamDriveIds": []
},
"terms": "",
"timeZone": "",
"voiceOptions": {
"coveredData": []
}
},
"savedQueryId": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/matters/:matterId/savedQueries");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"createTime\": \"\",\n \"displayName\": \"\",\n \"matterId\": \"\",\n \"query\": {\n \"accountInfo\": {\n \"emails\": []\n },\n \"corpus\": \"\",\n \"dataScope\": \"\",\n \"driveOptions\": {\n \"clientSideEncryptedOption\": \"\",\n \"includeSharedDrives\": false,\n \"includeTeamDrives\": false,\n \"versionDate\": \"\"\n },\n \"endTime\": \"\",\n \"hangoutsChatInfo\": {\n \"roomId\": []\n },\n \"hangoutsChatOptions\": {\n \"includeRooms\": false\n },\n \"mailOptions\": {\n \"clientSideEncryptedOption\": \"\",\n \"excludeDrafts\": false\n },\n \"method\": \"\",\n \"orgUnitInfo\": {\n \"orgUnitId\": \"\"\n },\n \"searchMethod\": \"\",\n \"sharedDriveInfo\": {\n \"sharedDriveIds\": []\n },\n \"sitesUrlInfo\": {\n \"urls\": []\n },\n \"startTime\": \"\",\n \"teamDriveInfo\": {\n \"teamDriveIds\": []\n },\n \"terms\": \"\",\n \"timeZone\": \"\",\n \"voiceOptions\": {\n \"coveredData\": []\n }\n },\n \"savedQueryId\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1/matters/:matterId/savedQueries" {:content-type :json
:form-params {:createTime ""
:displayName ""
:matterId ""
:query {:accountInfo {:emails []}
:corpus ""
:dataScope ""
:driveOptions {:clientSideEncryptedOption ""
:includeSharedDrives false
:includeTeamDrives false
:versionDate ""}
:endTime ""
:hangoutsChatInfo {:roomId []}
:hangoutsChatOptions {:includeRooms false}
:mailOptions {:clientSideEncryptedOption ""
:excludeDrafts false}
:method ""
:orgUnitInfo {:orgUnitId ""}
:searchMethod ""
:sharedDriveInfo {:sharedDriveIds []}
:sitesUrlInfo {:urls []}
:startTime ""
:teamDriveInfo {:teamDriveIds []}
:terms ""
:timeZone ""
:voiceOptions {:coveredData []}}
:savedQueryId ""}})
require "http/client"
url = "{{baseUrl}}/v1/matters/:matterId/savedQueries"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"createTime\": \"\",\n \"displayName\": \"\",\n \"matterId\": \"\",\n \"query\": {\n \"accountInfo\": {\n \"emails\": []\n },\n \"corpus\": \"\",\n \"dataScope\": \"\",\n \"driveOptions\": {\n \"clientSideEncryptedOption\": \"\",\n \"includeSharedDrives\": false,\n \"includeTeamDrives\": false,\n \"versionDate\": \"\"\n },\n \"endTime\": \"\",\n \"hangoutsChatInfo\": {\n \"roomId\": []\n },\n \"hangoutsChatOptions\": {\n \"includeRooms\": false\n },\n \"mailOptions\": {\n \"clientSideEncryptedOption\": \"\",\n \"excludeDrafts\": false\n },\n \"method\": \"\",\n \"orgUnitInfo\": {\n \"orgUnitId\": \"\"\n },\n \"searchMethod\": \"\",\n \"sharedDriveInfo\": {\n \"sharedDriveIds\": []\n },\n \"sitesUrlInfo\": {\n \"urls\": []\n },\n \"startTime\": \"\",\n \"teamDriveInfo\": {\n \"teamDriveIds\": []\n },\n \"terms\": \"\",\n \"timeZone\": \"\",\n \"voiceOptions\": {\n \"coveredData\": []\n }\n },\n \"savedQueryId\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/v1/matters/:matterId/savedQueries"),
Content = new StringContent("{\n \"createTime\": \"\",\n \"displayName\": \"\",\n \"matterId\": \"\",\n \"query\": {\n \"accountInfo\": {\n \"emails\": []\n },\n \"corpus\": \"\",\n \"dataScope\": \"\",\n \"driveOptions\": {\n \"clientSideEncryptedOption\": \"\",\n \"includeSharedDrives\": false,\n \"includeTeamDrives\": false,\n \"versionDate\": \"\"\n },\n \"endTime\": \"\",\n \"hangoutsChatInfo\": {\n \"roomId\": []\n },\n \"hangoutsChatOptions\": {\n \"includeRooms\": false\n },\n \"mailOptions\": {\n \"clientSideEncryptedOption\": \"\",\n \"excludeDrafts\": false\n },\n \"method\": \"\",\n \"orgUnitInfo\": {\n \"orgUnitId\": \"\"\n },\n \"searchMethod\": \"\",\n \"sharedDriveInfo\": {\n \"sharedDriveIds\": []\n },\n \"sitesUrlInfo\": {\n \"urls\": []\n },\n \"startTime\": \"\",\n \"teamDriveInfo\": {\n \"teamDriveIds\": []\n },\n \"terms\": \"\",\n \"timeZone\": \"\",\n \"voiceOptions\": {\n \"coveredData\": []\n }\n },\n \"savedQueryId\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/matters/:matterId/savedQueries");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"createTime\": \"\",\n \"displayName\": \"\",\n \"matterId\": \"\",\n \"query\": {\n \"accountInfo\": {\n \"emails\": []\n },\n \"corpus\": \"\",\n \"dataScope\": \"\",\n \"driveOptions\": {\n \"clientSideEncryptedOption\": \"\",\n \"includeSharedDrives\": false,\n \"includeTeamDrives\": false,\n \"versionDate\": \"\"\n },\n \"endTime\": \"\",\n \"hangoutsChatInfo\": {\n \"roomId\": []\n },\n \"hangoutsChatOptions\": {\n \"includeRooms\": false\n },\n \"mailOptions\": {\n \"clientSideEncryptedOption\": \"\",\n \"excludeDrafts\": false\n },\n \"method\": \"\",\n \"orgUnitInfo\": {\n \"orgUnitId\": \"\"\n },\n \"searchMethod\": \"\",\n \"sharedDriveInfo\": {\n \"sharedDriveIds\": []\n },\n \"sitesUrlInfo\": {\n \"urls\": []\n },\n \"startTime\": \"\",\n \"teamDriveInfo\": {\n \"teamDriveIds\": []\n },\n \"terms\": \"\",\n \"timeZone\": \"\",\n \"voiceOptions\": {\n \"coveredData\": []\n }\n },\n \"savedQueryId\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/matters/:matterId/savedQueries"
payload := strings.NewReader("{\n \"createTime\": \"\",\n \"displayName\": \"\",\n \"matterId\": \"\",\n \"query\": {\n \"accountInfo\": {\n \"emails\": []\n },\n \"corpus\": \"\",\n \"dataScope\": \"\",\n \"driveOptions\": {\n \"clientSideEncryptedOption\": \"\",\n \"includeSharedDrives\": false,\n \"includeTeamDrives\": false,\n \"versionDate\": \"\"\n },\n \"endTime\": \"\",\n \"hangoutsChatInfo\": {\n \"roomId\": []\n },\n \"hangoutsChatOptions\": {\n \"includeRooms\": false\n },\n \"mailOptions\": {\n \"clientSideEncryptedOption\": \"\",\n \"excludeDrafts\": false\n },\n \"method\": \"\",\n \"orgUnitInfo\": {\n \"orgUnitId\": \"\"\n },\n \"searchMethod\": \"\",\n \"sharedDriveInfo\": {\n \"sharedDriveIds\": []\n },\n \"sitesUrlInfo\": {\n \"urls\": []\n },\n \"startTime\": \"\",\n \"teamDriveInfo\": {\n \"teamDriveIds\": []\n },\n \"terms\": \"\",\n \"timeZone\": \"\",\n \"voiceOptions\": {\n \"coveredData\": []\n }\n },\n \"savedQueryId\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/v1/matters/:matterId/savedQueries HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 942
{
"createTime": "",
"displayName": "",
"matterId": "",
"query": {
"accountInfo": {
"emails": []
},
"corpus": "",
"dataScope": "",
"driveOptions": {
"clientSideEncryptedOption": "",
"includeSharedDrives": false,
"includeTeamDrives": false,
"versionDate": ""
},
"endTime": "",
"hangoutsChatInfo": {
"roomId": []
},
"hangoutsChatOptions": {
"includeRooms": false
},
"mailOptions": {
"clientSideEncryptedOption": "",
"excludeDrafts": false
},
"method": "",
"orgUnitInfo": {
"orgUnitId": ""
},
"searchMethod": "",
"sharedDriveInfo": {
"sharedDriveIds": []
},
"sitesUrlInfo": {
"urls": []
},
"startTime": "",
"teamDriveInfo": {
"teamDriveIds": []
},
"terms": "",
"timeZone": "",
"voiceOptions": {
"coveredData": []
}
},
"savedQueryId": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1/matters/:matterId/savedQueries")
.setHeader("content-type", "application/json")
.setBody("{\n \"createTime\": \"\",\n \"displayName\": \"\",\n \"matterId\": \"\",\n \"query\": {\n \"accountInfo\": {\n \"emails\": []\n },\n \"corpus\": \"\",\n \"dataScope\": \"\",\n \"driveOptions\": {\n \"clientSideEncryptedOption\": \"\",\n \"includeSharedDrives\": false,\n \"includeTeamDrives\": false,\n \"versionDate\": \"\"\n },\n \"endTime\": \"\",\n \"hangoutsChatInfo\": {\n \"roomId\": []\n },\n \"hangoutsChatOptions\": {\n \"includeRooms\": false\n },\n \"mailOptions\": {\n \"clientSideEncryptedOption\": \"\",\n \"excludeDrafts\": false\n },\n \"method\": \"\",\n \"orgUnitInfo\": {\n \"orgUnitId\": \"\"\n },\n \"searchMethod\": \"\",\n \"sharedDriveInfo\": {\n \"sharedDriveIds\": []\n },\n \"sitesUrlInfo\": {\n \"urls\": []\n },\n \"startTime\": \"\",\n \"teamDriveInfo\": {\n \"teamDriveIds\": []\n },\n \"terms\": \"\",\n \"timeZone\": \"\",\n \"voiceOptions\": {\n \"coveredData\": []\n }\n },\n \"savedQueryId\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/matters/:matterId/savedQueries"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"createTime\": \"\",\n \"displayName\": \"\",\n \"matterId\": \"\",\n \"query\": {\n \"accountInfo\": {\n \"emails\": []\n },\n \"corpus\": \"\",\n \"dataScope\": \"\",\n \"driveOptions\": {\n \"clientSideEncryptedOption\": \"\",\n \"includeSharedDrives\": false,\n \"includeTeamDrives\": false,\n \"versionDate\": \"\"\n },\n \"endTime\": \"\",\n \"hangoutsChatInfo\": {\n \"roomId\": []\n },\n \"hangoutsChatOptions\": {\n \"includeRooms\": false\n },\n \"mailOptions\": {\n \"clientSideEncryptedOption\": \"\",\n \"excludeDrafts\": false\n },\n \"method\": \"\",\n \"orgUnitInfo\": {\n \"orgUnitId\": \"\"\n },\n \"searchMethod\": \"\",\n \"sharedDriveInfo\": {\n \"sharedDriveIds\": []\n },\n \"sitesUrlInfo\": {\n \"urls\": []\n },\n \"startTime\": \"\",\n \"teamDriveInfo\": {\n \"teamDriveIds\": []\n },\n \"terms\": \"\",\n \"timeZone\": \"\",\n \"voiceOptions\": {\n \"coveredData\": []\n }\n },\n \"savedQueryId\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"createTime\": \"\",\n \"displayName\": \"\",\n \"matterId\": \"\",\n \"query\": {\n \"accountInfo\": {\n \"emails\": []\n },\n \"corpus\": \"\",\n \"dataScope\": \"\",\n \"driveOptions\": {\n \"clientSideEncryptedOption\": \"\",\n \"includeSharedDrives\": false,\n \"includeTeamDrives\": false,\n \"versionDate\": \"\"\n },\n \"endTime\": \"\",\n \"hangoutsChatInfo\": {\n \"roomId\": []\n },\n \"hangoutsChatOptions\": {\n \"includeRooms\": false\n },\n \"mailOptions\": {\n \"clientSideEncryptedOption\": \"\",\n \"excludeDrafts\": false\n },\n \"method\": \"\",\n \"orgUnitInfo\": {\n \"orgUnitId\": \"\"\n },\n \"searchMethod\": \"\",\n \"sharedDriveInfo\": {\n \"sharedDriveIds\": []\n },\n \"sitesUrlInfo\": {\n \"urls\": []\n },\n \"startTime\": \"\",\n \"teamDriveInfo\": {\n \"teamDriveIds\": []\n },\n \"terms\": \"\",\n \"timeZone\": \"\",\n \"voiceOptions\": {\n \"coveredData\": []\n }\n },\n \"savedQueryId\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/matters/:matterId/savedQueries")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1/matters/:matterId/savedQueries")
.header("content-type", "application/json")
.body("{\n \"createTime\": \"\",\n \"displayName\": \"\",\n \"matterId\": \"\",\n \"query\": {\n \"accountInfo\": {\n \"emails\": []\n },\n \"corpus\": \"\",\n \"dataScope\": \"\",\n \"driveOptions\": {\n \"clientSideEncryptedOption\": \"\",\n \"includeSharedDrives\": false,\n \"includeTeamDrives\": false,\n \"versionDate\": \"\"\n },\n \"endTime\": \"\",\n \"hangoutsChatInfo\": {\n \"roomId\": []\n },\n \"hangoutsChatOptions\": {\n \"includeRooms\": false\n },\n \"mailOptions\": {\n \"clientSideEncryptedOption\": \"\",\n \"excludeDrafts\": false\n },\n \"method\": \"\",\n \"orgUnitInfo\": {\n \"orgUnitId\": \"\"\n },\n \"searchMethod\": \"\",\n \"sharedDriveInfo\": {\n \"sharedDriveIds\": []\n },\n \"sitesUrlInfo\": {\n \"urls\": []\n },\n \"startTime\": \"\",\n \"teamDriveInfo\": {\n \"teamDriveIds\": []\n },\n \"terms\": \"\",\n \"timeZone\": \"\",\n \"voiceOptions\": {\n \"coveredData\": []\n }\n },\n \"savedQueryId\": \"\"\n}")
.asString();
const data = JSON.stringify({
createTime: '',
displayName: '',
matterId: '',
query: {
accountInfo: {
emails: []
},
corpus: '',
dataScope: '',
driveOptions: {
clientSideEncryptedOption: '',
includeSharedDrives: false,
includeTeamDrives: false,
versionDate: ''
},
endTime: '',
hangoutsChatInfo: {
roomId: []
},
hangoutsChatOptions: {
includeRooms: false
},
mailOptions: {
clientSideEncryptedOption: '',
excludeDrafts: false
},
method: '',
orgUnitInfo: {
orgUnitId: ''
},
searchMethod: '',
sharedDriveInfo: {
sharedDriveIds: []
},
sitesUrlInfo: {
urls: []
},
startTime: '',
teamDriveInfo: {
teamDriveIds: []
},
terms: '',
timeZone: '',
voiceOptions: {
coveredData: []
}
},
savedQueryId: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v1/matters/:matterId/savedQueries');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/matters/:matterId/savedQueries',
headers: {'content-type': 'application/json'},
data: {
createTime: '',
displayName: '',
matterId: '',
query: {
accountInfo: {emails: []},
corpus: '',
dataScope: '',
driveOptions: {
clientSideEncryptedOption: '',
includeSharedDrives: false,
includeTeamDrives: false,
versionDate: ''
},
endTime: '',
hangoutsChatInfo: {roomId: []},
hangoutsChatOptions: {includeRooms: false},
mailOptions: {clientSideEncryptedOption: '', excludeDrafts: false},
method: '',
orgUnitInfo: {orgUnitId: ''},
searchMethod: '',
sharedDriveInfo: {sharedDriveIds: []},
sitesUrlInfo: {urls: []},
startTime: '',
teamDriveInfo: {teamDriveIds: []},
terms: '',
timeZone: '',
voiceOptions: {coveredData: []}
},
savedQueryId: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/matters/:matterId/savedQueries';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"createTime":"","displayName":"","matterId":"","query":{"accountInfo":{"emails":[]},"corpus":"","dataScope":"","driveOptions":{"clientSideEncryptedOption":"","includeSharedDrives":false,"includeTeamDrives":false,"versionDate":""},"endTime":"","hangoutsChatInfo":{"roomId":[]},"hangoutsChatOptions":{"includeRooms":false},"mailOptions":{"clientSideEncryptedOption":"","excludeDrafts":false},"method":"","orgUnitInfo":{"orgUnitId":""},"searchMethod":"","sharedDriveInfo":{"sharedDriveIds":[]},"sitesUrlInfo":{"urls":[]},"startTime":"","teamDriveInfo":{"teamDriveIds":[]},"terms":"","timeZone":"","voiceOptions":{"coveredData":[]}},"savedQueryId":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/matters/:matterId/savedQueries',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "createTime": "",\n "displayName": "",\n "matterId": "",\n "query": {\n "accountInfo": {\n "emails": []\n },\n "corpus": "",\n "dataScope": "",\n "driveOptions": {\n "clientSideEncryptedOption": "",\n "includeSharedDrives": false,\n "includeTeamDrives": false,\n "versionDate": ""\n },\n "endTime": "",\n "hangoutsChatInfo": {\n "roomId": []\n },\n "hangoutsChatOptions": {\n "includeRooms": false\n },\n "mailOptions": {\n "clientSideEncryptedOption": "",\n "excludeDrafts": false\n },\n "method": "",\n "orgUnitInfo": {\n "orgUnitId": ""\n },\n "searchMethod": "",\n "sharedDriveInfo": {\n "sharedDriveIds": []\n },\n "sitesUrlInfo": {\n "urls": []\n },\n "startTime": "",\n "teamDriveInfo": {\n "teamDriveIds": []\n },\n "terms": "",\n "timeZone": "",\n "voiceOptions": {\n "coveredData": []\n }\n },\n "savedQueryId": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"createTime\": \"\",\n \"displayName\": \"\",\n \"matterId\": \"\",\n \"query\": {\n \"accountInfo\": {\n \"emails\": []\n },\n \"corpus\": \"\",\n \"dataScope\": \"\",\n \"driveOptions\": {\n \"clientSideEncryptedOption\": \"\",\n \"includeSharedDrives\": false,\n \"includeTeamDrives\": false,\n \"versionDate\": \"\"\n },\n \"endTime\": \"\",\n \"hangoutsChatInfo\": {\n \"roomId\": []\n },\n \"hangoutsChatOptions\": {\n \"includeRooms\": false\n },\n \"mailOptions\": {\n \"clientSideEncryptedOption\": \"\",\n \"excludeDrafts\": false\n },\n \"method\": \"\",\n \"orgUnitInfo\": {\n \"orgUnitId\": \"\"\n },\n \"searchMethod\": \"\",\n \"sharedDriveInfo\": {\n \"sharedDriveIds\": []\n },\n \"sitesUrlInfo\": {\n \"urls\": []\n },\n \"startTime\": \"\",\n \"teamDriveInfo\": {\n \"teamDriveIds\": []\n },\n \"terms\": \"\",\n \"timeZone\": \"\",\n \"voiceOptions\": {\n \"coveredData\": []\n }\n },\n \"savedQueryId\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1/matters/:matterId/savedQueries")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/matters/:matterId/savedQueries',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
createTime: '',
displayName: '',
matterId: '',
query: {
accountInfo: {emails: []},
corpus: '',
dataScope: '',
driveOptions: {
clientSideEncryptedOption: '',
includeSharedDrives: false,
includeTeamDrives: false,
versionDate: ''
},
endTime: '',
hangoutsChatInfo: {roomId: []},
hangoutsChatOptions: {includeRooms: false},
mailOptions: {clientSideEncryptedOption: '', excludeDrafts: false},
method: '',
orgUnitInfo: {orgUnitId: ''},
searchMethod: '',
sharedDriveInfo: {sharedDriveIds: []},
sitesUrlInfo: {urls: []},
startTime: '',
teamDriveInfo: {teamDriveIds: []},
terms: '',
timeZone: '',
voiceOptions: {coveredData: []}
},
savedQueryId: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/matters/:matterId/savedQueries',
headers: {'content-type': 'application/json'},
body: {
createTime: '',
displayName: '',
matterId: '',
query: {
accountInfo: {emails: []},
corpus: '',
dataScope: '',
driveOptions: {
clientSideEncryptedOption: '',
includeSharedDrives: false,
includeTeamDrives: false,
versionDate: ''
},
endTime: '',
hangoutsChatInfo: {roomId: []},
hangoutsChatOptions: {includeRooms: false},
mailOptions: {clientSideEncryptedOption: '', excludeDrafts: false},
method: '',
orgUnitInfo: {orgUnitId: ''},
searchMethod: '',
sharedDriveInfo: {sharedDriveIds: []},
sitesUrlInfo: {urls: []},
startTime: '',
teamDriveInfo: {teamDriveIds: []},
terms: '',
timeZone: '',
voiceOptions: {coveredData: []}
},
savedQueryId: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/v1/matters/:matterId/savedQueries');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
createTime: '',
displayName: '',
matterId: '',
query: {
accountInfo: {
emails: []
},
corpus: '',
dataScope: '',
driveOptions: {
clientSideEncryptedOption: '',
includeSharedDrives: false,
includeTeamDrives: false,
versionDate: ''
},
endTime: '',
hangoutsChatInfo: {
roomId: []
},
hangoutsChatOptions: {
includeRooms: false
},
mailOptions: {
clientSideEncryptedOption: '',
excludeDrafts: false
},
method: '',
orgUnitInfo: {
orgUnitId: ''
},
searchMethod: '',
sharedDriveInfo: {
sharedDriveIds: []
},
sitesUrlInfo: {
urls: []
},
startTime: '',
teamDriveInfo: {
teamDriveIds: []
},
terms: '',
timeZone: '',
voiceOptions: {
coveredData: []
}
},
savedQueryId: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/matters/:matterId/savedQueries',
headers: {'content-type': 'application/json'},
data: {
createTime: '',
displayName: '',
matterId: '',
query: {
accountInfo: {emails: []},
corpus: '',
dataScope: '',
driveOptions: {
clientSideEncryptedOption: '',
includeSharedDrives: false,
includeTeamDrives: false,
versionDate: ''
},
endTime: '',
hangoutsChatInfo: {roomId: []},
hangoutsChatOptions: {includeRooms: false},
mailOptions: {clientSideEncryptedOption: '', excludeDrafts: false},
method: '',
orgUnitInfo: {orgUnitId: ''},
searchMethod: '',
sharedDriveInfo: {sharedDriveIds: []},
sitesUrlInfo: {urls: []},
startTime: '',
teamDriveInfo: {teamDriveIds: []},
terms: '',
timeZone: '',
voiceOptions: {coveredData: []}
},
savedQueryId: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/matters/:matterId/savedQueries';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"createTime":"","displayName":"","matterId":"","query":{"accountInfo":{"emails":[]},"corpus":"","dataScope":"","driveOptions":{"clientSideEncryptedOption":"","includeSharedDrives":false,"includeTeamDrives":false,"versionDate":""},"endTime":"","hangoutsChatInfo":{"roomId":[]},"hangoutsChatOptions":{"includeRooms":false},"mailOptions":{"clientSideEncryptedOption":"","excludeDrafts":false},"method":"","orgUnitInfo":{"orgUnitId":""},"searchMethod":"","sharedDriveInfo":{"sharedDriveIds":[]},"sitesUrlInfo":{"urls":[]},"startTime":"","teamDriveInfo":{"teamDriveIds":[]},"terms":"","timeZone":"","voiceOptions":{"coveredData":[]}},"savedQueryId":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"createTime": @"",
@"displayName": @"",
@"matterId": @"",
@"query": @{ @"accountInfo": @{ @"emails": @[ ] }, @"corpus": @"", @"dataScope": @"", @"driveOptions": @{ @"clientSideEncryptedOption": @"", @"includeSharedDrives": @NO, @"includeTeamDrives": @NO, @"versionDate": @"" }, @"endTime": @"", @"hangoutsChatInfo": @{ @"roomId": @[ ] }, @"hangoutsChatOptions": @{ @"includeRooms": @NO }, @"mailOptions": @{ @"clientSideEncryptedOption": @"", @"excludeDrafts": @NO }, @"method": @"", @"orgUnitInfo": @{ @"orgUnitId": @"" }, @"searchMethod": @"", @"sharedDriveInfo": @{ @"sharedDriveIds": @[ ] }, @"sitesUrlInfo": @{ @"urls": @[ ] }, @"startTime": @"", @"teamDriveInfo": @{ @"teamDriveIds": @[ ] }, @"terms": @"", @"timeZone": @"", @"voiceOptions": @{ @"coveredData": @[ ] } },
@"savedQueryId": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/matters/:matterId/savedQueries"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/matters/:matterId/savedQueries" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"createTime\": \"\",\n \"displayName\": \"\",\n \"matterId\": \"\",\n \"query\": {\n \"accountInfo\": {\n \"emails\": []\n },\n \"corpus\": \"\",\n \"dataScope\": \"\",\n \"driveOptions\": {\n \"clientSideEncryptedOption\": \"\",\n \"includeSharedDrives\": false,\n \"includeTeamDrives\": false,\n \"versionDate\": \"\"\n },\n \"endTime\": \"\",\n \"hangoutsChatInfo\": {\n \"roomId\": []\n },\n \"hangoutsChatOptions\": {\n \"includeRooms\": false\n },\n \"mailOptions\": {\n \"clientSideEncryptedOption\": \"\",\n \"excludeDrafts\": false\n },\n \"method\": \"\",\n \"orgUnitInfo\": {\n \"orgUnitId\": \"\"\n },\n \"searchMethod\": \"\",\n \"sharedDriveInfo\": {\n \"sharedDriveIds\": []\n },\n \"sitesUrlInfo\": {\n \"urls\": []\n },\n \"startTime\": \"\",\n \"teamDriveInfo\": {\n \"teamDriveIds\": []\n },\n \"terms\": \"\",\n \"timeZone\": \"\",\n \"voiceOptions\": {\n \"coveredData\": []\n }\n },\n \"savedQueryId\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/matters/:matterId/savedQueries",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'createTime' => '',
'displayName' => '',
'matterId' => '',
'query' => [
'accountInfo' => [
'emails' => [
]
],
'corpus' => '',
'dataScope' => '',
'driveOptions' => [
'clientSideEncryptedOption' => '',
'includeSharedDrives' => null,
'includeTeamDrives' => null,
'versionDate' => ''
],
'endTime' => '',
'hangoutsChatInfo' => [
'roomId' => [
]
],
'hangoutsChatOptions' => [
'includeRooms' => null
],
'mailOptions' => [
'clientSideEncryptedOption' => '',
'excludeDrafts' => null
],
'method' => '',
'orgUnitInfo' => [
'orgUnitId' => ''
],
'searchMethod' => '',
'sharedDriveInfo' => [
'sharedDriveIds' => [
]
],
'sitesUrlInfo' => [
'urls' => [
]
],
'startTime' => '',
'teamDriveInfo' => [
'teamDriveIds' => [
]
],
'terms' => '',
'timeZone' => '',
'voiceOptions' => [
'coveredData' => [
]
]
],
'savedQueryId' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/v1/matters/:matterId/savedQueries', [
'body' => '{
"createTime": "",
"displayName": "",
"matterId": "",
"query": {
"accountInfo": {
"emails": []
},
"corpus": "",
"dataScope": "",
"driveOptions": {
"clientSideEncryptedOption": "",
"includeSharedDrives": false,
"includeTeamDrives": false,
"versionDate": ""
},
"endTime": "",
"hangoutsChatInfo": {
"roomId": []
},
"hangoutsChatOptions": {
"includeRooms": false
},
"mailOptions": {
"clientSideEncryptedOption": "",
"excludeDrafts": false
},
"method": "",
"orgUnitInfo": {
"orgUnitId": ""
},
"searchMethod": "",
"sharedDriveInfo": {
"sharedDriveIds": []
},
"sitesUrlInfo": {
"urls": []
},
"startTime": "",
"teamDriveInfo": {
"teamDriveIds": []
},
"terms": "",
"timeZone": "",
"voiceOptions": {
"coveredData": []
}
},
"savedQueryId": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1/matters/:matterId/savedQueries');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'createTime' => '',
'displayName' => '',
'matterId' => '',
'query' => [
'accountInfo' => [
'emails' => [
]
],
'corpus' => '',
'dataScope' => '',
'driveOptions' => [
'clientSideEncryptedOption' => '',
'includeSharedDrives' => null,
'includeTeamDrives' => null,
'versionDate' => ''
],
'endTime' => '',
'hangoutsChatInfo' => [
'roomId' => [
]
],
'hangoutsChatOptions' => [
'includeRooms' => null
],
'mailOptions' => [
'clientSideEncryptedOption' => '',
'excludeDrafts' => null
],
'method' => '',
'orgUnitInfo' => [
'orgUnitId' => ''
],
'searchMethod' => '',
'sharedDriveInfo' => [
'sharedDriveIds' => [
]
],
'sitesUrlInfo' => [
'urls' => [
]
],
'startTime' => '',
'teamDriveInfo' => [
'teamDriveIds' => [
]
],
'terms' => '',
'timeZone' => '',
'voiceOptions' => [
'coveredData' => [
]
]
],
'savedQueryId' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'createTime' => '',
'displayName' => '',
'matterId' => '',
'query' => [
'accountInfo' => [
'emails' => [
]
],
'corpus' => '',
'dataScope' => '',
'driveOptions' => [
'clientSideEncryptedOption' => '',
'includeSharedDrives' => null,
'includeTeamDrives' => null,
'versionDate' => ''
],
'endTime' => '',
'hangoutsChatInfo' => [
'roomId' => [
]
],
'hangoutsChatOptions' => [
'includeRooms' => null
],
'mailOptions' => [
'clientSideEncryptedOption' => '',
'excludeDrafts' => null
],
'method' => '',
'orgUnitInfo' => [
'orgUnitId' => ''
],
'searchMethod' => '',
'sharedDriveInfo' => [
'sharedDriveIds' => [
]
],
'sitesUrlInfo' => [
'urls' => [
]
],
'startTime' => '',
'teamDriveInfo' => [
'teamDriveIds' => [
]
],
'terms' => '',
'timeZone' => '',
'voiceOptions' => [
'coveredData' => [
]
]
],
'savedQueryId' => ''
]));
$request->setRequestUrl('{{baseUrl}}/v1/matters/:matterId/savedQueries');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/matters/:matterId/savedQueries' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"createTime": "",
"displayName": "",
"matterId": "",
"query": {
"accountInfo": {
"emails": []
},
"corpus": "",
"dataScope": "",
"driveOptions": {
"clientSideEncryptedOption": "",
"includeSharedDrives": false,
"includeTeamDrives": false,
"versionDate": ""
},
"endTime": "",
"hangoutsChatInfo": {
"roomId": []
},
"hangoutsChatOptions": {
"includeRooms": false
},
"mailOptions": {
"clientSideEncryptedOption": "",
"excludeDrafts": false
},
"method": "",
"orgUnitInfo": {
"orgUnitId": ""
},
"searchMethod": "",
"sharedDriveInfo": {
"sharedDriveIds": []
},
"sitesUrlInfo": {
"urls": []
},
"startTime": "",
"teamDriveInfo": {
"teamDriveIds": []
},
"terms": "",
"timeZone": "",
"voiceOptions": {
"coveredData": []
}
},
"savedQueryId": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/matters/:matterId/savedQueries' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"createTime": "",
"displayName": "",
"matterId": "",
"query": {
"accountInfo": {
"emails": []
},
"corpus": "",
"dataScope": "",
"driveOptions": {
"clientSideEncryptedOption": "",
"includeSharedDrives": false,
"includeTeamDrives": false,
"versionDate": ""
},
"endTime": "",
"hangoutsChatInfo": {
"roomId": []
},
"hangoutsChatOptions": {
"includeRooms": false
},
"mailOptions": {
"clientSideEncryptedOption": "",
"excludeDrafts": false
},
"method": "",
"orgUnitInfo": {
"orgUnitId": ""
},
"searchMethod": "",
"sharedDriveInfo": {
"sharedDriveIds": []
},
"sitesUrlInfo": {
"urls": []
},
"startTime": "",
"teamDriveInfo": {
"teamDriveIds": []
},
"terms": "",
"timeZone": "",
"voiceOptions": {
"coveredData": []
}
},
"savedQueryId": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"createTime\": \"\",\n \"displayName\": \"\",\n \"matterId\": \"\",\n \"query\": {\n \"accountInfo\": {\n \"emails\": []\n },\n \"corpus\": \"\",\n \"dataScope\": \"\",\n \"driveOptions\": {\n \"clientSideEncryptedOption\": \"\",\n \"includeSharedDrives\": false,\n \"includeTeamDrives\": false,\n \"versionDate\": \"\"\n },\n \"endTime\": \"\",\n \"hangoutsChatInfo\": {\n \"roomId\": []\n },\n \"hangoutsChatOptions\": {\n \"includeRooms\": false\n },\n \"mailOptions\": {\n \"clientSideEncryptedOption\": \"\",\n \"excludeDrafts\": false\n },\n \"method\": \"\",\n \"orgUnitInfo\": {\n \"orgUnitId\": \"\"\n },\n \"searchMethod\": \"\",\n \"sharedDriveInfo\": {\n \"sharedDriveIds\": []\n },\n \"sitesUrlInfo\": {\n \"urls\": []\n },\n \"startTime\": \"\",\n \"teamDriveInfo\": {\n \"teamDriveIds\": []\n },\n \"terms\": \"\",\n \"timeZone\": \"\",\n \"voiceOptions\": {\n \"coveredData\": []\n }\n },\n \"savedQueryId\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1/matters/:matterId/savedQueries", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/matters/:matterId/savedQueries"
payload = {
"createTime": "",
"displayName": "",
"matterId": "",
"query": {
"accountInfo": { "emails": [] },
"corpus": "",
"dataScope": "",
"driveOptions": {
"clientSideEncryptedOption": "",
"includeSharedDrives": False,
"includeTeamDrives": False,
"versionDate": ""
},
"endTime": "",
"hangoutsChatInfo": { "roomId": [] },
"hangoutsChatOptions": { "includeRooms": False },
"mailOptions": {
"clientSideEncryptedOption": "",
"excludeDrafts": False
},
"method": "",
"orgUnitInfo": { "orgUnitId": "" },
"searchMethod": "",
"sharedDriveInfo": { "sharedDriveIds": [] },
"sitesUrlInfo": { "urls": [] },
"startTime": "",
"teamDriveInfo": { "teamDriveIds": [] },
"terms": "",
"timeZone": "",
"voiceOptions": { "coveredData": [] }
},
"savedQueryId": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/matters/:matterId/savedQueries"
payload <- "{\n \"createTime\": \"\",\n \"displayName\": \"\",\n \"matterId\": \"\",\n \"query\": {\n \"accountInfo\": {\n \"emails\": []\n },\n \"corpus\": \"\",\n \"dataScope\": \"\",\n \"driveOptions\": {\n \"clientSideEncryptedOption\": \"\",\n \"includeSharedDrives\": false,\n \"includeTeamDrives\": false,\n \"versionDate\": \"\"\n },\n \"endTime\": \"\",\n \"hangoutsChatInfo\": {\n \"roomId\": []\n },\n \"hangoutsChatOptions\": {\n \"includeRooms\": false\n },\n \"mailOptions\": {\n \"clientSideEncryptedOption\": \"\",\n \"excludeDrafts\": false\n },\n \"method\": \"\",\n \"orgUnitInfo\": {\n \"orgUnitId\": \"\"\n },\n \"searchMethod\": \"\",\n \"sharedDriveInfo\": {\n \"sharedDriveIds\": []\n },\n \"sitesUrlInfo\": {\n \"urls\": []\n },\n \"startTime\": \"\",\n \"teamDriveInfo\": {\n \"teamDriveIds\": []\n },\n \"terms\": \"\",\n \"timeZone\": \"\",\n \"voiceOptions\": {\n \"coveredData\": []\n }\n },\n \"savedQueryId\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/matters/:matterId/savedQueries")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"createTime\": \"\",\n \"displayName\": \"\",\n \"matterId\": \"\",\n \"query\": {\n \"accountInfo\": {\n \"emails\": []\n },\n \"corpus\": \"\",\n \"dataScope\": \"\",\n \"driveOptions\": {\n \"clientSideEncryptedOption\": \"\",\n \"includeSharedDrives\": false,\n \"includeTeamDrives\": false,\n \"versionDate\": \"\"\n },\n \"endTime\": \"\",\n \"hangoutsChatInfo\": {\n \"roomId\": []\n },\n \"hangoutsChatOptions\": {\n \"includeRooms\": false\n },\n \"mailOptions\": {\n \"clientSideEncryptedOption\": \"\",\n \"excludeDrafts\": false\n },\n \"method\": \"\",\n \"orgUnitInfo\": {\n \"orgUnitId\": \"\"\n },\n \"searchMethod\": \"\",\n \"sharedDriveInfo\": {\n \"sharedDriveIds\": []\n },\n \"sitesUrlInfo\": {\n \"urls\": []\n },\n \"startTime\": \"\",\n \"teamDriveInfo\": {\n \"teamDriveIds\": []\n },\n \"terms\": \"\",\n \"timeZone\": \"\",\n \"voiceOptions\": {\n \"coveredData\": []\n }\n },\n \"savedQueryId\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/v1/matters/:matterId/savedQueries') do |req|
req.body = "{\n \"createTime\": \"\",\n \"displayName\": \"\",\n \"matterId\": \"\",\n \"query\": {\n \"accountInfo\": {\n \"emails\": []\n },\n \"corpus\": \"\",\n \"dataScope\": \"\",\n \"driveOptions\": {\n \"clientSideEncryptedOption\": \"\",\n \"includeSharedDrives\": false,\n \"includeTeamDrives\": false,\n \"versionDate\": \"\"\n },\n \"endTime\": \"\",\n \"hangoutsChatInfo\": {\n \"roomId\": []\n },\n \"hangoutsChatOptions\": {\n \"includeRooms\": false\n },\n \"mailOptions\": {\n \"clientSideEncryptedOption\": \"\",\n \"excludeDrafts\": false\n },\n \"method\": \"\",\n \"orgUnitInfo\": {\n \"orgUnitId\": \"\"\n },\n \"searchMethod\": \"\",\n \"sharedDriveInfo\": {\n \"sharedDriveIds\": []\n },\n \"sitesUrlInfo\": {\n \"urls\": []\n },\n \"startTime\": \"\",\n \"teamDriveInfo\": {\n \"teamDriveIds\": []\n },\n \"terms\": \"\",\n \"timeZone\": \"\",\n \"voiceOptions\": {\n \"coveredData\": []\n }\n },\n \"savedQueryId\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/matters/:matterId/savedQueries";
let payload = json!({
"createTime": "",
"displayName": "",
"matterId": "",
"query": json!({
"accountInfo": json!({"emails": ()}),
"corpus": "",
"dataScope": "",
"driveOptions": json!({
"clientSideEncryptedOption": "",
"includeSharedDrives": false,
"includeTeamDrives": false,
"versionDate": ""
}),
"endTime": "",
"hangoutsChatInfo": json!({"roomId": ()}),
"hangoutsChatOptions": json!({"includeRooms": false}),
"mailOptions": json!({
"clientSideEncryptedOption": "",
"excludeDrafts": false
}),
"method": "",
"orgUnitInfo": json!({"orgUnitId": ""}),
"searchMethod": "",
"sharedDriveInfo": json!({"sharedDriveIds": ()}),
"sitesUrlInfo": json!({"urls": ()}),
"startTime": "",
"teamDriveInfo": json!({"teamDriveIds": ()}),
"terms": "",
"timeZone": "",
"voiceOptions": json!({"coveredData": ()})
}),
"savedQueryId": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/v1/matters/:matterId/savedQueries \
--header 'content-type: application/json' \
--data '{
"createTime": "",
"displayName": "",
"matterId": "",
"query": {
"accountInfo": {
"emails": []
},
"corpus": "",
"dataScope": "",
"driveOptions": {
"clientSideEncryptedOption": "",
"includeSharedDrives": false,
"includeTeamDrives": false,
"versionDate": ""
},
"endTime": "",
"hangoutsChatInfo": {
"roomId": []
},
"hangoutsChatOptions": {
"includeRooms": false
},
"mailOptions": {
"clientSideEncryptedOption": "",
"excludeDrafts": false
},
"method": "",
"orgUnitInfo": {
"orgUnitId": ""
},
"searchMethod": "",
"sharedDriveInfo": {
"sharedDriveIds": []
},
"sitesUrlInfo": {
"urls": []
},
"startTime": "",
"teamDriveInfo": {
"teamDriveIds": []
},
"terms": "",
"timeZone": "",
"voiceOptions": {
"coveredData": []
}
},
"savedQueryId": ""
}'
echo '{
"createTime": "",
"displayName": "",
"matterId": "",
"query": {
"accountInfo": {
"emails": []
},
"corpus": "",
"dataScope": "",
"driveOptions": {
"clientSideEncryptedOption": "",
"includeSharedDrives": false,
"includeTeamDrives": false,
"versionDate": ""
},
"endTime": "",
"hangoutsChatInfo": {
"roomId": []
},
"hangoutsChatOptions": {
"includeRooms": false
},
"mailOptions": {
"clientSideEncryptedOption": "",
"excludeDrafts": false
},
"method": "",
"orgUnitInfo": {
"orgUnitId": ""
},
"searchMethod": "",
"sharedDriveInfo": {
"sharedDriveIds": []
},
"sitesUrlInfo": {
"urls": []
},
"startTime": "",
"teamDriveInfo": {
"teamDriveIds": []
},
"terms": "",
"timeZone": "",
"voiceOptions": {
"coveredData": []
}
},
"savedQueryId": ""
}' | \
http POST {{baseUrl}}/v1/matters/:matterId/savedQueries \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "createTime": "",\n "displayName": "",\n "matterId": "",\n "query": {\n "accountInfo": {\n "emails": []\n },\n "corpus": "",\n "dataScope": "",\n "driveOptions": {\n "clientSideEncryptedOption": "",\n "includeSharedDrives": false,\n "includeTeamDrives": false,\n "versionDate": ""\n },\n "endTime": "",\n "hangoutsChatInfo": {\n "roomId": []\n },\n "hangoutsChatOptions": {\n "includeRooms": false\n },\n "mailOptions": {\n "clientSideEncryptedOption": "",\n "excludeDrafts": false\n },\n "method": "",\n "orgUnitInfo": {\n "orgUnitId": ""\n },\n "searchMethod": "",\n "sharedDriveInfo": {\n "sharedDriveIds": []\n },\n "sitesUrlInfo": {\n "urls": []\n },\n "startTime": "",\n "teamDriveInfo": {\n "teamDriveIds": []\n },\n "terms": "",\n "timeZone": "",\n "voiceOptions": {\n "coveredData": []\n }\n },\n "savedQueryId": ""\n}' \
--output-document \
- {{baseUrl}}/v1/matters/:matterId/savedQueries
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"createTime": "",
"displayName": "",
"matterId": "",
"query": [
"accountInfo": ["emails": []],
"corpus": "",
"dataScope": "",
"driveOptions": [
"clientSideEncryptedOption": "",
"includeSharedDrives": false,
"includeTeamDrives": false,
"versionDate": ""
],
"endTime": "",
"hangoutsChatInfo": ["roomId": []],
"hangoutsChatOptions": ["includeRooms": false],
"mailOptions": [
"clientSideEncryptedOption": "",
"excludeDrafts": false
],
"method": "",
"orgUnitInfo": ["orgUnitId": ""],
"searchMethod": "",
"sharedDriveInfo": ["sharedDriveIds": []],
"sitesUrlInfo": ["urls": []],
"startTime": "",
"teamDriveInfo": ["teamDriveIds": []],
"terms": "",
"timeZone": "",
"voiceOptions": ["coveredData": []]
],
"savedQueryId": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/matters/:matterId/savedQueries")! 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
vault.matters.savedQueries.delete
{{baseUrl}}/v1/matters/:matterId/savedQueries/:savedQueryId
QUERY PARAMS
matterId
savedQueryId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/matters/:matterId/savedQueries/:savedQueryId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/v1/matters/:matterId/savedQueries/:savedQueryId")
require "http/client"
url = "{{baseUrl}}/v1/matters/:matterId/savedQueries/:savedQueryId"
response = HTTP::Client.delete url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Delete,
RequestUri = new Uri("{{baseUrl}}/v1/matters/:matterId/savedQueries/:savedQueryId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/matters/:matterId/savedQueries/:savedQueryId");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/matters/:matterId/savedQueries/:savedQueryId"
req, _ := http.NewRequest("DELETE", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
DELETE /baseUrl/v1/matters/:matterId/savedQueries/:savedQueryId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/v1/matters/:matterId/savedQueries/:savedQueryId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/matters/:matterId/savedQueries/:savedQueryId"))
.method("DELETE", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/matters/:matterId/savedQueries/:savedQueryId")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/v1/matters/:matterId/savedQueries/:savedQueryId")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('DELETE', '{{baseUrl}}/v1/matters/:matterId/savedQueries/:savedQueryId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'DELETE',
url: '{{baseUrl}}/v1/matters/:matterId/savedQueries/:savedQueryId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/matters/:matterId/savedQueries/:savedQueryId';
const options = {method: 'DELETE'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/matters/:matterId/savedQueries/:savedQueryId',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1/matters/:matterId/savedQueries/:savedQueryId")
.delete(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/matters/:matterId/savedQueries/:savedQueryId',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'DELETE',
url: '{{baseUrl}}/v1/matters/:matterId/savedQueries/:savedQueryId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/v1/matters/:matterId/savedQueries/:savedQueryId');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'DELETE',
url: '{{baseUrl}}/v1/matters/:matterId/savedQueries/:savedQueryId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/matters/:matterId/savedQueries/:savedQueryId';
const options = {method: 'DELETE'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/matters/:matterId/savedQueries/:savedQueryId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"DELETE"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/matters/:matterId/savedQueries/:savedQueryId" in
Client.call `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/matters/:matterId/savedQueries/:savedQueryId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('DELETE', '{{baseUrl}}/v1/matters/:matterId/savedQueries/:savedQueryId');
echo $response->getBody();
setUrl('{{baseUrl}}/v1/matters/:matterId/savedQueries/:savedQueryId');
$request->setMethod(HTTP_METH_DELETE);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/matters/:matterId/savedQueries/:savedQueryId');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/matters/:matterId/savedQueries/:savedQueryId' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/matters/:matterId/savedQueries/:savedQueryId' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/v1/matters/:matterId/savedQueries/:savedQueryId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/matters/:matterId/savedQueries/:savedQueryId"
response = requests.delete(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/matters/:matterId/savedQueries/:savedQueryId"
response <- VERB("DELETE", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/matters/:matterId/savedQueries/:savedQueryId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.delete('/baseUrl/v1/matters/:matterId/savedQueries/:savedQueryId') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/matters/:matterId/savedQueries/:savedQueryId";
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("DELETE").unwrap(), url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request DELETE \
--url {{baseUrl}}/v1/matters/:matterId/savedQueries/:savedQueryId
http DELETE {{baseUrl}}/v1/matters/:matterId/savedQueries/:savedQueryId
wget --quiet \
--method DELETE \
--output-document \
- {{baseUrl}}/v1/matters/:matterId/savedQueries/:savedQueryId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/matters/:matterId/savedQueries/:savedQueryId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "DELETE"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
vault.matters.savedQueries.get
{{baseUrl}}/v1/matters/:matterId/savedQueries/:savedQueryId
QUERY PARAMS
matterId
savedQueryId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/matters/:matterId/savedQueries/:savedQueryId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v1/matters/:matterId/savedQueries/:savedQueryId")
require "http/client"
url = "{{baseUrl}}/v1/matters/:matterId/savedQueries/:savedQueryId"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/v1/matters/:matterId/savedQueries/:savedQueryId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/matters/:matterId/savedQueries/:savedQueryId");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/matters/:matterId/savedQueries/:savedQueryId"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/v1/matters/:matterId/savedQueries/:savedQueryId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1/matters/:matterId/savedQueries/:savedQueryId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/matters/:matterId/savedQueries/:savedQueryId"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/matters/:matterId/savedQueries/:savedQueryId")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1/matters/:matterId/savedQueries/:savedQueryId")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/v1/matters/:matterId/savedQueries/:savedQueryId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/v1/matters/:matterId/savedQueries/:savedQueryId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/matters/:matterId/savedQueries/:savedQueryId';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/matters/:matterId/savedQueries/:savedQueryId',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1/matters/:matterId/savedQueries/:savedQueryId")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/matters/:matterId/savedQueries/:savedQueryId',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/v1/matters/:matterId/savedQueries/:savedQueryId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v1/matters/:matterId/savedQueries/:savedQueryId');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/v1/matters/:matterId/savedQueries/:savedQueryId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/matters/:matterId/savedQueries/:savedQueryId';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/matters/:matterId/savedQueries/:savedQueryId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/matters/:matterId/savedQueries/:savedQueryId" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/matters/:matterId/savedQueries/:savedQueryId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/v1/matters/:matterId/savedQueries/:savedQueryId');
echo $response->getBody();
setUrl('{{baseUrl}}/v1/matters/:matterId/savedQueries/:savedQueryId');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/matters/:matterId/savedQueries/:savedQueryId');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/matters/:matterId/savedQueries/:savedQueryId' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/matters/:matterId/savedQueries/:savedQueryId' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v1/matters/:matterId/savedQueries/:savedQueryId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/matters/:matterId/savedQueries/:savedQueryId"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/matters/:matterId/savedQueries/:savedQueryId"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/matters/:matterId/savedQueries/:savedQueryId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/v1/matters/:matterId/savedQueries/:savedQueryId') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/matters/:matterId/savedQueries/:savedQueryId";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/v1/matters/:matterId/savedQueries/:savedQueryId
http GET {{baseUrl}}/v1/matters/:matterId/savedQueries/:savedQueryId
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v1/matters/:matterId/savedQueries/:savedQueryId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/matters/:matterId/savedQueries/:savedQueryId")! 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
vault.matters.savedQueries.list
{{baseUrl}}/v1/matters/:matterId/savedQueries
QUERY PARAMS
matterId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/matters/:matterId/savedQueries");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v1/matters/:matterId/savedQueries")
require "http/client"
url = "{{baseUrl}}/v1/matters/:matterId/savedQueries"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/v1/matters/:matterId/savedQueries"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/matters/:matterId/savedQueries");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/matters/:matterId/savedQueries"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/v1/matters/:matterId/savedQueries HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1/matters/:matterId/savedQueries")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/matters/:matterId/savedQueries"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/matters/:matterId/savedQueries")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1/matters/:matterId/savedQueries")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/v1/matters/:matterId/savedQueries');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/v1/matters/:matterId/savedQueries'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/matters/:matterId/savedQueries';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/matters/:matterId/savedQueries',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1/matters/:matterId/savedQueries")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/matters/:matterId/savedQueries',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/v1/matters/:matterId/savedQueries'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v1/matters/:matterId/savedQueries');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/v1/matters/:matterId/savedQueries'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/matters/:matterId/savedQueries';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/matters/:matterId/savedQueries"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/matters/:matterId/savedQueries" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/matters/:matterId/savedQueries",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/v1/matters/:matterId/savedQueries');
echo $response->getBody();
setUrl('{{baseUrl}}/v1/matters/:matterId/savedQueries');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/matters/:matterId/savedQueries');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/matters/:matterId/savedQueries' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/matters/:matterId/savedQueries' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v1/matters/:matterId/savedQueries")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/matters/:matterId/savedQueries"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/matters/:matterId/savedQueries"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/matters/:matterId/savedQueries")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/v1/matters/:matterId/savedQueries') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/matters/:matterId/savedQueries";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/v1/matters/:matterId/savedQueries
http GET {{baseUrl}}/v1/matters/:matterId/savedQueries
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v1/matters/:matterId/savedQueries
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/matters/:matterId/savedQueries")! 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
vault.matters.undelete
{{baseUrl}}/v1/matters/:matterId:undelete
QUERY PARAMS
matterId
BODY json
{}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/matters/:matterId:undelete");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1/matters/:matterId:undelete" {:content-type :json})
require "http/client"
url = "{{baseUrl}}/v1/matters/:matterId:undelete"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/v1/matters/:matterId:undelete"),
Content = new StringContent("{}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/matters/:matterId:undelete");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/matters/:matterId:undelete"
payload := strings.NewReader("{}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/v1/matters/:matterId:undelete HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 2
{}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1/matters/:matterId:undelete")
.setHeader("content-type", "application/json")
.setBody("{}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/matters/:matterId:undelete"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/matters/:matterId:undelete")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1/matters/:matterId:undelete")
.header("content-type", "application/json")
.body("{}")
.asString();
const data = JSON.stringify({});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v1/matters/:matterId:undelete');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/matters/:matterId:undelete',
headers: {'content-type': 'application/json'},
data: {}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/matters/:matterId:undelete';
const options = {method: 'POST', headers: {'content-type': 'application/json'}, body: '{}'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/matters/:matterId:undelete',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{}")
val request = Request.Builder()
.url("{{baseUrl}}/v1/matters/:matterId:undelete")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/matters/:matterId:undelete',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/matters/:matterId:undelete',
headers: {'content-type': 'application/json'},
body: {},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/v1/matters/:matterId:undelete');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/matters/:matterId:undelete',
headers: {'content-type': 'application/json'},
data: {}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/matters/:matterId:undelete';
const options = {method: 'POST', headers: {'content-type': 'application/json'}, body: '{}'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/matters/:matterId:undelete"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/matters/:matterId:undelete" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/matters/:matterId:undelete",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/v1/matters/:matterId:undelete', [
'body' => '{}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1/matters/:matterId:undelete');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
]));
$request->setRequestUrl('{{baseUrl}}/v1/matters/:matterId:undelete');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/matters/:matterId:undelete' -Method POST -Headers $headers -ContentType 'application/json' -Body '{}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/matters/:matterId:undelete' -Method POST -Headers $headers -ContentType 'application/json' -Body '{}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1/matters/:matterId:undelete", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/matters/:matterId:undelete"
payload = {}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/matters/:matterId:undelete"
payload <- "{}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/matters/:matterId:undelete")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/v1/matters/:matterId:undelete') do |req|
req.body = "{}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/matters/:matterId:undelete";
let payload = json!({});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/v1/matters/:matterId:undelete \
--header 'content-type: application/json' \
--data '{}'
echo '{}' | \
http POST {{baseUrl}}/v1/matters/:matterId:undelete \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{}' \
--output-document \
- {{baseUrl}}/v1/matters/:matterId:undelete
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/matters/:matterId:undelete")! 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()
PUT
vault.matters.update
{{baseUrl}}/v1/matters/:matterId
QUERY PARAMS
matterId
BODY json
{
"description": "",
"matterId": "",
"matterPermissions": [
{
"accountId": "",
"role": ""
}
],
"name": "",
"state": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/matters/:matterId");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"description\": \"\",\n \"matterId\": \"\",\n \"matterPermissions\": [\n {\n \"accountId\": \"\",\n \"role\": \"\"\n }\n ],\n \"name\": \"\",\n \"state\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/v1/matters/:matterId" {:content-type :json
:form-params {:description ""
:matterId ""
:matterPermissions [{:accountId ""
:role ""}]
:name ""
:state ""}})
require "http/client"
url = "{{baseUrl}}/v1/matters/:matterId"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"description\": \"\",\n \"matterId\": \"\",\n \"matterPermissions\": [\n {\n \"accountId\": \"\",\n \"role\": \"\"\n }\n ],\n \"name\": \"\",\n \"state\": \"\"\n}"
response = HTTP::Client.put url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Put,
RequestUri = new Uri("{{baseUrl}}/v1/matters/:matterId"),
Content = new StringContent("{\n \"description\": \"\",\n \"matterId\": \"\",\n \"matterPermissions\": [\n {\n \"accountId\": \"\",\n \"role\": \"\"\n }\n ],\n \"name\": \"\",\n \"state\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/matters/:matterId");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"description\": \"\",\n \"matterId\": \"\",\n \"matterPermissions\": [\n {\n \"accountId\": \"\",\n \"role\": \"\"\n }\n ],\n \"name\": \"\",\n \"state\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/matters/:matterId"
payload := strings.NewReader("{\n \"description\": \"\",\n \"matterId\": \"\",\n \"matterPermissions\": [\n {\n \"accountId\": \"\",\n \"role\": \"\"\n }\n ],\n \"name\": \"\",\n \"state\": \"\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
PUT /baseUrl/v1/matters/:matterId HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 152
{
"description": "",
"matterId": "",
"matterPermissions": [
{
"accountId": "",
"role": ""
}
],
"name": "",
"state": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/v1/matters/:matterId")
.setHeader("content-type", "application/json")
.setBody("{\n \"description\": \"\",\n \"matterId\": \"\",\n \"matterPermissions\": [\n {\n \"accountId\": \"\",\n \"role\": \"\"\n }\n ],\n \"name\": \"\",\n \"state\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/matters/:matterId"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"description\": \"\",\n \"matterId\": \"\",\n \"matterPermissions\": [\n {\n \"accountId\": \"\",\n \"role\": \"\"\n }\n ],\n \"name\": \"\",\n \"state\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"description\": \"\",\n \"matterId\": \"\",\n \"matterPermissions\": [\n {\n \"accountId\": \"\",\n \"role\": \"\"\n }\n ],\n \"name\": \"\",\n \"state\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/matters/:matterId")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/v1/matters/:matterId")
.header("content-type", "application/json")
.body("{\n \"description\": \"\",\n \"matterId\": \"\",\n \"matterPermissions\": [\n {\n \"accountId\": \"\",\n \"role\": \"\"\n }\n ],\n \"name\": \"\",\n \"state\": \"\"\n}")
.asString();
const data = JSON.stringify({
description: '',
matterId: '',
matterPermissions: [
{
accountId: '',
role: ''
}
],
name: '',
state: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/v1/matters/:matterId');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/v1/matters/:matterId',
headers: {'content-type': 'application/json'},
data: {
description: '',
matterId: '',
matterPermissions: [{accountId: '', role: ''}],
name: '',
state: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/matters/:matterId';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"description":"","matterId":"","matterPermissions":[{"accountId":"","role":""}],"name":"","state":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/matters/:matterId',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "description": "",\n "matterId": "",\n "matterPermissions": [\n {\n "accountId": "",\n "role": ""\n }\n ],\n "name": "",\n "state": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"description\": \"\",\n \"matterId\": \"\",\n \"matterPermissions\": [\n {\n \"accountId\": \"\",\n \"role\": \"\"\n }\n ],\n \"name\": \"\",\n \"state\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1/matters/:matterId")
.put(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PUT',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/matters/:matterId',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
description: '',
matterId: '',
matterPermissions: [{accountId: '', role: ''}],
name: '',
state: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/v1/matters/:matterId',
headers: {'content-type': 'application/json'},
body: {
description: '',
matterId: '',
matterPermissions: [{accountId: '', role: ''}],
name: '',
state: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/v1/matters/:matterId');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
description: '',
matterId: '',
matterPermissions: [
{
accountId: '',
role: ''
}
],
name: '',
state: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PUT',
url: '{{baseUrl}}/v1/matters/:matterId',
headers: {'content-type': 'application/json'},
data: {
description: '',
matterId: '',
matterPermissions: [{accountId: '', role: ''}],
name: '',
state: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/matters/:matterId';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"description":"","matterId":"","matterPermissions":[{"accountId":"","role":""}],"name":"","state":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"description": @"",
@"matterId": @"",
@"matterPermissions": @[ @{ @"accountId": @"", @"role": @"" } ],
@"name": @"",
@"state": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/matters/:matterId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/matters/:matterId" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"description\": \"\",\n \"matterId\": \"\",\n \"matterPermissions\": [\n {\n \"accountId\": \"\",\n \"role\": \"\"\n }\n ],\n \"name\": \"\",\n \"state\": \"\"\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/matters/:matterId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'description' => '',
'matterId' => '',
'matterPermissions' => [
[
'accountId' => '',
'role' => ''
]
],
'name' => '',
'state' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PUT', '{{baseUrl}}/v1/matters/:matterId', [
'body' => '{
"description": "",
"matterId": "",
"matterPermissions": [
{
"accountId": "",
"role": ""
}
],
"name": "",
"state": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1/matters/:matterId');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'description' => '',
'matterId' => '',
'matterPermissions' => [
[
'accountId' => '',
'role' => ''
]
],
'name' => '',
'state' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'description' => '',
'matterId' => '',
'matterPermissions' => [
[
'accountId' => '',
'role' => ''
]
],
'name' => '',
'state' => ''
]));
$request->setRequestUrl('{{baseUrl}}/v1/matters/:matterId');
$request->setRequestMethod('PUT');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/matters/:matterId' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"description": "",
"matterId": "",
"matterPermissions": [
{
"accountId": "",
"role": ""
}
],
"name": "",
"state": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/matters/:matterId' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"description": "",
"matterId": "",
"matterPermissions": [
{
"accountId": "",
"role": ""
}
],
"name": "",
"state": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"description\": \"\",\n \"matterId\": \"\",\n \"matterPermissions\": [\n {\n \"accountId\": \"\",\n \"role\": \"\"\n }\n ],\n \"name\": \"\",\n \"state\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/v1/matters/:matterId", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/matters/:matterId"
payload = {
"description": "",
"matterId": "",
"matterPermissions": [
{
"accountId": "",
"role": ""
}
],
"name": "",
"state": ""
}
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/matters/:matterId"
payload <- "{\n \"description\": \"\",\n \"matterId\": \"\",\n \"matterPermissions\": [\n {\n \"accountId\": \"\",\n \"role\": \"\"\n }\n ],\n \"name\": \"\",\n \"state\": \"\"\n}"
encode <- "json"
response <- VERB("PUT", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/matters/:matterId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"description\": \"\",\n \"matterId\": \"\",\n \"matterPermissions\": [\n {\n \"accountId\": \"\",\n \"role\": \"\"\n }\n ],\n \"name\": \"\",\n \"state\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.put('/baseUrl/v1/matters/:matterId') do |req|
req.body = "{\n \"description\": \"\",\n \"matterId\": \"\",\n \"matterPermissions\": [\n {\n \"accountId\": \"\",\n \"role\": \"\"\n }\n ],\n \"name\": \"\",\n \"state\": \"\"\n}"
end
puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/matters/:matterId";
let payload = json!({
"description": "",
"matterId": "",
"matterPermissions": (
json!({
"accountId": "",
"role": ""
})
),
"name": "",
"state": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/v1/matters/:matterId \
--header 'content-type: application/json' \
--data '{
"description": "",
"matterId": "",
"matterPermissions": [
{
"accountId": "",
"role": ""
}
],
"name": "",
"state": ""
}'
echo '{
"description": "",
"matterId": "",
"matterPermissions": [
{
"accountId": "",
"role": ""
}
],
"name": "",
"state": ""
}' | \
http PUT {{baseUrl}}/v1/matters/:matterId \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '{\n "description": "",\n "matterId": "",\n "matterPermissions": [\n {\n "accountId": "",\n "role": ""\n }\n ],\n "name": "",\n "state": ""\n}' \
--output-document \
- {{baseUrl}}/v1/matters/:matterId
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"description": "",
"matterId": "",
"matterPermissions": [
[
"accountId": "",
"role": ""
]
],
"name": "",
"state": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/matters/:matterId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
vault.operations.cancel
{{baseUrl}}/v1/:name:cancel
QUERY PARAMS
name
BODY json
{}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:name:cancel");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1/:name:cancel" {:content-type :json})
require "http/client"
url = "{{baseUrl}}/v1/:name:cancel"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/v1/:name:cancel"),
Content = new StringContent("{}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/:name:cancel");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/:name:cancel"
payload := strings.NewReader("{}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/v1/:name:cancel HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 2
{}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1/:name:cancel")
.setHeader("content-type", "application/json")
.setBody("{}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/:name:cancel"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/:name:cancel")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1/:name:cancel")
.header("content-type", "application/json")
.body("{}")
.asString();
const data = JSON.stringify({});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v1/:name:cancel');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:name:cancel',
headers: {'content-type': 'application/json'},
data: {}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/:name:cancel';
const options = {method: 'POST', headers: {'content-type': 'application/json'}, body: '{}'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/:name:cancel',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{}")
val request = Request.Builder()
.url("{{baseUrl}}/v1/:name:cancel")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/:name:cancel',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:name:cancel',
headers: {'content-type': 'application/json'},
body: {},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/v1/:name:cancel');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:name:cancel',
headers: {'content-type': 'application/json'},
data: {}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/:name:cancel';
const options = {method: 'POST', headers: {'content-type': 'application/json'}, body: '{}'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:name:cancel"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/:name:cancel" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/:name:cancel",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/v1/:name:cancel', [
'body' => '{}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1/:name:cancel');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
]));
$request->setRequestUrl('{{baseUrl}}/v1/:name:cancel');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:name:cancel' -Method POST -Headers $headers -ContentType 'application/json' -Body '{}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:name:cancel' -Method POST -Headers $headers -ContentType 'application/json' -Body '{}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1/:name:cancel", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/:name:cancel"
payload = {}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/:name:cancel"
payload <- "{}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/:name:cancel")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/v1/:name:cancel') do |req|
req.body = "{}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/:name:cancel";
let payload = json!({});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/v1/:name:cancel \
--header 'content-type: application/json' \
--data '{}'
echo '{}' | \
http POST {{baseUrl}}/v1/:name:cancel \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{}' \
--output-document \
- {{baseUrl}}/v1/:name:cancel
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:name:cancel")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
DELETE
vault.operations.delete
{{baseUrl}}/v1/:name
QUERY PARAMS
name
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:name");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/v1/:name")
require "http/client"
url = "{{baseUrl}}/v1/:name"
response = HTTP::Client.delete url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Delete,
RequestUri = new Uri("{{baseUrl}}/v1/:name"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/:name");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/:name"
req, _ := http.NewRequest("DELETE", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
DELETE /baseUrl/v1/:name HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/v1/:name")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/:name"))
.method("DELETE", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/:name")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/v1/:name")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('DELETE', '{{baseUrl}}/v1/:name');
xhr.send(data);
import axios from 'axios';
const options = {method: 'DELETE', url: '{{baseUrl}}/v1/:name'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/:name';
const options = {method: 'DELETE'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/:name',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1/:name")
.delete(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/:name',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'DELETE', url: '{{baseUrl}}/v1/:name'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/v1/:name');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {method: 'DELETE', url: '{{baseUrl}}/v1/:name'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/:name';
const options = {method: 'DELETE'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:name"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"DELETE"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/:name" in
Client.call `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/:name",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('DELETE', '{{baseUrl}}/v1/:name');
echo $response->getBody();
setUrl('{{baseUrl}}/v1/:name');
$request->setMethod(HTTP_METH_DELETE);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/:name');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:name' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:name' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/v1/:name")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/:name"
response = requests.delete(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/:name"
response <- VERB("DELETE", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/:name")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.delete('/baseUrl/v1/:name') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/:name";
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("DELETE").unwrap(), url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request DELETE \
--url {{baseUrl}}/v1/:name
http DELETE {{baseUrl}}/v1/:name
wget --quiet \
--method DELETE \
--output-document \
- {{baseUrl}}/v1/:name
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:name")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "DELETE"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
vault.operations.list
{{baseUrl}}/v1/:name
QUERY PARAMS
name
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:name");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v1/:name")
require "http/client"
url = "{{baseUrl}}/v1/:name"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/v1/:name"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/:name");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/:name"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/v1/:name HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1/:name")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/:name"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/:name")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1/:name")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/v1/:name');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/v1/:name'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/:name';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/:name',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1/:name")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/:name',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'GET', url: '{{baseUrl}}/v1/:name'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v1/:name');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {method: 'GET', url: '{{baseUrl}}/v1/:name'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/:name';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:name"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/:name" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/:name",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/v1/:name');
echo $response->getBody();
setUrl('{{baseUrl}}/v1/:name');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/:name');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:name' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:name' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v1/:name")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/:name"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/:name"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/:name")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/v1/:name') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/:name";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/v1/:name
http GET {{baseUrl}}/v1/:name
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v1/:name
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:name")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()