Search Ads 360 API
GET
doubleclicksearch.conversion.get
{{baseUrl}}/doubleclicksearch/v2/agency/:agencyId/advertiser/:advertiserId/engine/:engineAccountId/conversion
QUERY PARAMS
endDate
rowCount
startDate
startRow
agencyId
advertiserId
engineAccountId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/doubleclicksearch/v2/agency/:agencyId/advertiser/:advertiserId/engine/:engineAccountId/conversion?endDate=&rowCount=&startDate=&startRow=");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/doubleclicksearch/v2/agency/:agencyId/advertiser/:advertiserId/engine/:engineAccountId/conversion" {:query-params {:endDate ""
:rowCount ""
:startDate ""
:startRow ""}})
require "http/client"
url = "{{baseUrl}}/doubleclicksearch/v2/agency/:agencyId/advertiser/:advertiserId/engine/:engineAccountId/conversion?endDate=&rowCount=&startDate=&startRow="
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}}/doubleclicksearch/v2/agency/:agencyId/advertiser/:advertiserId/engine/:engineAccountId/conversion?endDate=&rowCount=&startDate=&startRow="),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/doubleclicksearch/v2/agency/:agencyId/advertiser/:advertiserId/engine/:engineAccountId/conversion?endDate=&rowCount=&startDate=&startRow=");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/doubleclicksearch/v2/agency/:agencyId/advertiser/:advertiserId/engine/:engineAccountId/conversion?endDate=&rowCount=&startDate=&startRow="
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/doubleclicksearch/v2/agency/:agencyId/advertiser/:advertiserId/engine/:engineAccountId/conversion?endDate=&rowCount=&startDate=&startRow= HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/doubleclicksearch/v2/agency/:agencyId/advertiser/:advertiserId/engine/:engineAccountId/conversion?endDate=&rowCount=&startDate=&startRow=")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/doubleclicksearch/v2/agency/:agencyId/advertiser/:advertiserId/engine/:engineAccountId/conversion?endDate=&rowCount=&startDate=&startRow="))
.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}}/doubleclicksearch/v2/agency/:agencyId/advertiser/:advertiserId/engine/:engineAccountId/conversion?endDate=&rowCount=&startDate=&startRow=")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/doubleclicksearch/v2/agency/:agencyId/advertiser/:advertiserId/engine/:engineAccountId/conversion?endDate=&rowCount=&startDate=&startRow=")
.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}}/doubleclicksearch/v2/agency/:agencyId/advertiser/:advertiserId/engine/:engineAccountId/conversion?endDate=&rowCount=&startDate=&startRow=');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/doubleclicksearch/v2/agency/:agencyId/advertiser/:advertiserId/engine/:engineAccountId/conversion',
params: {endDate: '', rowCount: '', startDate: '', startRow: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/doubleclicksearch/v2/agency/:agencyId/advertiser/:advertiserId/engine/:engineAccountId/conversion?endDate=&rowCount=&startDate=&startRow=';
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}}/doubleclicksearch/v2/agency/:agencyId/advertiser/:advertiserId/engine/:engineAccountId/conversion?endDate=&rowCount=&startDate=&startRow=',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/doubleclicksearch/v2/agency/:agencyId/advertiser/:advertiserId/engine/:engineAccountId/conversion?endDate=&rowCount=&startDate=&startRow=")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/doubleclicksearch/v2/agency/:agencyId/advertiser/:advertiserId/engine/:engineAccountId/conversion?endDate=&rowCount=&startDate=&startRow=',
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}}/doubleclicksearch/v2/agency/:agencyId/advertiser/:advertiserId/engine/:engineAccountId/conversion',
qs: {endDate: '', rowCount: '', startDate: '', startRow: ''}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/doubleclicksearch/v2/agency/:agencyId/advertiser/:advertiserId/engine/:engineAccountId/conversion');
req.query({
endDate: '',
rowCount: '',
startDate: '',
startRow: ''
});
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}}/doubleclicksearch/v2/agency/:agencyId/advertiser/:advertiserId/engine/:engineAccountId/conversion',
params: {endDate: '', rowCount: '', startDate: '', startRow: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/doubleclicksearch/v2/agency/:agencyId/advertiser/:advertiserId/engine/:engineAccountId/conversion?endDate=&rowCount=&startDate=&startRow=';
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}}/doubleclicksearch/v2/agency/:agencyId/advertiser/:advertiserId/engine/:engineAccountId/conversion?endDate=&rowCount=&startDate=&startRow="]
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}}/doubleclicksearch/v2/agency/:agencyId/advertiser/:advertiserId/engine/:engineAccountId/conversion?endDate=&rowCount=&startDate=&startRow=" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/doubleclicksearch/v2/agency/:agencyId/advertiser/:advertiserId/engine/:engineAccountId/conversion?endDate=&rowCount=&startDate=&startRow=",
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}}/doubleclicksearch/v2/agency/:agencyId/advertiser/:advertiserId/engine/:engineAccountId/conversion?endDate=&rowCount=&startDate=&startRow=');
echo $response->getBody();
setUrl('{{baseUrl}}/doubleclicksearch/v2/agency/:agencyId/advertiser/:advertiserId/engine/:engineAccountId/conversion');
$request->setMethod(HTTP_METH_GET);
$request->setQueryData([
'endDate' => '',
'rowCount' => '',
'startDate' => '',
'startRow' => ''
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/doubleclicksearch/v2/agency/:agencyId/advertiser/:advertiserId/engine/:engineAccountId/conversion');
$request->setRequestMethod('GET');
$request->setQuery(new http\QueryString([
'endDate' => '',
'rowCount' => '',
'startDate' => '',
'startRow' => ''
]));
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/doubleclicksearch/v2/agency/:agencyId/advertiser/:advertiserId/engine/:engineAccountId/conversion?endDate=&rowCount=&startDate=&startRow=' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/doubleclicksearch/v2/agency/:agencyId/advertiser/:advertiserId/engine/:engineAccountId/conversion?endDate=&rowCount=&startDate=&startRow=' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/doubleclicksearch/v2/agency/:agencyId/advertiser/:advertiserId/engine/:engineAccountId/conversion?endDate=&rowCount=&startDate=&startRow=")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/doubleclicksearch/v2/agency/:agencyId/advertiser/:advertiserId/engine/:engineAccountId/conversion"
querystring = {"endDate":"","rowCount":"","startDate":"","startRow":""}
response = requests.get(url, params=querystring)
print(response.json())
library(httr)
url <- "{{baseUrl}}/doubleclicksearch/v2/agency/:agencyId/advertiser/:advertiserId/engine/:engineAccountId/conversion"
queryString <- list(
endDate = "",
rowCount = "",
startDate = "",
startRow = ""
)
response <- VERB("GET", url, query = queryString, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/doubleclicksearch/v2/agency/:agencyId/advertiser/:advertiserId/engine/:engineAccountId/conversion?endDate=&rowCount=&startDate=&startRow=")
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/doubleclicksearch/v2/agency/:agencyId/advertiser/:advertiserId/engine/:engineAccountId/conversion') do |req|
req.params['endDate'] = ''
req.params['rowCount'] = ''
req.params['startDate'] = ''
req.params['startRow'] = ''
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/doubleclicksearch/v2/agency/:agencyId/advertiser/:advertiserId/engine/:engineAccountId/conversion";
let querystring = [
("endDate", ""),
("rowCount", ""),
("startDate", ""),
("startRow", ""),
];
let client = reqwest::Client::new();
let response = client.get(url)
.query(&querystring)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url '{{baseUrl}}/doubleclicksearch/v2/agency/:agencyId/advertiser/:advertiserId/engine/:engineAccountId/conversion?endDate=&rowCount=&startDate=&startRow='
http GET '{{baseUrl}}/doubleclicksearch/v2/agency/:agencyId/advertiser/:advertiserId/engine/:engineAccountId/conversion?endDate=&rowCount=&startDate=&startRow='
wget --quiet \
--method GET \
--output-document \
- '{{baseUrl}}/doubleclicksearch/v2/agency/:agencyId/advertiser/:advertiserId/engine/:engineAccountId/conversion?endDate=&rowCount=&startDate=&startRow='
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/doubleclicksearch/v2/agency/:agencyId/advertiser/:advertiserId/engine/:engineAccountId/conversion?endDate=&rowCount=&startDate=&startRow=")! 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
doubleclicksearch.conversion.getByCustomerId
{{baseUrl}}/doubleclicksearch/v2/customer/:customerId/conversion
QUERY PARAMS
endDate
rowCount
startDate
startRow
customerId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/doubleclicksearch/v2/customer/:customerId/conversion?endDate=&rowCount=&startDate=&startRow=");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/doubleclicksearch/v2/customer/:customerId/conversion" {:query-params {:endDate ""
:rowCount ""
:startDate ""
:startRow ""}})
require "http/client"
url = "{{baseUrl}}/doubleclicksearch/v2/customer/:customerId/conversion?endDate=&rowCount=&startDate=&startRow="
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}}/doubleclicksearch/v2/customer/:customerId/conversion?endDate=&rowCount=&startDate=&startRow="),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/doubleclicksearch/v2/customer/:customerId/conversion?endDate=&rowCount=&startDate=&startRow=");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/doubleclicksearch/v2/customer/:customerId/conversion?endDate=&rowCount=&startDate=&startRow="
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/doubleclicksearch/v2/customer/:customerId/conversion?endDate=&rowCount=&startDate=&startRow= HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/doubleclicksearch/v2/customer/:customerId/conversion?endDate=&rowCount=&startDate=&startRow=")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/doubleclicksearch/v2/customer/:customerId/conversion?endDate=&rowCount=&startDate=&startRow="))
.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}}/doubleclicksearch/v2/customer/:customerId/conversion?endDate=&rowCount=&startDate=&startRow=")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/doubleclicksearch/v2/customer/:customerId/conversion?endDate=&rowCount=&startDate=&startRow=")
.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}}/doubleclicksearch/v2/customer/:customerId/conversion?endDate=&rowCount=&startDate=&startRow=');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/doubleclicksearch/v2/customer/:customerId/conversion',
params: {endDate: '', rowCount: '', startDate: '', startRow: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/doubleclicksearch/v2/customer/:customerId/conversion?endDate=&rowCount=&startDate=&startRow=';
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}}/doubleclicksearch/v2/customer/:customerId/conversion?endDate=&rowCount=&startDate=&startRow=',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/doubleclicksearch/v2/customer/:customerId/conversion?endDate=&rowCount=&startDate=&startRow=")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/doubleclicksearch/v2/customer/:customerId/conversion?endDate=&rowCount=&startDate=&startRow=',
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}}/doubleclicksearch/v2/customer/:customerId/conversion',
qs: {endDate: '', rowCount: '', startDate: '', startRow: ''}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/doubleclicksearch/v2/customer/:customerId/conversion');
req.query({
endDate: '',
rowCount: '',
startDate: '',
startRow: ''
});
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}}/doubleclicksearch/v2/customer/:customerId/conversion',
params: {endDate: '', rowCount: '', startDate: '', startRow: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/doubleclicksearch/v2/customer/:customerId/conversion?endDate=&rowCount=&startDate=&startRow=';
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}}/doubleclicksearch/v2/customer/:customerId/conversion?endDate=&rowCount=&startDate=&startRow="]
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}}/doubleclicksearch/v2/customer/:customerId/conversion?endDate=&rowCount=&startDate=&startRow=" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/doubleclicksearch/v2/customer/:customerId/conversion?endDate=&rowCount=&startDate=&startRow=",
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}}/doubleclicksearch/v2/customer/:customerId/conversion?endDate=&rowCount=&startDate=&startRow=');
echo $response->getBody();
setUrl('{{baseUrl}}/doubleclicksearch/v2/customer/:customerId/conversion');
$request->setMethod(HTTP_METH_GET);
$request->setQueryData([
'endDate' => '',
'rowCount' => '',
'startDate' => '',
'startRow' => ''
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/doubleclicksearch/v2/customer/:customerId/conversion');
$request->setRequestMethod('GET');
$request->setQuery(new http\QueryString([
'endDate' => '',
'rowCount' => '',
'startDate' => '',
'startRow' => ''
]));
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/doubleclicksearch/v2/customer/:customerId/conversion?endDate=&rowCount=&startDate=&startRow=' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/doubleclicksearch/v2/customer/:customerId/conversion?endDate=&rowCount=&startDate=&startRow=' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/doubleclicksearch/v2/customer/:customerId/conversion?endDate=&rowCount=&startDate=&startRow=")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/doubleclicksearch/v2/customer/:customerId/conversion"
querystring = {"endDate":"","rowCount":"","startDate":"","startRow":""}
response = requests.get(url, params=querystring)
print(response.json())
library(httr)
url <- "{{baseUrl}}/doubleclicksearch/v2/customer/:customerId/conversion"
queryString <- list(
endDate = "",
rowCount = "",
startDate = "",
startRow = ""
)
response <- VERB("GET", url, query = queryString, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/doubleclicksearch/v2/customer/:customerId/conversion?endDate=&rowCount=&startDate=&startRow=")
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/doubleclicksearch/v2/customer/:customerId/conversion') do |req|
req.params['endDate'] = ''
req.params['rowCount'] = ''
req.params['startDate'] = ''
req.params['startRow'] = ''
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/doubleclicksearch/v2/customer/:customerId/conversion";
let querystring = [
("endDate", ""),
("rowCount", ""),
("startDate", ""),
("startRow", ""),
];
let client = reqwest::Client::new();
let response = client.get(url)
.query(&querystring)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url '{{baseUrl}}/doubleclicksearch/v2/customer/:customerId/conversion?endDate=&rowCount=&startDate=&startRow='
http GET '{{baseUrl}}/doubleclicksearch/v2/customer/:customerId/conversion?endDate=&rowCount=&startDate=&startRow='
wget --quiet \
--method GET \
--output-document \
- '{{baseUrl}}/doubleclicksearch/v2/customer/:customerId/conversion?endDate=&rowCount=&startDate=&startRow='
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/doubleclicksearch/v2/customer/:customerId/conversion?endDate=&rowCount=&startDate=&startRow=")! 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
doubleclicksearch.conversion.insert
{{baseUrl}}/doubleclicksearch/v2/conversion
BODY json
{
"conversion": [
{
"adGroupId": "",
"adId": "",
"advertiserId": "",
"agencyId": "",
"attributionModel": "",
"campaignId": "",
"channel": "",
"clickId": "",
"conversionId": "",
"conversionModifiedTimestamp": "",
"conversionTimestamp": "",
"countMillis": "",
"criterionId": "",
"currencyCode": "",
"customDimension": [
{
"name": "",
"value": ""
}
],
"customMetric": [
{
"name": "",
"value": ""
}
],
"customerId": "",
"deviceType": "",
"dsConversionId": "",
"engineAccountId": "",
"floodlightOrderId": "",
"inventoryAccountId": "",
"productCountry": "",
"productGroupId": "",
"productId": "",
"productLanguage": "",
"quantityMillis": "",
"revenueMicros": "",
"segmentationId": "",
"segmentationName": "",
"segmentationType": "",
"state": "",
"storeId": "",
"type": ""
}
],
"kind": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/doubleclicksearch/v2/conversion");
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 \"conversion\": [\n {\n \"adGroupId\": \"\",\n \"adId\": \"\",\n \"advertiserId\": \"\",\n \"agencyId\": \"\",\n \"attributionModel\": \"\",\n \"campaignId\": \"\",\n \"channel\": \"\",\n \"clickId\": \"\",\n \"conversionId\": \"\",\n \"conversionModifiedTimestamp\": \"\",\n \"conversionTimestamp\": \"\",\n \"countMillis\": \"\",\n \"criterionId\": \"\",\n \"currencyCode\": \"\",\n \"customDimension\": [\n {\n \"name\": \"\",\n \"value\": \"\"\n }\n ],\n \"customMetric\": [\n {\n \"name\": \"\",\n \"value\": \"\"\n }\n ],\n \"customerId\": \"\",\n \"deviceType\": \"\",\n \"dsConversionId\": \"\",\n \"engineAccountId\": \"\",\n \"floodlightOrderId\": \"\",\n \"inventoryAccountId\": \"\",\n \"productCountry\": \"\",\n \"productGroupId\": \"\",\n \"productId\": \"\",\n \"productLanguage\": \"\",\n \"quantityMillis\": \"\",\n \"revenueMicros\": \"\",\n \"segmentationId\": \"\",\n \"segmentationName\": \"\",\n \"segmentationType\": \"\",\n \"state\": \"\",\n \"storeId\": \"\",\n \"type\": \"\"\n }\n ],\n \"kind\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/doubleclicksearch/v2/conversion" {:content-type :json
:form-params {:conversion [{:adGroupId ""
:adId ""
:advertiserId ""
:agencyId ""
:attributionModel ""
:campaignId ""
:channel ""
:clickId ""
:conversionId ""
:conversionModifiedTimestamp ""
:conversionTimestamp ""
:countMillis ""
:criterionId ""
:currencyCode ""
:customDimension [{:name ""
:value ""}]
:customMetric [{:name ""
:value ""}]
:customerId ""
:deviceType ""
:dsConversionId ""
:engineAccountId ""
:floodlightOrderId ""
:inventoryAccountId ""
:productCountry ""
:productGroupId ""
:productId ""
:productLanguage ""
:quantityMillis ""
:revenueMicros ""
:segmentationId ""
:segmentationName ""
:segmentationType ""
:state ""
:storeId ""
:type ""}]
:kind ""}})
require "http/client"
url = "{{baseUrl}}/doubleclicksearch/v2/conversion"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"conversion\": [\n {\n \"adGroupId\": \"\",\n \"adId\": \"\",\n \"advertiserId\": \"\",\n \"agencyId\": \"\",\n \"attributionModel\": \"\",\n \"campaignId\": \"\",\n \"channel\": \"\",\n \"clickId\": \"\",\n \"conversionId\": \"\",\n \"conversionModifiedTimestamp\": \"\",\n \"conversionTimestamp\": \"\",\n \"countMillis\": \"\",\n \"criterionId\": \"\",\n \"currencyCode\": \"\",\n \"customDimension\": [\n {\n \"name\": \"\",\n \"value\": \"\"\n }\n ],\n \"customMetric\": [\n {\n \"name\": \"\",\n \"value\": \"\"\n }\n ],\n \"customerId\": \"\",\n \"deviceType\": \"\",\n \"dsConversionId\": \"\",\n \"engineAccountId\": \"\",\n \"floodlightOrderId\": \"\",\n \"inventoryAccountId\": \"\",\n \"productCountry\": \"\",\n \"productGroupId\": \"\",\n \"productId\": \"\",\n \"productLanguage\": \"\",\n \"quantityMillis\": \"\",\n \"revenueMicros\": \"\",\n \"segmentationId\": \"\",\n \"segmentationName\": \"\",\n \"segmentationType\": \"\",\n \"state\": \"\",\n \"storeId\": \"\",\n \"type\": \"\"\n }\n ],\n \"kind\": \"\"\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}}/doubleclicksearch/v2/conversion"),
Content = new StringContent("{\n \"conversion\": [\n {\n \"adGroupId\": \"\",\n \"adId\": \"\",\n \"advertiserId\": \"\",\n \"agencyId\": \"\",\n \"attributionModel\": \"\",\n \"campaignId\": \"\",\n \"channel\": \"\",\n \"clickId\": \"\",\n \"conversionId\": \"\",\n \"conversionModifiedTimestamp\": \"\",\n \"conversionTimestamp\": \"\",\n \"countMillis\": \"\",\n \"criterionId\": \"\",\n \"currencyCode\": \"\",\n \"customDimension\": [\n {\n \"name\": \"\",\n \"value\": \"\"\n }\n ],\n \"customMetric\": [\n {\n \"name\": \"\",\n \"value\": \"\"\n }\n ],\n \"customerId\": \"\",\n \"deviceType\": \"\",\n \"dsConversionId\": \"\",\n \"engineAccountId\": \"\",\n \"floodlightOrderId\": \"\",\n \"inventoryAccountId\": \"\",\n \"productCountry\": \"\",\n \"productGroupId\": \"\",\n \"productId\": \"\",\n \"productLanguage\": \"\",\n \"quantityMillis\": \"\",\n \"revenueMicros\": \"\",\n \"segmentationId\": \"\",\n \"segmentationName\": \"\",\n \"segmentationType\": \"\",\n \"state\": \"\",\n \"storeId\": \"\",\n \"type\": \"\"\n }\n ],\n \"kind\": \"\"\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}}/doubleclicksearch/v2/conversion");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"conversion\": [\n {\n \"adGroupId\": \"\",\n \"adId\": \"\",\n \"advertiserId\": \"\",\n \"agencyId\": \"\",\n \"attributionModel\": \"\",\n \"campaignId\": \"\",\n \"channel\": \"\",\n \"clickId\": \"\",\n \"conversionId\": \"\",\n \"conversionModifiedTimestamp\": \"\",\n \"conversionTimestamp\": \"\",\n \"countMillis\": \"\",\n \"criterionId\": \"\",\n \"currencyCode\": \"\",\n \"customDimension\": [\n {\n \"name\": \"\",\n \"value\": \"\"\n }\n ],\n \"customMetric\": [\n {\n \"name\": \"\",\n \"value\": \"\"\n }\n ],\n \"customerId\": \"\",\n \"deviceType\": \"\",\n \"dsConversionId\": \"\",\n \"engineAccountId\": \"\",\n \"floodlightOrderId\": \"\",\n \"inventoryAccountId\": \"\",\n \"productCountry\": \"\",\n \"productGroupId\": \"\",\n \"productId\": \"\",\n \"productLanguage\": \"\",\n \"quantityMillis\": \"\",\n \"revenueMicros\": \"\",\n \"segmentationId\": \"\",\n \"segmentationName\": \"\",\n \"segmentationType\": \"\",\n \"state\": \"\",\n \"storeId\": \"\",\n \"type\": \"\"\n }\n ],\n \"kind\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/doubleclicksearch/v2/conversion"
payload := strings.NewReader("{\n \"conversion\": [\n {\n \"adGroupId\": \"\",\n \"adId\": \"\",\n \"advertiserId\": \"\",\n \"agencyId\": \"\",\n \"attributionModel\": \"\",\n \"campaignId\": \"\",\n \"channel\": \"\",\n \"clickId\": \"\",\n \"conversionId\": \"\",\n \"conversionModifiedTimestamp\": \"\",\n \"conversionTimestamp\": \"\",\n \"countMillis\": \"\",\n \"criterionId\": \"\",\n \"currencyCode\": \"\",\n \"customDimension\": [\n {\n \"name\": \"\",\n \"value\": \"\"\n }\n ],\n \"customMetric\": [\n {\n \"name\": \"\",\n \"value\": \"\"\n }\n ],\n \"customerId\": \"\",\n \"deviceType\": \"\",\n \"dsConversionId\": \"\",\n \"engineAccountId\": \"\",\n \"floodlightOrderId\": \"\",\n \"inventoryAccountId\": \"\",\n \"productCountry\": \"\",\n \"productGroupId\": \"\",\n \"productId\": \"\",\n \"productLanguage\": \"\",\n \"quantityMillis\": \"\",\n \"revenueMicros\": \"\",\n \"segmentationId\": \"\",\n \"segmentationName\": \"\",\n \"segmentationType\": \"\",\n \"state\": \"\",\n \"storeId\": \"\",\n \"type\": \"\"\n }\n ],\n \"kind\": \"\"\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/doubleclicksearch/v2/conversion HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 1085
{
"conversion": [
{
"adGroupId": "",
"adId": "",
"advertiserId": "",
"agencyId": "",
"attributionModel": "",
"campaignId": "",
"channel": "",
"clickId": "",
"conversionId": "",
"conversionModifiedTimestamp": "",
"conversionTimestamp": "",
"countMillis": "",
"criterionId": "",
"currencyCode": "",
"customDimension": [
{
"name": "",
"value": ""
}
],
"customMetric": [
{
"name": "",
"value": ""
}
],
"customerId": "",
"deviceType": "",
"dsConversionId": "",
"engineAccountId": "",
"floodlightOrderId": "",
"inventoryAccountId": "",
"productCountry": "",
"productGroupId": "",
"productId": "",
"productLanguage": "",
"quantityMillis": "",
"revenueMicros": "",
"segmentationId": "",
"segmentationName": "",
"segmentationType": "",
"state": "",
"storeId": "",
"type": ""
}
],
"kind": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/doubleclicksearch/v2/conversion")
.setHeader("content-type", "application/json")
.setBody("{\n \"conversion\": [\n {\n \"adGroupId\": \"\",\n \"adId\": \"\",\n \"advertiserId\": \"\",\n \"agencyId\": \"\",\n \"attributionModel\": \"\",\n \"campaignId\": \"\",\n \"channel\": \"\",\n \"clickId\": \"\",\n \"conversionId\": \"\",\n \"conversionModifiedTimestamp\": \"\",\n \"conversionTimestamp\": \"\",\n \"countMillis\": \"\",\n \"criterionId\": \"\",\n \"currencyCode\": \"\",\n \"customDimension\": [\n {\n \"name\": \"\",\n \"value\": \"\"\n }\n ],\n \"customMetric\": [\n {\n \"name\": \"\",\n \"value\": \"\"\n }\n ],\n \"customerId\": \"\",\n \"deviceType\": \"\",\n \"dsConversionId\": \"\",\n \"engineAccountId\": \"\",\n \"floodlightOrderId\": \"\",\n \"inventoryAccountId\": \"\",\n \"productCountry\": \"\",\n \"productGroupId\": \"\",\n \"productId\": \"\",\n \"productLanguage\": \"\",\n \"quantityMillis\": \"\",\n \"revenueMicros\": \"\",\n \"segmentationId\": \"\",\n \"segmentationName\": \"\",\n \"segmentationType\": \"\",\n \"state\": \"\",\n \"storeId\": \"\",\n \"type\": \"\"\n }\n ],\n \"kind\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/doubleclicksearch/v2/conversion"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"conversion\": [\n {\n \"adGroupId\": \"\",\n \"adId\": \"\",\n \"advertiserId\": \"\",\n \"agencyId\": \"\",\n \"attributionModel\": \"\",\n \"campaignId\": \"\",\n \"channel\": \"\",\n \"clickId\": \"\",\n \"conversionId\": \"\",\n \"conversionModifiedTimestamp\": \"\",\n \"conversionTimestamp\": \"\",\n \"countMillis\": \"\",\n \"criterionId\": \"\",\n \"currencyCode\": \"\",\n \"customDimension\": [\n {\n \"name\": \"\",\n \"value\": \"\"\n }\n ],\n \"customMetric\": [\n {\n \"name\": \"\",\n \"value\": \"\"\n }\n ],\n \"customerId\": \"\",\n \"deviceType\": \"\",\n \"dsConversionId\": \"\",\n \"engineAccountId\": \"\",\n \"floodlightOrderId\": \"\",\n \"inventoryAccountId\": \"\",\n \"productCountry\": \"\",\n \"productGroupId\": \"\",\n \"productId\": \"\",\n \"productLanguage\": \"\",\n \"quantityMillis\": \"\",\n \"revenueMicros\": \"\",\n \"segmentationId\": \"\",\n \"segmentationName\": \"\",\n \"segmentationType\": \"\",\n \"state\": \"\",\n \"storeId\": \"\",\n \"type\": \"\"\n }\n ],\n \"kind\": \"\"\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 \"conversion\": [\n {\n \"adGroupId\": \"\",\n \"adId\": \"\",\n \"advertiserId\": \"\",\n \"agencyId\": \"\",\n \"attributionModel\": \"\",\n \"campaignId\": \"\",\n \"channel\": \"\",\n \"clickId\": \"\",\n \"conversionId\": \"\",\n \"conversionModifiedTimestamp\": \"\",\n \"conversionTimestamp\": \"\",\n \"countMillis\": \"\",\n \"criterionId\": \"\",\n \"currencyCode\": \"\",\n \"customDimension\": [\n {\n \"name\": \"\",\n \"value\": \"\"\n }\n ],\n \"customMetric\": [\n {\n \"name\": \"\",\n \"value\": \"\"\n }\n ],\n \"customerId\": \"\",\n \"deviceType\": \"\",\n \"dsConversionId\": \"\",\n \"engineAccountId\": \"\",\n \"floodlightOrderId\": \"\",\n \"inventoryAccountId\": \"\",\n \"productCountry\": \"\",\n \"productGroupId\": \"\",\n \"productId\": \"\",\n \"productLanguage\": \"\",\n \"quantityMillis\": \"\",\n \"revenueMicros\": \"\",\n \"segmentationId\": \"\",\n \"segmentationName\": \"\",\n \"segmentationType\": \"\",\n \"state\": \"\",\n \"storeId\": \"\",\n \"type\": \"\"\n }\n ],\n \"kind\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/doubleclicksearch/v2/conversion")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/doubleclicksearch/v2/conversion")
.header("content-type", "application/json")
.body("{\n \"conversion\": [\n {\n \"adGroupId\": \"\",\n \"adId\": \"\",\n \"advertiserId\": \"\",\n \"agencyId\": \"\",\n \"attributionModel\": \"\",\n \"campaignId\": \"\",\n \"channel\": \"\",\n \"clickId\": \"\",\n \"conversionId\": \"\",\n \"conversionModifiedTimestamp\": \"\",\n \"conversionTimestamp\": \"\",\n \"countMillis\": \"\",\n \"criterionId\": \"\",\n \"currencyCode\": \"\",\n \"customDimension\": [\n {\n \"name\": \"\",\n \"value\": \"\"\n }\n ],\n \"customMetric\": [\n {\n \"name\": \"\",\n \"value\": \"\"\n }\n ],\n \"customerId\": \"\",\n \"deviceType\": \"\",\n \"dsConversionId\": \"\",\n \"engineAccountId\": \"\",\n \"floodlightOrderId\": \"\",\n \"inventoryAccountId\": \"\",\n \"productCountry\": \"\",\n \"productGroupId\": \"\",\n \"productId\": \"\",\n \"productLanguage\": \"\",\n \"quantityMillis\": \"\",\n \"revenueMicros\": \"\",\n \"segmentationId\": \"\",\n \"segmentationName\": \"\",\n \"segmentationType\": \"\",\n \"state\": \"\",\n \"storeId\": \"\",\n \"type\": \"\"\n }\n ],\n \"kind\": \"\"\n}")
.asString();
const data = JSON.stringify({
conversion: [
{
adGroupId: '',
adId: '',
advertiserId: '',
agencyId: '',
attributionModel: '',
campaignId: '',
channel: '',
clickId: '',
conversionId: '',
conversionModifiedTimestamp: '',
conversionTimestamp: '',
countMillis: '',
criterionId: '',
currencyCode: '',
customDimension: [
{
name: '',
value: ''
}
],
customMetric: [
{
name: '',
value: ''
}
],
customerId: '',
deviceType: '',
dsConversionId: '',
engineAccountId: '',
floodlightOrderId: '',
inventoryAccountId: '',
productCountry: '',
productGroupId: '',
productId: '',
productLanguage: '',
quantityMillis: '',
revenueMicros: '',
segmentationId: '',
segmentationName: '',
segmentationType: '',
state: '',
storeId: '',
type: ''
}
],
kind: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/doubleclicksearch/v2/conversion');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/doubleclicksearch/v2/conversion',
headers: {'content-type': 'application/json'},
data: {
conversion: [
{
adGroupId: '',
adId: '',
advertiserId: '',
agencyId: '',
attributionModel: '',
campaignId: '',
channel: '',
clickId: '',
conversionId: '',
conversionModifiedTimestamp: '',
conversionTimestamp: '',
countMillis: '',
criterionId: '',
currencyCode: '',
customDimension: [{name: '', value: ''}],
customMetric: [{name: '', value: ''}],
customerId: '',
deviceType: '',
dsConversionId: '',
engineAccountId: '',
floodlightOrderId: '',
inventoryAccountId: '',
productCountry: '',
productGroupId: '',
productId: '',
productLanguage: '',
quantityMillis: '',
revenueMicros: '',
segmentationId: '',
segmentationName: '',
segmentationType: '',
state: '',
storeId: '',
type: ''
}
],
kind: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/doubleclicksearch/v2/conversion';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"conversion":[{"adGroupId":"","adId":"","advertiserId":"","agencyId":"","attributionModel":"","campaignId":"","channel":"","clickId":"","conversionId":"","conversionModifiedTimestamp":"","conversionTimestamp":"","countMillis":"","criterionId":"","currencyCode":"","customDimension":[{"name":"","value":""}],"customMetric":[{"name":"","value":""}],"customerId":"","deviceType":"","dsConversionId":"","engineAccountId":"","floodlightOrderId":"","inventoryAccountId":"","productCountry":"","productGroupId":"","productId":"","productLanguage":"","quantityMillis":"","revenueMicros":"","segmentationId":"","segmentationName":"","segmentationType":"","state":"","storeId":"","type":""}],"kind":""}'
};
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}}/doubleclicksearch/v2/conversion',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "conversion": [\n {\n "adGroupId": "",\n "adId": "",\n "advertiserId": "",\n "agencyId": "",\n "attributionModel": "",\n "campaignId": "",\n "channel": "",\n "clickId": "",\n "conversionId": "",\n "conversionModifiedTimestamp": "",\n "conversionTimestamp": "",\n "countMillis": "",\n "criterionId": "",\n "currencyCode": "",\n "customDimension": [\n {\n "name": "",\n "value": ""\n }\n ],\n "customMetric": [\n {\n "name": "",\n "value": ""\n }\n ],\n "customerId": "",\n "deviceType": "",\n "dsConversionId": "",\n "engineAccountId": "",\n "floodlightOrderId": "",\n "inventoryAccountId": "",\n "productCountry": "",\n "productGroupId": "",\n "productId": "",\n "productLanguage": "",\n "quantityMillis": "",\n "revenueMicros": "",\n "segmentationId": "",\n "segmentationName": "",\n "segmentationType": "",\n "state": "",\n "storeId": "",\n "type": ""\n }\n ],\n "kind": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"conversion\": [\n {\n \"adGroupId\": \"\",\n \"adId\": \"\",\n \"advertiserId\": \"\",\n \"agencyId\": \"\",\n \"attributionModel\": \"\",\n \"campaignId\": \"\",\n \"channel\": \"\",\n \"clickId\": \"\",\n \"conversionId\": \"\",\n \"conversionModifiedTimestamp\": \"\",\n \"conversionTimestamp\": \"\",\n \"countMillis\": \"\",\n \"criterionId\": \"\",\n \"currencyCode\": \"\",\n \"customDimension\": [\n {\n \"name\": \"\",\n \"value\": \"\"\n }\n ],\n \"customMetric\": [\n {\n \"name\": \"\",\n \"value\": \"\"\n }\n ],\n \"customerId\": \"\",\n \"deviceType\": \"\",\n \"dsConversionId\": \"\",\n \"engineAccountId\": \"\",\n \"floodlightOrderId\": \"\",\n \"inventoryAccountId\": \"\",\n \"productCountry\": \"\",\n \"productGroupId\": \"\",\n \"productId\": \"\",\n \"productLanguage\": \"\",\n \"quantityMillis\": \"\",\n \"revenueMicros\": \"\",\n \"segmentationId\": \"\",\n \"segmentationName\": \"\",\n \"segmentationType\": \"\",\n \"state\": \"\",\n \"storeId\": \"\",\n \"type\": \"\"\n }\n ],\n \"kind\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/doubleclicksearch/v2/conversion")
.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/doubleclicksearch/v2/conversion',
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({
conversion: [
{
adGroupId: '',
adId: '',
advertiserId: '',
agencyId: '',
attributionModel: '',
campaignId: '',
channel: '',
clickId: '',
conversionId: '',
conversionModifiedTimestamp: '',
conversionTimestamp: '',
countMillis: '',
criterionId: '',
currencyCode: '',
customDimension: [{name: '', value: ''}],
customMetric: [{name: '', value: ''}],
customerId: '',
deviceType: '',
dsConversionId: '',
engineAccountId: '',
floodlightOrderId: '',
inventoryAccountId: '',
productCountry: '',
productGroupId: '',
productId: '',
productLanguage: '',
quantityMillis: '',
revenueMicros: '',
segmentationId: '',
segmentationName: '',
segmentationType: '',
state: '',
storeId: '',
type: ''
}
],
kind: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/doubleclicksearch/v2/conversion',
headers: {'content-type': 'application/json'},
body: {
conversion: [
{
adGroupId: '',
adId: '',
advertiserId: '',
agencyId: '',
attributionModel: '',
campaignId: '',
channel: '',
clickId: '',
conversionId: '',
conversionModifiedTimestamp: '',
conversionTimestamp: '',
countMillis: '',
criterionId: '',
currencyCode: '',
customDimension: [{name: '', value: ''}],
customMetric: [{name: '', value: ''}],
customerId: '',
deviceType: '',
dsConversionId: '',
engineAccountId: '',
floodlightOrderId: '',
inventoryAccountId: '',
productCountry: '',
productGroupId: '',
productId: '',
productLanguage: '',
quantityMillis: '',
revenueMicros: '',
segmentationId: '',
segmentationName: '',
segmentationType: '',
state: '',
storeId: '',
type: ''
}
],
kind: ''
},
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}}/doubleclicksearch/v2/conversion');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
conversion: [
{
adGroupId: '',
adId: '',
advertiserId: '',
agencyId: '',
attributionModel: '',
campaignId: '',
channel: '',
clickId: '',
conversionId: '',
conversionModifiedTimestamp: '',
conversionTimestamp: '',
countMillis: '',
criterionId: '',
currencyCode: '',
customDimension: [
{
name: '',
value: ''
}
],
customMetric: [
{
name: '',
value: ''
}
],
customerId: '',
deviceType: '',
dsConversionId: '',
engineAccountId: '',
floodlightOrderId: '',
inventoryAccountId: '',
productCountry: '',
productGroupId: '',
productId: '',
productLanguage: '',
quantityMillis: '',
revenueMicros: '',
segmentationId: '',
segmentationName: '',
segmentationType: '',
state: '',
storeId: '',
type: ''
}
],
kind: ''
});
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}}/doubleclicksearch/v2/conversion',
headers: {'content-type': 'application/json'},
data: {
conversion: [
{
adGroupId: '',
adId: '',
advertiserId: '',
agencyId: '',
attributionModel: '',
campaignId: '',
channel: '',
clickId: '',
conversionId: '',
conversionModifiedTimestamp: '',
conversionTimestamp: '',
countMillis: '',
criterionId: '',
currencyCode: '',
customDimension: [{name: '', value: ''}],
customMetric: [{name: '', value: ''}],
customerId: '',
deviceType: '',
dsConversionId: '',
engineAccountId: '',
floodlightOrderId: '',
inventoryAccountId: '',
productCountry: '',
productGroupId: '',
productId: '',
productLanguage: '',
quantityMillis: '',
revenueMicros: '',
segmentationId: '',
segmentationName: '',
segmentationType: '',
state: '',
storeId: '',
type: ''
}
],
kind: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/doubleclicksearch/v2/conversion';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"conversion":[{"adGroupId":"","adId":"","advertiserId":"","agencyId":"","attributionModel":"","campaignId":"","channel":"","clickId":"","conversionId":"","conversionModifiedTimestamp":"","conversionTimestamp":"","countMillis":"","criterionId":"","currencyCode":"","customDimension":[{"name":"","value":""}],"customMetric":[{"name":"","value":""}],"customerId":"","deviceType":"","dsConversionId":"","engineAccountId":"","floodlightOrderId":"","inventoryAccountId":"","productCountry":"","productGroupId":"","productId":"","productLanguage":"","quantityMillis":"","revenueMicros":"","segmentationId":"","segmentationName":"","segmentationType":"","state":"","storeId":"","type":""}],"kind":""}'
};
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 = @{ @"conversion": @[ @{ @"adGroupId": @"", @"adId": @"", @"advertiserId": @"", @"agencyId": @"", @"attributionModel": @"", @"campaignId": @"", @"channel": @"", @"clickId": @"", @"conversionId": @"", @"conversionModifiedTimestamp": @"", @"conversionTimestamp": @"", @"countMillis": @"", @"criterionId": @"", @"currencyCode": @"", @"customDimension": @[ @{ @"name": @"", @"value": @"" } ], @"customMetric": @[ @{ @"name": @"", @"value": @"" } ], @"customerId": @"", @"deviceType": @"", @"dsConversionId": @"", @"engineAccountId": @"", @"floodlightOrderId": @"", @"inventoryAccountId": @"", @"productCountry": @"", @"productGroupId": @"", @"productId": @"", @"productLanguage": @"", @"quantityMillis": @"", @"revenueMicros": @"", @"segmentationId": @"", @"segmentationName": @"", @"segmentationType": @"", @"state": @"", @"storeId": @"", @"type": @"" } ],
@"kind": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/doubleclicksearch/v2/conversion"]
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}}/doubleclicksearch/v2/conversion" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"conversion\": [\n {\n \"adGroupId\": \"\",\n \"adId\": \"\",\n \"advertiserId\": \"\",\n \"agencyId\": \"\",\n \"attributionModel\": \"\",\n \"campaignId\": \"\",\n \"channel\": \"\",\n \"clickId\": \"\",\n \"conversionId\": \"\",\n \"conversionModifiedTimestamp\": \"\",\n \"conversionTimestamp\": \"\",\n \"countMillis\": \"\",\n \"criterionId\": \"\",\n \"currencyCode\": \"\",\n \"customDimension\": [\n {\n \"name\": \"\",\n \"value\": \"\"\n }\n ],\n \"customMetric\": [\n {\n \"name\": \"\",\n \"value\": \"\"\n }\n ],\n \"customerId\": \"\",\n \"deviceType\": \"\",\n \"dsConversionId\": \"\",\n \"engineAccountId\": \"\",\n \"floodlightOrderId\": \"\",\n \"inventoryAccountId\": \"\",\n \"productCountry\": \"\",\n \"productGroupId\": \"\",\n \"productId\": \"\",\n \"productLanguage\": \"\",\n \"quantityMillis\": \"\",\n \"revenueMicros\": \"\",\n \"segmentationId\": \"\",\n \"segmentationName\": \"\",\n \"segmentationType\": \"\",\n \"state\": \"\",\n \"storeId\": \"\",\n \"type\": \"\"\n }\n ],\n \"kind\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/doubleclicksearch/v2/conversion",
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([
'conversion' => [
[
'adGroupId' => '',
'adId' => '',
'advertiserId' => '',
'agencyId' => '',
'attributionModel' => '',
'campaignId' => '',
'channel' => '',
'clickId' => '',
'conversionId' => '',
'conversionModifiedTimestamp' => '',
'conversionTimestamp' => '',
'countMillis' => '',
'criterionId' => '',
'currencyCode' => '',
'customDimension' => [
[
'name' => '',
'value' => ''
]
],
'customMetric' => [
[
'name' => '',
'value' => ''
]
],
'customerId' => '',
'deviceType' => '',
'dsConversionId' => '',
'engineAccountId' => '',
'floodlightOrderId' => '',
'inventoryAccountId' => '',
'productCountry' => '',
'productGroupId' => '',
'productId' => '',
'productLanguage' => '',
'quantityMillis' => '',
'revenueMicros' => '',
'segmentationId' => '',
'segmentationName' => '',
'segmentationType' => '',
'state' => '',
'storeId' => '',
'type' => ''
]
],
'kind' => ''
]),
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}}/doubleclicksearch/v2/conversion', [
'body' => '{
"conversion": [
{
"adGroupId": "",
"adId": "",
"advertiserId": "",
"agencyId": "",
"attributionModel": "",
"campaignId": "",
"channel": "",
"clickId": "",
"conversionId": "",
"conversionModifiedTimestamp": "",
"conversionTimestamp": "",
"countMillis": "",
"criterionId": "",
"currencyCode": "",
"customDimension": [
{
"name": "",
"value": ""
}
],
"customMetric": [
{
"name": "",
"value": ""
}
],
"customerId": "",
"deviceType": "",
"dsConversionId": "",
"engineAccountId": "",
"floodlightOrderId": "",
"inventoryAccountId": "",
"productCountry": "",
"productGroupId": "",
"productId": "",
"productLanguage": "",
"quantityMillis": "",
"revenueMicros": "",
"segmentationId": "",
"segmentationName": "",
"segmentationType": "",
"state": "",
"storeId": "",
"type": ""
}
],
"kind": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/doubleclicksearch/v2/conversion');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'conversion' => [
[
'adGroupId' => '',
'adId' => '',
'advertiserId' => '',
'agencyId' => '',
'attributionModel' => '',
'campaignId' => '',
'channel' => '',
'clickId' => '',
'conversionId' => '',
'conversionModifiedTimestamp' => '',
'conversionTimestamp' => '',
'countMillis' => '',
'criterionId' => '',
'currencyCode' => '',
'customDimension' => [
[
'name' => '',
'value' => ''
]
],
'customMetric' => [
[
'name' => '',
'value' => ''
]
],
'customerId' => '',
'deviceType' => '',
'dsConversionId' => '',
'engineAccountId' => '',
'floodlightOrderId' => '',
'inventoryAccountId' => '',
'productCountry' => '',
'productGroupId' => '',
'productId' => '',
'productLanguage' => '',
'quantityMillis' => '',
'revenueMicros' => '',
'segmentationId' => '',
'segmentationName' => '',
'segmentationType' => '',
'state' => '',
'storeId' => '',
'type' => ''
]
],
'kind' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'conversion' => [
[
'adGroupId' => '',
'adId' => '',
'advertiserId' => '',
'agencyId' => '',
'attributionModel' => '',
'campaignId' => '',
'channel' => '',
'clickId' => '',
'conversionId' => '',
'conversionModifiedTimestamp' => '',
'conversionTimestamp' => '',
'countMillis' => '',
'criterionId' => '',
'currencyCode' => '',
'customDimension' => [
[
'name' => '',
'value' => ''
]
],
'customMetric' => [
[
'name' => '',
'value' => ''
]
],
'customerId' => '',
'deviceType' => '',
'dsConversionId' => '',
'engineAccountId' => '',
'floodlightOrderId' => '',
'inventoryAccountId' => '',
'productCountry' => '',
'productGroupId' => '',
'productId' => '',
'productLanguage' => '',
'quantityMillis' => '',
'revenueMicros' => '',
'segmentationId' => '',
'segmentationName' => '',
'segmentationType' => '',
'state' => '',
'storeId' => '',
'type' => ''
]
],
'kind' => ''
]));
$request->setRequestUrl('{{baseUrl}}/doubleclicksearch/v2/conversion');
$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}}/doubleclicksearch/v2/conversion' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"conversion": [
{
"adGroupId": "",
"adId": "",
"advertiserId": "",
"agencyId": "",
"attributionModel": "",
"campaignId": "",
"channel": "",
"clickId": "",
"conversionId": "",
"conversionModifiedTimestamp": "",
"conversionTimestamp": "",
"countMillis": "",
"criterionId": "",
"currencyCode": "",
"customDimension": [
{
"name": "",
"value": ""
}
],
"customMetric": [
{
"name": "",
"value": ""
}
],
"customerId": "",
"deviceType": "",
"dsConversionId": "",
"engineAccountId": "",
"floodlightOrderId": "",
"inventoryAccountId": "",
"productCountry": "",
"productGroupId": "",
"productId": "",
"productLanguage": "",
"quantityMillis": "",
"revenueMicros": "",
"segmentationId": "",
"segmentationName": "",
"segmentationType": "",
"state": "",
"storeId": "",
"type": ""
}
],
"kind": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/doubleclicksearch/v2/conversion' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"conversion": [
{
"adGroupId": "",
"adId": "",
"advertiserId": "",
"agencyId": "",
"attributionModel": "",
"campaignId": "",
"channel": "",
"clickId": "",
"conversionId": "",
"conversionModifiedTimestamp": "",
"conversionTimestamp": "",
"countMillis": "",
"criterionId": "",
"currencyCode": "",
"customDimension": [
{
"name": "",
"value": ""
}
],
"customMetric": [
{
"name": "",
"value": ""
}
],
"customerId": "",
"deviceType": "",
"dsConversionId": "",
"engineAccountId": "",
"floodlightOrderId": "",
"inventoryAccountId": "",
"productCountry": "",
"productGroupId": "",
"productId": "",
"productLanguage": "",
"quantityMillis": "",
"revenueMicros": "",
"segmentationId": "",
"segmentationName": "",
"segmentationType": "",
"state": "",
"storeId": "",
"type": ""
}
],
"kind": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"conversion\": [\n {\n \"adGroupId\": \"\",\n \"adId\": \"\",\n \"advertiserId\": \"\",\n \"agencyId\": \"\",\n \"attributionModel\": \"\",\n \"campaignId\": \"\",\n \"channel\": \"\",\n \"clickId\": \"\",\n \"conversionId\": \"\",\n \"conversionModifiedTimestamp\": \"\",\n \"conversionTimestamp\": \"\",\n \"countMillis\": \"\",\n \"criterionId\": \"\",\n \"currencyCode\": \"\",\n \"customDimension\": [\n {\n \"name\": \"\",\n \"value\": \"\"\n }\n ],\n \"customMetric\": [\n {\n \"name\": \"\",\n \"value\": \"\"\n }\n ],\n \"customerId\": \"\",\n \"deviceType\": \"\",\n \"dsConversionId\": \"\",\n \"engineAccountId\": \"\",\n \"floodlightOrderId\": \"\",\n \"inventoryAccountId\": \"\",\n \"productCountry\": \"\",\n \"productGroupId\": \"\",\n \"productId\": \"\",\n \"productLanguage\": \"\",\n \"quantityMillis\": \"\",\n \"revenueMicros\": \"\",\n \"segmentationId\": \"\",\n \"segmentationName\": \"\",\n \"segmentationType\": \"\",\n \"state\": \"\",\n \"storeId\": \"\",\n \"type\": \"\"\n }\n ],\n \"kind\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/doubleclicksearch/v2/conversion", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/doubleclicksearch/v2/conversion"
payload = {
"conversion": [
{
"adGroupId": "",
"adId": "",
"advertiserId": "",
"agencyId": "",
"attributionModel": "",
"campaignId": "",
"channel": "",
"clickId": "",
"conversionId": "",
"conversionModifiedTimestamp": "",
"conversionTimestamp": "",
"countMillis": "",
"criterionId": "",
"currencyCode": "",
"customDimension": [
{
"name": "",
"value": ""
}
],
"customMetric": [
{
"name": "",
"value": ""
}
],
"customerId": "",
"deviceType": "",
"dsConversionId": "",
"engineAccountId": "",
"floodlightOrderId": "",
"inventoryAccountId": "",
"productCountry": "",
"productGroupId": "",
"productId": "",
"productLanguage": "",
"quantityMillis": "",
"revenueMicros": "",
"segmentationId": "",
"segmentationName": "",
"segmentationType": "",
"state": "",
"storeId": "",
"type": ""
}
],
"kind": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/doubleclicksearch/v2/conversion"
payload <- "{\n \"conversion\": [\n {\n \"adGroupId\": \"\",\n \"adId\": \"\",\n \"advertiserId\": \"\",\n \"agencyId\": \"\",\n \"attributionModel\": \"\",\n \"campaignId\": \"\",\n \"channel\": \"\",\n \"clickId\": \"\",\n \"conversionId\": \"\",\n \"conversionModifiedTimestamp\": \"\",\n \"conversionTimestamp\": \"\",\n \"countMillis\": \"\",\n \"criterionId\": \"\",\n \"currencyCode\": \"\",\n \"customDimension\": [\n {\n \"name\": \"\",\n \"value\": \"\"\n }\n ],\n \"customMetric\": [\n {\n \"name\": \"\",\n \"value\": \"\"\n }\n ],\n \"customerId\": \"\",\n \"deviceType\": \"\",\n \"dsConversionId\": \"\",\n \"engineAccountId\": \"\",\n \"floodlightOrderId\": \"\",\n \"inventoryAccountId\": \"\",\n \"productCountry\": \"\",\n \"productGroupId\": \"\",\n \"productId\": \"\",\n \"productLanguage\": \"\",\n \"quantityMillis\": \"\",\n \"revenueMicros\": \"\",\n \"segmentationId\": \"\",\n \"segmentationName\": \"\",\n \"segmentationType\": \"\",\n \"state\": \"\",\n \"storeId\": \"\",\n \"type\": \"\"\n }\n ],\n \"kind\": \"\"\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}}/doubleclicksearch/v2/conversion")
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 \"conversion\": [\n {\n \"adGroupId\": \"\",\n \"adId\": \"\",\n \"advertiserId\": \"\",\n \"agencyId\": \"\",\n \"attributionModel\": \"\",\n \"campaignId\": \"\",\n \"channel\": \"\",\n \"clickId\": \"\",\n \"conversionId\": \"\",\n \"conversionModifiedTimestamp\": \"\",\n \"conversionTimestamp\": \"\",\n \"countMillis\": \"\",\n \"criterionId\": \"\",\n \"currencyCode\": \"\",\n \"customDimension\": [\n {\n \"name\": \"\",\n \"value\": \"\"\n }\n ],\n \"customMetric\": [\n {\n \"name\": \"\",\n \"value\": \"\"\n }\n ],\n \"customerId\": \"\",\n \"deviceType\": \"\",\n \"dsConversionId\": \"\",\n \"engineAccountId\": \"\",\n \"floodlightOrderId\": \"\",\n \"inventoryAccountId\": \"\",\n \"productCountry\": \"\",\n \"productGroupId\": \"\",\n \"productId\": \"\",\n \"productLanguage\": \"\",\n \"quantityMillis\": \"\",\n \"revenueMicros\": \"\",\n \"segmentationId\": \"\",\n \"segmentationName\": \"\",\n \"segmentationType\": \"\",\n \"state\": \"\",\n \"storeId\": \"\",\n \"type\": \"\"\n }\n ],\n \"kind\": \"\"\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/doubleclicksearch/v2/conversion') do |req|
req.body = "{\n \"conversion\": [\n {\n \"adGroupId\": \"\",\n \"adId\": \"\",\n \"advertiserId\": \"\",\n \"agencyId\": \"\",\n \"attributionModel\": \"\",\n \"campaignId\": \"\",\n \"channel\": \"\",\n \"clickId\": \"\",\n \"conversionId\": \"\",\n \"conversionModifiedTimestamp\": \"\",\n \"conversionTimestamp\": \"\",\n \"countMillis\": \"\",\n \"criterionId\": \"\",\n \"currencyCode\": \"\",\n \"customDimension\": [\n {\n \"name\": \"\",\n \"value\": \"\"\n }\n ],\n \"customMetric\": [\n {\n \"name\": \"\",\n \"value\": \"\"\n }\n ],\n \"customerId\": \"\",\n \"deviceType\": \"\",\n \"dsConversionId\": \"\",\n \"engineAccountId\": \"\",\n \"floodlightOrderId\": \"\",\n \"inventoryAccountId\": \"\",\n \"productCountry\": \"\",\n \"productGroupId\": \"\",\n \"productId\": \"\",\n \"productLanguage\": \"\",\n \"quantityMillis\": \"\",\n \"revenueMicros\": \"\",\n \"segmentationId\": \"\",\n \"segmentationName\": \"\",\n \"segmentationType\": \"\",\n \"state\": \"\",\n \"storeId\": \"\",\n \"type\": \"\"\n }\n ],\n \"kind\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/doubleclicksearch/v2/conversion";
let payload = json!({
"conversion": (
json!({
"adGroupId": "",
"adId": "",
"advertiserId": "",
"agencyId": "",
"attributionModel": "",
"campaignId": "",
"channel": "",
"clickId": "",
"conversionId": "",
"conversionModifiedTimestamp": "",
"conversionTimestamp": "",
"countMillis": "",
"criterionId": "",
"currencyCode": "",
"customDimension": (
json!({
"name": "",
"value": ""
})
),
"customMetric": (
json!({
"name": "",
"value": ""
})
),
"customerId": "",
"deviceType": "",
"dsConversionId": "",
"engineAccountId": "",
"floodlightOrderId": "",
"inventoryAccountId": "",
"productCountry": "",
"productGroupId": "",
"productId": "",
"productLanguage": "",
"quantityMillis": "",
"revenueMicros": "",
"segmentationId": "",
"segmentationName": "",
"segmentationType": "",
"state": "",
"storeId": "",
"type": ""
})
),
"kind": ""
});
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}}/doubleclicksearch/v2/conversion \
--header 'content-type: application/json' \
--data '{
"conversion": [
{
"adGroupId": "",
"adId": "",
"advertiserId": "",
"agencyId": "",
"attributionModel": "",
"campaignId": "",
"channel": "",
"clickId": "",
"conversionId": "",
"conversionModifiedTimestamp": "",
"conversionTimestamp": "",
"countMillis": "",
"criterionId": "",
"currencyCode": "",
"customDimension": [
{
"name": "",
"value": ""
}
],
"customMetric": [
{
"name": "",
"value": ""
}
],
"customerId": "",
"deviceType": "",
"dsConversionId": "",
"engineAccountId": "",
"floodlightOrderId": "",
"inventoryAccountId": "",
"productCountry": "",
"productGroupId": "",
"productId": "",
"productLanguage": "",
"quantityMillis": "",
"revenueMicros": "",
"segmentationId": "",
"segmentationName": "",
"segmentationType": "",
"state": "",
"storeId": "",
"type": ""
}
],
"kind": ""
}'
echo '{
"conversion": [
{
"adGroupId": "",
"adId": "",
"advertiserId": "",
"agencyId": "",
"attributionModel": "",
"campaignId": "",
"channel": "",
"clickId": "",
"conversionId": "",
"conversionModifiedTimestamp": "",
"conversionTimestamp": "",
"countMillis": "",
"criterionId": "",
"currencyCode": "",
"customDimension": [
{
"name": "",
"value": ""
}
],
"customMetric": [
{
"name": "",
"value": ""
}
],
"customerId": "",
"deviceType": "",
"dsConversionId": "",
"engineAccountId": "",
"floodlightOrderId": "",
"inventoryAccountId": "",
"productCountry": "",
"productGroupId": "",
"productId": "",
"productLanguage": "",
"quantityMillis": "",
"revenueMicros": "",
"segmentationId": "",
"segmentationName": "",
"segmentationType": "",
"state": "",
"storeId": "",
"type": ""
}
],
"kind": ""
}' | \
http POST {{baseUrl}}/doubleclicksearch/v2/conversion \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "conversion": [\n {\n "adGroupId": "",\n "adId": "",\n "advertiserId": "",\n "agencyId": "",\n "attributionModel": "",\n "campaignId": "",\n "channel": "",\n "clickId": "",\n "conversionId": "",\n "conversionModifiedTimestamp": "",\n "conversionTimestamp": "",\n "countMillis": "",\n "criterionId": "",\n "currencyCode": "",\n "customDimension": [\n {\n "name": "",\n "value": ""\n }\n ],\n "customMetric": [\n {\n "name": "",\n "value": ""\n }\n ],\n "customerId": "",\n "deviceType": "",\n "dsConversionId": "",\n "engineAccountId": "",\n "floodlightOrderId": "",\n "inventoryAccountId": "",\n "productCountry": "",\n "productGroupId": "",\n "productId": "",\n "productLanguage": "",\n "quantityMillis": "",\n "revenueMicros": "",\n "segmentationId": "",\n "segmentationName": "",\n "segmentationType": "",\n "state": "",\n "storeId": "",\n "type": ""\n }\n ],\n "kind": ""\n}' \
--output-document \
- {{baseUrl}}/doubleclicksearch/v2/conversion
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"conversion": [
[
"adGroupId": "",
"adId": "",
"advertiserId": "",
"agencyId": "",
"attributionModel": "",
"campaignId": "",
"channel": "",
"clickId": "",
"conversionId": "",
"conversionModifiedTimestamp": "",
"conversionTimestamp": "",
"countMillis": "",
"criterionId": "",
"currencyCode": "",
"customDimension": [
[
"name": "",
"value": ""
]
],
"customMetric": [
[
"name": "",
"value": ""
]
],
"customerId": "",
"deviceType": "",
"dsConversionId": "",
"engineAccountId": "",
"floodlightOrderId": "",
"inventoryAccountId": "",
"productCountry": "",
"productGroupId": "",
"productId": "",
"productLanguage": "",
"quantityMillis": "",
"revenueMicros": "",
"segmentationId": "",
"segmentationName": "",
"segmentationType": "",
"state": "",
"storeId": "",
"type": ""
]
],
"kind": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/doubleclicksearch/v2/conversion")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PUT
doubleclicksearch.conversion.update
{{baseUrl}}/doubleclicksearch/v2/conversion
BODY json
{
"conversion": [
{
"adGroupId": "",
"adId": "",
"advertiserId": "",
"agencyId": "",
"attributionModel": "",
"campaignId": "",
"channel": "",
"clickId": "",
"conversionId": "",
"conversionModifiedTimestamp": "",
"conversionTimestamp": "",
"countMillis": "",
"criterionId": "",
"currencyCode": "",
"customDimension": [
{
"name": "",
"value": ""
}
],
"customMetric": [
{
"name": "",
"value": ""
}
],
"customerId": "",
"deviceType": "",
"dsConversionId": "",
"engineAccountId": "",
"floodlightOrderId": "",
"inventoryAccountId": "",
"productCountry": "",
"productGroupId": "",
"productId": "",
"productLanguage": "",
"quantityMillis": "",
"revenueMicros": "",
"segmentationId": "",
"segmentationName": "",
"segmentationType": "",
"state": "",
"storeId": "",
"type": ""
}
],
"kind": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/doubleclicksearch/v2/conversion");
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 \"conversion\": [\n {\n \"adGroupId\": \"\",\n \"adId\": \"\",\n \"advertiserId\": \"\",\n \"agencyId\": \"\",\n \"attributionModel\": \"\",\n \"campaignId\": \"\",\n \"channel\": \"\",\n \"clickId\": \"\",\n \"conversionId\": \"\",\n \"conversionModifiedTimestamp\": \"\",\n \"conversionTimestamp\": \"\",\n \"countMillis\": \"\",\n \"criterionId\": \"\",\n \"currencyCode\": \"\",\n \"customDimension\": [\n {\n \"name\": \"\",\n \"value\": \"\"\n }\n ],\n \"customMetric\": [\n {\n \"name\": \"\",\n \"value\": \"\"\n }\n ],\n \"customerId\": \"\",\n \"deviceType\": \"\",\n \"dsConversionId\": \"\",\n \"engineAccountId\": \"\",\n \"floodlightOrderId\": \"\",\n \"inventoryAccountId\": \"\",\n \"productCountry\": \"\",\n \"productGroupId\": \"\",\n \"productId\": \"\",\n \"productLanguage\": \"\",\n \"quantityMillis\": \"\",\n \"revenueMicros\": \"\",\n \"segmentationId\": \"\",\n \"segmentationName\": \"\",\n \"segmentationType\": \"\",\n \"state\": \"\",\n \"storeId\": \"\",\n \"type\": \"\"\n }\n ],\n \"kind\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/doubleclicksearch/v2/conversion" {:content-type :json
:form-params {:conversion [{:adGroupId ""
:adId ""
:advertiserId ""
:agencyId ""
:attributionModel ""
:campaignId ""
:channel ""
:clickId ""
:conversionId ""
:conversionModifiedTimestamp ""
:conversionTimestamp ""
:countMillis ""
:criterionId ""
:currencyCode ""
:customDimension [{:name ""
:value ""}]
:customMetric [{:name ""
:value ""}]
:customerId ""
:deviceType ""
:dsConversionId ""
:engineAccountId ""
:floodlightOrderId ""
:inventoryAccountId ""
:productCountry ""
:productGroupId ""
:productId ""
:productLanguage ""
:quantityMillis ""
:revenueMicros ""
:segmentationId ""
:segmentationName ""
:segmentationType ""
:state ""
:storeId ""
:type ""}]
:kind ""}})
require "http/client"
url = "{{baseUrl}}/doubleclicksearch/v2/conversion"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"conversion\": [\n {\n \"adGroupId\": \"\",\n \"adId\": \"\",\n \"advertiserId\": \"\",\n \"agencyId\": \"\",\n \"attributionModel\": \"\",\n \"campaignId\": \"\",\n \"channel\": \"\",\n \"clickId\": \"\",\n \"conversionId\": \"\",\n \"conversionModifiedTimestamp\": \"\",\n \"conversionTimestamp\": \"\",\n \"countMillis\": \"\",\n \"criterionId\": \"\",\n \"currencyCode\": \"\",\n \"customDimension\": [\n {\n \"name\": \"\",\n \"value\": \"\"\n }\n ],\n \"customMetric\": [\n {\n \"name\": \"\",\n \"value\": \"\"\n }\n ],\n \"customerId\": \"\",\n \"deviceType\": \"\",\n \"dsConversionId\": \"\",\n \"engineAccountId\": \"\",\n \"floodlightOrderId\": \"\",\n \"inventoryAccountId\": \"\",\n \"productCountry\": \"\",\n \"productGroupId\": \"\",\n \"productId\": \"\",\n \"productLanguage\": \"\",\n \"quantityMillis\": \"\",\n \"revenueMicros\": \"\",\n \"segmentationId\": \"\",\n \"segmentationName\": \"\",\n \"segmentationType\": \"\",\n \"state\": \"\",\n \"storeId\": \"\",\n \"type\": \"\"\n }\n ],\n \"kind\": \"\"\n}"
response = HTTP::Client.put url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Put,
RequestUri = new Uri("{{baseUrl}}/doubleclicksearch/v2/conversion"),
Content = new StringContent("{\n \"conversion\": [\n {\n \"adGroupId\": \"\",\n \"adId\": \"\",\n \"advertiserId\": \"\",\n \"agencyId\": \"\",\n \"attributionModel\": \"\",\n \"campaignId\": \"\",\n \"channel\": \"\",\n \"clickId\": \"\",\n \"conversionId\": \"\",\n \"conversionModifiedTimestamp\": \"\",\n \"conversionTimestamp\": \"\",\n \"countMillis\": \"\",\n \"criterionId\": \"\",\n \"currencyCode\": \"\",\n \"customDimension\": [\n {\n \"name\": \"\",\n \"value\": \"\"\n }\n ],\n \"customMetric\": [\n {\n \"name\": \"\",\n \"value\": \"\"\n }\n ],\n \"customerId\": \"\",\n \"deviceType\": \"\",\n \"dsConversionId\": \"\",\n \"engineAccountId\": \"\",\n \"floodlightOrderId\": \"\",\n \"inventoryAccountId\": \"\",\n \"productCountry\": \"\",\n \"productGroupId\": \"\",\n \"productId\": \"\",\n \"productLanguage\": \"\",\n \"quantityMillis\": \"\",\n \"revenueMicros\": \"\",\n \"segmentationId\": \"\",\n \"segmentationName\": \"\",\n \"segmentationType\": \"\",\n \"state\": \"\",\n \"storeId\": \"\",\n \"type\": \"\"\n }\n ],\n \"kind\": \"\"\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}}/doubleclicksearch/v2/conversion");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"conversion\": [\n {\n \"adGroupId\": \"\",\n \"adId\": \"\",\n \"advertiserId\": \"\",\n \"agencyId\": \"\",\n \"attributionModel\": \"\",\n \"campaignId\": \"\",\n \"channel\": \"\",\n \"clickId\": \"\",\n \"conversionId\": \"\",\n \"conversionModifiedTimestamp\": \"\",\n \"conversionTimestamp\": \"\",\n \"countMillis\": \"\",\n \"criterionId\": \"\",\n \"currencyCode\": \"\",\n \"customDimension\": [\n {\n \"name\": \"\",\n \"value\": \"\"\n }\n ],\n \"customMetric\": [\n {\n \"name\": \"\",\n \"value\": \"\"\n }\n ],\n \"customerId\": \"\",\n \"deviceType\": \"\",\n \"dsConversionId\": \"\",\n \"engineAccountId\": \"\",\n \"floodlightOrderId\": \"\",\n \"inventoryAccountId\": \"\",\n \"productCountry\": \"\",\n \"productGroupId\": \"\",\n \"productId\": \"\",\n \"productLanguage\": \"\",\n \"quantityMillis\": \"\",\n \"revenueMicros\": \"\",\n \"segmentationId\": \"\",\n \"segmentationName\": \"\",\n \"segmentationType\": \"\",\n \"state\": \"\",\n \"storeId\": \"\",\n \"type\": \"\"\n }\n ],\n \"kind\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/doubleclicksearch/v2/conversion"
payload := strings.NewReader("{\n \"conversion\": [\n {\n \"adGroupId\": \"\",\n \"adId\": \"\",\n \"advertiserId\": \"\",\n \"agencyId\": \"\",\n \"attributionModel\": \"\",\n \"campaignId\": \"\",\n \"channel\": \"\",\n \"clickId\": \"\",\n \"conversionId\": \"\",\n \"conversionModifiedTimestamp\": \"\",\n \"conversionTimestamp\": \"\",\n \"countMillis\": \"\",\n \"criterionId\": \"\",\n \"currencyCode\": \"\",\n \"customDimension\": [\n {\n \"name\": \"\",\n \"value\": \"\"\n }\n ],\n \"customMetric\": [\n {\n \"name\": \"\",\n \"value\": \"\"\n }\n ],\n \"customerId\": \"\",\n \"deviceType\": \"\",\n \"dsConversionId\": \"\",\n \"engineAccountId\": \"\",\n \"floodlightOrderId\": \"\",\n \"inventoryAccountId\": \"\",\n \"productCountry\": \"\",\n \"productGroupId\": \"\",\n \"productId\": \"\",\n \"productLanguage\": \"\",\n \"quantityMillis\": \"\",\n \"revenueMicros\": \"\",\n \"segmentationId\": \"\",\n \"segmentationName\": \"\",\n \"segmentationType\": \"\",\n \"state\": \"\",\n \"storeId\": \"\",\n \"type\": \"\"\n }\n ],\n \"kind\": \"\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
PUT /baseUrl/doubleclicksearch/v2/conversion HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 1085
{
"conversion": [
{
"adGroupId": "",
"adId": "",
"advertiserId": "",
"agencyId": "",
"attributionModel": "",
"campaignId": "",
"channel": "",
"clickId": "",
"conversionId": "",
"conversionModifiedTimestamp": "",
"conversionTimestamp": "",
"countMillis": "",
"criterionId": "",
"currencyCode": "",
"customDimension": [
{
"name": "",
"value": ""
}
],
"customMetric": [
{
"name": "",
"value": ""
}
],
"customerId": "",
"deviceType": "",
"dsConversionId": "",
"engineAccountId": "",
"floodlightOrderId": "",
"inventoryAccountId": "",
"productCountry": "",
"productGroupId": "",
"productId": "",
"productLanguage": "",
"quantityMillis": "",
"revenueMicros": "",
"segmentationId": "",
"segmentationName": "",
"segmentationType": "",
"state": "",
"storeId": "",
"type": ""
}
],
"kind": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/doubleclicksearch/v2/conversion")
.setHeader("content-type", "application/json")
.setBody("{\n \"conversion\": [\n {\n \"adGroupId\": \"\",\n \"adId\": \"\",\n \"advertiserId\": \"\",\n \"agencyId\": \"\",\n \"attributionModel\": \"\",\n \"campaignId\": \"\",\n \"channel\": \"\",\n \"clickId\": \"\",\n \"conversionId\": \"\",\n \"conversionModifiedTimestamp\": \"\",\n \"conversionTimestamp\": \"\",\n \"countMillis\": \"\",\n \"criterionId\": \"\",\n \"currencyCode\": \"\",\n \"customDimension\": [\n {\n \"name\": \"\",\n \"value\": \"\"\n }\n ],\n \"customMetric\": [\n {\n \"name\": \"\",\n \"value\": \"\"\n }\n ],\n \"customerId\": \"\",\n \"deviceType\": \"\",\n \"dsConversionId\": \"\",\n \"engineAccountId\": \"\",\n \"floodlightOrderId\": \"\",\n \"inventoryAccountId\": \"\",\n \"productCountry\": \"\",\n \"productGroupId\": \"\",\n \"productId\": \"\",\n \"productLanguage\": \"\",\n \"quantityMillis\": \"\",\n \"revenueMicros\": \"\",\n \"segmentationId\": \"\",\n \"segmentationName\": \"\",\n \"segmentationType\": \"\",\n \"state\": \"\",\n \"storeId\": \"\",\n \"type\": \"\"\n }\n ],\n \"kind\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/doubleclicksearch/v2/conversion"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"conversion\": [\n {\n \"adGroupId\": \"\",\n \"adId\": \"\",\n \"advertiserId\": \"\",\n \"agencyId\": \"\",\n \"attributionModel\": \"\",\n \"campaignId\": \"\",\n \"channel\": \"\",\n \"clickId\": \"\",\n \"conversionId\": \"\",\n \"conversionModifiedTimestamp\": \"\",\n \"conversionTimestamp\": \"\",\n \"countMillis\": \"\",\n \"criterionId\": \"\",\n \"currencyCode\": \"\",\n \"customDimension\": [\n {\n \"name\": \"\",\n \"value\": \"\"\n }\n ],\n \"customMetric\": [\n {\n \"name\": \"\",\n \"value\": \"\"\n }\n ],\n \"customerId\": \"\",\n \"deviceType\": \"\",\n \"dsConversionId\": \"\",\n \"engineAccountId\": \"\",\n \"floodlightOrderId\": \"\",\n \"inventoryAccountId\": \"\",\n \"productCountry\": \"\",\n \"productGroupId\": \"\",\n \"productId\": \"\",\n \"productLanguage\": \"\",\n \"quantityMillis\": \"\",\n \"revenueMicros\": \"\",\n \"segmentationId\": \"\",\n \"segmentationName\": \"\",\n \"segmentationType\": \"\",\n \"state\": \"\",\n \"storeId\": \"\",\n \"type\": \"\"\n }\n ],\n \"kind\": \"\"\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 \"conversion\": [\n {\n \"adGroupId\": \"\",\n \"adId\": \"\",\n \"advertiserId\": \"\",\n \"agencyId\": \"\",\n \"attributionModel\": \"\",\n \"campaignId\": \"\",\n \"channel\": \"\",\n \"clickId\": \"\",\n \"conversionId\": \"\",\n \"conversionModifiedTimestamp\": \"\",\n \"conversionTimestamp\": \"\",\n \"countMillis\": \"\",\n \"criterionId\": \"\",\n \"currencyCode\": \"\",\n \"customDimension\": [\n {\n \"name\": \"\",\n \"value\": \"\"\n }\n ],\n \"customMetric\": [\n {\n \"name\": \"\",\n \"value\": \"\"\n }\n ],\n \"customerId\": \"\",\n \"deviceType\": \"\",\n \"dsConversionId\": \"\",\n \"engineAccountId\": \"\",\n \"floodlightOrderId\": \"\",\n \"inventoryAccountId\": \"\",\n \"productCountry\": \"\",\n \"productGroupId\": \"\",\n \"productId\": \"\",\n \"productLanguage\": \"\",\n \"quantityMillis\": \"\",\n \"revenueMicros\": \"\",\n \"segmentationId\": \"\",\n \"segmentationName\": \"\",\n \"segmentationType\": \"\",\n \"state\": \"\",\n \"storeId\": \"\",\n \"type\": \"\"\n }\n ],\n \"kind\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/doubleclicksearch/v2/conversion")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/doubleclicksearch/v2/conversion")
.header("content-type", "application/json")
.body("{\n \"conversion\": [\n {\n \"adGroupId\": \"\",\n \"adId\": \"\",\n \"advertiserId\": \"\",\n \"agencyId\": \"\",\n \"attributionModel\": \"\",\n \"campaignId\": \"\",\n \"channel\": \"\",\n \"clickId\": \"\",\n \"conversionId\": \"\",\n \"conversionModifiedTimestamp\": \"\",\n \"conversionTimestamp\": \"\",\n \"countMillis\": \"\",\n \"criterionId\": \"\",\n \"currencyCode\": \"\",\n \"customDimension\": [\n {\n \"name\": \"\",\n \"value\": \"\"\n }\n ],\n \"customMetric\": [\n {\n \"name\": \"\",\n \"value\": \"\"\n }\n ],\n \"customerId\": \"\",\n \"deviceType\": \"\",\n \"dsConversionId\": \"\",\n \"engineAccountId\": \"\",\n \"floodlightOrderId\": \"\",\n \"inventoryAccountId\": \"\",\n \"productCountry\": \"\",\n \"productGroupId\": \"\",\n \"productId\": \"\",\n \"productLanguage\": \"\",\n \"quantityMillis\": \"\",\n \"revenueMicros\": \"\",\n \"segmentationId\": \"\",\n \"segmentationName\": \"\",\n \"segmentationType\": \"\",\n \"state\": \"\",\n \"storeId\": \"\",\n \"type\": \"\"\n }\n ],\n \"kind\": \"\"\n}")
.asString();
const data = JSON.stringify({
conversion: [
{
adGroupId: '',
adId: '',
advertiserId: '',
agencyId: '',
attributionModel: '',
campaignId: '',
channel: '',
clickId: '',
conversionId: '',
conversionModifiedTimestamp: '',
conversionTimestamp: '',
countMillis: '',
criterionId: '',
currencyCode: '',
customDimension: [
{
name: '',
value: ''
}
],
customMetric: [
{
name: '',
value: ''
}
],
customerId: '',
deviceType: '',
dsConversionId: '',
engineAccountId: '',
floodlightOrderId: '',
inventoryAccountId: '',
productCountry: '',
productGroupId: '',
productId: '',
productLanguage: '',
quantityMillis: '',
revenueMicros: '',
segmentationId: '',
segmentationName: '',
segmentationType: '',
state: '',
storeId: '',
type: ''
}
],
kind: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/doubleclicksearch/v2/conversion');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/doubleclicksearch/v2/conversion',
headers: {'content-type': 'application/json'},
data: {
conversion: [
{
adGroupId: '',
adId: '',
advertiserId: '',
agencyId: '',
attributionModel: '',
campaignId: '',
channel: '',
clickId: '',
conversionId: '',
conversionModifiedTimestamp: '',
conversionTimestamp: '',
countMillis: '',
criterionId: '',
currencyCode: '',
customDimension: [{name: '', value: ''}],
customMetric: [{name: '', value: ''}],
customerId: '',
deviceType: '',
dsConversionId: '',
engineAccountId: '',
floodlightOrderId: '',
inventoryAccountId: '',
productCountry: '',
productGroupId: '',
productId: '',
productLanguage: '',
quantityMillis: '',
revenueMicros: '',
segmentationId: '',
segmentationName: '',
segmentationType: '',
state: '',
storeId: '',
type: ''
}
],
kind: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/doubleclicksearch/v2/conversion';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"conversion":[{"adGroupId":"","adId":"","advertiserId":"","agencyId":"","attributionModel":"","campaignId":"","channel":"","clickId":"","conversionId":"","conversionModifiedTimestamp":"","conversionTimestamp":"","countMillis":"","criterionId":"","currencyCode":"","customDimension":[{"name":"","value":""}],"customMetric":[{"name":"","value":""}],"customerId":"","deviceType":"","dsConversionId":"","engineAccountId":"","floodlightOrderId":"","inventoryAccountId":"","productCountry":"","productGroupId":"","productId":"","productLanguage":"","quantityMillis":"","revenueMicros":"","segmentationId":"","segmentationName":"","segmentationType":"","state":"","storeId":"","type":""}],"kind":""}'
};
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}}/doubleclicksearch/v2/conversion',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "conversion": [\n {\n "adGroupId": "",\n "adId": "",\n "advertiserId": "",\n "agencyId": "",\n "attributionModel": "",\n "campaignId": "",\n "channel": "",\n "clickId": "",\n "conversionId": "",\n "conversionModifiedTimestamp": "",\n "conversionTimestamp": "",\n "countMillis": "",\n "criterionId": "",\n "currencyCode": "",\n "customDimension": [\n {\n "name": "",\n "value": ""\n }\n ],\n "customMetric": [\n {\n "name": "",\n "value": ""\n }\n ],\n "customerId": "",\n "deviceType": "",\n "dsConversionId": "",\n "engineAccountId": "",\n "floodlightOrderId": "",\n "inventoryAccountId": "",\n "productCountry": "",\n "productGroupId": "",\n "productId": "",\n "productLanguage": "",\n "quantityMillis": "",\n "revenueMicros": "",\n "segmentationId": "",\n "segmentationName": "",\n "segmentationType": "",\n "state": "",\n "storeId": "",\n "type": ""\n }\n ],\n "kind": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"conversion\": [\n {\n \"adGroupId\": \"\",\n \"adId\": \"\",\n \"advertiserId\": \"\",\n \"agencyId\": \"\",\n \"attributionModel\": \"\",\n \"campaignId\": \"\",\n \"channel\": \"\",\n \"clickId\": \"\",\n \"conversionId\": \"\",\n \"conversionModifiedTimestamp\": \"\",\n \"conversionTimestamp\": \"\",\n \"countMillis\": \"\",\n \"criterionId\": \"\",\n \"currencyCode\": \"\",\n \"customDimension\": [\n {\n \"name\": \"\",\n \"value\": \"\"\n }\n ],\n \"customMetric\": [\n {\n \"name\": \"\",\n \"value\": \"\"\n }\n ],\n \"customerId\": \"\",\n \"deviceType\": \"\",\n \"dsConversionId\": \"\",\n \"engineAccountId\": \"\",\n \"floodlightOrderId\": \"\",\n \"inventoryAccountId\": \"\",\n \"productCountry\": \"\",\n \"productGroupId\": \"\",\n \"productId\": \"\",\n \"productLanguage\": \"\",\n \"quantityMillis\": \"\",\n \"revenueMicros\": \"\",\n \"segmentationId\": \"\",\n \"segmentationName\": \"\",\n \"segmentationType\": \"\",\n \"state\": \"\",\n \"storeId\": \"\",\n \"type\": \"\"\n }\n ],\n \"kind\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/doubleclicksearch/v2/conversion")
.put(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PUT',
hostname: 'example.com',
port: null,
path: '/baseUrl/doubleclicksearch/v2/conversion',
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({
conversion: [
{
adGroupId: '',
adId: '',
advertiserId: '',
agencyId: '',
attributionModel: '',
campaignId: '',
channel: '',
clickId: '',
conversionId: '',
conversionModifiedTimestamp: '',
conversionTimestamp: '',
countMillis: '',
criterionId: '',
currencyCode: '',
customDimension: [{name: '', value: ''}],
customMetric: [{name: '', value: ''}],
customerId: '',
deviceType: '',
dsConversionId: '',
engineAccountId: '',
floodlightOrderId: '',
inventoryAccountId: '',
productCountry: '',
productGroupId: '',
productId: '',
productLanguage: '',
quantityMillis: '',
revenueMicros: '',
segmentationId: '',
segmentationName: '',
segmentationType: '',
state: '',
storeId: '',
type: ''
}
],
kind: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/doubleclicksearch/v2/conversion',
headers: {'content-type': 'application/json'},
body: {
conversion: [
{
adGroupId: '',
adId: '',
advertiserId: '',
agencyId: '',
attributionModel: '',
campaignId: '',
channel: '',
clickId: '',
conversionId: '',
conversionModifiedTimestamp: '',
conversionTimestamp: '',
countMillis: '',
criterionId: '',
currencyCode: '',
customDimension: [{name: '', value: ''}],
customMetric: [{name: '', value: ''}],
customerId: '',
deviceType: '',
dsConversionId: '',
engineAccountId: '',
floodlightOrderId: '',
inventoryAccountId: '',
productCountry: '',
productGroupId: '',
productId: '',
productLanguage: '',
quantityMillis: '',
revenueMicros: '',
segmentationId: '',
segmentationName: '',
segmentationType: '',
state: '',
storeId: '',
type: ''
}
],
kind: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/doubleclicksearch/v2/conversion');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
conversion: [
{
adGroupId: '',
adId: '',
advertiserId: '',
agencyId: '',
attributionModel: '',
campaignId: '',
channel: '',
clickId: '',
conversionId: '',
conversionModifiedTimestamp: '',
conversionTimestamp: '',
countMillis: '',
criterionId: '',
currencyCode: '',
customDimension: [
{
name: '',
value: ''
}
],
customMetric: [
{
name: '',
value: ''
}
],
customerId: '',
deviceType: '',
dsConversionId: '',
engineAccountId: '',
floodlightOrderId: '',
inventoryAccountId: '',
productCountry: '',
productGroupId: '',
productId: '',
productLanguage: '',
quantityMillis: '',
revenueMicros: '',
segmentationId: '',
segmentationName: '',
segmentationType: '',
state: '',
storeId: '',
type: ''
}
],
kind: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PUT',
url: '{{baseUrl}}/doubleclicksearch/v2/conversion',
headers: {'content-type': 'application/json'},
data: {
conversion: [
{
adGroupId: '',
adId: '',
advertiserId: '',
agencyId: '',
attributionModel: '',
campaignId: '',
channel: '',
clickId: '',
conversionId: '',
conversionModifiedTimestamp: '',
conversionTimestamp: '',
countMillis: '',
criterionId: '',
currencyCode: '',
customDimension: [{name: '', value: ''}],
customMetric: [{name: '', value: ''}],
customerId: '',
deviceType: '',
dsConversionId: '',
engineAccountId: '',
floodlightOrderId: '',
inventoryAccountId: '',
productCountry: '',
productGroupId: '',
productId: '',
productLanguage: '',
quantityMillis: '',
revenueMicros: '',
segmentationId: '',
segmentationName: '',
segmentationType: '',
state: '',
storeId: '',
type: ''
}
],
kind: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/doubleclicksearch/v2/conversion';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"conversion":[{"adGroupId":"","adId":"","advertiserId":"","agencyId":"","attributionModel":"","campaignId":"","channel":"","clickId":"","conversionId":"","conversionModifiedTimestamp":"","conversionTimestamp":"","countMillis":"","criterionId":"","currencyCode":"","customDimension":[{"name":"","value":""}],"customMetric":[{"name":"","value":""}],"customerId":"","deviceType":"","dsConversionId":"","engineAccountId":"","floodlightOrderId":"","inventoryAccountId":"","productCountry":"","productGroupId":"","productId":"","productLanguage":"","quantityMillis":"","revenueMicros":"","segmentationId":"","segmentationName":"","segmentationType":"","state":"","storeId":"","type":""}],"kind":""}'
};
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 = @{ @"conversion": @[ @{ @"adGroupId": @"", @"adId": @"", @"advertiserId": @"", @"agencyId": @"", @"attributionModel": @"", @"campaignId": @"", @"channel": @"", @"clickId": @"", @"conversionId": @"", @"conversionModifiedTimestamp": @"", @"conversionTimestamp": @"", @"countMillis": @"", @"criterionId": @"", @"currencyCode": @"", @"customDimension": @[ @{ @"name": @"", @"value": @"" } ], @"customMetric": @[ @{ @"name": @"", @"value": @"" } ], @"customerId": @"", @"deviceType": @"", @"dsConversionId": @"", @"engineAccountId": @"", @"floodlightOrderId": @"", @"inventoryAccountId": @"", @"productCountry": @"", @"productGroupId": @"", @"productId": @"", @"productLanguage": @"", @"quantityMillis": @"", @"revenueMicros": @"", @"segmentationId": @"", @"segmentationName": @"", @"segmentationType": @"", @"state": @"", @"storeId": @"", @"type": @"" } ],
@"kind": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/doubleclicksearch/v2/conversion"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/doubleclicksearch/v2/conversion" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"conversion\": [\n {\n \"adGroupId\": \"\",\n \"adId\": \"\",\n \"advertiserId\": \"\",\n \"agencyId\": \"\",\n \"attributionModel\": \"\",\n \"campaignId\": \"\",\n \"channel\": \"\",\n \"clickId\": \"\",\n \"conversionId\": \"\",\n \"conversionModifiedTimestamp\": \"\",\n \"conversionTimestamp\": \"\",\n \"countMillis\": \"\",\n \"criterionId\": \"\",\n \"currencyCode\": \"\",\n \"customDimension\": [\n {\n \"name\": \"\",\n \"value\": \"\"\n }\n ],\n \"customMetric\": [\n {\n \"name\": \"\",\n \"value\": \"\"\n }\n ],\n \"customerId\": \"\",\n \"deviceType\": \"\",\n \"dsConversionId\": \"\",\n \"engineAccountId\": \"\",\n \"floodlightOrderId\": \"\",\n \"inventoryAccountId\": \"\",\n \"productCountry\": \"\",\n \"productGroupId\": \"\",\n \"productId\": \"\",\n \"productLanguage\": \"\",\n \"quantityMillis\": \"\",\n \"revenueMicros\": \"\",\n \"segmentationId\": \"\",\n \"segmentationName\": \"\",\n \"segmentationType\": \"\",\n \"state\": \"\",\n \"storeId\": \"\",\n \"type\": \"\"\n }\n ],\n \"kind\": \"\"\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/doubleclicksearch/v2/conversion",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'conversion' => [
[
'adGroupId' => '',
'adId' => '',
'advertiserId' => '',
'agencyId' => '',
'attributionModel' => '',
'campaignId' => '',
'channel' => '',
'clickId' => '',
'conversionId' => '',
'conversionModifiedTimestamp' => '',
'conversionTimestamp' => '',
'countMillis' => '',
'criterionId' => '',
'currencyCode' => '',
'customDimension' => [
[
'name' => '',
'value' => ''
]
],
'customMetric' => [
[
'name' => '',
'value' => ''
]
],
'customerId' => '',
'deviceType' => '',
'dsConversionId' => '',
'engineAccountId' => '',
'floodlightOrderId' => '',
'inventoryAccountId' => '',
'productCountry' => '',
'productGroupId' => '',
'productId' => '',
'productLanguage' => '',
'quantityMillis' => '',
'revenueMicros' => '',
'segmentationId' => '',
'segmentationName' => '',
'segmentationType' => '',
'state' => '',
'storeId' => '',
'type' => ''
]
],
'kind' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PUT', '{{baseUrl}}/doubleclicksearch/v2/conversion', [
'body' => '{
"conversion": [
{
"adGroupId": "",
"adId": "",
"advertiserId": "",
"agencyId": "",
"attributionModel": "",
"campaignId": "",
"channel": "",
"clickId": "",
"conversionId": "",
"conversionModifiedTimestamp": "",
"conversionTimestamp": "",
"countMillis": "",
"criterionId": "",
"currencyCode": "",
"customDimension": [
{
"name": "",
"value": ""
}
],
"customMetric": [
{
"name": "",
"value": ""
}
],
"customerId": "",
"deviceType": "",
"dsConversionId": "",
"engineAccountId": "",
"floodlightOrderId": "",
"inventoryAccountId": "",
"productCountry": "",
"productGroupId": "",
"productId": "",
"productLanguage": "",
"quantityMillis": "",
"revenueMicros": "",
"segmentationId": "",
"segmentationName": "",
"segmentationType": "",
"state": "",
"storeId": "",
"type": ""
}
],
"kind": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/doubleclicksearch/v2/conversion');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'conversion' => [
[
'adGroupId' => '',
'adId' => '',
'advertiserId' => '',
'agencyId' => '',
'attributionModel' => '',
'campaignId' => '',
'channel' => '',
'clickId' => '',
'conversionId' => '',
'conversionModifiedTimestamp' => '',
'conversionTimestamp' => '',
'countMillis' => '',
'criterionId' => '',
'currencyCode' => '',
'customDimension' => [
[
'name' => '',
'value' => ''
]
],
'customMetric' => [
[
'name' => '',
'value' => ''
]
],
'customerId' => '',
'deviceType' => '',
'dsConversionId' => '',
'engineAccountId' => '',
'floodlightOrderId' => '',
'inventoryAccountId' => '',
'productCountry' => '',
'productGroupId' => '',
'productId' => '',
'productLanguage' => '',
'quantityMillis' => '',
'revenueMicros' => '',
'segmentationId' => '',
'segmentationName' => '',
'segmentationType' => '',
'state' => '',
'storeId' => '',
'type' => ''
]
],
'kind' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'conversion' => [
[
'adGroupId' => '',
'adId' => '',
'advertiserId' => '',
'agencyId' => '',
'attributionModel' => '',
'campaignId' => '',
'channel' => '',
'clickId' => '',
'conversionId' => '',
'conversionModifiedTimestamp' => '',
'conversionTimestamp' => '',
'countMillis' => '',
'criterionId' => '',
'currencyCode' => '',
'customDimension' => [
[
'name' => '',
'value' => ''
]
],
'customMetric' => [
[
'name' => '',
'value' => ''
]
],
'customerId' => '',
'deviceType' => '',
'dsConversionId' => '',
'engineAccountId' => '',
'floodlightOrderId' => '',
'inventoryAccountId' => '',
'productCountry' => '',
'productGroupId' => '',
'productId' => '',
'productLanguage' => '',
'quantityMillis' => '',
'revenueMicros' => '',
'segmentationId' => '',
'segmentationName' => '',
'segmentationType' => '',
'state' => '',
'storeId' => '',
'type' => ''
]
],
'kind' => ''
]));
$request->setRequestUrl('{{baseUrl}}/doubleclicksearch/v2/conversion');
$request->setRequestMethod('PUT');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/doubleclicksearch/v2/conversion' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"conversion": [
{
"adGroupId": "",
"adId": "",
"advertiserId": "",
"agencyId": "",
"attributionModel": "",
"campaignId": "",
"channel": "",
"clickId": "",
"conversionId": "",
"conversionModifiedTimestamp": "",
"conversionTimestamp": "",
"countMillis": "",
"criterionId": "",
"currencyCode": "",
"customDimension": [
{
"name": "",
"value": ""
}
],
"customMetric": [
{
"name": "",
"value": ""
}
],
"customerId": "",
"deviceType": "",
"dsConversionId": "",
"engineAccountId": "",
"floodlightOrderId": "",
"inventoryAccountId": "",
"productCountry": "",
"productGroupId": "",
"productId": "",
"productLanguage": "",
"quantityMillis": "",
"revenueMicros": "",
"segmentationId": "",
"segmentationName": "",
"segmentationType": "",
"state": "",
"storeId": "",
"type": ""
}
],
"kind": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/doubleclicksearch/v2/conversion' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"conversion": [
{
"adGroupId": "",
"adId": "",
"advertiserId": "",
"agencyId": "",
"attributionModel": "",
"campaignId": "",
"channel": "",
"clickId": "",
"conversionId": "",
"conversionModifiedTimestamp": "",
"conversionTimestamp": "",
"countMillis": "",
"criterionId": "",
"currencyCode": "",
"customDimension": [
{
"name": "",
"value": ""
}
],
"customMetric": [
{
"name": "",
"value": ""
}
],
"customerId": "",
"deviceType": "",
"dsConversionId": "",
"engineAccountId": "",
"floodlightOrderId": "",
"inventoryAccountId": "",
"productCountry": "",
"productGroupId": "",
"productId": "",
"productLanguage": "",
"quantityMillis": "",
"revenueMicros": "",
"segmentationId": "",
"segmentationName": "",
"segmentationType": "",
"state": "",
"storeId": "",
"type": ""
}
],
"kind": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"conversion\": [\n {\n \"adGroupId\": \"\",\n \"adId\": \"\",\n \"advertiserId\": \"\",\n \"agencyId\": \"\",\n \"attributionModel\": \"\",\n \"campaignId\": \"\",\n \"channel\": \"\",\n \"clickId\": \"\",\n \"conversionId\": \"\",\n \"conversionModifiedTimestamp\": \"\",\n \"conversionTimestamp\": \"\",\n \"countMillis\": \"\",\n \"criterionId\": \"\",\n \"currencyCode\": \"\",\n \"customDimension\": [\n {\n \"name\": \"\",\n \"value\": \"\"\n }\n ],\n \"customMetric\": [\n {\n \"name\": \"\",\n \"value\": \"\"\n }\n ],\n \"customerId\": \"\",\n \"deviceType\": \"\",\n \"dsConversionId\": \"\",\n \"engineAccountId\": \"\",\n \"floodlightOrderId\": \"\",\n \"inventoryAccountId\": \"\",\n \"productCountry\": \"\",\n \"productGroupId\": \"\",\n \"productId\": \"\",\n \"productLanguage\": \"\",\n \"quantityMillis\": \"\",\n \"revenueMicros\": \"\",\n \"segmentationId\": \"\",\n \"segmentationName\": \"\",\n \"segmentationType\": \"\",\n \"state\": \"\",\n \"storeId\": \"\",\n \"type\": \"\"\n }\n ],\n \"kind\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/doubleclicksearch/v2/conversion", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/doubleclicksearch/v2/conversion"
payload = {
"conversion": [
{
"adGroupId": "",
"adId": "",
"advertiserId": "",
"agencyId": "",
"attributionModel": "",
"campaignId": "",
"channel": "",
"clickId": "",
"conversionId": "",
"conversionModifiedTimestamp": "",
"conversionTimestamp": "",
"countMillis": "",
"criterionId": "",
"currencyCode": "",
"customDimension": [
{
"name": "",
"value": ""
}
],
"customMetric": [
{
"name": "",
"value": ""
}
],
"customerId": "",
"deviceType": "",
"dsConversionId": "",
"engineAccountId": "",
"floodlightOrderId": "",
"inventoryAccountId": "",
"productCountry": "",
"productGroupId": "",
"productId": "",
"productLanguage": "",
"quantityMillis": "",
"revenueMicros": "",
"segmentationId": "",
"segmentationName": "",
"segmentationType": "",
"state": "",
"storeId": "",
"type": ""
}
],
"kind": ""
}
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/doubleclicksearch/v2/conversion"
payload <- "{\n \"conversion\": [\n {\n \"adGroupId\": \"\",\n \"adId\": \"\",\n \"advertiserId\": \"\",\n \"agencyId\": \"\",\n \"attributionModel\": \"\",\n \"campaignId\": \"\",\n \"channel\": \"\",\n \"clickId\": \"\",\n \"conversionId\": \"\",\n \"conversionModifiedTimestamp\": \"\",\n \"conversionTimestamp\": \"\",\n \"countMillis\": \"\",\n \"criterionId\": \"\",\n \"currencyCode\": \"\",\n \"customDimension\": [\n {\n \"name\": \"\",\n \"value\": \"\"\n }\n ],\n \"customMetric\": [\n {\n \"name\": \"\",\n \"value\": \"\"\n }\n ],\n \"customerId\": \"\",\n \"deviceType\": \"\",\n \"dsConversionId\": \"\",\n \"engineAccountId\": \"\",\n \"floodlightOrderId\": \"\",\n \"inventoryAccountId\": \"\",\n \"productCountry\": \"\",\n \"productGroupId\": \"\",\n \"productId\": \"\",\n \"productLanguage\": \"\",\n \"quantityMillis\": \"\",\n \"revenueMicros\": \"\",\n \"segmentationId\": \"\",\n \"segmentationName\": \"\",\n \"segmentationType\": \"\",\n \"state\": \"\",\n \"storeId\": \"\",\n \"type\": \"\"\n }\n ],\n \"kind\": \"\"\n}"
encode <- "json"
response <- VERB("PUT", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/doubleclicksearch/v2/conversion")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"conversion\": [\n {\n \"adGroupId\": \"\",\n \"adId\": \"\",\n \"advertiserId\": \"\",\n \"agencyId\": \"\",\n \"attributionModel\": \"\",\n \"campaignId\": \"\",\n \"channel\": \"\",\n \"clickId\": \"\",\n \"conversionId\": \"\",\n \"conversionModifiedTimestamp\": \"\",\n \"conversionTimestamp\": \"\",\n \"countMillis\": \"\",\n \"criterionId\": \"\",\n \"currencyCode\": \"\",\n \"customDimension\": [\n {\n \"name\": \"\",\n \"value\": \"\"\n }\n ],\n \"customMetric\": [\n {\n \"name\": \"\",\n \"value\": \"\"\n }\n ],\n \"customerId\": \"\",\n \"deviceType\": \"\",\n \"dsConversionId\": \"\",\n \"engineAccountId\": \"\",\n \"floodlightOrderId\": \"\",\n \"inventoryAccountId\": \"\",\n \"productCountry\": \"\",\n \"productGroupId\": \"\",\n \"productId\": \"\",\n \"productLanguage\": \"\",\n \"quantityMillis\": \"\",\n \"revenueMicros\": \"\",\n \"segmentationId\": \"\",\n \"segmentationName\": \"\",\n \"segmentationType\": \"\",\n \"state\": \"\",\n \"storeId\": \"\",\n \"type\": \"\"\n }\n ],\n \"kind\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.put('/baseUrl/doubleclicksearch/v2/conversion') do |req|
req.body = "{\n \"conversion\": [\n {\n \"adGroupId\": \"\",\n \"adId\": \"\",\n \"advertiserId\": \"\",\n \"agencyId\": \"\",\n \"attributionModel\": \"\",\n \"campaignId\": \"\",\n \"channel\": \"\",\n \"clickId\": \"\",\n \"conversionId\": \"\",\n \"conversionModifiedTimestamp\": \"\",\n \"conversionTimestamp\": \"\",\n \"countMillis\": \"\",\n \"criterionId\": \"\",\n \"currencyCode\": \"\",\n \"customDimension\": [\n {\n \"name\": \"\",\n \"value\": \"\"\n }\n ],\n \"customMetric\": [\n {\n \"name\": \"\",\n \"value\": \"\"\n }\n ],\n \"customerId\": \"\",\n \"deviceType\": \"\",\n \"dsConversionId\": \"\",\n \"engineAccountId\": \"\",\n \"floodlightOrderId\": \"\",\n \"inventoryAccountId\": \"\",\n \"productCountry\": \"\",\n \"productGroupId\": \"\",\n \"productId\": \"\",\n \"productLanguage\": \"\",\n \"quantityMillis\": \"\",\n \"revenueMicros\": \"\",\n \"segmentationId\": \"\",\n \"segmentationName\": \"\",\n \"segmentationType\": \"\",\n \"state\": \"\",\n \"storeId\": \"\",\n \"type\": \"\"\n }\n ],\n \"kind\": \"\"\n}"
end
puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/doubleclicksearch/v2/conversion";
let payload = json!({
"conversion": (
json!({
"adGroupId": "",
"adId": "",
"advertiserId": "",
"agencyId": "",
"attributionModel": "",
"campaignId": "",
"channel": "",
"clickId": "",
"conversionId": "",
"conversionModifiedTimestamp": "",
"conversionTimestamp": "",
"countMillis": "",
"criterionId": "",
"currencyCode": "",
"customDimension": (
json!({
"name": "",
"value": ""
})
),
"customMetric": (
json!({
"name": "",
"value": ""
})
),
"customerId": "",
"deviceType": "",
"dsConversionId": "",
"engineAccountId": "",
"floodlightOrderId": "",
"inventoryAccountId": "",
"productCountry": "",
"productGroupId": "",
"productId": "",
"productLanguage": "",
"quantityMillis": "",
"revenueMicros": "",
"segmentationId": "",
"segmentationName": "",
"segmentationType": "",
"state": "",
"storeId": "",
"type": ""
})
),
"kind": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/doubleclicksearch/v2/conversion \
--header 'content-type: application/json' \
--data '{
"conversion": [
{
"adGroupId": "",
"adId": "",
"advertiserId": "",
"agencyId": "",
"attributionModel": "",
"campaignId": "",
"channel": "",
"clickId": "",
"conversionId": "",
"conversionModifiedTimestamp": "",
"conversionTimestamp": "",
"countMillis": "",
"criterionId": "",
"currencyCode": "",
"customDimension": [
{
"name": "",
"value": ""
}
],
"customMetric": [
{
"name": "",
"value": ""
}
],
"customerId": "",
"deviceType": "",
"dsConversionId": "",
"engineAccountId": "",
"floodlightOrderId": "",
"inventoryAccountId": "",
"productCountry": "",
"productGroupId": "",
"productId": "",
"productLanguage": "",
"quantityMillis": "",
"revenueMicros": "",
"segmentationId": "",
"segmentationName": "",
"segmentationType": "",
"state": "",
"storeId": "",
"type": ""
}
],
"kind": ""
}'
echo '{
"conversion": [
{
"adGroupId": "",
"adId": "",
"advertiserId": "",
"agencyId": "",
"attributionModel": "",
"campaignId": "",
"channel": "",
"clickId": "",
"conversionId": "",
"conversionModifiedTimestamp": "",
"conversionTimestamp": "",
"countMillis": "",
"criterionId": "",
"currencyCode": "",
"customDimension": [
{
"name": "",
"value": ""
}
],
"customMetric": [
{
"name": "",
"value": ""
}
],
"customerId": "",
"deviceType": "",
"dsConversionId": "",
"engineAccountId": "",
"floodlightOrderId": "",
"inventoryAccountId": "",
"productCountry": "",
"productGroupId": "",
"productId": "",
"productLanguage": "",
"quantityMillis": "",
"revenueMicros": "",
"segmentationId": "",
"segmentationName": "",
"segmentationType": "",
"state": "",
"storeId": "",
"type": ""
}
],
"kind": ""
}' | \
http PUT {{baseUrl}}/doubleclicksearch/v2/conversion \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '{\n "conversion": [\n {\n "adGroupId": "",\n "adId": "",\n "advertiserId": "",\n "agencyId": "",\n "attributionModel": "",\n "campaignId": "",\n "channel": "",\n "clickId": "",\n "conversionId": "",\n "conversionModifiedTimestamp": "",\n "conversionTimestamp": "",\n "countMillis": "",\n "criterionId": "",\n "currencyCode": "",\n "customDimension": [\n {\n "name": "",\n "value": ""\n }\n ],\n "customMetric": [\n {\n "name": "",\n "value": ""\n }\n ],\n "customerId": "",\n "deviceType": "",\n "dsConversionId": "",\n "engineAccountId": "",\n "floodlightOrderId": "",\n "inventoryAccountId": "",\n "productCountry": "",\n "productGroupId": "",\n "productId": "",\n "productLanguage": "",\n "quantityMillis": "",\n "revenueMicros": "",\n "segmentationId": "",\n "segmentationName": "",\n "segmentationType": "",\n "state": "",\n "storeId": "",\n "type": ""\n }\n ],\n "kind": ""\n}' \
--output-document \
- {{baseUrl}}/doubleclicksearch/v2/conversion
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"conversion": [
[
"adGroupId": "",
"adId": "",
"advertiserId": "",
"agencyId": "",
"attributionModel": "",
"campaignId": "",
"channel": "",
"clickId": "",
"conversionId": "",
"conversionModifiedTimestamp": "",
"conversionTimestamp": "",
"countMillis": "",
"criterionId": "",
"currencyCode": "",
"customDimension": [
[
"name": "",
"value": ""
]
],
"customMetric": [
[
"name": "",
"value": ""
]
],
"customerId": "",
"deviceType": "",
"dsConversionId": "",
"engineAccountId": "",
"floodlightOrderId": "",
"inventoryAccountId": "",
"productCountry": "",
"productGroupId": "",
"productId": "",
"productLanguage": "",
"quantityMillis": "",
"revenueMicros": "",
"segmentationId": "",
"segmentationName": "",
"segmentationType": "",
"state": "",
"storeId": "",
"type": ""
]
],
"kind": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/doubleclicksearch/v2/conversion")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
doubleclicksearch.conversion.updateAvailability
{{baseUrl}}/doubleclicksearch/v2/conversion/updateAvailability
BODY json
{
"availabilities": [
{
"advertiserId": "",
"agencyId": "",
"availabilityTimestamp": "",
"customerId": "",
"segmentationId": "",
"segmentationName": "",
"segmentationType": ""
}
]
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/doubleclicksearch/v2/conversion/updateAvailability");
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 \"availabilities\": [\n {\n \"advertiserId\": \"\",\n \"agencyId\": \"\",\n \"availabilityTimestamp\": \"\",\n \"customerId\": \"\",\n \"segmentationId\": \"\",\n \"segmentationName\": \"\",\n \"segmentationType\": \"\"\n }\n ]\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/doubleclicksearch/v2/conversion/updateAvailability" {:content-type :json
:form-params {:availabilities [{:advertiserId ""
:agencyId ""
:availabilityTimestamp ""
:customerId ""
:segmentationId ""
:segmentationName ""
:segmentationType ""}]}})
require "http/client"
url = "{{baseUrl}}/doubleclicksearch/v2/conversion/updateAvailability"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"availabilities\": [\n {\n \"advertiserId\": \"\",\n \"agencyId\": \"\",\n \"availabilityTimestamp\": \"\",\n \"customerId\": \"\",\n \"segmentationId\": \"\",\n \"segmentationName\": \"\",\n \"segmentationType\": \"\"\n }\n ]\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/doubleclicksearch/v2/conversion/updateAvailability"),
Content = new StringContent("{\n \"availabilities\": [\n {\n \"advertiserId\": \"\",\n \"agencyId\": \"\",\n \"availabilityTimestamp\": \"\",\n \"customerId\": \"\",\n \"segmentationId\": \"\",\n \"segmentationName\": \"\",\n \"segmentationType\": \"\"\n }\n ]\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/doubleclicksearch/v2/conversion/updateAvailability");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"availabilities\": [\n {\n \"advertiserId\": \"\",\n \"agencyId\": \"\",\n \"availabilityTimestamp\": \"\",\n \"customerId\": \"\",\n \"segmentationId\": \"\",\n \"segmentationName\": \"\",\n \"segmentationType\": \"\"\n }\n ]\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/doubleclicksearch/v2/conversion/updateAvailability"
payload := strings.NewReader("{\n \"availabilities\": [\n {\n \"advertiserId\": \"\",\n \"agencyId\": \"\",\n \"availabilityTimestamp\": \"\",\n \"customerId\": \"\",\n \"segmentationId\": \"\",\n \"segmentationName\": \"\",\n \"segmentationType\": \"\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/doubleclicksearch/v2/conversion/updateAvailability HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 235
{
"availabilities": [
{
"advertiserId": "",
"agencyId": "",
"availabilityTimestamp": "",
"customerId": "",
"segmentationId": "",
"segmentationName": "",
"segmentationType": ""
}
]
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/doubleclicksearch/v2/conversion/updateAvailability")
.setHeader("content-type", "application/json")
.setBody("{\n \"availabilities\": [\n {\n \"advertiserId\": \"\",\n \"agencyId\": \"\",\n \"availabilityTimestamp\": \"\",\n \"customerId\": \"\",\n \"segmentationId\": \"\",\n \"segmentationName\": \"\",\n \"segmentationType\": \"\"\n }\n ]\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/doubleclicksearch/v2/conversion/updateAvailability"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"availabilities\": [\n {\n \"advertiserId\": \"\",\n \"agencyId\": \"\",\n \"availabilityTimestamp\": \"\",\n \"customerId\": \"\",\n \"segmentationId\": \"\",\n \"segmentationName\": \"\",\n \"segmentationType\": \"\"\n }\n ]\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"availabilities\": [\n {\n \"advertiserId\": \"\",\n \"agencyId\": \"\",\n \"availabilityTimestamp\": \"\",\n \"customerId\": \"\",\n \"segmentationId\": \"\",\n \"segmentationName\": \"\",\n \"segmentationType\": \"\"\n }\n ]\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/doubleclicksearch/v2/conversion/updateAvailability")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/doubleclicksearch/v2/conversion/updateAvailability")
.header("content-type", "application/json")
.body("{\n \"availabilities\": [\n {\n \"advertiserId\": \"\",\n \"agencyId\": \"\",\n \"availabilityTimestamp\": \"\",\n \"customerId\": \"\",\n \"segmentationId\": \"\",\n \"segmentationName\": \"\",\n \"segmentationType\": \"\"\n }\n ]\n}")
.asString();
const data = JSON.stringify({
availabilities: [
{
advertiserId: '',
agencyId: '',
availabilityTimestamp: '',
customerId: '',
segmentationId: '',
segmentationName: '',
segmentationType: ''
}
]
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/doubleclicksearch/v2/conversion/updateAvailability');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/doubleclicksearch/v2/conversion/updateAvailability',
headers: {'content-type': 'application/json'},
data: {
availabilities: [
{
advertiserId: '',
agencyId: '',
availabilityTimestamp: '',
customerId: '',
segmentationId: '',
segmentationName: '',
segmentationType: ''
}
]
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/doubleclicksearch/v2/conversion/updateAvailability';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"availabilities":[{"advertiserId":"","agencyId":"","availabilityTimestamp":"","customerId":"","segmentationId":"","segmentationName":"","segmentationType":""}]}'
};
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}}/doubleclicksearch/v2/conversion/updateAvailability',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "availabilities": [\n {\n "advertiserId": "",\n "agencyId": "",\n "availabilityTimestamp": "",\n "customerId": "",\n "segmentationId": "",\n "segmentationName": "",\n "segmentationType": ""\n }\n ]\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"availabilities\": [\n {\n \"advertiserId\": \"\",\n \"agencyId\": \"\",\n \"availabilityTimestamp\": \"\",\n \"customerId\": \"\",\n \"segmentationId\": \"\",\n \"segmentationName\": \"\",\n \"segmentationType\": \"\"\n }\n ]\n}")
val request = Request.Builder()
.url("{{baseUrl}}/doubleclicksearch/v2/conversion/updateAvailability")
.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/doubleclicksearch/v2/conversion/updateAvailability',
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({
availabilities: [
{
advertiserId: '',
agencyId: '',
availabilityTimestamp: '',
customerId: '',
segmentationId: '',
segmentationName: '',
segmentationType: ''
}
]
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/doubleclicksearch/v2/conversion/updateAvailability',
headers: {'content-type': 'application/json'},
body: {
availabilities: [
{
advertiserId: '',
agencyId: '',
availabilityTimestamp: '',
customerId: '',
segmentationId: '',
segmentationName: '',
segmentationType: ''
}
]
},
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}}/doubleclicksearch/v2/conversion/updateAvailability');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
availabilities: [
{
advertiserId: '',
agencyId: '',
availabilityTimestamp: '',
customerId: '',
segmentationId: '',
segmentationName: '',
segmentationType: ''
}
]
});
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}}/doubleclicksearch/v2/conversion/updateAvailability',
headers: {'content-type': 'application/json'},
data: {
availabilities: [
{
advertiserId: '',
agencyId: '',
availabilityTimestamp: '',
customerId: '',
segmentationId: '',
segmentationName: '',
segmentationType: ''
}
]
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/doubleclicksearch/v2/conversion/updateAvailability';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"availabilities":[{"advertiserId":"","agencyId":"","availabilityTimestamp":"","customerId":"","segmentationId":"","segmentationName":"","segmentationType":""}]}'
};
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 = @{ @"availabilities": @[ @{ @"advertiserId": @"", @"agencyId": @"", @"availabilityTimestamp": @"", @"customerId": @"", @"segmentationId": @"", @"segmentationName": @"", @"segmentationType": @"" } ] };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/doubleclicksearch/v2/conversion/updateAvailability"]
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}}/doubleclicksearch/v2/conversion/updateAvailability" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"availabilities\": [\n {\n \"advertiserId\": \"\",\n \"agencyId\": \"\",\n \"availabilityTimestamp\": \"\",\n \"customerId\": \"\",\n \"segmentationId\": \"\",\n \"segmentationName\": \"\",\n \"segmentationType\": \"\"\n }\n ]\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/doubleclicksearch/v2/conversion/updateAvailability",
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([
'availabilities' => [
[
'advertiserId' => '',
'agencyId' => '',
'availabilityTimestamp' => '',
'customerId' => '',
'segmentationId' => '',
'segmentationName' => '',
'segmentationType' => ''
]
]
]),
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}}/doubleclicksearch/v2/conversion/updateAvailability', [
'body' => '{
"availabilities": [
{
"advertiserId": "",
"agencyId": "",
"availabilityTimestamp": "",
"customerId": "",
"segmentationId": "",
"segmentationName": "",
"segmentationType": ""
}
]
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/doubleclicksearch/v2/conversion/updateAvailability');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'availabilities' => [
[
'advertiserId' => '',
'agencyId' => '',
'availabilityTimestamp' => '',
'customerId' => '',
'segmentationId' => '',
'segmentationName' => '',
'segmentationType' => ''
]
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'availabilities' => [
[
'advertiserId' => '',
'agencyId' => '',
'availabilityTimestamp' => '',
'customerId' => '',
'segmentationId' => '',
'segmentationName' => '',
'segmentationType' => ''
]
]
]));
$request->setRequestUrl('{{baseUrl}}/doubleclicksearch/v2/conversion/updateAvailability');
$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}}/doubleclicksearch/v2/conversion/updateAvailability' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"availabilities": [
{
"advertiserId": "",
"agencyId": "",
"availabilityTimestamp": "",
"customerId": "",
"segmentationId": "",
"segmentationName": "",
"segmentationType": ""
}
]
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/doubleclicksearch/v2/conversion/updateAvailability' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"availabilities": [
{
"advertiserId": "",
"agencyId": "",
"availabilityTimestamp": "",
"customerId": "",
"segmentationId": "",
"segmentationName": "",
"segmentationType": ""
}
]
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"availabilities\": [\n {\n \"advertiserId\": \"\",\n \"agencyId\": \"\",\n \"availabilityTimestamp\": \"\",\n \"customerId\": \"\",\n \"segmentationId\": \"\",\n \"segmentationName\": \"\",\n \"segmentationType\": \"\"\n }\n ]\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/doubleclicksearch/v2/conversion/updateAvailability", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/doubleclicksearch/v2/conversion/updateAvailability"
payload = { "availabilities": [
{
"advertiserId": "",
"agencyId": "",
"availabilityTimestamp": "",
"customerId": "",
"segmentationId": "",
"segmentationName": "",
"segmentationType": ""
}
] }
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/doubleclicksearch/v2/conversion/updateAvailability"
payload <- "{\n \"availabilities\": [\n {\n \"advertiserId\": \"\",\n \"agencyId\": \"\",\n \"availabilityTimestamp\": \"\",\n \"customerId\": \"\",\n \"segmentationId\": \"\",\n \"segmentationName\": \"\",\n \"segmentationType\": \"\"\n }\n ]\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/doubleclicksearch/v2/conversion/updateAvailability")
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 \"availabilities\": [\n {\n \"advertiserId\": \"\",\n \"agencyId\": \"\",\n \"availabilityTimestamp\": \"\",\n \"customerId\": \"\",\n \"segmentationId\": \"\",\n \"segmentationName\": \"\",\n \"segmentationType\": \"\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/doubleclicksearch/v2/conversion/updateAvailability') do |req|
req.body = "{\n \"availabilities\": [\n {\n \"advertiserId\": \"\",\n \"agencyId\": \"\",\n \"availabilityTimestamp\": \"\",\n \"customerId\": \"\",\n \"segmentationId\": \"\",\n \"segmentationName\": \"\",\n \"segmentationType\": \"\"\n }\n ]\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/doubleclicksearch/v2/conversion/updateAvailability";
let payload = json!({"availabilities": (
json!({
"advertiserId": "",
"agencyId": "",
"availabilityTimestamp": "",
"customerId": "",
"segmentationId": "",
"segmentationName": "",
"segmentationType": ""
})
)});
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}}/doubleclicksearch/v2/conversion/updateAvailability \
--header 'content-type: application/json' \
--data '{
"availabilities": [
{
"advertiserId": "",
"agencyId": "",
"availabilityTimestamp": "",
"customerId": "",
"segmentationId": "",
"segmentationName": "",
"segmentationType": ""
}
]
}'
echo '{
"availabilities": [
{
"advertiserId": "",
"agencyId": "",
"availabilityTimestamp": "",
"customerId": "",
"segmentationId": "",
"segmentationName": "",
"segmentationType": ""
}
]
}' | \
http POST {{baseUrl}}/doubleclicksearch/v2/conversion/updateAvailability \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "availabilities": [\n {\n "advertiserId": "",\n "agencyId": "",\n "availabilityTimestamp": "",\n "customerId": "",\n "segmentationId": "",\n "segmentationName": "",\n "segmentationType": ""\n }\n ]\n}' \
--output-document \
- {{baseUrl}}/doubleclicksearch/v2/conversion/updateAvailability
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["availabilities": [
[
"advertiserId": "",
"agencyId": "",
"availabilityTimestamp": "",
"customerId": "",
"segmentationId": "",
"segmentationName": "",
"segmentationType": ""
]
]] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/doubleclicksearch/v2/conversion/updateAvailability")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
doubleclicksearch.reports.generate
{{baseUrl}}/doubleclicksearch/v2/reports/generate
BODY json
{
"columns": [
{
"columnName": "",
"customDimensionName": "",
"customMetricName": "",
"endDate": "",
"groupByColumn": false,
"headerText": "",
"platformSource": "",
"productReportPerspective": "",
"savedColumnName": "",
"startDate": ""
}
],
"downloadFormat": "",
"filters": [
{
"column": {},
"operator": "",
"values": []
}
],
"includeDeletedEntities": false,
"includeRemovedEntities": false,
"maxRowsPerFile": 0,
"orderBy": [
{
"column": {},
"sortOrder": ""
}
],
"reportScope": {
"adGroupId": "",
"adId": "",
"advertiserId": "",
"agencyId": "",
"campaignId": "",
"engineAccountId": "",
"keywordId": ""
},
"reportType": "",
"rowCount": 0,
"startRow": 0,
"statisticsCurrency": "",
"timeRange": {
"changedAttributesSinceTimestamp": "",
"changedMetricsSinceTimestamp": "",
"endDate": "",
"startDate": ""
},
"verifySingleTimeZone": false
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/doubleclicksearch/v2/reports/generate");
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 \"columns\": [\n {\n \"columnName\": \"\",\n \"customDimensionName\": \"\",\n \"customMetricName\": \"\",\n \"endDate\": \"\",\n \"groupByColumn\": false,\n \"headerText\": \"\",\n \"platformSource\": \"\",\n \"productReportPerspective\": \"\",\n \"savedColumnName\": \"\",\n \"startDate\": \"\"\n }\n ],\n \"downloadFormat\": \"\",\n \"filters\": [\n {\n \"column\": {},\n \"operator\": \"\",\n \"values\": []\n }\n ],\n \"includeDeletedEntities\": false,\n \"includeRemovedEntities\": false,\n \"maxRowsPerFile\": 0,\n \"orderBy\": [\n {\n \"column\": {},\n \"sortOrder\": \"\"\n }\n ],\n \"reportScope\": {\n \"adGroupId\": \"\",\n \"adId\": \"\",\n \"advertiserId\": \"\",\n \"agencyId\": \"\",\n \"campaignId\": \"\",\n \"engineAccountId\": \"\",\n \"keywordId\": \"\"\n },\n \"reportType\": \"\",\n \"rowCount\": 0,\n \"startRow\": 0,\n \"statisticsCurrency\": \"\",\n \"timeRange\": {\n \"changedAttributesSinceTimestamp\": \"\",\n \"changedMetricsSinceTimestamp\": \"\",\n \"endDate\": \"\",\n \"startDate\": \"\"\n },\n \"verifySingleTimeZone\": false\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/doubleclicksearch/v2/reports/generate" {:content-type :json
:form-params {:columns [{:columnName ""
:customDimensionName ""
:customMetricName ""
:endDate ""
:groupByColumn false
:headerText ""
:platformSource ""
:productReportPerspective ""
:savedColumnName ""
:startDate ""}]
:downloadFormat ""
:filters [{:column {}
:operator ""
:values []}]
:includeDeletedEntities false
:includeRemovedEntities false
:maxRowsPerFile 0
:orderBy [{:column {}
:sortOrder ""}]
:reportScope {:adGroupId ""
:adId ""
:advertiserId ""
:agencyId ""
:campaignId ""
:engineAccountId ""
:keywordId ""}
:reportType ""
:rowCount 0
:startRow 0
:statisticsCurrency ""
:timeRange {:changedAttributesSinceTimestamp ""
:changedMetricsSinceTimestamp ""
:endDate ""
:startDate ""}
:verifySingleTimeZone false}})
require "http/client"
url = "{{baseUrl}}/doubleclicksearch/v2/reports/generate"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"columns\": [\n {\n \"columnName\": \"\",\n \"customDimensionName\": \"\",\n \"customMetricName\": \"\",\n \"endDate\": \"\",\n \"groupByColumn\": false,\n \"headerText\": \"\",\n \"platformSource\": \"\",\n \"productReportPerspective\": \"\",\n \"savedColumnName\": \"\",\n \"startDate\": \"\"\n }\n ],\n \"downloadFormat\": \"\",\n \"filters\": [\n {\n \"column\": {},\n \"operator\": \"\",\n \"values\": []\n }\n ],\n \"includeDeletedEntities\": false,\n \"includeRemovedEntities\": false,\n \"maxRowsPerFile\": 0,\n \"orderBy\": [\n {\n \"column\": {},\n \"sortOrder\": \"\"\n }\n ],\n \"reportScope\": {\n \"adGroupId\": \"\",\n \"adId\": \"\",\n \"advertiserId\": \"\",\n \"agencyId\": \"\",\n \"campaignId\": \"\",\n \"engineAccountId\": \"\",\n \"keywordId\": \"\"\n },\n \"reportType\": \"\",\n \"rowCount\": 0,\n \"startRow\": 0,\n \"statisticsCurrency\": \"\",\n \"timeRange\": {\n \"changedAttributesSinceTimestamp\": \"\",\n \"changedMetricsSinceTimestamp\": \"\",\n \"endDate\": \"\",\n \"startDate\": \"\"\n },\n \"verifySingleTimeZone\": false\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/doubleclicksearch/v2/reports/generate"),
Content = new StringContent("{\n \"columns\": [\n {\n \"columnName\": \"\",\n \"customDimensionName\": \"\",\n \"customMetricName\": \"\",\n \"endDate\": \"\",\n \"groupByColumn\": false,\n \"headerText\": \"\",\n \"platformSource\": \"\",\n \"productReportPerspective\": \"\",\n \"savedColumnName\": \"\",\n \"startDate\": \"\"\n }\n ],\n \"downloadFormat\": \"\",\n \"filters\": [\n {\n \"column\": {},\n \"operator\": \"\",\n \"values\": []\n }\n ],\n \"includeDeletedEntities\": false,\n \"includeRemovedEntities\": false,\n \"maxRowsPerFile\": 0,\n \"orderBy\": [\n {\n \"column\": {},\n \"sortOrder\": \"\"\n }\n ],\n \"reportScope\": {\n \"adGroupId\": \"\",\n \"adId\": \"\",\n \"advertiserId\": \"\",\n \"agencyId\": \"\",\n \"campaignId\": \"\",\n \"engineAccountId\": \"\",\n \"keywordId\": \"\"\n },\n \"reportType\": \"\",\n \"rowCount\": 0,\n \"startRow\": 0,\n \"statisticsCurrency\": \"\",\n \"timeRange\": {\n \"changedAttributesSinceTimestamp\": \"\",\n \"changedMetricsSinceTimestamp\": \"\",\n \"endDate\": \"\",\n \"startDate\": \"\"\n },\n \"verifySingleTimeZone\": false\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/doubleclicksearch/v2/reports/generate");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"columns\": [\n {\n \"columnName\": \"\",\n \"customDimensionName\": \"\",\n \"customMetricName\": \"\",\n \"endDate\": \"\",\n \"groupByColumn\": false,\n \"headerText\": \"\",\n \"platformSource\": \"\",\n \"productReportPerspective\": \"\",\n \"savedColumnName\": \"\",\n \"startDate\": \"\"\n }\n ],\n \"downloadFormat\": \"\",\n \"filters\": [\n {\n \"column\": {},\n \"operator\": \"\",\n \"values\": []\n }\n ],\n \"includeDeletedEntities\": false,\n \"includeRemovedEntities\": false,\n \"maxRowsPerFile\": 0,\n \"orderBy\": [\n {\n \"column\": {},\n \"sortOrder\": \"\"\n }\n ],\n \"reportScope\": {\n \"adGroupId\": \"\",\n \"adId\": \"\",\n \"advertiserId\": \"\",\n \"agencyId\": \"\",\n \"campaignId\": \"\",\n \"engineAccountId\": \"\",\n \"keywordId\": \"\"\n },\n \"reportType\": \"\",\n \"rowCount\": 0,\n \"startRow\": 0,\n \"statisticsCurrency\": \"\",\n \"timeRange\": {\n \"changedAttributesSinceTimestamp\": \"\",\n \"changedMetricsSinceTimestamp\": \"\",\n \"endDate\": \"\",\n \"startDate\": \"\"\n },\n \"verifySingleTimeZone\": false\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/doubleclicksearch/v2/reports/generate"
payload := strings.NewReader("{\n \"columns\": [\n {\n \"columnName\": \"\",\n \"customDimensionName\": \"\",\n \"customMetricName\": \"\",\n \"endDate\": \"\",\n \"groupByColumn\": false,\n \"headerText\": \"\",\n \"platformSource\": \"\",\n \"productReportPerspective\": \"\",\n \"savedColumnName\": \"\",\n \"startDate\": \"\"\n }\n ],\n \"downloadFormat\": \"\",\n \"filters\": [\n {\n \"column\": {},\n \"operator\": \"\",\n \"values\": []\n }\n ],\n \"includeDeletedEntities\": false,\n \"includeRemovedEntities\": false,\n \"maxRowsPerFile\": 0,\n \"orderBy\": [\n {\n \"column\": {},\n \"sortOrder\": \"\"\n }\n ],\n \"reportScope\": {\n \"adGroupId\": \"\",\n \"adId\": \"\",\n \"advertiserId\": \"\",\n \"agencyId\": \"\",\n \"campaignId\": \"\",\n \"engineAccountId\": \"\",\n \"keywordId\": \"\"\n },\n \"reportType\": \"\",\n \"rowCount\": 0,\n \"startRow\": 0,\n \"statisticsCurrency\": \"\",\n \"timeRange\": {\n \"changedAttributesSinceTimestamp\": \"\",\n \"changedMetricsSinceTimestamp\": \"\",\n \"endDate\": \"\",\n \"startDate\": \"\"\n },\n \"verifySingleTimeZone\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/doubleclicksearch/v2/reports/generate HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 1030
{
"columns": [
{
"columnName": "",
"customDimensionName": "",
"customMetricName": "",
"endDate": "",
"groupByColumn": false,
"headerText": "",
"platformSource": "",
"productReportPerspective": "",
"savedColumnName": "",
"startDate": ""
}
],
"downloadFormat": "",
"filters": [
{
"column": {},
"operator": "",
"values": []
}
],
"includeDeletedEntities": false,
"includeRemovedEntities": false,
"maxRowsPerFile": 0,
"orderBy": [
{
"column": {},
"sortOrder": ""
}
],
"reportScope": {
"adGroupId": "",
"adId": "",
"advertiserId": "",
"agencyId": "",
"campaignId": "",
"engineAccountId": "",
"keywordId": ""
},
"reportType": "",
"rowCount": 0,
"startRow": 0,
"statisticsCurrency": "",
"timeRange": {
"changedAttributesSinceTimestamp": "",
"changedMetricsSinceTimestamp": "",
"endDate": "",
"startDate": ""
},
"verifySingleTimeZone": false
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/doubleclicksearch/v2/reports/generate")
.setHeader("content-type", "application/json")
.setBody("{\n \"columns\": [\n {\n \"columnName\": \"\",\n \"customDimensionName\": \"\",\n \"customMetricName\": \"\",\n \"endDate\": \"\",\n \"groupByColumn\": false,\n \"headerText\": \"\",\n \"platformSource\": \"\",\n \"productReportPerspective\": \"\",\n \"savedColumnName\": \"\",\n \"startDate\": \"\"\n }\n ],\n \"downloadFormat\": \"\",\n \"filters\": [\n {\n \"column\": {},\n \"operator\": \"\",\n \"values\": []\n }\n ],\n \"includeDeletedEntities\": false,\n \"includeRemovedEntities\": false,\n \"maxRowsPerFile\": 0,\n \"orderBy\": [\n {\n \"column\": {},\n \"sortOrder\": \"\"\n }\n ],\n \"reportScope\": {\n \"adGroupId\": \"\",\n \"adId\": \"\",\n \"advertiserId\": \"\",\n \"agencyId\": \"\",\n \"campaignId\": \"\",\n \"engineAccountId\": \"\",\n \"keywordId\": \"\"\n },\n \"reportType\": \"\",\n \"rowCount\": 0,\n \"startRow\": 0,\n \"statisticsCurrency\": \"\",\n \"timeRange\": {\n \"changedAttributesSinceTimestamp\": \"\",\n \"changedMetricsSinceTimestamp\": \"\",\n \"endDate\": \"\",\n \"startDate\": \"\"\n },\n \"verifySingleTimeZone\": false\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/doubleclicksearch/v2/reports/generate"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"columns\": [\n {\n \"columnName\": \"\",\n \"customDimensionName\": \"\",\n \"customMetricName\": \"\",\n \"endDate\": \"\",\n \"groupByColumn\": false,\n \"headerText\": \"\",\n \"platformSource\": \"\",\n \"productReportPerspective\": \"\",\n \"savedColumnName\": \"\",\n \"startDate\": \"\"\n }\n ],\n \"downloadFormat\": \"\",\n \"filters\": [\n {\n \"column\": {},\n \"operator\": \"\",\n \"values\": []\n }\n ],\n \"includeDeletedEntities\": false,\n \"includeRemovedEntities\": false,\n \"maxRowsPerFile\": 0,\n \"orderBy\": [\n {\n \"column\": {},\n \"sortOrder\": \"\"\n }\n ],\n \"reportScope\": {\n \"adGroupId\": \"\",\n \"adId\": \"\",\n \"advertiserId\": \"\",\n \"agencyId\": \"\",\n \"campaignId\": \"\",\n \"engineAccountId\": \"\",\n \"keywordId\": \"\"\n },\n \"reportType\": \"\",\n \"rowCount\": 0,\n \"startRow\": 0,\n \"statisticsCurrency\": \"\",\n \"timeRange\": {\n \"changedAttributesSinceTimestamp\": \"\",\n \"changedMetricsSinceTimestamp\": \"\",\n \"endDate\": \"\",\n \"startDate\": \"\"\n },\n \"verifySingleTimeZone\": false\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"columns\": [\n {\n \"columnName\": \"\",\n \"customDimensionName\": \"\",\n \"customMetricName\": \"\",\n \"endDate\": \"\",\n \"groupByColumn\": false,\n \"headerText\": \"\",\n \"platformSource\": \"\",\n \"productReportPerspective\": \"\",\n \"savedColumnName\": \"\",\n \"startDate\": \"\"\n }\n ],\n \"downloadFormat\": \"\",\n \"filters\": [\n {\n \"column\": {},\n \"operator\": \"\",\n \"values\": []\n }\n ],\n \"includeDeletedEntities\": false,\n \"includeRemovedEntities\": false,\n \"maxRowsPerFile\": 0,\n \"orderBy\": [\n {\n \"column\": {},\n \"sortOrder\": \"\"\n }\n ],\n \"reportScope\": {\n \"adGroupId\": \"\",\n \"adId\": \"\",\n \"advertiserId\": \"\",\n \"agencyId\": \"\",\n \"campaignId\": \"\",\n \"engineAccountId\": \"\",\n \"keywordId\": \"\"\n },\n \"reportType\": \"\",\n \"rowCount\": 0,\n \"startRow\": 0,\n \"statisticsCurrency\": \"\",\n \"timeRange\": {\n \"changedAttributesSinceTimestamp\": \"\",\n \"changedMetricsSinceTimestamp\": \"\",\n \"endDate\": \"\",\n \"startDate\": \"\"\n },\n \"verifySingleTimeZone\": false\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/doubleclicksearch/v2/reports/generate")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/doubleclicksearch/v2/reports/generate")
.header("content-type", "application/json")
.body("{\n \"columns\": [\n {\n \"columnName\": \"\",\n \"customDimensionName\": \"\",\n \"customMetricName\": \"\",\n \"endDate\": \"\",\n \"groupByColumn\": false,\n \"headerText\": \"\",\n \"platformSource\": \"\",\n \"productReportPerspective\": \"\",\n \"savedColumnName\": \"\",\n \"startDate\": \"\"\n }\n ],\n \"downloadFormat\": \"\",\n \"filters\": [\n {\n \"column\": {},\n \"operator\": \"\",\n \"values\": []\n }\n ],\n \"includeDeletedEntities\": false,\n \"includeRemovedEntities\": false,\n \"maxRowsPerFile\": 0,\n \"orderBy\": [\n {\n \"column\": {},\n \"sortOrder\": \"\"\n }\n ],\n \"reportScope\": {\n \"adGroupId\": \"\",\n \"adId\": \"\",\n \"advertiserId\": \"\",\n \"agencyId\": \"\",\n \"campaignId\": \"\",\n \"engineAccountId\": \"\",\n \"keywordId\": \"\"\n },\n \"reportType\": \"\",\n \"rowCount\": 0,\n \"startRow\": 0,\n \"statisticsCurrency\": \"\",\n \"timeRange\": {\n \"changedAttributesSinceTimestamp\": \"\",\n \"changedMetricsSinceTimestamp\": \"\",\n \"endDate\": \"\",\n \"startDate\": \"\"\n },\n \"verifySingleTimeZone\": false\n}")
.asString();
const data = JSON.stringify({
columns: [
{
columnName: '',
customDimensionName: '',
customMetricName: '',
endDate: '',
groupByColumn: false,
headerText: '',
platformSource: '',
productReportPerspective: '',
savedColumnName: '',
startDate: ''
}
],
downloadFormat: '',
filters: [
{
column: {},
operator: '',
values: []
}
],
includeDeletedEntities: false,
includeRemovedEntities: false,
maxRowsPerFile: 0,
orderBy: [
{
column: {},
sortOrder: ''
}
],
reportScope: {
adGroupId: '',
adId: '',
advertiserId: '',
agencyId: '',
campaignId: '',
engineAccountId: '',
keywordId: ''
},
reportType: '',
rowCount: 0,
startRow: 0,
statisticsCurrency: '',
timeRange: {
changedAttributesSinceTimestamp: '',
changedMetricsSinceTimestamp: '',
endDate: '',
startDate: ''
},
verifySingleTimeZone: false
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/doubleclicksearch/v2/reports/generate');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/doubleclicksearch/v2/reports/generate',
headers: {'content-type': 'application/json'},
data: {
columns: [
{
columnName: '',
customDimensionName: '',
customMetricName: '',
endDate: '',
groupByColumn: false,
headerText: '',
platformSource: '',
productReportPerspective: '',
savedColumnName: '',
startDate: ''
}
],
downloadFormat: '',
filters: [{column: {}, operator: '', values: []}],
includeDeletedEntities: false,
includeRemovedEntities: false,
maxRowsPerFile: 0,
orderBy: [{column: {}, sortOrder: ''}],
reportScope: {
adGroupId: '',
adId: '',
advertiserId: '',
agencyId: '',
campaignId: '',
engineAccountId: '',
keywordId: ''
},
reportType: '',
rowCount: 0,
startRow: 0,
statisticsCurrency: '',
timeRange: {
changedAttributesSinceTimestamp: '',
changedMetricsSinceTimestamp: '',
endDate: '',
startDate: ''
},
verifySingleTimeZone: false
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/doubleclicksearch/v2/reports/generate';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"columns":[{"columnName":"","customDimensionName":"","customMetricName":"","endDate":"","groupByColumn":false,"headerText":"","platformSource":"","productReportPerspective":"","savedColumnName":"","startDate":""}],"downloadFormat":"","filters":[{"column":{},"operator":"","values":[]}],"includeDeletedEntities":false,"includeRemovedEntities":false,"maxRowsPerFile":0,"orderBy":[{"column":{},"sortOrder":""}],"reportScope":{"adGroupId":"","adId":"","advertiserId":"","agencyId":"","campaignId":"","engineAccountId":"","keywordId":""},"reportType":"","rowCount":0,"startRow":0,"statisticsCurrency":"","timeRange":{"changedAttributesSinceTimestamp":"","changedMetricsSinceTimestamp":"","endDate":"","startDate":""},"verifySingleTimeZone":false}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/doubleclicksearch/v2/reports/generate',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "columns": [\n {\n "columnName": "",\n "customDimensionName": "",\n "customMetricName": "",\n "endDate": "",\n "groupByColumn": false,\n "headerText": "",\n "platformSource": "",\n "productReportPerspective": "",\n "savedColumnName": "",\n "startDate": ""\n }\n ],\n "downloadFormat": "",\n "filters": [\n {\n "column": {},\n "operator": "",\n "values": []\n }\n ],\n "includeDeletedEntities": false,\n "includeRemovedEntities": false,\n "maxRowsPerFile": 0,\n "orderBy": [\n {\n "column": {},\n "sortOrder": ""\n }\n ],\n "reportScope": {\n "adGroupId": "",\n "adId": "",\n "advertiserId": "",\n "agencyId": "",\n "campaignId": "",\n "engineAccountId": "",\n "keywordId": ""\n },\n "reportType": "",\n "rowCount": 0,\n "startRow": 0,\n "statisticsCurrency": "",\n "timeRange": {\n "changedAttributesSinceTimestamp": "",\n "changedMetricsSinceTimestamp": "",\n "endDate": "",\n "startDate": ""\n },\n "verifySingleTimeZone": false\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"columns\": [\n {\n \"columnName\": \"\",\n \"customDimensionName\": \"\",\n \"customMetricName\": \"\",\n \"endDate\": \"\",\n \"groupByColumn\": false,\n \"headerText\": \"\",\n \"platformSource\": \"\",\n \"productReportPerspective\": \"\",\n \"savedColumnName\": \"\",\n \"startDate\": \"\"\n }\n ],\n \"downloadFormat\": \"\",\n \"filters\": [\n {\n \"column\": {},\n \"operator\": \"\",\n \"values\": []\n }\n ],\n \"includeDeletedEntities\": false,\n \"includeRemovedEntities\": false,\n \"maxRowsPerFile\": 0,\n \"orderBy\": [\n {\n \"column\": {},\n \"sortOrder\": \"\"\n }\n ],\n \"reportScope\": {\n \"adGroupId\": \"\",\n \"adId\": \"\",\n \"advertiserId\": \"\",\n \"agencyId\": \"\",\n \"campaignId\": \"\",\n \"engineAccountId\": \"\",\n \"keywordId\": \"\"\n },\n \"reportType\": \"\",\n \"rowCount\": 0,\n \"startRow\": 0,\n \"statisticsCurrency\": \"\",\n \"timeRange\": {\n \"changedAttributesSinceTimestamp\": \"\",\n \"changedMetricsSinceTimestamp\": \"\",\n \"endDate\": \"\",\n \"startDate\": \"\"\n },\n \"verifySingleTimeZone\": false\n}")
val request = Request.Builder()
.url("{{baseUrl}}/doubleclicksearch/v2/reports/generate")
.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/doubleclicksearch/v2/reports/generate',
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({
columns: [
{
columnName: '',
customDimensionName: '',
customMetricName: '',
endDate: '',
groupByColumn: false,
headerText: '',
platformSource: '',
productReportPerspective: '',
savedColumnName: '',
startDate: ''
}
],
downloadFormat: '',
filters: [{column: {}, operator: '', values: []}],
includeDeletedEntities: false,
includeRemovedEntities: false,
maxRowsPerFile: 0,
orderBy: [{column: {}, sortOrder: ''}],
reportScope: {
adGroupId: '',
adId: '',
advertiserId: '',
agencyId: '',
campaignId: '',
engineAccountId: '',
keywordId: ''
},
reportType: '',
rowCount: 0,
startRow: 0,
statisticsCurrency: '',
timeRange: {
changedAttributesSinceTimestamp: '',
changedMetricsSinceTimestamp: '',
endDate: '',
startDate: ''
},
verifySingleTimeZone: false
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/doubleclicksearch/v2/reports/generate',
headers: {'content-type': 'application/json'},
body: {
columns: [
{
columnName: '',
customDimensionName: '',
customMetricName: '',
endDate: '',
groupByColumn: false,
headerText: '',
platformSource: '',
productReportPerspective: '',
savedColumnName: '',
startDate: ''
}
],
downloadFormat: '',
filters: [{column: {}, operator: '', values: []}],
includeDeletedEntities: false,
includeRemovedEntities: false,
maxRowsPerFile: 0,
orderBy: [{column: {}, sortOrder: ''}],
reportScope: {
adGroupId: '',
adId: '',
advertiserId: '',
agencyId: '',
campaignId: '',
engineAccountId: '',
keywordId: ''
},
reportType: '',
rowCount: 0,
startRow: 0,
statisticsCurrency: '',
timeRange: {
changedAttributesSinceTimestamp: '',
changedMetricsSinceTimestamp: '',
endDate: '',
startDate: ''
},
verifySingleTimeZone: false
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/doubleclicksearch/v2/reports/generate');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
columns: [
{
columnName: '',
customDimensionName: '',
customMetricName: '',
endDate: '',
groupByColumn: false,
headerText: '',
platformSource: '',
productReportPerspective: '',
savedColumnName: '',
startDate: ''
}
],
downloadFormat: '',
filters: [
{
column: {},
operator: '',
values: []
}
],
includeDeletedEntities: false,
includeRemovedEntities: false,
maxRowsPerFile: 0,
orderBy: [
{
column: {},
sortOrder: ''
}
],
reportScope: {
adGroupId: '',
adId: '',
advertiserId: '',
agencyId: '',
campaignId: '',
engineAccountId: '',
keywordId: ''
},
reportType: '',
rowCount: 0,
startRow: 0,
statisticsCurrency: '',
timeRange: {
changedAttributesSinceTimestamp: '',
changedMetricsSinceTimestamp: '',
endDate: '',
startDate: ''
},
verifySingleTimeZone: false
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/doubleclicksearch/v2/reports/generate',
headers: {'content-type': 'application/json'},
data: {
columns: [
{
columnName: '',
customDimensionName: '',
customMetricName: '',
endDate: '',
groupByColumn: false,
headerText: '',
platformSource: '',
productReportPerspective: '',
savedColumnName: '',
startDate: ''
}
],
downloadFormat: '',
filters: [{column: {}, operator: '', values: []}],
includeDeletedEntities: false,
includeRemovedEntities: false,
maxRowsPerFile: 0,
orderBy: [{column: {}, sortOrder: ''}],
reportScope: {
adGroupId: '',
adId: '',
advertiserId: '',
agencyId: '',
campaignId: '',
engineAccountId: '',
keywordId: ''
},
reportType: '',
rowCount: 0,
startRow: 0,
statisticsCurrency: '',
timeRange: {
changedAttributesSinceTimestamp: '',
changedMetricsSinceTimestamp: '',
endDate: '',
startDate: ''
},
verifySingleTimeZone: false
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/doubleclicksearch/v2/reports/generate';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"columns":[{"columnName":"","customDimensionName":"","customMetricName":"","endDate":"","groupByColumn":false,"headerText":"","platformSource":"","productReportPerspective":"","savedColumnName":"","startDate":""}],"downloadFormat":"","filters":[{"column":{},"operator":"","values":[]}],"includeDeletedEntities":false,"includeRemovedEntities":false,"maxRowsPerFile":0,"orderBy":[{"column":{},"sortOrder":""}],"reportScope":{"adGroupId":"","adId":"","advertiserId":"","agencyId":"","campaignId":"","engineAccountId":"","keywordId":""},"reportType":"","rowCount":0,"startRow":0,"statisticsCurrency":"","timeRange":{"changedAttributesSinceTimestamp":"","changedMetricsSinceTimestamp":"","endDate":"","startDate":""},"verifySingleTimeZone":false}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"columns": @[ @{ @"columnName": @"", @"customDimensionName": @"", @"customMetricName": @"", @"endDate": @"", @"groupByColumn": @NO, @"headerText": @"", @"platformSource": @"", @"productReportPerspective": @"", @"savedColumnName": @"", @"startDate": @"" } ],
@"downloadFormat": @"",
@"filters": @[ @{ @"column": @{ }, @"operator": @"", @"values": @[ ] } ],
@"includeDeletedEntities": @NO,
@"includeRemovedEntities": @NO,
@"maxRowsPerFile": @0,
@"orderBy": @[ @{ @"column": @{ }, @"sortOrder": @"" } ],
@"reportScope": @{ @"adGroupId": @"", @"adId": @"", @"advertiserId": @"", @"agencyId": @"", @"campaignId": @"", @"engineAccountId": @"", @"keywordId": @"" },
@"reportType": @"",
@"rowCount": @0,
@"startRow": @0,
@"statisticsCurrency": @"",
@"timeRange": @{ @"changedAttributesSinceTimestamp": @"", @"changedMetricsSinceTimestamp": @"", @"endDate": @"", @"startDate": @"" },
@"verifySingleTimeZone": @NO };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/doubleclicksearch/v2/reports/generate"]
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}}/doubleclicksearch/v2/reports/generate" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"columns\": [\n {\n \"columnName\": \"\",\n \"customDimensionName\": \"\",\n \"customMetricName\": \"\",\n \"endDate\": \"\",\n \"groupByColumn\": false,\n \"headerText\": \"\",\n \"platformSource\": \"\",\n \"productReportPerspective\": \"\",\n \"savedColumnName\": \"\",\n \"startDate\": \"\"\n }\n ],\n \"downloadFormat\": \"\",\n \"filters\": [\n {\n \"column\": {},\n \"operator\": \"\",\n \"values\": []\n }\n ],\n \"includeDeletedEntities\": false,\n \"includeRemovedEntities\": false,\n \"maxRowsPerFile\": 0,\n \"orderBy\": [\n {\n \"column\": {},\n \"sortOrder\": \"\"\n }\n ],\n \"reportScope\": {\n \"adGroupId\": \"\",\n \"adId\": \"\",\n \"advertiserId\": \"\",\n \"agencyId\": \"\",\n \"campaignId\": \"\",\n \"engineAccountId\": \"\",\n \"keywordId\": \"\"\n },\n \"reportType\": \"\",\n \"rowCount\": 0,\n \"startRow\": 0,\n \"statisticsCurrency\": \"\",\n \"timeRange\": {\n \"changedAttributesSinceTimestamp\": \"\",\n \"changedMetricsSinceTimestamp\": \"\",\n \"endDate\": \"\",\n \"startDate\": \"\"\n },\n \"verifySingleTimeZone\": false\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/doubleclicksearch/v2/reports/generate",
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([
'columns' => [
[
'columnName' => '',
'customDimensionName' => '',
'customMetricName' => '',
'endDate' => '',
'groupByColumn' => null,
'headerText' => '',
'platformSource' => '',
'productReportPerspective' => '',
'savedColumnName' => '',
'startDate' => ''
]
],
'downloadFormat' => '',
'filters' => [
[
'column' => [
],
'operator' => '',
'values' => [
]
]
],
'includeDeletedEntities' => null,
'includeRemovedEntities' => null,
'maxRowsPerFile' => 0,
'orderBy' => [
[
'column' => [
],
'sortOrder' => ''
]
],
'reportScope' => [
'adGroupId' => '',
'adId' => '',
'advertiserId' => '',
'agencyId' => '',
'campaignId' => '',
'engineAccountId' => '',
'keywordId' => ''
],
'reportType' => '',
'rowCount' => 0,
'startRow' => 0,
'statisticsCurrency' => '',
'timeRange' => [
'changedAttributesSinceTimestamp' => '',
'changedMetricsSinceTimestamp' => '',
'endDate' => '',
'startDate' => ''
],
'verifySingleTimeZone' => null
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/doubleclicksearch/v2/reports/generate', [
'body' => '{
"columns": [
{
"columnName": "",
"customDimensionName": "",
"customMetricName": "",
"endDate": "",
"groupByColumn": false,
"headerText": "",
"platformSource": "",
"productReportPerspective": "",
"savedColumnName": "",
"startDate": ""
}
],
"downloadFormat": "",
"filters": [
{
"column": {},
"operator": "",
"values": []
}
],
"includeDeletedEntities": false,
"includeRemovedEntities": false,
"maxRowsPerFile": 0,
"orderBy": [
{
"column": {},
"sortOrder": ""
}
],
"reportScope": {
"adGroupId": "",
"adId": "",
"advertiserId": "",
"agencyId": "",
"campaignId": "",
"engineAccountId": "",
"keywordId": ""
},
"reportType": "",
"rowCount": 0,
"startRow": 0,
"statisticsCurrency": "",
"timeRange": {
"changedAttributesSinceTimestamp": "",
"changedMetricsSinceTimestamp": "",
"endDate": "",
"startDate": ""
},
"verifySingleTimeZone": false
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/doubleclicksearch/v2/reports/generate');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'columns' => [
[
'columnName' => '',
'customDimensionName' => '',
'customMetricName' => '',
'endDate' => '',
'groupByColumn' => null,
'headerText' => '',
'platformSource' => '',
'productReportPerspective' => '',
'savedColumnName' => '',
'startDate' => ''
]
],
'downloadFormat' => '',
'filters' => [
[
'column' => [
],
'operator' => '',
'values' => [
]
]
],
'includeDeletedEntities' => null,
'includeRemovedEntities' => null,
'maxRowsPerFile' => 0,
'orderBy' => [
[
'column' => [
],
'sortOrder' => ''
]
],
'reportScope' => [
'adGroupId' => '',
'adId' => '',
'advertiserId' => '',
'agencyId' => '',
'campaignId' => '',
'engineAccountId' => '',
'keywordId' => ''
],
'reportType' => '',
'rowCount' => 0,
'startRow' => 0,
'statisticsCurrency' => '',
'timeRange' => [
'changedAttributesSinceTimestamp' => '',
'changedMetricsSinceTimestamp' => '',
'endDate' => '',
'startDate' => ''
],
'verifySingleTimeZone' => null
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'columns' => [
[
'columnName' => '',
'customDimensionName' => '',
'customMetricName' => '',
'endDate' => '',
'groupByColumn' => null,
'headerText' => '',
'platformSource' => '',
'productReportPerspective' => '',
'savedColumnName' => '',
'startDate' => ''
]
],
'downloadFormat' => '',
'filters' => [
[
'column' => [
],
'operator' => '',
'values' => [
]
]
],
'includeDeletedEntities' => null,
'includeRemovedEntities' => null,
'maxRowsPerFile' => 0,
'orderBy' => [
[
'column' => [
],
'sortOrder' => ''
]
],
'reportScope' => [
'adGroupId' => '',
'adId' => '',
'advertiserId' => '',
'agencyId' => '',
'campaignId' => '',
'engineAccountId' => '',
'keywordId' => ''
],
'reportType' => '',
'rowCount' => 0,
'startRow' => 0,
'statisticsCurrency' => '',
'timeRange' => [
'changedAttributesSinceTimestamp' => '',
'changedMetricsSinceTimestamp' => '',
'endDate' => '',
'startDate' => ''
],
'verifySingleTimeZone' => null
]));
$request->setRequestUrl('{{baseUrl}}/doubleclicksearch/v2/reports/generate');
$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}}/doubleclicksearch/v2/reports/generate' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"columns": [
{
"columnName": "",
"customDimensionName": "",
"customMetricName": "",
"endDate": "",
"groupByColumn": false,
"headerText": "",
"platformSource": "",
"productReportPerspective": "",
"savedColumnName": "",
"startDate": ""
}
],
"downloadFormat": "",
"filters": [
{
"column": {},
"operator": "",
"values": []
}
],
"includeDeletedEntities": false,
"includeRemovedEntities": false,
"maxRowsPerFile": 0,
"orderBy": [
{
"column": {},
"sortOrder": ""
}
],
"reportScope": {
"adGroupId": "",
"adId": "",
"advertiserId": "",
"agencyId": "",
"campaignId": "",
"engineAccountId": "",
"keywordId": ""
},
"reportType": "",
"rowCount": 0,
"startRow": 0,
"statisticsCurrency": "",
"timeRange": {
"changedAttributesSinceTimestamp": "",
"changedMetricsSinceTimestamp": "",
"endDate": "",
"startDate": ""
},
"verifySingleTimeZone": false
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/doubleclicksearch/v2/reports/generate' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"columns": [
{
"columnName": "",
"customDimensionName": "",
"customMetricName": "",
"endDate": "",
"groupByColumn": false,
"headerText": "",
"platformSource": "",
"productReportPerspective": "",
"savedColumnName": "",
"startDate": ""
}
],
"downloadFormat": "",
"filters": [
{
"column": {},
"operator": "",
"values": []
}
],
"includeDeletedEntities": false,
"includeRemovedEntities": false,
"maxRowsPerFile": 0,
"orderBy": [
{
"column": {},
"sortOrder": ""
}
],
"reportScope": {
"adGroupId": "",
"adId": "",
"advertiserId": "",
"agencyId": "",
"campaignId": "",
"engineAccountId": "",
"keywordId": ""
},
"reportType": "",
"rowCount": 0,
"startRow": 0,
"statisticsCurrency": "",
"timeRange": {
"changedAttributesSinceTimestamp": "",
"changedMetricsSinceTimestamp": "",
"endDate": "",
"startDate": ""
},
"verifySingleTimeZone": false
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"columns\": [\n {\n \"columnName\": \"\",\n \"customDimensionName\": \"\",\n \"customMetricName\": \"\",\n \"endDate\": \"\",\n \"groupByColumn\": false,\n \"headerText\": \"\",\n \"platformSource\": \"\",\n \"productReportPerspective\": \"\",\n \"savedColumnName\": \"\",\n \"startDate\": \"\"\n }\n ],\n \"downloadFormat\": \"\",\n \"filters\": [\n {\n \"column\": {},\n \"operator\": \"\",\n \"values\": []\n }\n ],\n \"includeDeletedEntities\": false,\n \"includeRemovedEntities\": false,\n \"maxRowsPerFile\": 0,\n \"orderBy\": [\n {\n \"column\": {},\n \"sortOrder\": \"\"\n }\n ],\n \"reportScope\": {\n \"adGroupId\": \"\",\n \"adId\": \"\",\n \"advertiserId\": \"\",\n \"agencyId\": \"\",\n \"campaignId\": \"\",\n \"engineAccountId\": \"\",\n \"keywordId\": \"\"\n },\n \"reportType\": \"\",\n \"rowCount\": 0,\n \"startRow\": 0,\n \"statisticsCurrency\": \"\",\n \"timeRange\": {\n \"changedAttributesSinceTimestamp\": \"\",\n \"changedMetricsSinceTimestamp\": \"\",\n \"endDate\": \"\",\n \"startDate\": \"\"\n },\n \"verifySingleTimeZone\": false\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/doubleclicksearch/v2/reports/generate", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/doubleclicksearch/v2/reports/generate"
payload = {
"columns": [
{
"columnName": "",
"customDimensionName": "",
"customMetricName": "",
"endDate": "",
"groupByColumn": False,
"headerText": "",
"platformSource": "",
"productReportPerspective": "",
"savedColumnName": "",
"startDate": ""
}
],
"downloadFormat": "",
"filters": [
{
"column": {},
"operator": "",
"values": []
}
],
"includeDeletedEntities": False,
"includeRemovedEntities": False,
"maxRowsPerFile": 0,
"orderBy": [
{
"column": {},
"sortOrder": ""
}
],
"reportScope": {
"adGroupId": "",
"adId": "",
"advertiserId": "",
"agencyId": "",
"campaignId": "",
"engineAccountId": "",
"keywordId": ""
},
"reportType": "",
"rowCount": 0,
"startRow": 0,
"statisticsCurrency": "",
"timeRange": {
"changedAttributesSinceTimestamp": "",
"changedMetricsSinceTimestamp": "",
"endDate": "",
"startDate": ""
},
"verifySingleTimeZone": False
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/doubleclicksearch/v2/reports/generate"
payload <- "{\n \"columns\": [\n {\n \"columnName\": \"\",\n \"customDimensionName\": \"\",\n \"customMetricName\": \"\",\n \"endDate\": \"\",\n \"groupByColumn\": false,\n \"headerText\": \"\",\n \"platformSource\": \"\",\n \"productReportPerspective\": \"\",\n \"savedColumnName\": \"\",\n \"startDate\": \"\"\n }\n ],\n \"downloadFormat\": \"\",\n \"filters\": [\n {\n \"column\": {},\n \"operator\": \"\",\n \"values\": []\n }\n ],\n \"includeDeletedEntities\": false,\n \"includeRemovedEntities\": false,\n \"maxRowsPerFile\": 0,\n \"orderBy\": [\n {\n \"column\": {},\n \"sortOrder\": \"\"\n }\n ],\n \"reportScope\": {\n \"adGroupId\": \"\",\n \"adId\": \"\",\n \"advertiserId\": \"\",\n \"agencyId\": \"\",\n \"campaignId\": \"\",\n \"engineAccountId\": \"\",\n \"keywordId\": \"\"\n },\n \"reportType\": \"\",\n \"rowCount\": 0,\n \"startRow\": 0,\n \"statisticsCurrency\": \"\",\n \"timeRange\": {\n \"changedAttributesSinceTimestamp\": \"\",\n \"changedMetricsSinceTimestamp\": \"\",\n \"endDate\": \"\",\n \"startDate\": \"\"\n },\n \"verifySingleTimeZone\": false\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/doubleclicksearch/v2/reports/generate")
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 \"columns\": [\n {\n \"columnName\": \"\",\n \"customDimensionName\": \"\",\n \"customMetricName\": \"\",\n \"endDate\": \"\",\n \"groupByColumn\": false,\n \"headerText\": \"\",\n \"platformSource\": \"\",\n \"productReportPerspective\": \"\",\n \"savedColumnName\": \"\",\n \"startDate\": \"\"\n }\n ],\n \"downloadFormat\": \"\",\n \"filters\": [\n {\n \"column\": {},\n \"operator\": \"\",\n \"values\": []\n }\n ],\n \"includeDeletedEntities\": false,\n \"includeRemovedEntities\": false,\n \"maxRowsPerFile\": 0,\n \"orderBy\": [\n {\n \"column\": {},\n \"sortOrder\": \"\"\n }\n ],\n \"reportScope\": {\n \"adGroupId\": \"\",\n \"adId\": \"\",\n \"advertiserId\": \"\",\n \"agencyId\": \"\",\n \"campaignId\": \"\",\n \"engineAccountId\": \"\",\n \"keywordId\": \"\"\n },\n \"reportType\": \"\",\n \"rowCount\": 0,\n \"startRow\": 0,\n \"statisticsCurrency\": \"\",\n \"timeRange\": {\n \"changedAttributesSinceTimestamp\": \"\",\n \"changedMetricsSinceTimestamp\": \"\",\n \"endDate\": \"\",\n \"startDate\": \"\"\n },\n \"verifySingleTimeZone\": false\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/doubleclicksearch/v2/reports/generate') do |req|
req.body = "{\n \"columns\": [\n {\n \"columnName\": \"\",\n \"customDimensionName\": \"\",\n \"customMetricName\": \"\",\n \"endDate\": \"\",\n \"groupByColumn\": false,\n \"headerText\": \"\",\n \"platformSource\": \"\",\n \"productReportPerspective\": \"\",\n \"savedColumnName\": \"\",\n \"startDate\": \"\"\n }\n ],\n \"downloadFormat\": \"\",\n \"filters\": [\n {\n \"column\": {},\n \"operator\": \"\",\n \"values\": []\n }\n ],\n \"includeDeletedEntities\": false,\n \"includeRemovedEntities\": false,\n \"maxRowsPerFile\": 0,\n \"orderBy\": [\n {\n \"column\": {},\n \"sortOrder\": \"\"\n }\n ],\n \"reportScope\": {\n \"adGroupId\": \"\",\n \"adId\": \"\",\n \"advertiserId\": \"\",\n \"agencyId\": \"\",\n \"campaignId\": \"\",\n \"engineAccountId\": \"\",\n \"keywordId\": \"\"\n },\n \"reportType\": \"\",\n \"rowCount\": 0,\n \"startRow\": 0,\n \"statisticsCurrency\": \"\",\n \"timeRange\": {\n \"changedAttributesSinceTimestamp\": \"\",\n \"changedMetricsSinceTimestamp\": \"\",\n \"endDate\": \"\",\n \"startDate\": \"\"\n },\n \"verifySingleTimeZone\": false\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/doubleclicksearch/v2/reports/generate";
let payload = json!({
"columns": (
json!({
"columnName": "",
"customDimensionName": "",
"customMetricName": "",
"endDate": "",
"groupByColumn": false,
"headerText": "",
"platformSource": "",
"productReportPerspective": "",
"savedColumnName": "",
"startDate": ""
})
),
"downloadFormat": "",
"filters": (
json!({
"column": json!({}),
"operator": "",
"values": ()
})
),
"includeDeletedEntities": false,
"includeRemovedEntities": false,
"maxRowsPerFile": 0,
"orderBy": (
json!({
"column": json!({}),
"sortOrder": ""
})
),
"reportScope": json!({
"adGroupId": "",
"adId": "",
"advertiserId": "",
"agencyId": "",
"campaignId": "",
"engineAccountId": "",
"keywordId": ""
}),
"reportType": "",
"rowCount": 0,
"startRow": 0,
"statisticsCurrency": "",
"timeRange": json!({
"changedAttributesSinceTimestamp": "",
"changedMetricsSinceTimestamp": "",
"endDate": "",
"startDate": ""
}),
"verifySingleTimeZone": false
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/doubleclicksearch/v2/reports/generate \
--header 'content-type: application/json' \
--data '{
"columns": [
{
"columnName": "",
"customDimensionName": "",
"customMetricName": "",
"endDate": "",
"groupByColumn": false,
"headerText": "",
"platformSource": "",
"productReportPerspective": "",
"savedColumnName": "",
"startDate": ""
}
],
"downloadFormat": "",
"filters": [
{
"column": {},
"operator": "",
"values": []
}
],
"includeDeletedEntities": false,
"includeRemovedEntities": false,
"maxRowsPerFile": 0,
"orderBy": [
{
"column": {},
"sortOrder": ""
}
],
"reportScope": {
"adGroupId": "",
"adId": "",
"advertiserId": "",
"agencyId": "",
"campaignId": "",
"engineAccountId": "",
"keywordId": ""
},
"reportType": "",
"rowCount": 0,
"startRow": 0,
"statisticsCurrency": "",
"timeRange": {
"changedAttributesSinceTimestamp": "",
"changedMetricsSinceTimestamp": "",
"endDate": "",
"startDate": ""
},
"verifySingleTimeZone": false
}'
echo '{
"columns": [
{
"columnName": "",
"customDimensionName": "",
"customMetricName": "",
"endDate": "",
"groupByColumn": false,
"headerText": "",
"platformSource": "",
"productReportPerspective": "",
"savedColumnName": "",
"startDate": ""
}
],
"downloadFormat": "",
"filters": [
{
"column": {},
"operator": "",
"values": []
}
],
"includeDeletedEntities": false,
"includeRemovedEntities": false,
"maxRowsPerFile": 0,
"orderBy": [
{
"column": {},
"sortOrder": ""
}
],
"reportScope": {
"adGroupId": "",
"adId": "",
"advertiserId": "",
"agencyId": "",
"campaignId": "",
"engineAccountId": "",
"keywordId": ""
},
"reportType": "",
"rowCount": 0,
"startRow": 0,
"statisticsCurrency": "",
"timeRange": {
"changedAttributesSinceTimestamp": "",
"changedMetricsSinceTimestamp": "",
"endDate": "",
"startDate": ""
},
"verifySingleTimeZone": false
}' | \
http POST {{baseUrl}}/doubleclicksearch/v2/reports/generate \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "columns": [\n {\n "columnName": "",\n "customDimensionName": "",\n "customMetricName": "",\n "endDate": "",\n "groupByColumn": false,\n "headerText": "",\n "platformSource": "",\n "productReportPerspective": "",\n "savedColumnName": "",\n "startDate": ""\n }\n ],\n "downloadFormat": "",\n "filters": [\n {\n "column": {},\n "operator": "",\n "values": []\n }\n ],\n "includeDeletedEntities": false,\n "includeRemovedEntities": false,\n "maxRowsPerFile": 0,\n "orderBy": [\n {\n "column": {},\n "sortOrder": ""\n }\n ],\n "reportScope": {\n "adGroupId": "",\n "adId": "",\n "advertiserId": "",\n "agencyId": "",\n "campaignId": "",\n "engineAccountId": "",\n "keywordId": ""\n },\n "reportType": "",\n "rowCount": 0,\n "startRow": 0,\n "statisticsCurrency": "",\n "timeRange": {\n "changedAttributesSinceTimestamp": "",\n "changedMetricsSinceTimestamp": "",\n "endDate": "",\n "startDate": ""\n },\n "verifySingleTimeZone": false\n}' \
--output-document \
- {{baseUrl}}/doubleclicksearch/v2/reports/generate
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"columns": [
[
"columnName": "",
"customDimensionName": "",
"customMetricName": "",
"endDate": "",
"groupByColumn": false,
"headerText": "",
"platformSource": "",
"productReportPerspective": "",
"savedColumnName": "",
"startDate": ""
]
],
"downloadFormat": "",
"filters": [
[
"column": [],
"operator": "",
"values": []
]
],
"includeDeletedEntities": false,
"includeRemovedEntities": false,
"maxRowsPerFile": 0,
"orderBy": [
[
"column": [],
"sortOrder": ""
]
],
"reportScope": [
"adGroupId": "",
"adId": "",
"advertiserId": "",
"agencyId": "",
"campaignId": "",
"engineAccountId": "",
"keywordId": ""
],
"reportType": "",
"rowCount": 0,
"startRow": 0,
"statisticsCurrency": "",
"timeRange": [
"changedAttributesSinceTimestamp": "",
"changedMetricsSinceTimestamp": "",
"endDate": "",
"startDate": ""
],
"verifySingleTimeZone": false
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/doubleclicksearch/v2/reports/generate")! 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
doubleclicksearch.reports.get
{{baseUrl}}/doubleclicksearch/v2/reports/:reportId
QUERY PARAMS
reportId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/doubleclicksearch/v2/reports/:reportId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/doubleclicksearch/v2/reports/:reportId")
require "http/client"
url = "{{baseUrl}}/doubleclicksearch/v2/reports/:reportId"
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}}/doubleclicksearch/v2/reports/:reportId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/doubleclicksearch/v2/reports/:reportId");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/doubleclicksearch/v2/reports/:reportId"
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/doubleclicksearch/v2/reports/:reportId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/doubleclicksearch/v2/reports/:reportId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/doubleclicksearch/v2/reports/:reportId"))
.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}}/doubleclicksearch/v2/reports/:reportId")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/doubleclicksearch/v2/reports/:reportId")
.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}}/doubleclicksearch/v2/reports/:reportId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/doubleclicksearch/v2/reports/:reportId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/doubleclicksearch/v2/reports/:reportId';
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}}/doubleclicksearch/v2/reports/:reportId',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/doubleclicksearch/v2/reports/:reportId")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/doubleclicksearch/v2/reports/:reportId',
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}}/doubleclicksearch/v2/reports/:reportId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/doubleclicksearch/v2/reports/:reportId');
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}}/doubleclicksearch/v2/reports/:reportId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/doubleclicksearch/v2/reports/:reportId';
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}}/doubleclicksearch/v2/reports/:reportId"]
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}}/doubleclicksearch/v2/reports/:reportId" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/doubleclicksearch/v2/reports/:reportId",
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}}/doubleclicksearch/v2/reports/:reportId');
echo $response->getBody();
setUrl('{{baseUrl}}/doubleclicksearch/v2/reports/:reportId');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/doubleclicksearch/v2/reports/:reportId');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/doubleclicksearch/v2/reports/:reportId' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/doubleclicksearch/v2/reports/:reportId' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/doubleclicksearch/v2/reports/:reportId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/doubleclicksearch/v2/reports/:reportId"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/doubleclicksearch/v2/reports/:reportId"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/doubleclicksearch/v2/reports/:reportId")
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/doubleclicksearch/v2/reports/:reportId') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/doubleclicksearch/v2/reports/:reportId";
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}}/doubleclicksearch/v2/reports/:reportId
http GET {{baseUrl}}/doubleclicksearch/v2/reports/:reportId
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/doubleclicksearch/v2/reports/:reportId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/doubleclicksearch/v2/reports/:reportId")! 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
doubleclicksearch.reports.getFile
{{baseUrl}}/doubleclicksearch/v2/reports/:reportId/files/:reportFragment
QUERY PARAMS
reportId
reportFragment
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/doubleclicksearch/v2/reports/:reportId/files/:reportFragment");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/doubleclicksearch/v2/reports/:reportId/files/:reportFragment")
require "http/client"
url = "{{baseUrl}}/doubleclicksearch/v2/reports/:reportId/files/:reportFragment"
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}}/doubleclicksearch/v2/reports/:reportId/files/:reportFragment"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/doubleclicksearch/v2/reports/:reportId/files/:reportFragment");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/doubleclicksearch/v2/reports/:reportId/files/:reportFragment"
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/doubleclicksearch/v2/reports/:reportId/files/:reportFragment HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/doubleclicksearch/v2/reports/:reportId/files/:reportFragment")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/doubleclicksearch/v2/reports/:reportId/files/:reportFragment"))
.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}}/doubleclicksearch/v2/reports/:reportId/files/:reportFragment")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/doubleclicksearch/v2/reports/:reportId/files/:reportFragment")
.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}}/doubleclicksearch/v2/reports/:reportId/files/:reportFragment');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/doubleclicksearch/v2/reports/:reportId/files/:reportFragment'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/doubleclicksearch/v2/reports/:reportId/files/:reportFragment';
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}}/doubleclicksearch/v2/reports/:reportId/files/:reportFragment',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/doubleclicksearch/v2/reports/:reportId/files/:reportFragment")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/doubleclicksearch/v2/reports/:reportId/files/:reportFragment',
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}}/doubleclicksearch/v2/reports/:reportId/files/:reportFragment'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/doubleclicksearch/v2/reports/:reportId/files/:reportFragment');
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}}/doubleclicksearch/v2/reports/:reportId/files/:reportFragment'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/doubleclicksearch/v2/reports/:reportId/files/:reportFragment';
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}}/doubleclicksearch/v2/reports/:reportId/files/:reportFragment"]
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}}/doubleclicksearch/v2/reports/:reportId/files/:reportFragment" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/doubleclicksearch/v2/reports/:reportId/files/:reportFragment",
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}}/doubleclicksearch/v2/reports/:reportId/files/:reportFragment');
echo $response->getBody();
setUrl('{{baseUrl}}/doubleclicksearch/v2/reports/:reportId/files/:reportFragment');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/doubleclicksearch/v2/reports/:reportId/files/:reportFragment');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/doubleclicksearch/v2/reports/:reportId/files/:reportFragment' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/doubleclicksearch/v2/reports/:reportId/files/:reportFragment' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/doubleclicksearch/v2/reports/:reportId/files/:reportFragment")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/doubleclicksearch/v2/reports/:reportId/files/:reportFragment"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/doubleclicksearch/v2/reports/:reportId/files/:reportFragment"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/doubleclicksearch/v2/reports/:reportId/files/:reportFragment")
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/doubleclicksearch/v2/reports/:reportId/files/:reportFragment') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/doubleclicksearch/v2/reports/:reportId/files/:reportFragment";
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}}/doubleclicksearch/v2/reports/:reportId/files/:reportFragment
http GET {{baseUrl}}/doubleclicksearch/v2/reports/:reportId/files/:reportFragment
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/doubleclicksearch/v2/reports/:reportId/files/:reportFragment
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/doubleclicksearch/v2/reports/:reportId/files/:reportFragment")! 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
doubleclicksearch.reports.getIdMappingFile
{{baseUrl}}/doubleclicksearch/v2/agency/:agencyId/advertiser/:advertiserId/idmapping
QUERY PARAMS
agencyId
advertiserId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/doubleclicksearch/v2/agency/:agencyId/advertiser/:advertiserId/idmapping");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/doubleclicksearch/v2/agency/:agencyId/advertiser/:advertiserId/idmapping")
require "http/client"
url = "{{baseUrl}}/doubleclicksearch/v2/agency/:agencyId/advertiser/:advertiserId/idmapping"
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}}/doubleclicksearch/v2/agency/:agencyId/advertiser/:advertiserId/idmapping"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/doubleclicksearch/v2/agency/:agencyId/advertiser/:advertiserId/idmapping");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/doubleclicksearch/v2/agency/:agencyId/advertiser/:advertiserId/idmapping"
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/doubleclicksearch/v2/agency/:agencyId/advertiser/:advertiserId/idmapping HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/doubleclicksearch/v2/agency/:agencyId/advertiser/:advertiserId/idmapping")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/doubleclicksearch/v2/agency/:agencyId/advertiser/:advertiserId/idmapping"))
.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}}/doubleclicksearch/v2/agency/:agencyId/advertiser/:advertiserId/idmapping")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/doubleclicksearch/v2/agency/:agencyId/advertiser/:advertiserId/idmapping")
.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}}/doubleclicksearch/v2/agency/:agencyId/advertiser/:advertiserId/idmapping');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/doubleclicksearch/v2/agency/:agencyId/advertiser/:advertiserId/idmapping'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/doubleclicksearch/v2/agency/:agencyId/advertiser/:advertiserId/idmapping';
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}}/doubleclicksearch/v2/agency/:agencyId/advertiser/:advertiserId/idmapping',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/doubleclicksearch/v2/agency/:agencyId/advertiser/:advertiserId/idmapping")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/doubleclicksearch/v2/agency/:agencyId/advertiser/:advertiserId/idmapping',
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}}/doubleclicksearch/v2/agency/:agencyId/advertiser/:advertiserId/idmapping'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/doubleclicksearch/v2/agency/:agencyId/advertiser/:advertiserId/idmapping');
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}}/doubleclicksearch/v2/agency/:agencyId/advertiser/:advertiserId/idmapping'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/doubleclicksearch/v2/agency/:agencyId/advertiser/:advertiserId/idmapping';
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}}/doubleclicksearch/v2/agency/:agencyId/advertiser/:advertiserId/idmapping"]
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}}/doubleclicksearch/v2/agency/:agencyId/advertiser/:advertiserId/idmapping" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/doubleclicksearch/v2/agency/:agencyId/advertiser/:advertiserId/idmapping",
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}}/doubleclicksearch/v2/agency/:agencyId/advertiser/:advertiserId/idmapping');
echo $response->getBody();
setUrl('{{baseUrl}}/doubleclicksearch/v2/agency/:agencyId/advertiser/:advertiserId/idmapping');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/doubleclicksearch/v2/agency/:agencyId/advertiser/:advertiserId/idmapping');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/doubleclicksearch/v2/agency/:agencyId/advertiser/:advertiserId/idmapping' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/doubleclicksearch/v2/agency/:agencyId/advertiser/:advertiserId/idmapping' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/doubleclicksearch/v2/agency/:agencyId/advertiser/:advertiserId/idmapping")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/doubleclicksearch/v2/agency/:agencyId/advertiser/:advertiserId/idmapping"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/doubleclicksearch/v2/agency/:agencyId/advertiser/:advertiserId/idmapping"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/doubleclicksearch/v2/agency/:agencyId/advertiser/:advertiserId/idmapping")
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/doubleclicksearch/v2/agency/:agencyId/advertiser/:advertiserId/idmapping') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/doubleclicksearch/v2/agency/:agencyId/advertiser/:advertiserId/idmapping";
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}}/doubleclicksearch/v2/agency/:agencyId/advertiser/:advertiserId/idmapping
http GET {{baseUrl}}/doubleclicksearch/v2/agency/:agencyId/advertiser/:advertiserId/idmapping
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/doubleclicksearch/v2/agency/:agencyId/advertiser/:advertiserId/idmapping
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/doubleclicksearch/v2/agency/:agencyId/advertiser/:advertiserId/idmapping")! 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
doubleclicksearch.reports.request
{{baseUrl}}/doubleclicksearch/v2/reports
BODY json
{
"columns": [
{
"columnName": "",
"customDimensionName": "",
"customMetricName": "",
"endDate": "",
"groupByColumn": false,
"headerText": "",
"platformSource": "",
"productReportPerspective": "",
"savedColumnName": "",
"startDate": ""
}
],
"downloadFormat": "",
"filters": [
{
"column": {},
"operator": "",
"values": []
}
],
"includeDeletedEntities": false,
"includeRemovedEntities": false,
"maxRowsPerFile": 0,
"orderBy": [
{
"column": {},
"sortOrder": ""
}
],
"reportScope": {
"adGroupId": "",
"adId": "",
"advertiserId": "",
"agencyId": "",
"campaignId": "",
"engineAccountId": "",
"keywordId": ""
},
"reportType": "",
"rowCount": 0,
"startRow": 0,
"statisticsCurrency": "",
"timeRange": {
"changedAttributesSinceTimestamp": "",
"changedMetricsSinceTimestamp": "",
"endDate": "",
"startDate": ""
},
"verifySingleTimeZone": false
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/doubleclicksearch/v2/reports");
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 \"columns\": [\n {\n \"columnName\": \"\",\n \"customDimensionName\": \"\",\n \"customMetricName\": \"\",\n \"endDate\": \"\",\n \"groupByColumn\": false,\n \"headerText\": \"\",\n \"platformSource\": \"\",\n \"productReportPerspective\": \"\",\n \"savedColumnName\": \"\",\n \"startDate\": \"\"\n }\n ],\n \"downloadFormat\": \"\",\n \"filters\": [\n {\n \"column\": {},\n \"operator\": \"\",\n \"values\": []\n }\n ],\n \"includeDeletedEntities\": false,\n \"includeRemovedEntities\": false,\n \"maxRowsPerFile\": 0,\n \"orderBy\": [\n {\n \"column\": {},\n \"sortOrder\": \"\"\n }\n ],\n \"reportScope\": {\n \"adGroupId\": \"\",\n \"adId\": \"\",\n \"advertiserId\": \"\",\n \"agencyId\": \"\",\n \"campaignId\": \"\",\n \"engineAccountId\": \"\",\n \"keywordId\": \"\"\n },\n \"reportType\": \"\",\n \"rowCount\": 0,\n \"startRow\": 0,\n \"statisticsCurrency\": \"\",\n \"timeRange\": {\n \"changedAttributesSinceTimestamp\": \"\",\n \"changedMetricsSinceTimestamp\": \"\",\n \"endDate\": \"\",\n \"startDate\": \"\"\n },\n \"verifySingleTimeZone\": false\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/doubleclicksearch/v2/reports" {:content-type :json
:form-params {:columns [{:columnName ""
:customDimensionName ""
:customMetricName ""
:endDate ""
:groupByColumn false
:headerText ""
:platformSource ""
:productReportPerspective ""
:savedColumnName ""
:startDate ""}]
:downloadFormat ""
:filters [{:column {}
:operator ""
:values []}]
:includeDeletedEntities false
:includeRemovedEntities false
:maxRowsPerFile 0
:orderBy [{:column {}
:sortOrder ""}]
:reportScope {:adGroupId ""
:adId ""
:advertiserId ""
:agencyId ""
:campaignId ""
:engineAccountId ""
:keywordId ""}
:reportType ""
:rowCount 0
:startRow 0
:statisticsCurrency ""
:timeRange {:changedAttributesSinceTimestamp ""
:changedMetricsSinceTimestamp ""
:endDate ""
:startDate ""}
:verifySingleTimeZone false}})
require "http/client"
url = "{{baseUrl}}/doubleclicksearch/v2/reports"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"columns\": [\n {\n \"columnName\": \"\",\n \"customDimensionName\": \"\",\n \"customMetricName\": \"\",\n \"endDate\": \"\",\n \"groupByColumn\": false,\n \"headerText\": \"\",\n \"platformSource\": \"\",\n \"productReportPerspective\": \"\",\n \"savedColumnName\": \"\",\n \"startDate\": \"\"\n }\n ],\n \"downloadFormat\": \"\",\n \"filters\": [\n {\n \"column\": {},\n \"operator\": \"\",\n \"values\": []\n }\n ],\n \"includeDeletedEntities\": false,\n \"includeRemovedEntities\": false,\n \"maxRowsPerFile\": 0,\n \"orderBy\": [\n {\n \"column\": {},\n \"sortOrder\": \"\"\n }\n ],\n \"reportScope\": {\n \"adGroupId\": \"\",\n \"adId\": \"\",\n \"advertiserId\": \"\",\n \"agencyId\": \"\",\n \"campaignId\": \"\",\n \"engineAccountId\": \"\",\n \"keywordId\": \"\"\n },\n \"reportType\": \"\",\n \"rowCount\": 0,\n \"startRow\": 0,\n \"statisticsCurrency\": \"\",\n \"timeRange\": {\n \"changedAttributesSinceTimestamp\": \"\",\n \"changedMetricsSinceTimestamp\": \"\",\n \"endDate\": \"\",\n \"startDate\": \"\"\n },\n \"verifySingleTimeZone\": false\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/doubleclicksearch/v2/reports"),
Content = new StringContent("{\n \"columns\": [\n {\n \"columnName\": \"\",\n \"customDimensionName\": \"\",\n \"customMetricName\": \"\",\n \"endDate\": \"\",\n \"groupByColumn\": false,\n \"headerText\": \"\",\n \"platformSource\": \"\",\n \"productReportPerspective\": \"\",\n \"savedColumnName\": \"\",\n \"startDate\": \"\"\n }\n ],\n \"downloadFormat\": \"\",\n \"filters\": [\n {\n \"column\": {},\n \"operator\": \"\",\n \"values\": []\n }\n ],\n \"includeDeletedEntities\": false,\n \"includeRemovedEntities\": false,\n \"maxRowsPerFile\": 0,\n \"orderBy\": [\n {\n \"column\": {},\n \"sortOrder\": \"\"\n }\n ],\n \"reportScope\": {\n \"adGroupId\": \"\",\n \"adId\": \"\",\n \"advertiserId\": \"\",\n \"agencyId\": \"\",\n \"campaignId\": \"\",\n \"engineAccountId\": \"\",\n \"keywordId\": \"\"\n },\n \"reportType\": \"\",\n \"rowCount\": 0,\n \"startRow\": 0,\n \"statisticsCurrency\": \"\",\n \"timeRange\": {\n \"changedAttributesSinceTimestamp\": \"\",\n \"changedMetricsSinceTimestamp\": \"\",\n \"endDate\": \"\",\n \"startDate\": \"\"\n },\n \"verifySingleTimeZone\": false\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/doubleclicksearch/v2/reports");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"columns\": [\n {\n \"columnName\": \"\",\n \"customDimensionName\": \"\",\n \"customMetricName\": \"\",\n \"endDate\": \"\",\n \"groupByColumn\": false,\n \"headerText\": \"\",\n \"platformSource\": \"\",\n \"productReportPerspective\": \"\",\n \"savedColumnName\": \"\",\n \"startDate\": \"\"\n }\n ],\n \"downloadFormat\": \"\",\n \"filters\": [\n {\n \"column\": {},\n \"operator\": \"\",\n \"values\": []\n }\n ],\n \"includeDeletedEntities\": false,\n \"includeRemovedEntities\": false,\n \"maxRowsPerFile\": 0,\n \"orderBy\": [\n {\n \"column\": {},\n \"sortOrder\": \"\"\n }\n ],\n \"reportScope\": {\n \"adGroupId\": \"\",\n \"adId\": \"\",\n \"advertiserId\": \"\",\n \"agencyId\": \"\",\n \"campaignId\": \"\",\n \"engineAccountId\": \"\",\n \"keywordId\": \"\"\n },\n \"reportType\": \"\",\n \"rowCount\": 0,\n \"startRow\": 0,\n \"statisticsCurrency\": \"\",\n \"timeRange\": {\n \"changedAttributesSinceTimestamp\": \"\",\n \"changedMetricsSinceTimestamp\": \"\",\n \"endDate\": \"\",\n \"startDate\": \"\"\n },\n \"verifySingleTimeZone\": false\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/doubleclicksearch/v2/reports"
payload := strings.NewReader("{\n \"columns\": [\n {\n \"columnName\": \"\",\n \"customDimensionName\": \"\",\n \"customMetricName\": \"\",\n \"endDate\": \"\",\n \"groupByColumn\": false,\n \"headerText\": \"\",\n \"platformSource\": \"\",\n \"productReportPerspective\": \"\",\n \"savedColumnName\": \"\",\n \"startDate\": \"\"\n }\n ],\n \"downloadFormat\": \"\",\n \"filters\": [\n {\n \"column\": {},\n \"operator\": \"\",\n \"values\": []\n }\n ],\n \"includeDeletedEntities\": false,\n \"includeRemovedEntities\": false,\n \"maxRowsPerFile\": 0,\n \"orderBy\": [\n {\n \"column\": {},\n \"sortOrder\": \"\"\n }\n ],\n \"reportScope\": {\n \"adGroupId\": \"\",\n \"adId\": \"\",\n \"advertiserId\": \"\",\n \"agencyId\": \"\",\n \"campaignId\": \"\",\n \"engineAccountId\": \"\",\n \"keywordId\": \"\"\n },\n \"reportType\": \"\",\n \"rowCount\": 0,\n \"startRow\": 0,\n \"statisticsCurrency\": \"\",\n \"timeRange\": {\n \"changedAttributesSinceTimestamp\": \"\",\n \"changedMetricsSinceTimestamp\": \"\",\n \"endDate\": \"\",\n \"startDate\": \"\"\n },\n \"verifySingleTimeZone\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/doubleclicksearch/v2/reports HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 1030
{
"columns": [
{
"columnName": "",
"customDimensionName": "",
"customMetricName": "",
"endDate": "",
"groupByColumn": false,
"headerText": "",
"platformSource": "",
"productReportPerspective": "",
"savedColumnName": "",
"startDate": ""
}
],
"downloadFormat": "",
"filters": [
{
"column": {},
"operator": "",
"values": []
}
],
"includeDeletedEntities": false,
"includeRemovedEntities": false,
"maxRowsPerFile": 0,
"orderBy": [
{
"column": {},
"sortOrder": ""
}
],
"reportScope": {
"adGroupId": "",
"adId": "",
"advertiserId": "",
"agencyId": "",
"campaignId": "",
"engineAccountId": "",
"keywordId": ""
},
"reportType": "",
"rowCount": 0,
"startRow": 0,
"statisticsCurrency": "",
"timeRange": {
"changedAttributesSinceTimestamp": "",
"changedMetricsSinceTimestamp": "",
"endDate": "",
"startDate": ""
},
"verifySingleTimeZone": false
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/doubleclicksearch/v2/reports")
.setHeader("content-type", "application/json")
.setBody("{\n \"columns\": [\n {\n \"columnName\": \"\",\n \"customDimensionName\": \"\",\n \"customMetricName\": \"\",\n \"endDate\": \"\",\n \"groupByColumn\": false,\n \"headerText\": \"\",\n \"platformSource\": \"\",\n \"productReportPerspective\": \"\",\n \"savedColumnName\": \"\",\n \"startDate\": \"\"\n }\n ],\n \"downloadFormat\": \"\",\n \"filters\": [\n {\n \"column\": {},\n \"operator\": \"\",\n \"values\": []\n }\n ],\n \"includeDeletedEntities\": false,\n \"includeRemovedEntities\": false,\n \"maxRowsPerFile\": 0,\n \"orderBy\": [\n {\n \"column\": {},\n \"sortOrder\": \"\"\n }\n ],\n \"reportScope\": {\n \"adGroupId\": \"\",\n \"adId\": \"\",\n \"advertiserId\": \"\",\n \"agencyId\": \"\",\n \"campaignId\": \"\",\n \"engineAccountId\": \"\",\n \"keywordId\": \"\"\n },\n \"reportType\": \"\",\n \"rowCount\": 0,\n \"startRow\": 0,\n \"statisticsCurrency\": \"\",\n \"timeRange\": {\n \"changedAttributesSinceTimestamp\": \"\",\n \"changedMetricsSinceTimestamp\": \"\",\n \"endDate\": \"\",\n \"startDate\": \"\"\n },\n \"verifySingleTimeZone\": false\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/doubleclicksearch/v2/reports"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"columns\": [\n {\n \"columnName\": \"\",\n \"customDimensionName\": \"\",\n \"customMetricName\": \"\",\n \"endDate\": \"\",\n \"groupByColumn\": false,\n \"headerText\": \"\",\n \"platformSource\": \"\",\n \"productReportPerspective\": \"\",\n \"savedColumnName\": \"\",\n \"startDate\": \"\"\n }\n ],\n \"downloadFormat\": \"\",\n \"filters\": [\n {\n \"column\": {},\n \"operator\": \"\",\n \"values\": []\n }\n ],\n \"includeDeletedEntities\": false,\n \"includeRemovedEntities\": false,\n \"maxRowsPerFile\": 0,\n \"orderBy\": [\n {\n \"column\": {},\n \"sortOrder\": \"\"\n }\n ],\n \"reportScope\": {\n \"adGroupId\": \"\",\n \"adId\": \"\",\n \"advertiserId\": \"\",\n \"agencyId\": \"\",\n \"campaignId\": \"\",\n \"engineAccountId\": \"\",\n \"keywordId\": \"\"\n },\n \"reportType\": \"\",\n \"rowCount\": 0,\n \"startRow\": 0,\n \"statisticsCurrency\": \"\",\n \"timeRange\": {\n \"changedAttributesSinceTimestamp\": \"\",\n \"changedMetricsSinceTimestamp\": \"\",\n \"endDate\": \"\",\n \"startDate\": \"\"\n },\n \"verifySingleTimeZone\": false\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"columns\": [\n {\n \"columnName\": \"\",\n \"customDimensionName\": \"\",\n \"customMetricName\": \"\",\n \"endDate\": \"\",\n \"groupByColumn\": false,\n \"headerText\": \"\",\n \"platformSource\": \"\",\n \"productReportPerspective\": \"\",\n \"savedColumnName\": \"\",\n \"startDate\": \"\"\n }\n ],\n \"downloadFormat\": \"\",\n \"filters\": [\n {\n \"column\": {},\n \"operator\": \"\",\n \"values\": []\n }\n ],\n \"includeDeletedEntities\": false,\n \"includeRemovedEntities\": false,\n \"maxRowsPerFile\": 0,\n \"orderBy\": [\n {\n \"column\": {},\n \"sortOrder\": \"\"\n }\n ],\n \"reportScope\": {\n \"adGroupId\": \"\",\n \"adId\": \"\",\n \"advertiserId\": \"\",\n \"agencyId\": \"\",\n \"campaignId\": \"\",\n \"engineAccountId\": \"\",\n \"keywordId\": \"\"\n },\n \"reportType\": \"\",\n \"rowCount\": 0,\n \"startRow\": 0,\n \"statisticsCurrency\": \"\",\n \"timeRange\": {\n \"changedAttributesSinceTimestamp\": \"\",\n \"changedMetricsSinceTimestamp\": \"\",\n \"endDate\": \"\",\n \"startDate\": \"\"\n },\n \"verifySingleTimeZone\": false\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/doubleclicksearch/v2/reports")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/doubleclicksearch/v2/reports")
.header("content-type", "application/json")
.body("{\n \"columns\": [\n {\n \"columnName\": \"\",\n \"customDimensionName\": \"\",\n \"customMetricName\": \"\",\n \"endDate\": \"\",\n \"groupByColumn\": false,\n \"headerText\": \"\",\n \"platformSource\": \"\",\n \"productReportPerspective\": \"\",\n \"savedColumnName\": \"\",\n \"startDate\": \"\"\n }\n ],\n \"downloadFormat\": \"\",\n \"filters\": [\n {\n \"column\": {},\n \"operator\": \"\",\n \"values\": []\n }\n ],\n \"includeDeletedEntities\": false,\n \"includeRemovedEntities\": false,\n \"maxRowsPerFile\": 0,\n \"orderBy\": [\n {\n \"column\": {},\n \"sortOrder\": \"\"\n }\n ],\n \"reportScope\": {\n \"adGroupId\": \"\",\n \"adId\": \"\",\n \"advertiserId\": \"\",\n \"agencyId\": \"\",\n \"campaignId\": \"\",\n \"engineAccountId\": \"\",\n \"keywordId\": \"\"\n },\n \"reportType\": \"\",\n \"rowCount\": 0,\n \"startRow\": 0,\n \"statisticsCurrency\": \"\",\n \"timeRange\": {\n \"changedAttributesSinceTimestamp\": \"\",\n \"changedMetricsSinceTimestamp\": \"\",\n \"endDate\": \"\",\n \"startDate\": \"\"\n },\n \"verifySingleTimeZone\": false\n}")
.asString();
const data = JSON.stringify({
columns: [
{
columnName: '',
customDimensionName: '',
customMetricName: '',
endDate: '',
groupByColumn: false,
headerText: '',
platformSource: '',
productReportPerspective: '',
savedColumnName: '',
startDate: ''
}
],
downloadFormat: '',
filters: [
{
column: {},
operator: '',
values: []
}
],
includeDeletedEntities: false,
includeRemovedEntities: false,
maxRowsPerFile: 0,
orderBy: [
{
column: {},
sortOrder: ''
}
],
reportScope: {
adGroupId: '',
adId: '',
advertiserId: '',
agencyId: '',
campaignId: '',
engineAccountId: '',
keywordId: ''
},
reportType: '',
rowCount: 0,
startRow: 0,
statisticsCurrency: '',
timeRange: {
changedAttributesSinceTimestamp: '',
changedMetricsSinceTimestamp: '',
endDate: '',
startDate: ''
},
verifySingleTimeZone: false
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/doubleclicksearch/v2/reports');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/doubleclicksearch/v2/reports',
headers: {'content-type': 'application/json'},
data: {
columns: [
{
columnName: '',
customDimensionName: '',
customMetricName: '',
endDate: '',
groupByColumn: false,
headerText: '',
platformSource: '',
productReportPerspective: '',
savedColumnName: '',
startDate: ''
}
],
downloadFormat: '',
filters: [{column: {}, operator: '', values: []}],
includeDeletedEntities: false,
includeRemovedEntities: false,
maxRowsPerFile: 0,
orderBy: [{column: {}, sortOrder: ''}],
reportScope: {
adGroupId: '',
adId: '',
advertiserId: '',
agencyId: '',
campaignId: '',
engineAccountId: '',
keywordId: ''
},
reportType: '',
rowCount: 0,
startRow: 0,
statisticsCurrency: '',
timeRange: {
changedAttributesSinceTimestamp: '',
changedMetricsSinceTimestamp: '',
endDate: '',
startDate: ''
},
verifySingleTimeZone: false
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/doubleclicksearch/v2/reports';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"columns":[{"columnName":"","customDimensionName":"","customMetricName":"","endDate":"","groupByColumn":false,"headerText":"","platformSource":"","productReportPerspective":"","savedColumnName":"","startDate":""}],"downloadFormat":"","filters":[{"column":{},"operator":"","values":[]}],"includeDeletedEntities":false,"includeRemovedEntities":false,"maxRowsPerFile":0,"orderBy":[{"column":{},"sortOrder":""}],"reportScope":{"adGroupId":"","adId":"","advertiserId":"","agencyId":"","campaignId":"","engineAccountId":"","keywordId":""},"reportType":"","rowCount":0,"startRow":0,"statisticsCurrency":"","timeRange":{"changedAttributesSinceTimestamp":"","changedMetricsSinceTimestamp":"","endDate":"","startDate":""},"verifySingleTimeZone":false}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/doubleclicksearch/v2/reports',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "columns": [\n {\n "columnName": "",\n "customDimensionName": "",\n "customMetricName": "",\n "endDate": "",\n "groupByColumn": false,\n "headerText": "",\n "platformSource": "",\n "productReportPerspective": "",\n "savedColumnName": "",\n "startDate": ""\n }\n ],\n "downloadFormat": "",\n "filters": [\n {\n "column": {},\n "operator": "",\n "values": []\n }\n ],\n "includeDeletedEntities": false,\n "includeRemovedEntities": false,\n "maxRowsPerFile": 0,\n "orderBy": [\n {\n "column": {},\n "sortOrder": ""\n }\n ],\n "reportScope": {\n "adGroupId": "",\n "adId": "",\n "advertiserId": "",\n "agencyId": "",\n "campaignId": "",\n "engineAccountId": "",\n "keywordId": ""\n },\n "reportType": "",\n "rowCount": 0,\n "startRow": 0,\n "statisticsCurrency": "",\n "timeRange": {\n "changedAttributesSinceTimestamp": "",\n "changedMetricsSinceTimestamp": "",\n "endDate": "",\n "startDate": ""\n },\n "verifySingleTimeZone": false\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"columns\": [\n {\n \"columnName\": \"\",\n \"customDimensionName\": \"\",\n \"customMetricName\": \"\",\n \"endDate\": \"\",\n \"groupByColumn\": false,\n \"headerText\": \"\",\n \"platformSource\": \"\",\n \"productReportPerspective\": \"\",\n \"savedColumnName\": \"\",\n \"startDate\": \"\"\n }\n ],\n \"downloadFormat\": \"\",\n \"filters\": [\n {\n \"column\": {},\n \"operator\": \"\",\n \"values\": []\n }\n ],\n \"includeDeletedEntities\": false,\n \"includeRemovedEntities\": false,\n \"maxRowsPerFile\": 0,\n \"orderBy\": [\n {\n \"column\": {},\n \"sortOrder\": \"\"\n }\n ],\n \"reportScope\": {\n \"adGroupId\": \"\",\n \"adId\": \"\",\n \"advertiserId\": \"\",\n \"agencyId\": \"\",\n \"campaignId\": \"\",\n \"engineAccountId\": \"\",\n \"keywordId\": \"\"\n },\n \"reportType\": \"\",\n \"rowCount\": 0,\n \"startRow\": 0,\n \"statisticsCurrency\": \"\",\n \"timeRange\": {\n \"changedAttributesSinceTimestamp\": \"\",\n \"changedMetricsSinceTimestamp\": \"\",\n \"endDate\": \"\",\n \"startDate\": \"\"\n },\n \"verifySingleTimeZone\": false\n}")
val request = Request.Builder()
.url("{{baseUrl}}/doubleclicksearch/v2/reports")
.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/doubleclicksearch/v2/reports',
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({
columns: [
{
columnName: '',
customDimensionName: '',
customMetricName: '',
endDate: '',
groupByColumn: false,
headerText: '',
platformSource: '',
productReportPerspective: '',
savedColumnName: '',
startDate: ''
}
],
downloadFormat: '',
filters: [{column: {}, operator: '', values: []}],
includeDeletedEntities: false,
includeRemovedEntities: false,
maxRowsPerFile: 0,
orderBy: [{column: {}, sortOrder: ''}],
reportScope: {
adGroupId: '',
adId: '',
advertiserId: '',
agencyId: '',
campaignId: '',
engineAccountId: '',
keywordId: ''
},
reportType: '',
rowCount: 0,
startRow: 0,
statisticsCurrency: '',
timeRange: {
changedAttributesSinceTimestamp: '',
changedMetricsSinceTimestamp: '',
endDate: '',
startDate: ''
},
verifySingleTimeZone: false
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/doubleclicksearch/v2/reports',
headers: {'content-type': 'application/json'},
body: {
columns: [
{
columnName: '',
customDimensionName: '',
customMetricName: '',
endDate: '',
groupByColumn: false,
headerText: '',
platformSource: '',
productReportPerspective: '',
savedColumnName: '',
startDate: ''
}
],
downloadFormat: '',
filters: [{column: {}, operator: '', values: []}],
includeDeletedEntities: false,
includeRemovedEntities: false,
maxRowsPerFile: 0,
orderBy: [{column: {}, sortOrder: ''}],
reportScope: {
adGroupId: '',
adId: '',
advertiserId: '',
agencyId: '',
campaignId: '',
engineAccountId: '',
keywordId: ''
},
reportType: '',
rowCount: 0,
startRow: 0,
statisticsCurrency: '',
timeRange: {
changedAttributesSinceTimestamp: '',
changedMetricsSinceTimestamp: '',
endDate: '',
startDate: ''
},
verifySingleTimeZone: false
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/doubleclicksearch/v2/reports');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
columns: [
{
columnName: '',
customDimensionName: '',
customMetricName: '',
endDate: '',
groupByColumn: false,
headerText: '',
platformSource: '',
productReportPerspective: '',
savedColumnName: '',
startDate: ''
}
],
downloadFormat: '',
filters: [
{
column: {},
operator: '',
values: []
}
],
includeDeletedEntities: false,
includeRemovedEntities: false,
maxRowsPerFile: 0,
orderBy: [
{
column: {},
sortOrder: ''
}
],
reportScope: {
adGroupId: '',
adId: '',
advertiserId: '',
agencyId: '',
campaignId: '',
engineAccountId: '',
keywordId: ''
},
reportType: '',
rowCount: 0,
startRow: 0,
statisticsCurrency: '',
timeRange: {
changedAttributesSinceTimestamp: '',
changedMetricsSinceTimestamp: '',
endDate: '',
startDate: ''
},
verifySingleTimeZone: false
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/doubleclicksearch/v2/reports',
headers: {'content-type': 'application/json'},
data: {
columns: [
{
columnName: '',
customDimensionName: '',
customMetricName: '',
endDate: '',
groupByColumn: false,
headerText: '',
platformSource: '',
productReportPerspective: '',
savedColumnName: '',
startDate: ''
}
],
downloadFormat: '',
filters: [{column: {}, operator: '', values: []}],
includeDeletedEntities: false,
includeRemovedEntities: false,
maxRowsPerFile: 0,
orderBy: [{column: {}, sortOrder: ''}],
reportScope: {
adGroupId: '',
adId: '',
advertiserId: '',
agencyId: '',
campaignId: '',
engineAccountId: '',
keywordId: ''
},
reportType: '',
rowCount: 0,
startRow: 0,
statisticsCurrency: '',
timeRange: {
changedAttributesSinceTimestamp: '',
changedMetricsSinceTimestamp: '',
endDate: '',
startDate: ''
},
verifySingleTimeZone: false
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/doubleclicksearch/v2/reports';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"columns":[{"columnName":"","customDimensionName":"","customMetricName":"","endDate":"","groupByColumn":false,"headerText":"","platformSource":"","productReportPerspective":"","savedColumnName":"","startDate":""}],"downloadFormat":"","filters":[{"column":{},"operator":"","values":[]}],"includeDeletedEntities":false,"includeRemovedEntities":false,"maxRowsPerFile":0,"orderBy":[{"column":{},"sortOrder":""}],"reportScope":{"adGroupId":"","adId":"","advertiserId":"","agencyId":"","campaignId":"","engineAccountId":"","keywordId":""},"reportType":"","rowCount":0,"startRow":0,"statisticsCurrency":"","timeRange":{"changedAttributesSinceTimestamp":"","changedMetricsSinceTimestamp":"","endDate":"","startDate":""},"verifySingleTimeZone":false}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"columns": @[ @{ @"columnName": @"", @"customDimensionName": @"", @"customMetricName": @"", @"endDate": @"", @"groupByColumn": @NO, @"headerText": @"", @"platformSource": @"", @"productReportPerspective": @"", @"savedColumnName": @"", @"startDate": @"" } ],
@"downloadFormat": @"",
@"filters": @[ @{ @"column": @{ }, @"operator": @"", @"values": @[ ] } ],
@"includeDeletedEntities": @NO,
@"includeRemovedEntities": @NO,
@"maxRowsPerFile": @0,
@"orderBy": @[ @{ @"column": @{ }, @"sortOrder": @"" } ],
@"reportScope": @{ @"adGroupId": @"", @"adId": @"", @"advertiserId": @"", @"agencyId": @"", @"campaignId": @"", @"engineAccountId": @"", @"keywordId": @"" },
@"reportType": @"",
@"rowCount": @0,
@"startRow": @0,
@"statisticsCurrency": @"",
@"timeRange": @{ @"changedAttributesSinceTimestamp": @"", @"changedMetricsSinceTimestamp": @"", @"endDate": @"", @"startDate": @"" },
@"verifySingleTimeZone": @NO };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/doubleclicksearch/v2/reports"]
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}}/doubleclicksearch/v2/reports" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"columns\": [\n {\n \"columnName\": \"\",\n \"customDimensionName\": \"\",\n \"customMetricName\": \"\",\n \"endDate\": \"\",\n \"groupByColumn\": false,\n \"headerText\": \"\",\n \"platformSource\": \"\",\n \"productReportPerspective\": \"\",\n \"savedColumnName\": \"\",\n \"startDate\": \"\"\n }\n ],\n \"downloadFormat\": \"\",\n \"filters\": [\n {\n \"column\": {},\n \"operator\": \"\",\n \"values\": []\n }\n ],\n \"includeDeletedEntities\": false,\n \"includeRemovedEntities\": false,\n \"maxRowsPerFile\": 0,\n \"orderBy\": [\n {\n \"column\": {},\n \"sortOrder\": \"\"\n }\n ],\n \"reportScope\": {\n \"adGroupId\": \"\",\n \"adId\": \"\",\n \"advertiserId\": \"\",\n \"agencyId\": \"\",\n \"campaignId\": \"\",\n \"engineAccountId\": \"\",\n \"keywordId\": \"\"\n },\n \"reportType\": \"\",\n \"rowCount\": 0,\n \"startRow\": 0,\n \"statisticsCurrency\": \"\",\n \"timeRange\": {\n \"changedAttributesSinceTimestamp\": \"\",\n \"changedMetricsSinceTimestamp\": \"\",\n \"endDate\": \"\",\n \"startDate\": \"\"\n },\n \"verifySingleTimeZone\": false\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/doubleclicksearch/v2/reports",
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([
'columns' => [
[
'columnName' => '',
'customDimensionName' => '',
'customMetricName' => '',
'endDate' => '',
'groupByColumn' => null,
'headerText' => '',
'platformSource' => '',
'productReportPerspective' => '',
'savedColumnName' => '',
'startDate' => ''
]
],
'downloadFormat' => '',
'filters' => [
[
'column' => [
],
'operator' => '',
'values' => [
]
]
],
'includeDeletedEntities' => null,
'includeRemovedEntities' => null,
'maxRowsPerFile' => 0,
'orderBy' => [
[
'column' => [
],
'sortOrder' => ''
]
],
'reportScope' => [
'adGroupId' => '',
'adId' => '',
'advertiserId' => '',
'agencyId' => '',
'campaignId' => '',
'engineAccountId' => '',
'keywordId' => ''
],
'reportType' => '',
'rowCount' => 0,
'startRow' => 0,
'statisticsCurrency' => '',
'timeRange' => [
'changedAttributesSinceTimestamp' => '',
'changedMetricsSinceTimestamp' => '',
'endDate' => '',
'startDate' => ''
],
'verifySingleTimeZone' => null
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/doubleclicksearch/v2/reports', [
'body' => '{
"columns": [
{
"columnName": "",
"customDimensionName": "",
"customMetricName": "",
"endDate": "",
"groupByColumn": false,
"headerText": "",
"platformSource": "",
"productReportPerspective": "",
"savedColumnName": "",
"startDate": ""
}
],
"downloadFormat": "",
"filters": [
{
"column": {},
"operator": "",
"values": []
}
],
"includeDeletedEntities": false,
"includeRemovedEntities": false,
"maxRowsPerFile": 0,
"orderBy": [
{
"column": {},
"sortOrder": ""
}
],
"reportScope": {
"adGroupId": "",
"adId": "",
"advertiserId": "",
"agencyId": "",
"campaignId": "",
"engineAccountId": "",
"keywordId": ""
},
"reportType": "",
"rowCount": 0,
"startRow": 0,
"statisticsCurrency": "",
"timeRange": {
"changedAttributesSinceTimestamp": "",
"changedMetricsSinceTimestamp": "",
"endDate": "",
"startDate": ""
},
"verifySingleTimeZone": false
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/doubleclicksearch/v2/reports');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'columns' => [
[
'columnName' => '',
'customDimensionName' => '',
'customMetricName' => '',
'endDate' => '',
'groupByColumn' => null,
'headerText' => '',
'platformSource' => '',
'productReportPerspective' => '',
'savedColumnName' => '',
'startDate' => ''
]
],
'downloadFormat' => '',
'filters' => [
[
'column' => [
],
'operator' => '',
'values' => [
]
]
],
'includeDeletedEntities' => null,
'includeRemovedEntities' => null,
'maxRowsPerFile' => 0,
'orderBy' => [
[
'column' => [
],
'sortOrder' => ''
]
],
'reportScope' => [
'adGroupId' => '',
'adId' => '',
'advertiserId' => '',
'agencyId' => '',
'campaignId' => '',
'engineAccountId' => '',
'keywordId' => ''
],
'reportType' => '',
'rowCount' => 0,
'startRow' => 0,
'statisticsCurrency' => '',
'timeRange' => [
'changedAttributesSinceTimestamp' => '',
'changedMetricsSinceTimestamp' => '',
'endDate' => '',
'startDate' => ''
],
'verifySingleTimeZone' => null
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'columns' => [
[
'columnName' => '',
'customDimensionName' => '',
'customMetricName' => '',
'endDate' => '',
'groupByColumn' => null,
'headerText' => '',
'platformSource' => '',
'productReportPerspective' => '',
'savedColumnName' => '',
'startDate' => ''
]
],
'downloadFormat' => '',
'filters' => [
[
'column' => [
],
'operator' => '',
'values' => [
]
]
],
'includeDeletedEntities' => null,
'includeRemovedEntities' => null,
'maxRowsPerFile' => 0,
'orderBy' => [
[
'column' => [
],
'sortOrder' => ''
]
],
'reportScope' => [
'adGroupId' => '',
'adId' => '',
'advertiserId' => '',
'agencyId' => '',
'campaignId' => '',
'engineAccountId' => '',
'keywordId' => ''
],
'reportType' => '',
'rowCount' => 0,
'startRow' => 0,
'statisticsCurrency' => '',
'timeRange' => [
'changedAttributesSinceTimestamp' => '',
'changedMetricsSinceTimestamp' => '',
'endDate' => '',
'startDate' => ''
],
'verifySingleTimeZone' => null
]));
$request->setRequestUrl('{{baseUrl}}/doubleclicksearch/v2/reports');
$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}}/doubleclicksearch/v2/reports' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"columns": [
{
"columnName": "",
"customDimensionName": "",
"customMetricName": "",
"endDate": "",
"groupByColumn": false,
"headerText": "",
"platformSource": "",
"productReportPerspective": "",
"savedColumnName": "",
"startDate": ""
}
],
"downloadFormat": "",
"filters": [
{
"column": {},
"operator": "",
"values": []
}
],
"includeDeletedEntities": false,
"includeRemovedEntities": false,
"maxRowsPerFile": 0,
"orderBy": [
{
"column": {},
"sortOrder": ""
}
],
"reportScope": {
"adGroupId": "",
"adId": "",
"advertiserId": "",
"agencyId": "",
"campaignId": "",
"engineAccountId": "",
"keywordId": ""
},
"reportType": "",
"rowCount": 0,
"startRow": 0,
"statisticsCurrency": "",
"timeRange": {
"changedAttributesSinceTimestamp": "",
"changedMetricsSinceTimestamp": "",
"endDate": "",
"startDate": ""
},
"verifySingleTimeZone": false
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/doubleclicksearch/v2/reports' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"columns": [
{
"columnName": "",
"customDimensionName": "",
"customMetricName": "",
"endDate": "",
"groupByColumn": false,
"headerText": "",
"platformSource": "",
"productReportPerspective": "",
"savedColumnName": "",
"startDate": ""
}
],
"downloadFormat": "",
"filters": [
{
"column": {},
"operator": "",
"values": []
}
],
"includeDeletedEntities": false,
"includeRemovedEntities": false,
"maxRowsPerFile": 0,
"orderBy": [
{
"column": {},
"sortOrder": ""
}
],
"reportScope": {
"adGroupId": "",
"adId": "",
"advertiserId": "",
"agencyId": "",
"campaignId": "",
"engineAccountId": "",
"keywordId": ""
},
"reportType": "",
"rowCount": 0,
"startRow": 0,
"statisticsCurrency": "",
"timeRange": {
"changedAttributesSinceTimestamp": "",
"changedMetricsSinceTimestamp": "",
"endDate": "",
"startDate": ""
},
"verifySingleTimeZone": false
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"columns\": [\n {\n \"columnName\": \"\",\n \"customDimensionName\": \"\",\n \"customMetricName\": \"\",\n \"endDate\": \"\",\n \"groupByColumn\": false,\n \"headerText\": \"\",\n \"platformSource\": \"\",\n \"productReportPerspective\": \"\",\n \"savedColumnName\": \"\",\n \"startDate\": \"\"\n }\n ],\n \"downloadFormat\": \"\",\n \"filters\": [\n {\n \"column\": {},\n \"operator\": \"\",\n \"values\": []\n }\n ],\n \"includeDeletedEntities\": false,\n \"includeRemovedEntities\": false,\n \"maxRowsPerFile\": 0,\n \"orderBy\": [\n {\n \"column\": {},\n \"sortOrder\": \"\"\n }\n ],\n \"reportScope\": {\n \"adGroupId\": \"\",\n \"adId\": \"\",\n \"advertiserId\": \"\",\n \"agencyId\": \"\",\n \"campaignId\": \"\",\n \"engineAccountId\": \"\",\n \"keywordId\": \"\"\n },\n \"reportType\": \"\",\n \"rowCount\": 0,\n \"startRow\": 0,\n \"statisticsCurrency\": \"\",\n \"timeRange\": {\n \"changedAttributesSinceTimestamp\": \"\",\n \"changedMetricsSinceTimestamp\": \"\",\n \"endDate\": \"\",\n \"startDate\": \"\"\n },\n \"verifySingleTimeZone\": false\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/doubleclicksearch/v2/reports", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/doubleclicksearch/v2/reports"
payload = {
"columns": [
{
"columnName": "",
"customDimensionName": "",
"customMetricName": "",
"endDate": "",
"groupByColumn": False,
"headerText": "",
"platformSource": "",
"productReportPerspective": "",
"savedColumnName": "",
"startDate": ""
}
],
"downloadFormat": "",
"filters": [
{
"column": {},
"operator": "",
"values": []
}
],
"includeDeletedEntities": False,
"includeRemovedEntities": False,
"maxRowsPerFile": 0,
"orderBy": [
{
"column": {},
"sortOrder": ""
}
],
"reportScope": {
"adGroupId": "",
"adId": "",
"advertiserId": "",
"agencyId": "",
"campaignId": "",
"engineAccountId": "",
"keywordId": ""
},
"reportType": "",
"rowCount": 0,
"startRow": 0,
"statisticsCurrency": "",
"timeRange": {
"changedAttributesSinceTimestamp": "",
"changedMetricsSinceTimestamp": "",
"endDate": "",
"startDate": ""
},
"verifySingleTimeZone": False
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/doubleclicksearch/v2/reports"
payload <- "{\n \"columns\": [\n {\n \"columnName\": \"\",\n \"customDimensionName\": \"\",\n \"customMetricName\": \"\",\n \"endDate\": \"\",\n \"groupByColumn\": false,\n \"headerText\": \"\",\n \"platformSource\": \"\",\n \"productReportPerspective\": \"\",\n \"savedColumnName\": \"\",\n \"startDate\": \"\"\n }\n ],\n \"downloadFormat\": \"\",\n \"filters\": [\n {\n \"column\": {},\n \"operator\": \"\",\n \"values\": []\n }\n ],\n \"includeDeletedEntities\": false,\n \"includeRemovedEntities\": false,\n \"maxRowsPerFile\": 0,\n \"orderBy\": [\n {\n \"column\": {},\n \"sortOrder\": \"\"\n }\n ],\n \"reportScope\": {\n \"adGroupId\": \"\",\n \"adId\": \"\",\n \"advertiserId\": \"\",\n \"agencyId\": \"\",\n \"campaignId\": \"\",\n \"engineAccountId\": \"\",\n \"keywordId\": \"\"\n },\n \"reportType\": \"\",\n \"rowCount\": 0,\n \"startRow\": 0,\n \"statisticsCurrency\": \"\",\n \"timeRange\": {\n \"changedAttributesSinceTimestamp\": \"\",\n \"changedMetricsSinceTimestamp\": \"\",\n \"endDate\": \"\",\n \"startDate\": \"\"\n },\n \"verifySingleTimeZone\": false\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/doubleclicksearch/v2/reports")
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 \"columns\": [\n {\n \"columnName\": \"\",\n \"customDimensionName\": \"\",\n \"customMetricName\": \"\",\n \"endDate\": \"\",\n \"groupByColumn\": false,\n \"headerText\": \"\",\n \"platformSource\": \"\",\n \"productReportPerspective\": \"\",\n \"savedColumnName\": \"\",\n \"startDate\": \"\"\n }\n ],\n \"downloadFormat\": \"\",\n \"filters\": [\n {\n \"column\": {},\n \"operator\": \"\",\n \"values\": []\n }\n ],\n \"includeDeletedEntities\": false,\n \"includeRemovedEntities\": false,\n \"maxRowsPerFile\": 0,\n \"orderBy\": [\n {\n \"column\": {},\n \"sortOrder\": \"\"\n }\n ],\n \"reportScope\": {\n \"adGroupId\": \"\",\n \"adId\": \"\",\n \"advertiserId\": \"\",\n \"agencyId\": \"\",\n \"campaignId\": \"\",\n \"engineAccountId\": \"\",\n \"keywordId\": \"\"\n },\n \"reportType\": \"\",\n \"rowCount\": 0,\n \"startRow\": 0,\n \"statisticsCurrency\": \"\",\n \"timeRange\": {\n \"changedAttributesSinceTimestamp\": \"\",\n \"changedMetricsSinceTimestamp\": \"\",\n \"endDate\": \"\",\n \"startDate\": \"\"\n },\n \"verifySingleTimeZone\": false\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/doubleclicksearch/v2/reports') do |req|
req.body = "{\n \"columns\": [\n {\n \"columnName\": \"\",\n \"customDimensionName\": \"\",\n \"customMetricName\": \"\",\n \"endDate\": \"\",\n \"groupByColumn\": false,\n \"headerText\": \"\",\n \"platformSource\": \"\",\n \"productReportPerspective\": \"\",\n \"savedColumnName\": \"\",\n \"startDate\": \"\"\n }\n ],\n \"downloadFormat\": \"\",\n \"filters\": [\n {\n \"column\": {},\n \"operator\": \"\",\n \"values\": []\n }\n ],\n \"includeDeletedEntities\": false,\n \"includeRemovedEntities\": false,\n \"maxRowsPerFile\": 0,\n \"orderBy\": [\n {\n \"column\": {},\n \"sortOrder\": \"\"\n }\n ],\n \"reportScope\": {\n \"adGroupId\": \"\",\n \"adId\": \"\",\n \"advertiserId\": \"\",\n \"agencyId\": \"\",\n \"campaignId\": \"\",\n \"engineAccountId\": \"\",\n \"keywordId\": \"\"\n },\n \"reportType\": \"\",\n \"rowCount\": 0,\n \"startRow\": 0,\n \"statisticsCurrency\": \"\",\n \"timeRange\": {\n \"changedAttributesSinceTimestamp\": \"\",\n \"changedMetricsSinceTimestamp\": \"\",\n \"endDate\": \"\",\n \"startDate\": \"\"\n },\n \"verifySingleTimeZone\": false\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/doubleclicksearch/v2/reports";
let payload = json!({
"columns": (
json!({
"columnName": "",
"customDimensionName": "",
"customMetricName": "",
"endDate": "",
"groupByColumn": false,
"headerText": "",
"platformSource": "",
"productReportPerspective": "",
"savedColumnName": "",
"startDate": ""
})
),
"downloadFormat": "",
"filters": (
json!({
"column": json!({}),
"operator": "",
"values": ()
})
),
"includeDeletedEntities": false,
"includeRemovedEntities": false,
"maxRowsPerFile": 0,
"orderBy": (
json!({
"column": json!({}),
"sortOrder": ""
})
),
"reportScope": json!({
"adGroupId": "",
"adId": "",
"advertiserId": "",
"agencyId": "",
"campaignId": "",
"engineAccountId": "",
"keywordId": ""
}),
"reportType": "",
"rowCount": 0,
"startRow": 0,
"statisticsCurrency": "",
"timeRange": json!({
"changedAttributesSinceTimestamp": "",
"changedMetricsSinceTimestamp": "",
"endDate": "",
"startDate": ""
}),
"verifySingleTimeZone": false
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/doubleclicksearch/v2/reports \
--header 'content-type: application/json' \
--data '{
"columns": [
{
"columnName": "",
"customDimensionName": "",
"customMetricName": "",
"endDate": "",
"groupByColumn": false,
"headerText": "",
"platformSource": "",
"productReportPerspective": "",
"savedColumnName": "",
"startDate": ""
}
],
"downloadFormat": "",
"filters": [
{
"column": {},
"operator": "",
"values": []
}
],
"includeDeletedEntities": false,
"includeRemovedEntities": false,
"maxRowsPerFile": 0,
"orderBy": [
{
"column": {},
"sortOrder": ""
}
],
"reportScope": {
"adGroupId": "",
"adId": "",
"advertiserId": "",
"agencyId": "",
"campaignId": "",
"engineAccountId": "",
"keywordId": ""
},
"reportType": "",
"rowCount": 0,
"startRow": 0,
"statisticsCurrency": "",
"timeRange": {
"changedAttributesSinceTimestamp": "",
"changedMetricsSinceTimestamp": "",
"endDate": "",
"startDate": ""
},
"verifySingleTimeZone": false
}'
echo '{
"columns": [
{
"columnName": "",
"customDimensionName": "",
"customMetricName": "",
"endDate": "",
"groupByColumn": false,
"headerText": "",
"platformSource": "",
"productReportPerspective": "",
"savedColumnName": "",
"startDate": ""
}
],
"downloadFormat": "",
"filters": [
{
"column": {},
"operator": "",
"values": []
}
],
"includeDeletedEntities": false,
"includeRemovedEntities": false,
"maxRowsPerFile": 0,
"orderBy": [
{
"column": {},
"sortOrder": ""
}
],
"reportScope": {
"adGroupId": "",
"adId": "",
"advertiserId": "",
"agencyId": "",
"campaignId": "",
"engineAccountId": "",
"keywordId": ""
},
"reportType": "",
"rowCount": 0,
"startRow": 0,
"statisticsCurrency": "",
"timeRange": {
"changedAttributesSinceTimestamp": "",
"changedMetricsSinceTimestamp": "",
"endDate": "",
"startDate": ""
},
"verifySingleTimeZone": false
}' | \
http POST {{baseUrl}}/doubleclicksearch/v2/reports \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "columns": [\n {\n "columnName": "",\n "customDimensionName": "",\n "customMetricName": "",\n "endDate": "",\n "groupByColumn": false,\n "headerText": "",\n "platformSource": "",\n "productReportPerspective": "",\n "savedColumnName": "",\n "startDate": ""\n }\n ],\n "downloadFormat": "",\n "filters": [\n {\n "column": {},\n "operator": "",\n "values": []\n }\n ],\n "includeDeletedEntities": false,\n "includeRemovedEntities": false,\n "maxRowsPerFile": 0,\n "orderBy": [\n {\n "column": {},\n "sortOrder": ""\n }\n ],\n "reportScope": {\n "adGroupId": "",\n "adId": "",\n "advertiserId": "",\n "agencyId": "",\n "campaignId": "",\n "engineAccountId": "",\n "keywordId": ""\n },\n "reportType": "",\n "rowCount": 0,\n "startRow": 0,\n "statisticsCurrency": "",\n "timeRange": {\n "changedAttributesSinceTimestamp": "",\n "changedMetricsSinceTimestamp": "",\n "endDate": "",\n "startDate": ""\n },\n "verifySingleTimeZone": false\n}' \
--output-document \
- {{baseUrl}}/doubleclicksearch/v2/reports
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"columns": [
[
"columnName": "",
"customDimensionName": "",
"customMetricName": "",
"endDate": "",
"groupByColumn": false,
"headerText": "",
"platformSource": "",
"productReportPerspective": "",
"savedColumnName": "",
"startDate": ""
]
],
"downloadFormat": "",
"filters": [
[
"column": [],
"operator": "",
"values": []
]
],
"includeDeletedEntities": false,
"includeRemovedEntities": false,
"maxRowsPerFile": 0,
"orderBy": [
[
"column": [],
"sortOrder": ""
]
],
"reportScope": [
"adGroupId": "",
"adId": "",
"advertiserId": "",
"agencyId": "",
"campaignId": "",
"engineAccountId": "",
"keywordId": ""
],
"reportType": "",
"rowCount": 0,
"startRow": 0,
"statisticsCurrency": "",
"timeRange": [
"changedAttributesSinceTimestamp": "",
"changedMetricsSinceTimestamp": "",
"endDate": "",
"startDate": ""
],
"verifySingleTimeZone": false
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/doubleclicksearch/v2/reports")! 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
doubleclicksearch.savedColumns.list
{{baseUrl}}/doubleclicksearch/v2/agency/:agencyId/advertiser/:advertiserId/savedcolumns
QUERY PARAMS
agencyId
advertiserId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/doubleclicksearch/v2/agency/:agencyId/advertiser/:advertiserId/savedcolumns");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/doubleclicksearch/v2/agency/:agencyId/advertiser/:advertiserId/savedcolumns")
require "http/client"
url = "{{baseUrl}}/doubleclicksearch/v2/agency/:agencyId/advertiser/:advertiserId/savedcolumns"
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}}/doubleclicksearch/v2/agency/:agencyId/advertiser/:advertiserId/savedcolumns"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/doubleclicksearch/v2/agency/:agencyId/advertiser/:advertiserId/savedcolumns");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/doubleclicksearch/v2/agency/:agencyId/advertiser/:advertiserId/savedcolumns"
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/doubleclicksearch/v2/agency/:agencyId/advertiser/:advertiserId/savedcolumns HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/doubleclicksearch/v2/agency/:agencyId/advertiser/:advertiserId/savedcolumns")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/doubleclicksearch/v2/agency/:agencyId/advertiser/:advertiserId/savedcolumns"))
.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}}/doubleclicksearch/v2/agency/:agencyId/advertiser/:advertiserId/savedcolumns")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/doubleclicksearch/v2/agency/:agencyId/advertiser/:advertiserId/savedcolumns")
.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}}/doubleclicksearch/v2/agency/:agencyId/advertiser/:advertiserId/savedcolumns');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/doubleclicksearch/v2/agency/:agencyId/advertiser/:advertiserId/savedcolumns'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/doubleclicksearch/v2/agency/:agencyId/advertiser/:advertiserId/savedcolumns';
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}}/doubleclicksearch/v2/agency/:agencyId/advertiser/:advertiserId/savedcolumns',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/doubleclicksearch/v2/agency/:agencyId/advertiser/:advertiserId/savedcolumns")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/doubleclicksearch/v2/agency/:agencyId/advertiser/:advertiserId/savedcolumns',
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}}/doubleclicksearch/v2/agency/:agencyId/advertiser/:advertiserId/savedcolumns'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/doubleclicksearch/v2/agency/:agencyId/advertiser/:advertiserId/savedcolumns');
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}}/doubleclicksearch/v2/agency/:agencyId/advertiser/:advertiserId/savedcolumns'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/doubleclicksearch/v2/agency/:agencyId/advertiser/:advertiserId/savedcolumns';
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}}/doubleclicksearch/v2/agency/:agencyId/advertiser/:advertiserId/savedcolumns"]
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}}/doubleclicksearch/v2/agency/:agencyId/advertiser/:advertiserId/savedcolumns" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/doubleclicksearch/v2/agency/:agencyId/advertiser/:advertiserId/savedcolumns",
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}}/doubleclicksearch/v2/agency/:agencyId/advertiser/:advertiserId/savedcolumns');
echo $response->getBody();
setUrl('{{baseUrl}}/doubleclicksearch/v2/agency/:agencyId/advertiser/:advertiserId/savedcolumns');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/doubleclicksearch/v2/agency/:agencyId/advertiser/:advertiserId/savedcolumns');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/doubleclicksearch/v2/agency/:agencyId/advertiser/:advertiserId/savedcolumns' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/doubleclicksearch/v2/agency/:agencyId/advertiser/:advertiserId/savedcolumns' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/doubleclicksearch/v2/agency/:agencyId/advertiser/:advertiserId/savedcolumns")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/doubleclicksearch/v2/agency/:agencyId/advertiser/:advertiserId/savedcolumns"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/doubleclicksearch/v2/agency/:agencyId/advertiser/:advertiserId/savedcolumns"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/doubleclicksearch/v2/agency/:agencyId/advertiser/:advertiserId/savedcolumns")
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/doubleclicksearch/v2/agency/:agencyId/advertiser/:advertiserId/savedcolumns') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/doubleclicksearch/v2/agency/:agencyId/advertiser/:advertiserId/savedcolumns";
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}}/doubleclicksearch/v2/agency/:agencyId/advertiser/:advertiserId/savedcolumns
http GET {{baseUrl}}/doubleclicksearch/v2/agency/:agencyId/advertiser/:advertiserId/savedcolumns
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/doubleclicksearch/v2/agency/:agencyId/advertiser/:advertiserId/savedcolumns
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/doubleclicksearch/v2/agency/:agencyId/advertiser/:advertiserId/savedcolumns")! 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()