DoubleClick Bid Manager API
POST
doubleclickbidmanager.queries.createquery
{{baseUrl}}/query
BODY json
{
"kind": "",
"metadata": {
"dataRange": "",
"format": "",
"googleCloudStoragePathForLatestReport": "",
"googleDrivePathForLatestReport": "",
"latestReportRunTimeMs": "",
"locale": "",
"reportCount": 0,
"running": false,
"sendNotification": false,
"shareEmailAddress": [],
"title": ""
},
"params": {
"filters": [
{
"type": "",
"value": ""
}
],
"groupBys": [],
"includeInviteData": false,
"metrics": [],
"options": {
"includeOnlyTargetedUserLists": false,
"pathQueryOptions": {
"channelGrouping": {
"fallbackName": "",
"name": "",
"rules": [
{
"disjunctiveMatchStatements": [
{
"eventFilters": [
{
"dimensionFilter": {
"filter": "",
"match": "",
"values": []
}
}
]
}
],
"name": ""
}
]
},
"pathFilters": [
{
"eventFilters": [
{}
],
"pathMatchPosition": ""
}
]
}
},
"type": ""
},
"queryId": "",
"reportDataEndTimeMs": "",
"reportDataStartTimeMs": "",
"schedule": {
"endTimeMs": "",
"frequency": "",
"nextRunMinuteOfDay": 0,
"nextRunTimezoneCode": "",
"startTimeMs": ""
},
"timezoneCode": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/query");
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 \"kind\": \"\",\n \"metadata\": {\n \"dataRange\": \"\",\n \"format\": \"\",\n \"googleCloudStoragePathForLatestReport\": \"\",\n \"googleDrivePathForLatestReport\": \"\",\n \"latestReportRunTimeMs\": \"\",\n \"locale\": \"\",\n \"reportCount\": 0,\n \"running\": false,\n \"sendNotification\": false,\n \"shareEmailAddress\": [],\n \"title\": \"\"\n },\n \"params\": {\n \"filters\": [\n {\n \"type\": \"\",\n \"value\": \"\"\n }\n ],\n \"groupBys\": [],\n \"includeInviteData\": false,\n \"metrics\": [],\n \"options\": {\n \"includeOnlyTargetedUserLists\": false,\n \"pathQueryOptions\": {\n \"channelGrouping\": {\n \"fallbackName\": \"\",\n \"name\": \"\",\n \"rules\": [\n {\n \"disjunctiveMatchStatements\": [\n {\n \"eventFilters\": [\n {\n \"dimensionFilter\": {\n \"filter\": \"\",\n \"match\": \"\",\n \"values\": []\n }\n }\n ]\n }\n ],\n \"name\": \"\"\n }\n ]\n },\n \"pathFilters\": [\n {\n \"eventFilters\": [\n {}\n ],\n \"pathMatchPosition\": \"\"\n }\n ]\n }\n },\n \"type\": \"\"\n },\n \"queryId\": \"\",\n \"reportDataEndTimeMs\": \"\",\n \"reportDataStartTimeMs\": \"\",\n \"schedule\": {\n \"endTimeMs\": \"\",\n \"frequency\": \"\",\n \"nextRunMinuteOfDay\": 0,\n \"nextRunTimezoneCode\": \"\",\n \"startTimeMs\": \"\"\n },\n \"timezoneCode\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/query" {:content-type :json
:form-params {:kind ""
:metadata {:dataRange ""
:format ""
:googleCloudStoragePathForLatestReport ""
:googleDrivePathForLatestReport ""
:latestReportRunTimeMs ""
:locale ""
:reportCount 0
:running false
:sendNotification false
:shareEmailAddress []
:title ""}
:params {:filters [{:type ""
:value ""}]
:groupBys []
:includeInviteData false
:metrics []
:options {:includeOnlyTargetedUserLists false
:pathQueryOptions {:channelGrouping {:fallbackName ""
:name ""
:rules [{:disjunctiveMatchStatements [{:eventFilters [{:dimensionFilter {:filter ""
:match ""
:values []}}]}]
:name ""}]}
:pathFilters [{:eventFilters [{}]
:pathMatchPosition ""}]}}
:type ""}
:queryId ""
:reportDataEndTimeMs ""
:reportDataStartTimeMs ""
:schedule {:endTimeMs ""
:frequency ""
:nextRunMinuteOfDay 0
:nextRunTimezoneCode ""
:startTimeMs ""}
:timezoneCode ""}})
require "http/client"
url = "{{baseUrl}}/query"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"kind\": \"\",\n \"metadata\": {\n \"dataRange\": \"\",\n \"format\": \"\",\n \"googleCloudStoragePathForLatestReport\": \"\",\n \"googleDrivePathForLatestReport\": \"\",\n \"latestReportRunTimeMs\": \"\",\n \"locale\": \"\",\n \"reportCount\": 0,\n \"running\": false,\n \"sendNotification\": false,\n \"shareEmailAddress\": [],\n \"title\": \"\"\n },\n \"params\": {\n \"filters\": [\n {\n \"type\": \"\",\n \"value\": \"\"\n }\n ],\n \"groupBys\": [],\n \"includeInviteData\": false,\n \"metrics\": [],\n \"options\": {\n \"includeOnlyTargetedUserLists\": false,\n \"pathQueryOptions\": {\n \"channelGrouping\": {\n \"fallbackName\": \"\",\n \"name\": \"\",\n \"rules\": [\n {\n \"disjunctiveMatchStatements\": [\n {\n \"eventFilters\": [\n {\n \"dimensionFilter\": {\n \"filter\": \"\",\n \"match\": \"\",\n \"values\": []\n }\n }\n ]\n }\n ],\n \"name\": \"\"\n }\n ]\n },\n \"pathFilters\": [\n {\n \"eventFilters\": [\n {}\n ],\n \"pathMatchPosition\": \"\"\n }\n ]\n }\n },\n \"type\": \"\"\n },\n \"queryId\": \"\",\n \"reportDataEndTimeMs\": \"\",\n \"reportDataStartTimeMs\": \"\",\n \"schedule\": {\n \"endTimeMs\": \"\",\n \"frequency\": \"\",\n \"nextRunMinuteOfDay\": 0,\n \"nextRunTimezoneCode\": \"\",\n \"startTimeMs\": \"\"\n },\n \"timezoneCode\": \"\"\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}}/query"),
Content = new StringContent("{\n \"kind\": \"\",\n \"metadata\": {\n \"dataRange\": \"\",\n \"format\": \"\",\n \"googleCloudStoragePathForLatestReport\": \"\",\n \"googleDrivePathForLatestReport\": \"\",\n \"latestReportRunTimeMs\": \"\",\n \"locale\": \"\",\n \"reportCount\": 0,\n \"running\": false,\n \"sendNotification\": false,\n \"shareEmailAddress\": [],\n \"title\": \"\"\n },\n \"params\": {\n \"filters\": [\n {\n \"type\": \"\",\n \"value\": \"\"\n }\n ],\n \"groupBys\": [],\n \"includeInviteData\": false,\n \"metrics\": [],\n \"options\": {\n \"includeOnlyTargetedUserLists\": false,\n \"pathQueryOptions\": {\n \"channelGrouping\": {\n \"fallbackName\": \"\",\n \"name\": \"\",\n \"rules\": [\n {\n \"disjunctiveMatchStatements\": [\n {\n \"eventFilters\": [\n {\n \"dimensionFilter\": {\n \"filter\": \"\",\n \"match\": \"\",\n \"values\": []\n }\n }\n ]\n }\n ],\n \"name\": \"\"\n }\n ]\n },\n \"pathFilters\": [\n {\n \"eventFilters\": [\n {}\n ],\n \"pathMatchPosition\": \"\"\n }\n ]\n }\n },\n \"type\": \"\"\n },\n \"queryId\": \"\",\n \"reportDataEndTimeMs\": \"\",\n \"reportDataStartTimeMs\": \"\",\n \"schedule\": {\n \"endTimeMs\": \"\",\n \"frequency\": \"\",\n \"nextRunMinuteOfDay\": 0,\n \"nextRunTimezoneCode\": \"\",\n \"startTimeMs\": \"\"\n },\n \"timezoneCode\": \"\"\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}}/query");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"kind\": \"\",\n \"metadata\": {\n \"dataRange\": \"\",\n \"format\": \"\",\n \"googleCloudStoragePathForLatestReport\": \"\",\n \"googleDrivePathForLatestReport\": \"\",\n \"latestReportRunTimeMs\": \"\",\n \"locale\": \"\",\n \"reportCount\": 0,\n \"running\": false,\n \"sendNotification\": false,\n \"shareEmailAddress\": [],\n \"title\": \"\"\n },\n \"params\": {\n \"filters\": [\n {\n \"type\": \"\",\n \"value\": \"\"\n }\n ],\n \"groupBys\": [],\n \"includeInviteData\": false,\n \"metrics\": [],\n \"options\": {\n \"includeOnlyTargetedUserLists\": false,\n \"pathQueryOptions\": {\n \"channelGrouping\": {\n \"fallbackName\": \"\",\n \"name\": \"\",\n \"rules\": [\n {\n \"disjunctiveMatchStatements\": [\n {\n \"eventFilters\": [\n {\n \"dimensionFilter\": {\n \"filter\": \"\",\n \"match\": \"\",\n \"values\": []\n }\n }\n ]\n }\n ],\n \"name\": \"\"\n }\n ]\n },\n \"pathFilters\": [\n {\n \"eventFilters\": [\n {}\n ],\n \"pathMatchPosition\": \"\"\n }\n ]\n }\n },\n \"type\": \"\"\n },\n \"queryId\": \"\",\n \"reportDataEndTimeMs\": \"\",\n \"reportDataStartTimeMs\": \"\",\n \"schedule\": {\n \"endTimeMs\": \"\",\n \"frequency\": \"\",\n \"nextRunMinuteOfDay\": 0,\n \"nextRunTimezoneCode\": \"\",\n \"startTimeMs\": \"\"\n },\n \"timezoneCode\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/query"
payload := strings.NewReader("{\n \"kind\": \"\",\n \"metadata\": {\n \"dataRange\": \"\",\n \"format\": \"\",\n \"googleCloudStoragePathForLatestReport\": \"\",\n \"googleDrivePathForLatestReport\": \"\",\n \"latestReportRunTimeMs\": \"\",\n \"locale\": \"\",\n \"reportCount\": 0,\n \"running\": false,\n \"sendNotification\": false,\n \"shareEmailAddress\": [],\n \"title\": \"\"\n },\n \"params\": {\n \"filters\": [\n {\n \"type\": \"\",\n \"value\": \"\"\n }\n ],\n \"groupBys\": [],\n \"includeInviteData\": false,\n \"metrics\": [],\n \"options\": {\n \"includeOnlyTargetedUserLists\": false,\n \"pathQueryOptions\": {\n \"channelGrouping\": {\n \"fallbackName\": \"\",\n \"name\": \"\",\n \"rules\": [\n {\n \"disjunctiveMatchStatements\": [\n {\n \"eventFilters\": [\n {\n \"dimensionFilter\": {\n \"filter\": \"\",\n \"match\": \"\",\n \"values\": []\n }\n }\n ]\n }\n ],\n \"name\": \"\"\n }\n ]\n },\n \"pathFilters\": [\n {\n \"eventFilters\": [\n {}\n ],\n \"pathMatchPosition\": \"\"\n }\n ]\n }\n },\n \"type\": \"\"\n },\n \"queryId\": \"\",\n \"reportDataEndTimeMs\": \"\",\n \"reportDataStartTimeMs\": \"\",\n \"schedule\": {\n \"endTimeMs\": \"\",\n \"frequency\": \"\",\n \"nextRunMinuteOfDay\": 0,\n \"nextRunTimezoneCode\": \"\",\n \"startTimeMs\": \"\"\n },\n \"timezoneCode\": \"\"\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/query HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 1585
{
"kind": "",
"metadata": {
"dataRange": "",
"format": "",
"googleCloudStoragePathForLatestReport": "",
"googleDrivePathForLatestReport": "",
"latestReportRunTimeMs": "",
"locale": "",
"reportCount": 0,
"running": false,
"sendNotification": false,
"shareEmailAddress": [],
"title": ""
},
"params": {
"filters": [
{
"type": "",
"value": ""
}
],
"groupBys": [],
"includeInviteData": false,
"metrics": [],
"options": {
"includeOnlyTargetedUserLists": false,
"pathQueryOptions": {
"channelGrouping": {
"fallbackName": "",
"name": "",
"rules": [
{
"disjunctiveMatchStatements": [
{
"eventFilters": [
{
"dimensionFilter": {
"filter": "",
"match": "",
"values": []
}
}
]
}
],
"name": ""
}
]
},
"pathFilters": [
{
"eventFilters": [
{}
],
"pathMatchPosition": ""
}
]
}
},
"type": ""
},
"queryId": "",
"reportDataEndTimeMs": "",
"reportDataStartTimeMs": "",
"schedule": {
"endTimeMs": "",
"frequency": "",
"nextRunMinuteOfDay": 0,
"nextRunTimezoneCode": "",
"startTimeMs": ""
},
"timezoneCode": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/query")
.setHeader("content-type", "application/json")
.setBody("{\n \"kind\": \"\",\n \"metadata\": {\n \"dataRange\": \"\",\n \"format\": \"\",\n \"googleCloudStoragePathForLatestReport\": \"\",\n \"googleDrivePathForLatestReport\": \"\",\n \"latestReportRunTimeMs\": \"\",\n \"locale\": \"\",\n \"reportCount\": 0,\n \"running\": false,\n \"sendNotification\": false,\n \"shareEmailAddress\": [],\n \"title\": \"\"\n },\n \"params\": {\n \"filters\": [\n {\n \"type\": \"\",\n \"value\": \"\"\n }\n ],\n \"groupBys\": [],\n \"includeInviteData\": false,\n \"metrics\": [],\n \"options\": {\n \"includeOnlyTargetedUserLists\": false,\n \"pathQueryOptions\": {\n \"channelGrouping\": {\n \"fallbackName\": \"\",\n \"name\": \"\",\n \"rules\": [\n {\n \"disjunctiveMatchStatements\": [\n {\n \"eventFilters\": [\n {\n \"dimensionFilter\": {\n \"filter\": \"\",\n \"match\": \"\",\n \"values\": []\n }\n }\n ]\n }\n ],\n \"name\": \"\"\n }\n ]\n },\n \"pathFilters\": [\n {\n \"eventFilters\": [\n {}\n ],\n \"pathMatchPosition\": \"\"\n }\n ]\n }\n },\n \"type\": \"\"\n },\n \"queryId\": \"\",\n \"reportDataEndTimeMs\": \"\",\n \"reportDataStartTimeMs\": \"\",\n \"schedule\": {\n \"endTimeMs\": \"\",\n \"frequency\": \"\",\n \"nextRunMinuteOfDay\": 0,\n \"nextRunTimezoneCode\": \"\",\n \"startTimeMs\": \"\"\n },\n \"timezoneCode\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/query"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"kind\": \"\",\n \"metadata\": {\n \"dataRange\": \"\",\n \"format\": \"\",\n \"googleCloudStoragePathForLatestReport\": \"\",\n \"googleDrivePathForLatestReport\": \"\",\n \"latestReportRunTimeMs\": \"\",\n \"locale\": \"\",\n \"reportCount\": 0,\n \"running\": false,\n \"sendNotification\": false,\n \"shareEmailAddress\": [],\n \"title\": \"\"\n },\n \"params\": {\n \"filters\": [\n {\n \"type\": \"\",\n \"value\": \"\"\n }\n ],\n \"groupBys\": [],\n \"includeInviteData\": false,\n \"metrics\": [],\n \"options\": {\n \"includeOnlyTargetedUserLists\": false,\n \"pathQueryOptions\": {\n \"channelGrouping\": {\n \"fallbackName\": \"\",\n \"name\": \"\",\n \"rules\": [\n {\n \"disjunctiveMatchStatements\": [\n {\n \"eventFilters\": [\n {\n \"dimensionFilter\": {\n \"filter\": \"\",\n \"match\": \"\",\n \"values\": []\n }\n }\n ]\n }\n ],\n \"name\": \"\"\n }\n ]\n },\n \"pathFilters\": [\n {\n \"eventFilters\": [\n {}\n ],\n \"pathMatchPosition\": \"\"\n }\n ]\n }\n },\n \"type\": \"\"\n },\n \"queryId\": \"\",\n \"reportDataEndTimeMs\": \"\",\n \"reportDataStartTimeMs\": \"\",\n \"schedule\": {\n \"endTimeMs\": \"\",\n \"frequency\": \"\",\n \"nextRunMinuteOfDay\": 0,\n \"nextRunTimezoneCode\": \"\",\n \"startTimeMs\": \"\"\n },\n \"timezoneCode\": \"\"\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 \"kind\": \"\",\n \"metadata\": {\n \"dataRange\": \"\",\n \"format\": \"\",\n \"googleCloudStoragePathForLatestReport\": \"\",\n \"googleDrivePathForLatestReport\": \"\",\n \"latestReportRunTimeMs\": \"\",\n \"locale\": \"\",\n \"reportCount\": 0,\n \"running\": false,\n \"sendNotification\": false,\n \"shareEmailAddress\": [],\n \"title\": \"\"\n },\n \"params\": {\n \"filters\": [\n {\n \"type\": \"\",\n \"value\": \"\"\n }\n ],\n \"groupBys\": [],\n \"includeInviteData\": false,\n \"metrics\": [],\n \"options\": {\n \"includeOnlyTargetedUserLists\": false,\n \"pathQueryOptions\": {\n \"channelGrouping\": {\n \"fallbackName\": \"\",\n \"name\": \"\",\n \"rules\": [\n {\n \"disjunctiveMatchStatements\": [\n {\n \"eventFilters\": [\n {\n \"dimensionFilter\": {\n \"filter\": \"\",\n \"match\": \"\",\n \"values\": []\n }\n }\n ]\n }\n ],\n \"name\": \"\"\n }\n ]\n },\n \"pathFilters\": [\n {\n \"eventFilters\": [\n {}\n ],\n \"pathMatchPosition\": \"\"\n }\n ]\n }\n },\n \"type\": \"\"\n },\n \"queryId\": \"\",\n \"reportDataEndTimeMs\": \"\",\n \"reportDataStartTimeMs\": \"\",\n \"schedule\": {\n \"endTimeMs\": \"\",\n \"frequency\": \"\",\n \"nextRunMinuteOfDay\": 0,\n \"nextRunTimezoneCode\": \"\",\n \"startTimeMs\": \"\"\n },\n \"timezoneCode\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/query")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/query")
.header("content-type", "application/json")
.body("{\n \"kind\": \"\",\n \"metadata\": {\n \"dataRange\": \"\",\n \"format\": \"\",\n \"googleCloudStoragePathForLatestReport\": \"\",\n \"googleDrivePathForLatestReport\": \"\",\n \"latestReportRunTimeMs\": \"\",\n \"locale\": \"\",\n \"reportCount\": 0,\n \"running\": false,\n \"sendNotification\": false,\n \"shareEmailAddress\": [],\n \"title\": \"\"\n },\n \"params\": {\n \"filters\": [\n {\n \"type\": \"\",\n \"value\": \"\"\n }\n ],\n \"groupBys\": [],\n \"includeInviteData\": false,\n \"metrics\": [],\n \"options\": {\n \"includeOnlyTargetedUserLists\": false,\n \"pathQueryOptions\": {\n \"channelGrouping\": {\n \"fallbackName\": \"\",\n \"name\": \"\",\n \"rules\": [\n {\n \"disjunctiveMatchStatements\": [\n {\n \"eventFilters\": [\n {\n \"dimensionFilter\": {\n \"filter\": \"\",\n \"match\": \"\",\n \"values\": []\n }\n }\n ]\n }\n ],\n \"name\": \"\"\n }\n ]\n },\n \"pathFilters\": [\n {\n \"eventFilters\": [\n {}\n ],\n \"pathMatchPosition\": \"\"\n }\n ]\n }\n },\n \"type\": \"\"\n },\n \"queryId\": \"\",\n \"reportDataEndTimeMs\": \"\",\n \"reportDataStartTimeMs\": \"\",\n \"schedule\": {\n \"endTimeMs\": \"\",\n \"frequency\": \"\",\n \"nextRunMinuteOfDay\": 0,\n \"nextRunTimezoneCode\": \"\",\n \"startTimeMs\": \"\"\n },\n \"timezoneCode\": \"\"\n}")
.asString();
const data = JSON.stringify({
kind: '',
metadata: {
dataRange: '',
format: '',
googleCloudStoragePathForLatestReport: '',
googleDrivePathForLatestReport: '',
latestReportRunTimeMs: '',
locale: '',
reportCount: 0,
running: false,
sendNotification: false,
shareEmailAddress: [],
title: ''
},
params: {
filters: [
{
type: '',
value: ''
}
],
groupBys: [],
includeInviteData: false,
metrics: [],
options: {
includeOnlyTargetedUserLists: false,
pathQueryOptions: {
channelGrouping: {
fallbackName: '',
name: '',
rules: [
{
disjunctiveMatchStatements: [
{
eventFilters: [
{
dimensionFilter: {
filter: '',
match: '',
values: []
}
}
]
}
],
name: ''
}
]
},
pathFilters: [
{
eventFilters: [
{}
],
pathMatchPosition: ''
}
]
}
},
type: ''
},
queryId: '',
reportDataEndTimeMs: '',
reportDataStartTimeMs: '',
schedule: {
endTimeMs: '',
frequency: '',
nextRunMinuteOfDay: 0,
nextRunTimezoneCode: '',
startTimeMs: ''
},
timezoneCode: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/query');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/query',
headers: {'content-type': 'application/json'},
data: {
kind: '',
metadata: {
dataRange: '',
format: '',
googleCloudStoragePathForLatestReport: '',
googleDrivePathForLatestReport: '',
latestReportRunTimeMs: '',
locale: '',
reportCount: 0,
running: false,
sendNotification: false,
shareEmailAddress: [],
title: ''
},
params: {
filters: [{type: '', value: ''}],
groupBys: [],
includeInviteData: false,
metrics: [],
options: {
includeOnlyTargetedUserLists: false,
pathQueryOptions: {
channelGrouping: {
fallbackName: '',
name: '',
rules: [
{
disjunctiveMatchStatements: [{eventFilters: [{dimensionFilter: {filter: '', match: '', values: []}}]}],
name: ''
}
]
},
pathFilters: [{eventFilters: [{}], pathMatchPosition: ''}]
}
},
type: ''
},
queryId: '',
reportDataEndTimeMs: '',
reportDataStartTimeMs: '',
schedule: {
endTimeMs: '',
frequency: '',
nextRunMinuteOfDay: 0,
nextRunTimezoneCode: '',
startTimeMs: ''
},
timezoneCode: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/query';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"kind":"","metadata":{"dataRange":"","format":"","googleCloudStoragePathForLatestReport":"","googleDrivePathForLatestReport":"","latestReportRunTimeMs":"","locale":"","reportCount":0,"running":false,"sendNotification":false,"shareEmailAddress":[],"title":""},"params":{"filters":[{"type":"","value":""}],"groupBys":[],"includeInviteData":false,"metrics":[],"options":{"includeOnlyTargetedUserLists":false,"pathQueryOptions":{"channelGrouping":{"fallbackName":"","name":"","rules":[{"disjunctiveMatchStatements":[{"eventFilters":[{"dimensionFilter":{"filter":"","match":"","values":[]}}]}],"name":""}]},"pathFilters":[{"eventFilters":[{}],"pathMatchPosition":""}]}},"type":""},"queryId":"","reportDataEndTimeMs":"","reportDataStartTimeMs":"","schedule":{"endTimeMs":"","frequency":"","nextRunMinuteOfDay":0,"nextRunTimezoneCode":"","startTimeMs":""},"timezoneCode":""}'
};
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}}/query',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "kind": "",\n "metadata": {\n "dataRange": "",\n "format": "",\n "googleCloudStoragePathForLatestReport": "",\n "googleDrivePathForLatestReport": "",\n "latestReportRunTimeMs": "",\n "locale": "",\n "reportCount": 0,\n "running": false,\n "sendNotification": false,\n "shareEmailAddress": [],\n "title": ""\n },\n "params": {\n "filters": [\n {\n "type": "",\n "value": ""\n }\n ],\n "groupBys": [],\n "includeInviteData": false,\n "metrics": [],\n "options": {\n "includeOnlyTargetedUserLists": false,\n "pathQueryOptions": {\n "channelGrouping": {\n "fallbackName": "",\n "name": "",\n "rules": [\n {\n "disjunctiveMatchStatements": [\n {\n "eventFilters": [\n {\n "dimensionFilter": {\n "filter": "",\n "match": "",\n "values": []\n }\n }\n ]\n }\n ],\n "name": ""\n }\n ]\n },\n "pathFilters": [\n {\n "eventFilters": [\n {}\n ],\n "pathMatchPosition": ""\n }\n ]\n }\n },\n "type": ""\n },\n "queryId": "",\n "reportDataEndTimeMs": "",\n "reportDataStartTimeMs": "",\n "schedule": {\n "endTimeMs": "",\n "frequency": "",\n "nextRunMinuteOfDay": 0,\n "nextRunTimezoneCode": "",\n "startTimeMs": ""\n },\n "timezoneCode": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"kind\": \"\",\n \"metadata\": {\n \"dataRange\": \"\",\n \"format\": \"\",\n \"googleCloudStoragePathForLatestReport\": \"\",\n \"googleDrivePathForLatestReport\": \"\",\n \"latestReportRunTimeMs\": \"\",\n \"locale\": \"\",\n \"reportCount\": 0,\n \"running\": false,\n \"sendNotification\": false,\n \"shareEmailAddress\": [],\n \"title\": \"\"\n },\n \"params\": {\n \"filters\": [\n {\n \"type\": \"\",\n \"value\": \"\"\n }\n ],\n \"groupBys\": [],\n \"includeInviteData\": false,\n \"metrics\": [],\n \"options\": {\n \"includeOnlyTargetedUserLists\": false,\n \"pathQueryOptions\": {\n \"channelGrouping\": {\n \"fallbackName\": \"\",\n \"name\": \"\",\n \"rules\": [\n {\n \"disjunctiveMatchStatements\": [\n {\n \"eventFilters\": [\n {\n \"dimensionFilter\": {\n \"filter\": \"\",\n \"match\": \"\",\n \"values\": []\n }\n }\n ]\n }\n ],\n \"name\": \"\"\n }\n ]\n },\n \"pathFilters\": [\n {\n \"eventFilters\": [\n {}\n ],\n \"pathMatchPosition\": \"\"\n }\n ]\n }\n },\n \"type\": \"\"\n },\n \"queryId\": \"\",\n \"reportDataEndTimeMs\": \"\",\n \"reportDataStartTimeMs\": \"\",\n \"schedule\": {\n \"endTimeMs\": \"\",\n \"frequency\": \"\",\n \"nextRunMinuteOfDay\": 0,\n \"nextRunTimezoneCode\": \"\",\n \"startTimeMs\": \"\"\n },\n \"timezoneCode\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/query")
.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/query',
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({
kind: '',
metadata: {
dataRange: '',
format: '',
googleCloudStoragePathForLatestReport: '',
googleDrivePathForLatestReport: '',
latestReportRunTimeMs: '',
locale: '',
reportCount: 0,
running: false,
sendNotification: false,
shareEmailAddress: [],
title: ''
},
params: {
filters: [{type: '', value: ''}],
groupBys: [],
includeInviteData: false,
metrics: [],
options: {
includeOnlyTargetedUserLists: false,
pathQueryOptions: {
channelGrouping: {
fallbackName: '',
name: '',
rules: [
{
disjunctiveMatchStatements: [{eventFilters: [{dimensionFilter: {filter: '', match: '', values: []}}]}],
name: ''
}
]
},
pathFilters: [{eventFilters: [{}], pathMatchPosition: ''}]
}
},
type: ''
},
queryId: '',
reportDataEndTimeMs: '',
reportDataStartTimeMs: '',
schedule: {
endTimeMs: '',
frequency: '',
nextRunMinuteOfDay: 0,
nextRunTimezoneCode: '',
startTimeMs: ''
},
timezoneCode: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/query',
headers: {'content-type': 'application/json'},
body: {
kind: '',
metadata: {
dataRange: '',
format: '',
googleCloudStoragePathForLatestReport: '',
googleDrivePathForLatestReport: '',
latestReportRunTimeMs: '',
locale: '',
reportCount: 0,
running: false,
sendNotification: false,
shareEmailAddress: [],
title: ''
},
params: {
filters: [{type: '', value: ''}],
groupBys: [],
includeInviteData: false,
metrics: [],
options: {
includeOnlyTargetedUserLists: false,
pathQueryOptions: {
channelGrouping: {
fallbackName: '',
name: '',
rules: [
{
disjunctiveMatchStatements: [{eventFilters: [{dimensionFilter: {filter: '', match: '', values: []}}]}],
name: ''
}
]
},
pathFilters: [{eventFilters: [{}], pathMatchPosition: ''}]
}
},
type: ''
},
queryId: '',
reportDataEndTimeMs: '',
reportDataStartTimeMs: '',
schedule: {
endTimeMs: '',
frequency: '',
nextRunMinuteOfDay: 0,
nextRunTimezoneCode: '',
startTimeMs: ''
},
timezoneCode: ''
},
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}}/query');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
kind: '',
metadata: {
dataRange: '',
format: '',
googleCloudStoragePathForLatestReport: '',
googleDrivePathForLatestReport: '',
latestReportRunTimeMs: '',
locale: '',
reportCount: 0,
running: false,
sendNotification: false,
shareEmailAddress: [],
title: ''
},
params: {
filters: [
{
type: '',
value: ''
}
],
groupBys: [],
includeInviteData: false,
metrics: [],
options: {
includeOnlyTargetedUserLists: false,
pathQueryOptions: {
channelGrouping: {
fallbackName: '',
name: '',
rules: [
{
disjunctiveMatchStatements: [
{
eventFilters: [
{
dimensionFilter: {
filter: '',
match: '',
values: []
}
}
]
}
],
name: ''
}
]
},
pathFilters: [
{
eventFilters: [
{}
],
pathMatchPosition: ''
}
]
}
},
type: ''
},
queryId: '',
reportDataEndTimeMs: '',
reportDataStartTimeMs: '',
schedule: {
endTimeMs: '',
frequency: '',
nextRunMinuteOfDay: 0,
nextRunTimezoneCode: '',
startTimeMs: ''
},
timezoneCode: ''
});
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}}/query',
headers: {'content-type': 'application/json'},
data: {
kind: '',
metadata: {
dataRange: '',
format: '',
googleCloudStoragePathForLatestReport: '',
googleDrivePathForLatestReport: '',
latestReportRunTimeMs: '',
locale: '',
reportCount: 0,
running: false,
sendNotification: false,
shareEmailAddress: [],
title: ''
},
params: {
filters: [{type: '', value: ''}],
groupBys: [],
includeInviteData: false,
metrics: [],
options: {
includeOnlyTargetedUserLists: false,
pathQueryOptions: {
channelGrouping: {
fallbackName: '',
name: '',
rules: [
{
disjunctiveMatchStatements: [{eventFilters: [{dimensionFilter: {filter: '', match: '', values: []}}]}],
name: ''
}
]
},
pathFilters: [{eventFilters: [{}], pathMatchPosition: ''}]
}
},
type: ''
},
queryId: '',
reportDataEndTimeMs: '',
reportDataStartTimeMs: '',
schedule: {
endTimeMs: '',
frequency: '',
nextRunMinuteOfDay: 0,
nextRunTimezoneCode: '',
startTimeMs: ''
},
timezoneCode: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/query';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"kind":"","metadata":{"dataRange":"","format":"","googleCloudStoragePathForLatestReport":"","googleDrivePathForLatestReport":"","latestReportRunTimeMs":"","locale":"","reportCount":0,"running":false,"sendNotification":false,"shareEmailAddress":[],"title":""},"params":{"filters":[{"type":"","value":""}],"groupBys":[],"includeInviteData":false,"metrics":[],"options":{"includeOnlyTargetedUserLists":false,"pathQueryOptions":{"channelGrouping":{"fallbackName":"","name":"","rules":[{"disjunctiveMatchStatements":[{"eventFilters":[{"dimensionFilter":{"filter":"","match":"","values":[]}}]}],"name":""}]},"pathFilters":[{"eventFilters":[{}],"pathMatchPosition":""}]}},"type":""},"queryId":"","reportDataEndTimeMs":"","reportDataStartTimeMs":"","schedule":{"endTimeMs":"","frequency":"","nextRunMinuteOfDay":0,"nextRunTimezoneCode":"","startTimeMs":""},"timezoneCode":""}'
};
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 = @{ @"kind": @"",
@"metadata": @{ @"dataRange": @"", @"format": @"", @"googleCloudStoragePathForLatestReport": @"", @"googleDrivePathForLatestReport": @"", @"latestReportRunTimeMs": @"", @"locale": @"", @"reportCount": @0, @"running": @NO, @"sendNotification": @NO, @"shareEmailAddress": @[ ], @"title": @"" },
@"params": @{ @"filters": @[ @{ @"type": @"", @"value": @"" } ], @"groupBys": @[ ], @"includeInviteData": @NO, @"metrics": @[ ], @"options": @{ @"includeOnlyTargetedUserLists": @NO, @"pathQueryOptions": @{ @"channelGrouping": @{ @"fallbackName": @"", @"name": @"", @"rules": @[ @{ @"disjunctiveMatchStatements": @[ @{ @"eventFilters": @[ @{ @"dimensionFilter": @{ @"filter": @"", @"match": @"", @"values": @[ ] } } ] } ], @"name": @"" } ] }, @"pathFilters": @[ @{ @"eventFilters": @[ @{ } ], @"pathMatchPosition": @"" } ] } }, @"type": @"" },
@"queryId": @"",
@"reportDataEndTimeMs": @"",
@"reportDataStartTimeMs": @"",
@"schedule": @{ @"endTimeMs": @"", @"frequency": @"", @"nextRunMinuteOfDay": @0, @"nextRunTimezoneCode": @"", @"startTimeMs": @"" },
@"timezoneCode": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/query"]
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}}/query" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"kind\": \"\",\n \"metadata\": {\n \"dataRange\": \"\",\n \"format\": \"\",\n \"googleCloudStoragePathForLatestReport\": \"\",\n \"googleDrivePathForLatestReport\": \"\",\n \"latestReportRunTimeMs\": \"\",\n \"locale\": \"\",\n \"reportCount\": 0,\n \"running\": false,\n \"sendNotification\": false,\n \"shareEmailAddress\": [],\n \"title\": \"\"\n },\n \"params\": {\n \"filters\": [\n {\n \"type\": \"\",\n \"value\": \"\"\n }\n ],\n \"groupBys\": [],\n \"includeInviteData\": false,\n \"metrics\": [],\n \"options\": {\n \"includeOnlyTargetedUserLists\": false,\n \"pathQueryOptions\": {\n \"channelGrouping\": {\n \"fallbackName\": \"\",\n \"name\": \"\",\n \"rules\": [\n {\n \"disjunctiveMatchStatements\": [\n {\n \"eventFilters\": [\n {\n \"dimensionFilter\": {\n \"filter\": \"\",\n \"match\": \"\",\n \"values\": []\n }\n }\n ]\n }\n ],\n \"name\": \"\"\n }\n ]\n },\n \"pathFilters\": [\n {\n \"eventFilters\": [\n {}\n ],\n \"pathMatchPosition\": \"\"\n }\n ]\n }\n },\n \"type\": \"\"\n },\n \"queryId\": \"\",\n \"reportDataEndTimeMs\": \"\",\n \"reportDataStartTimeMs\": \"\",\n \"schedule\": {\n \"endTimeMs\": \"\",\n \"frequency\": \"\",\n \"nextRunMinuteOfDay\": 0,\n \"nextRunTimezoneCode\": \"\",\n \"startTimeMs\": \"\"\n },\n \"timezoneCode\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/query",
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([
'kind' => '',
'metadata' => [
'dataRange' => '',
'format' => '',
'googleCloudStoragePathForLatestReport' => '',
'googleDrivePathForLatestReport' => '',
'latestReportRunTimeMs' => '',
'locale' => '',
'reportCount' => 0,
'running' => null,
'sendNotification' => null,
'shareEmailAddress' => [
],
'title' => ''
],
'params' => [
'filters' => [
[
'type' => '',
'value' => ''
]
],
'groupBys' => [
],
'includeInviteData' => null,
'metrics' => [
],
'options' => [
'includeOnlyTargetedUserLists' => null,
'pathQueryOptions' => [
'channelGrouping' => [
'fallbackName' => '',
'name' => '',
'rules' => [
[
'disjunctiveMatchStatements' => [
[
'eventFilters' => [
[
'dimensionFilter' => [
'filter' => '',
'match' => '',
'values' => [
]
]
]
]
]
],
'name' => ''
]
]
],
'pathFilters' => [
[
'eventFilters' => [
[
]
],
'pathMatchPosition' => ''
]
]
]
],
'type' => ''
],
'queryId' => '',
'reportDataEndTimeMs' => '',
'reportDataStartTimeMs' => '',
'schedule' => [
'endTimeMs' => '',
'frequency' => '',
'nextRunMinuteOfDay' => 0,
'nextRunTimezoneCode' => '',
'startTimeMs' => ''
],
'timezoneCode' => ''
]),
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}}/query', [
'body' => '{
"kind": "",
"metadata": {
"dataRange": "",
"format": "",
"googleCloudStoragePathForLatestReport": "",
"googleDrivePathForLatestReport": "",
"latestReportRunTimeMs": "",
"locale": "",
"reportCount": 0,
"running": false,
"sendNotification": false,
"shareEmailAddress": [],
"title": ""
},
"params": {
"filters": [
{
"type": "",
"value": ""
}
],
"groupBys": [],
"includeInviteData": false,
"metrics": [],
"options": {
"includeOnlyTargetedUserLists": false,
"pathQueryOptions": {
"channelGrouping": {
"fallbackName": "",
"name": "",
"rules": [
{
"disjunctiveMatchStatements": [
{
"eventFilters": [
{
"dimensionFilter": {
"filter": "",
"match": "",
"values": []
}
}
]
}
],
"name": ""
}
]
},
"pathFilters": [
{
"eventFilters": [
{}
],
"pathMatchPosition": ""
}
]
}
},
"type": ""
},
"queryId": "",
"reportDataEndTimeMs": "",
"reportDataStartTimeMs": "",
"schedule": {
"endTimeMs": "",
"frequency": "",
"nextRunMinuteOfDay": 0,
"nextRunTimezoneCode": "",
"startTimeMs": ""
},
"timezoneCode": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/query');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'kind' => '',
'metadata' => [
'dataRange' => '',
'format' => '',
'googleCloudStoragePathForLatestReport' => '',
'googleDrivePathForLatestReport' => '',
'latestReportRunTimeMs' => '',
'locale' => '',
'reportCount' => 0,
'running' => null,
'sendNotification' => null,
'shareEmailAddress' => [
],
'title' => ''
],
'params' => [
'filters' => [
[
'type' => '',
'value' => ''
]
],
'groupBys' => [
],
'includeInviteData' => null,
'metrics' => [
],
'options' => [
'includeOnlyTargetedUserLists' => null,
'pathQueryOptions' => [
'channelGrouping' => [
'fallbackName' => '',
'name' => '',
'rules' => [
[
'disjunctiveMatchStatements' => [
[
'eventFilters' => [
[
'dimensionFilter' => [
'filter' => '',
'match' => '',
'values' => [
]
]
]
]
]
],
'name' => ''
]
]
],
'pathFilters' => [
[
'eventFilters' => [
[
]
],
'pathMatchPosition' => ''
]
]
]
],
'type' => ''
],
'queryId' => '',
'reportDataEndTimeMs' => '',
'reportDataStartTimeMs' => '',
'schedule' => [
'endTimeMs' => '',
'frequency' => '',
'nextRunMinuteOfDay' => 0,
'nextRunTimezoneCode' => '',
'startTimeMs' => ''
],
'timezoneCode' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'kind' => '',
'metadata' => [
'dataRange' => '',
'format' => '',
'googleCloudStoragePathForLatestReport' => '',
'googleDrivePathForLatestReport' => '',
'latestReportRunTimeMs' => '',
'locale' => '',
'reportCount' => 0,
'running' => null,
'sendNotification' => null,
'shareEmailAddress' => [
],
'title' => ''
],
'params' => [
'filters' => [
[
'type' => '',
'value' => ''
]
],
'groupBys' => [
],
'includeInviteData' => null,
'metrics' => [
],
'options' => [
'includeOnlyTargetedUserLists' => null,
'pathQueryOptions' => [
'channelGrouping' => [
'fallbackName' => '',
'name' => '',
'rules' => [
[
'disjunctiveMatchStatements' => [
[
'eventFilters' => [
[
'dimensionFilter' => [
'filter' => '',
'match' => '',
'values' => [
]
]
]
]
]
],
'name' => ''
]
]
],
'pathFilters' => [
[
'eventFilters' => [
[
]
],
'pathMatchPosition' => ''
]
]
]
],
'type' => ''
],
'queryId' => '',
'reportDataEndTimeMs' => '',
'reportDataStartTimeMs' => '',
'schedule' => [
'endTimeMs' => '',
'frequency' => '',
'nextRunMinuteOfDay' => 0,
'nextRunTimezoneCode' => '',
'startTimeMs' => ''
],
'timezoneCode' => ''
]));
$request->setRequestUrl('{{baseUrl}}/query');
$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}}/query' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"kind": "",
"metadata": {
"dataRange": "",
"format": "",
"googleCloudStoragePathForLatestReport": "",
"googleDrivePathForLatestReport": "",
"latestReportRunTimeMs": "",
"locale": "",
"reportCount": 0,
"running": false,
"sendNotification": false,
"shareEmailAddress": [],
"title": ""
},
"params": {
"filters": [
{
"type": "",
"value": ""
}
],
"groupBys": [],
"includeInviteData": false,
"metrics": [],
"options": {
"includeOnlyTargetedUserLists": false,
"pathQueryOptions": {
"channelGrouping": {
"fallbackName": "",
"name": "",
"rules": [
{
"disjunctiveMatchStatements": [
{
"eventFilters": [
{
"dimensionFilter": {
"filter": "",
"match": "",
"values": []
}
}
]
}
],
"name": ""
}
]
},
"pathFilters": [
{
"eventFilters": [
{}
],
"pathMatchPosition": ""
}
]
}
},
"type": ""
},
"queryId": "",
"reportDataEndTimeMs": "",
"reportDataStartTimeMs": "",
"schedule": {
"endTimeMs": "",
"frequency": "",
"nextRunMinuteOfDay": 0,
"nextRunTimezoneCode": "",
"startTimeMs": ""
},
"timezoneCode": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/query' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"kind": "",
"metadata": {
"dataRange": "",
"format": "",
"googleCloudStoragePathForLatestReport": "",
"googleDrivePathForLatestReport": "",
"latestReportRunTimeMs": "",
"locale": "",
"reportCount": 0,
"running": false,
"sendNotification": false,
"shareEmailAddress": [],
"title": ""
},
"params": {
"filters": [
{
"type": "",
"value": ""
}
],
"groupBys": [],
"includeInviteData": false,
"metrics": [],
"options": {
"includeOnlyTargetedUserLists": false,
"pathQueryOptions": {
"channelGrouping": {
"fallbackName": "",
"name": "",
"rules": [
{
"disjunctiveMatchStatements": [
{
"eventFilters": [
{
"dimensionFilter": {
"filter": "",
"match": "",
"values": []
}
}
]
}
],
"name": ""
}
]
},
"pathFilters": [
{
"eventFilters": [
{}
],
"pathMatchPosition": ""
}
]
}
},
"type": ""
},
"queryId": "",
"reportDataEndTimeMs": "",
"reportDataStartTimeMs": "",
"schedule": {
"endTimeMs": "",
"frequency": "",
"nextRunMinuteOfDay": 0,
"nextRunTimezoneCode": "",
"startTimeMs": ""
},
"timezoneCode": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"kind\": \"\",\n \"metadata\": {\n \"dataRange\": \"\",\n \"format\": \"\",\n \"googleCloudStoragePathForLatestReport\": \"\",\n \"googleDrivePathForLatestReport\": \"\",\n \"latestReportRunTimeMs\": \"\",\n \"locale\": \"\",\n \"reportCount\": 0,\n \"running\": false,\n \"sendNotification\": false,\n \"shareEmailAddress\": [],\n \"title\": \"\"\n },\n \"params\": {\n \"filters\": [\n {\n \"type\": \"\",\n \"value\": \"\"\n }\n ],\n \"groupBys\": [],\n \"includeInviteData\": false,\n \"metrics\": [],\n \"options\": {\n \"includeOnlyTargetedUserLists\": false,\n \"pathQueryOptions\": {\n \"channelGrouping\": {\n \"fallbackName\": \"\",\n \"name\": \"\",\n \"rules\": [\n {\n \"disjunctiveMatchStatements\": [\n {\n \"eventFilters\": [\n {\n \"dimensionFilter\": {\n \"filter\": \"\",\n \"match\": \"\",\n \"values\": []\n }\n }\n ]\n }\n ],\n \"name\": \"\"\n }\n ]\n },\n \"pathFilters\": [\n {\n \"eventFilters\": [\n {}\n ],\n \"pathMatchPosition\": \"\"\n }\n ]\n }\n },\n \"type\": \"\"\n },\n \"queryId\": \"\",\n \"reportDataEndTimeMs\": \"\",\n \"reportDataStartTimeMs\": \"\",\n \"schedule\": {\n \"endTimeMs\": \"\",\n \"frequency\": \"\",\n \"nextRunMinuteOfDay\": 0,\n \"nextRunTimezoneCode\": \"\",\n \"startTimeMs\": \"\"\n },\n \"timezoneCode\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/query", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/query"
payload = {
"kind": "",
"metadata": {
"dataRange": "",
"format": "",
"googleCloudStoragePathForLatestReport": "",
"googleDrivePathForLatestReport": "",
"latestReportRunTimeMs": "",
"locale": "",
"reportCount": 0,
"running": False,
"sendNotification": False,
"shareEmailAddress": [],
"title": ""
},
"params": {
"filters": [
{
"type": "",
"value": ""
}
],
"groupBys": [],
"includeInviteData": False,
"metrics": [],
"options": {
"includeOnlyTargetedUserLists": False,
"pathQueryOptions": {
"channelGrouping": {
"fallbackName": "",
"name": "",
"rules": [
{
"disjunctiveMatchStatements": [{ "eventFilters": [{ "dimensionFilter": {
"filter": "",
"match": "",
"values": []
} }] }],
"name": ""
}
]
},
"pathFilters": [
{
"eventFilters": [{}],
"pathMatchPosition": ""
}
]
}
},
"type": ""
},
"queryId": "",
"reportDataEndTimeMs": "",
"reportDataStartTimeMs": "",
"schedule": {
"endTimeMs": "",
"frequency": "",
"nextRunMinuteOfDay": 0,
"nextRunTimezoneCode": "",
"startTimeMs": ""
},
"timezoneCode": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/query"
payload <- "{\n \"kind\": \"\",\n \"metadata\": {\n \"dataRange\": \"\",\n \"format\": \"\",\n \"googleCloudStoragePathForLatestReport\": \"\",\n \"googleDrivePathForLatestReport\": \"\",\n \"latestReportRunTimeMs\": \"\",\n \"locale\": \"\",\n \"reportCount\": 0,\n \"running\": false,\n \"sendNotification\": false,\n \"shareEmailAddress\": [],\n \"title\": \"\"\n },\n \"params\": {\n \"filters\": [\n {\n \"type\": \"\",\n \"value\": \"\"\n }\n ],\n \"groupBys\": [],\n \"includeInviteData\": false,\n \"metrics\": [],\n \"options\": {\n \"includeOnlyTargetedUserLists\": false,\n \"pathQueryOptions\": {\n \"channelGrouping\": {\n \"fallbackName\": \"\",\n \"name\": \"\",\n \"rules\": [\n {\n \"disjunctiveMatchStatements\": [\n {\n \"eventFilters\": [\n {\n \"dimensionFilter\": {\n \"filter\": \"\",\n \"match\": \"\",\n \"values\": []\n }\n }\n ]\n }\n ],\n \"name\": \"\"\n }\n ]\n },\n \"pathFilters\": [\n {\n \"eventFilters\": [\n {}\n ],\n \"pathMatchPosition\": \"\"\n }\n ]\n }\n },\n \"type\": \"\"\n },\n \"queryId\": \"\",\n \"reportDataEndTimeMs\": \"\",\n \"reportDataStartTimeMs\": \"\",\n \"schedule\": {\n \"endTimeMs\": \"\",\n \"frequency\": \"\",\n \"nextRunMinuteOfDay\": 0,\n \"nextRunTimezoneCode\": \"\",\n \"startTimeMs\": \"\"\n },\n \"timezoneCode\": \"\"\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}}/query")
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 \"kind\": \"\",\n \"metadata\": {\n \"dataRange\": \"\",\n \"format\": \"\",\n \"googleCloudStoragePathForLatestReport\": \"\",\n \"googleDrivePathForLatestReport\": \"\",\n \"latestReportRunTimeMs\": \"\",\n \"locale\": \"\",\n \"reportCount\": 0,\n \"running\": false,\n \"sendNotification\": false,\n \"shareEmailAddress\": [],\n \"title\": \"\"\n },\n \"params\": {\n \"filters\": [\n {\n \"type\": \"\",\n \"value\": \"\"\n }\n ],\n \"groupBys\": [],\n \"includeInviteData\": false,\n \"metrics\": [],\n \"options\": {\n \"includeOnlyTargetedUserLists\": false,\n \"pathQueryOptions\": {\n \"channelGrouping\": {\n \"fallbackName\": \"\",\n \"name\": \"\",\n \"rules\": [\n {\n \"disjunctiveMatchStatements\": [\n {\n \"eventFilters\": [\n {\n \"dimensionFilter\": {\n \"filter\": \"\",\n \"match\": \"\",\n \"values\": []\n }\n }\n ]\n }\n ],\n \"name\": \"\"\n }\n ]\n },\n \"pathFilters\": [\n {\n \"eventFilters\": [\n {}\n ],\n \"pathMatchPosition\": \"\"\n }\n ]\n }\n },\n \"type\": \"\"\n },\n \"queryId\": \"\",\n \"reportDataEndTimeMs\": \"\",\n \"reportDataStartTimeMs\": \"\",\n \"schedule\": {\n \"endTimeMs\": \"\",\n \"frequency\": \"\",\n \"nextRunMinuteOfDay\": 0,\n \"nextRunTimezoneCode\": \"\",\n \"startTimeMs\": \"\"\n },\n \"timezoneCode\": \"\"\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/query') do |req|
req.body = "{\n \"kind\": \"\",\n \"metadata\": {\n \"dataRange\": \"\",\n \"format\": \"\",\n \"googleCloudStoragePathForLatestReport\": \"\",\n \"googleDrivePathForLatestReport\": \"\",\n \"latestReportRunTimeMs\": \"\",\n \"locale\": \"\",\n \"reportCount\": 0,\n \"running\": false,\n \"sendNotification\": false,\n \"shareEmailAddress\": [],\n \"title\": \"\"\n },\n \"params\": {\n \"filters\": [\n {\n \"type\": \"\",\n \"value\": \"\"\n }\n ],\n \"groupBys\": [],\n \"includeInviteData\": false,\n \"metrics\": [],\n \"options\": {\n \"includeOnlyTargetedUserLists\": false,\n \"pathQueryOptions\": {\n \"channelGrouping\": {\n \"fallbackName\": \"\",\n \"name\": \"\",\n \"rules\": [\n {\n \"disjunctiveMatchStatements\": [\n {\n \"eventFilters\": [\n {\n \"dimensionFilter\": {\n \"filter\": \"\",\n \"match\": \"\",\n \"values\": []\n }\n }\n ]\n }\n ],\n \"name\": \"\"\n }\n ]\n },\n \"pathFilters\": [\n {\n \"eventFilters\": [\n {}\n ],\n \"pathMatchPosition\": \"\"\n }\n ]\n }\n },\n \"type\": \"\"\n },\n \"queryId\": \"\",\n \"reportDataEndTimeMs\": \"\",\n \"reportDataStartTimeMs\": \"\",\n \"schedule\": {\n \"endTimeMs\": \"\",\n \"frequency\": \"\",\n \"nextRunMinuteOfDay\": 0,\n \"nextRunTimezoneCode\": \"\",\n \"startTimeMs\": \"\"\n },\n \"timezoneCode\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/query";
let payload = json!({
"kind": "",
"metadata": json!({
"dataRange": "",
"format": "",
"googleCloudStoragePathForLatestReport": "",
"googleDrivePathForLatestReport": "",
"latestReportRunTimeMs": "",
"locale": "",
"reportCount": 0,
"running": false,
"sendNotification": false,
"shareEmailAddress": (),
"title": ""
}),
"params": json!({
"filters": (
json!({
"type": "",
"value": ""
})
),
"groupBys": (),
"includeInviteData": false,
"metrics": (),
"options": json!({
"includeOnlyTargetedUserLists": false,
"pathQueryOptions": json!({
"channelGrouping": json!({
"fallbackName": "",
"name": "",
"rules": (
json!({
"disjunctiveMatchStatements": (json!({"eventFilters": (json!({"dimensionFilter": json!({
"filter": "",
"match": "",
"values": ()
})}))})),
"name": ""
})
)
}),
"pathFilters": (
json!({
"eventFilters": (json!({})),
"pathMatchPosition": ""
})
)
})
}),
"type": ""
}),
"queryId": "",
"reportDataEndTimeMs": "",
"reportDataStartTimeMs": "",
"schedule": json!({
"endTimeMs": "",
"frequency": "",
"nextRunMinuteOfDay": 0,
"nextRunTimezoneCode": "",
"startTimeMs": ""
}),
"timezoneCode": ""
});
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}}/query \
--header 'content-type: application/json' \
--data '{
"kind": "",
"metadata": {
"dataRange": "",
"format": "",
"googleCloudStoragePathForLatestReport": "",
"googleDrivePathForLatestReport": "",
"latestReportRunTimeMs": "",
"locale": "",
"reportCount": 0,
"running": false,
"sendNotification": false,
"shareEmailAddress": [],
"title": ""
},
"params": {
"filters": [
{
"type": "",
"value": ""
}
],
"groupBys": [],
"includeInviteData": false,
"metrics": [],
"options": {
"includeOnlyTargetedUserLists": false,
"pathQueryOptions": {
"channelGrouping": {
"fallbackName": "",
"name": "",
"rules": [
{
"disjunctiveMatchStatements": [
{
"eventFilters": [
{
"dimensionFilter": {
"filter": "",
"match": "",
"values": []
}
}
]
}
],
"name": ""
}
]
},
"pathFilters": [
{
"eventFilters": [
{}
],
"pathMatchPosition": ""
}
]
}
},
"type": ""
},
"queryId": "",
"reportDataEndTimeMs": "",
"reportDataStartTimeMs": "",
"schedule": {
"endTimeMs": "",
"frequency": "",
"nextRunMinuteOfDay": 0,
"nextRunTimezoneCode": "",
"startTimeMs": ""
},
"timezoneCode": ""
}'
echo '{
"kind": "",
"metadata": {
"dataRange": "",
"format": "",
"googleCloudStoragePathForLatestReport": "",
"googleDrivePathForLatestReport": "",
"latestReportRunTimeMs": "",
"locale": "",
"reportCount": 0,
"running": false,
"sendNotification": false,
"shareEmailAddress": [],
"title": ""
},
"params": {
"filters": [
{
"type": "",
"value": ""
}
],
"groupBys": [],
"includeInviteData": false,
"metrics": [],
"options": {
"includeOnlyTargetedUserLists": false,
"pathQueryOptions": {
"channelGrouping": {
"fallbackName": "",
"name": "",
"rules": [
{
"disjunctiveMatchStatements": [
{
"eventFilters": [
{
"dimensionFilter": {
"filter": "",
"match": "",
"values": []
}
}
]
}
],
"name": ""
}
]
},
"pathFilters": [
{
"eventFilters": [
{}
],
"pathMatchPosition": ""
}
]
}
},
"type": ""
},
"queryId": "",
"reportDataEndTimeMs": "",
"reportDataStartTimeMs": "",
"schedule": {
"endTimeMs": "",
"frequency": "",
"nextRunMinuteOfDay": 0,
"nextRunTimezoneCode": "",
"startTimeMs": ""
},
"timezoneCode": ""
}' | \
http POST {{baseUrl}}/query \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "kind": "",\n "metadata": {\n "dataRange": "",\n "format": "",\n "googleCloudStoragePathForLatestReport": "",\n "googleDrivePathForLatestReport": "",\n "latestReportRunTimeMs": "",\n "locale": "",\n "reportCount": 0,\n "running": false,\n "sendNotification": false,\n "shareEmailAddress": [],\n "title": ""\n },\n "params": {\n "filters": [\n {\n "type": "",\n "value": ""\n }\n ],\n "groupBys": [],\n "includeInviteData": false,\n "metrics": [],\n "options": {\n "includeOnlyTargetedUserLists": false,\n "pathQueryOptions": {\n "channelGrouping": {\n "fallbackName": "",\n "name": "",\n "rules": [\n {\n "disjunctiveMatchStatements": [\n {\n "eventFilters": [\n {\n "dimensionFilter": {\n "filter": "",\n "match": "",\n "values": []\n }\n }\n ]\n }\n ],\n "name": ""\n }\n ]\n },\n "pathFilters": [\n {\n "eventFilters": [\n {}\n ],\n "pathMatchPosition": ""\n }\n ]\n }\n },\n "type": ""\n },\n "queryId": "",\n "reportDataEndTimeMs": "",\n "reportDataStartTimeMs": "",\n "schedule": {\n "endTimeMs": "",\n "frequency": "",\n "nextRunMinuteOfDay": 0,\n "nextRunTimezoneCode": "",\n "startTimeMs": ""\n },\n "timezoneCode": ""\n}' \
--output-document \
- {{baseUrl}}/query
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"kind": "",
"metadata": [
"dataRange": "",
"format": "",
"googleCloudStoragePathForLatestReport": "",
"googleDrivePathForLatestReport": "",
"latestReportRunTimeMs": "",
"locale": "",
"reportCount": 0,
"running": false,
"sendNotification": false,
"shareEmailAddress": [],
"title": ""
],
"params": [
"filters": [
[
"type": "",
"value": ""
]
],
"groupBys": [],
"includeInviteData": false,
"metrics": [],
"options": [
"includeOnlyTargetedUserLists": false,
"pathQueryOptions": [
"channelGrouping": [
"fallbackName": "",
"name": "",
"rules": [
[
"disjunctiveMatchStatements": [["eventFilters": [["dimensionFilter": [
"filter": "",
"match": "",
"values": []
]]]]],
"name": ""
]
]
],
"pathFilters": [
[
"eventFilters": [[]],
"pathMatchPosition": ""
]
]
]
],
"type": ""
],
"queryId": "",
"reportDataEndTimeMs": "",
"reportDataStartTimeMs": "",
"schedule": [
"endTimeMs": "",
"frequency": "",
"nextRunMinuteOfDay": 0,
"nextRunTimezoneCode": "",
"startTimeMs": ""
],
"timezoneCode": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/query")! 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
doubleclickbidmanager.queries.deletequery
{{baseUrl}}/query/:queryId
QUERY PARAMS
queryId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/query/:queryId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/query/:queryId")
require "http/client"
url = "{{baseUrl}}/query/:queryId"
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}}/query/:queryId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/query/:queryId");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/query/:queryId"
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/query/:queryId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/query/:queryId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/query/:queryId"))
.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}}/query/:queryId")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/query/:queryId")
.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}}/query/:queryId');
xhr.send(data);
import axios from 'axios';
const options = {method: 'DELETE', url: '{{baseUrl}}/query/:queryId'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/query/:queryId';
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}}/query/:queryId',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/query/:queryId")
.delete(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/query/:queryId',
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}}/query/:queryId'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/query/:queryId');
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}}/query/:queryId'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/query/:queryId';
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}}/query/:queryId"]
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}}/query/:queryId" in
Client.call `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/query/:queryId",
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}}/query/:queryId');
echo $response->getBody();
setUrl('{{baseUrl}}/query/:queryId');
$request->setMethod(HTTP_METH_DELETE);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/query/:queryId');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/query/:queryId' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/query/:queryId' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/query/:queryId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/query/:queryId"
response = requests.delete(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/query/:queryId"
response <- VERB("DELETE", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/query/:queryId")
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/query/:queryId') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/query/:queryId";
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}}/query/:queryId
http DELETE {{baseUrl}}/query/:queryId
wget --quiet \
--method DELETE \
--output-document \
- {{baseUrl}}/query/:queryId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/query/:queryId")! 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
doubleclickbidmanager.queries.getquery
{{baseUrl}}/query/:queryId
QUERY PARAMS
queryId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/query/:queryId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/query/:queryId")
require "http/client"
url = "{{baseUrl}}/query/:queryId"
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}}/query/:queryId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/query/:queryId");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/query/:queryId"
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/query/:queryId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/query/:queryId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/query/:queryId"))
.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}}/query/:queryId")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/query/:queryId")
.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}}/query/:queryId');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/query/:queryId'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/query/:queryId';
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}}/query/:queryId',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/query/:queryId")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/query/:queryId',
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}}/query/:queryId'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/query/:queryId');
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}}/query/:queryId'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/query/:queryId';
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}}/query/:queryId"]
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}}/query/:queryId" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/query/:queryId",
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}}/query/:queryId');
echo $response->getBody();
setUrl('{{baseUrl}}/query/:queryId');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/query/:queryId');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/query/:queryId' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/query/:queryId' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/query/:queryId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/query/:queryId"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/query/:queryId"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/query/:queryId")
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/query/:queryId') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/query/:queryId";
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}}/query/:queryId
http GET {{baseUrl}}/query/:queryId
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/query/:queryId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/query/:queryId")! 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
doubleclickbidmanager.queries.listqueries
{{baseUrl}}/queries
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/queries");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/queries")
require "http/client"
url = "{{baseUrl}}/queries"
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}}/queries"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/queries");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/queries"
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/queries HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/queries")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/queries"))
.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}}/queries")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/queries")
.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}}/queries');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/queries'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/queries';
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}}/queries',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/queries")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/queries',
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}}/queries'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/queries');
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}}/queries'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/queries';
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}}/queries"]
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}}/queries" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/queries",
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}}/queries');
echo $response->getBody();
setUrl('{{baseUrl}}/queries');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/queries');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/queries' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/queries' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/queries")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/queries"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/queries"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/queries")
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/queries') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/queries";
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}}/queries
http GET {{baseUrl}}/queries
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/queries
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/queries")! 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
doubleclickbidmanager.queries.runquery
{{baseUrl}}/query/:queryId
QUERY PARAMS
queryId
BODY json
{
"dataRange": "",
"reportDataEndTimeMs": "",
"reportDataStartTimeMs": "",
"timezoneCode": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/query/:queryId");
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 \"dataRange\": \"\",\n \"reportDataEndTimeMs\": \"\",\n \"reportDataStartTimeMs\": \"\",\n \"timezoneCode\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/query/:queryId" {:content-type :json
:form-params {:dataRange ""
:reportDataEndTimeMs ""
:reportDataStartTimeMs ""
:timezoneCode ""}})
require "http/client"
url = "{{baseUrl}}/query/:queryId"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"dataRange\": \"\",\n \"reportDataEndTimeMs\": \"\",\n \"reportDataStartTimeMs\": \"\",\n \"timezoneCode\": \"\"\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}}/query/:queryId"),
Content = new StringContent("{\n \"dataRange\": \"\",\n \"reportDataEndTimeMs\": \"\",\n \"reportDataStartTimeMs\": \"\",\n \"timezoneCode\": \"\"\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}}/query/:queryId");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"dataRange\": \"\",\n \"reportDataEndTimeMs\": \"\",\n \"reportDataStartTimeMs\": \"\",\n \"timezoneCode\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/query/:queryId"
payload := strings.NewReader("{\n \"dataRange\": \"\",\n \"reportDataEndTimeMs\": \"\",\n \"reportDataStartTimeMs\": \"\",\n \"timezoneCode\": \"\"\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/query/:queryId HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 103
{
"dataRange": "",
"reportDataEndTimeMs": "",
"reportDataStartTimeMs": "",
"timezoneCode": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/query/:queryId")
.setHeader("content-type", "application/json")
.setBody("{\n \"dataRange\": \"\",\n \"reportDataEndTimeMs\": \"\",\n \"reportDataStartTimeMs\": \"\",\n \"timezoneCode\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/query/:queryId"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"dataRange\": \"\",\n \"reportDataEndTimeMs\": \"\",\n \"reportDataStartTimeMs\": \"\",\n \"timezoneCode\": \"\"\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 \"dataRange\": \"\",\n \"reportDataEndTimeMs\": \"\",\n \"reportDataStartTimeMs\": \"\",\n \"timezoneCode\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/query/:queryId")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/query/:queryId")
.header("content-type", "application/json")
.body("{\n \"dataRange\": \"\",\n \"reportDataEndTimeMs\": \"\",\n \"reportDataStartTimeMs\": \"\",\n \"timezoneCode\": \"\"\n}")
.asString();
const data = JSON.stringify({
dataRange: '',
reportDataEndTimeMs: '',
reportDataStartTimeMs: '',
timezoneCode: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/query/:queryId');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/query/:queryId',
headers: {'content-type': 'application/json'},
data: {
dataRange: '',
reportDataEndTimeMs: '',
reportDataStartTimeMs: '',
timezoneCode: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/query/:queryId';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"dataRange":"","reportDataEndTimeMs":"","reportDataStartTimeMs":"","timezoneCode":""}'
};
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}}/query/:queryId',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "dataRange": "",\n "reportDataEndTimeMs": "",\n "reportDataStartTimeMs": "",\n "timezoneCode": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"dataRange\": \"\",\n \"reportDataEndTimeMs\": \"\",\n \"reportDataStartTimeMs\": \"\",\n \"timezoneCode\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/query/:queryId")
.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/query/:queryId',
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({
dataRange: '',
reportDataEndTimeMs: '',
reportDataStartTimeMs: '',
timezoneCode: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/query/:queryId',
headers: {'content-type': 'application/json'},
body: {
dataRange: '',
reportDataEndTimeMs: '',
reportDataStartTimeMs: '',
timezoneCode: ''
},
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}}/query/:queryId');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
dataRange: '',
reportDataEndTimeMs: '',
reportDataStartTimeMs: '',
timezoneCode: ''
});
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}}/query/:queryId',
headers: {'content-type': 'application/json'},
data: {
dataRange: '',
reportDataEndTimeMs: '',
reportDataStartTimeMs: '',
timezoneCode: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/query/:queryId';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"dataRange":"","reportDataEndTimeMs":"","reportDataStartTimeMs":"","timezoneCode":""}'
};
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 = @{ @"dataRange": @"",
@"reportDataEndTimeMs": @"",
@"reportDataStartTimeMs": @"",
@"timezoneCode": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/query/:queryId"]
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}}/query/:queryId" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"dataRange\": \"\",\n \"reportDataEndTimeMs\": \"\",\n \"reportDataStartTimeMs\": \"\",\n \"timezoneCode\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/query/:queryId",
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([
'dataRange' => '',
'reportDataEndTimeMs' => '',
'reportDataStartTimeMs' => '',
'timezoneCode' => ''
]),
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}}/query/:queryId', [
'body' => '{
"dataRange": "",
"reportDataEndTimeMs": "",
"reportDataStartTimeMs": "",
"timezoneCode": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/query/:queryId');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'dataRange' => '',
'reportDataEndTimeMs' => '',
'reportDataStartTimeMs' => '',
'timezoneCode' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'dataRange' => '',
'reportDataEndTimeMs' => '',
'reportDataStartTimeMs' => '',
'timezoneCode' => ''
]));
$request->setRequestUrl('{{baseUrl}}/query/:queryId');
$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}}/query/:queryId' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"dataRange": "",
"reportDataEndTimeMs": "",
"reportDataStartTimeMs": "",
"timezoneCode": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/query/:queryId' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"dataRange": "",
"reportDataEndTimeMs": "",
"reportDataStartTimeMs": "",
"timezoneCode": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"dataRange\": \"\",\n \"reportDataEndTimeMs\": \"\",\n \"reportDataStartTimeMs\": \"\",\n \"timezoneCode\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/query/:queryId", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/query/:queryId"
payload = {
"dataRange": "",
"reportDataEndTimeMs": "",
"reportDataStartTimeMs": "",
"timezoneCode": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/query/:queryId"
payload <- "{\n \"dataRange\": \"\",\n \"reportDataEndTimeMs\": \"\",\n \"reportDataStartTimeMs\": \"\",\n \"timezoneCode\": \"\"\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}}/query/:queryId")
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 \"dataRange\": \"\",\n \"reportDataEndTimeMs\": \"\",\n \"reportDataStartTimeMs\": \"\",\n \"timezoneCode\": \"\"\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/query/:queryId') do |req|
req.body = "{\n \"dataRange\": \"\",\n \"reportDataEndTimeMs\": \"\",\n \"reportDataStartTimeMs\": \"\",\n \"timezoneCode\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/query/:queryId";
let payload = json!({
"dataRange": "",
"reportDataEndTimeMs": "",
"reportDataStartTimeMs": "",
"timezoneCode": ""
});
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}}/query/:queryId \
--header 'content-type: application/json' \
--data '{
"dataRange": "",
"reportDataEndTimeMs": "",
"reportDataStartTimeMs": "",
"timezoneCode": ""
}'
echo '{
"dataRange": "",
"reportDataEndTimeMs": "",
"reportDataStartTimeMs": "",
"timezoneCode": ""
}' | \
http POST {{baseUrl}}/query/:queryId \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "dataRange": "",\n "reportDataEndTimeMs": "",\n "reportDataStartTimeMs": "",\n "timezoneCode": ""\n}' \
--output-document \
- {{baseUrl}}/query/:queryId
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"dataRange": "",
"reportDataEndTimeMs": "",
"reportDataStartTimeMs": "",
"timezoneCode": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/query/:queryId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
doubleclickbidmanager.reports.listreports
{{baseUrl}}/queries/:queryId/reports
QUERY PARAMS
queryId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/queries/:queryId/reports");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/queries/:queryId/reports")
require "http/client"
url = "{{baseUrl}}/queries/:queryId/reports"
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}}/queries/:queryId/reports"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/queries/:queryId/reports");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/queries/:queryId/reports"
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/queries/:queryId/reports HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/queries/:queryId/reports")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/queries/:queryId/reports"))
.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}}/queries/:queryId/reports")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/queries/:queryId/reports")
.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}}/queries/:queryId/reports');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/queries/:queryId/reports'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/queries/:queryId/reports';
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}}/queries/:queryId/reports',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/queries/:queryId/reports")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/queries/:queryId/reports',
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}}/queries/:queryId/reports'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/queries/:queryId/reports');
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}}/queries/:queryId/reports'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/queries/:queryId/reports';
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}}/queries/:queryId/reports"]
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}}/queries/:queryId/reports" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/queries/:queryId/reports",
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}}/queries/:queryId/reports');
echo $response->getBody();
setUrl('{{baseUrl}}/queries/:queryId/reports');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/queries/:queryId/reports');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/queries/:queryId/reports' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/queries/:queryId/reports' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/queries/:queryId/reports")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/queries/:queryId/reports"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/queries/:queryId/reports"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/queries/:queryId/reports")
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/queries/:queryId/reports') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/queries/:queryId/reports";
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}}/queries/:queryId/reports
http GET {{baseUrl}}/queries/:queryId/reports
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/queries/:queryId/reports
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/queries/:queryId/reports")! 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()