Google Analytics API
GET
analytics.data.ga.get
{{baseUrl}}/data/ga
QUERY PARAMS
ids
start-date
end-date
metrics
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/data/ga?ids=&start-date=&end-date=&metrics=");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/data/ga" {:query-params {:ids ""
:start-date ""
:end-date ""
:metrics ""}})
require "http/client"
url = "{{baseUrl}}/data/ga?ids=&start-date=&end-date=&metrics="
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}}/data/ga?ids=&start-date=&end-date=&metrics="),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/data/ga?ids=&start-date=&end-date=&metrics=");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/data/ga?ids=&start-date=&end-date=&metrics="
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/data/ga?ids=&start-date=&end-date=&metrics= HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/data/ga?ids=&start-date=&end-date=&metrics=")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/data/ga?ids=&start-date=&end-date=&metrics="))
.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}}/data/ga?ids=&start-date=&end-date=&metrics=")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/data/ga?ids=&start-date=&end-date=&metrics=")
.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}}/data/ga?ids=&start-date=&end-date=&metrics=');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/data/ga',
params: {ids: '', 'start-date': '', 'end-date': '', metrics: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/data/ga?ids=&start-date=&end-date=&metrics=';
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}}/data/ga?ids=&start-date=&end-date=&metrics=',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/data/ga?ids=&start-date=&end-date=&metrics=")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/data/ga?ids=&start-date=&end-date=&metrics=',
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}}/data/ga',
qs: {ids: '', 'start-date': '', 'end-date': '', metrics: ''}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/data/ga');
req.query({
ids: '',
'start-date': '',
'end-date': '',
metrics: ''
});
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}}/data/ga',
params: {ids: '', 'start-date': '', 'end-date': '', metrics: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/data/ga?ids=&start-date=&end-date=&metrics=';
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}}/data/ga?ids=&start-date=&end-date=&metrics="]
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}}/data/ga?ids=&start-date=&end-date=&metrics=" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/data/ga?ids=&start-date=&end-date=&metrics=",
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}}/data/ga?ids=&start-date=&end-date=&metrics=');
echo $response->getBody();
setUrl('{{baseUrl}}/data/ga');
$request->setMethod(HTTP_METH_GET);
$request->setQueryData([
'ids' => '',
'start-date' => '',
'end-date' => '',
'metrics' => ''
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/data/ga');
$request->setRequestMethod('GET');
$request->setQuery(new http\QueryString([
'ids' => '',
'start-date' => '',
'end-date' => '',
'metrics' => ''
]));
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/data/ga?ids=&start-date=&end-date=&metrics=' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/data/ga?ids=&start-date=&end-date=&metrics=' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/data/ga?ids=&start-date=&end-date=&metrics=")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/data/ga"
querystring = {"ids":"","start-date":"","end-date":"","metrics":""}
response = requests.get(url, params=querystring)
print(response.json())
library(httr)
url <- "{{baseUrl}}/data/ga"
queryString <- list(
ids = "",
start-date = "",
end-date = "",
metrics = ""
)
response <- VERB("GET", url, query = queryString, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/data/ga?ids=&start-date=&end-date=&metrics=")
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/data/ga') do |req|
req.params['ids'] = ''
req.params['start-date'] = ''
req.params['end-date'] = ''
req.params['metrics'] = ''
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/data/ga";
let querystring = [
("ids", ""),
("start-date", ""),
("end-date", ""),
("metrics", ""),
];
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}}/data/ga?ids=&start-date=&end-date=&metrics='
http GET '{{baseUrl}}/data/ga?ids=&start-date=&end-date=&metrics='
wget --quiet \
--method GET \
--output-document \
- '{{baseUrl}}/data/ga?ids=&start-date=&end-date=&metrics='
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/data/ga?ids=&start-date=&end-date=&metrics=")! 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
analytics.data.mcf.get
{{baseUrl}}/data/mcf
QUERY PARAMS
ids
start-date
end-date
metrics
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/data/mcf?ids=&start-date=&end-date=&metrics=");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/data/mcf" {:query-params {:ids ""
:start-date ""
:end-date ""
:metrics ""}})
require "http/client"
url = "{{baseUrl}}/data/mcf?ids=&start-date=&end-date=&metrics="
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}}/data/mcf?ids=&start-date=&end-date=&metrics="),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/data/mcf?ids=&start-date=&end-date=&metrics=");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/data/mcf?ids=&start-date=&end-date=&metrics="
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/data/mcf?ids=&start-date=&end-date=&metrics= HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/data/mcf?ids=&start-date=&end-date=&metrics=")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/data/mcf?ids=&start-date=&end-date=&metrics="))
.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}}/data/mcf?ids=&start-date=&end-date=&metrics=")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/data/mcf?ids=&start-date=&end-date=&metrics=")
.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}}/data/mcf?ids=&start-date=&end-date=&metrics=');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/data/mcf',
params: {ids: '', 'start-date': '', 'end-date': '', metrics: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/data/mcf?ids=&start-date=&end-date=&metrics=';
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}}/data/mcf?ids=&start-date=&end-date=&metrics=',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/data/mcf?ids=&start-date=&end-date=&metrics=")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/data/mcf?ids=&start-date=&end-date=&metrics=',
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}}/data/mcf',
qs: {ids: '', 'start-date': '', 'end-date': '', metrics: ''}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/data/mcf');
req.query({
ids: '',
'start-date': '',
'end-date': '',
metrics: ''
});
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}}/data/mcf',
params: {ids: '', 'start-date': '', 'end-date': '', metrics: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/data/mcf?ids=&start-date=&end-date=&metrics=';
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}}/data/mcf?ids=&start-date=&end-date=&metrics="]
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}}/data/mcf?ids=&start-date=&end-date=&metrics=" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/data/mcf?ids=&start-date=&end-date=&metrics=",
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}}/data/mcf?ids=&start-date=&end-date=&metrics=');
echo $response->getBody();
setUrl('{{baseUrl}}/data/mcf');
$request->setMethod(HTTP_METH_GET);
$request->setQueryData([
'ids' => '',
'start-date' => '',
'end-date' => '',
'metrics' => ''
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/data/mcf');
$request->setRequestMethod('GET');
$request->setQuery(new http\QueryString([
'ids' => '',
'start-date' => '',
'end-date' => '',
'metrics' => ''
]));
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/data/mcf?ids=&start-date=&end-date=&metrics=' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/data/mcf?ids=&start-date=&end-date=&metrics=' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/data/mcf?ids=&start-date=&end-date=&metrics=")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/data/mcf"
querystring = {"ids":"","start-date":"","end-date":"","metrics":""}
response = requests.get(url, params=querystring)
print(response.json())
library(httr)
url <- "{{baseUrl}}/data/mcf"
queryString <- list(
ids = "",
start-date = "",
end-date = "",
metrics = ""
)
response <- VERB("GET", url, query = queryString, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/data/mcf?ids=&start-date=&end-date=&metrics=")
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/data/mcf') do |req|
req.params['ids'] = ''
req.params['start-date'] = ''
req.params['end-date'] = ''
req.params['metrics'] = ''
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/data/mcf";
let querystring = [
("ids", ""),
("start-date", ""),
("end-date", ""),
("metrics", ""),
];
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}}/data/mcf?ids=&start-date=&end-date=&metrics='
http GET '{{baseUrl}}/data/mcf?ids=&start-date=&end-date=&metrics='
wget --quiet \
--method GET \
--output-document \
- '{{baseUrl}}/data/mcf?ids=&start-date=&end-date=&metrics='
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/data/mcf?ids=&start-date=&end-date=&metrics=")! 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
analytics.data.realtime.get
{{baseUrl}}/data/realtime
QUERY PARAMS
ids
metrics
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/data/realtime?ids=&metrics=");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/data/realtime" {:query-params {:ids ""
:metrics ""}})
require "http/client"
url = "{{baseUrl}}/data/realtime?ids=&metrics="
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}}/data/realtime?ids=&metrics="),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/data/realtime?ids=&metrics=");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/data/realtime?ids=&metrics="
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/data/realtime?ids=&metrics= HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/data/realtime?ids=&metrics=")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/data/realtime?ids=&metrics="))
.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}}/data/realtime?ids=&metrics=")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/data/realtime?ids=&metrics=")
.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}}/data/realtime?ids=&metrics=');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/data/realtime',
params: {ids: '', metrics: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/data/realtime?ids=&metrics=';
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}}/data/realtime?ids=&metrics=',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/data/realtime?ids=&metrics=")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/data/realtime?ids=&metrics=',
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}}/data/realtime',
qs: {ids: '', metrics: ''}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/data/realtime');
req.query({
ids: '',
metrics: ''
});
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}}/data/realtime',
params: {ids: '', metrics: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/data/realtime?ids=&metrics=';
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}}/data/realtime?ids=&metrics="]
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}}/data/realtime?ids=&metrics=" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/data/realtime?ids=&metrics=",
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}}/data/realtime?ids=&metrics=');
echo $response->getBody();
setUrl('{{baseUrl}}/data/realtime');
$request->setMethod(HTTP_METH_GET);
$request->setQueryData([
'ids' => '',
'metrics' => ''
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/data/realtime');
$request->setRequestMethod('GET');
$request->setQuery(new http\QueryString([
'ids' => '',
'metrics' => ''
]));
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/data/realtime?ids=&metrics=' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/data/realtime?ids=&metrics=' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/data/realtime?ids=&metrics=")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/data/realtime"
querystring = {"ids":"","metrics":""}
response = requests.get(url, params=querystring)
print(response.json())
library(httr)
url <- "{{baseUrl}}/data/realtime"
queryString <- list(
ids = "",
metrics = ""
)
response <- VERB("GET", url, query = queryString, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/data/realtime?ids=&metrics=")
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/data/realtime') do |req|
req.params['ids'] = ''
req.params['metrics'] = ''
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/data/realtime";
let querystring = [
("ids", ""),
("metrics", ""),
];
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}}/data/realtime?ids=&metrics='
http GET '{{baseUrl}}/data/realtime?ids=&metrics='
wget --quiet \
--method GET \
--output-document \
- '{{baseUrl}}/data/realtime?ids=&metrics='
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/data/realtime?ids=&metrics=")! 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
analytics.management.accountSummaries.list
{{baseUrl}}/management/accountSummaries
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/management/accountSummaries");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/management/accountSummaries")
require "http/client"
url = "{{baseUrl}}/management/accountSummaries"
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}}/management/accountSummaries"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/management/accountSummaries");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/management/accountSummaries"
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/management/accountSummaries HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/management/accountSummaries")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/management/accountSummaries"))
.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}}/management/accountSummaries")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/management/accountSummaries")
.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}}/management/accountSummaries');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/management/accountSummaries'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/management/accountSummaries';
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}}/management/accountSummaries',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/management/accountSummaries")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/management/accountSummaries',
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}}/management/accountSummaries'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/management/accountSummaries');
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}}/management/accountSummaries'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/management/accountSummaries';
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}}/management/accountSummaries"]
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}}/management/accountSummaries" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/management/accountSummaries",
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}}/management/accountSummaries');
echo $response->getBody();
setUrl('{{baseUrl}}/management/accountSummaries');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/management/accountSummaries');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/management/accountSummaries' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/management/accountSummaries' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/management/accountSummaries")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/management/accountSummaries"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/management/accountSummaries"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/management/accountSummaries")
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/management/accountSummaries') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/management/accountSummaries";
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}}/management/accountSummaries
http GET {{baseUrl}}/management/accountSummaries
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/management/accountSummaries
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/management/accountSummaries")! 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()
DELETE
analytics.management.accountUserLinks.delete
{{baseUrl}}/management/accounts/:accountId/entityUserLinks/:linkId
QUERY PARAMS
accountId
linkId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/management/accounts/:accountId/entityUserLinks/:linkId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/management/accounts/:accountId/entityUserLinks/:linkId")
require "http/client"
url = "{{baseUrl}}/management/accounts/:accountId/entityUserLinks/:linkId"
response = HTTP::Client.delete url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Delete,
RequestUri = new Uri("{{baseUrl}}/management/accounts/:accountId/entityUserLinks/:linkId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/management/accounts/:accountId/entityUserLinks/:linkId");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/management/accounts/:accountId/entityUserLinks/:linkId"
req, _ := http.NewRequest("DELETE", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
DELETE /baseUrl/management/accounts/:accountId/entityUserLinks/:linkId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/management/accounts/:accountId/entityUserLinks/:linkId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/management/accounts/:accountId/entityUserLinks/:linkId"))
.method("DELETE", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/management/accounts/:accountId/entityUserLinks/:linkId")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/management/accounts/:accountId/entityUserLinks/:linkId")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('DELETE', '{{baseUrl}}/management/accounts/:accountId/entityUserLinks/:linkId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'DELETE',
url: '{{baseUrl}}/management/accounts/:accountId/entityUserLinks/:linkId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/management/accounts/:accountId/entityUserLinks/:linkId';
const options = {method: 'DELETE'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/management/accounts/:accountId/entityUserLinks/:linkId',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/management/accounts/:accountId/entityUserLinks/:linkId")
.delete(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/management/accounts/:accountId/entityUserLinks/:linkId',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'DELETE',
url: '{{baseUrl}}/management/accounts/:accountId/entityUserLinks/:linkId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/management/accounts/:accountId/entityUserLinks/:linkId');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'DELETE',
url: '{{baseUrl}}/management/accounts/:accountId/entityUserLinks/:linkId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/management/accounts/:accountId/entityUserLinks/:linkId';
const options = {method: 'DELETE'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/management/accounts/:accountId/entityUserLinks/:linkId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"DELETE"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/management/accounts/:accountId/entityUserLinks/:linkId" in
Client.call `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/management/accounts/:accountId/entityUserLinks/:linkId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('DELETE', '{{baseUrl}}/management/accounts/:accountId/entityUserLinks/:linkId');
echo $response->getBody();
setUrl('{{baseUrl}}/management/accounts/:accountId/entityUserLinks/:linkId');
$request->setMethod(HTTP_METH_DELETE);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/management/accounts/:accountId/entityUserLinks/:linkId');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/management/accounts/:accountId/entityUserLinks/:linkId' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/management/accounts/:accountId/entityUserLinks/:linkId' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/management/accounts/:accountId/entityUserLinks/:linkId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/management/accounts/:accountId/entityUserLinks/:linkId"
response = requests.delete(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/management/accounts/:accountId/entityUserLinks/:linkId"
response <- VERB("DELETE", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/management/accounts/:accountId/entityUserLinks/:linkId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.delete('/baseUrl/management/accounts/:accountId/entityUserLinks/:linkId') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/management/accounts/:accountId/entityUserLinks/:linkId";
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("DELETE").unwrap(), url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request DELETE \
--url {{baseUrl}}/management/accounts/:accountId/entityUserLinks/:linkId
http DELETE {{baseUrl}}/management/accounts/:accountId/entityUserLinks/:linkId
wget --quiet \
--method DELETE \
--output-document \
- {{baseUrl}}/management/accounts/:accountId/entityUserLinks/:linkId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/management/accounts/:accountId/entityUserLinks/:linkId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "DELETE"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
analytics.management.accountUserLinks.insert
{{baseUrl}}/management/accounts/:accountId/entityUserLinks
QUERY PARAMS
accountId
BODY json
{
"entity": {
"accountRef": {
"href": "",
"id": "",
"kind": "",
"name": ""
},
"profileRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"webPropertyId": ""
},
"webPropertyRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": ""
}
},
"id": "",
"kind": "",
"permissions": {
"effective": [],
"local": []
},
"selfLink": "",
"userRef": {
"email": "",
"id": "",
"kind": ""
}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/management/accounts/:accountId/entityUserLinks");
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 \"entity\": {\n \"accountRef\": {\n \"href\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"profileRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"webPropertyId\": \"\"\n },\n \"webPropertyRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n }\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"permissions\": {\n \"effective\": [],\n \"local\": []\n },\n \"selfLink\": \"\",\n \"userRef\": {\n \"email\": \"\",\n \"id\": \"\",\n \"kind\": \"\"\n }\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/management/accounts/:accountId/entityUserLinks" {:content-type :json
:form-params {:entity {:accountRef {:href ""
:id ""
:kind ""
:name ""}
:profileRef {:accountId ""
:href ""
:id ""
:internalWebPropertyId ""
:kind ""
:name ""
:webPropertyId ""}
:webPropertyRef {:accountId ""
:href ""
:id ""
:internalWebPropertyId ""
:kind ""
:name ""}}
:id ""
:kind ""
:permissions {:effective []
:local []}
:selfLink ""
:userRef {:email ""
:id ""
:kind ""}}})
require "http/client"
url = "{{baseUrl}}/management/accounts/:accountId/entityUserLinks"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"entity\": {\n \"accountRef\": {\n \"href\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"profileRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"webPropertyId\": \"\"\n },\n \"webPropertyRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n }\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"permissions\": {\n \"effective\": [],\n \"local\": []\n },\n \"selfLink\": \"\",\n \"userRef\": {\n \"email\": \"\",\n \"id\": \"\",\n \"kind\": \"\"\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}}/management/accounts/:accountId/entityUserLinks"),
Content = new StringContent("{\n \"entity\": {\n \"accountRef\": {\n \"href\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"profileRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"webPropertyId\": \"\"\n },\n \"webPropertyRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n }\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"permissions\": {\n \"effective\": [],\n \"local\": []\n },\n \"selfLink\": \"\",\n \"userRef\": {\n \"email\": \"\",\n \"id\": \"\",\n \"kind\": \"\"\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}}/management/accounts/:accountId/entityUserLinks");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"entity\": {\n \"accountRef\": {\n \"href\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"profileRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"webPropertyId\": \"\"\n },\n \"webPropertyRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n }\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"permissions\": {\n \"effective\": [],\n \"local\": []\n },\n \"selfLink\": \"\",\n \"userRef\": {\n \"email\": \"\",\n \"id\": \"\",\n \"kind\": \"\"\n }\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/management/accounts/:accountId/entityUserLinks"
payload := strings.NewReader("{\n \"entity\": {\n \"accountRef\": {\n \"href\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"profileRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"webPropertyId\": \"\"\n },\n \"webPropertyRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n }\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"permissions\": {\n \"effective\": [],\n \"local\": []\n },\n \"selfLink\": \"\",\n \"userRef\": {\n \"email\": \"\",\n \"id\": \"\",\n \"kind\": \"\"\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/management/accounts/:accountId/entityUserLinks HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 626
{
"entity": {
"accountRef": {
"href": "",
"id": "",
"kind": "",
"name": ""
},
"profileRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"webPropertyId": ""
},
"webPropertyRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": ""
}
},
"id": "",
"kind": "",
"permissions": {
"effective": [],
"local": []
},
"selfLink": "",
"userRef": {
"email": "",
"id": "",
"kind": ""
}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/management/accounts/:accountId/entityUserLinks")
.setHeader("content-type", "application/json")
.setBody("{\n \"entity\": {\n \"accountRef\": {\n \"href\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"profileRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"webPropertyId\": \"\"\n },\n \"webPropertyRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n }\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"permissions\": {\n \"effective\": [],\n \"local\": []\n },\n \"selfLink\": \"\",\n \"userRef\": {\n \"email\": \"\",\n \"id\": \"\",\n \"kind\": \"\"\n }\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/management/accounts/:accountId/entityUserLinks"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"entity\": {\n \"accountRef\": {\n \"href\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"profileRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"webPropertyId\": \"\"\n },\n \"webPropertyRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n }\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"permissions\": {\n \"effective\": [],\n \"local\": []\n },\n \"selfLink\": \"\",\n \"userRef\": {\n \"email\": \"\",\n \"id\": \"\",\n \"kind\": \"\"\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 \"entity\": {\n \"accountRef\": {\n \"href\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"profileRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"webPropertyId\": \"\"\n },\n \"webPropertyRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n }\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"permissions\": {\n \"effective\": [],\n \"local\": []\n },\n \"selfLink\": \"\",\n \"userRef\": {\n \"email\": \"\",\n \"id\": \"\",\n \"kind\": \"\"\n }\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/management/accounts/:accountId/entityUserLinks")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/management/accounts/:accountId/entityUserLinks")
.header("content-type", "application/json")
.body("{\n \"entity\": {\n \"accountRef\": {\n \"href\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"profileRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"webPropertyId\": \"\"\n },\n \"webPropertyRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n }\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"permissions\": {\n \"effective\": [],\n \"local\": []\n },\n \"selfLink\": \"\",\n \"userRef\": {\n \"email\": \"\",\n \"id\": \"\",\n \"kind\": \"\"\n }\n}")
.asString();
const data = JSON.stringify({
entity: {
accountRef: {
href: '',
id: '',
kind: '',
name: ''
},
profileRef: {
accountId: '',
href: '',
id: '',
internalWebPropertyId: '',
kind: '',
name: '',
webPropertyId: ''
},
webPropertyRef: {
accountId: '',
href: '',
id: '',
internalWebPropertyId: '',
kind: '',
name: ''
}
},
id: '',
kind: '',
permissions: {
effective: [],
local: []
},
selfLink: '',
userRef: {
email: '',
id: '',
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}}/management/accounts/:accountId/entityUserLinks');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/management/accounts/:accountId/entityUserLinks',
headers: {'content-type': 'application/json'},
data: {
entity: {
accountRef: {href: '', id: '', kind: '', name: ''},
profileRef: {
accountId: '',
href: '',
id: '',
internalWebPropertyId: '',
kind: '',
name: '',
webPropertyId: ''
},
webPropertyRef: {accountId: '', href: '', id: '', internalWebPropertyId: '', kind: '', name: ''}
},
id: '',
kind: '',
permissions: {effective: [], local: []},
selfLink: '',
userRef: {email: '', id: '', kind: ''}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/management/accounts/:accountId/entityUserLinks';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"entity":{"accountRef":{"href":"","id":"","kind":"","name":""},"profileRef":{"accountId":"","href":"","id":"","internalWebPropertyId":"","kind":"","name":"","webPropertyId":""},"webPropertyRef":{"accountId":"","href":"","id":"","internalWebPropertyId":"","kind":"","name":""}},"id":"","kind":"","permissions":{"effective":[],"local":[]},"selfLink":"","userRef":{"email":"","id":"","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}}/management/accounts/:accountId/entityUserLinks',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "entity": {\n "accountRef": {\n "href": "",\n "id": "",\n "kind": "",\n "name": ""\n },\n "profileRef": {\n "accountId": "",\n "href": "",\n "id": "",\n "internalWebPropertyId": "",\n "kind": "",\n "name": "",\n "webPropertyId": ""\n },\n "webPropertyRef": {\n "accountId": "",\n "href": "",\n "id": "",\n "internalWebPropertyId": "",\n "kind": "",\n "name": ""\n }\n },\n "id": "",\n "kind": "",\n "permissions": {\n "effective": [],\n "local": []\n },\n "selfLink": "",\n "userRef": {\n "email": "",\n "id": "",\n "kind": ""\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 \"entity\": {\n \"accountRef\": {\n \"href\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"profileRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"webPropertyId\": \"\"\n },\n \"webPropertyRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n }\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"permissions\": {\n \"effective\": [],\n \"local\": []\n },\n \"selfLink\": \"\",\n \"userRef\": {\n \"email\": \"\",\n \"id\": \"\",\n \"kind\": \"\"\n }\n}")
val request = Request.Builder()
.url("{{baseUrl}}/management/accounts/:accountId/entityUserLinks")
.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/management/accounts/:accountId/entityUserLinks',
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({
entity: {
accountRef: {href: '', id: '', kind: '', name: ''},
profileRef: {
accountId: '',
href: '',
id: '',
internalWebPropertyId: '',
kind: '',
name: '',
webPropertyId: ''
},
webPropertyRef: {accountId: '', href: '', id: '', internalWebPropertyId: '', kind: '', name: ''}
},
id: '',
kind: '',
permissions: {effective: [], local: []},
selfLink: '',
userRef: {email: '', id: '', kind: ''}
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/management/accounts/:accountId/entityUserLinks',
headers: {'content-type': 'application/json'},
body: {
entity: {
accountRef: {href: '', id: '', kind: '', name: ''},
profileRef: {
accountId: '',
href: '',
id: '',
internalWebPropertyId: '',
kind: '',
name: '',
webPropertyId: ''
},
webPropertyRef: {accountId: '', href: '', id: '', internalWebPropertyId: '', kind: '', name: ''}
},
id: '',
kind: '',
permissions: {effective: [], local: []},
selfLink: '',
userRef: {email: '', id: '', 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}}/management/accounts/:accountId/entityUserLinks');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
entity: {
accountRef: {
href: '',
id: '',
kind: '',
name: ''
},
profileRef: {
accountId: '',
href: '',
id: '',
internalWebPropertyId: '',
kind: '',
name: '',
webPropertyId: ''
},
webPropertyRef: {
accountId: '',
href: '',
id: '',
internalWebPropertyId: '',
kind: '',
name: ''
}
},
id: '',
kind: '',
permissions: {
effective: [],
local: []
},
selfLink: '',
userRef: {
email: '',
id: '',
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}}/management/accounts/:accountId/entityUserLinks',
headers: {'content-type': 'application/json'},
data: {
entity: {
accountRef: {href: '', id: '', kind: '', name: ''},
profileRef: {
accountId: '',
href: '',
id: '',
internalWebPropertyId: '',
kind: '',
name: '',
webPropertyId: ''
},
webPropertyRef: {accountId: '', href: '', id: '', internalWebPropertyId: '', kind: '', name: ''}
},
id: '',
kind: '',
permissions: {effective: [], local: []},
selfLink: '',
userRef: {email: '', id: '', kind: ''}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/management/accounts/:accountId/entityUserLinks';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"entity":{"accountRef":{"href":"","id":"","kind":"","name":""},"profileRef":{"accountId":"","href":"","id":"","internalWebPropertyId":"","kind":"","name":"","webPropertyId":""},"webPropertyRef":{"accountId":"","href":"","id":"","internalWebPropertyId":"","kind":"","name":""}},"id":"","kind":"","permissions":{"effective":[],"local":[]},"selfLink":"","userRef":{"email":"","id":"","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 = @{ @"entity": @{ @"accountRef": @{ @"href": @"", @"id": @"", @"kind": @"", @"name": @"" }, @"profileRef": @{ @"accountId": @"", @"href": @"", @"id": @"", @"internalWebPropertyId": @"", @"kind": @"", @"name": @"", @"webPropertyId": @"" }, @"webPropertyRef": @{ @"accountId": @"", @"href": @"", @"id": @"", @"internalWebPropertyId": @"", @"kind": @"", @"name": @"" } },
@"id": @"",
@"kind": @"",
@"permissions": @{ @"effective": @[ ], @"local": @[ ] },
@"selfLink": @"",
@"userRef": @{ @"email": @"", @"id": @"", @"kind": @"" } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/management/accounts/:accountId/entityUserLinks"]
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}}/management/accounts/:accountId/entityUserLinks" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"entity\": {\n \"accountRef\": {\n \"href\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"profileRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"webPropertyId\": \"\"\n },\n \"webPropertyRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n }\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"permissions\": {\n \"effective\": [],\n \"local\": []\n },\n \"selfLink\": \"\",\n \"userRef\": {\n \"email\": \"\",\n \"id\": \"\",\n \"kind\": \"\"\n }\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/management/accounts/:accountId/entityUserLinks",
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([
'entity' => [
'accountRef' => [
'href' => '',
'id' => '',
'kind' => '',
'name' => ''
],
'profileRef' => [
'accountId' => '',
'href' => '',
'id' => '',
'internalWebPropertyId' => '',
'kind' => '',
'name' => '',
'webPropertyId' => ''
],
'webPropertyRef' => [
'accountId' => '',
'href' => '',
'id' => '',
'internalWebPropertyId' => '',
'kind' => '',
'name' => ''
]
],
'id' => '',
'kind' => '',
'permissions' => [
'effective' => [
],
'local' => [
]
],
'selfLink' => '',
'userRef' => [
'email' => '',
'id' => '',
'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}}/management/accounts/:accountId/entityUserLinks', [
'body' => '{
"entity": {
"accountRef": {
"href": "",
"id": "",
"kind": "",
"name": ""
},
"profileRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"webPropertyId": ""
},
"webPropertyRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": ""
}
},
"id": "",
"kind": "",
"permissions": {
"effective": [],
"local": []
},
"selfLink": "",
"userRef": {
"email": "",
"id": "",
"kind": ""
}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/management/accounts/:accountId/entityUserLinks');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'entity' => [
'accountRef' => [
'href' => '',
'id' => '',
'kind' => '',
'name' => ''
],
'profileRef' => [
'accountId' => '',
'href' => '',
'id' => '',
'internalWebPropertyId' => '',
'kind' => '',
'name' => '',
'webPropertyId' => ''
],
'webPropertyRef' => [
'accountId' => '',
'href' => '',
'id' => '',
'internalWebPropertyId' => '',
'kind' => '',
'name' => ''
]
],
'id' => '',
'kind' => '',
'permissions' => [
'effective' => [
],
'local' => [
]
],
'selfLink' => '',
'userRef' => [
'email' => '',
'id' => '',
'kind' => ''
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'entity' => [
'accountRef' => [
'href' => '',
'id' => '',
'kind' => '',
'name' => ''
],
'profileRef' => [
'accountId' => '',
'href' => '',
'id' => '',
'internalWebPropertyId' => '',
'kind' => '',
'name' => '',
'webPropertyId' => ''
],
'webPropertyRef' => [
'accountId' => '',
'href' => '',
'id' => '',
'internalWebPropertyId' => '',
'kind' => '',
'name' => ''
]
],
'id' => '',
'kind' => '',
'permissions' => [
'effective' => [
],
'local' => [
]
],
'selfLink' => '',
'userRef' => [
'email' => '',
'id' => '',
'kind' => ''
]
]));
$request->setRequestUrl('{{baseUrl}}/management/accounts/:accountId/entityUserLinks');
$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}}/management/accounts/:accountId/entityUserLinks' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"entity": {
"accountRef": {
"href": "",
"id": "",
"kind": "",
"name": ""
},
"profileRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"webPropertyId": ""
},
"webPropertyRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": ""
}
},
"id": "",
"kind": "",
"permissions": {
"effective": [],
"local": []
},
"selfLink": "",
"userRef": {
"email": "",
"id": "",
"kind": ""
}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/management/accounts/:accountId/entityUserLinks' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"entity": {
"accountRef": {
"href": "",
"id": "",
"kind": "",
"name": ""
},
"profileRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"webPropertyId": ""
},
"webPropertyRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": ""
}
},
"id": "",
"kind": "",
"permissions": {
"effective": [],
"local": []
},
"selfLink": "",
"userRef": {
"email": "",
"id": "",
"kind": ""
}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"entity\": {\n \"accountRef\": {\n \"href\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"profileRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"webPropertyId\": \"\"\n },\n \"webPropertyRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n }\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"permissions\": {\n \"effective\": [],\n \"local\": []\n },\n \"selfLink\": \"\",\n \"userRef\": {\n \"email\": \"\",\n \"id\": \"\",\n \"kind\": \"\"\n }\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/management/accounts/:accountId/entityUserLinks", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/management/accounts/:accountId/entityUserLinks"
payload = {
"entity": {
"accountRef": {
"href": "",
"id": "",
"kind": "",
"name": ""
},
"profileRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"webPropertyId": ""
},
"webPropertyRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": ""
}
},
"id": "",
"kind": "",
"permissions": {
"effective": [],
"local": []
},
"selfLink": "",
"userRef": {
"email": "",
"id": "",
"kind": ""
}
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/management/accounts/:accountId/entityUserLinks"
payload <- "{\n \"entity\": {\n \"accountRef\": {\n \"href\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"profileRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"webPropertyId\": \"\"\n },\n \"webPropertyRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n }\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"permissions\": {\n \"effective\": [],\n \"local\": []\n },\n \"selfLink\": \"\",\n \"userRef\": {\n \"email\": \"\",\n \"id\": \"\",\n \"kind\": \"\"\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}}/management/accounts/:accountId/entityUserLinks")
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 \"entity\": {\n \"accountRef\": {\n \"href\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"profileRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"webPropertyId\": \"\"\n },\n \"webPropertyRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n }\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"permissions\": {\n \"effective\": [],\n \"local\": []\n },\n \"selfLink\": \"\",\n \"userRef\": {\n \"email\": \"\",\n \"id\": \"\",\n \"kind\": \"\"\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/management/accounts/:accountId/entityUserLinks') do |req|
req.body = "{\n \"entity\": {\n \"accountRef\": {\n \"href\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"profileRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"webPropertyId\": \"\"\n },\n \"webPropertyRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n }\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"permissions\": {\n \"effective\": [],\n \"local\": []\n },\n \"selfLink\": \"\",\n \"userRef\": {\n \"email\": \"\",\n \"id\": \"\",\n \"kind\": \"\"\n }\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/management/accounts/:accountId/entityUserLinks";
let payload = json!({
"entity": json!({
"accountRef": json!({
"href": "",
"id": "",
"kind": "",
"name": ""
}),
"profileRef": json!({
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"webPropertyId": ""
}),
"webPropertyRef": json!({
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": ""
})
}),
"id": "",
"kind": "",
"permissions": json!({
"effective": (),
"local": ()
}),
"selfLink": "",
"userRef": json!({
"email": "",
"id": "",
"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}}/management/accounts/:accountId/entityUserLinks \
--header 'content-type: application/json' \
--data '{
"entity": {
"accountRef": {
"href": "",
"id": "",
"kind": "",
"name": ""
},
"profileRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"webPropertyId": ""
},
"webPropertyRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": ""
}
},
"id": "",
"kind": "",
"permissions": {
"effective": [],
"local": []
},
"selfLink": "",
"userRef": {
"email": "",
"id": "",
"kind": ""
}
}'
echo '{
"entity": {
"accountRef": {
"href": "",
"id": "",
"kind": "",
"name": ""
},
"profileRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"webPropertyId": ""
},
"webPropertyRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": ""
}
},
"id": "",
"kind": "",
"permissions": {
"effective": [],
"local": []
},
"selfLink": "",
"userRef": {
"email": "",
"id": "",
"kind": ""
}
}' | \
http POST {{baseUrl}}/management/accounts/:accountId/entityUserLinks \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "entity": {\n "accountRef": {\n "href": "",\n "id": "",\n "kind": "",\n "name": ""\n },\n "profileRef": {\n "accountId": "",\n "href": "",\n "id": "",\n "internalWebPropertyId": "",\n "kind": "",\n "name": "",\n "webPropertyId": ""\n },\n "webPropertyRef": {\n "accountId": "",\n "href": "",\n "id": "",\n "internalWebPropertyId": "",\n "kind": "",\n "name": ""\n }\n },\n "id": "",\n "kind": "",\n "permissions": {\n "effective": [],\n "local": []\n },\n "selfLink": "",\n "userRef": {\n "email": "",\n "id": "",\n "kind": ""\n }\n}' \
--output-document \
- {{baseUrl}}/management/accounts/:accountId/entityUserLinks
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"entity": [
"accountRef": [
"href": "",
"id": "",
"kind": "",
"name": ""
],
"profileRef": [
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"webPropertyId": ""
],
"webPropertyRef": [
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": ""
]
],
"id": "",
"kind": "",
"permissions": [
"effective": [],
"local": []
],
"selfLink": "",
"userRef": [
"email": "",
"id": "",
"kind": ""
]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/management/accounts/:accountId/entityUserLinks")! 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
analytics.management.accountUserLinks.list
{{baseUrl}}/management/accounts/:accountId/entityUserLinks
QUERY PARAMS
accountId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/management/accounts/:accountId/entityUserLinks");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/management/accounts/:accountId/entityUserLinks")
require "http/client"
url = "{{baseUrl}}/management/accounts/:accountId/entityUserLinks"
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}}/management/accounts/:accountId/entityUserLinks"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/management/accounts/:accountId/entityUserLinks");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/management/accounts/:accountId/entityUserLinks"
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/management/accounts/:accountId/entityUserLinks HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/management/accounts/:accountId/entityUserLinks")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/management/accounts/:accountId/entityUserLinks"))
.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}}/management/accounts/:accountId/entityUserLinks")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/management/accounts/:accountId/entityUserLinks")
.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}}/management/accounts/:accountId/entityUserLinks');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/management/accounts/:accountId/entityUserLinks'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/management/accounts/:accountId/entityUserLinks';
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}}/management/accounts/:accountId/entityUserLinks',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/management/accounts/:accountId/entityUserLinks")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/management/accounts/:accountId/entityUserLinks',
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}}/management/accounts/:accountId/entityUserLinks'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/management/accounts/:accountId/entityUserLinks');
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}}/management/accounts/:accountId/entityUserLinks'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/management/accounts/:accountId/entityUserLinks';
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}}/management/accounts/:accountId/entityUserLinks"]
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}}/management/accounts/:accountId/entityUserLinks" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/management/accounts/:accountId/entityUserLinks",
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}}/management/accounts/:accountId/entityUserLinks');
echo $response->getBody();
setUrl('{{baseUrl}}/management/accounts/:accountId/entityUserLinks');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/management/accounts/:accountId/entityUserLinks');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/management/accounts/:accountId/entityUserLinks' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/management/accounts/:accountId/entityUserLinks' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/management/accounts/:accountId/entityUserLinks")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/management/accounts/:accountId/entityUserLinks"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/management/accounts/:accountId/entityUserLinks"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/management/accounts/:accountId/entityUserLinks")
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/management/accounts/:accountId/entityUserLinks') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/management/accounts/:accountId/entityUserLinks";
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}}/management/accounts/:accountId/entityUserLinks
http GET {{baseUrl}}/management/accounts/:accountId/entityUserLinks
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/management/accounts/:accountId/entityUserLinks
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/management/accounts/:accountId/entityUserLinks")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PUT
analytics.management.accountUserLinks.update
{{baseUrl}}/management/accounts/:accountId/entityUserLinks/:linkId
QUERY PARAMS
accountId
linkId
BODY json
{
"entity": {
"accountRef": {
"href": "",
"id": "",
"kind": "",
"name": ""
},
"profileRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"webPropertyId": ""
},
"webPropertyRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": ""
}
},
"id": "",
"kind": "",
"permissions": {
"effective": [],
"local": []
},
"selfLink": "",
"userRef": {
"email": "",
"id": "",
"kind": ""
}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/management/accounts/:accountId/entityUserLinks/:linkId");
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 \"entity\": {\n \"accountRef\": {\n \"href\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"profileRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"webPropertyId\": \"\"\n },\n \"webPropertyRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n }\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"permissions\": {\n \"effective\": [],\n \"local\": []\n },\n \"selfLink\": \"\",\n \"userRef\": {\n \"email\": \"\",\n \"id\": \"\",\n \"kind\": \"\"\n }\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/management/accounts/:accountId/entityUserLinks/:linkId" {:content-type :json
:form-params {:entity {:accountRef {:href ""
:id ""
:kind ""
:name ""}
:profileRef {:accountId ""
:href ""
:id ""
:internalWebPropertyId ""
:kind ""
:name ""
:webPropertyId ""}
:webPropertyRef {:accountId ""
:href ""
:id ""
:internalWebPropertyId ""
:kind ""
:name ""}}
:id ""
:kind ""
:permissions {:effective []
:local []}
:selfLink ""
:userRef {:email ""
:id ""
:kind ""}}})
require "http/client"
url = "{{baseUrl}}/management/accounts/:accountId/entityUserLinks/:linkId"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"entity\": {\n \"accountRef\": {\n \"href\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"profileRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"webPropertyId\": \"\"\n },\n \"webPropertyRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n }\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"permissions\": {\n \"effective\": [],\n \"local\": []\n },\n \"selfLink\": \"\",\n \"userRef\": {\n \"email\": \"\",\n \"id\": \"\",\n \"kind\": \"\"\n }\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}}/management/accounts/:accountId/entityUserLinks/:linkId"),
Content = new StringContent("{\n \"entity\": {\n \"accountRef\": {\n \"href\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"profileRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"webPropertyId\": \"\"\n },\n \"webPropertyRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n }\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"permissions\": {\n \"effective\": [],\n \"local\": []\n },\n \"selfLink\": \"\",\n \"userRef\": {\n \"email\": \"\",\n \"id\": \"\",\n \"kind\": \"\"\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}}/management/accounts/:accountId/entityUserLinks/:linkId");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"entity\": {\n \"accountRef\": {\n \"href\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"profileRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"webPropertyId\": \"\"\n },\n \"webPropertyRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n }\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"permissions\": {\n \"effective\": [],\n \"local\": []\n },\n \"selfLink\": \"\",\n \"userRef\": {\n \"email\": \"\",\n \"id\": \"\",\n \"kind\": \"\"\n }\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/management/accounts/:accountId/entityUserLinks/:linkId"
payload := strings.NewReader("{\n \"entity\": {\n \"accountRef\": {\n \"href\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"profileRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"webPropertyId\": \"\"\n },\n \"webPropertyRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n }\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"permissions\": {\n \"effective\": [],\n \"local\": []\n },\n \"selfLink\": \"\",\n \"userRef\": {\n \"email\": \"\",\n \"id\": \"\",\n \"kind\": \"\"\n }\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/management/accounts/:accountId/entityUserLinks/:linkId HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 626
{
"entity": {
"accountRef": {
"href": "",
"id": "",
"kind": "",
"name": ""
},
"profileRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"webPropertyId": ""
},
"webPropertyRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": ""
}
},
"id": "",
"kind": "",
"permissions": {
"effective": [],
"local": []
},
"selfLink": "",
"userRef": {
"email": "",
"id": "",
"kind": ""
}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/management/accounts/:accountId/entityUserLinks/:linkId")
.setHeader("content-type", "application/json")
.setBody("{\n \"entity\": {\n \"accountRef\": {\n \"href\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"profileRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"webPropertyId\": \"\"\n },\n \"webPropertyRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n }\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"permissions\": {\n \"effective\": [],\n \"local\": []\n },\n \"selfLink\": \"\",\n \"userRef\": {\n \"email\": \"\",\n \"id\": \"\",\n \"kind\": \"\"\n }\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/management/accounts/:accountId/entityUserLinks/:linkId"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"entity\": {\n \"accountRef\": {\n \"href\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"profileRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"webPropertyId\": \"\"\n },\n \"webPropertyRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n }\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"permissions\": {\n \"effective\": [],\n \"local\": []\n },\n \"selfLink\": \"\",\n \"userRef\": {\n \"email\": \"\",\n \"id\": \"\",\n \"kind\": \"\"\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 \"entity\": {\n \"accountRef\": {\n \"href\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"profileRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"webPropertyId\": \"\"\n },\n \"webPropertyRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n }\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"permissions\": {\n \"effective\": [],\n \"local\": []\n },\n \"selfLink\": \"\",\n \"userRef\": {\n \"email\": \"\",\n \"id\": \"\",\n \"kind\": \"\"\n }\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/management/accounts/:accountId/entityUserLinks/:linkId")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/management/accounts/:accountId/entityUserLinks/:linkId")
.header("content-type", "application/json")
.body("{\n \"entity\": {\n \"accountRef\": {\n \"href\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"profileRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"webPropertyId\": \"\"\n },\n \"webPropertyRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n }\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"permissions\": {\n \"effective\": [],\n \"local\": []\n },\n \"selfLink\": \"\",\n \"userRef\": {\n \"email\": \"\",\n \"id\": \"\",\n \"kind\": \"\"\n }\n}")
.asString();
const data = JSON.stringify({
entity: {
accountRef: {
href: '',
id: '',
kind: '',
name: ''
},
profileRef: {
accountId: '',
href: '',
id: '',
internalWebPropertyId: '',
kind: '',
name: '',
webPropertyId: ''
},
webPropertyRef: {
accountId: '',
href: '',
id: '',
internalWebPropertyId: '',
kind: '',
name: ''
}
},
id: '',
kind: '',
permissions: {
effective: [],
local: []
},
selfLink: '',
userRef: {
email: '',
id: '',
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}}/management/accounts/:accountId/entityUserLinks/:linkId');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/management/accounts/:accountId/entityUserLinks/:linkId',
headers: {'content-type': 'application/json'},
data: {
entity: {
accountRef: {href: '', id: '', kind: '', name: ''},
profileRef: {
accountId: '',
href: '',
id: '',
internalWebPropertyId: '',
kind: '',
name: '',
webPropertyId: ''
},
webPropertyRef: {accountId: '', href: '', id: '', internalWebPropertyId: '', kind: '', name: ''}
},
id: '',
kind: '',
permissions: {effective: [], local: []},
selfLink: '',
userRef: {email: '', id: '', kind: ''}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/management/accounts/:accountId/entityUserLinks/:linkId';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"entity":{"accountRef":{"href":"","id":"","kind":"","name":""},"profileRef":{"accountId":"","href":"","id":"","internalWebPropertyId":"","kind":"","name":"","webPropertyId":""},"webPropertyRef":{"accountId":"","href":"","id":"","internalWebPropertyId":"","kind":"","name":""}},"id":"","kind":"","permissions":{"effective":[],"local":[]},"selfLink":"","userRef":{"email":"","id":"","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}}/management/accounts/:accountId/entityUserLinks/:linkId',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "entity": {\n "accountRef": {\n "href": "",\n "id": "",\n "kind": "",\n "name": ""\n },\n "profileRef": {\n "accountId": "",\n "href": "",\n "id": "",\n "internalWebPropertyId": "",\n "kind": "",\n "name": "",\n "webPropertyId": ""\n },\n "webPropertyRef": {\n "accountId": "",\n "href": "",\n "id": "",\n "internalWebPropertyId": "",\n "kind": "",\n "name": ""\n }\n },\n "id": "",\n "kind": "",\n "permissions": {\n "effective": [],\n "local": []\n },\n "selfLink": "",\n "userRef": {\n "email": "",\n "id": "",\n "kind": ""\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 \"entity\": {\n \"accountRef\": {\n \"href\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"profileRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"webPropertyId\": \"\"\n },\n \"webPropertyRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n }\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"permissions\": {\n \"effective\": [],\n \"local\": []\n },\n \"selfLink\": \"\",\n \"userRef\": {\n \"email\": \"\",\n \"id\": \"\",\n \"kind\": \"\"\n }\n}")
val request = Request.Builder()
.url("{{baseUrl}}/management/accounts/:accountId/entityUserLinks/:linkId")
.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/management/accounts/:accountId/entityUserLinks/:linkId',
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({
entity: {
accountRef: {href: '', id: '', kind: '', name: ''},
profileRef: {
accountId: '',
href: '',
id: '',
internalWebPropertyId: '',
kind: '',
name: '',
webPropertyId: ''
},
webPropertyRef: {accountId: '', href: '', id: '', internalWebPropertyId: '', kind: '', name: ''}
},
id: '',
kind: '',
permissions: {effective: [], local: []},
selfLink: '',
userRef: {email: '', id: '', kind: ''}
}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/management/accounts/:accountId/entityUserLinks/:linkId',
headers: {'content-type': 'application/json'},
body: {
entity: {
accountRef: {href: '', id: '', kind: '', name: ''},
profileRef: {
accountId: '',
href: '',
id: '',
internalWebPropertyId: '',
kind: '',
name: '',
webPropertyId: ''
},
webPropertyRef: {accountId: '', href: '', id: '', internalWebPropertyId: '', kind: '', name: ''}
},
id: '',
kind: '',
permissions: {effective: [], local: []},
selfLink: '',
userRef: {email: '', id: '', 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}}/management/accounts/:accountId/entityUserLinks/:linkId');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
entity: {
accountRef: {
href: '',
id: '',
kind: '',
name: ''
},
profileRef: {
accountId: '',
href: '',
id: '',
internalWebPropertyId: '',
kind: '',
name: '',
webPropertyId: ''
},
webPropertyRef: {
accountId: '',
href: '',
id: '',
internalWebPropertyId: '',
kind: '',
name: ''
}
},
id: '',
kind: '',
permissions: {
effective: [],
local: []
},
selfLink: '',
userRef: {
email: '',
id: '',
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}}/management/accounts/:accountId/entityUserLinks/:linkId',
headers: {'content-type': 'application/json'},
data: {
entity: {
accountRef: {href: '', id: '', kind: '', name: ''},
profileRef: {
accountId: '',
href: '',
id: '',
internalWebPropertyId: '',
kind: '',
name: '',
webPropertyId: ''
},
webPropertyRef: {accountId: '', href: '', id: '', internalWebPropertyId: '', kind: '', name: ''}
},
id: '',
kind: '',
permissions: {effective: [], local: []},
selfLink: '',
userRef: {email: '', id: '', kind: ''}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/management/accounts/:accountId/entityUserLinks/:linkId';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"entity":{"accountRef":{"href":"","id":"","kind":"","name":""},"profileRef":{"accountId":"","href":"","id":"","internalWebPropertyId":"","kind":"","name":"","webPropertyId":""},"webPropertyRef":{"accountId":"","href":"","id":"","internalWebPropertyId":"","kind":"","name":""}},"id":"","kind":"","permissions":{"effective":[],"local":[]},"selfLink":"","userRef":{"email":"","id":"","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 = @{ @"entity": @{ @"accountRef": @{ @"href": @"", @"id": @"", @"kind": @"", @"name": @"" }, @"profileRef": @{ @"accountId": @"", @"href": @"", @"id": @"", @"internalWebPropertyId": @"", @"kind": @"", @"name": @"", @"webPropertyId": @"" }, @"webPropertyRef": @{ @"accountId": @"", @"href": @"", @"id": @"", @"internalWebPropertyId": @"", @"kind": @"", @"name": @"" } },
@"id": @"",
@"kind": @"",
@"permissions": @{ @"effective": @[ ], @"local": @[ ] },
@"selfLink": @"",
@"userRef": @{ @"email": @"", @"id": @"", @"kind": @"" } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/management/accounts/:accountId/entityUserLinks/:linkId"]
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}}/management/accounts/:accountId/entityUserLinks/:linkId" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"entity\": {\n \"accountRef\": {\n \"href\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"profileRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"webPropertyId\": \"\"\n },\n \"webPropertyRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n }\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"permissions\": {\n \"effective\": [],\n \"local\": []\n },\n \"selfLink\": \"\",\n \"userRef\": {\n \"email\": \"\",\n \"id\": \"\",\n \"kind\": \"\"\n }\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/management/accounts/:accountId/entityUserLinks/:linkId",
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([
'entity' => [
'accountRef' => [
'href' => '',
'id' => '',
'kind' => '',
'name' => ''
],
'profileRef' => [
'accountId' => '',
'href' => '',
'id' => '',
'internalWebPropertyId' => '',
'kind' => '',
'name' => '',
'webPropertyId' => ''
],
'webPropertyRef' => [
'accountId' => '',
'href' => '',
'id' => '',
'internalWebPropertyId' => '',
'kind' => '',
'name' => ''
]
],
'id' => '',
'kind' => '',
'permissions' => [
'effective' => [
],
'local' => [
]
],
'selfLink' => '',
'userRef' => [
'email' => '',
'id' => '',
'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}}/management/accounts/:accountId/entityUserLinks/:linkId', [
'body' => '{
"entity": {
"accountRef": {
"href": "",
"id": "",
"kind": "",
"name": ""
},
"profileRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"webPropertyId": ""
},
"webPropertyRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": ""
}
},
"id": "",
"kind": "",
"permissions": {
"effective": [],
"local": []
},
"selfLink": "",
"userRef": {
"email": "",
"id": "",
"kind": ""
}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/management/accounts/:accountId/entityUserLinks/:linkId');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'entity' => [
'accountRef' => [
'href' => '',
'id' => '',
'kind' => '',
'name' => ''
],
'profileRef' => [
'accountId' => '',
'href' => '',
'id' => '',
'internalWebPropertyId' => '',
'kind' => '',
'name' => '',
'webPropertyId' => ''
],
'webPropertyRef' => [
'accountId' => '',
'href' => '',
'id' => '',
'internalWebPropertyId' => '',
'kind' => '',
'name' => ''
]
],
'id' => '',
'kind' => '',
'permissions' => [
'effective' => [
],
'local' => [
]
],
'selfLink' => '',
'userRef' => [
'email' => '',
'id' => '',
'kind' => ''
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'entity' => [
'accountRef' => [
'href' => '',
'id' => '',
'kind' => '',
'name' => ''
],
'profileRef' => [
'accountId' => '',
'href' => '',
'id' => '',
'internalWebPropertyId' => '',
'kind' => '',
'name' => '',
'webPropertyId' => ''
],
'webPropertyRef' => [
'accountId' => '',
'href' => '',
'id' => '',
'internalWebPropertyId' => '',
'kind' => '',
'name' => ''
]
],
'id' => '',
'kind' => '',
'permissions' => [
'effective' => [
],
'local' => [
]
],
'selfLink' => '',
'userRef' => [
'email' => '',
'id' => '',
'kind' => ''
]
]));
$request->setRequestUrl('{{baseUrl}}/management/accounts/:accountId/entityUserLinks/:linkId');
$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}}/management/accounts/:accountId/entityUserLinks/:linkId' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"entity": {
"accountRef": {
"href": "",
"id": "",
"kind": "",
"name": ""
},
"profileRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"webPropertyId": ""
},
"webPropertyRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": ""
}
},
"id": "",
"kind": "",
"permissions": {
"effective": [],
"local": []
},
"selfLink": "",
"userRef": {
"email": "",
"id": "",
"kind": ""
}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/management/accounts/:accountId/entityUserLinks/:linkId' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"entity": {
"accountRef": {
"href": "",
"id": "",
"kind": "",
"name": ""
},
"profileRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"webPropertyId": ""
},
"webPropertyRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": ""
}
},
"id": "",
"kind": "",
"permissions": {
"effective": [],
"local": []
},
"selfLink": "",
"userRef": {
"email": "",
"id": "",
"kind": ""
}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"entity\": {\n \"accountRef\": {\n \"href\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"profileRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"webPropertyId\": \"\"\n },\n \"webPropertyRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n }\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"permissions\": {\n \"effective\": [],\n \"local\": []\n },\n \"selfLink\": \"\",\n \"userRef\": {\n \"email\": \"\",\n \"id\": \"\",\n \"kind\": \"\"\n }\n}"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/management/accounts/:accountId/entityUserLinks/:linkId", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/management/accounts/:accountId/entityUserLinks/:linkId"
payload = {
"entity": {
"accountRef": {
"href": "",
"id": "",
"kind": "",
"name": ""
},
"profileRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"webPropertyId": ""
},
"webPropertyRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": ""
}
},
"id": "",
"kind": "",
"permissions": {
"effective": [],
"local": []
},
"selfLink": "",
"userRef": {
"email": "",
"id": "",
"kind": ""
}
}
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/management/accounts/:accountId/entityUserLinks/:linkId"
payload <- "{\n \"entity\": {\n \"accountRef\": {\n \"href\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"profileRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"webPropertyId\": \"\"\n },\n \"webPropertyRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n }\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"permissions\": {\n \"effective\": [],\n \"local\": []\n },\n \"selfLink\": \"\",\n \"userRef\": {\n \"email\": \"\",\n \"id\": \"\",\n \"kind\": \"\"\n }\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}}/management/accounts/:accountId/entityUserLinks/:linkId")
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 \"entity\": {\n \"accountRef\": {\n \"href\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"profileRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"webPropertyId\": \"\"\n },\n \"webPropertyRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n }\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"permissions\": {\n \"effective\": [],\n \"local\": []\n },\n \"selfLink\": \"\",\n \"userRef\": {\n \"email\": \"\",\n \"id\": \"\",\n \"kind\": \"\"\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.put('/baseUrl/management/accounts/:accountId/entityUserLinks/:linkId') do |req|
req.body = "{\n \"entity\": {\n \"accountRef\": {\n \"href\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"profileRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"webPropertyId\": \"\"\n },\n \"webPropertyRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n }\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"permissions\": {\n \"effective\": [],\n \"local\": []\n },\n \"selfLink\": \"\",\n \"userRef\": {\n \"email\": \"\",\n \"id\": \"\",\n \"kind\": \"\"\n }\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}}/management/accounts/:accountId/entityUserLinks/:linkId";
let payload = json!({
"entity": json!({
"accountRef": json!({
"href": "",
"id": "",
"kind": "",
"name": ""
}),
"profileRef": json!({
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"webPropertyId": ""
}),
"webPropertyRef": json!({
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": ""
})
}),
"id": "",
"kind": "",
"permissions": json!({
"effective": (),
"local": ()
}),
"selfLink": "",
"userRef": json!({
"email": "",
"id": "",
"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}}/management/accounts/:accountId/entityUserLinks/:linkId \
--header 'content-type: application/json' \
--data '{
"entity": {
"accountRef": {
"href": "",
"id": "",
"kind": "",
"name": ""
},
"profileRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"webPropertyId": ""
},
"webPropertyRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": ""
}
},
"id": "",
"kind": "",
"permissions": {
"effective": [],
"local": []
},
"selfLink": "",
"userRef": {
"email": "",
"id": "",
"kind": ""
}
}'
echo '{
"entity": {
"accountRef": {
"href": "",
"id": "",
"kind": "",
"name": ""
},
"profileRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"webPropertyId": ""
},
"webPropertyRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": ""
}
},
"id": "",
"kind": "",
"permissions": {
"effective": [],
"local": []
},
"selfLink": "",
"userRef": {
"email": "",
"id": "",
"kind": ""
}
}' | \
http PUT {{baseUrl}}/management/accounts/:accountId/entityUserLinks/:linkId \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '{\n "entity": {\n "accountRef": {\n "href": "",\n "id": "",\n "kind": "",\n "name": ""\n },\n "profileRef": {\n "accountId": "",\n "href": "",\n "id": "",\n "internalWebPropertyId": "",\n "kind": "",\n "name": "",\n "webPropertyId": ""\n },\n "webPropertyRef": {\n "accountId": "",\n "href": "",\n "id": "",\n "internalWebPropertyId": "",\n "kind": "",\n "name": ""\n }\n },\n "id": "",\n "kind": "",\n "permissions": {\n "effective": [],\n "local": []\n },\n "selfLink": "",\n "userRef": {\n "email": "",\n "id": "",\n "kind": ""\n }\n}' \
--output-document \
- {{baseUrl}}/management/accounts/:accountId/entityUserLinks/:linkId
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"entity": [
"accountRef": [
"href": "",
"id": "",
"kind": "",
"name": ""
],
"profileRef": [
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"webPropertyId": ""
],
"webPropertyRef": [
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": ""
]
],
"id": "",
"kind": "",
"permissions": [
"effective": [],
"local": []
],
"selfLink": "",
"userRef": [
"email": "",
"id": "",
"kind": ""
]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/management/accounts/:accountId/entityUserLinks/:linkId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
analytics.management.accounts.list
{{baseUrl}}/management/accounts
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/management/accounts");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/management/accounts")
require "http/client"
url = "{{baseUrl}}/management/accounts"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/management/accounts"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/management/accounts");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/management/accounts"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/management/accounts HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/management/accounts")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/management/accounts"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/management/accounts")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/management/accounts")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/management/accounts');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/management/accounts'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/management/accounts';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/management/accounts',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/management/accounts")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/management/accounts',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'GET', url: '{{baseUrl}}/management/accounts'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/management/accounts');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {method: 'GET', url: '{{baseUrl}}/management/accounts'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/management/accounts';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/management/accounts"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/management/accounts" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/management/accounts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/management/accounts');
echo $response->getBody();
setUrl('{{baseUrl}}/management/accounts');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/management/accounts');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/management/accounts' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/management/accounts' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/management/accounts")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/management/accounts"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/management/accounts"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/management/accounts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/management/accounts') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/management/accounts";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/management/accounts
http GET {{baseUrl}}/management/accounts
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/management/accounts
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/management/accounts")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
analytics.management.clientId.hashClientId
{{baseUrl}}/management/clientId:hashClientId
BODY json
{
"clientId": "",
"kind": "",
"webPropertyId": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/management/clientId:hashClientId");
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 \"clientId\": \"\",\n \"kind\": \"\",\n \"webPropertyId\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/management/clientId:hashClientId" {:content-type :json
:form-params {:clientId ""
:kind ""
:webPropertyId ""}})
require "http/client"
url = "{{baseUrl}}/management/clientId:hashClientId"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"clientId\": \"\",\n \"kind\": \"\",\n \"webPropertyId\": \"\"\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}}/management/clientId:hashClientId"),
Content = new StringContent("{\n \"clientId\": \"\",\n \"kind\": \"\",\n \"webPropertyId\": \"\"\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}}/management/clientId:hashClientId");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"clientId\": \"\",\n \"kind\": \"\",\n \"webPropertyId\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/management/clientId:hashClientId"
payload := strings.NewReader("{\n \"clientId\": \"\",\n \"kind\": \"\",\n \"webPropertyId\": \"\"\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/management/clientId:hashClientId HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 57
{
"clientId": "",
"kind": "",
"webPropertyId": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/management/clientId:hashClientId")
.setHeader("content-type", "application/json")
.setBody("{\n \"clientId\": \"\",\n \"kind\": \"\",\n \"webPropertyId\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/management/clientId:hashClientId"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"clientId\": \"\",\n \"kind\": \"\",\n \"webPropertyId\": \"\"\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 \"clientId\": \"\",\n \"kind\": \"\",\n \"webPropertyId\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/management/clientId:hashClientId")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/management/clientId:hashClientId")
.header("content-type", "application/json")
.body("{\n \"clientId\": \"\",\n \"kind\": \"\",\n \"webPropertyId\": \"\"\n}")
.asString();
const data = JSON.stringify({
clientId: '',
kind: '',
webPropertyId: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/management/clientId:hashClientId');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/management/clientId:hashClientId',
headers: {'content-type': 'application/json'},
data: {clientId: '', kind: '', webPropertyId: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/management/clientId:hashClientId';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"clientId":"","kind":"","webPropertyId":""}'
};
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}}/management/clientId:hashClientId',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "clientId": "",\n "kind": "",\n "webPropertyId": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"clientId\": \"\",\n \"kind\": \"\",\n \"webPropertyId\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/management/clientId:hashClientId")
.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/management/clientId:hashClientId',
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({clientId: '', kind: '', webPropertyId: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/management/clientId:hashClientId',
headers: {'content-type': 'application/json'},
body: {clientId: '', kind: '', webPropertyId: ''},
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}}/management/clientId:hashClientId');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
clientId: '',
kind: '',
webPropertyId: ''
});
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}}/management/clientId:hashClientId',
headers: {'content-type': 'application/json'},
data: {clientId: '', kind: '', webPropertyId: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/management/clientId:hashClientId';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"clientId":"","kind":"","webPropertyId":""}'
};
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 = @{ @"clientId": @"",
@"kind": @"",
@"webPropertyId": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/management/clientId:hashClientId"]
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}}/management/clientId:hashClientId" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"clientId\": \"\",\n \"kind\": \"\",\n \"webPropertyId\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/management/clientId:hashClientId",
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([
'clientId' => '',
'kind' => '',
'webPropertyId' => ''
]),
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}}/management/clientId:hashClientId', [
'body' => '{
"clientId": "",
"kind": "",
"webPropertyId": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/management/clientId:hashClientId');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'clientId' => '',
'kind' => '',
'webPropertyId' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'clientId' => '',
'kind' => '',
'webPropertyId' => ''
]));
$request->setRequestUrl('{{baseUrl}}/management/clientId:hashClientId');
$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}}/management/clientId:hashClientId' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"clientId": "",
"kind": "",
"webPropertyId": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/management/clientId:hashClientId' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"clientId": "",
"kind": "",
"webPropertyId": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"clientId\": \"\",\n \"kind\": \"\",\n \"webPropertyId\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/management/clientId:hashClientId", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/management/clientId:hashClientId"
payload = {
"clientId": "",
"kind": "",
"webPropertyId": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/management/clientId:hashClientId"
payload <- "{\n \"clientId\": \"\",\n \"kind\": \"\",\n \"webPropertyId\": \"\"\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}}/management/clientId:hashClientId")
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 \"clientId\": \"\",\n \"kind\": \"\",\n \"webPropertyId\": \"\"\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/management/clientId:hashClientId') do |req|
req.body = "{\n \"clientId\": \"\",\n \"kind\": \"\",\n \"webPropertyId\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/management/clientId:hashClientId";
let payload = json!({
"clientId": "",
"kind": "",
"webPropertyId": ""
});
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}}/management/clientId:hashClientId \
--header 'content-type: application/json' \
--data '{
"clientId": "",
"kind": "",
"webPropertyId": ""
}'
echo '{
"clientId": "",
"kind": "",
"webPropertyId": ""
}' | \
http POST {{baseUrl}}/management/clientId:hashClientId \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "clientId": "",\n "kind": "",\n "webPropertyId": ""\n}' \
--output-document \
- {{baseUrl}}/management/clientId:hashClientId
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"clientId": "",
"kind": "",
"webPropertyId": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/management/clientId:hashClientId")! 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
analytics.management.customDataSources.list
{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources
QUERY PARAMS
accountId
webPropertyId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources")
require "http/client"
url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources"
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}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources"
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/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources"))
.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}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources")
.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}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources';
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}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources',
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}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources');
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}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources';
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}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources"]
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}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources",
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}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources');
echo $response->getBody();
setUrl('{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources")
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/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources";
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}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources
http GET {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources")! 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
analytics.management.customDimensions.get
{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions/:customDimensionId
QUERY PARAMS
accountId
webPropertyId
customDimensionId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions/:customDimensionId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions/:customDimensionId")
require "http/client"
url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions/:customDimensionId"
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}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions/:customDimensionId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions/:customDimensionId");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions/:customDimensionId"
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/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions/:customDimensionId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions/:customDimensionId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions/:customDimensionId"))
.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}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions/:customDimensionId")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions/:customDimensionId")
.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}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions/:customDimensionId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions/:customDimensionId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions/:customDimensionId';
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}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions/:customDimensionId',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions/:customDimensionId")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions/:customDimensionId',
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}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions/:customDimensionId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions/:customDimensionId');
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}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions/:customDimensionId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions/:customDimensionId';
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}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions/:customDimensionId"]
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}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions/:customDimensionId" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions/:customDimensionId",
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}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions/:customDimensionId');
echo $response->getBody();
setUrl('{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions/:customDimensionId');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions/:customDimensionId');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions/:customDimensionId' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions/:customDimensionId' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions/:customDimensionId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions/:customDimensionId"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions/:customDimensionId"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions/:customDimensionId")
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/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions/:customDimensionId') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions/:customDimensionId";
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}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions/:customDimensionId
http GET {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions/:customDimensionId
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions/:customDimensionId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions/:customDimensionId")! 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
analytics.management.customDimensions.insert
{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions
QUERY PARAMS
accountId
webPropertyId
BODY json
{
"accountId": "",
"active": false,
"created": "",
"id": "",
"index": 0,
"kind": "",
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"scope": "",
"selfLink": "",
"updated": "",
"webPropertyId": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"accountId\": \"\",\n \"active\": false,\n \"created\": \"\",\n \"id\": \"\",\n \"index\": 0,\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"scope\": \"\",\n \"selfLink\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions" {:content-type :json
:form-params {:accountId ""
:active false
:created ""
:id ""
:index 0
:kind ""
:name ""
:parentLink {:href ""
:type ""}
:scope ""
:selfLink ""
:updated ""
:webPropertyId ""}})
require "http/client"
url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"accountId\": \"\",\n \"active\": false,\n \"created\": \"\",\n \"id\": \"\",\n \"index\": 0,\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"scope\": \"\",\n \"selfLink\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\"\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}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions"),
Content = new StringContent("{\n \"accountId\": \"\",\n \"active\": false,\n \"created\": \"\",\n \"id\": \"\",\n \"index\": 0,\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"scope\": \"\",\n \"selfLink\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\"\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}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"accountId\": \"\",\n \"active\": false,\n \"created\": \"\",\n \"id\": \"\",\n \"index\": 0,\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"scope\": \"\",\n \"selfLink\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions"
payload := strings.NewReader("{\n \"accountId\": \"\",\n \"active\": false,\n \"created\": \"\",\n \"id\": \"\",\n \"index\": 0,\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"scope\": \"\",\n \"selfLink\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\"\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/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 238
{
"accountId": "",
"active": false,
"created": "",
"id": "",
"index": 0,
"kind": "",
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"scope": "",
"selfLink": "",
"updated": "",
"webPropertyId": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions")
.setHeader("content-type", "application/json")
.setBody("{\n \"accountId\": \"\",\n \"active\": false,\n \"created\": \"\",\n \"id\": \"\",\n \"index\": 0,\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"scope\": \"\",\n \"selfLink\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"accountId\": \"\",\n \"active\": false,\n \"created\": \"\",\n \"id\": \"\",\n \"index\": 0,\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"scope\": \"\",\n \"selfLink\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"accountId\": \"\",\n \"active\": false,\n \"created\": \"\",\n \"id\": \"\",\n \"index\": 0,\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"scope\": \"\",\n \"selfLink\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions")
.header("content-type", "application/json")
.body("{\n \"accountId\": \"\",\n \"active\": false,\n \"created\": \"\",\n \"id\": \"\",\n \"index\": 0,\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"scope\": \"\",\n \"selfLink\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\"\n}")
.asString();
const data = JSON.stringify({
accountId: '',
active: false,
created: '',
id: '',
index: 0,
kind: '',
name: '',
parentLink: {
href: '',
type: ''
},
scope: '',
selfLink: '',
updated: '',
webPropertyId: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions',
headers: {'content-type': 'application/json'},
data: {
accountId: '',
active: false,
created: '',
id: '',
index: 0,
kind: '',
name: '',
parentLink: {href: '', type: ''},
scope: '',
selfLink: '',
updated: '',
webPropertyId: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"accountId":"","active":false,"created":"","id":"","index":0,"kind":"","name":"","parentLink":{"href":"","type":""},"scope":"","selfLink":"","updated":"","webPropertyId":""}'
};
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}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "accountId": "",\n "active": false,\n "created": "",\n "id": "",\n "index": 0,\n "kind": "",\n "name": "",\n "parentLink": {\n "href": "",\n "type": ""\n },\n "scope": "",\n "selfLink": "",\n "updated": "",\n "webPropertyId": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"accountId\": \"\",\n \"active\": false,\n \"created\": \"\",\n \"id\": \"\",\n \"index\": 0,\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"scope\": \"\",\n \"selfLink\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions")
.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/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
accountId: '',
active: false,
created: '',
id: '',
index: 0,
kind: '',
name: '',
parentLink: {href: '', type: ''},
scope: '',
selfLink: '',
updated: '',
webPropertyId: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions',
headers: {'content-type': 'application/json'},
body: {
accountId: '',
active: false,
created: '',
id: '',
index: 0,
kind: '',
name: '',
parentLink: {href: '', type: ''},
scope: '',
selfLink: '',
updated: '',
webPropertyId: ''
},
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}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
accountId: '',
active: false,
created: '',
id: '',
index: 0,
kind: '',
name: '',
parentLink: {
href: '',
type: ''
},
scope: '',
selfLink: '',
updated: '',
webPropertyId: ''
});
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}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions',
headers: {'content-type': 'application/json'},
data: {
accountId: '',
active: false,
created: '',
id: '',
index: 0,
kind: '',
name: '',
parentLink: {href: '', type: ''},
scope: '',
selfLink: '',
updated: '',
webPropertyId: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"accountId":"","active":false,"created":"","id":"","index":0,"kind":"","name":"","parentLink":{"href":"","type":""},"scope":"","selfLink":"","updated":"","webPropertyId":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"accountId": @"",
@"active": @NO,
@"created": @"",
@"id": @"",
@"index": @0,
@"kind": @"",
@"name": @"",
@"parentLink": @{ @"href": @"", @"type": @"" },
@"scope": @"",
@"selfLink": @"",
@"updated": @"",
@"webPropertyId": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions"]
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}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"accountId\": \"\",\n \"active\": false,\n \"created\": \"\",\n \"id\": \"\",\n \"index\": 0,\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"scope\": \"\",\n \"selfLink\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'accountId' => '',
'active' => null,
'created' => '',
'id' => '',
'index' => 0,
'kind' => '',
'name' => '',
'parentLink' => [
'href' => '',
'type' => ''
],
'scope' => '',
'selfLink' => '',
'updated' => '',
'webPropertyId' => ''
]),
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}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions', [
'body' => '{
"accountId": "",
"active": false,
"created": "",
"id": "",
"index": 0,
"kind": "",
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"scope": "",
"selfLink": "",
"updated": "",
"webPropertyId": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'accountId' => '',
'active' => null,
'created' => '',
'id' => '',
'index' => 0,
'kind' => '',
'name' => '',
'parentLink' => [
'href' => '',
'type' => ''
],
'scope' => '',
'selfLink' => '',
'updated' => '',
'webPropertyId' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'accountId' => '',
'active' => null,
'created' => '',
'id' => '',
'index' => 0,
'kind' => '',
'name' => '',
'parentLink' => [
'href' => '',
'type' => ''
],
'scope' => '',
'selfLink' => '',
'updated' => '',
'webPropertyId' => ''
]));
$request->setRequestUrl('{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions');
$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}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"accountId": "",
"active": false,
"created": "",
"id": "",
"index": 0,
"kind": "",
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"scope": "",
"selfLink": "",
"updated": "",
"webPropertyId": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"accountId": "",
"active": false,
"created": "",
"id": "",
"index": 0,
"kind": "",
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"scope": "",
"selfLink": "",
"updated": "",
"webPropertyId": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"accountId\": \"\",\n \"active\": false,\n \"created\": \"\",\n \"id\": \"\",\n \"index\": 0,\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"scope\": \"\",\n \"selfLink\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions"
payload = {
"accountId": "",
"active": False,
"created": "",
"id": "",
"index": 0,
"kind": "",
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"scope": "",
"selfLink": "",
"updated": "",
"webPropertyId": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions"
payload <- "{\n \"accountId\": \"\",\n \"active\": false,\n \"created\": \"\",\n \"id\": \"\",\n \"index\": 0,\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"scope\": \"\",\n \"selfLink\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\"\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}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"accountId\": \"\",\n \"active\": false,\n \"created\": \"\",\n \"id\": \"\",\n \"index\": 0,\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"scope\": \"\",\n \"selfLink\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\"\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/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions') do |req|
req.body = "{\n \"accountId\": \"\",\n \"active\": false,\n \"created\": \"\",\n \"id\": \"\",\n \"index\": 0,\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"scope\": \"\",\n \"selfLink\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions";
let payload = json!({
"accountId": "",
"active": false,
"created": "",
"id": "",
"index": 0,
"kind": "",
"name": "",
"parentLink": json!({
"href": "",
"type": ""
}),
"scope": "",
"selfLink": "",
"updated": "",
"webPropertyId": ""
});
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}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions \
--header 'content-type: application/json' \
--data '{
"accountId": "",
"active": false,
"created": "",
"id": "",
"index": 0,
"kind": "",
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"scope": "",
"selfLink": "",
"updated": "",
"webPropertyId": ""
}'
echo '{
"accountId": "",
"active": false,
"created": "",
"id": "",
"index": 0,
"kind": "",
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"scope": "",
"selfLink": "",
"updated": "",
"webPropertyId": ""
}' | \
http POST {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "accountId": "",\n "active": false,\n "created": "",\n "id": "",\n "index": 0,\n "kind": "",\n "name": "",\n "parentLink": {\n "href": "",\n "type": ""\n },\n "scope": "",\n "selfLink": "",\n "updated": "",\n "webPropertyId": ""\n}' \
--output-document \
- {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"accountId": "",
"active": false,
"created": "",
"id": "",
"index": 0,
"kind": "",
"name": "",
"parentLink": [
"href": "",
"type": ""
],
"scope": "",
"selfLink": "",
"updated": "",
"webPropertyId": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions")! 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
analytics.management.customDimensions.list
{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions
QUERY PARAMS
accountId
webPropertyId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions")
require "http/client"
url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions"
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}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions"
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/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions"))
.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}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions")
.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}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions';
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}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions',
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}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions');
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}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions';
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}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions"]
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}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions",
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}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions');
echo $response->getBody();
setUrl('{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions")
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/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions";
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}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions
http GET {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PATCH
analytics.management.customDimensions.patch
{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions/:customDimensionId
QUERY PARAMS
accountId
webPropertyId
customDimensionId
BODY json
{
"accountId": "",
"active": false,
"created": "",
"id": "",
"index": 0,
"kind": "",
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"scope": "",
"selfLink": "",
"updated": "",
"webPropertyId": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions/:customDimensionId");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"accountId\": \"\",\n \"active\": false,\n \"created\": \"\",\n \"id\": \"\",\n \"index\": 0,\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"scope\": \"\",\n \"selfLink\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/patch "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions/:customDimensionId" {:content-type :json
:form-params {:accountId ""
:active false
:created ""
:id ""
:index 0
:kind ""
:name ""
:parentLink {:href ""
:type ""}
:scope ""
:selfLink ""
:updated ""
:webPropertyId ""}})
require "http/client"
url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions/:customDimensionId"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"accountId\": \"\",\n \"active\": false,\n \"created\": \"\",\n \"id\": \"\",\n \"index\": 0,\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"scope\": \"\",\n \"selfLink\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\"\n}"
response = HTTP::Client.patch url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Patch,
RequestUri = new Uri("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions/:customDimensionId"),
Content = new StringContent("{\n \"accountId\": \"\",\n \"active\": false,\n \"created\": \"\",\n \"id\": \"\",\n \"index\": 0,\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"scope\": \"\",\n \"selfLink\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\"\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}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions/:customDimensionId");
var request = new RestRequest("", Method.Patch);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"accountId\": \"\",\n \"active\": false,\n \"created\": \"\",\n \"id\": \"\",\n \"index\": 0,\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"scope\": \"\",\n \"selfLink\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions/:customDimensionId"
payload := strings.NewReader("{\n \"accountId\": \"\",\n \"active\": false,\n \"created\": \"\",\n \"id\": \"\",\n \"index\": 0,\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"scope\": \"\",\n \"selfLink\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
PATCH /baseUrl/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions/:customDimensionId HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 238
{
"accountId": "",
"active": false,
"created": "",
"id": "",
"index": 0,
"kind": "",
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"scope": "",
"selfLink": "",
"updated": "",
"webPropertyId": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions/:customDimensionId")
.setHeader("content-type", "application/json")
.setBody("{\n \"accountId\": \"\",\n \"active\": false,\n \"created\": \"\",\n \"id\": \"\",\n \"index\": 0,\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"scope\": \"\",\n \"selfLink\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions/:customDimensionId"))
.header("content-type", "application/json")
.method("PATCH", HttpRequest.BodyPublishers.ofString("{\n \"accountId\": \"\",\n \"active\": false,\n \"created\": \"\",\n \"id\": \"\",\n \"index\": 0,\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"scope\": \"\",\n \"selfLink\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"accountId\": \"\",\n \"active\": false,\n \"created\": \"\",\n \"id\": \"\",\n \"index\": 0,\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"scope\": \"\",\n \"selfLink\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions/:customDimensionId")
.patch(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions/:customDimensionId")
.header("content-type", "application/json")
.body("{\n \"accountId\": \"\",\n \"active\": false,\n \"created\": \"\",\n \"id\": \"\",\n \"index\": 0,\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"scope\": \"\",\n \"selfLink\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\"\n}")
.asString();
const data = JSON.stringify({
accountId: '',
active: false,
created: '',
id: '',
index: 0,
kind: '',
name: '',
parentLink: {
href: '',
type: ''
},
scope: '',
selfLink: '',
updated: '',
webPropertyId: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PATCH', '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions/:customDimensionId');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PATCH',
url: '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions/:customDimensionId',
headers: {'content-type': 'application/json'},
data: {
accountId: '',
active: false,
created: '',
id: '',
index: 0,
kind: '',
name: '',
parentLink: {href: '', type: ''},
scope: '',
selfLink: '',
updated: '',
webPropertyId: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions/:customDimensionId';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"accountId":"","active":false,"created":"","id":"","index":0,"kind":"","name":"","parentLink":{"href":"","type":""},"scope":"","selfLink":"","updated":"","webPropertyId":""}'
};
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}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions/:customDimensionId',
method: 'PATCH',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "accountId": "",\n "active": false,\n "created": "",\n "id": "",\n "index": 0,\n "kind": "",\n "name": "",\n "parentLink": {\n "href": "",\n "type": ""\n },\n "scope": "",\n "selfLink": "",\n "updated": "",\n "webPropertyId": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"accountId\": \"\",\n \"active\": false,\n \"created\": \"\",\n \"id\": \"\",\n \"index\": 0,\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"scope\": \"\",\n \"selfLink\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions/:customDimensionId")
.patch(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PATCH',
hostname: 'example.com',
port: null,
path: '/baseUrl/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions/:customDimensionId',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
accountId: '',
active: false,
created: '',
id: '',
index: 0,
kind: '',
name: '',
parentLink: {href: '', type: ''},
scope: '',
selfLink: '',
updated: '',
webPropertyId: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PATCH',
url: '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions/:customDimensionId',
headers: {'content-type': 'application/json'},
body: {
accountId: '',
active: false,
created: '',
id: '',
index: 0,
kind: '',
name: '',
parentLink: {href: '', type: ''},
scope: '',
selfLink: '',
updated: '',
webPropertyId: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PATCH', '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions/:customDimensionId');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
accountId: '',
active: false,
created: '',
id: '',
index: 0,
kind: '',
name: '',
parentLink: {
href: '',
type: ''
},
scope: '',
selfLink: '',
updated: '',
webPropertyId: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PATCH',
url: '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions/:customDimensionId',
headers: {'content-type': 'application/json'},
data: {
accountId: '',
active: false,
created: '',
id: '',
index: 0,
kind: '',
name: '',
parentLink: {href: '', type: ''},
scope: '',
selfLink: '',
updated: '',
webPropertyId: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions/:customDimensionId';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"accountId":"","active":false,"created":"","id":"","index":0,"kind":"","name":"","parentLink":{"href":"","type":""},"scope":"","selfLink":"","updated":"","webPropertyId":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"accountId": @"",
@"active": @NO,
@"created": @"",
@"id": @"",
@"index": @0,
@"kind": @"",
@"name": @"",
@"parentLink": @{ @"href": @"", @"type": @"" },
@"scope": @"",
@"selfLink": @"",
@"updated": @"",
@"webPropertyId": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions/:customDimensionId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PATCH"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions/:customDimensionId" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"accountId\": \"\",\n \"active\": false,\n \"created\": \"\",\n \"id\": \"\",\n \"index\": 0,\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"scope\": \"\",\n \"selfLink\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\"\n}" in
Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions/:customDimensionId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'accountId' => '',
'active' => null,
'created' => '',
'id' => '',
'index' => 0,
'kind' => '',
'name' => '',
'parentLink' => [
'href' => '',
'type' => ''
],
'scope' => '',
'selfLink' => '',
'updated' => '',
'webPropertyId' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PATCH', '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions/:customDimensionId', [
'body' => '{
"accountId": "",
"active": false,
"created": "",
"id": "",
"index": 0,
"kind": "",
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"scope": "",
"selfLink": "",
"updated": "",
"webPropertyId": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions/:customDimensionId');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'accountId' => '',
'active' => null,
'created' => '',
'id' => '',
'index' => 0,
'kind' => '',
'name' => '',
'parentLink' => [
'href' => '',
'type' => ''
],
'scope' => '',
'selfLink' => '',
'updated' => '',
'webPropertyId' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'accountId' => '',
'active' => null,
'created' => '',
'id' => '',
'index' => 0,
'kind' => '',
'name' => '',
'parentLink' => [
'href' => '',
'type' => ''
],
'scope' => '',
'selfLink' => '',
'updated' => '',
'webPropertyId' => ''
]));
$request->setRequestUrl('{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions/:customDimensionId');
$request->setRequestMethod('PATCH');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions/:customDimensionId' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"accountId": "",
"active": false,
"created": "",
"id": "",
"index": 0,
"kind": "",
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"scope": "",
"selfLink": "",
"updated": "",
"webPropertyId": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions/:customDimensionId' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"accountId": "",
"active": false,
"created": "",
"id": "",
"index": 0,
"kind": "",
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"scope": "",
"selfLink": "",
"updated": "",
"webPropertyId": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"accountId\": \"\",\n \"active\": false,\n \"created\": \"\",\n \"id\": \"\",\n \"index\": 0,\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"scope\": \"\",\n \"selfLink\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("PATCH", "/baseUrl/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions/:customDimensionId", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions/:customDimensionId"
payload = {
"accountId": "",
"active": False,
"created": "",
"id": "",
"index": 0,
"kind": "",
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"scope": "",
"selfLink": "",
"updated": "",
"webPropertyId": ""
}
headers = {"content-type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions/:customDimensionId"
payload <- "{\n \"accountId\": \"\",\n \"active\": false,\n \"created\": \"\",\n \"id\": \"\",\n \"index\": 0,\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"scope\": \"\",\n \"selfLink\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\"\n}"
encode <- "json"
response <- VERB("PATCH", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions/:customDimensionId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"accountId\": \"\",\n \"active\": false,\n \"created\": \"\",\n \"id\": \"\",\n \"index\": 0,\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"scope\": \"\",\n \"selfLink\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.patch('/baseUrl/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions/:customDimensionId') do |req|
req.body = "{\n \"accountId\": \"\",\n \"active\": false,\n \"created\": \"\",\n \"id\": \"\",\n \"index\": 0,\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"scope\": \"\",\n \"selfLink\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\"\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}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions/:customDimensionId";
let payload = json!({
"accountId": "",
"active": false,
"created": "",
"id": "",
"index": 0,
"kind": "",
"name": "",
"parentLink": json!({
"href": "",
"type": ""
}),
"scope": "",
"selfLink": "",
"updated": "",
"webPropertyId": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PATCH").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PATCH \
--url {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions/:customDimensionId \
--header 'content-type: application/json' \
--data '{
"accountId": "",
"active": false,
"created": "",
"id": "",
"index": 0,
"kind": "",
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"scope": "",
"selfLink": "",
"updated": "",
"webPropertyId": ""
}'
echo '{
"accountId": "",
"active": false,
"created": "",
"id": "",
"index": 0,
"kind": "",
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"scope": "",
"selfLink": "",
"updated": "",
"webPropertyId": ""
}' | \
http PATCH {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions/:customDimensionId \
content-type:application/json
wget --quiet \
--method PATCH \
--header 'content-type: application/json' \
--body-data '{\n "accountId": "",\n "active": false,\n "created": "",\n "id": "",\n "index": 0,\n "kind": "",\n "name": "",\n "parentLink": {\n "href": "",\n "type": ""\n },\n "scope": "",\n "selfLink": "",\n "updated": "",\n "webPropertyId": ""\n}' \
--output-document \
- {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions/:customDimensionId
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"accountId": "",
"active": false,
"created": "",
"id": "",
"index": 0,
"kind": "",
"name": "",
"parentLink": [
"href": "",
"type": ""
],
"scope": "",
"selfLink": "",
"updated": "",
"webPropertyId": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions/:customDimensionId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PUT
analytics.management.customDimensions.update
{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions/:customDimensionId
QUERY PARAMS
accountId
webPropertyId
customDimensionId
BODY json
{
"accountId": "",
"active": false,
"created": "",
"id": "",
"index": 0,
"kind": "",
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"scope": "",
"selfLink": "",
"updated": "",
"webPropertyId": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions/:customDimensionId");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"accountId\": \"\",\n \"active\": false,\n \"created\": \"\",\n \"id\": \"\",\n \"index\": 0,\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"scope\": \"\",\n \"selfLink\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions/:customDimensionId" {:content-type :json
:form-params {:accountId ""
:active false
:created ""
:id ""
:index 0
:kind ""
:name ""
:parentLink {:href ""
:type ""}
:scope ""
:selfLink ""
:updated ""
:webPropertyId ""}})
require "http/client"
url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions/:customDimensionId"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"accountId\": \"\",\n \"active\": false,\n \"created\": \"\",\n \"id\": \"\",\n \"index\": 0,\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"scope\": \"\",\n \"selfLink\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\"\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}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions/:customDimensionId"),
Content = new StringContent("{\n \"accountId\": \"\",\n \"active\": false,\n \"created\": \"\",\n \"id\": \"\",\n \"index\": 0,\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"scope\": \"\",\n \"selfLink\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\"\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}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions/:customDimensionId");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"accountId\": \"\",\n \"active\": false,\n \"created\": \"\",\n \"id\": \"\",\n \"index\": 0,\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"scope\": \"\",\n \"selfLink\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions/:customDimensionId"
payload := strings.NewReader("{\n \"accountId\": \"\",\n \"active\": false,\n \"created\": \"\",\n \"id\": \"\",\n \"index\": 0,\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"scope\": \"\",\n \"selfLink\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\"\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/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions/:customDimensionId HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 238
{
"accountId": "",
"active": false,
"created": "",
"id": "",
"index": 0,
"kind": "",
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"scope": "",
"selfLink": "",
"updated": "",
"webPropertyId": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions/:customDimensionId")
.setHeader("content-type", "application/json")
.setBody("{\n \"accountId\": \"\",\n \"active\": false,\n \"created\": \"\",\n \"id\": \"\",\n \"index\": 0,\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"scope\": \"\",\n \"selfLink\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions/:customDimensionId"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"accountId\": \"\",\n \"active\": false,\n \"created\": \"\",\n \"id\": \"\",\n \"index\": 0,\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"scope\": \"\",\n \"selfLink\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"accountId\": \"\",\n \"active\": false,\n \"created\": \"\",\n \"id\": \"\",\n \"index\": 0,\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"scope\": \"\",\n \"selfLink\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions/:customDimensionId")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions/:customDimensionId")
.header("content-type", "application/json")
.body("{\n \"accountId\": \"\",\n \"active\": false,\n \"created\": \"\",\n \"id\": \"\",\n \"index\": 0,\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"scope\": \"\",\n \"selfLink\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\"\n}")
.asString();
const data = JSON.stringify({
accountId: '',
active: false,
created: '',
id: '',
index: 0,
kind: '',
name: '',
parentLink: {
href: '',
type: ''
},
scope: '',
selfLink: '',
updated: '',
webPropertyId: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions/:customDimensionId');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions/:customDimensionId',
headers: {'content-type': 'application/json'},
data: {
accountId: '',
active: false,
created: '',
id: '',
index: 0,
kind: '',
name: '',
parentLink: {href: '', type: ''},
scope: '',
selfLink: '',
updated: '',
webPropertyId: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions/:customDimensionId';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"accountId":"","active":false,"created":"","id":"","index":0,"kind":"","name":"","parentLink":{"href":"","type":""},"scope":"","selfLink":"","updated":"","webPropertyId":""}'
};
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}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions/:customDimensionId',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "accountId": "",\n "active": false,\n "created": "",\n "id": "",\n "index": 0,\n "kind": "",\n "name": "",\n "parentLink": {\n "href": "",\n "type": ""\n },\n "scope": "",\n "selfLink": "",\n "updated": "",\n "webPropertyId": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"accountId\": \"\",\n \"active\": false,\n \"created\": \"\",\n \"id\": \"\",\n \"index\": 0,\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"scope\": \"\",\n \"selfLink\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions/:customDimensionId")
.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/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions/:customDimensionId',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
accountId: '',
active: false,
created: '',
id: '',
index: 0,
kind: '',
name: '',
parentLink: {href: '', type: ''},
scope: '',
selfLink: '',
updated: '',
webPropertyId: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions/:customDimensionId',
headers: {'content-type': 'application/json'},
body: {
accountId: '',
active: false,
created: '',
id: '',
index: 0,
kind: '',
name: '',
parentLink: {href: '', type: ''},
scope: '',
selfLink: '',
updated: '',
webPropertyId: ''
},
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}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions/:customDimensionId');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
accountId: '',
active: false,
created: '',
id: '',
index: 0,
kind: '',
name: '',
parentLink: {
href: '',
type: ''
},
scope: '',
selfLink: '',
updated: '',
webPropertyId: ''
});
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}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions/:customDimensionId',
headers: {'content-type': 'application/json'},
data: {
accountId: '',
active: false,
created: '',
id: '',
index: 0,
kind: '',
name: '',
parentLink: {href: '', type: ''},
scope: '',
selfLink: '',
updated: '',
webPropertyId: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions/:customDimensionId';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"accountId":"","active":false,"created":"","id":"","index":0,"kind":"","name":"","parentLink":{"href":"","type":""},"scope":"","selfLink":"","updated":"","webPropertyId":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"accountId": @"",
@"active": @NO,
@"created": @"",
@"id": @"",
@"index": @0,
@"kind": @"",
@"name": @"",
@"parentLink": @{ @"href": @"", @"type": @"" },
@"scope": @"",
@"selfLink": @"",
@"updated": @"",
@"webPropertyId": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions/:customDimensionId"]
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}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions/:customDimensionId" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"accountId\": \"\",\n \"active\": false,\n \"created\": \"\",\n \"id\": \"\",\n \"index\": 0,\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"scope\": \"\",\n \"selfLink\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\"\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions/:customDimensionId",
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([
'accountId' => '',
'active' => null,
'created' => '',
'id' => '',
'index' => 0,
'kind' => '',
'name' => '',
'parentLink' => [
'href' => '',
'type' => ''
],
'scope' => '',
'selfLink' => '',
'updated' => '',
'webPropertyId' => ''
]),
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}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions/:customDimensionId', [
'body' => '{
"accountId": "",
"active": false,
"created": "",
"id": "",
"index": 0,
"kind": "",
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"scope": "",
"selfLink": "",
"updated": "",
"webPropertyId": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions/:customDimensionId');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'accountId' => '',
'active' => null,
'created' => '',
'id' => '',
'index' => 0,
'kind' => '',
'name' => '',
'parentLink' => [
'href' => '',
'type' => ''
],
'scope' => '',
'selfLink' => '',
'updated' => '',
'webPropertyId' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'accountId' => '',
'active' => null,
'created' => '',
'id' => '',
'index' => 0,
'kind' => '',
'name' => '',
'parentLink' => [
'href' => '',
'type' => ''
],
'scope' => '',
'selfLink' => '',
'updated' => '',
'webPropertyId' => ''
]));
$request->setRequestUrl('{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions/:customDimensionId');
$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}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions/:customDimensionId' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"accountId": "",
"active": false,
"created": "",
"id": "",
"index": 0,
"kind": "",
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"scope": "",
"selfLink": "",
"updated": "",
"webPropertyId": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions/:customDimensionId' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"accountId": "",
"active": false,
"created": "",
"id": "",
"index": 0,
"kind": "",
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"scope": "",
"selfLink": "",
"updated": "",
"webPropertyId": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"accountId\": \"\",\n \"active\": false,\n \"created\": \"\",\n \"id\": \"\",\n \"index\": 0,\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"scope\": \"\",\n \"selfLink\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions/:customDimensionId", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions/:customDimensionId"
payload = {
"accountId": "",
"active": False,
"created": "",
"id": "",
"index": 0,
"kind": "",
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"scope": "",
"selfLink": "",
"updated": "",
"webPropertyId": ""
}
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions/:customDimensionId"
payload <- "{\n \"accountId\": \"\",\n \"active\": false,\n \"created\": \"\",\n \"id\": \"\",\n \"index\": 0,\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"scope\": \"\",\n \"selfLink\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\"\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}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions/:customDimensionId")
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 \"accountId\": \"\",\n \"active\": false,\n \"created\": \"\",\n \"id\": \"\",\n \"index\": 0,\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"scope\": \"\",\n \"selfLink\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\"\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/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions/:customDimensionId') do |req|
req.body = "{\n \"accountId\": \"\",\n \"active\": false,\n \"created\": \"\",\n \"id\": \"\",\n \"index\": 0,\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"scope\": \"\",\n \"selfLink\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\"\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}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions/:customDimensionId";
let payload = json!({
"accountId": "",
"active": false,
"created": "",
"id": "",
"index": 0,
"kind": "",
"name": "",
"parentLink": json!({
"href": "",
"type": ""
}),
"scope": "",
"selfLink": "",
"updated": "",
"webPropertyId": ""
});
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}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions/:customDimensionId \
--header 'content-type: application/json' \
--data '{
"accountId": "",
"active": false,
"created": "",
"id": "",
"index": 0,
"kind": "",
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"scope": "",
"selfLink": "",
"updated": "",
"webPropertyId": ""
}'
echo '{
"accountId": "",
"active": false,
"created": "",
"id": "",
"index": 0,
"kind": "",
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"scope": "",
"selfLink": "",
"updated": "",
"webPropertyId": ""
}' | \
http PUT {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions/:customDimensionId \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '{\n "accountId": "",\n "active": false,\n "created": "",\n "id": "",\n "index": 0,\n "kind": "",\n "name": "",\n "parentLink": {\n "href": "",\n "type": ""\n },\n "scope": "",\n "selfLink": "",\n "updated": "",\n "webPropertyId": ""\n}' \
--output-document \
- {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions/:customDimensionId
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"accountId": "",
"active": false,
"created": "",
"id": "",
"index": 0,
"kind": "",
"name": "",
"parentLink": [
"href": "",
"type": ""
],
"scope": "",
"selfLink": "",
"updated": "",
"webPropertyId": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDimensions/:customDimensionId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
analytics.management.customMetrics.get
{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics/:customMetricId
QUERY PARAMS
accountId
webPropertyId
customMetricId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics/:customMetricId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics/:customMetricId")
require "http/client"
url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics/:customMetricId"
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}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics/:customMetricId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics/:customMetricId");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics/:customMetricId"
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/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics/:customMetricId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics/:customMetricId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics/:customMetricId"))
.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}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics/:customMetricId")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics/:customMetricId")
.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}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics/:customMetricId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics/:customMetricId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics/:customMetricId';
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}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics/:customMetricId',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics/:customMetricId")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics/:customMetricId',
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}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics/:customMetricId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics/:customMetricId');
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}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics/:customMetricId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics/:customMetricId';
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}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics/:customMetricId"]
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}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics/:customMetricId" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics/:customMetricId",
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}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics/:customMetricId');
echo $response->getBody();
setUrl('{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics/:customMetricId');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics/:customMetricId');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics/:customMetricId' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics/:customMetricId' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics/:customMetricId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics/:customMetricId"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics/:customMetricId"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics/:customMetricId")
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/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics/:customMetricId') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics/:customMetricId";
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}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics/:customMetricId
http GET {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics/:customMetricId
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics/:customMetricId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics/:customMetricId")! 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
analytics.management.customMetrics.insert
{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics
QUERY PARAMS
accountId
webPropertyId
BODY json
{
"accountId": "",
"active": false,
"created": "",
"id": "",
"index": 0,
"kind": "",
"max_value": "",
"min_value": "",
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"scope": "",
"selfLink": "",
"type": "",
"updated": "",
"webPropertyId": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"accountId\": \"\",\n \"active\": false,\n \"created\": \"\",\n \"id\": \"\",\n \"index\": 0,\n \"kind\": \"\",\n \"max_value\": \"\",\n \"min_value\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"scope\": \"\",\n \"selfLink\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics" {:content-type :json
:form-params {:accountId ""
:active false
:created ""
:id ""
:index 0
:kind ""
:max_value ""
:min_value ""
:name ""
:parentLink {:href ""
:type ""}
:scope ""
:selfLink ""
:type ""
:updated ""
:webPropertyId ""}})
require "http/client"
url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"accountId\": \"\",\n \"active\": false,\n \"created\": \"\",\n \"id\": \"\",\n \"index\": 0,\n \"kind\": \"\",\n \"max_value\": \"\",\n \"min_value\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"scope\": \"\",\n \"selfLink\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\"\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}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics"),
Content = new StringContent("{\n \"accountId\": \"\",\n \"active\": false,\n \"created\": \"\",\n \"id\": \"\",\n \"index\": 0,\n \"kind\": \"\",\n \"max_value\": \"\",\n \"min_value\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"scope\": \"\",\n \"selfLink\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\"\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}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"accountId\": \"\",\n \"active\": false,\n \"created\": \"\",\n \"id\": \"\",\n \"index\": 0,\n \"kind\": \"\",\n \"max_value\": \"\",\n \"min_value\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"scope\": \"\",\n \"selfLink\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics"
payload := strings.NewReader("{\n \"accountId\": \"\",\n \"active\": false,\n \"created\": \"\",\n \"id\": \"\",\n \"index\": 0,\n \"kind\": \"\",\n \"max_value\": \"\",\n \"min_value\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"scope\": \"\",\n \"selfLink\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\"\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/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 290
{
"accountId": "",
"active": false,
"created": "",
"id": "",
"index": 0,
"kind": "",
"max_value": "",
"min_value": "",
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"scope": "",
"selfLink": "",
"type": "",
"updated": "",
"webPropertyId": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics")
.setHeader("content-type", "application/json")
.setBody("{\n \"accountId\": \"\",\n \"active\": false,\n \"created\": \"\",\n \"id\": \"\",\n \"index\": 0,\n \"kind\": \"\",\n \"max_value\": \"\",\n \"min_value\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"scope\": \"\",\n \"selfLink\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"accountId\": \"\",\n \"active\": false,\n \"created\": \"\",\n \"id\": \"\",\n \"index\": 0,\n \"kind\": \"\",\n \"max_value\": \"\",\n \"min_value\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"scope\": \"\",\n \"selfLink\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"accountId\": \"\",\n \"active\": false,\n \"created\": \"\",\n \"id\": \"\",\n \"index\": 0,\n \"kind\": \"\",\n \"max_value\": \"\",\n \"min_value\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"scope\": \"\",\n \"selfLink\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics")
.header("content-type", "application/json")
.body("{\n \"accountId\": \"\",\n \"active\": false,\n \"created\": \"\",\n \"id\": \"\",\n \"index\": 0,\n \"kind\": \"\",\n \"max_value\": \"\",\n \"min_value\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"scope\": \"\",\n \"selfLink\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\"\n}")
.asString();
const data = JSON.stringify({
accountId: '',
active: false,
created: '',
id: '',
index: 0,
kind: '',
max_value: '',
min_value: '',
name: '',
parentLink: {
href: '',
type: ''
},
scope: '',
selfLink: '',
type: '',
updated: '',
webPropertyId: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics',
headers: {'content-type': 'application/json'},
data: {
accountId: '',
active: false,
created: '',
id: '',
index: 0,
kind: '',
max_value: '',
min_value: '',
name: '',
parentLink: {href: '', type: ''},
scope: '',
selfLink: '',
type: '',
updated: '',
webPropertyId: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"accountId":"","active":false,"created":"","id":"","index":0,"kind":"","max_value":"","min_value":"","name":"","parentLink":{"href":"","type":""},"scope":"","selfLink":"","type":"","updated":"","webPropertyId":""}'
};
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}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "accountId": "",\n "active": false,\n "created": "",\n "id": "",\n "index": 0,\n "kind": "",\n "max_value": "",\n "min_value": "",\n "name": "",\n "parentLink": {\n "href": "",\n "type": ""\n },\n "scope": "",\n "selfLink": "",\n "type": "",\n "updated": "",\n "webPropertyId": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"accountId\": \"\",\n \"active\": false,\n \"created\": \"\",\n \"id\": \"\",\n \"index\": 0,\n \"kind\": \"\",\n \"max_value\": \"\",\n \"min_value\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"scope\": \"\",\n \"selfLink\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics")
.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/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
accountId: '',
active: false,
created: '',
id: '',
index: 0,
kind: '',
max_value: '',
min_value: '',
name: '',
parentLink: {href: '', type: ''},
scope: '',
selfLink: '',
type: '',
updated: '',
webPropertyId: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics',
headers: {'content-type': 'application/json'},
body: {
accountId: '',
active: false,
created: '',
id: '',
index: 0,
kind: '',
max_value: '',
min_value: '',
name: '',
parentLink: {href: '', type: ''},
scope: '',
selfLink: '',
type: '',
updated: '',
webPropertyId: ''
},
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}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
accountId: '',
active: false,
created: '',
id: '',
index: 0,
kind: '',
max_value: '',
min_value: '',
name: '',
parentLink: {
href: '',
type: ''
},
scope: '',
selfLink: '',
type: '',
updated: '',
webPropertyId: ''
});
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}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics',
headers: {'content-type': 'application/json'},
data: {
accountId: '',
active: false,
created: '',
id: '',
index: 0,
kind: '',
max_value: '',
min_value: '',
name: '',
parentLink: {href: '', type: ''},
scope: '',
selfLink: '',
type: '',
updated: '',
webPropertyId: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"accountId":"","active":false,"created":"","id":"","index":0,"kind":"","max_value":"","min_value":"","name":"","parentLink":{"href":"","type":""},"scope":"","selfLink":"","type":"","updated":"","webPropertyId":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"accountId": @"",
@"active": @NO,
@"created": @"",
@"id": @"",
@"index": @0,
@"kind": @"",
@"max_value": @"",
@"min_value": @"",
@"name": @"",
@"parentLink": @{ @"href": @"", @"type": @"" },
@"scope": @"",
@"selfLink": @"",
@"type": @"",
@"updated": @"",
@"webPropertyId": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics"]
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}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"accountId\": \"\",\n \"active\": false,\n \"created\": \"\",\n \"id\": \"\",\n \"index\": 0,\n \"kind\": \"\",\n \"max_value\": \"\",\n \"min_value\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"scope\": \"\",\n \"selfLink\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'accountId' => '',
'active' => null,
'created' => '',
'id' => '',
'index' => 0,
'kind' => '',
'max_value' => '',
'min_value' => '',
'name' => '',
'parentLink' => [
'href' => '',
'type' => ''
],
'scope' => '',
'selfLink' => '',
'type' => '',
'updated' => '',
'webPropertyId' => ''
]),
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}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics', [
'body' => '{
"accountId": "",
"active": false,
"created": "",
"id": "",
"index": 0,
"kind": "",
"max_value": "",
"min_value": "",
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"scope": "",
"selfLink": "",
"type": "",
"updated": "",
"webPropertyId": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'accountId' => '',
'active' => null,
'created' => '',
'id' => '',
'index' => 0,
'kind' => '',
'max_value' => '',
'min_value' => '',
'name' => '',
'parentLink' => [
'href' => '',
'type' => ''
],
'scope' => '',
'selfLink' => '',
'type' => '',
'updated' => '',
'webPropertyId' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'accountId' => '',
'active' => null,
'created' => '',
'id' => '',
'index' => 0,
'kind' => '',
'max_value' => '',
'min_value' => '',
'name' => '',
'parentLink' => [
'href' => '',
'type' => ''
],
'scope' => '',
'selfLink' => '',
'type' => '',
'updated' => '',
'webPropertyId' => ''
]));
$request->setRequestUrl('{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics');
$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}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"accountId": "",
"active": false,
"created": "",
"id": "",
"index": 0,
"kind": "",
"max_value": "",
"min_value": "",
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"scope": "",
"selfLink": "",
"type": "",
"updated": "",
"webPropertyId": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"accountId": "",
"active": false,
"created": "",
"id": "",
"index": 0,
"kind": "",
"max_value": "",
"min_value": "",
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"scope": "",
"selfLink": "",
"type": "",
"updated": "",
"webPropertyId": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"accountId\": \"\",\n \"active\": false,\n \"created\": \"\",\n \"id\": \"\",\n \"index\": 0,\n \"kind\": \"\",\n \"max_value\": \"\",\n \"min_value\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"scope\": \"\",\n \"selfLink\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics"
payload = {
"accountId": "",
"active": False,
"created": "",
"id": "",
"index": 0,
"kind": "",
"max_value": "",
"min_value": "",
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"scope": "",
"selfLink": "",
"type": "",
"updated": "",
"webPropertyId": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics"
payload <- "{\n \"accountId\": \"\",\n \"active\": false,\n \"created\": \"\",\n \"id\": \"\",\n \"index\": 0,\n \"kind\": \"\",\n \"max_value\": \"\",\n \"min_value\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"scope\": \"\",\n \"selfLink\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\"\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}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"accountId\": \"\",\n \"active\": false,\n \"created\": \"\",\n \"id\": \"\",\n \"index\": 0,\n \"kind\": \"\",\n \"max_value\": \"\",\n \"min_value\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"scope\": \"\",\n \"selfLink\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\"\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/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics') do |req|
req.body = "{\n \"accountId\": \"\",\n \"active\": false,\n \"created\": \"\",\n \"id\": \"\",\n \"index\": 0,\n \"kind\": \"\",\n \"max_value\": \"\",\n \"min_value\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"scope\": \"\",\n \"selfLink\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics";
let payload = json!({
"accountId": "",
"active": false,
"created": "",
"id": "",
"index": 0,
"kind": "",
"max_value": "",
"min_value": "",
"name": "",
"parentLink": json!({
"href": "",
"type": ""
}),
"scope": "",
"selfLink": "",
"type": "",
"updated": "",
"webPropertyId": ""
});
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}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics \
--header 'content-type: application/json' \
--data '{
"accountId": "",
"active": false,
"created": "",
"id": "",
"index": 0,
"kind": "",
"max_value": "",
"min_value": "",
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"scope": "",
"selfLink": "",
"type": "",
"updated": "",
"webPropertyId": ""
}'
echo '{
"accountId": "",
"active": false,
"created": "",
"id": "",
"index": 0,
"kind": "",
"max_value": "",
"min_value": "",
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"scope": "",
"selfLink": "",
"type": "",
"updated": "",
"webPropertyId": ""
}' | \
http POST {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "accountId": "",\n "active": false,\n "created": "",\n "id": "",\n "index": 0,\n "kind": "",\n "max_value": "",\n "min_value": "",\n "name": "",\n "parentLink": {\n "href": "",\n "type": ""\n },\n "scope": "",\n "selfLink": "",\n "type": "",\n "updated": "",\n "webPropertyId": ""\n}' \
--output-document \
- {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"accountId": "",
"active": false,
"created": "",
"id": "",
"index": 0,
"kind": "",
"max_value": "",
"min_value": "",
"name": "",
"parentLink": [
"href": "",
"type": ""
],
"scope": "",
"selfLink": "",
"type": "",
"updated": "",
"webPropertyId": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics")! 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
analytics.management.customMetrics.list
{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics
QUERY PARAMS
accountId
webPropertyId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics")
require "http/client"
url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics"
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}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics"
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/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics"))
.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}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics")
.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}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics';
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}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics',
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}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics');
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}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics';
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}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics"]
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}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics",
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}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics');
echo $response->getBody();
setUrl('{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics")
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/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics";
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}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics
http GET {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PATCH
analytics.management.customMetrics.patch
{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics/:customMetricId
QUERY PARAMS
accountId
webPropertyId
customMetricId
BODY json
{
"accountId": "",
"active": false,
"created": "",
"id": "",
"index": 0,
"kind": "",
"max_value": "",
"min_value": "",
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"scope": "",
"selfLink": "",
"type": "",
"updated": "",
"webPropertyId": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics/:customMetricId");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"accountId\": \"\",\n \"active\": false,\n \"created\": \"\",\n \"id\": \"\",\n \"index\": 0,\n \"kind\": \"\",\n \"max_value\": \"\",\n \"min_value\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"scope\": \"\",\n \"selfLink\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/patch "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics/:customMetricId" {:content-type :json
:form-params {:accountId ""
:active false
:created ""
:id ""
:index 0
:kind ""
:max_value ""
:min_value ""
:name ""
:parentLink {:href ""
:type ""}
:scope ""
:selfLink ""
:type ""
:updated ""
:webPropertyId ""}})
require "http/client"
url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics/:customMetricId"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"accountId\": \"\",\n \"active\": false,\n \"created\": \"\",\n \"id\": \"\",\n \"index\": 0,\n \"kind\": \"\",\n \"max_value\": \"\",\n \"min_value\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"scope\": \"\",\n \"selfLink\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\"\n}"
response = HTTP::Client.patch url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Patch,
RequestUri = new Uri("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics/:customMetricId"),
Content = new StringContent("{\n \"accountId\": \"\",\n \"active\": false,\n \"created\": \"\",\n \"id\": \"\",\n \"index\": 0,\n \"kind\": \"\",\n \"max_value\": \"\",\n \"min_value\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"scope\": \"\",\n \"selfLink\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\"\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}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics/:customMetricId");
var request = new RestRequest("", Method.Patch);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"accountId\": \"\",\n \"active\": false,\n \"created\": \"\",\n \"id\": \"\",\n \"index\": 0,\n \"kind\": \"\",\n \"max_value\": \"\",\n \"min_value\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"scope\": \"\",\n \"selfLink\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics/:customMetricId"
payload := strings.NewReader("{\n \"accountId\": \"\",\n \"active\": false,\n \"created\": \"\",\n \"id\": \"\",\n \"index\": 0,\n \"kind\": \"\",\n \"max_value\": \"\",\n \"min_value\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"scope\": \"\",\n \"selfLink\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
PATCH /baseUrl/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics/:customMetricId HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 290
{
"accountId": "",
"active": false,
"created": "",
"id": "",
"index": 0,
"kind": "",
"max_value": "",
"min_value": "",
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"scope": "",
"selfLink": "",
"type": "",
"updated": "",
"webPropertyId": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics/:customMetricId")
.setHeader("content-type", "application/json")
.setBody("{\n \"accountId\": \"\",\n \"active\": false,\n \"created\": \"\",\n \"id\": \"\",\n \"index\": 0,\n \"kind\": \"\",\n \"max_value\": \"\",\n \"min_value\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"scope\": \"\",\n \"selfLink\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics/:customMetricId"))
.header("content-type", "application/json")
.method("PATCH", HttpRequest.BodyPublishers.ofString("{\n \"accountId\": \"\",\n \"active\": false,\n \"created\": \"\",\n \"id\": \"\",\n \"index\": 0,\n \"kind\": \"\",\n \"max_value\": \"\",\n \"min_value\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"scope\": \"\",\n \"selfLink\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"accountId\": \"\",\n \"active\": false,\n \"created\": \"\",\n \"id\": \"\",\n \"index\": 0,\n \"kind\": \"\",\n \"max_value\": \"\",\n \"min_value\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"scope\": \"\",\n \"selfLink\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics/:customMetricId")
.patch(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics/:customMetricId")
.header("content-type", "application/json")
.body("{\n \"accountId\": \"\",\n \"active\": false,\n \"created\": \"\",\n \"id\": \"\",\n \"index\": 0,\n \"kind\": \"\",\n \"max_value\": \"\",\n \"min_value\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"scope\": \"\",\n \"selfLink\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\"\n}")
.asString();
const data = JSON.stringify({
accountId: '',
active: false,
created: '',
id: '',
index: 0,
kind: '',
max_value: '',
min_value: '',
name: '',
parentLink: {
href: '',
type: ''
},
scope: '',
selfLink: '',
type: '',
updated: '',
webPropertyId: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PATCH', '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics/:customMetricId');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PATCH',
url: '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics/:customMetricId',
headers: {'content-type': 'application/json'},
data: {
accountId: '',
active: false,
created: '',
id: '',
index: 0,
kind: '',
max_value: '',
min_value: '',
name: '',
parentLink: {href: '', type: ''},
scope: '',
selfLink: '',
type: '',
updated: '',
webPropertyId: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics/:customMetricId';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"accountId":"","active":false,"created":"","id":"","index":0,"kind":"","max_value":"","min_value":"","name":"","parentLink":{"href":"","type":""},"scope":"","selfLink":"","type":"","updated":"","webPropertyId":""}'
};
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}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics/:customMetricId',
method: 'PATCH',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "accountId": "",\n "active": false,\n "created": "",\n "id": "",\n "index": 0,\n "kind": "",\n "max_value": "",\n "min_value": "",\n "name": "",\n "parentLink": {\n "href": "",\n "type": ""\n },\n "scope": "",\n "selfLink": "",\n "type": "",\n "updated": "",\n "webPropertyId": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"accountId\": \"\",\n \"active\": false,\n \"created\": \"\",\n \"id\": \"\",\n \"index\": 0,\n \"kind\": \"\",\n \"max_value\": \"\",\n \"min_value\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"scope\": \"\",\n \"selfLink\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics/:customMetricId")
.patch(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PATCH',
hostname: 'example.com',
port: null,
path: '/baseUrl/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics/:customMetricId',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
accountId: '',
active: false,
created: '',
id: '',
index: 0,
kind: '',
max_value: '',
min_value: '',
name: '',
parentLink: {href: '', type: ''},
scope: '',
selfLink: '',
type: '',
updated: '',
webPropertyId: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PATCH',
url: '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics/:customMetricId',
headers: {'content-type': 'application/json'},
body: {
accountId: '',
active: false,
created: '',
id: '',
index: 0,
kind: '',
max_value: '',
min_value: '',
name: '',
parentLink: {href: '', type: ''},
scope: '',
selfLink: '',
type: '',
updated: '',
webPropertyId: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PATCH', '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics/:customMetricId');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
accountId: '',
active: false,
created: '',
id: '',
index: 0,
kind: '',
max_value: '',
min_value: '',
name: '',
parentLink: {
href: '',
type: ''
},
scope: '',
selfLink: '',
type: '',
updated: '',
webPropertyId: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PATCH',
url: '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics/:customMetricId',
headers: {'content-type': 'application/json'},
data: {
accountId: '',
active: false,
created: '',
id: '',
index: 0,
kind: '',
max_value: '',
min_value: '',
name: '',
parentLink: {href: '', type: ''},
scope: '',
selfLink: '',
type: '',
updated: '',
webPropertyId: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics/:customMetricId';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"accountId":"","active":false,"created":"","id":"","index":0,"kind":"","max_value":"","min_value":"","name":"","parentLink":{"href":"","type":""},"scope":"","selfLink":"","type":"","updated":"","webPropertyId":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"accountId": @"",
@"active": @NO,
@"created": @"",
@"id": @"",
@"index": @0,
@"kind": @"",
@"max_value": @"",
@"min_value": @"",
@"name": @"",
@"parentLink": @{ @"href": @"", @"type": @"" },
@"scope": @"",
@"selfLink": @"",
@"type": @"",
@"updated": @"",
@"webPropertyId": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics/:customMetricId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PATCH"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics/:customMetricId" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"accountId\": \"\",\n \"active\": false,\n \"created\": \"\",\n \"id\": \"\",\n \"index\": 0,\n \"kind\": \"\",\n \"max_value\": \"\",\n \"min_value\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"scope\": \"\",\n \"selfLink\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\"\n}" in
Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics/:customMetricId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'accountId' => '',
'active' => null,
'created' => '',
'id' => '',
'index' => 0,
'kind' => '',
'max_value' => '',
'min_value' => '',
'name' => '',
'parentLink' => [
'href' => '',
'type' => ''
],
'scope' => '',
'selfLink' => '',
'type' => '',
'updated' => '',
'webPropertyId' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PATCH', '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics/:customMetricId', [
'body' => '{
"accountId": "",
"active": false,
"created": "",
"id": "",
"index": 0,
"kind": "",
"max_value": "",
"min_value": "",
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"scope": "",
"selfLink": "",
"type": "",
"updated": "",
"webPropertyId": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics/:customMetricId');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'accountId' => '',
'active' => null,
'created' => '',
'id' => '',
'index' => 0,
'kind' => '',
'max_value' => '',
'min_value' => '',
'name' => '',
'parentLink' => [
'href' => '',
'type' => ''
],
'scope' => '',
'selfLink' => '',
'type' => '',
'updated' => '',
'webPropertyId' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'accountId' => '',
'active' => null,
'created' => '',
'id' => '',
'index' => 0,
'kind' => '',
'max_value' => '',
'min_value' => '',
'name' => '',
'parentLink' => [
'href' => '',
'type' => ''
],
'scope' => '',
'selfLink' => '',
'type' => '',
'updated' => '',
'webPropertyId' => ''
]));
$request->setRequestUrl('{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics/:customMetricId');
$request->setRequestMethod('PATCH');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics/:customMetricId' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"accountId": "",
"active": false,
"created": "",
"id": "",
"index": 0,
"kind": "",
"max_value": "",
"min_value": "",
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"scope": "",
"selfLink": "",
"type": "",
"updated": "",
"webPropertyId": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics/:customMetricId' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"accountId": "",
"active": false,
"created": "",
"id": "",
"index": 0,
"kind": "",
"max_value": "",
"min_value": "",
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"scope": "",
"selfLink": "",
"type": "",
"updated": "",
"webPropertyId": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"accountId\": \"\",\n \"active\": false,\n \"created\": \"\",\n \"id\": \"\",\n \"index\": 0,\n \"kind\": \"\",\n \"max_value\": \"\",\n \"min_value\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"scope\": \"\",\n \"selfLink\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("PATCH", "/baseUrl/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics/:customMetricId", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics/:customMetricId"
payload = {
"accountId": "",
"active": False,
"created": "",
"id": "",
"index": 0,
"kind": "",
"max_value": "",
"min_value": "",
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"scope": "",
"selfLink": "",
"type": "",
"updated": "",
"webPropertyId": ""
}
headers = {"content-type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics/:customMetricId"
payload <- "{\n \"accountId\": \"\",\n \"active\": false,\n \"created\": \"\",\n \"id\": \"\",\n \"index\": 0,\n \"kind\": \"\",\n \"max_value\": \"\",\n \"min_value\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"scope\": \"\",\n \"selfLink\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\"\n}"
encode <- "json"
response <- VERB("PATCH", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics/:customMetricId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"accountId\": \"\",\n \"active\": false,\n \"created\": \"\",\n \"id\": \"\",\n \"index\": 0,\n \"kind\": \"\",\n \"max_value\": \"\",\n \"min_value\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"scope\": \"\",\n \"selfLink\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.patch('/baseUrl/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics/:customMetricId') do |req|
req.body = "{\n \"accountId\": \"\",\n \"active\": false,\n \"created\": \"\",\n \"id\": \"\",\n \"index\": 0,\n \"kind\": \"\",\n \"max_value\": \"\",\n \"min_value\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"scope\": \"\",\n \"selfLink\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\"\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}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics/:customMetricId";
let payload = json!({
"accountId": "",
"active": false,
"created": "",
"id": "",
"index": 0,
"kind": "",
"max_value": "",
"min_value": "",
"name": "",
"parentLink": json!({
"href": "",
"type": ""
}),
"scope": "",
"selfLink": "",
"type": "",
"updated": "",
"webPropertyId": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PATCH").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PATCH \
--url {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics/:customMetricId \
--header 'content-type: application/json' \
--data '{
"accountId": "",
"active": false,
"created": "",
"id": "",
"index": 0,
"kind": "",
"max_value": "",
"min_value": "",
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"scope": "",
"selfLink": "",
"type": "",
"updated": "",
"webPropertyId": ""
}'
echo '{
"accountId": "",
"active": false,
"created": "",
"id": "",
"index": 0,
"kind": "",
"max_value": "",
"min_value": "",
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"scope": "",
"selfLink": "",
"type": "",
"updated": "",
"webPropertyId": ""
}' | \
http PATCH {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics/:customMetricId \
content-type:application/json
wget --quiet \
--method PATCH \
--header 'content-type: application/json' \
--body-data '{\n "accountId": "",\n "active": false,\n "created": "",\n "id": "",\n "index": 0,\n "kind": "",\n "max_value": "",\n "min_value": "",\n "name": "",\n "parentLink": {\n "href": "",\n "type": ""\n },\n "scope": "",\n "selfLink": "",\n "type": "",\n "updated": "",\n "webPropertyId": ""\n}' \
--output-document \
- {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics/:customMetricId
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"accountId": "",
"active": false,
"created": "",
"id": "",
"index": 0,
"kind": "",
"max_value": "",
"min_value": "",
"name": "",
"parentLink": [
"href": "",
"type": ""
],
"scope": "",
"selfLink": "",
"type": "",
"updated": "",
"webPropertyId": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics/:customMetricId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PUT
analytics.management.customMetrics.update
{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics/:customMetricId
QUERY PARAMS
accountId
webPropertyId
customMetricId
BODY json
{
"accountId": "",
"active": false,
"created": "",
"id": "",
"index": 0,
"kind": "",
"max_value": "",
"min_value": "",
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"scope": "",
"selfLink": "",
"type": "",
"updated": "",
"webPropertyId": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics/:customMetricId");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"accountId\": \"\",\n \"active\": false,\n \"created\": \"\",\n \"id\": \"\",\n \"index\": 0,\n \"kind\": \"\",\n \"max_value\": \"\",\n \"min_value\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"scope\": \"\",\n \"selfLink\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics/:customMetricId" {:content-type :json
:form-params {:accountId ""
:active false
:created ""
:id ""
:index 0
:kind ""
:max_value ""
:min_value ""
:name ""
:parentLink {:href ""
:type ""}
:scope ""
:selfLink ""
:type ""
:updated ""
:webPropertyId ""}})
require "http/client"
url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics/:customMetricId"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"accountId\": \"\",\n \"active\": false,\n \"created\": \"\",\n \"id\": \"\",\n \"index\": 0,\n \"kind\": \"\",\n \"max_value\": \"\",\n \"min_value\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"scope\": \"\",\n \"selfLink\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\"\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}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics/:customMetricId"),
Content = new StringContent("{\n \"accountId\": \"\",\n \"active\": false,\n \"created\": \"\",\n \"id\": \"\",\n \"index\": 0,\n \"kind\": \"\",\n \"max_value\": \"\",\n \"min_value\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"scope\": \"\",\n \"selfLink\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\"\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}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics/:customMetricId");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"accountId\": \"\",\n \"active\": false,\n \"created\": \"\",\n \"id\": \"\",\n \"index\": 0,\n \"kind\": \"\",\n \"max_value\": \"\",\n \"min_value\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"scope\": \"\",\n \"selfLink\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics/:customMetricId"
payload := strings.NewReader("{\n \"accountId\": \"\",\n \"active\": false,\n \"created\": \"\",\n \"id\": \"\",\n \"index\": 0,\n \"kind\": \"\",\n \"max_value\": \"\",\n \"min_value\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"scope\": \"\",\n \"selfLink\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\"\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/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics/:customMetricId HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 290
{
"accountId": "",
"active": false,
"created": "",
"id": "",
"index": 0,
"kind": "",
"max_value": "",
"min_value": "",
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"scope": "",
"selfLink": "",
"type": "",
"updated": "",
"webPropertyId": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics/:customMetricId")
.setHeader("content-type", "application/json")
.setBody("{\n \"accountId\": \"\",\n \"active\": false,\n \"created\": \"\",\n \"id\": \"\",\n \"index\": 0,\n \"kind\": \"\",\n \"max_value\": \"\",\n \"min_value\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"scope\": \"\",\n \"selfLink\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics/:customMetricId"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"accountId\": \"\",\n \"active\": false,\n \"created\": \"\",\n \"id\": \"\",\n \"index\": 0,\n \"kind\": \"\",\n \"max_value\": \"\",\n \"min_value\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"scope\": \"\",\n \"selfLink\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"accountId\": \"\",\n \"active\": false,\n \"created\": \"\",\n \"id\": \"\",\n \"index\": 0,\n \"kind\": \"\",\n \"max_value\": \"\",\n \"min_value\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"scope\": \"\",\n \"selfLink\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics/:customMetricId")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics/:customMetricId")
.header("content-type", "application/json")
.body("{\n \"accountId\": \"\",\n \"active\": false,\n \"created\": \"\",\n \"id\": \"\",\n \"index\": 0,\n \"kind\": \"\",\n \"max_value\": \"\",\n \"min_value\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"scope\": \"\",\n \"selfLink\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\"\n}")
.asString();
const data = JSON.stringify({
accountId: '',
active: false,
created: '',
id: '',
index: 0,
kind: '',
max_value: '',
min_value: '',
name: '',
parentLink: {
href: '',
type: ''
},
scope: '',
selfLink: '',
type: '',
updated: '',
webPropertyId: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics/:customMetricId');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics/:customMetricId',
headers: {'content-type': 'application/json'},
data: {
accountId: '',
active: false,
created: '',
id: '',
index: 0,
kind: '',
max_value: '',
min_value: '',
name: '',
parentLink: {href: '', type: ''},
scope: '',
selfLink: '',
type: '',
updated: '',
webPropertyId: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics/:customMetricId';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"accountId":"","active":false,"created":"","id":"","index":0,"kind":"","max_value":"","min_value":"","name":"","parentLink":{"href":"","type":""},"scope":"","selfLink":"","type":"","updated":"","webPropertyId":""}'
};
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}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics/:customMetricId',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "accountId": "",\n "active": false,\n "created": "",\n "id": "",\n "index": 0,\n "kind": "",\n "max_value": "",\n "min_value": "",\n "name": "",\n "parentLink": {\n "href": "",\n "type": ""\n },\n "scope": "",\n "selfLink": "",\n "type": "",\n "updated": "",\n "webPropertyId": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"accountId\": \"\",\n \"active\": false,\n \"created\": \"\",\n \"id\": \"\",\n \"index\": 0,\n \"kind\": \"\",\n \"max_value\": \"\",\n \"min_value\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"scope\": \"\",\n \"selfLink\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics/:customMetricId")
.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/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics/:customMetricId',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
accountId: '',
active: false,
created: '',
id: '',
index: 0,
kind: '',
max_value: '',
min_value: '',
name: '',
parentLink: {href: '', type: ''},
scope: '',
selfLink: '',
type: '',
updated: '',
webPropertyId: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics/:customMetricId',
headers: {'content-type': 'application/json'},
body: {
accountId: '',
active: false,
created: '',
id: '',
index: 0,
kind: '',
max_value: '',
min_value: '',
name: '',
parentLink: {href: '', type: ''},
scope: '',
selfLink: '',
type: '',
updated: '',
webPropertyId: ''
},
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}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics/:customMetricId');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
accountId: '',
active: false,
created: '',
id: '',
index: 0,
kind: '',
max_value: '',
min_value: '',
name: '',
parentLink: {
href: '',
type: ''
},
scope: '',
selfLink: '',
type: '',
updated: '',
webPropertyId: ''
});
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}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics/:customMetricId',
headers: {'content-type': 'application/json'},
data: {
accountId: '',
active: false,
created: '',
id: '',
index: 0,
kind: '',
max_value: '',
min_value: '',
name: '',
parentLink: {href: '', type: ''},
scope: '',
selfLink: '',
type: '',
updated: '',
webPropertyId: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics/:customMetricId';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"accountId":"","active":false,"created":"","id":"","index":0,"kind":"","max_value":"","min_value":"","name":"","parentLink":{"href":"","type":""},"scope":"","selfLink":"","type":"","updated":"","webPropertyId":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"accountId": @"",
@"active": @NO,
@"created": @"",
@"id": @"",
@"index": @0,
@"kind": @"",
@"max_value": @"",
@"min_value": @"",
@"name": @"",
@"parentLink": @{ @"href": @"", @"type": @"" },
@"scope": @"",
@"selfLink": @"",
@"type": @"",
@"updated": @"",
@"webPropertyId": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics/:customMetricId"]
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}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics/:customMetricId" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"accountId\": \"\",\n \"active\": false,\n \"created\": \"\",\n \"id\": \"\",\n \"index\": 0,\n \"kind\": \"\",\n \"max_value\": \"\",\n \"min_value\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"scope\": \"\",\n \"selfLink\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\"\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics/:customMetricId",
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([
'accountId' => '',
'active' => null,
'created' => '',
'id' => '',
'index' => 0,
'kind' => '',
'max_value' => '',
'min_value' => '',
'name' => '',
'parentLink' => [
'href' => '',
'type' => ''
],
'scope' => '',
'selfLink' => '',
'type' => '',
'updated' => '',
'webPropertyId' => ''
]),
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}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics/:customMetricId', [
'body' => '{
"accountId": "",
"active": false,
"created": "",
"id": "",
"index": 0,
"kind": "",
"max_value": "",
"min_value": "",
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"scope": "",
"selfLink": "",
"type": "",
"updated": "",
"webPropertyId": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics/:customMetricId');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'accountId' => '',
'active' => null,
'created' => '',
'id' => '',
'index' => 0,
'kind' => '',
'max_value' => '',
'min_value' => '',
'name' => '',
'parentLink' => [
'href' => '',
'type' => ''
],
'scope' => '',
'selfLink' => '',
'type' => '',
'updated' => '',
'webPropertyId' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'accountId' => '',
'active' => null,
'created' => '',
'id' => '',
'index' => 0,
'kind' => '',
'max_value' => '',
'min_value' => '',
'name' => '',
'parentLink' => [
'href' => '',
'type' => ''
],
'scope' => '',
'selfLink' => '',
'type' => '',
'updated' => '',
'webPropertyId' => ''
]));
$request->setRequestUrl('{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics/:customMetricId');
$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}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics/:customMetricId' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"accountId": "",
"active": false,
"created": "",
"id": "",
"index": 0,
"kind": "",
"max_value": "",
"min_value": "",
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"scope": "",
"selfLink": "",
"type": "",
"updated": "",
"webPropertyId": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics/:customMetricId' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"accountId": "",
"active": false,
"created": "",
"id": "",
"index": 0,
"kind": "",
"max_value": "",
"min_value": "",
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"scope": "",
"selfLink": "",
"type": "",
"updated": "",
"webPropertyId": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"accountId\": \"\",\n \"active\": false,\n \"created\": \"\",\n \"id\": \"\",\n \"index\": 0,\n \"kind\": \"\",\n \"max_value\": \"\",\n \"min_value\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"scope\": \"\",\n \"selfLink\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics/:customMetricId", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics/:customMetricId"
payload = {
"accountId": "",
"active": False,
"created": "",
"id": "",
"index": 0,
"kind": "",
"max_value": "",
"min_value": "",
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"scope": "",
"selfLink": "",
"type": "",
"updated": "",
"webPropertyId": ""
}
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics/:customMetricId"
payload <- "{\n \"accountId\": \"\",\n \"active\": false,\n \"created\": \"\",\n \"id\": \"\",\n \"index\": 0,\n \"kind\": \"\",\n \"max_value\": \"\",\n \"min_value\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"scope\": \"\",\n \"selfLink\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\"\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}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics/:customMetricId")
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 \"accountId\": \"\",\n \"active\": false,\n \"created\": \"\",\n \"id\": \"\",\n \"index\": 0,\n \"kind\": \"\",\n \"max_value\": \"\",\n \"min_value\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"scope\": \"\",\n \"selfLink\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\"\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/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics/:customMetricId') do |req|
req.body = "{\n \"accountId\": \"\",\n \"active\": false,\n \"created\": \"\",\n \"id\": \"\",\n \"index\": 0,\n \"kind\": \"\",\n \"max_value\": \"\",\n \"min_value\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"scope\": \"\",\n \"selfLink\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\"\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}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics/:customMetricId";
let payload = json!({
"accountId": "",
"active": false,
"created": "",
"id": "",
"index": 0,
"kind": "",
"max_value": "",
"min_value": "",
"name": "",
"parentLink": json!({
"href": "",
"type": ""
}),
"scope": "",
"selfLink": "",
"type": "",
"updated": "",
"webPropertyId": ""
});
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}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics/:customMetricId \
--header 'content-type: application/json' \
--data '{
"accountId": "",
"active": false,
"created": "",
"id": "",
"index": 0,
"kind": "",
"max_value": "",
"min_value": "",
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"scope": "",
"selfLink": "",
"type": "",
"updated": "",
"webPropertyId": ""
}'
echo '{
"accountId": "",
"active": false,
"created": "",
"id": "",
"index": 0,
"kind": "",
"max_value": "",
"min_value": "",
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"scope": "",
"selfLink": "",
"type": "",
"updated": "",
"webPropertyId": ""
}' | \
http PUT {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics/:customMetricId \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '{\n "accountId": "",\n "active": false,\n "created": "",\n "id": "",\n "index": 0,\n "kind": "",\n "max_value": "",\n "min_value": "",\n "name": "",\n "parentLink": {\n "href": "",\n "type": ""\n },\n "scope": "",\n "selfLink": "",\n "type": "",\n "updated": "",\n "webPropertyId": ""\n}' \
--output-document \
- {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics/:customMetricId
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"accountId": "",
"active": false,
"created": "",
"id": "",
"index": 0,
"kind": "",
"max_value": "",
"min_value": "",
"name": "",
"parentLink": [
"href": "",
"type": ""
],
"scope": "",
"selfLink": "",
"type": "",
"updated": "",
"webPropertyId": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics/:customMetricId")! 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()
DELETE
analytics.management.experiments.delete
{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId
QUERY PARAMS
accountId
webPropertyId
profileId
experimentId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId")
require "http/client"
url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId"
response = HTTP::Client.delete url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Delete,
RequestUri = new Uri("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId"
req, _ := http.NewRequest("DELETE", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
DELETE /baseUrl/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId"))
.method("DELETE", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('DELETE', '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'DELETE',
url: '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId';
const options = {method: 'DELETE'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId")
.delete(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'DELETE',
url: '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'DELETE',
url: '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId';
const options = {method: 'DELETE'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"DELETE"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId" in
Client.call `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('DELETE', '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId');
echo $response->getBody();
setUrl('{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId');
$request->setMethod(HTTP_METH_DELETE);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId"
response = requests.delete(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId"
response <- VERB("DELETE", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.delete('/baseUrl/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId";
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("DELETE").unwrap(), url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request DELETE \
--url {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId
http DELETE {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId
wget --quiet \
--method DELETE \
--output-document \
- {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "DELETE"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
analytics.management.experiments.get
{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId
QUERY PARAMS
accountId
webPropertyId
profileId
experimentId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId")
require "http/client"
url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId"
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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId"
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/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId"))
.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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId")
.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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId';
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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId',
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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId');
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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId';
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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId"]
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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId",
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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId');
echo $response->getBody();
setUrl('{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId")
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/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId";
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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId
http GET {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId")! 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
analytics.management.experiments.insert
{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments
QUERY PARAMS
accountId
webPropertyId
profileId
BODY json
{
"accountId": "",
"created": "",
"description": "",
"editableInGaUi": false,
"endTime": "",
"equalWeighting": false,
"id": "",
"internalWebPropertyId": "",
"kind": "",
"minimumExperimentLengthInDays": 0,
"name": "",
"objectiveMetric": "",
"optimizationType": "",
"parentLink": {
"href": "",
"type": ""
},
"profileId": "",
"reasonExperimentEnded": "",
"rewriteVariationUrlsAsOriginal": false,
"selfLink": "",
"servingFramework": "",
"snippet": "",
"startTime": "",
"status": "",
"trafficCoverage": "",
"updated": "",
"variations": [
{
"name": "",
"status": "",
"url": "",
"weight": "",
"won": false
}
],
"webPropertyId": "",
"winnerConfidenceLevel": "",
"winnerFound": false
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"accountId\": \"\",\n \"created\": \"\",\n \"description\": \"\",\n \"editableInGaUi\": false,\n \"endTime\": \"\",\n \"equalWeighting\": false,\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"minimumExperimentLengthInDays\": 0,\n \"name\": \"\",\n \"objectiveMetric\": \"\",\n \"optimizationType\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"profileId\": \"\",\n \"reasonExperimentEnded\": \"\",\n \"rewriteVariationUrlsAsOriginal\": false,\n \"selfLink\": \"\",\n \"servingFramework\": \"\",\n \"snippet\": \"\",\n \"startTime\": \"\",\n \"status\": \"\",\n \"trafficCoverage\": \"\",\n \"updated\": \"\",\n \"variations\": [\n {\n \"name\": \"\",\n \"status\": \"\",\n \"url\": \"\",\n \"weight\": \"\",\n \"won\": false\n }\n ],\n \"webPropertyId\": \"\",\n \"winnerConfidenceLevel\": \"\",\n \"winnerFound\": false\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments" {:content-type :json
:form-params {:accountId ""
:created ""
:description ""
:editableInGaUi false
:endTime ""
:equalWeighting false
:id ""
:internalWebPropertyId ""
:kind ""
:minimumExperimentLengthInDays 0
:name ""
:objectiveMetric ""
:optimizationType ""
:parentLink {:href ""
:type ""}
:profileId ""
:reasonExperimentEnded ""
:rewriteVariationUrlsAsOriginal false
:selfLink ""
:servingFramework ""
:snippet ""
:startTime ""
:status ""
:trafficCoverage ""
:updated ""
:variations [{:name ""
:status ""
:url ""
:weight ""
:won false}]
:webPropertyId ""
:winnerConfidenceLevel ""
:winnerFound false}})
require "http/client"
url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"accountId\": \"\",\n \"created\": \"\",\n \"description\": \"\",\n \"editableInGaUi\": false,\n \"endTime\": \"\",\n \"equalWeighting\": false,\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"minimumExperimentLengthInDays\": 0,\n \"name\": \"\",\n \"objectiveMetric\": \"\",\n \"optimizationType\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"profileId\": \"\",\n \"reasonExperimentEnded\": \"\",\n \"rewriteVariationUrlsAsOriginal\": false,\n \"selfLink\": \"\",\n \"servingFramework\": \"\",\n \"snippet\": \"\",\n \"startTime\": \"\",\n \"status\": \"\",\n \"trafficCoverage\": \"\",\n \"updated\": \"\",\n \"variations\": [\n {\n \"name\": \"\",\n \"status\": \"\",\n \"url\": \"\",\n \"weight\": \"\",\n \"won\": false\n }\n ],\n \"webPropertyId\": \"\",\n \"winnerConfidenceLevel\": \"\",\n \"winnerFound\": 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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments"),
Content = new StringContent("{\n \"accountId\": \"\",\n \"created\": \"\",\n \"description\": \"\",\n \"editableInGaUi\": false,\n \"endTime\": \"\",\n \"equalWeighting\": false,\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"minimumExperimentLengthInDays\": 0,\n \"name\": \"\",\n \"objectiveMetric\": \"\",\n \"optimizationType\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"profileId\": \"\",\n \"reasonExperimentEnded\": \"\",\n \"rewriteVariationUrlsAsOriginal\": false,\n \"selfLink\": \"\",\n \"servingFramework\": \"\",\n \"snippet\": \"\",\n \"startTime\": \"\",\n \"status\": \"\",\n \"trafficCoverage\": \"\",\n \"updated\": \"\",\n \"variations\": [\n {\n \"name\": \"\",\n \"status\": \"\",\n \"url\": \"\",\n \"weight\": \"\",\n \"won\": false\n }\n ],\n \"webPropertyId\": \"\",\n \"winnerConfidenceLevel\": \"\",\n \"winnerFound\": 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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"accountId\": \"\",\n \"created\": \"\",\n \"description\": \"\",\n \"editableInGaUi\": false,\n \"endTime\": \"\",\n \"equalWeighting\": false,\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"minimumExperimentLengthInDays\": 0,\n \"name\": \"\",\n \"objectiveMetric\": \"\",\n \"optimizationType\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"profileId\": \"\",\n \"reasonExperimentEnded\": \"\",\n \"rewriteVariationUrlsAsOriginal\": false,\n \"selfLink\": \"\",\n \"servingFramework\": \"\",\n \"snippet\": \"\",\n \"startTime\": \"\",\n \"status\": \"\",\n \"trafficCoverage\": \"\",\n \"updated\": \"\",\n \"variations\": [\n {\n \"name\": \"\",\n \"status\": \"\",\n \"url\": \"\",\n \"weight\": \"\",\n \"won\": false\n }\n ],\n \"webPropertyId\": \"\",\n \"winnerConfidenceLevel\": \"\",\n \"winnerFound\": false\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments"
payload := strings.NewReader("{\n \"accountId\": \"\",\n \"created\": \"\",\n \"description\": \"\",\n \"editableInGaUi\": false,\n \"endTime\": \"\",\n \"equalWeighting\": false,\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"minimumExperimentLengthInDays\": 0,\n \"name\": \"\",\n \"objectiveMetric\": \"\",\n \"optimizationType\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"profileId\": \"\",\n \"reasonExperimentEnded\": \"\",\n \"rewriteVariationUrlsAsOriginal\": false,\n \"selfLink\": \"\",\n \"servingFramework\": \"\",\n \"snippet\": \"\",\n \"startTime\": \"\",\n \"status\": \"\",\n \"trafficCoverage\": \"\",\n \"updated\": \"\",\n \"variations\": [\n {\n \"name\": \"\",\n \"status\": \"\",\n \"url\": \"\",\n \"weight\": \"\",\n \"won\": false\n }\n ],\n \"webPropertyId\": \"\",\n \"winnerConfidenceLevel\": \"\",\n \"winnerFound\": 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/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 782
{
"accountId": "",
"created": "",
"description": "",
"editableInGaUi": false,
"endTime": "",
"equalWeighting": false,
"id": "",
"internalWebPropertyId": "",
"kind": "",
"minimumExperimentLengthInDays": 0,
"name": "",
"objectiveMetric": "",
"optimizationType": "",
"parentLink": {
"href": "",
"type": ""
},
"profileId": "",
"reasonExperimentEnded": "",
"rewriteVariationUrlsAsOriginal": false,
"selfLink": "",
"servingFramework": "",
"snippet": "",
"startTime": "",
"status": "",
"trafficCoverage": "",
"updated": "",
"variations": [
{
"name": "",
"status": "",
"url": "",
"weight": "",
"won": false
}
],
"webPropertyId": "",
"winnerConfidenceLevel": "",
"winnerFound": false
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments")
.setHeader("content-type", "application/json")
.setBody("{\n \"accountId\": \"\",\n \"created\": \"\",\n \"description\": \"\",\n \"editableInGaUi\": false,\n \"endTime\": \"\",\n \"equalWeighting\": false,\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"minimumExperimentLengthInDays\": 0,\n \"name\": \"\",\n \"objectiveMetric\": \"\",\n \"optimizationType\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"profileId\": \"\",\n \"reasonExperimentEnded\": \"\",\n \"rewriteVariationUrlsAsOriginal\": false,\n \"selfLink\": \"\",\n \"servingFramework\": \"\",\n \"snippet\": \"\",\n \"startTime\": \"\",\n \"status\": \"\",\n \"trafficCoverage\": \"\",\n \"updated\": \"\",\n \"variations\": [\n {\n \"name\": \"\",\n \"status\": \"\",\n \"url\": \"\",\n \"weight\": \"\",\n \"won\": false\n }\n ],\n \"webPropertyId\": \"\",\n \"winnerConfidenceLevel\": \"\",\n \"winnerFound\": false\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"accountId\": \"\",\n \"created\": \"\",\n \"description\": \"\",\n \"editableInGaUi\": false,\n \"endTime\": \"\",\n \"equalWeighting\": false,\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"minimumExperimentLengthInDays\": 0,\n \"name\": \"\",\n \"objectiveMetric\": \"\",\n \"optimizationType\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"profileId\": \"\",\n \"reasonExperimentEnded\": \"\",\n \"rewriteVariationUrlsAsOriginal\": false,\n \"selfLink\": \"\",\n \"servingFramework\": \"\",\n \"snippet\": \"\",\n \"startTime\": \"\",\n \"status\": \"\",\n \"trafficCoverage\": \"\",\n \"updated\": \"\",\n \"variations\": [\n {\n \"name\": \"\",\n \"status\": \"\",\n \"url\": \"\",\n \"weight\": \"\",\n \"won\": false\n }\n ],\n \"webPropertyId\": \"\",\n \"winnerConfidenceLevel\": \"\",\n \"winnerFound\": 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 \"accountId\": \"\",\n \"created\": \"\",\n \"description\": \"\",\n \"editableInGaUi\": false,\n \"endTime\": \"\",\n \"equalWeighting\": false,\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"minimumExperimentLengthInDays\": 0,\n \"name\": \"\",\n \"objectiveMetric\": \"\",\n \"optimizationType\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"profileId\": \"\",\n \"reasonExperimentEnded\": \"\",\n \"rewriteVariationUrlsAsOriginal\": false,\n \"selfLink\": \"\",\n \"servingFramework\": \"\",\n \"snippet\": \"\",\n \"startTime\": \"\",\n \"status\": \"\",\n \"trafficCoverage\": \"\",\n \"updated\": \"\",\n \"variations\": [\n {\n \"name\": \"\",\n \"status\": \"\",\n \"url\": \"\",\n \"weight\": \"\",\n \"won\": false\n }\n ],\n \"webPropertyId\": \"\",\n \"winnerConfidenceLevel\": \"\",\n \"winnerFound\": false\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments")
.header("content-type", "application/json")
.body("{\n \"accountId\": \"\",\n \"created\": \"\",\n \"description\": \"\",\n \"editableInGaUi\": false,\n \"endTime\": \"\",\n \"equalWeighting\": false,\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"minimumExperimentLengthInDays\": 0,\n \"name\": \"\",\n \"objectiveMetric\": \"\",\n \"optimizationType\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"profileId\": \"\",\n \"reasonExperimentEnded\": \"\",\n \"rewriteVariationUrlsAsOriginal\": false,\n \"selfLink\": \"\",\n \"servingFramework\": \"\",\n \"snippet\": \"\",\n \"startTime\": \"\",\n \"status\": \"\",\n \"trafficCoverage\": \"\",\n \"updated\": \"\",\n \"variations\": [\n {\n \"name\": \"\",\n \"status\": \"\",\n \"url\": \"\",\n \"weight\": \"\",\n \"won\": false\n }\n ],\n \"webPropertyId\": \"\",\n \"winnerConfidenceLevel\": \"\",\n \"winnerFound\": false\n}")
.asString();
const data = JSON.stringify({
accountId: '',
created: '',
description: '',
editableInGaUi: false,
endTime: '',
equalWeighting: false,
id: '',
internalWebPropertyId: '',
kind: '',
minimumExperimentLengthInDays: 0,
name: '',
objectiveMetric: '',
optimizationType: '',
parentLink: {
href: '',
type: ''
},
profileId: '',
reasonExperimentEnded: '',
rewriteVariationUrlsAsOriginal: false,
selfLink: '',
servingFramework: '',
snippet: '',
startTime: '',
status: '',
trafficCoverage: '',
updated: '',
variations: [
{
name: '',
status: '',
url: '',
weight: '',
won: false
}
],
webPropertyId: '',
winnerConfidenceLevel: '',
winnerFound: 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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments',
headers: {'content-type': 'application/json'},
data: {
accountId: '',
created: '',
description: '',
editableInGaUi: false,
endTime: '',
equalWeighting: false,
id: '',
internalWebPropertyId: '',
kind: '',
minimumExperimentLengthInDays: 0,
name: '',
objectiveMetric: '',
optimizationType: '',
parentLink: {href: '', type: ''},
profileId: '',
reasonExperimentEnded: '',
rewriteVariationUrlsAsOriginal: false,
selfLink: '',
servingFramework: '',
snippet: '',
startTime: '',
status: '',
trafficCoverage: '',
updated: '',
variations: [{name: '', status: '', url: '', weight: '', won: false}],
webPropertyId: '',
winnerConfidenceLevel: '',
winnerFound: false
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"accountId":"","created":"","description":"","editableInGaUi":false,"endTime":"","equalWeighting":false,"id":"","internalWebPropertyId":"","kind":"","minimumExperimentLengthInDays":0,"name":"","objectiveMetric":"","optimizationType":"","parentLink":{"href":"","type":""},"profileId":"","reasonExperimentEnded":"","rewriteVariationUrlsAsOriginal":false,"selfLink":"","servingFramework":"","snippet":"","startTime":"","status":"","trafficCoverage":"","updated":"","variations":[{"name":"","status":"","url":"","weight":"","won":false}],"webPropertyId":"","winnerConfidenceLevel":"","winnerFound":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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "accountId": "",\n "created": "",\n "description": "",\n "editableInGaUi": false,\n "endTime": "",\n "equalWeighting": false,\n "id": "",\n "internalWebPropertyId": "",\n "kind": "",\n "minimumExperimentLengthInDays": 0,\n "name": "",\n "objectiveMetric": "",\n "optimizationType": "",\n "parentLink": {\n "href": "",\n "type": ""\n },\n "profileId": "",\n "reasonExperimentEnded": "",\n "rewriteVariationUrlsAsOriginal": false,\n "selfLink": "",\n "servingFramework": "",\n "snippet": "",\n "startTime": "",\n "status": "",\n "trafficCoverage": "",\n "updated": "",\n "variations": [\n {\n "name": "",\n "status": "",\n "url": "",\n "weight": "",\n "won": false\n }\n ],\n "webPropertyId": "",\n "winnerConfidenceLevel": "",\n "winnerFound": 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 \"accountId\": \"\",\n \"created\": \"\",\n \"description\": \"\",\n \"editableInGaUi\": false,\n \"endTime\": \"\",\n \"equalWeighting\": false,\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"minimumExperimentLengthInDays\": 0,\n \"name\": \"\",\n \"objectiveMetric\": \"\",\n \"optimizationType\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"profileId\": \"\",\n \"reasonExperimentEnded\": \"\",\n \"rewriteVariationUrlsAsOriginal\": false,\n \"selfLink\": \"\",\n \"servingFramework\": \"\",\n \"snippet\": \"\",\n \"startTime\": \"\",\n \"status\": \"\",\n \"trafficCoverage\": \"\",\n \"updated\": \"\",\n \"variations\": [\n {\n \"name\": \"\",\n \"status\": \"\",\n \"url\": \"\",\n \"weight\": \"\",\n \"won\": false\n }\n ],\n \"webPropertyId\": \"\",\n \"winnerConfidenceLevel\": \"\",\n \"winnerFound\": false\n}")
val request = Request.Builder()
.url("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments")
.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/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
accountId: '',
created: '',
description: '',
editableInGaUi: false,
endTime: '',
equalWeighting: false,
id: '',
internalWebPropertyId: '',
kind: '',
minimumExperimentLengthInDays: 0,
name: '',
objectiveMetric: '',
optimizationType: '',
parentLink: {href: '', type: ''},
profileId: '',
reasonExperimentEnded: '',
rewriteVariationUrlsAsOriginal: false,
selfLink: '',
servingFramework: '',
snippet: '',
startTime: '',
status: '',
trafficCoverage: '',
updated: '',
variations: [{name: '', status: '', url: '', weight: '', won: false}],
webPropertyId: '',
winnerConfidenceLevel: '',
winnerFound: false
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments',
headers: {'content-type': 'application/json'},
body: {
accountId: '',
created: '',
description: '',
editableInGaUi: false,
endTime: '',
equalWeighting: false,
id: '',
internalWebPropertyId: '',
kind: '',
minimumExperimentLengthInDays: 0,
name: '',
objectiveMetric: '',
optimizationType: '',
parentLink: {href: '', type: ''},
profileId: '',
reasonExperimentEnded: '',
rewriteVariationUrlsAsOriginal: false,
selfLink: '',
servingFramework: '',
snippet: '',
startTime: '',
status: '',
trafficCoverage: '',
updated: '',
variations: [{name: '', status: '', url: '', weight: '', won: false}],
webPropertyId: '',
winnerConfidenceLevel: '',
winnerFound: 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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
accountId: '',
created: '',
description: '',
editableInGaUi: false,
endTime: '',
equalWeighting: false,
id: '',
internalWebPropertyId: '',
kind: '',
minimumExperimentLengthInDays: 0,
name: '',
objectiveMetric: '',
optimizationType: '',
parentLink: {
href: '',
type: ''
},
profileId: '',
reasonExperimentEnded: '',
rewriteVariationUrlsAsOriginal: false,
selfLink: '',
servingFramework: '',
snippet: '',
startTime: '',
status: '',
trafficCoverage: '',
updated: '',
variations: [
{
name: '',
status: '',
url: '',
weight: '',
won: false
}
],
webPropertyId: '',
winnerConfidenceLevel: '',
winnerFound: 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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments',
headers: {'content-type': 'application/json'},
data: {
accountId: '',
created: '',
description: '',
editableInGaUi: false,
endTime: '',
equalWeighting: false,
id: '',
internalWebPropertyId: '',
kind: '',
minimumExperimentLengthInDays: 0,
name: '',
objectiveMetric: '',
optimizationType: '',
parentLink: {href: '', type: ''},
profileId: '',
reasonExperimentEnded: '',
rewriteVariationUrlsAsOriginal: false,
selfLink: '',
servingFramework: '',
snippet: '',
startTime: '',
status: '',
trafficCoverage: '',
updated: '',
variations: [{name: '', status: '', url: '', weight: '', won: false}],
webPropertyId: '',
winnerConfidenceLevel: '',
winnerFound: false
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"accountId":"","created":"","description":"","editableInGaUi":false,"endTime":"","equalWeighting":false,"id":"","internalWebPropertyId":"","kind":"","minimumExperimentLengthInDays":0,"name":"","objectiveMetric":"","optimizationType":"","parentLink":{"href":"","type":""},"profileId":"","reasonExperimentEnded":"","rewriteVariationUrlsAsOriginal":false,"selfLink":"","servingFramework":"","snippet":"","startTime":"","status":"","trafficCoverage":"","updated":"","variations":[{"name":"","status":"","url":"","weight":"","won":false}],"webPropertyId":"","winnerConfidenceLevel":"","winnerFound":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 = @{ @"accountId": @"",
@"created": @"",
@"description": @"",
@"editableInGaUi": @NO,
@"endTime": @"",
@"equalWeighting": @NO,
@"id": @"",
@"internalWebPropertyId": @"",
@"kind": @"",
@"minimumExperimentLengthInDays": @0,
@"name": @"",
@"objectiveMetric": @"",
@"optimizationType": @"",
@"parentLink": @{ @"href": @"", @"type": @"" },
@"profileId": @"",
@"reasonExperimentEnded": @"",
@"rewriteVariationUrlsAsOriginal": @NO,
@"selfLink": @"",
@"servingFramework": @"",
@"snippet": @"",
@"startTime": @"",
@"status": @"",
@"trafficCoverage": @"",
@"updated": @"",
@"variations": @[ @{ @"name": @"", @"status": @"", @"url": @"", @"weight": @"", @"won": @NO } ],
@"webPropertyId": @"",
@"winnerConfidenceLevel": @"",
@"winnerFound": @NO };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments"]
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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"accountId\": \"\",\n \"created\": \"\",\n \"description\": \"\",\n \"editableInGaUi\": false,\n \"endTime\": \"\",\n \"equalWeighting\": false,\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"minimumExperimentLengthInDays\": 0,\n \"name\": \"\",\n \"objectiveMetric\": \"\",\n \"optimizationType\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"profileId\": \"\",\n \"reasonExperimentEnded\": \"\",\n \"rewriteVariationUrlsAsOriginal\": false,\n \"selfLink\": \"\",\n \"servingFramework\": \"\",\n \"snippet\": \"\",\n \"startTime\": \"\",\n \"status\": \"\",\n \"trafficCoverage\": \"\",\n \"updated\": \"\",\n \"variations\": [\n {\n \"name\": \"\",\n \"status\": \"\",\n \"url\": \"\",\n \"weight\": \"\",\n \"won\": false\n }\n ],\n \"webPropertyId\": \"\",\n \"winnerConfidenceLevel\": \"\",\n \"winnerFound\": false\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'accountId' => '',
'created' => '',
'description' => '',
'editableInGaUi' => null,
'endTime' => '',
'equalWeighting' => null,
'id' => '',
'internalWebPropertyId' => '',
'kind' => '',
'minimumExperimentLengthInDays' => 0,
'name' => '',
'objectiveMetric' => '',
'optimizationType' => '',
'parentLink' => [
'href' => '',
'type' => ''
],
'profileId' => '',
'reasonExperimentEnded' => '',
'rewriteVariationUrlsAsOriginal' => null,
'selfLink' => '',
'servingFramework' => '',
'snippet' => '',
'startTime' => '',
'status' => '',
'trafficCoverage' => '',
'updated' => '',
'variations' => [
[
'name' => '',
'status' => '',
'url' => '',
'weight' => '',
'won' => null
]
],
'webPropertyId' => '',
'winnerConfidenceLevel' => '',
'winnerFound' => 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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments', [
'body' => '{
"accountId": "",
"created": "",
"description": "",
"editableInGaUi": false,
"endTime": "",
"equalWeighting": false,
"id": "",
"internalWebPropertyId": "",
"kind": "",
"minimumExperimentLengthInDays": 0,
"name": "",
"objectiveMetric": "",
"optimizationType": "",
"parentLink": {
"href": "",
"type": ""
},
"profileId": "",
"reasonExperimentEnded": "",
"rewriteVariationUrlsAsOriginal": false,
"selfLink": "",
"servingFramework": "",
"snippet": "",
"startTime": "",
"status": "",
"trafficCoverage": "",
"updated": "",
"variations": [
{
"name": "",
"status": "",
"url": "",
"weight": "",
"won": false
}
],
"webPropertyId": "",
"winnerConfidenceLevel": "",
"winnerFound": false
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'accountId' => '',
'created' => '',
'description' => '',
'editableInGaUi' => null,
'endTime' => '',
'equalWeighting' => null,
'id' => '',
'internalWebPropertyId' => '',
'kind' => '',
'minimumExperimentLengthInDays' => 0,
'name' => '',
'objectiveMetric' => '',
'optimizationType' => '',
'parentLink' => [
'href' => '',
'type' => ''
],
'profileId' => '',
'reasonExperimentEnded' => '',
'rewriteVariationUrlsAsOriginal' => null,
'selfLink' => '',
'servingFramework' => '',
'snippet' => '',
'startTime' => '',
'status' => '',
'trafficCoverage' => '',
'updated' => '',
'variations' => [
[
'name' => '',
'status' => '',
'url' => '',
'weight' => '',
'won' => null
]
],
'webPropertyId' => '',
'winnerConfidenceLevel' => '',
'winnerFound' => null
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'accountId' => '',
'created' => '',
'description' => '',
'editableInGaUi' => null,
'endTime' => '',
'equalWeighting' => null,
'id' => '',
'internalWebPropertyId' => '',
'kind' => '',
'minimumExperimentLengthInDays' => 0,
'name' => '',
'objectiveMetric' => '',
'optimizationType' => '',
'parentLink' => [
'href' => '',
'type' => ''
],
'profileId' => '',
'reasonExperimentEnded' => '',
'rewriteVariationUrlsAsOriginal' => null,
'selfLink' => '',
'servingFramework' => '',
'snippet' => '',
'startTime' => '',
'status' => '',
'trafficCoverage' => '',
'updated' => '',
'variations' => [
[
'name' => '',
'status' => '',
'url' => '',
'weight' => '',
'won' => null
]
],
'webPropertyId' => '',
'winnerConfidenceLevel' => '',
'winnerFound' => null
]));
$request->setRequestUrl('{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments');
$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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"accountId": "",
"created": "",
"description": "",
"editableInGaUi": false,
"endTime": "",
"equalWeighting": false,
"id": "",
"internalWebPropertyId": "",
"kind": "",
"minimumExperimentLengthInDays": 0,
"name": "",
"objectiveMetric": "",
"optimizationType": "",
"parentLink": {
"href": "",
"type": ""
},
"profileId": "",
"reasonExperimentEnded": "",
"rewriteVariationUrlsAsOriginal": false,
"selfLink": "",
"servingFramework": "",
"snippet": "",
"startTime": "",
"status": "",
"trafficCoverage": "",
"updated": "",
"variations": [
{
"name": "",
"status": "",
"url": "",
"weight": "",
"won": false
}
],
"webPropertyId": "",
"winnerConfidenceLevel": "",
"winnerFound": false
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"accountId": "",
"created": "",
"description": "",
"editableInGaUi": false,
"endTime": "",
"equalWeighting": false,
"id": "",
"internalWebPropertyId": "",
"kind": "",
"minimumExperimentLengthInDays": 0,
"name": "",
"objectiveMetric": "",
"optimizationType": "",
"parentLink": {
"href": "",
"type": ""
},
"profileId": "",
"reasonExperimentEnded": "",
"rewriteVariationUrlsAsOriginal": false,
"selfLink": "",
"servingFramework": "",
"snippet": "",
"startTime": "",
"status": "",
"trafficCoverage": "",
"updated": "",
"variations": [
{
"name": "",
"status": "",
"url": "",
"weight": "",
"won": false
}
],
"webPropertyId": "",
"winnerConfidenceLevel": "",
"winnerFound": false
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"accountId\": \"\",\n \"created\": \"\",\n \"description\": \"\",\n \"editableInGaUi\": false,\n \"endTime\": \"\",\n \"equalWeighting\": false,\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"minimumExperimentLengthInDays\": 0,\n \"name\": \"\",\n \"objectiveMetric\": \"\",\n \"optimizationType\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"profileId\": \"\",\n \"reasonExperimentEnded\": \"\",\n \"rewriteVariationUrlsAsOriginal\": false,\n \"selfLink\": \"\",\n \"servingFramework\": \"\",\n \"snippet\": \"\",\n \"startTime\": \"\",\n \"status\": \"\",\n \"trafficCoverage\": \"\",\n \"updated\": \"\",\n \"variations\": [\n {\n \"name\": \"\",\n \"status\": \"\",\n \"url\": \"\",\n \"weight\": \"\",\n \"won\": false\n }\n ],\n \"webPropertyId\": \"\",\n \"winnerConfidenceLevel\": \"\",\n \"winnerFound\": false\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments"
payload = {
"accountId": "",
"created": "",
"description": "",
"editableInGaUi": False,
"endTime": "",
"equalWeighting": False,
"id": "",
"internalWebPropertyId": "",
"kind": "",
"minimumExperimentLengthInDays": 0,
"name": "",
"objectiveMetric": "",
"optimizationType": "",
"parentLink": {
"href": "",
"type": ""
},
"profileId": "",
"reasonExperimentEnded": "",
"rewriteVariationUrlsAsOriginal": False,
"selfLink": "",
"servingFramework": "",
"snippet": "",
"startTime": "",
"status": "",
"trafficCoverage": "",
"updated": "",
"variations": [
{
"name": "",
"status": "",
"url": "",
"weight": "",
"won": False
}
],
"webPropertyId": "",
"winnerConfidenceLevel": "",
"winnerFound": False
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments"
payload <- "{\n \"accountId\": \"\",\n \"created\": \"\",\n \"description\": \"\",\n \"editableInGaUi\": false,\n \"endTime\": \"\",\n \"equalWeighting\": false,\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"minimumExperimentLengthInDays\": 0,\n \"name\": \"\",\n \"objectiveMetric\": \"\",\n \"optimizationType\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"profileId\": \"\",\n \"reasonExperimentEnded\": \"\",\n \"rewriteVariationUrlsAsOriginal\": false,\n \"selfLink\": \"\",\n \"servingFramework\": \"\",\n \"snippet\": \"\",\n \"startTime\": \"\",\n \"status\": \"\",\n \"trafficCoverage\": \"\",\n \"updated\": \"\",\n \"variations\": [\n {\n \"name\": \"\",\n \"status\": \"\",\n \"url\": \"\",\n \"weight\": \"\",\n \"won\": false\n }\n ],\n \"webPropertyId\": \"\",\n \"winnerConfidenceLevel\": \"\",\n \"winnerFound\": 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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"accountId\": \"\",\n \"created\": \"\",\n \"description\": \"\",\n \"editableInGaUi\": false,\n \"endTime\": \"\",\n \"equalWeighting\": false,\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"minimumExperimentLengthInDays\": 0,\n \"name\": \"\",\n \"objectiveMetric\": \"\",\n \"optimizationType\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"profileId\": \"\",\n \"reasonExperimentEnded\": \"\",\n \"rewriteVariationUrlsAsOriginal\": false,\n \"selfLink\": \"\",\n \"servingFramework\": \"\",\n \"snippet\": \"\",\n \"startTime\": \"\",\n \"status\": \"\",\n \"trafficCoverage\": \"\",\n \"updated\": \"\",\n \"variations\": [\n {\n \"name\": \"\",\n \"status\": \"\",\n \"url\": \"\",\n \"weight\": \"\",\n \"won\": false\n }\n ],\n \"webPropertyId\": \"\",\n \"winnerConfidenceLevel\": \"\",\n \"winnerFound\": 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/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments') do |req|
req.body = "{\n \"accountId\": \"\",\n \"created\": \"\",\n \"description\": \"\",\n \"editableInGaUi\": false,\n \"endTime\": \"\",\n \"equalWeighting\": false,\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"minimumExperimentLengthInDays\": 0,\n \"name\": \"\",\n \"objectiveMetric\": \"\",\n \"optimizationType\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"profileId\": \"\",\n \"reasonExperimentEnded\": \"\",\n \"rewriteVariationUrlsAsOriginal\": false,\n \"selfLink\": \"\",\n \"servingFramework\": \"\",\n \"snippet\": \"\",\n \"startTime\": \"\",\n \"status\": \"\",\n \"trafficCoverage\": \"\",\n \"updated\": \"\",\n \"variations\": [\n {\n \"name\": \"\",\n \"status\": \"\",\n \"url\": \"\",\n \"weight\": \"\",\n \"won\": false\n }\n ],\n \"webPropertyId\": \"\",\n \"winnerConfidenceLevel\": \"\",\n \"winnerFound\": false\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments";
let payload = json!({
"accountId": "",
"created": "",
"description": "",
"editableInGaUi": false,
"endTime": "",
"equalWeighting": false,
"id": "",
"internalWebPropertyId": "",
"kind": "",
"minimumExperimentLengthInDays": 0,
"name": "",
"objectiveMetric": "",
"optimizationType": "",
"parentLink": json!({
"href": "",
"type": ""
}),
"profileId": "",
"reasonExperimentEnded": "",
"rewriteVariationUrlsAsOriginal": false,
"selfLink": "",
"servingFramework": "",
"snippet": "",
"startTime": "",
"status": "",
"trafficCoverage": "",
"updated": "",
"variations": (
json!({
"name": "",
"status": "",
"url": "",
"weight": "",
"won": false
})
),
"webPropertyId": "",
"winnerConfidenceLevel": "",
"winnerFound": 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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments \
--header 'content-type: application/json' \
--data '{
"accountId": "",
"created": "",
"description": "",
"editableInGaUi": false,
"endTime": "",
"equalWeighting": false,
"id": "",
"internalWebPropertyId": "",
"kind": "",
"minimumExperimentLengthInDays": 0,
"name": "",
"objectiveMetric": "",
"optimizationType": "",
"parentLink": {
"href": "",
"type": ""
},
"profileId": "",
"reasonExperimentEnded": "",
"rewriteVariationUrlsAsOriginal": false,
"selfLink": "",
"servingFramework": "",
"snippet": "",
"startTime": "",
"status": "",
"trafficCoverage": "",
"updated": "",
"variations": [
{
"name": "",
"status": "",
"url": "",
"weight": "",
"won": false
}
],
"webPropertyId": "",
"winnerConfidenceLevel": "",
"winnerFound": false
}'
echo '{
"accountId": "",
"created": "",
"description": "",
"editableInGaUi": false,
"endTime": "",
"equalWeighting": false,
"id": "",
"internalWebPropertyId": "",
"kind": "",
"minimumExperimentLengthInDays": 0,
"name": "",
"objectiveMetric": "",
"optimizationType": "",
"parentLink": {
"href": "",
"type": ""
},
"profileId": "",
"reasonExperimentEnded": "",
"rewriteVariationUrlsAsOriginal": false,
"selfLink": "",
"servingFramework": "",
"snippet": "",
"startTime": "",
"status": "",
"trafficCoverage": "",
"updated": "",
"variations": [
{
"name": "",
"status": "",
"url": "",
"weight": "",
"won": false
}
],
"webPropertyId": "",
"winnerConfidenceLevel": "",
"winnerFound": false
}' | \
http POST {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "accountId": "",\n "created": "",\n "description": "",\n "editableInGaUi": false,\n "endTime": "",\n "equalWeighting": false,\n "id": "",\n "internalWebPropertyId": "",\n "kind": "",\n "minimumExperimentLengthInDays": 0,\n "name": "",\n "objectiveMetric": "",\n "optimizationType": "",\n "parentLink": {\n "href": "",\n "type": ""\n },\n "profileId": "",\n "reasonExperimentEnded": "",\n "rewriteVariationUrlsAsOriginal": false,\n "selfLink": "",\n "servingFramework": "",\n "snippet": "",\n "startTime": "",\n "status": "",\n "trafficCoverage": "",\n "updated": "",\n "variations": [\n {\n "name": "",\n "status": "",\n "url": "",\n "weight": "",\n "won": false\n }\n ],\n "webPropertyId": "",\n "winnerConfidenceLevel": "",\n "winnerFound": false\n}' \
--output-document \
- {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"accountId": "",
"created": "",
"description": "",
"editableInGaUi": false,
"endTime": "",
"equalWeighting": false,
"id": "",
"internalWebPropertyId": "",
"kind": "",
"minimumExperimentLengthInDays": 0,
"name": "",
"objectiveMetric": "",
"optimizationType": "",
"parentLink": [
"href": "",
"type": ""
],
"profileId": "",
"reasonExperimentEnded": "",
"rewriteVariationUrlsAsOriginal": false,
"selfLink": "",
"servingFramework": "",
"snippet": "",
"startTime": "",
"status": "",
"trafficCoverage": "",
"updated": "",
"variations": [
[
"name": "",
"status": "",
"url": "",
"weight": "",
"won": false
]
],
"webPropertyId": "",
"winnerConfidenceLevel": "",
"winnerFound": false
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments")! 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
analytics.management.experiments.list
{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments
QUERY PARAMS
accountId
webPropertyId
profileId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments")
require "http/client"
url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments"
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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments"
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/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments"))
.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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments")
.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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments';
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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments',
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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments');
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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments';
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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments"]
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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments",
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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments');
echo $response->getBody();
setUrl('{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments")
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/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments";
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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments
http GET {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PATCH
analytics.management.experiments.patch
{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId
QUERY PARAMS
accountId
webPropertyId
profileId
experimentId
BODY json
{
"accountId": "",
"created": "",
"description": "",
"editableInGaUi": false,
"endTime": "",
"equalWeighting": false,
"id": "",
"internalWebPropertyId": "",
"kind": "",
"minimumExperimentLengthInDays": 0,
"name": "",
"objectiveMetric": "",
"optimizationType": "",
"parentLink": {
"href": "",
"type": ""
},
"profileId": "",
"reasonExperimentEnded": "",
"rewriteVariationUrlsAsOriginal": false,
"selfLink": "",
"servingFramework": "",
"snippet": "",
"startTime": "",
"status": "",
"trafficCoverage": "",
"updated": "",
"variations": [
{
"name": "",
"status": "",
"url": "",
"weight": "",
"won": false
}
],
"webPropertyId": "",
"winnerConfidenceLevel": "",
"winnerFound": false
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"accountId\": \"\",\n \"created\": \"\",\n \"description\": \"\",\n \"editableInGaUi\": false,\n \"endTime\": \"\",\n \"equalWeighting\": false,\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"minimumExperimentLengthInDays\": 0,\n \"name\": \"\",\n \"objectiveMetric\": \"\",\n \"optimizationType\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"profileId\": \"\",\n \"reasonExperimentEnded\": \"\",\n \"rewriteVariationUrlsAsOriginal\": false,\n \"selfLink\": \"\",\n \"servingFramework\": \"\",\n \"snippet\": \"\",\n \"startTime\": \"\",\n \"status\": \"\",\n \"trafficCoverage\": \"\",\n \"updated\": \"\",\n \"variations\": [\n {\n \"name\": \"\",\n \"status\": \"\",\n \"url\": \"\",\n \"weight\": \"\",\n \"won\": false\n }\n ],\n \"webPropertyId\": \"\",\n \"winnerConfidenceLevel\": \"\",\n \"winnerFound\": false\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/patch "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId" {:content-type :json
:form-params {:accountId ""
:created ""
:description ""
:editableInGaUi false
:endTime ""
:equalWeighting false
:id ""
:internalWebPropertyId ""
:kind ""
:minimumExperimentLengthInDays 0
:name ""
:objectiveMetric ""
:optimizationType ""
:parentLink {:href ""
:type ""}
:profileId ""
:reasonExperimentEnded ""
:rewriteVariationUrlsAsOriginal false
:selfLink ""
:servingFramework ""
:snippet ""
:startTime ""
:status ""
:trafficCoverage ""
:updated ""
:variations [{:name ""
:status ""
:url ""
:weight ""
:won false}]
:webPropertyId ""
:winnerConfidenceLevel ""
:winnerFound false}})
require "http/client"
url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"accountId\": \"\",\n \"created\": \"\",\n \"description\": \"\",\n \"editableInGaUi\": false,\n \"endTime\": \"\",\n \"equalWeighting\": false,\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"minimumExperimentLengthInDays\": 0,\n \"name\": \"\",\n \"objectiveMetric\": \"\",\n \"optimizationType\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"profileId\": \"\",\n \"reasonExperimentEnded\": \"\",\n \"rewriteVariationUrlsAsOriginal\": false,\n \"selfLink\": \"\",\n \"servingFramework\": \"\",\n \"snippet\": \"\",\n \"startTime\": \"\",\n \"status\": \"\",\n \"trafficCoverage\": \"\",\n \"updated\": \"\",\n \"variations\": [\n {\n \"name\": \"\",\n \"status\": \"\",\n \"url\": \"\",\n \"weight\": \"\",\n \"won\": false\n }\n ],\n \"webPropertyId\": \"\",\n \"winnerConfidenceLevel\": \"\",\n \"winnerFound\": false\n}"
response = HTTP::Client.patch url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Patch,
RequestUri = new Uri("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId"),
Content = new StringContent("{\n \"accountId\": \"\",\n \"created\": \"\",\n \"description\": \"\",\n \"editableInGaUi\": false,\n \"endTime\": \"\",\n \"equalWeighting\": false,\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"minimumExperimentLengthInDays\": 0,\n \"name\": \"\",\n \"objectiveMetric\": \"\",\n \"optimizationType\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"profileId\": \"\",\n \"reasonExperimentEnded\": \"\",\n \"rewriteVariationUrlsAsOriginal\": false,\n \"selfLink\": \"\",\n \"servingFramework\": \"\",\n \"snippet\": \"\",\n \"startTime\": \"\",\n \"status\": \"\",\n \"trafficCoverage\": \"\",\n \"updated\": \"\",\n \"variations\": [\n {\n \"name\": \"\",\n \"status\": \"\",\n \"url\": \"\",\n \"weight\": \"\",\n \"won\": false\n }\n ],\n \"webPropertyId\": \"\",\n \"winnerConfidenceLevel\": \"\",\n \"winnerFound\": 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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId");
var request = new RestRequest("", Method.Patch);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"accountId\": \"\",\n \"created\": \"\",\n \"description\": \"\",\n \"editableInGaUi\": false,\n \"endTime\": \"\",\n \"equalWeighting\": false,\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"minimumExperimentLengthInDays\": 0,\n \"name\": \"\",\n \"objectiveMetric\": \"\",\n \"optimizationType\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"profileId\": \"\",\n \"reasonExperimentEnded\": \"\",\n \"rewriteVariationUrlsAsOriginal\": false,\n \"selfLink\": \"\",\n \"servingFramework\": \"\",\n \"snippet\": \"\",\n \"startTime\": \"\",\n \"status\": \"\",\n \"trafficCoverage\": \"\",\n \"updated\": \"\",\n \"variations\": [\n {\n \"name\": \"\",\n \"status\": \"\",\n \"url\": \"\",\n \"weight\": \"\",\n \"won\": false\n }\n ],\n \"webPropertyId\": \"\",\n \"winnerConfidenceLevel\": \"\",\n \"winnerFound\": false\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId"
payload := strings.NewReader("{\n \"accountId\": \"\",\n \"created\": \"\",\n \"description\": \"\",\n \"editableInGaUi\": false,\n \"endTime\": \"\",\n \"equalWeighting\": false,\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"minimumExperimentLengthInDays\": 0,\n \"name\": \"\",\n \"objectiveMetric\": \"\",\n \"optimizationType\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"profileId\": \"\",\n \"reasonExperimentEnded\": \"\",\n \"rewriteVariationUrlsAsOriginal\": false,\n \"selfLink\": \"\",\n \"servingFramework\": \"\",\n \"snippet\": \"\",\n \"startTime\": \"\",\n \"status\": \"\",\n \"trafficCoverage\": \"\",\n \"updated\": \"\",\n \"variations\": [\n {\n \"name\": \"\",\n \"status\": \"\",\n \"url\": \"\",\n \"weight\": \"\",\n \"won\": false\n }\n ],\n \"webPropertyId\": \"\",\n \"winnerConfidenceLevel\": \"\",\n \"winnerFound\": false\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
PATCH /baseUrl/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 782
{
"accountId": "",
"created": "",
"description": "",
"editableInGaUi": false,
"endTime": "",
"equalWeighting": false,
"id": "",
"internalWebPropertyId": "",
"kind": "",
"minimumExperimentLengthInDays": 0,
"name": "",
"objectiveMetric": "",
"optimizationType": "",
"parentLink": {
"href": "",
"type": ""
},
"profileId": "",
"reasonExperimentEnded": "",
"rewriteVariationUrlsAsOriginal": false,
"selfLink": "",
"servingFramework": "",
"snippet": "",
"startTime": "",
"status": "",
"trafficCoverage": "",
"updated": "",
"variations": [
{
"name": "",
"status": "",
"url": "",
"weight": "",
"won": false
}
],
"webPropertyId": "",
"winnerConfidenceLevel": "",
"winnerFound": false
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId")
.setHeader("content-type", "application/json")
.setBody("{\n \"accountId\": \"\",\n \"created\": \"\",\n \"description\": \"\",\n \"editableInGaUi\": false,\n \"endTime\": \"\",\n \"equalWeighting\": false,\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"minimumExperimentLengthInDays\": 0,\n \"name\": \"\",\n \"objectiveMetric\": \"\",\n \"optimizationType\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"profileId\": \"\",\n \"reasonExperimentEnded\": \"\",\n \"rewriteVariationUrlsAsOriginal\": false,\n \"selfLink\": \"\",\n \"servingFramework\": \"\",\n \"snippet\": \"\",\n \"startTime\": \"\",\n \"status\": \"\",\n \"trafficCoverage\": \"\",\n \"updated\": \"\",\n \"variations\": [\n {\n \"name\": \"\",\n \"status\": \"\",\n \"url\": \"\",\n \"weight\": \"\",\n \"won\": false\n }\n ],\n \"webPropertyId\": \"\",\n \"winnerConfidenceLevel\": \"\",\n \"winnerFound\": false\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId"))
.header("content-type", "application/json")
.method("PATCH", HttpRequest.BodyPublishers.ofString("{\n \"accountId\": \"\",\n \"created\": \"\",\n \"description\": \"\",\n \"editableInGaUi\": false,\n \"endTime\": \"\",\n \"equalWeighting\": false,\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"minimumExperimentLengthInDays\": 0,\n \"name\": \"\",\n \"objectiveMetric\": \"\",\n \"optimizationType\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"profileId\": \"\",\n \"reasonExperimentEnded\": \"\",\n \"rewriteVariationUrlsAsOriginal\": false,\n \"selfLink\": \"\",\n \"servingFramework\": \"\",\n \"snippet\": \"\",\n \"startTime\": \"\",\n \"status\": \"\",\n \"trafficCoverage\": \"\",\n \"updated\": \"\",\n \"variations\": [\n {\n \"name\": \"\",\n \"status\": \"\",\n \"url\": \"\",\n \"weight\": \"\",\n \"won\": false\n }\n ],\n \"webPropertyId\": \"\",\n \"winnerConfidenceLevel\": \"\",\n \"winnerFound\": 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 \"accountId\": \"\",\n \"created\": \"\",\n \"description\": \"\",\n \"editableInGaUi\": false,\n \"endTime\": \"\",\n \"equalWeighting\": false,\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"minimumExperimentLengthInDays\": 0,\n \"name\": \"\",\n \"objectiveMetric\": \"\",\n \"optimizationType\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"profileId\": \"\",\n \"reasonExperimentEnded\": \"\",\n \"rewriteVariationUrlsAsOriginal\": false,\n \"selfLink\": \"\",\n \"servingFramework\": \"\",\n \"snippet\": \"\",\n \"startTime\": \"\",\n \"status\": \"\",\n \"trafficCoverage\": \"\",\n \"updated\": \"\",\n \"variations\": [\n {\n \"name\": \"\",\n \"status\": \"\",\n \"url\": \"\",\n \"weight\": \"\",\n \"won\": false\n }\n ],\n \"webPropertyId\": \"\",\n \"winnerConfidenceLevel\": \"\",\n \"winnerFound\": false\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId")
.patch(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId")
.header("content-type", "application/json")
.body("{\n \"accountId\": \"\",\n \"created\": \"\",\n \"description\": \"\",\n \"editableInGaUi\": false,\n \"endTime\": \"\",\n \"equalWeighting\": false,\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"minimumExperimentLengthInDays\": 0,\n \"name\": \"\",\n \"objectiveMetric\": \"\",\n \"optimizationType\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"profileId\": \"\",\n \"reasonExperimentEnded\": \"\",\n \"rewriteVariationUrlsAsOriginal\": false,\n \"selfLink\": \"\",\n \"servingFramework\": \"\",\n \"snippet\": \"\",\n \"startTime\": \"\",\n \"status\": \"\",\n \"trafficCoverage\": \"\",\n \"updated\": \"\",\n \"variations\": [\n {\n \"name\": \"\",\n \"status\": \"\",\n \"url\": \"\",\n \"weight\": \"\",\n \"won\": false\n }\n ],\n \"webPropertyId\": \"\",\n \"winnerConfidenceLevel\": \"\",\n \"winnerFound\": false\n}")
.asString();
const data = JSON.stringify({
accountId: '',
created: '',
description: '',
editableInGaUi: false,
endTime: '',
equalWeighting: false,
id: '',
internalWebPropertyId: '',
kind: '',
minimumExperimentLengthInDays: 0,
name: '',
objectiveMetric: '',
optimizationType: '',
parentLink: {
href: '',
type: ''
},
profileId: '',
reasonExperimentEnded: '',
rewriteVariationUrlsAsOriginal: false,
selfLink: '',
servingFramework: '',
snippet: '',
startTime: '',
status: '',
trafficCoverage: '',
updated: '',
variations: [
{
name: '',
status: '',
url: '',
weight: '',
won: false
}
],
webPropertyId: '',
winnerConfidenceLevel: '',
winnerFound: false
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PATCH', '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PATCH',
url: '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId',
headers: {'content-type': 'application/json'},
data: {
accountId: '',
created: '',
description: '',
editableInGaUi: false,
endTime: '',
equalWeighting: false,
id: '',
internalWebPropertyId: '',
kind: '',
minimumExperimentLengthInDays: 0,
name: '',
objectiveMetric: '',
optimizationType: '',
parentLink: {href: '', type: ''},
profileId: '',
reasonExperimentEnded: '',
rewriteVariationUrlsAsOriginal: false,
selfLink: '',
servingFramework: '',
snippet: '',
startTime: '',
status: '',
trafficCoverage: '',
updated: '',
variations: [{name: '', status: '', url: '', weight: '', won: false}],
webPropertyId: '',
winnerConfidenceLevel: '',
winnerFound: false
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"accountId":"","created":"","description":"","editableInGaUi":false,"endTime":"","equalWeighting":false,"id":"","internalWebPropertyId":"","kind":"","minimumExperimentLengthInDays":0,"name":"","objectiveMetric":"","optimizationType":"","parentLink":{"href":"","type":""},"profileId":"","reasonExperimentEnded":"","rewriteVariationUrlsAsOriginal":false,"selfLink":"","servingFramework":"","snippet":"","startTime":"","status":"","trafficCoverage":"","updated":"","variations":[{"name":"","status":"","url":"","weight":"","won":false}],"webPropertyId":"","winnerConfidenceLevel":"","winnerFound":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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId',
method: 'PATCH',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "accountId": "",\n "created": "",\n "description": "",\n "editableInGaUi": false,\n "endTime": "",\n "equalWeighting": false,\n "id": "",\n "internalWebPropertyId": "",\n "kind": "",\n "minimumExperimentLengthInDays": 0,\n "name": "",\n "objectiveMetric": "",\n "optimizationType": "",\n "parentLink": {\n "href": "",\n "type": ""\n },\n "profileId": "",\n "reasonExperimentEnded": "",\n "rewriteVariationUrlsAsOriginal": false,\n "selfLink": "",\n "servingFramework": "",\n "snippet": "",\n "startTime": "",\n "status": "",\n "trafficCoverage": "",\n "updated": "",\n "variations": [\n {\n "name": "",\n "status": "",\n "url": "",\n "weight": "",\n "won": false\n }\n ],\n "webPropertyId": "",\n "winnerConfidenceLevel": "",\n "winnerFound": 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 \"accountId\": \"\",\n \"created\": \"\",\n \"description\": \"\",\n \"editableInGaUi\": false,\n \"endTime\": \"\",\n \"equalWeighting\": false,\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"minimumExperimentLengthInDays\": 0,\n \"name\": \"\",\n \"objectiveMetric\": \"\",\n \"optimizationType\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"profileId\": \"\",\n \"reasonExperimentEnded\": \"\",\n \"rewriteVariationUrlsAsOriginal\": false,\n \"selfLink\": \"\",\n \"servingFramework\": \"\",\n \"snippet\": \"\",\n \"startTime\": \"\",\n \"status\": \"\",\n \"trafficCoverage\": \"\",\n \"updated\": \"\",\n \"variations\": [\n {\n \"name\": \"\",\n \"status\": \"\",\n \"url\": \"\",\n \"weight\": \"\",\n \"won\": false\n }\n ],\n \"webPropertyId\": \"\",\n \"winnerConfidenceLevel\": \"\",\n \"winnerFound\": false\n}")
val request = Request.Builder()
.url("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId")
.patch(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PATCH',
hostname: 'example.com',
port: null,
path: '/baseUrl/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
accountId: '',
created: '',
description: '',
editableInGaUi: false,
endTime: '',
equalWeighting: false,
id: '',
internalWebPropertyId: '',
kind: '',
minimumExperimentLengthInDays: 0,
name: '',
objectiveMetric: '',
optimizationType: '',
parentLink: {href: '', type: ''},
profileId: '',
reasonExperimentEnded: '',
rewriteVariationUrlsAsOriginal: false,
selfLink: '',
servingFramework: '',
snippet: '',
startTime: '',
status: '',
trafficCoverage: '',
updated: '',
variations: [{name: '', status: '', url: '', weight: '', won: false}],
webPropertyId: '',
winnerConfidenceLevel: '',
winnerFound: false
}));
req.end();
const request = require('request');
const options = {
method: 'PATCH',
url: '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId',
headers: {'content-type': 'application/json'},
body: {
accountId: '',
created: '',
description: '',
editableInGaUi: false,
endTime: '',
equalWeighting: false,
id: '',
internalWebPropertyId: '',
kind: '',
minimumExperimentLengthInDays: 0,
name: '',
objectiveMetric: '',
optimizationType: '',
parentLink: {href: '', type: ''},
profileId: '',
reasonExperimentEnded: '',
rewriteVariationUrlsAsOriginal: false,
selfLink: '',
servingFramework: '',
snippet: '',
startTime: '',
status: '',
trafficCoverage: '',
updated: '',
variations: [{name: '', status: '', url: '', weight: '', won: false}],
webPropertyId: '',
winnerConfidenceLevel: '',
winnerFound: 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('PATCH', '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
accountId: '',
created: '',
description: '',
editableInGaUi: false,
endTime: '',
equalWeighting: false,
id: '',
internalWebPropertyId: '',
kind: '',
minimumExperimentLengthInDays: 0,
name: '',
objectiveMetric: '',
optimizationType: '',
parentLink: {
href: '',
type: ''
},
profileId: '',
reasonExperimentEnded: '',
rewriteVariationUrlsAsOriginal: false,
selfLink: '',
servingFramework: '',
snippet: '',
startTime: '',
status: '',
trafficCoverage: '',
updated: '',
variations: [
{
name: '',
status: '',
url: '',
weight: '',
won: false
}
],
webPropertyId: '',
winnerConfidenceLevel: '',
winnerFound: 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: 'PATCH',
url: '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId',
headers: {'content-type': 'application/json'},
data: {
accountId: '',
created: '',
description: '',
editableInGaUi: false,
endTime: '',
equalWeighting: false,
id: '',
internalWebPropertyId: '',
kind: '',
minimumExperimentLengthInDays: 0,
name: '',
objectiveMetric: '',
optimizationType: '',
parentLink: {href: '', type: ''},
profileId: '',
reasonExperimentEnded: '',
rewriteVariationUrlsAsOriginal: false,
selfLink: '',
servingFramework: '',
snippet: '',
startTime: '',
status: '',
trafficCoverage: '',
updated: '',
variations: [{name: '', status: '', url: '', weight: '', won: false}],
webPropertyId: '',
winnerConfidenceLevel: '',
winnerFound: false
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"accountId":"","created":"","description":"","editableInGaUi":false,"endTime":"","equalWeighting":false,"id":"","internalWebPropertyId":"","kind":"","minimumExperimentLengthInDays":0,"name":"","objectiveMetric":"","optimizationType":"","parentLink":{"href":"","type":""},"profileId":"","reasonExperimentEnded":"","rewriteVariationUrlsAsOriginal":false,"selfLink":"","servingFramework":"","snippet":"","startTime":"","status":"","trafficCoverage":"","updated":"","variations":[{"name":"","status":"","url":"","weight":"","won":false}],"webPropertyId":"","winnerConfidenceLevel":"","winnerFound":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 = @{ @"accountId": @"",
@"created": @"",
@"description": @"",
@"editableInGaUi": @NO,
@"endTime": @"",
@"equalWeighting": @NO,
@"id": @"",
@"internalWebPropertyId": @"",
@"kind": @"",
@"minimumExperimentLengthInDays": @0,
@"name": @"",
@"objectiveMetric": @"",
@"optimizationType": @"",
@"parentLink": @{ @"href": @"", @"type": @"" },
@"profileId": @"",
@"reasonExperimentEnded": @"",
@"rewriteVariationUrlsAsOriginal": @NO,
@"selfLink": @"",
@"servingFramework": @"",
@"snippet": @"",
@"startTime": @"",
@"status": @"",
@"trafficCoverage": @"",
@"updated": @"",
@"variations": @[ @{ @"name": @"", @"status": @"", @"url": @"", @"weight": @"", @"won": @NO } ],
@"webPropertyId": @"",
@"winnerConfidenceLevel": @"",
@"winnerFound": @NO };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PATCH"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"accountId\": \"\",\n \"created\": \"\",\n \"description\": \"\",\n \"editableInGaUi\": false,\n \"endTime\": \"\",\n \"equalWeighting\": false,\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"minimumExperimentLengthInDays\": 0,\n \"name\": \"\",\n \"objectiveMetric\": \"\",\n \"optimizationType\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"profileId\": \"\",\n \"reasonExperimentEnded\": \"\",\n \"rewriteVariationUrlsAsOriginal\": false,\n \"selfLink\": \"\",\n \"servingFramework\": \"\",\n \"snippet\": \"\",\n \"startTime\": \"\",\n \"status\": \"\",\n \"trafficCoverage\": \"\",\n \"updated\": \"\",\n \"variations\": [\n {\n \"name\": \"\",\n \"status\": \"\",\n \"url\": \"\",\n \"weight\": \"\",\n \"won\": false\n }\n ],\n \"webPropertyId\": \"\",\n \"winnerConfidenceLevel\": \"\",\n \"winnerFound\": false\n}" in
Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'accountId' => '',
'created' => '',
'description' => '',
'editableInGaUi' => null,
'endTime' => '',
'equalWeighting' => null,
'id' => '',
'internalWebPropertyId' => '',
'kind' => '',
'minimumExperimentLengthInDays' => 0,
'name' => '',
'objectiveMetric' => '',
'optimizationType' => '',
'parentLink' => [
'href' => '',
'type' => ''
],
'profileId' => '',
'reasonExperimentEnded' => '',
'rewriteVariationUrlsAsOriginal' => null,
'selfLink' => '',
'servingFramework' => '',
'snippet' => '',
'startTime' => '',
'status' => '',
'trafficCoverage' => '',
'updated' => '',
'variations' => [
[
'name' => '',
'status' => '',
'url' => '',
'weight' => '',
'won' => null
]
],
'webPropertyId' => '',
'winnerConfidenceLevel' => '',
'winnerFound' => 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('PATCH', '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId', [
'body' => '{
"accountId": "",
"created": "",
"description": "",
"editableInGaUi": false,
"endTime": "",
"equalWeighting": false,
"id": "",
"internalWebPropertyId": "",
"kind": "",
"minimumExperimentLengthInDays": 0,
"name": "",
"objectiveMetric": "",
"optimizationType": "",
"parentLink": {
"href": "",
"type": ""
},
"profileId": "",
"reasonExperimentEnded": "",
"rewriteVariationUrlsAsOriginal": false,
"selfLink": "",
"servingFramework": "",
"snippet": "",
"startTime": "",
"status": "",
"trafficCoverage": "",
"updated": "",
"variations": [
{
"name": "",
"status": "",
"url": "",
"weight": "",
"won": false
}
],
"webPropertyId": "",
"winnerConfidenceLevel": "",
"winnerFound": false
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'accountId' => '',
'created' => '',
'description' => '',
'editableInGaUi' => null,
'endTime' => '',
'equalWeighting' => null,
'id' => '',
'internalWebPropertyId' => '',
'kind' => '',
'minimumExperimentLengthInDays' => 0,
'name' => '',
'objectiveMetric' => '',
'optimizationType' => '',
'parentLink' => [
'href' => '',
'type' => ''
],
'profileId' => '',
'reasonExperimentEnded' => '',
'rewriteVariationUrlsAsOriginal' => null,
'selfLink' => '',
'servingFramework' => '',
'snippet' => '',
'startTime' => '',
'status' => '',
'trafficCoverage' => '',
'updated' => '',
'variations' => [
[
'name' => '',
'status' => '',
'url' => '',
'weight' => '',
'won' => null
]
],
'webPropertyId' => '',
'winnerConfidenceLevel' => '',
'winnerFound' => null
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'accountId' => '',
'created' => '',
'description' => '',
'editableInGaUi' => null,
'endTime' => '',
'equalWeighting' => null,
'id' => '',
'internalWebPropertyId' => '',
'kind' => '',
'minimumExperimentLengthInDays' => 0,
'name' => '',
'objectiveMetric' => '',
'optimizationType' => '',
'parentLink' => [
'href' => '',
'type' => ''
],
'profileId' => '',
'reasonExperimentEnded' => '',
'rewriteVariationUrlsAsOriginal' => null,
'selfLink' => '',
'servingFramework' => '',
'snippet' => '',
'startTime' => '',
'status' => '',
'trafficCoverage' => '',
'updated' => '',
'variations' => [
[
'name' => '',
'status' => '',
'url' => '',
'weight' => '',
'won' => null
]
],
'webPropertyId' => '',
'winnerConfidenceLevel' => '',
'winnerFound' => null
]));
$request->setRequestUrl('{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId');
$request->setRequestMethod('PATCH');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"accountId": "",
"created": "",
"description": "",
"editableInGaUi": false,
"endTime": "",
"equalWeighting": false,
"id": "",
"internalWebPropertyId": "",
"kind": "",
"minimumExperimentLengthInDays": 0,
"name": "",
"objectiveMetric": "",
"optimizationType": "",
"parentLink": {
"href": "",
"type": ""
},
"profileId": "",
"reasonExperimentEnded": "",
"rewriteVariationUrlsAsOriginal": false,
"selfLink": "",
"servingFramework": "",
"snippet": "",
"startTime": "",
"status": "",
"trafficCoverage": "",
"updated": "",
"variations": [
{
"name": "",
"status": "",
"url": "",
"weight": "",
"won": false
}
],
"webPropertyId": "",
"winnerConfidenceLevel": "",
"winnerFound": false
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"accountId": "",
"created": "",
"description": "",
"editableInGaUi": false,
"endTime": "",
"equalWeighting": false,
"id": "",
"internalWebPropertyId": "",
"kind": "",
"minimumExperimentLengthInDays": 0,
"name": "",
"objectiveMetric": "",
"optimizationType": "",
"parentLink": {
"href": "",
"type": ""
},
"profileId": "",
"reasonExperimentEnded": "",
"rewriteVariationUrlsAsOriginal": false,
"selfLink": "",
"servingFramework": "",
"snippet": "",
"startTime": "",
"status": "",
"trafficCoverage": "",
"updated": "",
"variations": [
{
"name": "",
"status": "",
"url": "",
"weight": "",
"won": false
}
],
"webPropertyId": "",
"winnerConfidenceLevel": "",
"winnerFound": false
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"accountId\": \"\",\n \"created\": \"\",\n \"description\": \"\",\n \"editableInGaUi\": false,\n \"endTime\": \"\",\n \"equalWeighting\": false,\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"minimumExperimentLengthInDays\": 0,\n \"name\": \"\",\n \"objectiveMetric\": \"\",\n \"optimizationType\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"profileId\": \"\",\n \"reasonExperimentEnded\": \"\",\n \"rewriteVariationUrlsAsOriginal\": false,\n \"selfLink\": \"\",\n \"servingFramework\": \"\",\n \"snippet\": \"\",\n \"startTime\": \"\",\n \"status\": \"\",\n \"trafficCoverage\": \"\",\n \"updated\": \"\",\n \"variations\": [\n {\n \"name\": \"\",\n \"status\": \"\",\n \"url\": \"\",\n \"weight\": \"\",\n \"won\": false\n }\n ],\n \"webPropertyId\": \"\",\n \"winnerConfidenceLevel\": \"\",\n \"winnerFound\": false\n}"
headers = { 'content-type': "application/json" }
conn.request("PATCH", "/baseUrl/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId"
payload = {
"accountId": "",
"created": "",
"description": "",
"editableInGaUi": False,
"endTime": "",
"equalWeighting": False,
"id": "",
"internalWebPropertyId": "",
"kind": "",
"minimumExperimentLengthInDays": 0,
"name": "",
"objectiveMetric": "",
"optimizationType": "",
"parentLink": {
"href": "",
"type": ""
},
"profileId": "",
"reasonExperimentEnded": "",
"rewriteVariationUrlsAsOriginal": False,
"selfLink": "",
"servingFramework": "",
"snippet": "",
"startTime": "",
"status": "",
"trafficCoverage": "",
"updated": "",
"variations": [
{
"name": "",
"status": "",
"url": "",
"weight": "",
"won": False
}
],
"webPropertyId": "",
"winnerConfidenceLevel": "",
"winnerFound": False
}
headers = {"content-type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId"
payload <- "{\n \"accountId\": \"\",\n \"created\": \"\",\n \"description\": \"\",\n \"editableInGaUi\": false,\n \"endTime\": \"\",\n \"equalWeighting\": false,\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"minimumExperimentLengthInDays\": 0,\n \"name\": \"\",\n \"objectiveMetric\": \"\",\n \"optimizationType\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"profileId\": \"\",\n \"reasonExperimentEnded\": \"\",\n \"rewriteVariationUrlsAsOriginal\": false,\n \"selfLink\": \"\",\n \"servingFramework\": \"\",\n \"snippet\": \"\",\n \"startTime\": \"\",\n \"status\": \"\",\n \"trafficCoverage\": \"\",\n \"updated\": \"\",\n \"variations\": [\n {\n \"name\": \"\",\n \"status\": \"\",\n \"url\": \"\",\n \"weight\": \"\",\n \"won\": false\n }\n ],\n \"webPropertyId\": \"\",\n \"winnerConfidenceLevel\": \"\",\n \"winnerFound\": false\n}"
encode <- "json"
response <- VERB("PATCH", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"accountId\": \"\",\n \"created\": \"\",\n \"description\": \"\",\n \"editableInGaUi\": false,\n \"endTime\": \"\",\n \"equalWeighting\": false,\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"minimumExperimentLengthInDays\": 0,\n \"name\": \"\",\n \"objectiveMetric\": \"\",\n \"optimizationType\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"profileId\": \"\",\n \"reasonExperimentEnded\": \"\",\n \"rewriteVariationUrlsAsOriginal\": false,\n \"selfLink\": \"\",\n \"servingFramework\": \"\",\n \"snippet\": \"\",\n \"startTime\": \"\",\n \"status\": \"\",\n \"trafficCoverage\": \"\",\n \"updated\": \"\",\n \"variations\": [\n {\n \"name\": \"\",\n \"status\": \"\",\n \"url\": \"\",\n \"weight\": \"\",\n \"won\": false\n }\n ],\n \"webPropertyId\": \"\",\n \"winnerConfidenceLevel\": \"\",\n \"winnerFound\": 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.patch('/baseUrl/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId') do |req|
req.body = "{\n \"accountId\": \"\",\n \"created\": \"\",\n \"description\": \"\",\n \"editableInGaUi\": false,\n \"endTime\": \"\",\n \"equalWeighting\": false,\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"minimumExperimentLengthInDays\": 0,\n \"name\": \"\",\n \"objectiveMetric\": \"\",\n \"optimizationType\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"profileId\": \"\",\n \"reasonExperimentEnded\": \"\",\n \"rewriteVariationUrlsAsOriginal\": false,\n \"selfLink\": \"\",\n \"servingFramework\": \"\",\n \"snippet\": \"\",\n \"startTime\": \"\",\n \"status\": \"\",\n \"trafficCoverage\": \"\",\n \"updated\": \"\",\n \"variations\": [\n {\n \"name\": \"\",\n \"status\": \"\",\n \"url\": \"\",\n \"weight\": \"\",\n \"won\": false\n }\n ],\n \"webPropertyId\": \"\",\n \"winnerConfidenceLevel\": \"\",\n \"winnerFound\": false\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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId";
let payload = json!({
"accountId": "",
"created": "",
"description": "",
"editableInGaUi": false,
"endTime": "",
"equalWeighting": false,
"id": "",
"internalWebPropertyId": "",
"kind": "",
"minimumExperimentLengthInDays": 0,
"name": "",
"objectiveMetric": "",
"optimizationType": "",
"parentLink": json!({
"href": "",
"type": ""
}),
"profileId": "",
"reasonExperimentEnded": "",
"rewriteVariationUrlsAsOriginal": false,
"selfLink": "",
"servingFramework": "",
"snippet": "",
"startTime": "",
"status": "",
"trafficCoverage": "",
"updated": "",
"variations": (
json!({
"name": "",
"status": "",
"url": "",
"weight": "",
"won": false
})
),
"webPropertyId": "",
"winnerConfidenceLevel": "",
"winnerFound": false
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PATCH").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PATCH \
--url {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId \
--header 'content-type: application/json' \
--data '{
"accountId": "",
"created": "",
"description": "",
"editableInGaUi": false,
"endTime": "",
"equalWeighting": false,
"id": "",
"internalWebPropertyId": "",
"kind": "",
"minimumExperimentLengthInDays": 0,
"name": "",
"objectiveMetric": "",
"optimizationType": "",
"parentLink": {
"href": "",
"type": ""
},
"profileId": "",
"reasonExperimentEnded": "",
"rewriteVariationUrlsAsOriginal": false,
"selfLink": "",
"servingFramework": "",
"snippet": "",
"startTime": "",
"status": "",
"trafficCoverage": "",
"updated": "",
"variations": [
{
"name": "",
"status": "",
"url": "",
"weight": "",
"won": false
}
],
"webPropertyId": "",
"winnerConfidenceLevel": "",
"winnerFound": false
}'
echo '{
"accountId": "",
"created": "",
"description": "",
"editableInGaUi": false,
"endTime": "",
"equalWeighting": false,
"id": "",
"internalWebPropertyId": "",
"kind": "",
"minimumExperimentLengthInDays": 0,
"name": "",
"objectiveMetric": "",
"optimizationType": "",
"parentLink": {
"href": "",
"type": ""
},
"profileId": "",
"reasonExperimentEnded": "",
"rewriteVariationUrlsAsOriginal": false,
"selfLink": "",
"servingFramework": "",
"snippet": "",
"startTime": "",
"status": "",
"trafficCoverage": "",
"updated": "",
"variations": [
{
"name": "",
"status": "",
"url": "",
"weight": "",
"won": false
}
],
"webPropertyId": "",
"winnerConfidenceLevel": "",
"winnerFound": false
}' | \
http PATCH {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId \
content-type:application/json
wget --quiet \
--method PATCH \
--header 'content-type: application/json' \
--body-data '{\n "accountId": "",\n "created": "",\n "description": "",\n "editableInGaUi": false,\n "endTime": "",\n "equalWeighting": false,\n "id": "",\n "internalWebPropertyId": "",\n "kind": "",\n "minimumExperimentLengthInDays": 0,\n "name": "",\n "objectiveMetric": "",\n "optimizationType": "",\n "parentLink": {\n "href": "",\n "type": ""\n },\n "profileId": "",\n "reasonExperimentEnded": "",\n "rewriteVariationUrlsAsOriginal": false,\n "selfLink": "",\n "servingFramework": "",\n "snippet": "",\n "startTime": "",\n "status": "",\n "trafficCoverage": "",\n "updated": "",\n "variations": [\n {\n "name": "",\n "status": "",\n "url": "",\n "weight": "",\n "won": false\n }\n ],\n "webPropertyId": "",\n "winnerConfidenceLevel": "",\n "winnerFound": false\n}' \
--output-document \
- {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"accountId": "",
"created": "",
"description": "",
"editableInGaUi": false,
"endTime": "",
"equalWeighting": false,
"id": "",
"internalWebPropertyId": "",
"kind": "",
"minimumExperimentLengthInDays": 0,
"name": "",
"objectiveMetric": "",
"optimizationType": "",
"parentLink": [
"href": "",
"type": ""
],
"profileId": "",
"reasonExperimentEnded": "",
"rewriteVariationUrlsAsOriginal": false,
"selfLink": "",
"servingFramework": "",
"snippet": "",
"startTime": "",
"status": "",
"trafficCoverage": "",
"updated": "",
"variations": [
[
"name": "",
"status": "",
"url": "",
"weight": "",
"won": false
]
],
"webPropertyId": "",
"winnerConfidenceLevel": "",
"winnerFound": false
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PUT
analytics.management.experiments.update
{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId
QUERY PARAMS
accountId
webPropertyId
profileId
experimentId
BODY json
{
"accountId": "",
"created": "",
"description": "",
"editableInGaUi": false,
"endTime": "",
"equalWeighting": false,
"id": "",
"internalWebPropertyId": "",
"kind": "",
"minimumExperimentLengthInDays": 0,
"name": "",
"objectiveMetric": "",
"optimizationType": "",
"parentLink": {
"href": "",
"type": ""
},
"profileId": "",
"reasonExperimentEnded": "",
"rewriteVariationUrlsAsOriginal": false,
"selfLink": "",
"servingFramework": "",
"snippet": "",
"startTime": "",
"status": "",
"trafficCoverage": "",
"updated": "",
"variations": [
{
"name": "",
"status": "",
"url": "",
"weight": "",
"won": false
}
],
"webPropertyId": "",
"winnerConfidenceLevel": "",
"winnerFound": false
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"accountId\": \"\",\n \"created\": \"\",\n \"description\": \"\",\n \"editableInGaUi\": false,\n \"endTime\": \"\",\n \"equalWeighting\": false,\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"minimumExperimentLengthInDays\": 0,\n \"name\": \"\",\n \"objectiveMetric\": \"\",\n \"optimizationType\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"profileId\": \"\",\n \"reasonExperimentEnded\": \"\",\n \"rewriteVariationUrlsAsOriginal\": false,\n \"selfLink\": \"\",\n \"servingFramework\": \"\",\n \"snippet\": \"\",\n \"startTime\": \"\",\n \"status\": \"\",\n \"trafficCoverage\": \"\",\n \"updated\": \"\",\n \"variations\": [\n {\n \"name\": \"\",\n \"status\": \"\",\n \"url\": \"\",\n \"weight\": \"\",\n \"won\": false\n }\n ],\n \"webPropertyId\": \"\",\n \"winnerConfidenceLevel\": \"\",\n \"winnerFound\": false\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId" {:content-type :json
:form-params {:accountId ""
:created ""
:description ""
:editableInGaUi false
:endTime ""
:equalWeighting false
:id ""
:internalWebPropertyId ""
:kind ""
:minimumExperimentLengthInDays 0
:name ""
:objectiveMetric ""
:optimizationType ""
:parentLink {:href ""
:type ""}
:profileId ""
:reasonExperimentEnded ""
:rewriteVariationUrlsAsOriginal false
:selfLink ""
:servingFramework ""
:snippet ""
:startTime ""
:status ""
:trafficCoverage ""
:updated ""
:variations [{:name ""
:status ""
:url ""
:weight ""
:won false}]
:webPropertyId ""
:winnerConfidenceLevel ""
:winnerFound false}})
require "http/client"
url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"accountId\": \"\",\n \"created\": \"\",\n \"description\": \"\",\n \"editableInGaUi\": false,\n \"endTime\": \"\",\n \"equalWeighting\": false,\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"minimumExperimentLengthInDays\": 0,\n \"name\": \"\",\n \"objectiveMetric\": \"\",\n \"optimizationType\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"profileId\": \"\",\n \"reasonExperimentEnded\": \"\",\n \"rewriteVariationUrlsAsOriginal\": false,\n \"selfLink\": \"\",\n \"servingFramework\": \"\",\n \"snippet\": \"\",\n \"startTime\": \"\",\n \"status\": \"\",\n \"trafficCoverage\": \"\",\n \"updated\": \"\",\n \"variations\": [\n {\n \"name\": \"\",\n \"status\": \"\",\n \"url\": \"\",\n \"weight\": \"\",\n \"won\": false\n }\n ],\n \"webPropertyId\": \"\",\n \"winnerConfidenceLevel\": \"\",\n \"winnerFound\": false\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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId"),
Content = new StringContent("{\n \"accountId\": \"\",\n \"created\": \"\",\n \"description\": \"\",\n \"editableInGaUi\": false,\n \"endTime\": \"\",\n \"equalWeighting\": false,\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"minimumExperimentLengthInDays\": 0,\n \"name\": \"\",\n \"objectiveMetric\": \"\",\n \"optimizationType\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"profileId\": \"\",\n \"reasonExperimentEnded\": \"\",\n \"rewriteVariationUrlsAsOriginal\": false,\n \"selfLink\": \"\",\n \"servingFramework\": \"\",\n \"snippet\": \"\",\n \"startTime\": \"\",\n \"status\": \"\",\n \"trafficCoverage\": \"\",\n \"updated\": \"\",\n \"variations\": [\n {\n \"name\": \"\",\n \"status\": \"\",\n \"url\": \"\",\n \"weight\": \"\",\n \"won\": false\n }\n ],\n \"webPropertyId\": \"\",\n \"winnerConfidenceLevel\": \"\",\n \"winnerFound\": 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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"accountId\": \"\",\n \"created\": \"\",\n \"description\": \"\",\n \"editableInGaUi\": false,\n \"endTime\": \"\",\n \"equalWeighting\": false,\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"minimumExperimentLengthInDays\": 0,\n \"name\": \"\",\n \"objectiveMetric\": \"\",\n \"optimizationType\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"profileId\": \"\",\n \"reasonExperimentEnded\": \"\",\n \"rewriteVariationUrlsAsOriginal\": false,\n \"selfLink\": \"\",\n \"servingFramework\": \"\",\n \"snippet\": \"\",\n \"startTime\": \"\",\n \"status\": \"\",\n \"trafficCoverage\": \"\",\n \"updated\": \"\",\n \"variations\": [\n {\n \"name\": \"\",\n \"status\": \"\",\n \"url\": \"\",\n \"weight\": \"\",\n \"won\": false\n }\n ],\n \"webPropertyId\": \"\",\n \"winnerConfidenceLevel\": \"\",\n \"winnerFound\": false\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId"
payload := strings.NewReader("{\n \"accountId\": \"\",\n \"created\": \"\",\n \"description\": \"\",\n \"editableInGaUi\": false,\n \"endTime\": \"\",\n \"equalWeighting\": false,\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"minimumExperimentLengthInDays\": 0,\n \"name\": \"\",\n \"objectiveMetric\": \"\",\n \"optimizationType\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"profileId\": \"\",\n \"reasonExperimentEnded\": \"\",\n \"rewriteVariationUrlsAsOriginal\": false,\n \"selfLink\": \"\",\n \"servingFramework\": \"\",\n \"snippet\": \"\",\n \"startTime\": \"\",\n \"status\": \"\",\n \"trafficCoverage\": \"\",\n \"updated\": \"\",\n \"variations\": [\n {\n \"name\": \"\",\n \"status\": \"\",\n \"url\": \"\",\n \"weight\": \"\",\n \"won\": false\n }\n ],\n \"webPropertyId\": \"\",\n \"winnerConfidenceLevel\": \"\",\n \"winnerFound\": false\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/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 782
{
"accountId": "",
"created": "",
"description": "",
"editableInGaUi": false,
"endTime": "",
"equalWeighting": false,
"id": "",
"internalWebPropertyId": "",
"kind": "",
"minimumExperimentLengthInDays": 0,
"name": "",
"objectiveMetric": "",
"optimizationType": "",
"parentLink": {
"href": "",
"type": ""
},
"profileId": "",
"reasonExperimentEnded": "",
"rewriteVariationUrlsAsOriginal": false,
"selfLink": "",
"servingFramework": "",
"snippet": "",
"startTime": "",
"status": "",
"trafficCoverage": "",
"updated": "",
"variations": [
{
"name": "",
"status": "",
"url": "",
"weight": "",
"won": false
}
],
"webPropertyId": "",
"winnerConfidenceLevel": "",
"winnerFound": false
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId")
.setHeader("content-type", "application/json")
.setBody("{\n \"accountId\": \"\",\n \"created\": \"\",\n \"description\": \"\",\n \"editableInGaUi\": false,\n \"endTime\": \"\",\n \"equalWeighting\": false,\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"minimumExperimentLengthInDays\": 0,\n \"name\": \"\",\n \"objectiveMetric\": \"\",\n \"optimizationType\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"profileId\": \"\",\n \"reasonExperimentEnded\": \"\",\n \"rewriteVariationUrlsAsOriginal\": false,\n \"selfLink\": \"\",\n \"servingFramework\": \"\",\n \"snippet\": \"\",\n \"startTime\": \"\",\n \"status\": \"\",\n \"trafficCoverage\": \"\",\n \"updated\": \"\",\n \"variations\": [\n {\n \"name\": \"\",\n \"status\": \"\",\n \"url\": \"\",\n \"weight\": \"\",\n \"won\": false\n }\n ],\n \"webPropertyId\": \"\",\n \"winnerConfidenceLevel\": \"\",\n \"winnerFound\": false\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"accountId\": \"\",\n \"created\": \"\",\n \"description\": \"\",\n \"editableInGaUi\": false,\n \"endTime\": \"\",\n \"equalWeighting\": false,\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"minimumExperimentLengthInDays\": 0,\n \"name\": \"\",\n \"objectiveMetric\": \"\",\n \"optimizationType\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"profileId\": \"\",\n \"reasonExperimentEnded\": \"\",\n \"rewriteVariationUrlsAsOriginal\": false,\n \"selfLink\": \"\",\n \"servingFramework\": \"\",\n \"snippet\": \"\",\n \"startTime\": \"\",\n \"status\": \"\",\n \"trafficCoverage\": \"\",\n \"updated\": \"\",\n \"variations\": [\n {\n \"name\": \"\",\n \"status\": \"\",\n \"url\": \"\",\n \"weight\": \"\",\n \"won\": false\n }\n ],\n \"webPropertyId\": \"\",\n \"winnerConfidenceLevel\": \"\",\n \"winnerFound\": 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 \"accountId\": \"\",\n \"created\": \"\",\n \"description\": \"\",\n \"editableInGaUi\": false,\n \"endTime\": \"\",\n \"equalWeighting\": false,\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"minimumExperimentLengthInDays\": 0,\n \"name\": \"\",\n \"objectiveMetric\": \"\",\n \"optimizationType\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"profileId\": \"\",\n \"reasonExperimentEnded\": \"\",\n \"rewriteVariationUrlsAsOriginal\": false,\n \"selfLink\": \"\",\n \"servingFramework\": \"\",\n \"snippet\": \"\",\n \"startTime\": \"\",\n \"status\": \"\",\n \"trafficCoverage\": \"\",\n \"updated\": \"\",\n \"variations\": [\n {\n \"name\": \"\",\n \"status\": \"\",\n \"url\": \"\",\n \"weight\": \"\",\n \"won\": false\n }\n ],\n \"webPropertyId\": \"\",\n \"winnerConfidenceLevel\": \"\",\n \"winnerFound\": false\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId")
.header("content-type", "application/json")
.body("{\n \"accountId\": \"\",\n \"created\": \"\",\n \"description\": \"\",\n \"editableInGaUi\": false,\n \"endTime\": \"\",\n \"equalWeighting\": false,\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"minimumExperimentLengthInDays\": 0,\n \"name\": \"\",\n \"objectiveMetric\": \"\",\n \"optimizationType\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"profileId\": \"\",\n \"reasonExperimentEnded\": \"\",\n \"rewriteVariationUrlsAsOriginal\": false,\n \"selfLink\": \"\",\n \"servingFramework\": \"\",\n \"snippet\": \"\",\n \"startTime\": \"\",\n \"status\": \"\",\n \"trafficCoverage\": \"\",\n \"updated\": \"\",\n \"variations\": [\n {\n \"name\": \"\",\n \"status\": \"\",\n \"url\": \"\",\n \"weight\": \"\",\n \"won\": false\n }\n ],\n \"webPropertyId\": \"\",\n \"winnerConfidenceLevel\": \"\",\n \"winnerFound\": false\n}")
.asString();
const data = JSON.stringify({
accountId: '',
created: '',
description: '',
editableInGaUi: false,
endTime: '',
equalWeighting: false,
id: '',
internalWebPropertyId: '',
kind: '',
minimumExperimentLengthInDays: 0,
name: '',
objectiveMetric: '',
optimizationType: '',
parentLink: {
href: '',
type: ''
},
profileId: '',
reasonExperimentEnded: '',
rewriteVariationUrlsAsOriginal: false,
selfLink: '',
servingFramework: '',
snippet: '',
startTime: '',
status: '',
trafficCoverage: '',
updated: '',
variations: [
{
name: '',
status: '',
url: '',
weight: '',
won: false
}
],
webPropertyId: '',
winnerConfidenceLevel: '',
winnerFound: false
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId',
headers: {'content-type': 'application/json'},
data: {
accountId: '',
created: '',
description: '',
editableInGaUi: false,
endTime: '',
equalWeighting: false,
id: '',
internalWebPropertyId: '',
kind: '',
minimumExperimentLengthInDays: 0,
name: '',
objectiveMetric: '',
optimizationType: '',
parentLink: {href: '', type: ''},
profileId: '',
reasonExperimentEnded: '',
rewriteVariationUrlsAsOriginal: false,
selfLink: '',
servingFramework: '',
snippet: '',
startTime: '',
status: '',
trafficCoverage: '',
updated: '',
variations: [{name: '', status: '', url: '', weight: '', won: false}],
webPropertyId: '',
winnerConfidenceLevel: '',
winnerFound: false
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"accountId":"","created":"","description":"","editableInGaUi":false,"endTime":"","equalWeighting":false,"id":"","internalWebPropertyId":"","kind":"","minimumExperimentLengthInDays":0,"name":"","objectiveMetric":"","optimizationType":"","parentLink":{"href":"","type":""},"profileId":"","reasonExperimentEnded":"","rewriteVariationUrlsAsOriginal":false,"selfLink":"","servingFramework":"","snippet":"","startTime":"","status":"","trafficCoverage":"","updated":"","variations":[{"name":"","status":"","url":"","weight":"","won":false}],"webPropertyId":"","winnerConfidenceLevel":"","winnerFound":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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "accountId": "",\n "created": "",\n "description": "",\n "editableInGaUi": false,\n "endTime": "",\n "equalWeighting": false,\n "id": "",\n "internalWebPropertyId": "",\n "kind": "",\n "minimumExperimentLengthInDays": 0,\n "name": "",\n "objectiveMetric": "",\n "optimizationType": "",\n "parentLink": {\n "href": "",\n "type": ""\n },\n "profileId": "",\n "reasonExperimentEnded": "",\n "rewriteVariationUrlsAsOriginal": false,\n "selfLink": "",\n "servingFramework": "",\n "snippet": "",\n "startTime": "",\n "status": "",\n "trafficCoverage": "",\n "updated": "",\n "variations": [\n {\n "name": "",\n "status": "",\n "url": "",\n "weight": "",\n "won": false\n }\n ],\n "webPropertyId": "",\n "winnerConfidenceLevel": "",\n "winnerFound": 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 \"accountId\": \"\",\n \"created\": \"\",\n \"description\": \"\",\n \"editableInGaUi\": false,\n \"endTime\": \"\",\n \"equalWeighting\": false,\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"minimumExperimentLengthInDays\": 0,\n \"name\": \"\",\n \"objectiveMetric\": \"\",\n \"optimizationType\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"profileId\": \"\",\n \"reasonExperimentEnded\": \"\",\n \"rewriteVariationUrlsAsOriginal\": false,\n \"selfLink\": \"\",\n \"servingFramework\": \"\",\n \"snippet\": \"\",\n \"startTime\": \"\",\n \"status\": \"\",\n \"trafficCoverage\": \"\",\n \"updated\": \"\",\n \"variations\": [\n {\n \"name\": \"\",\n \"status\": \"\",\n \"url\": \"\",\n \"weight\": \"\",\n \"won\": false\n }\n ],\n \"webPropertyId\": \"\",\n \"winnerConfidenceLevel\": \"\",\n \"winnerFound\": false\n}")
val request = Request.Builder()
.url("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId")
.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/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
accountId: '',
created: '',
description: '',
editableInGaUi: false,
endTime: '',
equalWeighting: false,
id: '',
internalWebPropertyId: '',
kind: '',
minimumExperimentLengthInDays: 0,
name: '',
objectiveMetric: '',
optimizationType: '',
parentLink: {href: '', type: ''},
profileId: '',
reasonExperimentEnded: '',
rewriteVariationUrlsAsOriginal: false,
selfLink: '',
servingFramework: '',
snippet: '',
startTime: '',
status: '',
trafficCoverage: '',
updated: '',
variations: [{name: '', status: '', url: '', weight: '', won: false}],
webPropertyId: '',
winnerConfidenceLevel: '',
winnerFound: false
}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId',
headers: {'content-type': 'application/json'},
body: {
accountId: '',
created: '',
description: '',
editableInGaUi: false,
endTime: '',
equalWeighting: false,
id: '',
internalWebPropertyId: '',
kind: '',
minimumExperimentLengthInDays: 0,
name: '',
objectiveMetric: '',
optimizationType: '',
parentLink: {href: '', type: ''},
profileId: '',
reasonExperimentEnded: '',
rewriteVariationUrlsAsOriginal: false,
selfLink: '',
servingFramework: '',
snippet: '',
startTime: '',
status: '',
trafficCoverage: '',
updated: '',
variations: [{name: '', status: '', url: '', weight: '', won: false}],
webPropertyId: '',
winnerConfidenceLevel: '',
winnerFound: 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('PUT', '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
accountId: '',
created: '',
description: '',
editableInGaUi: false,
endTime: '',
equalWeighting: false,
id: '',
internalWebPropertyId: '',
kind: '',
minimumExperimentLengthInDays: 0,
name: '',
objectiveMetric: '',
optimizationType: '',
parentLink: {
href: '',
type: ''
},
profileId: '',
reasonExperimentEnded: '',
rewriteVariationUrlsAsOriginal: false,
selfLink: '',
servingFramework: '',
snippet: '',
startTime: '',
status: '',
trafficCoverage: '',
updated: '',
variations: [
{
name: '',
status: '',
url: '',
weight: '',
won: false
}
],
webPropertyId: '',
winnerConfidenceLevel: '',
winnerFound: 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: 'PUT',
url: '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId',
headers: {'content-type': 'application/json'},
data: {
accountId: '',
created: '',
description: '',
editableInGaUi: false,
endTime: '',
equalWeighting: false,
id: '',
internalWebPropertyId: '',
kind: '',
minimumExperimentLengthInDays: 0,
name: '',
objectiveMetric: '',
optimizationType: '',
parentLink: {href: '', type: ''},
profileId: '',
reasonExperimentEnded: '',
rewriteVariationUrlsAsOriginal: false,
selfLink: '',
servingFramework: '',
snippet: '',
startTime: '',
status: '',
trafficCoverage: '',
updated: '',
variations: [{name: '', status: '', url: '', weight: '', won: false}],
webPropertyId: '',
winnerConfidenceLevel: '',
winnerFound: false
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"accountId":"","created":"","description":"","editableInGaUi":false,"endTime":"","equalWeighting":false,"id":"","internalWebPropertyId":"","kind":"","minimumExperimentLengthInDays":0,"name":"","objectiveMetric":"","optimizationType":"","parentLink":{"href":"","type":""},"profileId":"","reasonExperimentEnded":"","rewriteVariationUrlsAsOriginal":false,"selfLink":"","servingFramework":"","snippet":"","startTime":"","status":"","trafficCoverage":"","updated":"","variations":[{"name":"","status":"","url":"","weight":"","won":false}],"webPropertyId":"","winnerConfidenceLevel":"","winnerFound":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 = @{ @"accountId": @"",
@"created": @"",
@"description": @"",
@"editableInGaUi": @NO,
@"endTime": @"",
@"equalWeighting": @NO,
@"id": @"",
@"internalWebPropertyId": @"",
@"kind": @"",
@"minimumExperimentLengthInDays": @0,
@"name": @"",
@"objectiveMetric": @"",
@"optimizationType": @"",
@"parentLink": @{ @"href": @"", @"type": @"" },
@"profileId": @"",
@"reasonExperimentEnded": @"",
@"rewriteVariationUrlsAsOriginal": @NO,
@"selfLink": @"",
@"servingFramework": @"",
@"snippet": @"",
@"startTime": @"",
@"status": @"",
@"trafficCoverage": @"",
@"updated": @"",
@"variations": @[ @{ @"name": @"", @"status": @"", @"url": @"", @"weight": @"", @"won": @NO } ],
@"webPropertyId": @"",
@"winnerConfidenceLevel": @"",
@"winnerFound": @NO };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId"]
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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"accountId\": \"\",\n \"created\": \"\",\n \"description\": \"\",\n \"editableInGaUi\": false,\n \"endTime\": \"\",\n \"equalWeighting\": false,\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"minimumExperimentLengthInDays\": 0,\n \"name\": \"\",\n \"objectiveMetric\": \"\",\n \"optimizationType\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"profileId\": \"\",\n \"reasonExperimentEnded\": \"\",\n \"rewriteVariationUrlsAsOriginal\": false,\n \"selfLink\": \"\",\n \"servingFramework\": \"\",\n \"snippet\": \"\",\n \"startTime\": \"\",\n \"status\": \"\",\n \"trafficCoverage\": \"\",\n \"updated\": \"\",\n \"variations\": [\n {\n \"name\": \"\",\n \"status\": \"\",\n \"url\": \"\",\n \"weight\": \"\",\n \"won\": false\n }\n ],\n \"webPropertyId\": \"\",\n \"winnerConfidenceLevel\": \"\",\n \"winnerFound\": false\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId",
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([
'accountId' => '',
'created' => '',
'description' => '',
'editableInGaUi' => null,
'endTime' => '',
'equalWeighting' => null,
'id' => '',
'internalWebPropertyId' => '',
'kind' => '',
'minimumExperimentLengthInDays' => 0,
'name' => '',
'objectiveMetric' => '',
'optimizationType' => '',
'parentLink' => [
'href' => '',
'type' => ''
],
'profileId' => '',
'reasonExperimentEnded' => '',
'rewriteVariationUrlsAsOriginal' => null,
'selfLink' => '',
'servingFramework' => '',
'snippet' => '',
'startTime' => '',
'status' => '',
'trafficCoverage' => '',
'updated' => '',
'variations' => [
[
'name' => '',
'status' => '',
'url' => '',
'weight' => '',
'won' => null
]
],
'webPropertyId' => '',
'winnerConfidenceLevel' => '',
'winnerFound' => 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('PUT', '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId', [
'body' => '{
"accountId": "",
"created": "",
"description": "",
"editableInGaUi": false,
"endTime": "",
"equalWeighting": false,
"id": "",
"internalWebPropertyId": "",
"kind": "",
"minimumExperimentLengthInDays": 0,
"name": "",
"objectiveMetric": "",
"optimizationType": "",
"parentLink": {
"href": "",
"type": ""
},
"profileId": "",
"reasonExperimentEnded": "",
"rewriteVariationUrlsAsOriginal": false,
"selfLink": "",
"servingFramework": "",
"snippet": "",
"startTime": "",
"status": "",
"trafficCoverage": "",
"updated": "",
"variations": [
{
"name": "",
"status": "",
"url": "",
"weight": "",
"won": false
}
],
"webPropertyId": "",
"winnerConfidenceLevel": "",
"winnerFound": false
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'accountId' => '',
'created' => '',
'description' => '',
'editableInGaUi' => null,
'endTime' => '',
'equalWeighting' => null,
'id' => '',
'internalWebPropertyId' => '',
'kind' => '',
'minimumExperimentLengthInDays' => 0,
'name' => '',
'objectiveMetric' => '',
'optimizationType' => '',
'parentLink' => [
'href' => '',
'type' => ''
],
'profileId' => '',
'reasonExperimentEnded' => '',
'rewriteVariationUrlsAsOriginal' => null,
'selfLink' => '',
'servingFramework' => '',
'snippet' => '',
'startTime' => '',
'status' => '',
'trafficCoverage' => '',
'updated' => '',
'variations' => [
[
'name' => '',
'status' => '',
'url' => '',
'weight' => '',
'won' => null
]
],
'webPropertyId' => '',
'winnerConfidenceLevel' => '',
'winnerFound' => null
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'accountId' => '',
'created' => '',
'description' => '',
'editableInGaUi' => null,
'endTime' => '',
'equalWeighting' => null,
'id' => '',
'internalWebPropertyId' => '',
'kind' => '',
'minimumExperimentLengthInDays' => 0,
'name' => '',
'objectiveMetric' => '',
'optimizationType' => '',
'parentLink' => [
'href' => '',
'type' => ''
],
'profileId' => '',
'reasonExperimentEnded' => '',
'rewriteVariationUrlsAsOriginal' => null,
'selfLink' => '',
'servingFramework' => '',
'snippet' => '',
'startTime' => '',
'status' => '',
'trafficCoverage' => '',
'updated' => '',
'variations' => [
[
'name' => '',
'status' => '',
'url' => '',
'weight' => '',
'won' => null
]
],
'webPropertyId' => '',
'winnerConfidenceLevel' => '',
'winnerFound' => null
]));
$request->setRequestUrl('{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId');
$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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"accountId": "",
"created": "",
"description": "",
"editableInGaUi": false,
"endTime": "",
"equalWeighting": false,
"id": "",
"internalWebPropertyId": "",
"kind": "",
"minimumExperimentLengthInDays": 0,
"name": "",
"objectiveMetric": "",
"optimizationType": "",
"parentLink": {
"href": "",
"type": ""
},
"profileId": "",
"reasonExperimentEnded": "",
"rewriteVariationUrlsAsOriginal": false,
"selfLink": "",
"servingFramework": "",
"snippet": "",
"startTime": "",
"status": "",
"trafficCoverage": "",
"updated": "",
"variations": [
{
"name": "",
"status": "",
"url": "",
"weight": "",
"won": false
}
],
"webPropertyId": "",
"winnerConfidenceLevel": "",
"winnerFound": false
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"accountId": "",
"created": "",
"description": "",
"editableInGaUi": false,
"endTime": "",
"equalWeighting": false,
"id": "",
"internalWebPropertyId": "",
"kind": "",
"minimumExperimentLengthInDays": 0,
"name": "",
"objectiveMetric": "",
"optimizationType": "",
"parentLink": {
"href": "",
"type": ""
},
"profileId": "",
"reasonExperimentEnded": "",
"rewriteVariationUrlsAsOriginal": false,
"selfLink": "",
"servingFramework": "",
"snippet": "",
"startTime": "",
"status": "",
"trafficCoverage": "",
"updated": "",
"variations": [
{
"name": "",
"status": "",
"url": "",
"weight": "",
"won": false
}
],
"webPropertyId": "",
"winnerConfidenceLevel": "",
"winnerFound": false
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"accountId\": \"\",\n \"created\": \"\",\n \"description\": \"\",\n \"editableInGaUi\": false,\n \"endTime\": \"\",\n \"equalWeighting\": false,\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"minimumExperimentLengthInDays\": 0,\n \"name\": \"\",\n \"objectiveMetric\": \"\",\n \"optimizationType\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"profileId\": \"\",\n \"reasonExperimentEnded\": \"\",\n \"rewriteVariationUrlsAsOriginal\": false,\n \"selfLink\": \"\",\n \"servingFramework\": \"\",\n \"snippet\": \"\",\n \"startTime\": \"\",\n \"status\": \"\",\n \"trafficCoverage\": \"\",\n \"updated\": \"\",\n \"variations\": [\n {\n \"name\": \"\",\n \"status\": \"\",\n \"url\": \"\",\n \"weight\": \"\",\n \"won\": false\n }\n ],\n \"webPropertyId\": \"\",\n \"winnerConfidenceLevel\": \"\",\n \"winnerFound\": false\n}"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId"
payload = {
"accountId": "",
"created": "",
"description": "",
"editableInGaUi": False,
"endTime": "",
"equalWeighting": False,
"id": "",
"internalWebPropertyId": "",
"kind": "",
"minimumExperimentLengthInDays": 0,
"name": "",
"objectiveMetric": "",
"optimizationType": "",
"parentLink": {
"href": "",
"type": ""
},
"profileId": "",
"reasonExperimentEnded": "",
"rewriteVariationUrlsAsOriginal": False,
"selfLink": "",
"servingFramework": "",
"snippet": "",
"startTime": "",
"status": "",
"trafficCoverage": "",
"updated": "",
"variations": [
{
"name": "",
"status": "",
"url": "",
"weight": "",
"won": False
}
],
"webPropertyId": "",
"winnerConfidenceLevel": "",
"winnerFound": False
}
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId"
payload <- "{\n \"accountId\": \"\",\n \"created\": \"\",\n \"description\": \"\",\n \"editableInGaUi\": false,\n \"endTime\": \"\",\n \"equalWeighting\": false,\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"minimumExperimentLengthInDays\": 0,\n \"name\": \"\",\n \"objectiveMetric\": \"\",\n \"optimizationType\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"profileId\": \"\",\n \"reasonExperimentEnded\": \"\",\n \"rewriteVariationUrlsAsOriginal\": false,\n \"selfLink\": \"\",\n \"servingFramework\": \"\",\n \"snippet\": \"\",\n \"startTime\": \"\",\n \"status\": \"\",\n \"trafficCoverage\": \"\",\n \"updated\": \"\",\n \"variations\": [\n {\n \"name\": \"\",\n \"status\": \"\",\n \"url\": \"\",\n \"weight\": \"\",\n \"won\": false\n }\n ],\n \"webPropertyId\": \"\",\n \"winnerConfidenceLevel\": \"\",\n \"winnerFound\": false\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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId")
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 \"accountId\": \"\",\n \"created\": \"\",\n \"description\": \"\",\n \"editableInGaUi\": false,\n \"endTime\": \"\",\n \"equalWeighting\": false,\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"minimumExperimentLengthInDays\": 0,\n \"name\": \"\",\n \"objectiveMetric\": \"\",\n \"optimizationType\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"profileId\": \"\",\n \"reasonExperimentEnded\": \"\",\n \"rewriteVariationUrlsAsOriginal\": false,\n \"selfLink\": \"\",\n \"servingFramework\": \"\",\n \"snippet\": \"\",\n \"startTime\": \"\",\n \"status\": \"\",\n \"trafficCoverage\": \"\",\n \"updated\": \"\",\n \"variations\": [\n {\n \"name\": \"\",\n \"status\": \"\",\n \"url\": \"\",\n \"weight\": \"\",\n \"won\": false\n }\n ],\n \"webPropertyId\": \"\",\n \"winnerConfidenceLevel\": \"\",\n \"winnerFound\": 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.put('/baseUrl/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId') do |req|
req.body = "{\n \"accountId\": \"\",\n \"created\": \"\",\n \"description\": \"\",\n \"editableInGaUi\": false,\n \"endTime\": \"\",\n \"equalWeighting\": false,\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"minimumExperimentLengthInDays\": 0,\n \"name\": \"\",\n \"objectiveMetric\": \"\",\n \"optimizationType\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"profileId\": \"\",\n \"reasonExperimentEnded\": \"\",\n \"rewriteVariationUrlsAsOriginal\": false,\n \"selfLink\": \"\",\n \"servingFramework\": \"\",\n \"snippet\": \"\",\n \"startTime\": \"\",\n \"status\": \"\",\n \"trafficCoverage\": \"\",\n \"updated\": \"\",\n \"variations\": [\n {\n \"name\": \"\",\n \"status\": \"\",\n \"url\": \"\",\n \"weight\": \"\",\n \"won\": false\n }\n ],\n \"webPropertyId\": \"\",\n \"winnerConfidenceLevel\": \"\",\n \"winnerFound\": false\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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId";
let payload = json!({
"accountId": "",
"created": "",
"description": "",
"editableInGaUi": false,
"endTime": "",
"equalWeighting": false,
"id": "",
"internalWebPropertyId": "",
"kind": "",
"minimumExperimentLengthInDays": 0,
"name": "",
"objectiveMetric": "",
"optimizationType": "",
"parentLink": json!({
"href": "",
"type": ""
}),
"profileId": "",
"reasonExperimentEnded": "",
"rewriteVariationUrlsAsOriginal": false,
"selfLink": "",
"servingFramework": "",
"snippet": "",
"startTime": "",
"status": "",
"trafficCoverage": "",
"updated": "",
"variations": (
json!({
"name": "",
"status": "",
"url": "",
"weight": "",
"won": false
})
),
"webPropertyId": "",
"winnerConfidenceLevel": "",
"winnerFound": false
});
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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId \
--header 'content-type: application/json' \
--data '{
"accountId": "",
"created": "",
"description": "",
"editableInGaUi": false,
"endTime": "",
"equalWeighting": false,
"id": "",
"internalWebPropertyId": "",
"kind": "",
"minimumExperimentLengthInDays": 0,
"name": "",
"objectiveMetric": "",
"optimizationType": "",
"parentLink": {
"href": "",
"type": ""
},
"profileId": "",
"reasonExperimentEnded": "",
"rewriteVariationUrlsAsOriginal": false,
"selfLink": "",
"servingFramework": "",
"snippet": "",
"startTime": "",
"status": "",
"trafficCoverage": "",
"updated": "",
"variations": [
{
"name": "",
"status": "",
"url": "",
"weight": "",
"won": false
}
],
"webPropertyId": "",
"winnerConfidenceLevel": "",
"winnerFound": false
}'
echo '{
"accountId": "",
"created": "",
"description": "",
"editableInGaUi": false,
"endTime": "",
"equalWeighting": false,
"id": "",
"internalWebPropertyId": "",
"kind": "",
"minimumExperimentLengthInDays": 0,
"name": "",
"objectiveMetric": "",
"optimizationType": "",
"parentLink": {
"href": "",
"type": ""
},
"profileId": "",
"reasonExperimentEnded": "",
"rewriteVariationUrlsAsOriginal": false,
"selfLink": "",
"servingFramework": "",
"snippet": "",
"startTime": "",
"status": "",
"trafficCoverage": "",
"updated": "",
"variations": [
{
"name": "",
"status": "",
"url": "",
"weight": "",
"won": false
}
],
"webPropertyId": "",
"winnerConfidenceLevel": "",
"winnerFound": false
}' | \
http PUT {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '{\n "accountId": "",\n "created": "",\n "description": "",\n "editableInGaUi": false,\n "endTime": "",\n "equalWeighting": false,\n "id": "",\n "internalWebPropertyId": "",\n "kind": "",\n "minimumExperimentLengthInDays": 0,\n "name": "",\n "objectiveMetric": "",\n "optimizationType": "",\n "parentLink": {\n "href": "",\n "type": ""\n },\n "profileId": "",\n "reasonExperimentEnded": "",\n "rewriteVariationUrlsAsOriginal": false,\n "selfLink": "",\n "servingFramework": "",\n "snippet": "",\n "startTime": "",\n "status": "",\n "trafficCoverage": "",\n "updated": "",\n "variations": [\n {\n "name": "",\n "status": "",\n "url": "",\n "weight": "",\n "won": false\n }\n ],\n "webPropertyId": "",\n "winnerConfidenceLevel": "",\n "winnerFound": false\n}' \
--output-document \
- {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"accountId": "",
"created": "",
"description": "",
"editableInGaUi": false,
"endTime": "",
"equalWeighting": false,
"id": "",
"internalWebPropertyId": "",
"kind": "",
"minimumExperimentLengthInDays": 0,
"name": "",
"objectiveMetric": "",
"optimizationType": "",
"parentLink": [
"href": "",
"type": ""
],
"profileId": "",
"reasonExperimentEnded": "",
"rewriteVariationUrlsAsOriginal": false,
"selfLink": "",
"servingFramework": "",
"snippet": "",
"startTime": "",
"status": "",
"trafficCoverage": "",
"updated": "",
"variations": [
[
"name": "",
"status": "",
"url": "",
"weight": "",
"won": false
]
],
"webPropertyId": "",
"winnerConfidenceLevel": "",
"winnerFound": false
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments/:experimentId")! 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()
DELETE
analytics.management.filters.delete
{{baseUrl}}/management/accounts/:accountId/filters/:filterId
QUERY PARAMS
accountId
filterId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/management/accounts/:accountId/filters/:filterId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/management/accounts/:accountId/filters/:filterId")
require "http/client"
url = "{{baseUrl}}/management/accounts/:accountId/filters/:filterId"
response = HTTP::Client.delete url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Delete,
RequestUri = new Uri("{{baseUrl}}/management/accounts/:accountId/filters/:filterId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/management/accounts/:accountId/filters/:filterId");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/management/accounts/:accountId/filters/:filterId"
req, _ := http.NewRequest("DELETE", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
DELETE /baseUrl/management/accounts/:accountId/filters/:filterId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/management/accounts/:accountId/filters/:filterId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/management/accounts/:accountId/filters/:filterId"))
.method("DELETE", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/management/accounts/:accountId/filters/:filterId")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/management/accounts/:accountId/filters/:filterId")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('DELETE', '{{baseUrl}}/management/accounts/:accountId/filters/:filterId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'DELETE',
url: '{{baseUrl}}/management/accounts/:accountId/filters/:filterId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/management/accounts/:accountId/filters/:filterId';
const options = {method: 'DELETE'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/management/accounts/:accountId/filters/:filterId',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/management/accounts/:accountId/filters/:filterId")
.delete(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/management/accounts/:accountId/filters/:filterId',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'DELETE',
url: '{{baseUrl}}/management/accounts/:accountId/filters/:filterId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/management/accounts/:accountId/filters/:filterId');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'DELETE',
url: '{{baseUrl}}/management/accounts/:accountId/filters/:filterId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/management/accounts/:accountId/filters/:filterId';
const options = {method: 'DELETE'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/management/accounts/:accountId/filters/:filterId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"DELETE"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/management/accounts/:accountId/filters/:filterId" in
Client.call `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/management/accounts/:accountId/filters/:filterId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('DELETE', '{{baseUrl}}/management/accounts/:accountId/filters/:filterId');
echo $response->getBody();
setUrl('{{baseUrl}}/management/accounts/:accountId/filters/:filterId');
$request->setMethod(HTTP_METH_DELETE);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/management/accounts/:accountId/filters/:filterId');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/management/accounts/:accountId/filters/:filterId' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/management/accounts/:accountId/filters/:filterId' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/management/accounts/:accountId/filters/:filterId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/management/accounts/:accountId/filters/:filterId"
response = requests.delete(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/management/accounts/:accountId/filters/:filterId"
response <- VERB("DELETE", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/management/accounts/:accountId/filters/:filterId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.delete('/baseUrl/management/accounts/:accountId/filters/:filterId') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/management/accounts/:accountId/filters/:filterId";
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("DELETE").unwrap(), url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request DELETE \
--url {{baseUrl}}/management/accounts/:accountId/filters/:filterId
http DELETE {{baseUrl}}/management/accounts/:accountId/filters/:filterId
wget --quiet \
--method DELETE \
--output-document \
- {{baseUrl}}/management/accounts/:accountId/filters/:filterId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/management/accounts/:accountId/filters/:filterId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "DELETE"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
analytics.management.filters.get
{{baseUrl}}/management/accounts/:accountId/filters/:filterId
QUERY PARAMS
accountId
filterId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/management/accounts/:accountId/filters/:filterId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/management/accounts/:accountId/filters/:filterId")
require "http/client"
url = "{{baseUrl}}/management/accounts/:accountId/filters/:filterId"
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}}/management/accounts/:accountId/filters/:filterId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/management/accounts/:accountId/filters/:filterId");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/management/accounts/:accountId/filters/:filterId"
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/management/accounts/:accountId/filters/:filterId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/management/accounts/:accountId/filters/:filterId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/management/accounts/:accountId/filters/:filterId"))
.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}}/management/accounts/:accountId/filters/:filterId")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/management/accounts/:accountId/filters/:filterId")
.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}}/management/accounts/:accountId/filters/:filterId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/management/accounts/:accountId/filters/:filterId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/management/accounts/:accountId/filters/:filterId';
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}}/management/accounts/:accountId/filters/:filterId',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/management/accounts/:accountId/filters/:filterId")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/management/accounts/:accountId/filters/:filterId',
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}}/management/accounts/:accountId/filters/:filterId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/management/accounts/:accountId/filters/:filterId');
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}}/management/accounts/:accountId/filters/:filterId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/management/accounts/:accountId/filters/:filterId';
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}}/management/accounts/:accountId/filters/:filterId"]
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}}/management/accounts/:accountId/filters/:filterId" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/management/accounts/:accountId/filters/:filterId",
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}}/management/accounts/:accountId/filters/:filterId');
echo $response->getBody();
setUrl('{{baseUrl}}/management/accounts/:accountId/filters/:filterId');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/management/accounts/:accountId/filters/:filterId');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/management/accounts/:accountId/filters/:filterId' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/management/accounts/:accountId/filters/:filterId' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/management/accounts/:accountId/filters/:filterId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/management/accounts/:accountId/filters/:filterId"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/management/accounts/:accountId/filters/:filterId"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/management/accounts/:accountId/filters/:filterId")
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/management/accounts/:accountId/filters/:filterId') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/management/accounts/:accountId/filters/:filterId";
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}}/management/accounts/:accountId/filters/:filterId
http GET {{baseUrl}}/management/accounts/:accountId/filters/:filterId
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/management/accounts/:accountId/filters/:filterId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/management/accounts/:accountId/filters/:filterId")! 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
analytics.management.filters.insert
{{baseUrl}}/management/accounts/:accountId/filters
QUERY PARAMS
accountId
BODY json
{
"accountId": "",
"advancedDetails": {
"caseSensitive": false,
"extractA": "",
"extractB": "",
"fieldA": "",
"fieldAIndex": 0,
"fieldARequired": false,
"fieldB": "",
"fieldBIndex": 0,
"fieldBRequired": false,
"outputConstructor": "",
"outputToField": "",
"outputToFieldIndex": 0,
"overrideOutputField": false
},
"created": "",
"excludeDetails": {
"caseSensitive": false,
"expressionValue": "",
"field": "",
"fieldIndex": 0,
"kind": "",
"matchType": ""
},
"id": "",
"includeDetails": {},
"kind": "",
"lowercaseDetails": {
"field": "",
"fieldIndex": 0
},
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"searchAndReplaceDetails": {
"caseSensitive": false,
"field": "",
"fieldIndex": 0,
"replaceString": "",
"searchString": ""
},
"selfLink": "",
"type": "",
"updated": "",
"uppercaseDetails": {
"field": "",
"fieldIndex": 0
}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/management/accounts/:accountId/filters");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"accountId\": \"\",\n \"advancedDetails\": {\n \"caseSensitive\": false,\n \"extractA\": \"\",\n \"extractB\": \"\",\n \"fieldA\": \"\",\n \"fieldAIndex\": 0,\n \"fieldARequired\": false,\n \"fieldB\": \"\",\n \"fieldBIndex\": 0,\n \"fieldBRequired\": false,\n \"outputConstructor\": \"\",\n \"outputToField\": \"\",\n \"outputToFieldIndex\": 0,\n \"overrideOutputField\": false\n },\n \"created\": \"\",\n \"excludeDetails\": {\n \"caseSensitive\": false,\n \"expressionValue\": \"\",\n \"field\": \"\",\n \"fieldIndex\": 0,\n \"kind\": \"\",\n \"matchType\": \"\"\n },\n \"id\": \"\",\n \"includeDetails\": {},\n \"kind\": \"\",\n \"lowercaseDetails\": {\n \"field\": \"\",\n \"fieldIndex\": 0\n },\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"searchAndReplaceDetails\": {\n \"caseSensitive\": false,\n \"field\": \"\",\n \"fieldIndex\": 0,\n \"replaceString\": \"\",\n \"searchString\": \"\"\n },\n \"selfLink\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"uppercaseDetails\": {\n \"field\": \"\",\n \"fieldIndex\": 0\n }\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/management/accounts/:accountId/filters" {:content-type :json
:form-params {:accountId ""
:advancedDetails {:caseSensitive false
:extractA ""
:extractB ""
:fieldA ""
:fieldAIndex 0
:fieldARequired false
:fieldB ""
:fieldBIndex 0
:fieldBRequired false
:outputConstructor ""
:outputToField ""
:outputToFieldIndex 0
:overrideOutputField false}
:created ""
:excludeDetails {:caseSensitive false
:expressionValue ""
:field ""
:fieldIndex 0
:kind ""
:matchType ""}
:id ""
:includeDetails {}
:kind ""
:lowercaseDetails {:field ""
:fieldIndex 0}
:name ""
:parentLink {:href ""
:type ""}
:searchAndReplaceDetails {:caseSensitive false
:field ""
:fieldIndex 0
:replaceString ""
:searchString ""}
:selfLink ""
:type ""
:updated ""
:uppercaseDetails {:field ""
:fieldIndex 0}}})
require "http/client"
url = "{{baseUrl}}/management/accounts/:accountId/filters"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"accountId\": \"\",\n \"advancedDetails\": {\n \"caseSensitive\": false,\n \"extractA\": \"\",\n \"extractB\": \"\",\n \"fieldA\": \"\",\n \"fieldAIndex\": 0,\n \"fieldARequired\": false,\n \"fieldB\": \"\",\n \"fieldBIndex\": 0,\n \"fieldBRequired\": false,\n \"outputConstructor\": \"\",\n \"outputToField\": \"\",\n \"outputToFieldIndex\": 0,\n \"overrideOutputField\": false\n },\n \"created\": \"\",\n \"excludeDetails\": {\n \"caseSensitive\": false,\n \"expressionValue\": \"\",\n \"field\": \"\",\n \"fieldIndex\": 0,\n \"kind\": \"\",\n \"matchType\": \"\"\n },\n \"id\": \"\",\n \"includeDetails\": {},\n \"kind\": \"\",\n \"lowercaseDetails\": {\n \"field\": \"\",\n \"fieldIndex\": 0\n },\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"searchAndReplaceDetails\": {\n \"caseSensitive\": false,\n \"field\": \"\",\n \"fieldIndex\": 0,\n \"replaceString\": \"\",\n \"searchString\": \"\"\n },\n \"selfLink\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"uppercaseDetails\": {\n \"field\": \"\",\n \"fieldIndex\": 0\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}}/management/accounts/:accountId/filters"),
Content = new StringContent("{\n \"accountId\": \"\",\n \"advancedDetails\": {\n \"caseSensitive\": false,\n \"extractA\": \"\",\n \"extractB\": \"\",\n \"fieldA\": \"\",\n \"fieldAIndex\": 0,\n \"fieldARequired\": false,\n \"fieldB\": \"\",\n \"fieldBIndex\": 0,\n \"fieldBRequired\": false,\n \"outputConstructor\": \"\",\n \"outputToField\": \"\",\n \"outputToFieldIndex\": 0,\n \"overrideOutputField\": false\n },\n \"created\": \"\",\n \"excludeDetails\": {\n \"caseSensitive\": false,\n \"expressionValue\": \"\",\n \"field\": \"\",\n \"fieldIndex\": 0,\n \"kind\": \"\",\n \"matchType\": \"\"\n },\n \"id\": \"\",\n \"includeDetails\": {},\n \"kind\": \"\",\n \"lowercaseDetails\": {\n \"field\": \"\",\n \"fieldIndex\": 0\n },\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"searchAndReplaceDetails\": {\n \"caseSensitive\": false,\n \"field\": \"\",\n \"fieldIndex\": 0,\n \"replaceString\": \"\",\n \"searchString\": \"\"\n },\n \"selfLink\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"uppercaseDetails\": {\n \"field\": \"\",\n \"fieldIndex\": 0\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}}/management/accounts/:accountId/filters");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"accountId\": \"\",\n \"advancedDetails\": {\n \"caseSensitive\": false,\n \"extractA\": \"\",\n \"extractB\": \"\",\n \"fieldA\": \"\",\n \"fieldAIndex\": 0,\n \"fieldARequired\": false,\n \"fieldB\": \"\",\n \"fieldBIndex\": 0,\n \"fieldBRequired\": false,\n \"outputConstructor\": \"\",\n \"outputToField\": \"\",\n \"outputToFieldIndex\": 0,\n \"overrideOutputField\": false\n },\n \"created\": \"\",\n \"excludeDetails\": {\n \"caseSensitive\": false,\n \"expressionValue\": \"\",\n \"field\": \"\",\n \"fieldIndex\": 0,\n \"kind\": \"\",\n \"matchType\": \"\"\n },\n \"id\": \"\",\n \"includeDetails\": {},\n \"kind\": \"\",\n \"lowercaseDetails\": {\n \"field\": \"\",\n \"fieldIndex\": 0\n },\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"searchAndReplaceDetails\": {\n \"caseSensitive\": false,\n \"field\": \"\",\n \"fieldIndex\": 0,\n \"replaceString\": \"\",\n \"searchString\": \"\"\n },\n \"selfLink\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"uppercaseDetails\": {\n \"field\": \"\",\n \"fieldIndex\": 0\n }\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/management/accounts/:accountId/filters"
payload := strings.NewReader("{\n \"accountId\": \"\",\n \"advancedDetails\": {\n \"caseSensitive\": false,\n \"extractA\": \"\",\n \"extractB\": \"\",\n \"fieldA\": \"\",\n \"fieldAIndex\": 0,\n \"fieldARequired\": false,\n \"fieldB\": \"\",\n \"fieldBIndex\": 0,\n \"fieldBRequired\": false,\n \"outputConstructor\": \"\",\n \"outputToField\": \"\",\n \"outputToFieldIndex\": 0,\n \"overrideOutputField\": false\n },\n \"created\": \"\",\n \"excludeDetails\": {\n \"caseSensitive\": false,\n \"expressionValue\": \"\",\n \"field\": \"\",\n \"fieldIndex\": 0,\n \"kind\": \"\",\n \"matchType\": \"\"\n },\n \"id\": \"\",\n \"includeDetails\": {},\n \"kind\": \"\",\n \"lowercaseDetails\": {\n \"field\": \"\",\n \"fieldIndex\": 0\n },\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"searchAndReplaceDetails\": {\n \"caseSensitive\": false,\n \"field\": \"\",\n \"fieldIndex\": 0,\n \"replaceString\": \"\",\n \"searchString\": \"\"\n },\n \"selfLink\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"uppercaseDetails\": {\n \"field\": \"\",\n \"fieldIndex\": 0\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/management/accounts/:accountId/filters HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 993
{
"accountId": "",
"advancedDetails": {
"caseSensitive": false,
"extractA": "",
"extractB": "",
"fieldA": "",
"fieldAIndex": 0,
"fieldARequired": false,
"fieldB": "",
"fieldBIndex": 0,
"fieldBRequired": false,
"outputConstructor": "",
"outputToField": "",
"outputToFieldIndex": 0,
"overrideOutputField": false
},
"created": "",
"excludeDetails": {
"caseSensitive": false,
"expressionValue": "",
"field": "",
"fieldIndex": 0,
"kind": "",
"matchType": ""
},
"id": "",
"includeDetails": {},
"kind": "",
"lowercaseDetails": {
"field": "",
"fieldIndex": 0
},
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"searchAndReplaceDetails": {
"caseSensitive": false,
"field": "",
"fieldIndex": 0,
"replaceString": "",
"searchString": ""
},
"selfLink": "",
"type": "",
"updated": "",
"uppercaseDetails": {
"field": "",
"fieldIndex": 0
}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/management/accounts/:accountId/filters")
.setHeader("content-type", "application/json")
.setBody("{\n \"accountId\": \"\",\n \"advancedDetails\": {\n \"caseSensitive\": false,\n \"extractA\": \"\",\n \"extractB\": \"\",\n \"fieldA\": \"\",\n \"fieldAIndex\": 0,\n \"fieldARequired\": false,\n \"fieldB\": \"\",\n \"fieldBIndex\": 0,\n \"fieldBRequired\": false,\n \"outputConstructor\": \"\",\n \"outputToField\": \"\",\n \"outputToFieldIndex\": 0,\n \"overrideOutputField\": false\n },\n \"created\": \"\",\n \"excludeDetails\": {\n \"caseSensitive\": false,\n \"expressionValue\": \"\",\n \"field\": \"\",\n \"fieldIndex\": 0,\n \"kind\": \"\",\n \"matchType\": \"\"\n },\n \"id\": \"\",\n \"includeDetails\": {},\n \"kind\": \"\",\n \"lowercaseDetails\": {\n \"field\": \"\",\n \"fieldIndex\": 0\n },\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"searchAndReplaceDetails\": {\n \"caseSensitive\": false,\n \"field\": \"\",\n \"fieldIndex\": 0,\n \"replaceString\": \"\",\n \"searchString\": \"\"\n },\n \"selfLink\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"uppercaseDetails\": {\n \"field\": \"\",\n \"fieldIndex\": 0\n }\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/management/accounts/:accountId/filters"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"accountId\": \"\",\n \"advancedDetails\": {\n \"caseSensitive\": false,\n \"extractA\": \"\",\n \"extractB\": \"\",\n \"fieldA\": \"\",\n \"fieldAIndex\": 0,\n \"fieldARequired\": false,\n \"fieldB\": \"\",\n \"fieldBIndex\": 0,\n \"fieldBRequired\": false,\n \"outputConstructor\": \"\",\n \"outputToField\": \"\",\n \"outputToFieldIndex\": 0,\n \"overrideOutputField\": false\n },\n \"created\": \"\",\n \"excludeDetails\": {\n \"caseSensitive\": false,\n \"expressionValue\": \"\",\n \"field\": \"\",\n \"fieldIndex\": 0,\n \"kind\": \"\",\n \"matchType\": \"\"\n },\n \"id\": \"\",\n \"includeDetails\": {},\n \"kind\": \"\",\n \"lowercaseDetails\": {\n \"field\": \"\",\n \"fieldIndex\": 0\n },\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"searchAndReplaceDetails\": {\n \"caseSensitive\": false,\n \"field\": \"\",\n \"fieldIndex\": 0,\n \"replaceString\": \"\",\n \"searchString\": \"\"\n },\n \"selfLink\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"uppercaseDetails\": {\n \"field\": \"\",\n \"fieldIndex\": 0\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 \"accountId\": \"\",\n \"advancedDetails\": {\n \"caseSensitive\": false,\n \"extractA\": \"\",\n \"extractB\": \"\",\n \"fieldA\": \"\",\n \"fieldAIndex\": 0,\n \"fieldARequired\": false,\n \"fieldB\": \"\",\n \"fieldBIndex\": 0,\n \"fieldBRequired\": false,\n \"outputConstructor\": \"\",\n \"outputToField\": \"\",\n \"outputToFieldIndex\": 0,\n \"overrideOutputField\": false\n },\n \"created\": \"\",\n \"excludeDetails\": {\n \"caseSensitive\": false,\n \"expressionValue\": \"\",\n \"field\": \"\",\n \"fieldIndex\": 0,\n \"kind\": \"\",\n \"matchType\": \"\"\n },\n \"id\": \"\",\n \"includeDetails\": {},\n \"kind\": \"\",\n \"lowercaseDetails\": {\n \"field\": \"\",\n \"fieldIndex\": 0\n },\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"searchAndReplaceDetails\": {\n \"caseSensitive\": false,\n \"field\": \"\",\n \"fieldIndex\": 0,\n \"replaceString\": \"\",\n \"searchString\": \"\"\n },\n \"selfLink\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"uppercaseDetails\": {\n \"field\": \"\",\n \"fieldIndex\": 0\n }\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/management/accounts/:accountId/filters")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/management/accounts/:accountId/filters")
.header("content-type", "application/json")
.body("{\n \"accountId\": \"\",\n \"advancedDetails\": {\n \"caseSensitive\": false,\n \"extractA\": \"\",\n \"extractB\": \"\",\n \"fieldA\": \"\",\n \"fieldAIndex\": 0,\n \"fieldARequired\": false,\n \"fieldB\": \"\",\n \"fieldBIndex\": 0,\n \"fieldBRequired\": false,\n \"outputConstructor\": \"\",\n \"outputToField\": \"\",\n \"outputToFieldIndex\": 0,\n \"overrideOutputField\": false\n },\n \"created\": \"\",\n \"excludeDetails\": {\n \"caseSensitive\": false,\n \"expressionValue\": \"\",\n \"field\": \"\",\n \"fieldIndex\": 0,\n \"kind\": \"\",\n \"matchType\": \"\"\n },\n \"id\": \"\",\n \"includeDetails\": {},\n \"kind\": \"\",\n \"lowercaseDetails\": {\n \"field\": \"\",\n \"fieldIndex\": 0\n },\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"searchAndReplaceDetails\": {\n \"caseSensitive\": false,\n \"field\": \"\",\n \"fieldIndex\": 0,\n \"replaceString\": \"\",\n \"searchString\": \"\"\n },\n \"selfLink\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"uppercaseDetails\": {\n \"field\": \"\",\n \"fieldIndex\": 0\n }\n}")
.asString();
const data = JSON.stringify({
accountId: '',
advancedDetails: {
caseSensitive: false,
extractA: '',
extractB: '',
fieldA: '',
fieldAIndex: 0,
fieldARequired: false,
fieldB: '',
fieldBIndex: 0,
fieldBRequired: false,
outputConstructor: '',
outputToField: '',
outputToFieldIndex: 0,
overrideOutputField: false
},
created: '',
excludeDetails: {
caseSensitive: false,
expressionValue: '',
field: '',
fieldIndex: 0,
kind: '',
matchType: ''
},
id: '',
includeDetails: {},
kind: '',
lowercaseDetails: {
field: '',
fieldIndex: 0
},
name: '',
parentLink: {
href: '',
type: ''
},
searchAndReplaceDetails: {
caseSensitive: false,
field: '',
fieldIndex: 0,
replaceString: '',
searchString: ''
},
selfLink: '',
type: '',
updated: '',
uppercaseDetails: {
field: '',
fieldIndex: 0
}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/management/accounts/:accountId/filters');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/management/accounts/:accountId/filters',
headers: {'content-type': 'application/json'},
data: {
accountId: '',
advancedDetails: {
caseSensitive: false,
extractA: '',
extractB: '',
fieldA: '',
fieldAIndex: 0,
fieldARequired: false,
fieldB: '',
fieldBIndex: 0,
fieldBRequired: false,
outputConstructor: '',
outputToField: '',
outputToFieldIndex: 0,
overrideOutputField: false
},
created: '',
excludeDetails: {
caseSensitive: false,
expressionValue: '',
field: '',
fieldIndex: 0,
kind: '',
matchType: ''
},
id: '',
includeDetails: {},
kind: '',
lowercaseDetails: {field: '', fieldIndex: 0},
name: '',
parentLink: {href: '', type: ''},
searchAndReplaceDetails: {
caseSensitive: false,
field: '',
fieldIndex: 0,
replaceString: '',
searchString: ''
},
selfLink: '',
type: '',
updated: '',
uppercaseDetails: {field: '', fieldIndex: 0}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/management/accounts/:accountId/filters';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"accountId":"","advancedDetails":{"caseSensitive":false,"extractA":"","extractB":"","fieldA":"","fieldAIndex":0,"fieldARequired":false,"fieldB":"","fieldBIndex":0,"fieldBRequired":false,"outputConstructor":"","outputToField":"","outputToFieldIndex":0,"overrideOutputField":false},"created":"","excludeDetails":{"caseSensitive":false,"expressionValue":"","field":"","fieldIndex":0,"kind":"","matchType":""},"id":"","includeDetails":{},"kind":"","lowercaseDetails":{"field":"","fieldIndex":0},"name":"","parentLink":{"href":"","type":""},"searchAndReplaceDetails":{"caseSensitive":false,"field":"","fieldIndex":0,"replaceString":"","searchString":""},"selfLink":"","type":"","updated":"","uppercaseDetails":{"field":"","fieldIndex":0}}'
};
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}}/management/accounts/:accountId/filters',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "accountId": "",\n "advancedDetails": {\n "caseSensitive": false,\n "extractA": "",\n "extractB": "",\n "fieldA": "",\n "fieldAIndex": 0,\n "fieldARequired": false,\n "fieldB": "",\n "fieldBIndex": 0,\n "fieldBRequired": false,\n "outputConstructor": "",\n "outputToField": "",\n "outputToFieldIndex": 0,\n "overrideOutputField": false\n },\n "created": "",\n "excludeDetails": {\n "caseSensitive": false,\n "expressionValue": "",\n "field": "",\n "fieldIndex": 0,\n "kind": "",\n "matchType": ""\n },\n "id": "",\n "includeDetails": {},\n "kind": "",\n "lowercaseDetails": {\n "field": "",\n "fieldIndex": 0\n },\n "name": "",\n "parentLink": {\n "href": "",\n "type": ""\n },\n "searchAndReplaceDetails": {\n "caseSensitive": false,\n "field": "",\n "fieldIndex": 0,\n "replaceString": "",\n "searchString": ""\n },\n "selfLink": "",\n "type": "",\n "updated": "",\n "uppercaseDetails": {\n "field": "",\n "fieldIndex": 0\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 \"accountId\": \"\",\n \"advancedDetails\": {\n \"caseSensitive\": false,\n \"extractA\": \"\",\n \"extractB\": \"\",\n \"fieldA\": \"\",\n \"fieldAIndex\": 0,\n \"fieldARequired\": false,\n \"fieldB\": \"\",\n \"fieldBIndex\": 0,\n \"fieldBRequired\": false,\n \"outputConstructor\": \"\",\n \"outputToField\": \"\",\n \"outputToFieldIndex\": 0,\n \"overrideOutputField\": false\n },\n \"created\": \"\",\n \"excludeDetails\": {\n \"caseSensitive\": false,\n \"expressionValue\": \"\",\n \"field\": \"\",\n \"fieldIndex\": 0,\n \"kind\": \"\",\n \"matchType\": \"\"\n },\n \"id\": \"\",\n \"includeDetails\": {},\n \"kind\": \"\",\n \"lowercaseDetails\": {\n \"field\": \"\",\n \"fieldIndex\": 0\n },\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"searchAndReplaceDetails\": {\n \"caseSensitive\": false,\n \"field\": \"\",\n \"fieldIndex\": 0,\n \"replaceString\": \"\",\n \"searchString\": \"\"\n },\n \"selfLink\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"uppercaseDetails\": {\n \"field\": \"\",\n \"fieldIndex\": 0\n }\n}")
val request = Request.Builder()
.url("{{baseUrl}}/management/accounts/:accountId/filters")
.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/management/accounts/:accountId/filters',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
accountId: '',
advancedDetails: {
caseSensitive: false,
extractA: '',
extractB: '',
fieldA: '',
fieldAIndex: 0,
fieldARequired: false,
fieldB: '',
fieldBIndex: 0,
fieldBRequired: false,
outputConstructor: '',
outputToField: '',
outputToFieldIndex: 0,
overrideOutputField: false
},
created: '',
excludeDetails: {
caseSensitive: false,
expressionValue: '',
field: '',
fieldIndex: 0,
kind: '',
matchType: ''
},
id: '',
includeDetails: {},
kind: '',
lowercaseDetails: {field: '', fieldIndex: 0},
name: '',
parentLink: {href: '', type: ''},
searchAndReplaceDetails: {
caseSensitive: false,
field: '',
fieldIndex: 0,
replaceString: '',
searchString: ''
},
selfLink: '',
type: '',
updated: '',
uppercaseDetails: {field: '', fieldIndex: 0}
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/management/accounts/:accountId/filters',
headers: {'content-type': 'application/json'},
body: {
accountId: '',
advancedDetails: {
caseSensitive: false,
extractA: '',
extractB: '',
fieldA: '',
fieldAIndex: 0,
fieldARequired: false,
fieldB: '',
fieldBIndex: 0,
fieldBRequired: false,
outputConstructor: '',
outputToField: '',
outputToFieldIndex: 0,
overrideOutputField: false
},
created: '',
excludeDetails: {
caseSensitive: false,
expressionValue: '',
field: '',
fieldIndex: 0,
kind: '',
matchType: ''
},
id: '',
includeDetails: {},
kind: '',
lowercaseDetails: {field: '', fieldIndex: 0},
name: '',
parentLink: {href: '', type: ''},
searchAndReplaceDetails: {
caseSensitive: false,
field: '',
fieldIndex: 0,
replaceString: '',
searchString: ''
},
selfLink: '',
type: '',
updated: '',
uppercaseDetails: {field: '', fieldIndex: 0}
},
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}}/management/accounts/:accountId/filters');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
accountId: '',
advancedDetails: {
caseSensitive: false,
extractA: '',
extractB: '',
fieldA: '',
fieldAIndex: 0,
fieldARequired: false,
fieldB: '',
fieldBIndex: 0,
fieldBRequired: false,
outputConstructor: '',
outputToField: '',
outputToFieldIndex: 0,
overrideOutputField: false
},
created: '',
excludeDetails: {
caseSensitive: false,
expressionValue: '',
field: '',
fieldIndex: 0,
kind: '',
matchType: ''
},
id: '',
includeDetails: {},
kind: '',
lowercaseDetails: {
field: '',
fieldIndex: 0
},
name: '',
parentLink: {
href: '',
type: ''
},
searchAndReplaceDetails: {
caseSensitive: false,
field: '',
fieldIndex: 0,
replaceString: '',
searchString: ''
},
selfLink: '',
type: '',
updated: '',
uppercaseDetails: {
field: '',
fieldIndex: 0
}
});
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}}/management/accounts/:accountId/filters',
headers: {'content-type': 'application/json'},
data: {
accountId: '',
advancedDetails: {
caseSensitive: false,
extractA: '',
extractB: '',
fieldA: '',
fieldAIndex: 0,
fieldARequired: false,
fieldB: '',
fieldBIndex: 0,
fieldBRequired: false,
outputConstructor: '',
outputToField: '',
outputToFieldIndex: 0,
overrideOutputField: false
},
created: '',
excludeDetails: {
caseSensitive: false,
expressionValue: '',
field: '',
fieldIndex: 0,
kind: '',
matchType: ''
},
id: '',
includeDetails: {},
kind: '',
lowercaseDetails: {field: '', fieldIndex: 0},
name: '',
parentLink: {href: '', type: ''},
searchAndReplaceDetails: {
caseSensitive: false,
field: '',
fieldIndex: 0,
replaceString: '',
searchString: ''
},
selfLink: '',
type: '',
updated: '',
uppercaseDetails: {field: '', fieldIndex: 0}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/management/accounts/:accountId/filters';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"accountId":"","advancedDetails":{"caseSensitive":false,"extractA":"","extractB":"","fieldA":"","fieldAIndex":0,"fieldARequired":false,"fieldB":"","fieldBIndex":0,"fieldBRequired":false,"outputConstructor":"","outputToField":"","outputToFieldIndex":0,"overrideOutputField":false},"created":"","excludeDetails":{"caseSensitive":false,"expressionValue":"","field":"","fieldIndex":0,"kind":"","matchType":""},"id":"","includeDetails":{},"kind":"","lowercaseDetails":{"field":"","fieldIndex":0},"name":"","parentLink":{"href":"","type":""},"searchAndReplaceDetails":{"caseSensitive":false,"field":"","fieldIndex":0,"replaceString":"","searchString":""},"selfLink":"","type":"","updated":"","uppercaseDetails":{"field":"","fieldIndex":0}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"accountId": @"",
@"advancedDetails": @{ @"caseSensitive": @NO, @"extractA": @"", @"extractB": @"", @"fieldA": @"", @"fieldAIndex": @0, @"fieldARequired": @NO, @"fieldB": @"", @"fieldBIndex": @0, @"fieldBRequired": @NO, @"outputConstructor": @"", @"outputToField": @"", @"outputToFieldIndex": @0, @"overrideOutputField": @NO },
@"created": @"",
@"excludeDetails": @{ @"caseSensitive": @NO, @"expressionValue": @"", @"field": @"", @"fieldIndex": @0, @"kind": @"", @"matchType": @"" },
@"id": @"",
@"includeDetails": @{ },
@"kind": @"",
@"lowercaseDetails": @{ @"field": @"", @"fieldIndex": @0 },
@"name": @"",
@"parentLink": @{ @"href": @"", @"type": @"" },
@"searchAndReplaceDetails": @{ @"caseSensitive": @NO, @"field": @"", @"fieldIndex": @0, @"replaceString": @"", @"searchString": @"" },
@"selfLink": @"",
@"type": @"",
@"updated": @"",
@"uppercaseDetails": @{ @"field": @"", @"fieldIndex": @0 } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/management/accounts/:accountId/filters"]
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}}/management/accounts/:accountId/filters" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"accountId\": \"\",\n \"advancedDetails\": {\n \"caseSensitive\": false,\n \"extractA\": \"\",\n \"extractB\": \"\",\n \"fieldA\": \"\",\n \"fieldAIndex\": 0,\n \"fieldARequired\": false,\n \"fieldB\": \"\",\n \"fieldBIndex\": 0,\n \"fieldBRequired\": false,\n \"outputConstructor\": \"\",\n \"outputToField\": \"\",\n \"outputToFieldIndex\": 0,\n \"overrideOutputField\": false\n },\n \"created\": \"\",\n \"excludeDetails\": {\n \"caseSensitive\": false,\n \"expressionValue\": \"\",\n \"field\": \"\",\n \"fieldIndex\": 0,\n \"kind\": \"\",\n \"matchType\": \"\"\n },\n \"id\": \"\",\n \"includeDetails\": {},\n \"kind\": \"\",\n \"lowercaseDetails\": {\n \"field\": \"\",\n \"fieldIndex\": 0\n },\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"searchAndReplaceDetails\": {\n \"caseSensitive\": false,\n \"field\": \"\",\n \"fieldIndex\": 0,\n \"replaceString\": \"\",\n \"searchString\": \"\"\n },\n \"selfLink\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"uppercaseDetails\": {\n \"field\": \"\",\n \"fieldIndex\": 0\n }\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/management/accounts/:accountId/filters",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'accountId' => '',
'advancedDetails' => [
'caseSensitive' => null,
'extractA' => '',
'extractB' => '',
'fieldA' => '',
'fieldAIndex' => 0,
'fieldARequired' => null,
'fieldB' => '',
'fieldBIndex' => 0,
'fieldBRequired' => null,
'outputConstructor' => '',
'outputToField' => '',
'outputToFieldIndex' => 0,
'overrideOutputField' => null
],
'created' => '',
'excludeDetails' => [
'caseSensitive' => null,
'expressionValue' => '',
'field' => '',
'fieldIndex' => 0,
'kind' => '',
'matchType' => ''
],
'id' => '',
'includeDetails' => [
],
'kind' => '',
'lowercaseDetails' => [
'field' => '',
'fieldIndex' => 0
],
'name' => '',
'parentLink' => [
'href' => '',
'type' => ''
],
'searchAndReplaceDetails' => [
'caseSensitive' => null,
'field' => '',
'fieldIndex' => 0,
'replaceString' => '',
'searchString' => ''
],
'selfLink' => '',
'type' => '',
'updated' => '',
'uppercaseDetails' => [
'field' => '',
'fieldIndex' => 0
]
]),
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}}/management/accounts/:accountId/filters', [
'body' => '{
"accountId": "",
"advancedDetails": {
"caseSensitive": false,
"extractA": "",
"extractB": "",
"fieldA": "",
"fieldAIndex": 0,
"fieldARequired": false,
"fieldB": "",
"fieldBIndex": 0,
"fieldBRequired": false,
"outputConstructor": "",
"outputToField": "",
"outputToFieldIndex": 0,
"overrideOutputField": false
},
"created": "",
"excludeDetails": {
"caseSensitive": false,
"expressionValue": "",
"field": "",
"fieldIndex": 0,
"kind": "",
"matchType": ""
},
"id": "",
"includeDetails": {},
"kind": "",
"lowercaseDetails": {
"field": "",
"fieldIndex": 0
},
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"searchAndReplaceDetails": {
"caseSensitive": false,
"field": "",
"fieldIndex": 0,
"replaceString": "",
"searchString": ""
},
"selfLink": "",
"type": "",
"updated": "",
"uppercaseDetails": {
"field": "",
"fieldIndex": 0
}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/management/accounts/:accountId/filters');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'accountId' => '',
'advancedDetails' => [
'caseSensitive' => null,
'extractA' => '',
'extractB' => '',
'fieldA' => '',
'fieldAIndex' => 0,
'fieldARequired' => null,
'fieldB' => '',
'fieldBIndex' => 0,
'fieldBRequired' => null,
'outputConstructor' => '',
'outputToField' => '',
'outputToFieldIndex' => 0,
'overrideOutputField' => null
],
'created' => '',
'excludeDetails' => [
'caseSensitive' => null,
'expressionValue' => '',
'field' => '',
'fieldIndex' => 0,
'kind' => '',
'matchType' => ''
],
'id' => '',
'includeDetails' => [
],
'kind' => '',
'lowercaseDetails' => [
'field' => '',
'fieldIndex' => 0
],
'name' => '',
'parentLink' => [
'href' => '',
'type' => ''
],
'searchAndReplaceDetails' => [
'caseSensitive' => null,
'field' => '',
'fieldIndex' => 0,
'replaceString' => '',
'searchString' => ''
],
'selfLink' => '',
'type' => '',
'updated' => '',
'uppercaseDetails' => [
'field' => '',
'fieldIndex' => 0
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'accountId' => '',
'advancedDetails' => [
'caseSensitive' => null,
'extractA' => '',
'extractB' => '',
'fieldA' => '',
'fieldAIndex' => 0,
'fieldARequired' => null,
'fieldB' => '',
'fieldBIndex' => 0,
'fieldBRequired' => null,
'outputConstructor' => '',
'outputToField' => '',
'outputToFieldIndex' => 0,
'overrideOutputField' => null
],
'created' => '',
'excludeDetails' => [
'caseSensitive' => null,
'expressionValue' => '',
'field' => '',
'fieldIndex' => 0,
'kind' => '',
'matchType' => ''
],
'id' => '',
'includeDetails' => [
],
'kind' => '',
'lowercaseDetails' => [
'field' => '',
'fieldIndex' => 0
],
'name' => '',
'parentLink' => [
'href' => '',
'type' => ''
],
'searchAndReplaceDetails' => [
'caseSensitive' => null,
'field' => '',
'fieldIndex' => 0,
'replaceString' => '',
'searchString' => ''
],
'selfLink' => '',
'type' => '',
'updated' => '',
'uppercaseDetails' => [
'field' => '',
'fieldIndex' => 0
]
]));
$request->setRequestUrl('{{baseUrl}}/management/accounts/:accountId/filters');
$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}}/management/accounts/:accountId/filters' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"accountId": "",
"advancedDetails": {
"caseSensitive": false,
"extractA": "",
"extractB": "",
"fieldA": "",
"fieldAIndex": 0,
"fieldARequired": false,
"fieldB": "",
"fieldBIndex": 0,
"fieldBRequired": false,
"outputConstructor": "",
"outputToField": "",
"outputToFieldIndex": 0,
"overrideOutputField": false
},
"created": "",
"excludeDetails": {
"caseSensitive": false,
"expressionValue": "",
"field": "",
"fieldIndex": 0,
"kind": "",
"matchType": ""
},
"id": "",
"includeDetails": {},
"kind": "",
"lowercaseDetails": {
"field": "",
"fieldIndex": 0
},
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"searchAndReplaceDetails": {
"caseSensitive": false,
"field": "",
"fieldIndex": 0,
"replaceString": "",
"searchString": ""
},
"selfLink": "",
"type": "",
"updated": "",
"uppercaseDetails": {
"field": "",
"fieldIndex": 0
}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/management/accounts/:accountId/filters' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"accountId": "",
"advancedDetails": {
"caseSensitive": false,
"extractA": "",
"extractB": "",
"fieldA": "",
"fieldAIndex": 0,
"fieldARequired": false,
"fieldB": "",
"fieldBIndex": 0,
"fieldBRequired": false,
"outputConstructor": "",
"outputToField": "",
"outputToFieldIndex": 0,
"overrideOutputField": false
},
"created": "",
"excludeDetails": {
"caseSensitive": false,
"expressionValue": "",
"field": "",
"fieldIndex": 0,
"kind": "",
"matchType": ""
},
"id": "",
"includeDetails": {},
"kind": "",
"lowercaseDetails": {
"field": "",
"fieldIndex": 0
},
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"searchAndReplaceDetails": {
"caseSensitive": false,
"field": "",
"fieldIndex": 0,
"replaceString": "",
"searchString": ""
},
"selfLink": "",
"type": "",
"updated": "",
"uppercaseDetails": {
"field": "",
"fieldIndex": 0
}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"accountId\": \"\",\n \"advancedDetails\": {\n \"caseSensitive\": false,\n \"extractA\": \"\",\n \"extractB\": \"\",\n \"fieldA\": \"\",\n \"fieldAIndex\": 0,\n \"fieldARequired\": false,\n \"fieldB\": \"\",\n \"fieldBIndex\": 0,\n \"fieldBRequired\": false,\n \"outputConstructor\": \"\",\n \"outputToField\": \"\",\n \"outputToFieldIndex\": 0,\n \"overrideOutputField\": false\n },\n \"created\": \"\",\n \"excludeDetails\": {\n \"caseSensitive\": false,\n \"expressionValue\": \"\",\n \"field\": \"\",\n \"fieldIndex\": 0,\n \"kind\": \"\",\n \"matchType\": \"\"\n },\n \"id\": \"\",\n \"includeDetails\": {},\n \"kind\": \"\",\n \"lowercaseDetails\": {\n \"field\": \"\",\n \"fieldIndex\": 0\n },\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"searchAndReplaceDetails\": {\n \"caseSensitive\": false,\n \"field\": \"\",\n \"fieldIndex\": 0,\n \"replaceString\": \"\",\n \"searchString\": \"\"\n },\n \"selfLink\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"uppercaseDetails\": {\n \"field\": \"\",\n \"fieldIndex\": 0\n }\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/management/accounts/:accountId/filters", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/management/accounts/:accountId/filters"
payload = {
"accountId": "",
"advancedDetails": {
"caseSensitive": False,
"extractA": "",
"extractB": "",
"fieldA": "",
"fieldAIndex": 0,
"fieldARequired": False,
"fieldB": "",
"fieldBIndex": 0,
"fieldBRequired": False,
"outputConstructor": "",
"outputToField": "",
"outputToFieldIndex": 0,
"overrideOutputField": False
},
"created": "",
"excludeDetails": {
"caseSensitive": False,
"expressionValue": "",
"field": "",
"fieldIndex": 0,
"kind": "",
"matchType": ""
},
"id": "",
"includeDetails": {},
"kind": "",
"lowercaseDetails": {
"field": "",
"fieldIndex": 0
},
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"searchAndReplaceDetails": {
"caseSensitive": False,
"field": "",
"fieldIndex": 0,
"replaceString": "",
"searchString": ""
},
"selfLink": "",
"type": "",
"updated": "",
"uppercaseDetails": {
"field": "",
"fieldIndex": 0
}
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/management/accounts/:accountId/filters"
payload <- "{\n \"accountId\": \"\",\n \"advancedDetails\": {\n \"caseSensitive\": false,\n \"extractA\": \"\",\n \"extractB\": \"\",\n \"fieldA\": \"\",\n \"fieldAIndex\": 0,\n \"fieldARequired\": false,\n \"fieldB\": \"\",\n \"fieldBIndex\": 0,\n \"fieldBRequired\": false,\n \"outputConstructor\": \"\",\n \"outputToField\": \"\",\n \"outputToFieldIndex\": 0,\n \"overrideOutputField\": false\n },\n \"created\": \"\",\n \"excludeDetails\": {\n \"caseSensitive\": false,\n \"expressionValue\": \"\",\n \"field\": \"\",\n \"fieldIndex\": 0,\n \"kind\": \"\",\n \"matchType\": \"\"\n },\n \"id\": \"\",\n \"includeDetails\": {},\n \"kind\": \"\",\n \"lowercaseDetails\": {\n \"field\": \"\",\n \"fieldIndex\": 0\n },\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"searchAndReplaceDetails\": {\n \"caseSensitive\": false,\n \"field\": \"\",\n \"fieldIndex\": 0,\n \"replaceString\": \"\",\n \"searchString\": \"\"\n },\n \"selfLink\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"uppercaseDetails\": {\n \"field\": \"\",\n \"fieldIndex\": 0\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}}/management/accounts/:accountId/filters")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"accountId\": \"\",\n \"advancedDetails\": {\n \"caseSensitive\": false,\n \"extractA\": \"\",\n \"extractB\": \"\",\n \"fieldA\": \"\",\n \"fieldAIndex\": 0,\n \"fieldARequired\": false,\n \"fieldB\": \"\",\n \"fieldBIndex\": 0,\n \"fieldBRequired\": false,\n \"outputConstructor\": \"\",\n \"outputToField\": \"\",\n \"outputToFieldIndex\": 0,\n \"overrideOutputField\": false\n },\n \"created\": \"\",\n \"excludeDetails\": {\n \"caseSensitive\": false,\n \"expressionValue\": \"\",\n \"field\": \"\",\n \"fieldIndex\": 0,\n \"kind\": \"\",\n \"matchType\": \"\"\n },\n \"id\": \"\",\n \"includeDetails\": {},\n \"kind\": \"\",\n \"lowercaseDetails\": {\n \"field\": \"\",\n \"fieldIndex\": 0\n },\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"searchAndReplaceDetails\": {\n \"caseSensitive\": false,\n \"field\": \"\",\n \"fieldIndex\": 0,\n \"replaceString\": \"\",\n \"searchString\": \"\"\n },\n \"selfLink\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"uppercaseDetails\": {\n \"field\": \"\",\n \"fieldIndex\": 0\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/management/accounts/:accountId/filters') do |req|
req.body = "{\n \"accountId\": \"\",\n \"advancedDetails\": {\n \"caseSensitive\": false,\n \"extractA\": \"\",\n \"extractB\": \"\",\n \"fieldA\": \"\",\n \"fieldAIndex\": 0,\n \"fieldARequired\": false,\n \"fieldB\": \"\",\n \"fieldBIndex\": 0,\n \"fieldBRequired\": false,\n \"outputConstructor\": \"\",\n \"outputToField\": \"\",\n \"outputToFieldIndex\": 0,\n \"overrideOutputField\": false\n },\n \"created\": \"\",\n \"excludeDetails\": {\n \"caseSensitive\": false,\n \"expressionValue\": \"\",\n \"field\": \"\",\n \"fieldIndex\": 0,\n \"kind\": \"\",\n \"matchType\": \"\"\n },\n \"id\": \"\",\n \"includeDetails\": {},\n \"kind\": \"\",\n \"lowercaseDetails\": {\n \"field\": \"\",\n \"fieldIndex\": 0\n },\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"searchAndReplaceDetails\": {\n \"caseSensitive\": false,\n \"field\": \"\",\n \"fieldIndex\": 0,\n \"replaceString\": \"\",\n \"searchString\": \"\"\n },\n \"selfLink\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"uppercaseDetails\": {\n \"field\": \"\",\n \"fieldIndex\": 0\n }\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/management/accounts/:accountId/filters";
let payload = json!({
"accountId": "",
"advancedDetails": json!({
"caseSensitive": false,
"extractA": "",
"extractB": "",
"fieldA": "",
"fieldAIndex": 0,
"fieldARequired": false,
"fieldB": "",
"fieldBIndex": 0,
"fieldBRequired": false,
"outputConstructor": "",
"outputToField": "",
"outputToFieldIndex": 0,
"overrideOutputField": false
}),
"created": "",
"excludeDetails": json!({
"caseSensitive": false,
"expressionValue": "",
"field": "",
"fieldIndex": 0,
"kind": "",
"matchType": ""
}),
"id": "",
"includeDetails": json!({}),
"kind": "",
"lowercaseDetails": json!({
"field": "",
"fieldIndex": 0
}),
"name": "",
"parentLink": json!({
"href": "",
"type": ""
}),
"searchAndReplaceDetails": json!({
"caseSensitive": false,
"field": "",
"fieldIndex": 0,
"replaceString": "",
"searchString": ""
}),
"selfLink": "",
"type": "",
"updated": "",
"uppercaseDetails": json!({
"field": "",
"fieldIndex": 0
})
});
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}}/management/accounts/:accountId/filters \
--header 'content-type: application/json' \
--data '{
"accountId": "",
"advancedDetails": {
"caseSensitive": false,
"extractA": "",
"extractB": "",
"fieldA": "",
"fieldAIndex": 0,
"fieldARequired": false,
"fieldB": "",
"fieldBIndex": 0,
"fieldBRequired": false,
"outputConstructor": "",
"outputToField": "",
"outputToFieldIndex": 0,
"overrideOutputField": false
},
"created": "",
"excludeDetails": {
"caseSensitive": false,
"expressionValue": "",
"field": "",
"fieldIndex": 0,
"kind": "",
"matchType": ""
},
"id": "",
"includeDetails": {},
"kind": "",
"lowercaseDetails": {
"field": "",
"fieldIndex": 0
},
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"searchAndReplaceDetails": {
"caseSensitive": false,
"field": "",
"fieldIndex": 0,
"replaceString": "",
"searchString": ""
},
"selfLink": "",
"type": "",
"updated": "",
"uppercaseDetails": {
"field": "",
"fieldIndex": 0
}
}'
echo '{
"accountId": "",
"advancedDetails": {
"caseSensitive": false,
"extractA": "",
"extractB": "",
"fieldA": "",
"fieldAIndex": 0,
"fieldARequired": false,
"fieldB": "",
"fieldBIndex": 0,
"fieldBRequired": false,
"outputConstructor": "",
"outputToField": "",
"outputToFieldIndex": 0,
"overrideOutputField": false
},
"created": "",
"excludeDetails": {
"caseSensitive": false,
"expressionValue": "",
"field": "",
"fieldIndex": 0,
"kind": "",
"matchType": ""
},
"id": "",
"includeDetails": {},
"kind": "",
"lowercaseDetails": {
"field": "",
"fieldIndex": 0
},
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"searchAndReplaceDetails": {
"caseSensitive": false,
"field": "",
"fieldIndex": 0,
"replaceString": "",
"searchString": ""
},
"selfLink": "",
"type": "",
"updated": "",
"uppercaseDetails": {
"field": "",
"fieldIndex": 0
}
}' | \
http POST {{baseUrl}}/management/accounts/:accountId/filters \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "accountId": "",\n "advancedDetails": {\n "caseSensitive": false,\n "extractA": "",\n "extractB": "",\n "fieldA": "",\n "fieldAIndex": 0,\n "fieldARequired": false,\n "fieldB": "",\n "fieldBIndex": 0,\n "fieldBRequired": false,\n "outputConstructor": "",\n "outputToField": "",\n "outputToFieldIndex": 0,\n "overrideOutputField": false\n },\n "created": "",\n "excludeDetails": {\n "caseSensitive": false,\n "expressionValue": "",\n "field": "",\n "fieldIndex": 0,\n "kind": "",\n "matchType": ""\n },\n "id": "",\n "includeDetails": {},\n "kind": "",\n "lowercaseDetails": {\n "field": "",\n "fieldIndex": 0\n },\n "name": "",\n "parentLink": {\n "href": "",\n "type": ""\n },\n "searchAndReplaceDetails": {\n "caseSensitive": false,\n "field": "",\n "fieldIndex": 0,\n "replaceString": "",\n "searchString": ""\n },\n "selfLink": "",\n "type": "",\n "updated": "",\n "uppercaseDetails": {\n "field": "",\n "fieldIndex": 0\n }\n}' \
--output-document \
- {{baseUrl}}/management/accounts/:accountId/filters
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"accountId": "",
"advancedDetails": [
"caseSensitive": false,
"extractA": "",
"extractB": "",
"fieldA": "",
"fieldAIndex": 0,
"fieldARequired": false,
"fieldB": "",
"fieldBIndex": 0,
"fieldBRequired": false,
"outputConstructor": "",
"outputToField": "",
"outputToFieldIndex": 0,
"overrideOutputField": false
],
"created": "",
"excludeDetails": [
"caseSensitive": false,
"expressionValue": "",
"field": "",
"fieldIndex": 0,
"kind": "",
"matchType": ""
],
"id": "",
"includeDetails": [],
"kind": "",
"lowercaseDetails": [
"field": "",
"fieldIndex": 0
],
"name": "",
"parentLink": [
"href": "",
"type": ""
],
"searchAndReplaceDetails": [
"caseSensitive": false,
"field": "",
"fieldIndex": 0,
"replaceString": "",
"searchString": ""
],
"selfLink": "",
"type": "",
"updated": "",
"uppercaseDetails": [
"field": "",
"fieldIndex": 0
]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/management/accounts/:accountId/filters")! 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
analytics.management.filters.list
{{baseUrl}}/management/accounts/:accountId/filters
QUERY PARAMS
accountId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/management/accounts/:accountId/filters");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/management/accounts/:accountId/filters")
require "http/client"
url = "{{baseUrl}}/management/accounts/:accountId/filters"
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}}/management/accounts/:accountId/filters"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/management/accounts/:accountId/filters");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/management/accounts/:accountId/filters"
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/management/accounts/:accountId/filters HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/management/accounts/:accountId/filters")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/management/accounts/:accountId/filters"))
.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}}/management/accounts/:accountId/filters")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/management/accounts/:accountId/filters")
.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}}/management/accounts/:accountId/filters');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/management/accounts/:accountId/filters'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/management/accounts/:accountId/filters';
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}}/management/accounts/:accountId/filters',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/management/accounts/:accountId/filters")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/management/accounts/:accountId/filters',
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}}/management/accounts/:accountId/filters'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/management/accounts/:accountId/filters');
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}}/management/accounts/:accountId/filters'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/management/accounts/:accountId/filters';
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}}/management/accounts/:accountId/filters"]
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}}/management/accounts/:accountId/filters" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/management/accounts/:accountId/filters",
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}}/management/accounts/:accountId/filters');
echo $response->getBody();
setUrl('{{baseUrl}}/management/accounts/:accountId/filters');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/management/accounts/:accountId/filters');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/management/accounts/:accountId/filters' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/management/accounts/:accountId/filters' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/management/accounts/:accountId/filters")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/management/accounts/:accountId/filters"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/management/accounts/:accountId/filters"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/management/accounts/:accountId/filters")
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/management/accounts/:accountId/filters') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/management/accounts/:accountId/filters";
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}}/management/accounts/:accountId/filters
http GET {{baseUrl}}/management/accounts/:accountId/filters
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/management/accounts/:accountId/filters
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/management/accounts/:accountId/filters")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PATCH
analytics.management.filters.patch
{{baseUrl}}/management/accounts/:accountId/filters/:filterId
QUERY PARAMS
accountId
filterId
BODY json
{
"accountId": "",
"advancedDetails": {
"caseSensitive": false,
"extractA": "",
"extractB": "",
"fieldA": "",
"fieldAIndex": 0,
"fieldARequired": false,
"fieldB": "",
"fieldBIndex": 0,
"fieldBRequired": false,
"outputConstructor": "",
"outputToField": "",
"outputToFieldIndex": 0,
"overrideOutputField": false
},
"created": "",
"excludeDetails": {
"caseSensitive": false,
"expressionValue": "",
"field": "",
"fieldIndex": 0,
"kind": "",
"matchType": ""
},
"id": "",
"includeDetails": {},
"kind": "",
"lowercaseDetails": {
"field": "",
"fieldIndex": 0
},
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"searchAndReplaceDetails": {
"caseSensitive": false,
"field": "",
"fieldIndex": 0,
"replaceString": "",
"searchString": ""
},
"selfLink": "",
"type": "",
"updated": "",
"uppercaseDetails": {
"field": "",
"fieldIndex": 0
}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/management/accounts/:accountId/filters/:filterId");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"accountId\": \"\",\n \"advancedDetails\": {\n \"caseSensitive\": false,\n \"extractA\": \"\",\n \"extractB\": \"\",\n \"fieldA\": \"\",\n \"fieldAIndex\": 0,\n \"fieldARequired\": false,\n \"fieldB\": \"\",\n \"fieldBIndex\": 0,\n \"fieldBRequired\": false,\n \"outputConstructor\": \"\",\n \"outputToField\": \"\",\n \"outputToFieldIndex\": 0,\n \"overrideOutputField\": false\n },\n \"created\": \"\",\n \"excludeDetails\": {\n \"caseSensitive\": false,\n \"expressionValue\": \"\",\n \"field\": \"\",\n \"fieldIndex\": 0,\n \"kind\": \"\",\n \"matchType\": \"\"\n },\n \"id\": \"\",\n \"includeDetails\": {},\n \"kind\": \"\",\n \"lowercaseDetails\": {\n \"field\": \"\",\n \"fieldIndex\": 0\n },\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"searchAndReplaceDetails\": {\n \"caseSensitive\": false,\n \"field\": \"\",\n \"fieldIndex\": 0,\n \"replaceString\": \"\",\n \"searchString\": \"\"\n },\n \"selfLink\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"uppercaseDetails\": {\n \"field\": \"\",\n \"fieldIndex\": 0\n }\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/patch "{{baseUrl}}/management/accounts/:accountId/filters/:filterId" {:content-type :json
:form-params {:accountId ""
:advancedDetails {:caseSensitive false
:extractA ""
:extractB ""
:fieldA ""
:fieldAIndex 0
:fieldARequired false
:fieldB ""
:fieldBIndex 0
:fieldBRequired false
:outputConstructor ""
:outputToField ""
:outputToFieldIndex 0
:overrideOutputField false}
:created ""
:excludeDetails {:caseSensitive false
:expressionValue ""
:field ""
:fieldIndex 0
:kind ""
:matchType ""}
:id ""
:includeDetails {}
:kind ""
:lowercaseDetails {:field ""
:fieldIndex 0}
:name ""
:parentLink {:href ""
:type ""}
:searchAndReplaceDetails {:caseSensitive false
:field ""
:fieldIndex 0
:replaceString ""
:searchString ""}
:selfLink ""
:type ""
:updated ""
:uppercaseDetails {:field ""
:fieldIndex 0}}})
require "http/client"
url = "{{baseUrl}}/management/accounts/:accountId/filters/:filterId"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"accountId\": \"\",\n \"advancedDetails\": {\n \"caseSensitive\": false,\n \"extractA\": \"\",\n \"extractB\": \"\",\n \"fieldA\": \"\",\n \"fieldAIndex\": 0,\n \"fieldARequired\": false,\n \"fieldB\": \"\",\n \"fieldBIndex\": 0,\n \"fieldBRequired\": false,\n \"outputConstructor\": \"\",\n \"outputToField\": \"\",\n \"outputToFieldIndex\": 0,\n \"overrideOutputField\": false\n },\n \"created\": \"\",\n \"excludeDetails\": {\n \"caseSensitive\": false,\n \"expressionValue\": \"\",\n \"field\": \"\",\n \"fieldIndex\": 0,\n \"kind\": \"\",\n \"matchType\": \"\"\n },\n \"id\": \"\",\n \"includeDetails\": {},\n \"kind\": \"\",\n \"lowercaseDetails\": {\n \"field\": \"\",\n \"fieldIndex\": 0\n },\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"searchAndReplaceDetails\": {\n \"caseSensitive\": false,\n \"field\": \"\",\n \"fieldIndex\": 0,\n \"replaceString\": \"\",\n \"searchString\": \"\"\n },\n \"selfLink\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"uppercaseDetails\": {\n \"field\": \"\",\n \"fieldIndex\": 0\n }\n}"
response = HTTP::Client.patch url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Patch,
RequestUri = new Uri("{{baseUrl}}/management/accounts/:accountId/filters/:filterId"),
Content = new StringContent("{\n \"accountId\": \"\",\n \"advancedDetails\": {\n \"caseSensitive\": false,\n \"extractA\": \"\",\n \"extractB\": \"\",\n \"fieldA\": \"\",\n \"fieldAIndex\": 0,\n \"fieldARequired\": false,\n \"fieldB\": \"\",\n \"fieldBIndex\": 0,\n \"fieldBRequired\": false,\n \"outputConstructor\": \"\",\n \"outputToField\": \"\",\n \"outputToFieldIndex\": 0,\n \"overrideOutputField\": false\n },\n \"created\": \"\",\n \"excludeDetails\": {\n \"caseSensitive\": false,\n \"expressionValue\": \"\",\n \"field\": \"\",\n \"fieldIndex\": 0,\n \"kind\": \"\",\n \"matchType\": \"\"\n },\n \"id\": \"\",\n \"includeDetails\": {},\n \"kind\": \"\",\n \"lowercaseDetails\": {\n \"field\": \"\",\n \"fieldIndex\": 0\n },\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"searchAndReplaceDetails\": {\n \"caseSensitive\": false,\n \"field\": \"\",\n \"fieldIndex\": 0,\n \"replaceString\": \"\",\n \"searchString\": \"\"\n },\n \"selfLink\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"uppercaseDetails\": {\n \"field\": \"\",\n \"fieldIndex\": 0\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}}/management/accounts/:accountId/filters/:filterId");
var request = new RestRequest("", Method.Patch);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"accountId\": \"\",\n \"advancedDetails\": {\n \"caseSensitive\": false,\n \"extractA\": \"\",\n \"extractB\": \"\",\n \"fieldA\": \"\",\n \"fieldAIndex\": 0,\n \"fieldARequired\": false,\n \"fieldB\": \"\",\n \"fieldBIndex\": 0,\n \"fieldBRequired\": false,\n \"outputConstructor\": \"\",\n \"outputToField\": \"\",\n \"outputToFieldIndex\": 0,\n \"overrideOutputField\": false\n },\n \"created\": \"\",\n \"excludeDetails\": {\n \"caseSensitive\": false,\n \"expressionValue\": \"\",\n \"field\": \"\",\n \"fieldIndex\": 0,\n \"kind\": \"\",\n \"matchType\": \"\"\n },\n \"id\": \"\",\n \"includeDetails\": {},\n \"kind\": \"\",\n \"lowercaseDetails\": {\n \"field\": \"\",\n \"fieldIndex\": 0\n },\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"searchAndReplaceDetails\": {\n \"caseSensitive\": false,\n \"field\": \"\",\n \"fieldIndex\": 0,\n \"replaceString\": \"\",\n \"searchString\": \"\"\n },\n \"selfLink\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"uppercaseDetails\": {\n \"field\": \"\",\n \"fieldIndex\": 0\n }\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/management/accounts/:accountId/filters/:filterId"
payload := strings.NewReader("{\n \"accountId\": \"\",\n \"advancedDetails\": {\n \"caseSensitive\": false,\n \"extractA\": \"\",\n \"extractB\": \"\",\n \"fieldA\": \"\",\n \"fieldAIndex\": 0,\n \"fieldARequired\": false,\n \"fieldB\": \"\",\n \"fieldBIndex\": 0,\n \"fieldBRequired\": false,\n \"outputConstructor\": \"\",\n \"outputToField\": \"\",\n \"outputToFieldIndex\": 0,\n \"overrideOutputField\": false\n },\n \"created\": \"\",\n \"excludeDetails\": {\n \"caseSensitive\": false,\n \"expressionValue\": \"\",\n \"field\": \"\",\n \"fieldIndex\": 0,\n \"kind\": \"\",\n \"matchType\": \"\"\n },\n \"id\": \"\",\n \"includeDetails\": {},\n \"kind\": \"\",\n \"lowercaseDetails\": {\n \"field\": \"\",\n \"fieldIndex\": 0\n },\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"searchAndReplaceDetails\": {\n \"caseSensitive\": false,\n \"field\": \"\",\n \"fieldIndex\": 0,\n \"replaceString\": \"\",\n \"searchString\": \"\"\n },\n \"selfLink\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"uppercaseDetails\": {\n \"field\": \"\",\n \"fieldIndex\": 0\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
PATCH /baseUrl/management/accounts/:accountId/filters/:filterId HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 993
{
"accountId": "",
"advancedDetails": {
"caseSensitive": false,
"extractA": "",
"extractB": "",
"fieldA": "",
"fieldAIndex": 0,
"fieldARequired": false,
"fieldB": "",
"fieldBIndex": 0,
"fieldBRequired": false,
"outputConstructor": "",
"outputToField": "",
"outputToFieldIndex": 0,
"overrideOutputField": false
},
"created": "",
"excludeDetails": {
"caseSensitive": false,
"expressionValue": "",
"field": "",
"fieldIndex": 0,
"kind": "",
"matchType": ""
},
"id": "",
"includeDetails": {},
"kind": "",
"lowercaseDetails": {
"field": "",
"fieldIndex": 0
},
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"searchAndReplaceDetails": {
"caseSensitive": false,
"field": "",
"fieldIndex": 0,
"replaceString": "",
"searchString": ""
},
"selfLink": "",
"type": "",
"updated": "",
"uppercaseDetails": {
"field": "",
"fieldIndex": 0
}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/management/accounts/:accountId/filters/:filterId")
.setHeader("content-type", "application/json")
.setBody("{\n \"accountId\": \"\",\n \"advancedDetails\": {\n \"caseSensitive\": false,\n \"extractA\": \"\",\n \"extractB\": \"\",\n \"fieldA\": \"\",\n \"fieldAIndex\": 0,\n \"fieldARequired\": false,\n \"fieldB\": \"\",\n \"fieldBIndex\": 0,\n \"fieldBRequired\": false,\n \"outputConstructor\": \"\",\n \"outputToField\": \"\",\n \"outputToFieldIndex\": 0,\n \"overrideOutputField\": false\n },\n \"created\": \"\",\n \"excludeDetails\": {\n \"caseSensitive\": false,\n \"expressionValue\": \"\",\n \"field\": \"\",\n \"fieldIndex\": 0,\n \"kind\": \"\",\n \"matchType\": \"\"\n },\n \"id\": \"\",\n \"includeDetails\": {},\n \"kind\": \"\",\n \"lowercaseDetails\": {\n \"field\": \"\",\n \"fieldIndex\": 0\n },\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"searchAndReplaceDetails\": {\n \"caseSensitive\": false,\n \"field\": \"\",\n \"fieldIndex\": 0,\n \"replaceString\": \"\",\n \"searchString\": \"\"\n },\n \"selfLink\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"uppercaseDetails\": {\n \"field\": \"\",\n \"fieldIndex\": 0\n }\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/management/accounts/:accountId/filters/:filterId"))
.header("content-type", "application/json")
.method("PATCH", HttpRequest.BodyPublishers.ofString("{\n \"accountId\": \"\",\n \"advancedDetails\": {\n \"caseSensitive\": false,\n \"extractA\": \"\",\n \"extractB\": \"\",\n \"fieldA\": \"\",\n \"fieldAIndex\": 0,\n \"fieldARequired\": false,\n \"fieldB\": \"\",\n \"fieldBIndex\": 0,\n \"fieldBRequired\": false,\n \"outputConstructor\": \"\",\n \"outputToField\": \"\",\n \"outputToFieldIndex\": 0,\n \"overrideOutputField\": false\n },\n \"created\": \"\",\n \"excludeDetails\": {\n \"caseSensitive\": false,\n \"expressionValue\": \"\",\n \"field\": \"\",\n \"fieldIndex\": 0,\n \"kind\": \"\",\n \"matchType\": \"\"\n },\n \"id\": \"\",\n \"includeDetails\": {},\n \"kind\": \"\",\n \"lowercaseDetails\": {\n \"field\": \"\",\n \"fieldIndex\": 0\n },\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"searchAndReplaceDetails\": {\n \"caseSensitive\": false,\n \"field\": \"\",\n \"fieldIndex\": 0,\n \"replaceString\": \"\",\n \"searchString\": \"\"\n },\n \"selfLink\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"uppercaseDetails\": {\n \"field\": \"\",\n \"fieldIndex\": 0\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 \"accountId\": \"\",\n \"advancedDetails\": {\n \"caseSensitive\": false,\n \"extractA\": \"\",\n \"extractB\": \"\",\n \"fieldA\": \"\",\n \"fieldAIndex\": 0,\n \"fieldARequired\": false,\n \"fieldB\": \"\",\n \"fieldBIndex\": 0,\n \"fieldBRequired\": false,\n \"outputConstructor\": \"\",\n \"outputToField\": \"\",\n \"outputToFieldIndex\": 0,\n \"overrideOutputField\": false\n },\n \"created\": \"\",\n \"excludeDetails\": {\n \"caseSensitive\": false,\n \"expressionValue\": \"\",\n \"field\": \"\",\n \"fieldIndex\": 0,\n \"kind\": \"\",\n \"matchType\": \"\"\n },\n \"id\": \"\",\n \"includeDetails\": {},\n \"kind\": \"\",\n \"lowercaseDetails\": {\n \"field\": \"\",\n \"fieldIndex\": 0\n },\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"searchAndReplaceDetails\": {\n \"caseSensitive\": false,\n \"field\": \"\",\n \"fieldIndex\": 0,\n \"replaceString\": \"\",\n \"searchString\": \"\"\n },\n \"selfLink\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"uppercaseDetails\": {\n \"field\": \"\",\n \"fieldIndex\": 0\n }\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/management/accounts/:accountId/filters/:filterId")
.patch(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/management/accounts/:accountId/filters/:filterId")
.header("content-type", "application/json")
.body("{\n \"accountId\": \"\",\n \"advancedDetails\": {\n \"caseSensitive\": false,\n \"extractA\": \"\",\n \"extractB\": \"\",\n \"fieldA\": \"\",\n \"fieldAIndex\": 0,\n \"fieldARequired\": false,\n \"fieldB\": \"\",\n \"fieldBIndex\": 0,\n \"fieldBRequired\": false,\n \"outputConstructor\": \"\",\n \"outputToField\": \"\",\n \"outputToFieldIndex\": 0,\n \"overrideOutputField\": false\n },\n \"created\": \"\",\n \"excludeDetails\": {\n \"caseSensitive\": false,\n \"expressionValue\": \"\",\n \"field\": \"\",\n \"fieldIndex\": 0,\n \"kind\": \"\",\n \"matchType\": \"\"\n },\n \"id\": \"\",\n \"includeDetails\": {},\n \"kind\": \"\",\n \"lowercaseDetails\": {\n \"field\": \"\",\n \"fieldIndex\": 0\n },\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"searchAndReplaceDetails\": {\n \"caseSensitive\": false,\n \"field\": \"\",\n \"fieldIndex\": 0,\n \"replaceString\": \"\",\n \"searchString\": \"\"\n },\n \"selfLink\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"uppercaseDetails\": {\n \"field\": \"\",\n \"fieldIndex\": 0\n }\n}")
.asString();
const data = JSON.stringify({
accountId: '',
advancedDetails: {
caseSensitive: false,
extractA: '',
extractB: '',
fieldA: '',
fieldAIndex: 0,
fieldARequired: false,
fieldB: '',
fieldBIndex: 0,
fieldBRequired: false,
outputConstructor: '',
outputToField: '',
outputToFieldIndex: 0,
overrideOutputField: false
},
created: '',
excludeDetails: {
caseSensitive: false,
expressionValue: '',
field: '',
fieldIndex: 0,
kind: '',
matchType: ''
},
id: '',
includeDetails: {},
kind: '',
lowercaseDetails: {
field: '',
fieldIndex: 0
},
name: '',
parentLink: {
href: '',
type: ''
},
searchAndReplaceDetails: {
caseSensitive: false,
field: '',
fieldIndex: 0,
replaceString: '',
searchString: ''
},
selfLink: '',
type: '',
updated: '',
uppercaseDetails: {
field: '',
fieldIndex: 0
}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PATCH', '{{baseUrl}}/management/accounts/:accountId/filters/:filterId');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PATCH',
url: '{{baseUrl}}/management/accounts/:accountId/filters/:filterId',
headers: {'content-type': 'application/json'},
data: {
accountId: '',
advancedDetails: {
caseSensitive: false,
extractA: '',
extractB: '',
fieldA: '',
fieldAIndex: 0,
fieldARequired: false,
fieldB: '',
fieldBIndex: 0,
fieldBRequired: false,
outputConstructor: '',
outputToField: '',
outputToFieldIndex: 0,
overrideOutputField: false
},
created: '',
excludeDetails: {
caseSensitive: false,
expressionValue: '',
field: '',
fieldIndex: 0,
kind: '',
matchType: ''
},
id: '',
includeDetails: {},
kind: '',
lowercaseDetails: {field: '', fieldIndex: 0},
name: '',
parentLink: {href: '', type: ''},
searchAndReplaceDetails: {
caseSensitive: false,
field: '',
fieldIndex: 0,
replaceString: '',
searchString: ''
},
selfLink: '',
type: '',
updated: '',
uppercaseDetails: {field: '', fieldIndex: 0}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/management/accounts/:accountId/filters/:filterId';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"accountId":"","advancedDetails":{"caseSensitive":false,"extractA":"","extractB":"","fieldA":"","fieldAIndex":0,"fieldARequired":false,"fieldB":"","fieldBIndex":0,"fieldBRequired":false,"outputConstructor":"","outputToField":"","outputToFieldIndex":0,"overrideOutputField":false},"created":"","excludeDetails":{"caseSensitive":false,"expressionValue":"","field":"","fieldIndex":0,"kind":"","matchType":""},"id":"","includeDetails":{},"kind":"","lowercaseDetails":{"field":"","fieldIndex":0},"name":"","parentLink":{"href":"","type":""},"searchAndReplaceDetails":{"caseSensitive":false,"field":"","fieldIndex":0,"replaceString":"","searchString":""},"selfLink":"","type":"","updated":"","uppercaseDetails":{"field":"","fieldIndex":0}}'
};
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}}/management/accounts/:accountId/filters/:filterId',
method: 'PATCH',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "accountId": "",\n "advancedDetails": {\n "caseSensitive": false,\n "extractA": "",\n "extractB": "",\n "fieldA": "",\n "fieldAIndex": 0,\n "fieldARequired": false,\n "fieldB": "",\n "fieldBIndex": 0,\n "fieldBRequired": false,\n "outputConstructor": "",\n "outputToField": "",\n "outputToFieldIndex": 0,\n "overrideOutputField": false\n },\n "created": "",\n "excludeDetails": {\n "caseSensitive": false,\n "expressionValue": "",\n "field": "",\n "fieldIndex": 0,\n "kind": "",\n "matchType": ""\n },\n "id": "",\n "includeDetails": {},\n "kind": "",\n "lowercaseDetails": {\n "field": "",\n "fieldIndex": 0\n },\n "name": "",\n "parentLink": {\n "href": "",\n "type": ""\n },\n "searchAndReplaceDetails": {\n "caseSensitive": false,\n "field": "",\n "fieldIndex": 0,\n "replaceString": "",\n "searchString": ""\n },\n "selfLink": "",\n "type": "",\n "updated": "",\n "uppercaseDetails": {\n "field": "",\n "fieldIndex": 0\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 \"accountId\": \"\",\n \"advancedDetails\": {\n \"caseSensitive\": false,\n \"extractA\": \"\",\n \"extractB\": \"\",\n \"fieldA\": \"\",\n \"fieldAIndex\": 0,\n \"fieldARequired\": false,\n \"fieldB\": \"\",\n \"fieldBIndex\": 0,\n \"fieldBRequired\": false,\n \"outputConstructor\": \"\",\n \"outputToField\": \"\",\n \"outputToFieldIndex\": 0,\n \"overrideOutputField\": false\n },\n \"created\": \"\",\n \"excludeDetails\": {\n \"caseSensitive\": false,\n \"expressionValue\": \"\",\n \"field\": \"\",\n \"fieldIndex\": 0,\n \"kind\": \"\",\n \"matchType\": \"\"\n },\n \"id\": \"\",\n \"includeDetails\": {},\n \"kind\": \"\",\n \"lowercaseDetails\": {\n \"field\": \"\",\n \"fieldIndex\": 0\n },\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"searchAndReplaceDetails\": {\n \"caseSensitive\": false,\n \"field\": \"\",\n \"fieldIndex\": 0,\n \"replaceString\": \"\",\n \"searchString\": \"\"\n },\n \"selfLink\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"uppercaseDetails\": {\n \"field\": \"\",\n \"fieldIndex\": 0\n }\n}")
val request = Request.Builder()
.url("{{baseUrl}}/management/accounts/:accountId/filters/:filterId")
.patch(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PATCH',
hostname: 'example.com',
port: null,
path: '/baseUrl/management/accounts/:accountId/filters/:filterId',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
accountId: '',
advancedDetails: {
caseSensitive: false,
extractA: '',
extractB: '',
fieldA: '',
fieldAIndex: 0,
fieldARequired: false,
fieldB: '',
fieldBIndex: 0,
fieldBRequired: false,
outputConstructor: '',
outputToField: '',
outputToFieldIndex: 0,
overrideOutputField: false
},
created: '',
excludeDetails: {
caseSensitive: false,
expressionValue: '',
field: '',
fieldIndex: 0,
kind: '',
matchType: ''
},
id: '',
includeDetails: {},
kind: '',
lowercaseDetails: {field: '', fieldIndex: 0},
name: '',
parentLink: {href: '', type: ''},
searchAndReplaceDetails: {
caseSensitive: false,
field: '',
fieldIndex: 0,
replaceString: '',
searchString: ''
},
selfLink: '',
type: '',
updated: '',
uppercaseDetails: {field: '', fieldIndex: 0}
}));
req.end();
const request = require('request');
const options = {
method: 'PATCH',
url: '{{baseUrl}}/management/accounts/:accountId/filters/:filterId',
headers: {'content-type': 'application/json'},
body: {
accountId: '',
advancedDetails: {
caseSensitive: false,
extractA: '',
extractB: '',
fieldA: '',
fieldAIndex: 0,
fieldARequired: false,
fieldB: '',
fieldBIndex: 0,
fieldBRequired: false,
outputConstructor: '',
outputToField: '',
outputToFieldIndex: 0,
overrideOutputField: false
},
created: '',
excludeDetails: {
caseSensitive: false,
expressionValue: '',
field: '',
fieldIndex: 0,
kind: '',
matchType: ''
},
id: '',
includeDetails: {},
kind: '',
lowercaseDetails: {field: '', fieldIndex: 0},
name: '',
parentLink: {href: '', type: ''},
searchAndReplaceDetails: {
caseSensitive: false,
field: '',
fieldIndex: 0,
replaceString: '',
searchString: ''
},
selfLink: '',
type: '',
updated: '',
uppercaseDetails: {field: '', fieldIndex: 0}
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PATCH', '{{baseUrl}}/management/accounts/:accountId/filters/:filterId');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
accountId: '',
advancedDetails: {
caseSensitive: false,
extractA: '',
extractB: '',
fieldA: '',
fieldAIndex: 0,
fieldARequired: false,
fieldB: '',
fieldBIndex: 0,
fieldBRequired: false,
outputConstructor: '',
outputToField: '',
outputToFieldIndex: 0,
overrideOutputField: false
},
created: '',
excludeDetails: {
caseSensitive: false,
expressionValue: '',
field: '',
fieldIndex: 0,
kind: '',
matchType: ''
},
id: '',
includeDetails: {},
kind: '',
lowercaseDetails: {
field: '',
fieldIndex: 0
},
name: '',
parentLink: {
href: '',
type: ''
},
searchAndReplaceDetails: {
caseSensitive: false,
field: '',
fieldIndex: 0,
replaceString: '',
searchString: ''
},
selfLink: '',
type: '',
updated: '',
uppercaseDetails: {
field: '',
fieldIndex: 0
}
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PATCH',
url: '{{baseUrl}}/management/accounts/:accountId/filters/:filterId',
headers: {'content-type': 'application/json'},
data: {
accountId: '',
advancedDetails: {
caseSensitive: false,
extractA: '',
extractB: '',
fieldA: '',
fieldAIndex: 0,
fieldARequired: false,
fieldB: '',
fieldBIndex: 0,
fieldBRequired: false,
outputConstructor: '',
outputToField: '',
outputToFieldIndex: 0,
overrideOutputField: false
},
created: '',
excludeDetails: {
caseSensitive: false,
expressionValue: '',
field: '',
fieldIndex: 0,
kind: '',
matchType: ''
},
id: '',
includeDetails: {},
kind: '',
lowercaseDetails: {field: '', fieldIndex: 0},
name: '',
parentLink: {href: '', type: ''},
searchAndReplaceDetails: {
caseSensitive: false,
field: '',
fieldIndex: 0,
replaceString: '',
searchString: ''
},
selfLink: '',
type: '',
updated: '',
uppercaseDetails: {field: '', fieldIndex: 0}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/management/accounts/:accountId/filters/:filterId';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"accountId":"","advancedDetails":{"caseSensitive":false,"extractA":"","extractB":"","fieldA":"","fieldAIndex":0,"fieldARequired":false,"fieldB":"","fieldBIndex":0,"fieldBRequired":false,"outputConstructor":"","outputToField":"","outputToFieldIndex":0,"overrideOutputField":false},"created":"","excludeDetails":{"caseSensitive":false,"expressionValue":"","field":"","fieldIndex":0,"kind":"","matchType":""},"id":"","includeDetails":{},"kind":"","lowercaseDetails":{"field":"","fieldIndex":0},"name":"","parentLink":{"href":"","type":""},"searchAndReplaceDetails":{"caseSensitive":false,"field":"","fieldIndex":0,"replaceString":"","searchString":""},"selfLink":"","type":"","updated":"","uppercaseDetails":{"field":"","fieldIndex":0}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"accountId": @"",
@"advancedDetails": @{ @"caseSensitive": @NO, @"extractA": @"", @"extractB": @"", @"fieldA": @"", @"fieldAIndex": @0, @"fieldARequired": @NO, @"fieldB": @"", @"fieldBIndex": @0, @"fieldBRequired": @NO, @"outputConstructor": @"", @"outputToField": @"", @"outputToFieldIndex": @0, @"overrideOutputField": @NO },
@"created": @"",
@"excludeDetails": @{ @"caseSensitive": @NO, @"expressionValue": @"", @"field": @"", @"fieldIndex": @0, @"kind": @"", @"matchType": @"" },
@"id": @"",
@"includeDetails": @{ },
@"kind": @"",
@"lowercaseDetails": @{ @"field": @"", @"fieldIndex": @0 },
@"name": @"",
@"parentLink": @{ @"href": @"", @"type": @"" },
@"searchAndReplaceDetails": @{ @"caseSensitive": @NO, @"field": @"", @"fieldIndex": @0, @"replaceString": @"", @"searchString": @"" },
@"selfLink": @"",
@"type": @"",
@"updated": @"",
@"uppercaseDetails": @{ @"field": @"", @"fieldIndex": @0 } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/management/accounts/:accountId/filters/:filterId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PATCH"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/management/accounts/:accountId/filters/:filterId" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"accountId\": \"\",\n \"advancedDetails\": {\n \"caseSensitive\": false,\n \"extractA\": \"\",\n \"extractB\": \"\",\n \"fieldA\": \"\",\n \"fieldAIndex\": 0,\n \"fieldARequired\": false,\n \"fieldB\": \"\",\n \"fieldBIndex\": 0,\n \"fieldBRequired\": false,\n \"outputConstructor\": \"\",\n \"outputToField\": \"\",\n \"outputToFieldIndex\": 0,\n \"overrideOutputField\": false\n },\n \"created\": \"\",\n \"excludeDetails\": {\n \"caseSensitive\": false,\n \"expressionValue\": \"\",\n \"field\": \"\",\n \"fieldIndex\": 0,\n \"kind\": \"\",\n \"matchType\": \"\"\n },\n \"id\": \"\",\n \"includeDetails\": {},\n \"kind\": \"\",\n \"lowercaseDetails\": {\n \"field\": \"\",\n \"fieldIndex\": 0\n },\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"searchAndReplaceDetails\": {\n \"caseSensitive\": false,\n \"field\": \"\",\n \"fieldIndex\": 0,\n \"replaceString\": \"\",\n \"searchString\": \"\"\n },\n \"selfLink\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"uppercaseDetails\": {\n \"field\": \"\",\n \"fieldIndex\": 0\n }\n}" in
Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/management/accounts/:accountId/filters/:filterId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'accountId' => '',
'advancedDetails' => [
'caseSensitive' => null,
'extractA' => '',
'extractB' => '',
'fieldA' => '',
'fieldAIndex' => 0,
'fieldARequired' => null,
'fieldB' => '',
'fieldBIndex' => 0,
'fieldBRequired' => null,
'outputConstructor' => '',
'outputToField' => '',
'outputToFieldIndex' => 0,
'overrideOutputField' => null
],
'created' => '',
'excludeDetails' => [
'caseSensitive' => null,
'expressionValue' => '',
'field' => '',
'fieldIndex' => 0,
'kind' => '',
'matchType' => ''
],
'id' => '',
'includeDetails' => [
],
'kind' => '',
'lowercaseDetails' => [
'field' => '',
'fieldIndex' => 0
],
'name' => '',
'parentLink' => [
'href' => '',
'type' => ''
],
'searchAndReplaceDetails' => [
'caseSensitive' => null,
'field' => '',
'fieldIndex' => 0,
'replaceString' => '',
'searchString' => ''
],
'selfLink' => '',
'type' => '',
'updated' => '',
'uppercaseDetails' => [
'field' => '',
'fieldIndex' => 0
]
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PATCH', '{{baseUrl}}/management/accounts/:accountId/filters/:filterId', [
'body' => '{
"accountId": "",
"advancedDetails": {
"caseSensitive": false,
"extractA": "",
"extractB": "",
"fieldA": "",
"fieldAIndex": 0,
"fieldARequired": false,
"fieldB": "",
"fieldBIndex": 0,
"fieldBRequired": false,
"outputConstructor": "",
"outputToField": "",
"outputToFieldIndex": 0,
"overrideOutputField": false
},
"created": "",
"excludeDetails": {
"caseSensitive": false,
"expressionValue": "",
"field": "",
"fieldIndex": 0,
"kind": "",
"matchType": ""
},
"id": "",
"includeDetails": {},
"kind": "",
"lowercaseDetails": {
"field": "",
"fieldIndex": 0
},
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"searchAndReplaceDetails": {
"caseSensitive": false,
"field": "",
"fieldIndex": 0,
"replaceString": "",
"searchString": ""
},
"selfLink": "",
"type": "",
"updated": "",
"uppercaseDetails": {
"field": "",
"fieldIndex": 0
}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/management/accounts/:accountId/filters/:filterId');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'accountId' => '',
'advancedDetails' => [
'caseSensitive' => null,
'extractA' => '',
'extractB' => '',
'fieldA' => '',
'fieldAIndex' => 0,
'fieldARequired' => null,
'fieldB' => '',
'fieldBIndex' => 0,
'fieldBRequired' => null,
'outputConstructor' => '',
'outputToField' => '',
'outputToFieldIndex' => 0,
'overrideOutputField' => null
],
'created' => '',
'excludeDetails' => [
'caseSensitive' => null,
'expressionValue' => '',
'field' => '',
'fieldIndex' => 0,
'kind' => '',
'matchType' => ''
],
'id' => '',
'includeDetails' => [
],
'kind' => '',
'lowercaseDetails' => [
'field' => '',
'fieldIndex' => 0
],
'name' => '',
'parentLink' => [
'href' => '',
'type' => ''
],
'searchAndReplaceDetails' => [
'caseSensitive' => null,
'field' => '',
'fieldIndex' => 0,
'replaceString' => '',
'searchString' => ''
],
'selfLink' => '',
'type' => '',
'updated' => '',
'uppercaseDetails' => [
'field' => '',
'fieldIndex' => 0
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'accountId' => '',
'advancedDetails' => [
'caseSensitive' => null,
'extractA' => '',
'extractB' => '',
'fieldA' => '',
'fieldAIndex' => 0,
'fieldARequired' => null,
'fieldB' => '',
'fieldBIndex' => 0,
'fieldBRequired' => null,
'outputConstructor' => '',
'outputToField' => '',
'outputToFieldIndex' => 0,
'overrideOutputField' => null
],
'created' => '',
'excludeDetails' => [
'caseSensitive' => null,
'expressionValue' => '',
'field' => '',
'fieldIndex' => 0,
'kind' => '',
'matchType' => ''
],
'id' => '',
'includeDetails' => [
],
'kind' => '',
'lowercaseDetails' => [
'field' => '',
'fieldIndex' => 0
],
'name' => '',
'parentLink' => [
'href' => '',
'type' => ''
],
'searchAndReplaceDetails' => [
'caseSensitive' => null,
'field' => '',
'fieldIndex' => 0,
'replaceString' => '',
'searchString' => ''
],
'selfLink' => '',
'type' => '',
'updated' => '',
'uppercaseDetails' => [
'field' => '',
'fieldIndex' => 0
]
]));
$request->setRequestUrl('{{baseUrl}}/management/accounts/:accountId/filters/:filterId');
$request->setRequestMethod('PATCH');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/management/accounts/:accountId/filters/:filterId' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"accountId": "",
"advancedDetails": {
"caseSensitive": false,
"extractA": "",
"extractB": "",
"fieldA": "",
"fieldAIndex": 0,
"fieldARequired": false,
"fieldB": "",
"fieldBIndex": 0,
"fieldBRequired": false,
"outputConstructor": "",
"outputToField": "",
"outputToFieldIndex": 0,
"overrideOutputField": false
},
"created": "",
"excludeDetails": {
"caseSensitive": false,
"expressionValue": "",
"field": "",
"fieldIndex": 0,
"kind": "",
"matchType": ""
},
"id": "",
"includeDetails": {},
"kind": "",
"lowercaseDetails": {
"field": "",
"fieldIndex": 0
},
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"searchAndReplaceDetails": {
"caseSensitive": false,
"field": "",
"fieldIndex": 0,
"replaceString": "",
"searchString": ""
},
"selfLink": "",
"type": "",
"updated": "",
"uppercaseDetails": {
"field": "",
"fieldIndex": 0
}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/management/accounts/:accountId/filters/:filterId' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"accountId": "",
"advancedDetails": {
"caseSensitive": false,
"extractA": "",
"extractB": "",
"fieldA": "",
"fieldAIndex": 0,
"fieldARequired": false,
"fieldB": "",
"fieldBIndex": 0,
"fieldBRequired": false,
"outputConstructor": "",
"outputToField": "",
"outputToFieldIndex": 0,
"overrideOutputField": false
},
"created": "",
"excludeDetails": {
"caseSensitive": false,
"expressionValue": "",
"field": "",
"fieldIndex": 0,
"kind": "",
"matchType": ""
},
"id": "",
"includeDetails": {},
"kind": "",
"lowercaseDetails": {
"field": "",
"fieldIndex": 0
},
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"searchAndReplaceDetails": {
"caseSensitive": false,
"field": "",
"fieldIndex": 0,
"replaceString": "",
"searchString": ""
},
"selfLink": "",
"type": "",
"updated": "",
"uppercaseDetails": {
"field": "",
"fieldIndex": 0
}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"accountId\": \"\",\n \"advancedDetails\": {\n \"caseSensitive\": false,\n \"extractA\": \"\",\n \"extractB\": \"\",\n \"fieldA\": \"\",\n \"fieldAIndex\": 0,\n \"fieldARequired\": false,\n \"fieldB\": \"\",\n \"fieldBIndex\": 0,\n \"fieldBRequired\": false,\n \"outputConstructor\": \"\",\n \"outputToField\": \"\",\n \"outputToFieldIndex\": 0,\n \"overrideOutputField\": false\n },\n \"created\": \"\",\n \"excludeDetails\": {\n \"caseSensitive\": false,\n \"expressionValue\": \"\",\n \"field\": \"\",\n \"fieldIndex\": 0,\n \"kind\": \"\",\n \"matchType\": \"\"\n },\n \"id\": \"\",\n \"includeDetails\": {},\n \"kind\": \"\",\n \"lowercaseDetails\": {\n \"field\": \"\",\n \"fieldIndex\": 0\n },\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"searchAndReplaceDetails\": {\n \"caseSensitive\": false,\n \"field\": \"\",\n \"fieldIndex\": 0,\n \"replaceString\": \"\",\n \"searchString\": \"\"\n },\n \"selfLink\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"uppercaseDetails\": {\n \"field\": \"\",\n \"fieldIndex\": 0\n }\n}"
headers = { 'content-type': "application/json" }
conn.request("PATCH", "/baseUrl/management/accounts/:accountId/filters/:filterId", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/management/accounts/:accountId/filters/:filterId"
payload = {
"accountId": "",
"advancedDetails": {
"caseSensitive": False,
"extractA": "",
"extractB": "",
"fieldA": "",
"fieldAIndex": 0,
"fieldARequired": False,
"fieldB": "",
"fieldBIndex": 0,
"fieldBRequired": False,
"outputConstructor": "",
"outputToField": "",
"outputToFieldIndex": 0,
"overrideOutputField": False
},
"created": "",
"excludeDetails": {
"caseSensitive": False,
"expressionValue": "",
"field": "",
"fieldIndex": 0,
"kind": "",
"matchType": ""
},
"id": "",
"includeDetails": {},
"kind": "",
"lowercaseDetails": {
"field": "",
"fieldIndex": 0
},
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"searchAndReplaceDetails": {
"caseSensitive": False,
"field": "",
"fieldIndex": 0,
"replaceString": "",
"searchString": ""
},
"selfLink": "",
"type": "",
"updated": "",
"uppercaseDetails": {
"field": "",
"fieldIndex": 0
}
}
headers = {"content-type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/management/accounts/:accountId/filters/:filterId"
payload <- "{\n \"accountId\": \"\",\n \"advancedDetails\": {\n \"caseSensitive\": false,\n \"extractA\": \"\",\n \"extractB\": \"\",\n \"fieldA\": \"\",\n \"fieldAIndex\": 0,\n \"fieldARequired\": false,\n \"fieldB\": \"\",\n \"fieldBIndex\": 0,\n \"fieldBRequired\": false,\n \"outputConstructor\": \"\",\n \"outputToField\": \"\",\n \"outputToFieldIndex\": 0,\n \"overrideOutputField\": false\n },\n \"created\": \"\",\n \"excludeDetails\": {\n \"caseSensitive\": false,\n \"expressionValue\": \"\",\n \"field\": \"\",\n \"fieldIndex\": 0,\n \"kind\": \"\",\n \"matchType\": \"\"\n },\n \"id\": \"\",\n \"includeDetails\": {},\n \"kind\": \"\",\n \"lowercaseDetails\": {\n \"field\": \"\",\n \"fieldIndex\": 0\n },\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"searchAndReplaceDetails\": {\n \"caseSensitive\": false,\n \"field\": \"\",\n \"fieldIndex\": 0,\n \"replaceString\": \"\",\n \"searchString\": \"\"\n },\n \"selfLink\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"uppercaseDetails\": {\n \"field\": \"\",\n \"fieldIndex\": 0\n }\n}"
encode <- "json"
response <- VERB("PATCH", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/management/accounts/:accountId/filters/:filterId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"accountId\": \"\",\n \"advancedDetails\": {\n \"caseSensitive\": false,\n \"extractA\": \"\",\n \"extractB\": \"\",\n \"fieldA\": \"\",\n \"fieldAIndex\": 0,\n \"fieldARequired\": false,\n \"fieldB\": \"\",\n \"fieldBIndex\": 0,\n \"fieldBRequired\": false,\n \"outputConstructor\": \"\",\n \"outputToField\": \"\",\n \"outputToFieldIndex\": 0,\n \"overrideOutputField\": false\n },\n \"created\": \"\",\n \"excludeDetails\": {\n \"caseSensitive\": false,\n \"expressionValue\": \"\",\n \"field\": \"\",\n \"fieldIndex\": 0,\n \"kind\": \"\",\n \"matchType\": \"\"\n },\n \"id\": \"\",\n \"includeDetails\": {},\n \"kind\": \"\",\n \"lowercaseDetails\": {\n \"field\": \"\",\n \"fieldIndex\": 0\n },\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"searchAndReplaceDetails\": {\n \"caseSensitive\": false,\n \"field\": \"\",\n \"fieldIndex\": 0,\n \"replaceString\": \"\",\n \"searchString\": \"\"\n },\n \"selfLink\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"uppercaseDetails\": {\n \"field\": \"\",\n \"fieldIndex\": 0\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.patch('/baseUrl/management/accounts/:accountId/filters/:filterId') do |req|
req.body = "{\n \"accountId\": \"\",\n \"advancedDetails\": {\n \"caseSensitive\": false,\n \"extractA\": \"\",\n \"extractB\": \"\",\n \"fieldA\": \"\",\n \"fieldAIndex\": 0,\n \"fieldARequired\": false,\n \"fieldB\": \"\",\n \"fieldBIndex\": 0,\n \"fieldBRequired\": false,\n \"outputConstructor\": \"\",\n \"outputToField\": \"\",\n \"outputToFieldIndex\": 0,\n \"overrideOutputField\": false\n },\n \"created\": \"\",\n \"excludeDetails\": {\n \"caseSensitive\": false,\n \"expressionValue\": \"\",\n \"field\": \"\",\n \"fieldIndex\": 0,\n \"kind\": \"\",\n \"matchType\": \"\"\n },\n \"id\": \"\",\n \"includeDetails\": {},\n \"kind\": \"\",\n \"lowercaseDetails\": {\n \"field\": \"\",\n \"fieldIndex\": 0\n },\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"searchAndReplaceDetails\": {\n \"caseSensitive\": false,\n \"field\": \"\",\n \"fieldIndex\": 0,\n \"replaceString\": \"\",\n \"searchString\": \"\"\n },\n \"selfLink\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"uppercaseDetails\": {\n \"field\": \"\",\n \"fieldIndex\": 0\n }\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}}/management/accounts/:accountId/filters/:filterId";
let payload = json!({
"accountId": "",
"advancedDetails": json!({
"caseSensitive": false,
"extractA": "",
"extractB": "",
"fieldA": "",
"fieldAIndex": 0,
"fieldARequired": false,
"fieldB": "",
"fieldBIndex": 0,
"fieldBRequired": false,
"outputConstructor": "",
"outputToField": "",
"outputToFieldIndex": 0,
"overrideOutputField": false
}),
"created": "",
"excludeDetails": json!({
"caseSensitive": false,
"expressionValue": "",
"field": "",
"fieldIndex": 0,
"kind": "",
"matchType": ""
}),
"id": "",
"includeDetails": json!({}),
"kind": "",
"lowercaseDetails": json!({
"field": "",
"fieldIndex": 0
}),
"name": "",
"parentLink": json!({
"href": "",
"type": ""
}),
"searchAndReplaceDetails": json!({
"caseSensitive": false,
"field": "",
"fieldIndex": 0,
"replaceString": "",
"searchString": ""
}),
"selfLink": "",
"type": "",
"updated": "",
"uppercaseDetails": json!({
"field": "",
"fieldIndex": 0
})
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PATCH").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PATCH \
--url {{baseUrl}}/management/accounts/:accountId/filters/:filterId \
--header 'content-type: application/json' \
--data '{
"accountId": "",
"advancedDetails": {
"caseSensitive": false,
"extractA": "",
"extractB": "",
"fieldA": "",
"fieldAIndex": 0,
"fieldARequired": false,
"fieldB": "",
"fieldBIndex": 0,
"fieldBRequired": false,
"outputConstructor": "",
"outputToField": "",
"outputToFieldIndex": 0,
"overrideOutputField": false
},
"created": "",
"excludeDetails": {
"caseSensitive": false,
"expressionValue": "",
"field": "",
"fieldIndex": 0,
"kind": "",
"matchType": ""
},
"id": "",
"includeDetails": {},
"kind": "",
"lowercaseDetails": {
"field": "",
"fieldIndex": 0
},
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"searchAndReplaceDetails": {
"caseSensitive": false,
"field": "",
"fieldIndex": 0,
"replaceString": "",
"searchString": ""
},
"selfLink": "",
"type": "",
"updated": "",
"uppercaseDetails": {
"field": "",
"fieldIndex": 0
}
}'
echo '{
"accountId": "",
"advancedDetails": {
"caseSensitive": false,
"extractA": "",
"extractB": "",
"fieldA": "",
"fieldAIndex": 0,
"fieldARequired": false,
"fieldB": "",
"fieldBIndex": 0,
"fieldBRequired": false,
"outputConstructor": "",
"outputToField": "",
"outputToFieldIndex": 0,
"overrideOutputField": false
},
"created": "",
"excludeDetails": {
"caseSensitive": false,
"expressionValue": "",
"field": "",
"fieldIndex": 0,
"kind": "",
"matchType": ""
},
"id": "",
"includeDetails": {},
"kind": "",
"lowercaseDetails": {
"field": "",
"fieldIndex": 0
},
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"searchAndReplaceDetails": {
"caseSensitive": false,
"field": "",
"fieldIndex": 0,
"replaceString": "",
"searchString": ""
},
"selfLink": "",
"type": "",
"updated": "",
"uppercaseDetails": {
"field": "",
"fieldIndex": 0
}
}' | \
http PATCH {{baseUrl}}/management/accounts/:accountId/filters/:filterId \
content-type:application/json
wget --quiet \
--method PATCH \
--header 'content-type: application/json' \
--body-data '{\n "accountId": "",\n "advancedDetails": {\n "caseSensitive": false,\n "extractA": "",\n "extractB": "",\n "fieldA": "",\n "fieldAIndex": 0,\n "fieldARequired": false,\n "fieldB": "",\n "fieldBIndex": 0,\n "fieldBRequired": false,\n "outputConstructor": "",\n "outputToField": "",\n "outputToFieldIndex": 0,\n "overrideOutputField": false\n },\n "created": "",\n "excludeDetails": {\n "caseSensitive": false,\n "expressionValue": "",\n "field": "",\n "fieldIndex": 0,\n "kind": "",\n "matchType": ""\n },\n "id": "",\n "includeDetails": {},\n "kind": "",\n "lowercaseDetails": {\n "field": "",\n "fieldIndex": 0\n },\n "name": "",\n "parentLink": {\n "href": "",\n "type": ""\n },\n "searchAndReplaceDetails": {\n "caseSensitive": false,\n "field": "",\n "fieldIndex": 0,\n "replaceString": "",\n "searchString": ""\n },\n "selfLink": "",\n "type": "",\n "updated": "",\n "uppercaseDetails": {\n "field": "",\n "fieldIndex": 0\n }\n}' \
--output-document \
- {{baseUrl}}/management/accounts/:accountId/filters/:filterId
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"accountId": "",
"advancedDetails": [
"caseSensitive": false,
"extractA": "",
"extractB": "",
"fieldA": "",
"fieldAIndex": 0,
"fieldARequired": false,
"fieldB": "",
"fieldBIndex": 0,
"fieldBRequired": false,
"outputConstructor": "",
"outputToField": "",
"outputToFieldIndex": 0,
"overrideOutputField": false
],
"created": "",
"excludeDetails": [
"caseSensitive": false,
"expressionValue": "",
"field": "",
"fieldIndex": 0,
"kind": "",
"matchType": ""
],
"id": "",
"includeDetails": [],
"kind": "",
"lowercaseDetails": [
"field": "",
"fieldIndex": 0
],
"name": "",
"parentLink": [
"href": "",
"type": ""
],
"searchAndReplaceDetails": [
"caseSensitive": false,
"field": "",
"fieldIndex": 0,
"replaceString": "",
"searchString": ""
],
"selfLink": "",
"type": "",
"updated": "",
"uppercaseDetails": [
"field": "",
"fieldIndex": 0
]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/management/accounts/:accountId/filters/:filterId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PUT
analytics.management.filters.update
{{baseUrl}}/management/accounts/:accountId/filters/:filterId
QUERY PARAMS
accountId
filterId
BODY json
{
"accountId": "",
"advancedDetails": {
"caseSensitive": false,
"extractA": "",
"extractB": "",
"fieldA": "",
"fieldAIndex": 0,
"fieldARequired": false,
"fieldB": "",
"fieldBIndex": 0,
"fieldBRequired": false,
"outputConstructor": "",
"outputToField": "",
"outputToFieldIndex": 0,
"overrideOutputField": false
},
"created": "",
"excludeDetails": {
"caseSensitive": false,
"expressionValue": "",
"field": "",
"fieldIndex": 0,
"kind": "",
"matchType": ""
},
"id": "",
"includeDetails": {},
"kind": "",
"lowercaseDetails": {
"field": "",
"fieldIndex": 0
},
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"searchAndReplaceDetails": {
"caseSensitive": false,
"field": "",
"fieldIndex": 0,
"replaceString": "",
"searchString": ""
},
"selfLink": "",
"type": "",
"updated": "",
"uppercaseDetails": {
"field": "",
"fieldIndex": 0
}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/management/accounts/:accountId/filters/:filterId");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"accountId\": \"\",\n \"advancedDetails\": {\n \"caseSensitive\": false,\n \"extractA\": \"\",\n \"extractB\": \"\",\n \"fieldA\": \"\",\n \"fieldAIndex\": 0,\n \"fieldARequired\": false,\n \"fieldB\": \"\",\n \"fieldBIndex\": 0,\n \"fieldBRequired\": false,\n \"outputConstructor\": \"\",\n \"outputToField\": \"\",\n \"outputToFieldIndex\": 0,\n \"overrideOutputField\": false\n },\n \"created\": \"\",\n \"excludeDetails\": {\n \"caseSensitive\": false,\n \"expressionValue\": \"\",\n \"field\": \"\",\n \"fieldIndex\": 0,\n \"kind\": \"\",\n \"matchType\": \"\"\n },\n \"id\": \"\",\n \"includeDetails\": {},\n \"kind\": \"\",\n \"lowercaseDetails\": {\n \"field\": \"\",\n \"fieldIndex\": 0\n },\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"searchAndReplaceDetails\": {\n \"caseSensitive\": false,\n \"field\": \"\",\n \"fieldIndex\": 0,\n \"replaceString\": \"\",\n \"searchString\": \"\"\n },\n \"selfLink\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"uppercaseDetails\": {\n \"field\": \"\",\n \"fieldIndex\": 0\n }\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/management/accounts/:accountId/filters/:filterId" {:content-type :json
:form-params {:accountId ""
:advancedDetails {:caseSensitive false
:extractA ""
:extractB ""
:fieldA ""
:fieldAIndex 0
:fieldARequired false
:fieldB ""
:fieldBIndex 0
:fieldBRequired false
:outputConstructor ""
:outputToField ""
:outputToFieldIndex 0
:overrideOutputField false}
:created ""
:excludeDetails {:caseSensitive false
:expressionValue ""
:field ""
:fieldIndex 0
:kind ""
:matchType ""}
:id ""
:includeDetails {}
:kind ""
:lowercaseDetails {:field ""
:fieldIndex 0}
:name ""
:parentLink {:href ""
:type ""}
:searchAndReplaceDetails {:caseSensitive false
:field ""
:fieldIndex 0
:replaceString ""
:searchString ""}
:selfLink ""
:type ""
:updated ""
:uppercaseDetails {:field ""
:fieldIndex 0}}})
require "http/client"
url = "{{baseUrl}}/management/accounts/:accountId/filters/:filterId"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"accountId\": \"\",\n \"advancedDetails\": {\n \"caseSensitive\": false,\n \"extractA\": \"\",\n \"extractB\": \"\",\n \"fieldA\": \"\",\n \"fieldAIndex\": 0,\n \"fieldARequired\": false,\n \"fieldB\": \"\",\n \"fieldBIndex\": 0,\n \"fieldBRequired\": false,\n \"outputConstructor\": \"\",\n \"outputToField\": \"\",\n \"outputToFieldIndex\": 0,\n \"overrideOutputField\": false\n },\n \"created\": \"\",\n \"excludeDetails\": {\n \"caseSensitive\": false,\n \"expressionValue\": \"\",\n \"field\": \"\",\n \"fieldIndex\": 0,\n \"kind\": \"\",\n \"matchType\": \"\"\n },\n \"id\": \"\",\n \"includeDetails\": {},\n \"kind\": \"\",\n \"lowercaseDetails\": {\n \"field\": \"\",\n \"fieldIndex\": 0\n },\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"searchAndReplaceDetails\": {\n \"caseSensitive\": false,\n \"field\": \"\",\n \"fieldIndex\": 0,\n \"replaceString\": \"\",\n \"searchString\": \"\"\n },\n \"selfLink\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"uppercaseDetails\": {\n \"field\": \"\",\n \"fieldIndex\": 0\n }\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}}/management/accounts/:accountId/filters/:filterId"),
Content = new StringContent("{\n \"accountId\": \"\",\n \"advancedDetails\": {\n \"caseSensitive\": false,\n \"extractA\": \"\",\n \"extractB\": \"\",\n \"fieldA\": \"\",\n \"fieldAIndex\": 0,\n \"fieldARequired\": false,\n \"fieldB\": \"\",\n \"fieldBIndex\": 0,\n \"fieldBRequired\": false,\n \"outputConstructor\": \"\",\n \"outputToField\": \"\",\n \"outputToFieldIndex\": 0,\n \"overrideOutputField\": false\n },\n \"created\": \"\",\n \"excludeDetails\": {\n \"caseSensitive\": false,\n \"expressionValue\": \"\",\n \"field\": \"\",\n \"fieldIndex\": 0,\n \"kind\": \"\",\n \"matchType\": \"\"\n },\n \"id\": \"\",\n \"includeDetails\": {},\n \"kind\": \"\",\n \"lowercaseDetails\": {\n \"field\": \"\",\n \"fieldIndex\": 0\n },\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"searchAndReplaceDetails\": {\n \"caseSensitive\": false,\n \"field\": \"\",\n \"fieldIndex\": 0,\n \"replaceString\": \"\",\n \"searchString\": \"\"\n },\n \"selfLink\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"uppercaseDetails\": {\n \"field\": \"\",\n \"fieldIndex\": 0\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}}/management/accounts/:accountId/filters/:filterId");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"accountId\": \"\",\n \"advancedDetails\": {\n \"caseSensitive\": false,\n \"extractA\": \"\",\n \"extractB\": \"\",\n \"fieldA\": \"\",\n \"fieldAIndex\": 0,\n \"fieldARequired\": false,\n \"fieldB\": \"\",\n \"fieldBIndex\": 0,\n \"fieldBRequired\": false,\n \"outputConstructor\": \"\",\n \"outputToField\": \"\",\n \"outputToFieldIndex\": 0,\n \"overrideOutputField\": false\n },\n \"created\": \"\",\n \"excludeDetails\": {\n \"caseSensitive\": false,\n \"expressionValue\": \"\",\n \"field\": \"\",\n \"fieldIndex\": 0,\n \"kind\": \"\",\n \"matchType\": \"\"\n },\n \"id\": \"\",\n \"includeDetails\": {},\n \"kind\": \"\",\n \"lowercaseDetails\": {\n \"field\": \"\",\n \"fieldIndex\": 0\n },\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"searchAndReplaceDetails\": {\n \"caseSensitive\": false,\n \"field\": \"\",\n \"fieldIndex\": 0,\n \"replaceString\": \"\",\n \"searchString\": \"\"\n },\n \"selfLink\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"uppercaseDetails\": {\n \"field\": \"\",\n \"fieldIndex\": 0\n }\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/management/accounts/:accountId/filters/:filterId"
payload := strings.NewReader("{\n \"accountId\": \"\",\n \"advancedDetails\": {\n \"caseSensitive\": false,\n \"extractA\": \"\",\n \"extractB\": \"\",\n \"fieldA\": \"\",\n \"fieldAIndex\": 0,\n \"fieldARequired\": false,\n \"fieldB\": \"\",\n \"fieldBIndex\": 0,\n \"fieldBRequired\": false,\n \"outputConstructor\": \"\",\n \"outputToField\": \"\",\n \"outputToFieldIndex\": 0,\n \"overrideOutputField\": false\n },\n \"created\": \"\",\n \"excludeDetails\": {\n \"caseSensitive\": false,\n \"expressionValue\": \"\",\n \"field\": \"\",\n \"fieldIndex\": 0,\n \"kind\": \"\",\n \"matchType\": \"\"\n },\n \"id\": \"\",\n \"includeDetails\": {},\n \"kind\": \"\",\n \"lowercaseDetails\": {\n \"field\": \"\",\n \"fieldIndex\": 0\n },\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"searchAndReplaceDetails\": {\n \"caseSensitive\": false,\n \"field\": \"\",\n \"fieldIndex\": 0,\n \"replaceString\": \"\",\n \"searchString\": \"\"\n },\n \"selfLink\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"uppercaseDetails\": {\n \"field\": \"\",\n \"fieldIndex\": 0\n }\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/management/accounts/:accountId/filters/:filterId HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 993
{
"accountId": "",
"advancedDetails": {
"caseSensitive": false,
"extractA": "",
"extractB": "",
"fieldA": "",
"fieldAIndex": 0,
"fieldARequired": false,
"fieldB": "",
"fieldBIndex": 0,
"fieldBRequired": false,
"outputConstructor": "",
"outputToField": "",
"outputToFieldIndex": 0,
"overrideOutputField": false
},
"created": "",
"excludeDetails": {
"caseSensitive": false,
"expressionValue": "",
"field": "",
"fieldIndex": 0,
"kind": "",
"matchType": ""
},
"id": "",
"includeDetails": {},
"kind": "",
"lowercaseDetails": {
"field": "",
"fieldIndex": 0
},
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"searchAndReplaceDetails": {
"caseSensitive": false,
"field": "",
"fieldIndex": 0,
"replaceString": "",
"searchString": ""
},
"selfLink": "",
"type": "",
"updated": "",
"uppercaseDetails": {
"field": "",
"fieldIndex": 0
}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/management/accounts/:accountId/filters/:filterId")
.setHeader("content-type", "application/json")
.setBody("{\n \"accountId\": \"\",\n \"advancedDetails\": {\n \"caseSensitive\": false,\n \"extractA\": \"\",\n \"extractB\": \"\",\n \"fieldA\": \"\",\n \"fieldAIndex\": 0,\n \"fieldARequired\": false,\n \"fieldB\": \"\",\n \"fieldBIndex\": 0,\n \"fieldBRequired\": false,\n \"outputConstructor\": \"\",\n \"outputToField\": \"\",\n \"outputToFieldIndex\": 0,\n \"overrideOutputField\": false\n },\n \"created\": \"\",\n \"excludeDetails\": {\n \"caseSensitive\": false,\n \"expressionValue\": \"\",\n \"field\": \"\",\n \"fieldIndex\": 0,\n \"kind\": \"\",\n \"matchType\": \"\"\n },\n \"id\": \"\",\n \"includeDetails\": {},\n \"kind\": \"\",\n \"lowercaseDetails\": {\n \"field\": \"\",\n \"fieldIndex\": 0\n },\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"searchAndReplaceDetails\": {\n \"caseSensitive\": false,\n \"field\": \"\",\n \"fieldIndex\": 0,\n \"replaceString\": \"\",\n \"searchString\": \"\"\n },\n \"selfLink\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"uppercaseDetails\": {\n \"field\": \"\",\n \"fieldIndex\": 0\n }\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/management/accounts/:accountId/filters/:filterId"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"accountId\": \"\",\n \"advancedDetails\": {\n \"caseSensitive\": false,\n \"extractA\": \"\",\n \"extractB\": \"\",\n \"fieldA\": \"\",\n \"fieldAIndex\": 0,\n \"fieldARequired\": false,\n \"fieldB\": \"\",\n \"fieldBIndex\": 0,\n \"fieldBRequired\": false,\n \"outputConstructor\": \"\",\n \"outputToField\": \"\",\n \"outputToFieldIndex\": 0,\n \"overrideOutputField\": false\n },\n \"created\": \"\",\n \"excludeDetails\": {\n \"caseSensitive\": false,\n \"expressionValue\": \"\",\n \"field\": \"\",\n \"fieldIndex\": 0,\n \"kind\": \"\",\n \"matchType\": \"\"\n },\n \"id\": \"\",\n \"includeDetails\": {},\n \"kind\": \"\",\n \"lowercaseDetails\": {\n \"field\": \"\",\n \"fieldIndex\": 0\n },\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"searchAndReplaceDetails\": {\n \"caseSensitive\": false,\n \"field\": \"\",\n \"fieldIndex\": 0,\n \"replaceString\": \"\",\n \"searchString\": \"\"\n },\n \"selfLink\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"uppercaseDetails\": {\n \"field\": \"\",\n \"fieldIndex\": 0\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 \"accountId\": \"\",\n \"advancedDetails\": {\n \"caseSensitive\": false,\n \"extractA\": \"\",\n \"extractB\": \"\",\n \"fieldA\": \"\",\n \"fieldAIndex\": 0,\n \"fieldARequired\": false,\n \"fieldB\": \"\",\n \"fieldBIndex\": 0,\n \"fieldBRequired\": false,\n \"outputConstructor\": \"\",\n \"outputToField\": \"\",\n \"outputToFieldIndex\": 0,\n \"overrideOutputField\": false\n },\n \"created\": \"\",\n \"excludeDetails\": {\n \"caseSensitive\": false,\n \"expressionValue\": \"\",\n \"field\": \"\",\n \"fieldIndex\": 0,\n \"kind\": \"\",\n \"matchType\": \"\"\n },\n \"id\": \"\",\n \"includeDetails\": {},\n \"kind\": \"\",\n \"lowercaseDetails\": {\n \"field\": \"\",\n \"fieldIndex\": 0\n },\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"searchAndReplaceDetails\": {\n \"caseSensitive\": false,\n \"field\": \"\",\n \"fieldIndex\": 0,\n \"replaceString\": \"\",\n \"searchString\": \"\"\n },\n \"selfLink\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"uppercaseDetails\": {\n \"field\": \"\",\n \"fieldIndex\": 0\n }\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/management/accounts/:accountId/filters/:filterId")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/management/accounts/:accountId/filters/:filterId")
.header("content-type", "application/json")
.body("{\n \"accountId\": \"\",\n \"advancedDetails\": {\n \"caseSensitive\": false,\n \"extractA\": \"\",\n \"extractB\": \"\",\n \"fieldA\": \"\",\n \"fieldAIndex\": 0,\n \"fieldARequired\": false,\n \"fieldB\": \"\",\n \"fieldBIndex\": 0,\n \"fieldBRequired\": false,\n \"outputConstructor\": \"\",\n \"outputToField\": \"\",\n \"outputToFieldIndex\": 0,\n \"overrideOutputField\": false\n },\n \"created\": \"\",\n \"excludeDetails\": {\n \"caseSensitive\": false,\n \"expressionValue\": \"\",\n \"field\": \"\",\n \"fieldIndex\": 0,\n \"kind\": \"\",\n \"matchType\": \"\"\n },\n \"id\": \"\",\n \"includeDetails\": {},\n \"kind\": \"\",\n \"lowercaseDetails\": {\n \"field\": \"\",\n \"fieldIndex\": 0\n },\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"searchAndReplaceDetails\": {\n \"caseSensitive\": false,\n \"field\": \"\",\n \"fieldIndex\": 0,\n \"replaceString\": \"\",\n \"searchString\": \"\"\n },\n \"selfLink\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"uppercaseDetails\": {\n \"field\": \"\",\n \"fieldIndex\": 0\n }\n}")
.asString();
const data = JSON.stringify({
accountId: '',
advancedDetails: {
caseSensitive: false,
extractA: '',
extractB: '',
fieldA: '',
fieldAIndex: 0,
fieldARequired: false,
fieldB: '',
fieldBIndex: 0,
fieldBRequired: false,
outputConstructor: '',
outputToField: '',
outputToFieldIndex: 0,
overrideOutputField: false
},
created: '',
excludeDetails: {
caseSensitive: false,
expressionValue: '',
field: '',
fieldIndex: 0,
kind: '',
matchType: ''
},
id: '',
includeDetails: {},
kind: '',
lowercaseDetails: {
field: '',
fieldIndex: 0
},
name: '',
parentLink: {
href: '',
type: ''
},
searchAndReplaceDetails: {
caseSensitive: false,
field: '',
fieldIndex: 0,
replaceString: '',
searchString: ''
},
selfLink: '',
type: '',
updated: '',
uppercaseDetails: {
field: '',
fieldIndex: 0
}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/management/accounts/:accountId/filters/:filterId');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/management/accounts/:accountId/filters/:filterId',
headers: {'content-type': 'application/json'},
data: {
accountId: '',
advancedDetails: {
caseSensitive: false,
extractA: '',
extractB: '',
fieldA: '',
fieldAIndex: 0,
fieldARequired: false,
fieldB: '',
fieldBIndex: 0,
fieldBRequired: false,
outputConstructor: '',
outputToField: '',
outputToFieldIndex: 0,
overrideOutputField: false
},
created: '',
excludeDetails: {
caseSensitive: false,
expressionValue: '',
field: '',
fieldIndex: 0,
kind: '',
matchType: ''
},
id: '',
includeDetails: {},
kind: '',
lowercaseDetails: {field: '', fieldIndex: 0},
name: '',
parentLink: {href: '', type: ''},
searchAndReplaceDetails: {
caseSensitive: false,
field: '',
fieldIndex: 0,
replaceString: '',
searchString: ''
},
selfLink: '',
type: '',
updated: '',
uppercaseDetails: {field: '', fieldIndex: 0}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/management/accounts/:accountId/filters/:filterId';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"accountId":"","advancedDetails":{"caseSensitive":false,"extractA":"","extractB":"","fieldA":"","fieldAIndex":0,"fieldARequired":false,"fieldB":"","fieldBIndex":0,"fieldBRequired":false,"outputConstructor":"","outputToField":"","outputToFieldIndex":0,"overrideOutputField":false},"created":"","excludeDetails":{"caseSensitive":false,"expressionValue":"","field":"","fieldIndex":0,"kind":"","matchType":""},"id":"","includeDetails":{},"kind":"","lowercaseDetails":{"field":"","fieldIndex":0},"name":"","parentLink":{"href":"","type":""},"searchAndReplaceDetails":{"caseSensitive":false,"field":"","fieldIndex":0,"replaceString":"","searchString":""},"selfLink":"","type":"","updated":"","uppercaseDetails":{"field":"","fieldIndex":0}}'
};
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}}/management/accounts/:accountId/filters/:filterId',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "accountId": "",\n "advancedDetails": {\n "caseSensitive": false,\n "extractA": "",\n "extractB": "",\n "fieldA": "",\n "fieldAIndex": 0,\n "fieldARequired": false,\n "fieldB": "",\n "fieldBIndex": 0,\n "fieldBRequired": false,\n "outputConstructor": "",\n "outputToField": "",\n "outputToFieldIndex": 0,\n "overrideOutputField": false\n },\n "created": "",\n "excludeDetails": {\n "caseSensitive": false,\n "expressionValue": "",\n "field": "",\n "fieldIndex": 0,\n "kind": "",\n "matchType": ""\n },\n "id": "",\n "includeDetails": {},\n "kind": "",\n "lowercaseDetails": {\n "field": "",\n "fieldIndex": 0\n },\n "name": "",\n "parentLink": {\n "href": "",\n "type": ""\n },\n "searchAndReplaceDetails": {\n "caseSensitive": false,\n "field": "",\n "fieldIndex": 0,\n "replaceString": "",\n "searchString": ""\n },\n "selfLink": "",\n "type": "",\n "updated": "",\n "uppercaseDetails": {\n "field": "",\n "fieldIndex": 0\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 \"accountId\": \"\",\n \"advancedDetails\": {\n \"caseSensitive\": false,\n \"extractA\": \"\",\n \"extractB\": \"\",\n \"fieldA\": \"\",\n \"fieldAIndex\": 0,\n \"fieldARequired\": false,\n \"fieldB\": \"\",\n \"fieldBIndex\": 0,\n \"fieldBRequired\": false,\n \"outputConstructor\": \"\",\n \"outputToField\": \"\",\n \"outputToFieldIndex\": 0,\n \"overrideOutputField\": false\n },\n \"created\": \"\",\n \"excludeDetails\": {\n \"caseSensitive\": false,\n \"expressionValue\": \"\",\n \"field\": \"\",\n \"fieldIndex\": 0,\n \"kind\": \"\",\n \"matchType\": \"\"\n },\n \"id\": \"\",\n \"includeDetails\": {},\n \"kind\": \"\",\n \"lowercaseDetails\": {\n \"field\": \"\",\n \"fieldIndex\": 0\n },\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"searchAndReplaceDetails\": {\n \"caseSensitive\": false,\n \"field\": \"\",\n \"fieldIndex\": 0,\n \"replaceString\": \"\",\n \"searchString\": \"\"\n },\n \"selfLink\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"uppercaseDetails\": {\n \"field\": \"\",\n \"fieldIndex\": 0\n }\n}")
val request = Request.Builder()
.url("{{baseUrl}}/management/accounts/:accountId/filters/:filterId")
.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/management/accounts/:accountId/filters/:filterId',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
accountId: '',
advancedDetails: {
caseSensitive: false,
extractA: '',
extractB: '',
fieldA: '',
fieldAIndex: 0,
fieldARequired: false,
fieldB: '',
fieldBIndex: 0,
fieldBRequired: false,
outputConstructor: '',
outputToField: '',
outputToFieldIndex: 0,
overrideOutputField: false
},
created: '',
excludeDetails: {
caseSensitive: false,
expressionValue: '',
field: '',
fieldIndex: 0,
kind: '',
matchType: ''
},
id: '',
includeDetails: {},
kind: '',
lowercaseDetails: {field: '', fieldIndex: 0},
name: '',
parentLink: {href: '', type: ''},
searchAndReplaceDetails: {
caseSensitive: false,
field: '',
fieldIndex: 0,
replaceString: '',
searchString: ''
},
selfLink: '',
type: '',
updated: '',
uppercaseDetails: {field: '', fieldIndex: 0}
}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/management/accounts/:accountId/filters/:filterId',
headers: {'content-type': 'application/json'},
body: {
accountId: '',
advancedDetails: {
caseSensitive: false,
extractA: '',
extractB: '',
fieldA: '',
fieldAIndex: 0,
fieldARequired: false,
fieldB: '',
fieldBIndex: 0,
fieldBRequired: false,
outputConstructor: '',
outputToField: '',
outputToFieldIndex: 0,
overrideOutputField: false
},
created: '',
excludeDetails: {
caseSensitive: false,
expressionValue: '',
field: '',
fieldIndex: 0,
kind: '',
matchType: ''
},
id: '',
includeDetails: {},
kind: '',
lowercaseDetails: {field: '', fieldIndex: 0},
name: '',
parentLink: {href: '', type: ''},
searchAndReplaceDetails: {
caseSensitive: false,
field: '',
fieldIndex: 0,
replaceString: '',
searchString: ''
},
selfLink: '',
type: '',
updated: '',
uppercaseDetails: {field: '', fieldIndex: 0}
},
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}}/management/accounts/:accountId/filters/:filterId');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
accountId: '',
advancedDetails: {
caseSensitive: false,
extractA: '',
extractB: '',
fieldA: '',
fieldAIndex: 0,
fieldARequired: false,
fieldB: '',
fieldBIndex: 0,
fieldBRequired: false,
outputConstructor: '',
outputToField: '',
outputToFieldIndex: 0,
overrideOutputField: false
},
created: '',
excludeDetails: {
caseSensitive: false,
expressionValue: '',
field: '',
fieldIndex: 0,
kind: '',
matchType: ''
},
id: '',
includeDetails: {},
kind: '',
lowercaseDetails: {
field: '',
fieldIndex: 0
},
name: '',
parentLink: {
href: '',
type: ''
},
searchAndReplaceDetails: {
caseSensitive: false,
field: '',
fieldIndex: 0,
replaceString: '',
searchString: ''
},
selfLink: '',
type: '',
updated: '',
uppercaseDetails: {
field: '',
fieldIndex: 0
}
});
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}}/management/accounts/:accountId/filters/:filterId',
headers: {'content-type': 'application/json'},
data: {
accountId: '',
advancedDetails: {
caseSensitive: false,
extractA: '',
extractB: '',
fieldA: '',
fieldAIndex: 0,
fieldARequired: false,
fieldB: '',
fieldBIndex: 0,
fieldBRequired: false,
outputConstructor: '',
outputToField: '',
outputToFieldIndex: 0,
overrideOutputField: false
},
created: '',
excludeDetails: {
caseSensitive: false,
expressionValue: '',
field: '',
fieldIndex: 0,
kind: '',
matchType: ''
},
id: '',
includeDetails: {},
kind: '',
lowercaseDetails: {field: '', fieldIndex: 0},
name: '',
parentLink: {href: '', type: ''},
searchAndReplaceDetails: {
caseSensitive: false,
field: '',
fieldIndex: 0,
replaceString: '',
searchString: ''
},
selfLink: '',
type: '',
updated: '',
uppercaseDetails: {field: '', fieldIndex: 0}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/management/accounts/:accountId/filters/:filterId';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"accountId":"","advancedDetails":{"caseSensitive":false,"extractA":"","extractB":"","fieldA":"","fieldAIndex":0,"fieldARequired":false,"fieldB":"","fieldBIndex":0,"fieldBRequired":false,"outputConstructor":"","outputToField":"","outputToFieldIndex":0,"overrideOutputField":false},"created":"","excludeDetails":{"caseSensitive":false,"expressionValue":"","field":"","fieldIndex":0,"kind":"","matchType":""},"id":"","includeDetails":{},"kind":"","lowercaseDetails":{"field":"","fieldIndex":0},"name":"","parentLink":{"href":"","type":""},"searchAndReplaceDetails":{"caseSensitive":false,"field":"","fieldIndex":0,"replaceString":"","searchString":""},"selfLink":"","type":"","updated":"","uppercaseDetails":{"field":"","fieldIndex":0}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"accountId": @"",
@"advancedDetails": @{ @"caseSensitive": @NO, @"extractA": @"", @"extractB": @"", @"fieldA": @"", @"fieldAIndex": @0, @"fieldARequired": @NO, @"fieldB": @"", @"fieldBIndex": @0, @"fieldBRequired": @NO, @"outputConstructor": @"", @"outputToField": @"", @"outputToFieldIndex": @0, @"overrideOutputField": @NO },
@"created": @"",
@"excludeDetails": @{ @"caseSensitive": @NO, @"expressionValue": @"", @"field": @"", @"fieldIndex": @0, @"kind": @"", @"matchType": @"" },
@"id": @"",
@"includeDetails": @{ },
@"kind": @"",
@"lowercaseDetails": @{ @"field": @"", @"fieldIndex": @0 },
@"name": @"",
@"parentLink": @{ @"href": @"", @"type": @"" },
@"searchAndReplaceDetails": @{ @"caseSensitive": @NO, @"field": @"", @"fieldIndex": @0, @"replaceString": @"", @"searchString": @"" },
@"selfLink": @"",
@"type": @"",
@"updated": @"",
@"uppercaseDetails": @{ @"field": @"", @"fieldIndex": @0 } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/management/accounts/:accountId/filters/:filterId"]
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}}/management/accounts/:accountId/filters/:filterId" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"accountId\": \"\",\n \"advancedDetails\": {\n \"caseSensitive\": false,\n \"extractA\": \"\",\n \"extractB\": \"\",\n \"fieldA\": \"\",\n \"fieldAIndex\": 0,\n \"fieldARequired\": false,\n \"fieldB\": \"\",\n \"fieldBIndex\": 0,\n \"fieldBRequired\": false,\n \"outputConstructor\": \"\",\n \"outputToField\": \"\",\n \"outputToFieldIndex\": 0,\n \"overrideOutputField\": false\n },\n \"created\": \"\",\n \"excludeDetails\": {\n \"caseSensitive\": false,\n \"expressionValue\": \"\",\n \"field\": \"\",\n \"fieldIndex\": 0,\n \"kind\": \"\",\n \"matchType\": \"\"\n },\n \"id\": \"\",\n \"includeDetails\": {},\n \"kind\": \"\",\n \"lowercaseDetails\": {\n \"field\": \"\",\n \"fieldIndex\": 0\n },\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"searchAndReplaceDetails\": {\n \"caseSensitive\": false,\n \"field\": \"\",\n \"fieldIndex\": 0,\n \"replaceString\": \"\",\n \"searchString\": \"\"\n },\n \"selfLink\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"uppercaseDetails\": {\n \"field\": \"\",\n \"fieldIndex\": 0\n }\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/management/accounts/:accountId/filters/:filterId",
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([
'accountId' => '',
'advancedDetails' => [
'caseSensitive' => null,
'extractA' => '',
'extractB' => '',
'fieldA' => '',
'fieldAIndex' => 0,
'fieldARequired' => null,
'fieldB' => '',
'fieldBIndex' => 0,
'fieldBRequired' => null,
'outputConstructor' => '',
'outputToField' => '',
'outputToFieldIndex' => 0,
'overrideOutputField' => null
],
'created' => '',
'excludeDetails' => [
'caseSensitive' => null,
'expressionValue' => '',
'field' => '',
'fieldIndex' => 0,
'kind' => '',
'matchType' => ''
],
'id' => '',
'includeDetails' => [
],
'kind' => '',
'lowercaseDetails' => [
'field' => '',
'fieldIndex' => 0
],
'name' => '',
'parentLink' => [
'href' => '',
'type' => ''
],
'searchAndReplaceDetails' => [
'caseSensitive' => null,
'field' => '',
'fieldIndex' => 0,
'replaceString' => '',
'searchString' => ''
],
'selfLink' => '',
'type' => '',
'updated' => '',
'uppercaseDetails' => [
'field' => '',
'fieldIndex' => 0
]
]),
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}}/management/accounts/:accountId/filters/:filterId', [
'body' => '{
"accountId": "",
"advancedDetails": {
"caseSensitive": false,
"extractA": "",
"extractB": "",
"fieldA": "",
"fieldAIndex": 0,
"fieldARequired": false,
"fieldB": "",
"fieldBIndex": 0,
"fieldBRequired": false,
"outputConstructor": "",
"outputToField": "",
"outputToFieldIndex": 0,
"overrideOutputField": false
},
"created": "",
"excludeDetails": {
"caseSensitive": false,
"expressionValue": "",
"field": "",
"fieldIndex": 0,
"kind": "",
"matchType": ""
},
"id": "",
"includeDetails": {},
"kind": "",
"lowercaseDetails": {
"field": "",
"fieldIndex": 0
},
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"searchAndReplaceDetails": {
"caseSensitive": false,
"field": "",
"fieldIndex": 0,
"replaceString": "",
"searchString": ""
},
"selfLink": "",
"type": "",
"updated": "",
"uppercaseDetails": {
"field": "",
"fieldIndex": 0
}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/management/accounts/:accountId/filters/:filterId');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'accountId' => '',
'advancedDetails' => [
'caseSensitive' => null,
'extractA' => '',
'extractB' => '',
'fieldA' => '',
'fieldAIndex' => 0,
'fieldARequired' => null,
'fieldB' => '',
'fieldBIndex' => 0,
'fieldBRequired' => null,
'outputConstructor' => '',
'outputToField' => '',
'outputToFieldIndex' => 0,
'overrideOutputField' => null
],
'created' => '',
'excludeDetails' => [
'caseSensitive' => null,
'expressionValue' => '',
'field' => '',
'fieldIndex' => 0,
'kind' => '',
'matchType' => ''
],
'id' => '',
'includeDetails' => [
],
'kind' => '',
'lowercaseDetails' => [
'field' => '',
'fieldIndex' => 0
],
'name' => '',
'parentLink' => [
'href' => '',
'type' => ''
],
'searchAndReplaceDetails' => [
'caseSensitive' => null,
'field' => '',
'fieldIndex' => 0,
'replaceString' => '',
'searchString' => ''
],
'selfLink' => '',
'type' => '',
'updated' => '',
'uppercaseDetails' => [
'field' => '',
'fieldIndex' => 0
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'accountId' => '',
'advancedDetails' => [
'caseSensitive' => null,
'extractA' => '',
'extractB' => '',
'fieldA' => '',
'fieldAIndex' => 0,
'fieldARequired' => null,
'fieldB' => '',
'fieldBIndex' => 0,
'fieldBRequired' => null,
'outputConstructor' => '',
'outputToField' => '',
'outputToFieldIndex' => 0,
'overrideOutputField' => null
],
'created' => '',
'excludeDetails' => [
'caseSensitive' => null,
'expressionValue' => '',
'field' => '',
'fieldIndex' => 0,
'kind' => '',
'matchType' => ''
],
'id' => '',
'includeDetails' => [
],
'kind' => '',
'lowercaseDetails' => [
'field' => '',
'fieldIndex' => 0
],
'name' => '',
'parentLink' => [
'href' => '',
'type' => ''
],
'searchAndReplaceDetails' => [
'caseSensitive' => null,
'field' => '',
'fieldIndex' => 0,
'replaceString' => '',
'searchString' => ''
],
'selfLink' => '',
'type' => '',
'updated' => '',
'uppercaseDetails' => [
'field' => '',
'fieldIndex' => 0
]
]));
$request->setRequestUrl('{{baseUrl}}/management/accounts/:accountId/filters/:filterId');
$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}}/management/accounts/:accountId/filters/:filterId' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"accountId": "",
"advancedDetails": {
"caseSensitive": false,
"extractA": "",
"extractB": "",
"fieldA": "",
"fieldAIndex": 0,
"fieldARequired": false,
"fieldB": "",
"fieldBIndex": 0,
"fieldBRequired": false,
"outputConstructor": "",
"outputToField": "",
"outputToFieldIndex": 0,
"overrideOutputField": false
},
"created": "",
"excludeDetails": {
"caseSensitive": false,
"expressionValue": "",
"field": "",
"fieldIndex": 0,
"kind": "",
"matchType": ""
},
"id": "",
"includeDetails": {},
"kind": "",
"lowercaseDetails": {
"field": "",
"fieldIndex": 0
},
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"searchAndReplaceDetails": {
"caseSensitive": false,
"field": "",
"fieldIndex": 0,
"replaceString": "",
"searchString": ""
},
"selfLink": "",
"type": "",
"updated": "",
"uppercaseDetails": {
"field": "",
"fieldIndex": 0
}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/management/accounts/:accountId/filters/:filterId' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"accountId": "",
"advancedDetails": {
"caseSensitive": false,
"extractA": "",
"extractB": "",
"fieldA": "",
"fieldAIndex": 0,
"fieldARequired": false,
"fieldB": "",
"fieldBIndex": 0,
"fieldBRequired": false,
"outputConstructor": "",
"outputToField": "",
"outputToFieldIndex": 0,
"overrideOutputField": false
},
"created": "",
"excludeDetails": {
"caseSensitive": false,
"expressionValue": "",
"field": "",
"fieldIndex": 0,
"kind": "",
"matchType": ""
},
"id": "",
"includeDetails": {},
"kind": "",
"lowercaseDetails": {
"field": "",
"fieldIndex": 0
},
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"searchAndReplaceDetails": {
"caseSensitive": false,
"field": "",
"fieldIndex": 0,
"replaceString": "",
"searchString": ""
},
"selfLink": "",
"type": "",
"updated": "",
"uppercaseDetails": {
"field": "",
"fieldIndex": 0
}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"accountId\": \"\",\n \"advancedDetails\": {\n \"caseSensitive\": false,\n \"extractA\": \"\",\n \"extractB\": \"\",\n \"fieldA\": \"\",\n \"fieldAIndex\": 0,\n \"fieldARequired\": false,\n \"fieldB\": \"\",\n \"fieldBIndex\": 0,\n \"fieldBRequired\": false,\n \"outputConstructor\": \"\",\n \"outputToField\": \"\",\n \"outputToFieldIndex\": 0,\n \"overrideOutputField\": false\n },\n \"created\": \"\",\n \"excludeDetails\": {\n \"caseSensitive\": false,\n \"expressionValue\": \"\",\n \"field\": \"\",\n \"fieldIndex\": 0,\n \"kind\": \"\",\n \"matchType\": \"\"\n },\n \"id\": \"\",\n \"includeDetails\": {},\n \"kind\": \"\",\n \"lowercaseDetails\": {\n \"field\": \"\",\n \"fieldIndex\": 0\n },\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"searchAndReplaceDetails\": {\n \"caseSensitive\": false,\n \"field\": \"\",\n \"fieldIndex\": 0,\n \"replaceString\": \"\",\n \"searchString\": \"\"\n },\n \"selfLink\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"uppercaseDetails\": {\n \"field\": \"\",\n \"fieldIndex\": 0\n }\n}"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/management/accounts/:accountId/filters/:filterId", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/management/accounts/:accountId/filters/:filterId"
payload = {
"accountId": "",
"advancedDetails": {
"caseSensitive": False,
"extractA": "",
"extractB": "",
"fieldA": "",
"fieldAIndex": 0,
"fieldARequired": False,
"fieldB": "",
"fieldBIndex": 0,
"fieldBRequired": False,
"outputConstructor": "",
"outputToField": "",
"outputToFieldIndex": 0,
"overrideOutputField": False
},
"created": "",
"excludeDetails": {
"caseSensitive": False,
"expressionValue": "",
"field": "",
"fieldIndex": 0,
"kind": "",
"matchType": ""
},
"id": "",
"includeDetails": {},
"kind": "",
"lowercaseDetails": {
"field": "",
"fieldIndex": 0
},
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"searchAndReplaceDetails": {
"caseSensitive": False,
"field": "",
"fieldIndex": 0,
"replaceString": "",
"searchString": ""
},
"selfLink": "",
"type": "",
"updated": "",
"uppercaseDetails": {
"field": "",
"fieldIndex": 0
}
}
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/management/accounts/:accountId/filters/:filterId"
payload <- "{\n \"accountId\": \"\",\n \"advancedDetails\": {\n \"caseSensitive\": false,\n \"extractA\": \"\",\n \"extractB\": \"\",\n \"fieldA\": \"\",\n \"fieldAIndex\": 0,\n \"fieldARequired\": false,\n \"fieldB\": \"\",\n \"fieldBIndex\": 0,\n \"fieldBRequired\": false,\n \"outputConstructor\": \"\",\n \"outputToField\": \"\",\n \"outputToFieldIndex\": 0,\n \"overrideOutputField\": false\n },\n \"created\": \"\",\n \"excludeDetails\": {\n \"caseSensitive\": false,\n \"expressionValue\": \"\",\n \"field\": \"\",\n \"fieldIndex\": 0,\n \"kind\": \"\",\n \"matchType\": \"\"\n },\n \"id\": \"\",\n \"includeDetails\": {},\n \"kind\": \"\",\n \"lowercaseDetails\": {\n \"field\": \"\",\n \"fieldIndex\": 0\n },\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"searchAndReplaceDetails\": {\n \"caseSensitive\": false,\n \"field\": \"\",\n \"fieldIndex\": 0,\n \"replaceString\": \"\",\n \"searchString\": \"\"\n },\n \"selfLink\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"uppercaseDetails\": {\n \"field\": \"\",\n \"fieldIndex\": 0\n }\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}}/management/accounts/:accountId/filters/:filterId")
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 \"accountId\": \"\",\n \"advancedDetails\": {\n \"caseSensitive\": false,\n \"extractA\": \"\",\n \"extractB\": \"\",\n \"fieldA\": \"\",\n \"fieldAIndex\": 0,\n \"fieldARequired\": false,\n \"fieldB\": \"\",\n \"fieldBIndex\": 0,\n \"fieldBRequired\": false,\n \"outputConstructor\": \"\",\n \"outputToField\": \"\",\n \"outputToFieldIndex\": 0,\n \"overrideOutputField\": false\n },\n \"created\": \"\",\n \"excludeDetails\": {\n \"caseSensitive\": false,\n \"expressionValue\": \"\",\n \"field\": \"\",\n \"fieldIndex\": 0,\n \"kind\": \"\",\n \"matchType\": \"\"\n },\n \"id\": \"\",\n \"includeDetails\": {},\n \"kind\": \"\",\n \"lowercaseDetails\": {\n \"field\": \"\",\n \"fieldIndex\": 0\n },\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"searchAndReplaceDetails\": {\n \"caseSensitive\": false,\n \"field\": \"\",\n \"fieldIndex\": 0,\n \"replaceString\": \"\",\n \"searchString\": \"\"\n },\n \"selfLink\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"uppercaseDetails\": {\n \"field\": \"\",\n \"fieldIndex\": 0\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.put('/baseUrl/management/accounts/:accountId/filters/:filterId') do |req|
req.body = "{\n \"accountId\": \"\",\n \"advancedDetails\": {\n \"caseSensitive\": false,\n \"extractA\": \"\",\n \"extractB\": \"\",\n \"fieldA\": \"\",\n \"fieldAIndex\": 0,\n \"fieldARequired\": false,\n \"fieldB\": \"\",\n \"fieldBIndex\": 0,\n \"fieldBRequired\": false,\n \"outputConstructor\": \"\",\n \"outputToField\": \"\",\n \"outputToFieldIndex\": 0,\n \"overrideOutputField\": false\n },\n \"created\": \"\",\n \"excludeDetails\": {\n \"caseSensitive\": false,\n \"expressionValue\": \"\",\n \"field\": \"\",\n \"fieldIndex\": 0,\n \"kind\": \"\",\n \"matchType\": \"\"\n },\n \"id\": \"\",\n \"includeDetails\": {},\n \"kind\": \"\",\n \"lowercaseDetails\": {\n \"field\": \"\",\n \"fieldIndex\": 0\n },\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"searchAndReplaceDetails\": {\n \"caseSensitive\": false,\n \"field\": \"\",\n \"fieldIndex\": 0,\n \"replaceString\": \"\",\n \"searchString\": \"\"\n },\n \"selfLink\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"uppercaseDetails\": {\n \"field\": \"\",\n \"fieldIndex\": 0\n }\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}}/management/accounts/:accountId/filters/:filterId";
let payload = json!({
"accountId": "",
"advancedDetails": json!({
"caseSensitive": false,
"extractA": "",
"extractB": "",
"fieldA": "",
"fieldAIndex": 0,
"fieldARequired": false,
"fieldB": "",
"fieldBIndex": 0,
"fieldBRequired": false,
"outputConstructor": "",
"outputToField": "",
"outputToFieldIndex": 0,
"overrideOutputField": false
}),
"created": "",
"excludeDetails": json!({
"caseSensitive": false,
"expressionValue": "",
"field": "",
"fieldIndex": 0,
"kind": "",
"matchType": ""
}),
"id": "",
"includeDetails": json!({}),
"kind": "",
"lowercaseDetails": json!({
"field": "",
"fieldIndex": 0
}),
"name": "",
"parentLink": json!({
"href": "",
"type": ""
}),
"searchAndReplaceDetails": json!({
"caseSensitive": false,
"field": "",
"fieldIndex": 0,
"replaceString": "",
"searchString": ""
}),
"selfLink": "",
"type": "",
"updated": "",
"uppercaseDetails": json!({
"field": "",
"fieldIndex": 0
})
});
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}}/management/accounts/:accountId/filters/:filterId \
--header 'content-type: application/json' \
--data '{
"accountId": "",
"advancedDetails": {
"caseSensitive": false,
"extractA": "",
"extractB": "",
"fieldA": "",
"fieldAIndex": 0,
"fieldARequired": false,
"fieldB": "",
"fieldBIndex": 0,
"fieldBRequired": false,
"outputConstructor": "",
"outputToField": "",
"outputToFieldIndex": 0,
"overrideOutputField": false
},
"created": "",
"excludeDetails": {
"caseSensitive": false,
"expressionValue": "",
"field": "",
"fieldIndex": 0,
"kind": "",
"matchType": ""
},
"id": "",
"includeDetails": {},
"kind": "",
"lowercaseDetails": {
"field": "",
"fieldIndex": 0
},
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"searchAndReplaceDetails": {
"caseSensitive": false,
"field": "",
"fieldIndex": 0,
"replaceString": "",
"searchString": ""
},
"selfLink": "",
"type": "",
"updated": "",
"uppercaseDetails": {
"field": "",
"fieldIndex": 0
}
}'
echo '{
"accountId": "",
"advancedDetails": {
"caseSensitive": false,
"extractA": "",
"extractB": "",
"fieldA": "",
"fieldAIndex": 0,
"fieldARequired": false,
"fieldB": "",
"fieldBIndex": 0,
"fieldBRequired": false,
"outputConstructor": "",
"outputToField": "",
"outputToFieldIndex": 0,
"overrideOutputField": false
},
"created": "",
"excludeDetails": {
"caseSensitive": false,
"expressionValue": "",
"field": "",
"fieldIndex": 0,
"kind": "",
"matchType": ""
},
"id": "",
"includeDetails": {},
"kind": "",
"lowercaseDetails": {
"field": "",
"fieldIndex": 0
},
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"searchAndReplaceDetails": {
"caseSensitive": false,
"field": "",
"fieldIndex": 0,
"replaceString": "",
"searchString": ""
},
"selfLink": "",
"type": "",
"updated": "",
"uppercaseDetails": {
"field": "",
"fieldIndex": 0
}
}' | \
http PUT {{baseUrl}}/management/accounts/:accountId/filters/:filterId \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '{\n "accountId": "",\n "advancedDetails": {\n "caseSensitive": false,\n "extractA": "",\n "extractB": "",\n "fieldA": "",\n "fieldAIndex": 0,\n "fieldARequired": false,\n "fieldB": "",\n "fieldBIndex": 0,\n "fieldBRequired": false,\n "outputConstructor": "",\n "outputToField": "",\n "outputToFieldIndex": 0,\n "overrideOutputField": false\n },\n "created": "",\n "excludeDetails": {\n "caseSensitive": false,\n "expressionValue": "",\n "field": "",\n "fieldIndex": 0,\n "kind": "",\n "matchType": ""\n },\n "id": "",\n "includeDetails": {},\n "kind": "",\n "lowercaseDetails": {\n "field": "",\n "fieldIndex": 0\n },\n "name": "",\n "parentLink": {\n "href": "",\n "type": ""\n },\n "searchAndReplaceDetails": {\n "caseSensitive": false,\n "field": "",\n "fieldIndex": 0,\n "replaceString": "",\n "searchString": ""\n },\n "selfLink": "",\n "type": "",\n "updated": "",\n "uppercaseDetails": {\n "field": "",\n "fieldIndex": 0\n }\n}' \
--output-document \
- {{baseUrl}}/management/accounts/:accountId/filters/:filterId
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"accountId": "",
"advancedDetails": [
"caseSensitive": false,
"extractA": "",
"extractB": "",
"fieldA": "",
"fieldAIndex": 0,
"fieldARequired": false,
"fieldB": "",
"fieldBIndex": 0,
"fieldBRequired": false,
"outputConstructor": "",
"outputToField": "",
"outputToFieldIndex": 0,
"overrideOutputField": false
],
"created": "",
"excludeDetails": [
"caseSensitive": false,
"expressionValue": "",
"field": "",
"fieldIndex": 0,
"kind": "",
"matchType": ""
],
"id": "",
"includeDetails": [],
"kind": "",
"lowercaseDetails": [
"field": "",
"fieldIndex": 0
],
"name": "",
"parentLink": [
"href": "",
"type": ""
],
"searchAndReplaceDetails": [
"caseSensitive": false,
"field": "",
"fieldIndex": 0,
"replaceString": "",
"searchString": ""
],
"selfLink": "",
"type": "",
"updated": "",
"uppercaseDetails": [
"field": "",
"fieldIndex": 0
]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/management/accounts/:accountId/filters/:filterId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
analytics.management.goals.get
{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals/:goalId
QUERY PARAMS
accountId
webPropertyId
profileId
goalId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals/:goalId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals/:goalId")
require "http/client"
url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals/:goalId"
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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals/:goalId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals/:goalId");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals/:goalId"
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/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals/:goalId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals/:goalId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals/:goalId"))
.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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals/:goalId")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals/:goalId")
.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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals/:goalId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals/:goalId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals/:goalId';
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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals/:goalId',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals/:goalId")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals/:goalId',
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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals/:goalId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals/:goalId');
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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals/:goalId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals/:goalId';
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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals/:goalId"]
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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals/:goalId" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals/:goalId",
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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals/:goalId');
echo $response->getBody();
setUrl('{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals/:goalId');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals/:goalId');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals/:goalId' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals/:goalId' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals/:goalId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals/:goalId"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals/:goalId"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals/:goalId")
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/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals/:goalId') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals/:goalId";
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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals/:goalId
http GET {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals/:goalId
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals/:goalId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals/:goalId")! 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
analytics.management.goals.insert
{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals
QUERY PARAMS
accountId
webPropertyId
profileId
BODY json
{
"accountId": "",
"active": false,
"created": "",
"eventDetails": {
"eventConditions": [
{
"comparisonType": "",
"comparisonValue": "",
"expression": "",
"matchType": "",
"type": ""
}
],
"useEventValue": false
},
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"profileId": "",
"selfLink": "",
"type": "",
"updated": "",
"urlDestinationDetails": {
"caseSensitive": false,
"firstStepRequired": false,
"matchType": "",
"steps": [
{
"name": "",
"number": 0,
"url": ""
}
],
"url": ""
},
"value": "",
"visitNumPagesDetails": {
"comparisonType": "",
"comparisonValue": ""
},
"visitTimeOnSiteDetails": {
"comparisonType": "",
"comparisonValue": ""
},
"webPropertyId": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"accountId\": \"\",\n \"active\": false,\n \"created\": \"\",\n \"eventDetails\": {\n \"eventConditions\": [\n {\n \"comparisonType\": \"\",\n \"comparisonValue\": \"\",\n \"expression\": \"\",\n \"matchType\": \"\",\n \"type\": \"\"\n }\n ],\n \"useEventValue\": false\n },\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"profileId\": \"\",\n \"selfLink\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"urlDestinationDetails\": {\n \"caseSensitive\": false,\n \"firstStepRequired\": false,\n \"matchType\": \"\",\n \"steps\": [\n {\n \"name\": \"\",\n \"number\": 0,\n \"url\": \"\"\n }\n ],\n \"url\": \"\"\n },\n \"value\": \"\",\n \"visitNumPagesDetails\": {\n \"comparisonType\": \"\",\n \"comparisonValue\": \"\"\n },\n \"visitTimeOnSiteDetails\": {\n \"comparisonType\": \"\",\n \"comparisonValue\": \"\"\n },\n \"webPropertyId\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals" {:content-type :json
:form-params {:accountId ""
:active false
:created ""
:eventDetails {:eventConditions [{:comparisonType ""
:comparisonValue ""
:expression ""
:matchType ""
:type ""}]
:useEventValue false}
:id ""
:internalWebPropertyId ""
:kind ""
:name ""
:parentLink {:href ""
:type ""}
:profileId ""
:selfLink ""
:type ""
:updated ""
:urlDestinationDetails {:caseSensitive false
:firstStepRequired false
:matchType ""
:steps [{:name ""
:number 0
:url ""}]
:url ""}
:value ""
:visitNumPagesDetails {:comparisonType ""
:comparisonValue ""}
:visitTimeOnSiteDetails {:comparisonType ""
:comparisonValue ""}
:webPropertyId ""}})
require "http/client"
url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"accountId\": \"\",\n \"active\": false,\n \"created\": \"\",\n \"eventDetails\": {\n \"eventConditions\": [\n {\n \"comparisonType\": \"\",\n \"comparisonValue\": \"\",\n \"expression\": \"\",\n \"matchType\": \"\",\n \"type\": \"\"\n }\n ],\n \"useEventValue\": false\n },\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"profileId\": \"\",\n \"selfLink\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"urlDestinationDetails\": {\n \"caseSensitive\": false,\n \"firstStepRequired\": false,\n \"matchType\": \"\",\n \"steps\": [\n {\n \"name\": \"\",\n \"number\": 0,\n \"url\": \"\"\n }\n ],\n \"url\": \"\"\n },\n \"value\": \"\",\n \"visitNumPagesDetails\": {\n \"comparisonType\": \"\",\n \"comparisonValue\": \"\"\n },\n \"visitTimeOnSiteDetails\": {\n \"comparisonType\": \"\",\n \"comparisonValue\": \"\"\n },\n \"webPropertyId\": \"\"\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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals"),
Content = new StringContent("{\n \"accountId\": \"\",\n \"active\": false,\n \"created\": \"\",\n \"eventDetails\": {\n \"eventConditions\": [\n {\n \"comparisonType\": \"\",\n \"comparisonValue\": \"\",\n \"expression\": \"\",\n \"matchType\": \"\",\n \"type\": \"\"\n }\n ],\n \"useEventValue\": false\n },\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"profileId\": \"\",\n \"selfLink\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"urlDestinationDetails\": {\n \"caseSensitive\": false,\n \"firstStepRequired\": false,\n \"matchType\": \"\",\n \"steps\": [\n {\n \"name\": \"\",\n \"number\": 0,\n \"url\": \"\"\n }\n ],\n \"url\": \"\"\n },\n \"value\": \"\",\n \"visitNumPagesDetails\": {\n \"comparisonType\": \"\",\n \"comparisonValue\": \"\"\n },\n \"visitTimeOnSiteDetails\": {\n \"comparisonType\": \"\",\n \"comparisonValue\": \"\"\n },\n \"webPropertyId\": \"\"\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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"accountId\": \"\",\n \"active\": false,\n \"created\": \"\",\n \"eventDetails\": {\n \"eventConditions\": [\n {\n \"comparisonType\": \"\",\n \"comparisonValue\": \"\",\n \"expression\": \"\",\n \"matchType\": \"\",\n \"type\": \"\"\n }\n ],\n \"useEventValue\": false\n },\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"profileId\": \"\",\n \"selfLink\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"urlDestinationDetails\": {\n \"caseSensitive\": false,\n \"firstStepRequired\": false,\n \"matchType\": \"\",\n \"steps\": [\n {\n \"name\": \"\",\n \"number\": 0,\n \"url\": \"\"\n }\n ],\n \"url\": \"\"\n },\n \"value\": \"\",\n \"visitNumPagesDetails\": {\n \"comparisonType\": \"\",\n \"comparisonValue\": \"\"\n },\n \"visitTimeOnSiteDetails\": {\n \"comparisonType\": \"\",\n \"comparisonValue\": \"\"\n },\n \"webPropertyId\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals"
payload := strings.NewReader("{\n \"accountId\": \"\",\n \"active\": false,\n \"created\": \"\",\n \"eventDetails\": {\n \"eventConditions\": [\n {\n \"comparisonType\": \"\",\n \"comparisonValue\": \"\",\n \"expression\": \"\",\n \"matchType\": \"\",\n \"type\": \"\"\n }\n ],\n \"useEventValue\": false\n },\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"profileId\": \"\",\n \"selfLink\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"urlDestinationDetails\": {\n \"caseSensitive\": false,\n \"firstStepRequired\": false,\n \"matchType\": \"\",\n \"steps\": [\n {\n \"name\": \"\",\n \"number\": 0,\n \"url\": \"\"\n }\n ],\n \"url\": \"\"\n },\n \"value\": \"\",\n \"visitNumPagesDetails\": {\n \"comparisonType\": \"\",\n \"comparisonValue\": \"\"\n },\n \"visitTimeOnSiteDetails\": {\n \"comparisonType\": \"\",\n \"comparisonValue\": \"\"\n },\n \"webPropertyId\": \"\"\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/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 917
{
"accountId": "",
"active": false,
"created": "",
"eventDetails": {
"eventConditions": [
{
"comparisonType": "",
"comparisonValue": "",
"expression": "",
"matchType": "",
"type": ""
}
],
"useEventValue": false
},
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"profileId": "",
"selfLink": "",
"type": "",
"updated": "",
"urlDestinationDetails": {
"caseSensitive": false,
"firstStepRequired": false,
"matchType": "",
"steps": [
{
"name": "",
"number": 0,
"url": ""
}
],
"url": ""
},
"value": "",
"visitNumPagesDetails": {
"comparisonType": "",
"comparisonValue": ""
},
"visitTimeOnSiteDetails": {
"comparisonType": "",
"comparisonValue": ""
},
"webPropertyId": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals")
.setHeader("content-type", "application/json")
.setBody("{\n \"accountId\": \"\",\n \"active\": false,\n \"created\": \"\",\n \"eventDetails\": {\n \"eventConditions\": [\n {\n \"comparisonType\": \"\",\n \"comparisonValue\": \"\",\n \"expression\": \"\",\n \"matchType\": \"\",\n \"type\": \"\"\n }\n ],\n \"useEventValue\": false\n },\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"profileId\": \"\",\n \"selfLink\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"urlDestinationDetails\": {\n \"caseSensitive\": false,\n \"firstStepRequired\": false,\n \"matchType\": \"\",\n \"steps\": [\n {\n \"name\": \"\",\n \"number\": 0,\n \"url\": \"\"\n }\n ],\n \"url\": \"\"\n },\n \"value\": \"\",\n \"visitNumPagesDetails\": {\n \"comparisonType\": \"\",\n \"comparisonValue\": \"\"\n },\n \"visitTimeOnSiteDetails\": {\n \"comparisonType\": \"\",\n \"comparisonValue\": \"\"\n },\n \"webPropertyId\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"accountId\": \"\",\n \"active\": false,\n \"created\": \"\",\n \"eventDetails\": {\n \"eventConditions\": [\n {\n \"comparisonType\": \"\",\n \"comparisonValue\": \"\",\n \"expression\": \"\",\n \"matchType\": \"\",\n \"type\": \"\"\n }\n ],\n \"useEventValue\": false\n },\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"profileId\": \"\",\n \"selfLink\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"urlDestinationDetails\": {\n \"caseSensitive\": false,\n \"firstStepRequired\": false,\n \"matchType\": \"\",\n \"steps\": [\n {\n \"name\": \"\",\n \"number\": 0,\n \"url\": \"\"\n }\n ],\n \"url\": \"\"\n },\n \"value\": \"\",\n \"visitNumPagesDetails\": {\n \"comparisonType\": \"\",\n \"comparisonValue\": \"\"\n },\n \"visitTimeOnSiteDetails\": {\n \"comparisonType\": \"\",\n \"comparisonValue\": \"\"\n },\n \"webPropertyId\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"accountId\": \"\",\n \"active\": false,\n \"created\": \"\",\n \"eventDetails\": {\n \"eventConditions\": [\n {\n \"comparisonType\": \"\",\n \"comparisonValue\": \"\",\n \"expression\": \"\",\n \"matchType\": \"\",\n \"type\": \"\"\n }\n ],\n \"useEventValue\": false\n },\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"profileId\": \"\",\n \"selfLink\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"urlDestinationDetails\": {\n \"caseSensitive\": false,\n \"firstStepRequired\": false,\n \"matchType\": \"\",\n \"steps\": [\n {\n \"name\": \"\",\n \"number\": 0,\n \"url\": \"\"\n }\n ],\n \"url\": \"\"\n },\n \"value\": \"\",\n \"visitNumPagesDetails\": {\n \"comparisonType\": \"\",\n \"comparisonValue\": \"\"\n },\n \"visitTimeOnSiteDetails\": {\n \"comparisonType\": \"\",\n \"comparisonValue\": \"\"\n },\n \"webPropertyId\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals")
.header("content-type", "application/json")
.body("{\n \"accountId\": \"\",\n \"active\": false,\n \"created\": \"\",\n \"eventDetails\": {\n \"eventConditions\": [\n {\n \"comparisonType\": \"\",\n \"comparisonValue\": \"\",\n \"expression\": \"\",\n \"matchType\": \"\",\n \"type\": \"\"\n }\n ],\n \"useEventValue\": false\n },\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"profileId\": \"\",\n \"selfLink\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"urlDestinationDetails\": {\n \"caseSensitive\": false,\n \"firstStepRequired\": false,\n \"matchType\": \"\",\n \"steps\": [\n {\n \"name\": \"\",\n \"number\": 0,\n \"url\": \"\"\n }\n ],\n \"url\": \"\"\n },\n \"value\": \"\",\n \"visitNumPagesDetails\": {\n \"comparisonType\": \"\",\n \"comparisonValue\": \"\"\n },\n \"visitTimeOnSiteDetails\": {\n \"comparisonType\": \"\",\n \"comparisonValue\": \"\"\n },\n \"webPropertyId\": \"\"\n}")
.asString();
const data = JSON.stringify({
accountId: '',
active: false,
created: '',
eventDetails: {
eventConditions: [
{
comparisonType: '',
comparisonValue: '',
expression: '',
matchType: '',
type: ''
}
],
useEventValue: false
},
id: '',
internalWebPropertyId: '',
kind: '',
name: '',
parentLink: {
href: '',
type: ''
},
profileId: '',
selfLink: '',
type: '',
updated: '',
urlDestinationDetails: {
caseSensitive: false,
firstStepRequired: false,
matchType: '',
steps: [
{
name: '',
number: 0,
url: ''
}
],
url: ''
},
value: '',
visitNumPagesDetails: {
comparisonType: '',
comparisonValue: ''
},
visitTimeOnSiteDetails: {
comparisonType: '',
comparisonValue: ''
},
webPropertyId: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals',
headers: {'content-type': 'application/json'},
data: {
accountId: '',
active: false,
created: '',
eventDetails: {
eventConditions: [
{
comparisonType: '',
comparisonValue: '',
expression: '',
matchType: '',
type: ''
}
],
useEventValue: false
},
id: '',
internalWebPropertyId: '',
kind: '',
name: '',
parentLink: {href: '', type: ''},
profileId: '',
selfLink: '',
type: '',
updated: '',
urlDestinationDetails: {
caseSensitive: false,
firstStepRequired: false,
matchType: '',
steps: [{name: '', number: 0, url: ''}],
url: ''
},
value: '',
visitNumPagesDetails: {comparisonType: '', comparisonValue: ''},
visitTimeOnSiteDetails: {comparisonType: '', comparisonValue: ''},
webPropertyId: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"accountId":"","active":false,"created":"","eventDetails":{"eventConditions":[{"comparisonType":"","comparisonValue":"","expression":"","matchType":"","type":""}],"useEventValue":false},"id":"","internalWebPropertyId":"","kind":"","name":"","parentLink":{"href":"","type":""},"profileId":"","selfLink":"","type":"","updated":"","urlDestinationDetails":{"caseSensitive":false,"firstStepRequired":false,"matchType":"","steps":[{"name":"","number":0,"url":""}],"url":""},"value":"","visitNumPagesDetails":{"comparisonType":"","comparisonValue":""},"visitTimeOnSiteDetails":{"comparisonType":"","comparisonValue":""},"webPropertyId":""}'
};
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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "accountId": "",\n "active": false,\n "created": "",\n "eventDetails": {\n "eventConditions": [\n {\n "comparisonType": "",\n "comparisonValue": "",\n "expression": "",\n "matchType": "",\n "type": ""\n }\n ],\n "useEventValue": false\n },\n "id": "",\n "internalWebPropertyId": "",\n "kind": "",\n "name": "",\n "parentLink": {\n "href": "",\n "type": ""\n },\n "profileId": "",\n "selfLink": "",\n "type": "",\n "updated": "",\n "urlDestinationDetails": {\n "caseSensitive": false,\n "firstStepRequired": false,\n "matchType": "",\n "steps": [\n {\n "name": "",\n "number": 0,\n "url": ""\n }\n ],\n "url": ""\n },\n "value": "",\n "visitNumPagesDetails": {\n "comparisonType": "",\n "comparisonValue": ""\n },\n "visitTimeOnSiteDetails": {\n "comparisonType": "",\n "comparisonValue": ""\n },\n "webPropertyId": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"accountId\": \"\",\n \"active\": false,\n \"created\": \"\",\n \"eventDetails\": {\n \"eventConditions\": [\n {\n \"comparisonType\": \"\",\n \"comparisonValue\": \"\",\n \"expression\": \"\",\n \"matchType\": \"\",\n \"type\": \"\"\n }\n ],\n \"useEventValue\": false\n },\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"profileId\": \"\",\n \"selfLink\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"urlDestinationDetails\": {\n \"caseSensitive\": false,\n \"firstStepRequired\": false,\n \"matchType\": \"\",\n \"steps\": [\n {\n \"name\": \"\",\n \"number\": 0,\n \"url\": \"\"\n }\n ],\n \"url\": \"\"\n },\n \"value\": \"\",\n \"visitNumPagesDetails\": {\n \"comparisonType\": \"\",\n \"comparisonValue\": \"\"\n },\n \"visitTimeOnSiteDetails\": {\n \"comparisonType\": \"\",\n \"comparisonValue\": \"\"\n },\n \"webPropertyId\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals")
.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/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
accountId: '',
active: false,
created: '',
eventDetails: {
eventConditions: [
{
comparisonType: '',
comparisonValue: '',
expression: '',
matchType: '',
type: ''
}
],
useEventValue: false
},
id: '',
internalWebPropertyId: '',
kind: '',
name: '',
parentLink: {href: '', type: ''},
profileId: '',
selfLink: '',
type: '',
updated: '',
urlDestinationDetails: {
caseSensitive: false,
firstStepRequired: false,
matchType: '',
steps: [{name: '', number: 0, url: ''}],
url: ''
},
value: '',
visitNumPagesDetails: {comparisonType: '', comparisonValue: ''},
visitTimeOnSiteDetails: {comparisonType: '', comparisonValue: ''},
webPropertyId: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals',
headers: {'content-type': 'application/json'},
body: {
accountId: '',
active: false,
created: '',
eventDetails: {
eventConditions: [
{
comparisonType: '',
comparisonValue: '',
expression: '',
matchType: '',
type: ''
}
],
useEventValue: false
},
id: '',
internalWebPropertyId: '',
kind: '',
name: '',
parentLink: {href: '', type: ''},
profileId: '',
selfLink: '',
type: '',
updated: '',
urlDestinationDetails: {
caseSensitive: false,
firstStepRequired: false,
matchType: '',
steps: [{name: '', number: 0, url: ''}],
url: ''
},
value: '',
visitNumPagesDetails: {comparisonType: '', comparisonValue: ''},
visitTimeOnSiteDetails: {comparisonType: '', comparisonValue: ''},
webPropertyId: ''
},
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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
accountId: '',
active: false,
created: '',
eventDetails: {
eventConditions: [
{
comparisonType: '',
comparisonValue: '',
expression: '',
matchType: '',
type: ''
}
],
useEventValue: false
},
id: '',
internalWebPropertyId: '',
kind: '',
name: '',
parentLink: {
href: '',
type: ''
},
profileId: '',
selfLink: '',
type: '',
updated: '',
urlDestinationDetails: {
caseSensitive: false,
firstStepRequired: false,
matchType: '',
steps: [
{
name: '',
number: 0,
url: ''
}
],
url: ''
},
value: '',
visitNumPagesDetails: {
comparisonType: '',
comparisonValue: ''
},
visitTimeOnSiteDetails: {
comparisonType: '',
comparisonValue: ''
},
webPropertyId: ''
});
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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals',
headers: {'content-type': 'application/json'},
data: {
accountId: '',
active: false,
created: '',
eventDetails: {
eventConditions: [
{
comparisonType: '',
comparisonValue: '',
expression: '',
matchType: '',
type: ''
}
],
useEventValue: false
},
id: '',
internalWebPropertyId: '',
kind: '',
name: '',
parentLink: {href: '', type: ''},
profileId: '',
selfLink: '',
type: '',
updated: '',
urlDestinationDetails: {
caseSensitive: false,
firstStepRequired: false,
matchType: '',
steps: [{name: '', number: 0, url: ''}],
url: ''
},
value: '',
visitNumPagesDetails: {comparisonType: '', comparisonValue: ''},
visitTimeOnSiteDetails: {comparisonType: '', comparisonValue: ''},
webPropertyId: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"accountId":"","active":false,"created":"","eventDetails":{"eventConditions":[{"comparisonType":"","comparisonValue":"","expression":"","matchType":"","type":""}],"useEventValue":false},"id":"","internalWebPropertyId":"","kind":"","name":"","parentLink":{"href":"","type":""},"profileId":"","selfLink":"","type":"","updated":"","urlDestinationDetails":{"caseSensitive":false,"firstStepRequired":false,"matchType":"","steps":[{"name":"","number":0,"url":""}],"url":""},"value":"","visitNumPagesDetails":{"comparisonType":"","comparisonValue":""},"visitTimeOnSiteDetails":{"comparisonType":"","comparisonValue":""},"webPropertyId":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"accountId": @"",
@"active": @NO,
@"created": @"",
@"eventDetails": @{ @"eventConditions": @[ @{ @"comparisonType": @"", @"comparisonValue": @"", @"expression": @"", @"matchType": @"", @"type": @"" } ], @"useEventValue": @NO },
@"id": @"",
@"internalWebPropertyId": @"",
@"kind": @"",
@"name": @"",
@"parentLink": @{ @"href": @"", @"type": @"" },
@"profileId": @"",
@"selfLink": @"",
@"type": @"",
@"updated": @"",
@"urlDestinationDetails": @{ @"caseSensitive": @NO, @"firstStepRequired": @NO, @"matchType": @"", @"steps": @[ @{ @"name": @"", @"number": @0, @"url": @"" } ], @"url": @"" },
@"value": @"",
@"visitNumPagesDetails": @{ @"comparisonType": @"", @"comparisonValue": @"" },
@"visitTimeOnSiteDetails": @{ @"comparisonType": @"", @"comparisonValue": @"" },
@"webPropertyId": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals"]
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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"accountId\": \"\",\n \"active\": false,\n \"created\": \"\",\n \"eventDetails\": {\n \"eventConditions\": [\n {\n \"comparisonType\": \"\",\n \"comparisonValue\": \"\",\n \"expression\": \"\",\n \"matchType\": \"\",\n \"type\": \"\"\n }\n ],\n \"useEventValue\": false\n },\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"profileId\": \"\",\n \"selfLink\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"urlDestinationDetails\": {\n \"caseSensitive\": false,\n \"firstStepRequired\": false,\n \"matchType\": \"\",\n \"steps\": [\n {\n \"name\": \"\",\n \"number\": 0,\n \"url\": \"\"\n }\n ],\n \"url\": \"\"\n },\n \"value\": \"\",\n \"visitNumPagesDetails\": {\n \"comparisonType\": \"\",\n \"comparisonValue\": \"\"\n },\n \"visitTimeOnSiteDetails\": {\n \"comparisonType\": \"\",\n \"comparisonValue\": \"\"\n },\n \"webPropertyId\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'accountId' => '',
'active' => null,
'created' => '',
'eventDetails' => [
'eventConditions' => [
[
'comparisonType' => '',
'comparisonValue' => '',
'expression' => '',
'matchType' => '',
'type' => ''
]
],
'useEventValue' => null
],
'id' => '',
'internalWebPropertyId' => '',
'kind' => '',
'name' => '',
'parentLink' => [
'href' => '',
'type' => ''
],
'profileId' => '',
'selfLink' => '',
'type' => '',
'updated' => '',
'urlDestinationDetails' => [
'caseSensitive' => null,
'firstStepRequired' => null,
'matchType' => '',
'steps' => [
[
'name' => '',
'number' => 0,
'url' => ''
]
],
'url' => ''
],
'value' => '',
'visitNumPagesDetails' => [
'comparisonType' => '',
'comparisonValue' => ''
],
'visitTimeOnSiteDetails' => [
'comparisonType' => '',
'comparisonValue' => ''
],
'webPropertyId' => ''
]),
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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals', [
'body' => '{
"accountId": "",
"active": false,
"created": "",
"eventDetails": {
"eventConditions": [
{
"comparisonType": "",
"comparisonValue": "",
"expression": "",
"matchType": "",
"type": ""
}
],
"useEventValue": false
},
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"profileId": "",
"selfLink": "",
"type": "",
"updated": "",
"urlDestinationDetails": {
"caseSensitive": false,
"firstStepRequired": false,
"matchType": "",
"steps": [
{
"name": "",
"number": 0,
"url": ""
}
],
"url": ""
},
"value": "",
"visitNumPagesDetails": {
"comparisonType": "",
"comparisonValue": ""
},
"visitTimeOnSiteDetails": {
"comparisonType": "",
"comparisonValue": ""
},
"webPropertyId": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'accountId' => '',
'active' => null,
'created' => '',
'eventDetails' => [
'eventConditions' => [
[
'comparisonType' => '',
'comparisonValue' => '',
'expression' => '',
'matchType' => '',
'type' => ''
]
],
'useEventValue' => null
],
'id' => '',
'internalWebPropertyId' => '',
'kind' => '',
'name' => '',
'parentLink' => [
'href' => '',
'type' => ''
],
'profileId' => '',
'selfLink' => '',
'type' => '',
'updated' => '',
'urlDestinationDetails' => [
'caseSensitive' => null,
'firstStepRequired' => null,
'matchType' => '',
'steps' => [
[
'name' => '',
'number' => 0,
'url' => ''
]
],
'url' => ''
],
'value' => '',
'visitNumPagesDetails' => [
'comparisonType' => '',
'comparisonValue' => ''
],
'visitTimeOnSiteDetails' => [
'comparisonType' => '',
'comparisonValue' => ''
],
'webPropertyId' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'accountId' => '',
'active' => null,
'created' => '',
'eventDetails' => [
'eventConditions' => [
[
'comparisonType' => '',
'comparisonValue' => '',
'expression' => '',
'matchType' => '',
'type' => ''
]
],
'useEventValue' => null
],
'id' => '',
'internalWebPropertyId' => '',
'kind' => '',
'name' => '',
'parentLink' => [
'href' => '',
'type' => ''
],
'profileId' => '',
'selfLink' => '',
'type' => '',
'updated' => '',
'urlDestinationDetails' => [
'caseSensitive' => null,
'firstStepRequired' => null,
'matchType' => '',
'steps' => [
[
'name' => '',
'number' => 0,
'url' => ''
]
],
'url' => ''
],
'value' => '',
'visitNumPagesDetails' => [
'comparisonType' => '',
'comparisonValue' => ''
],
'visitTimeOnSiteDetails' => [
'comparisonType' => '',
'comparisonValue' => ''
],
'webPropertyId' => ''
]));
$request->setRequestUrl('{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals');
$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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"accountId": "",
"active": false,
"created": "",
"eventDetails": {
"eventConditions": [
{
"comparisonType": "",
"comparisonValue": "",
"expression": "",
"matchType": "",
"type": ""
}
],
"useEventValue": false
},
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"profileId": "",
"selfLink": "",
"type": "",
"updated": "",
"urlDestinationDetails": {
"caseSensitive": false,
"firstStepRequired": false,
"matchType": "",
"steps": [
{
"name": "",
"number": 0,
"url": ""
}
],
"url": ""
},
"value": "",
"visitNumPagesDetails": {
"comparisonType": "",
"comparisonValue": ""
},
"visitTimeOnSiteDetails": {
"comparisonType": "",
"comparisonValue": ""
},
"webPropertyId": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"accountId": "",
"active": false,
"created": "",
"eventDetails": {
"eventConditions": [
{
"comparisonType": "",
"comparisonValue": "",
"expression": "",
"matchType": "",
"type": ""
}
],
"useEventValue": false
},
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"profileId": "",
"selfLink": "",
"type": "",
"updated": "",
"urlDestinationDetails": {
"caseSensitive": false,
"firstStepRequired": false,
"matchType": "",
"steps": [
{
"name": "",
"number": 0,
"url": ""
}
],
"url": ""
},
"value": "",
"visitNumPagesDetails": {
"comparisonType": "",
"comparisonValue": ""
},
"visitTimeOnSiteDetails": {
"comparisonType": "",
"comparisonValue": ""
},
"webPropertyId": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"accountId\": \"\",\n \"active\": false,\n \"created\": \"\",\n \"eventDetails\": {\n \"eventConditions\": [\n {\n \"comparisonType\": \"\",\n \"comparisonValue\": \"\",\n \"expression\": \"\",\n \"matchType\": \"\",\n \"type\": \"\"\n }\n ],\n \"useEventValue\": false\n },\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"profileId\": \"\",\n \"selfLink\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"urlDestinationDetails\": {\n \"caseSensitive\": false,\n \"firstStepRequired\": false,\n \"matchType\": \"\",\n \"steps\": [\n {\n \"name\": \"\",\n \"number\": 0,\n \"url\": \"\"\n }\n ],\n \"url\": \"\"\n },\n \"value\": \"\",\n \"visitNumPagesDetails\": {\n \"comparisonType\": \"\",\n \"comparisonValue\": \"\"\n },\n \"visitTimeOnSiteDetails\": {\n \"comparisonType\": \"\",\n \"comparisonValue\": \"\"\n },\n \"webPropertyId\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals"
payload = {
"accountId": "",
"active": False,
"created": "",
"eventDetails": {
"eventConditions": [
{
"comparisonType": "",
"comparisonValue": "",
"expression": "",
"matchType": "",
"type": ""
}
],
"useEventValue": False
},
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"profileId": "",
"selfLink": "",
"type": "",
"updated": "",
"urlDestinationDetails": {
"caseSensitive": False,
"firstStepRequired": False,
"matchType": "",
"steps": [
{
"name": "",
"number": 0,
"url": ""
}
],
"url": ""
},
"value": "",
"visitNumPagesDetails": {
"comparisonType": "",
"comparisonValue": ""
},
"visitTimeOnSiteDetails": {
"comparisonType": "",
"comparisonValue": ""
},
"webPropertyId": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals"
payload <- "{\n \"accountId\": \"\",\n \"active\": false,\n \"created\": \"\",\n \"eventDetails\": {\n \"eventConditions\": [\n {\n \"comparisonType\": \"\",\n \"comparisonValue\": \"\",\n \"expression\": \"\",\n \"matchType\": \"\",\n \"type\": \"\"\n }\n ],\n \"useEventValue\": false\n },\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"profileId\": \"\",\n \"selfLink\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"urlDestinationDetails\": {\n \"caseSensitive\": false,\n \"firstStepRequired\": false,\n \"matchType\": \"\",\n \"steps\": [\n {\n \"name\": \"\",\n \"number\": 0,\n \"url\": \"\"\n }\n ],\n \"url\": \"\"\n },\n \"value\": \"\",\n \"visitNumPagesDetails\": {\n \"comparisonType\": \"\",\n \"comparisonValue\": \"\"\n },\n \"visitTimeOnSiteDetails\": {\n \"comparisonType\": \"\",\n \"comparisonValue\": \"\"\n },\n \"webPropertyId\": \"\"\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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"accountId\": \"\",\n \"active\": false,\n \"created\": \"\",\n \"eventDetails\": {\n \"eventConditions\": [\n {\n \"comparisonType\": \"\",\n \"comparisonValue\": \"\",\n \"expression\": \"\",\n \"matchType\": \"\",\n \"type\": \"\"\n }\n ],\n \"useEventValue\": false\n },\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"profileId\": \"\",\n \"selfLink\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"urlDestinationDetails\": {\n \"caseSensitive\": false,\n \"firstStepRequired\": false,\n \"matchType\": \"\",\n \"steps\": [\n {\n \"name\": \"\",\n \"number\": 0,\n \"url\": \"\"\n }\n ],\n \"url\": \"\"\n },\n \"value\": \"\",\n \"visitNumPagesDetails\": {\n \"comparisonType\": \"\",\n \"comparisonValue\": \"\"\n },\n \"visitTimeOnSiteDetails\": {\n \"comparisonType\": \"\",\n \"comparisonValue\": \"\"\n },\n \"webPropertyId\": \"\"\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/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals') do |req|
req.body = "{\n \"accountId\": \"\",\n \"active\": false,\n \"created\": \"\",\n \"eventDetails\": {\n \"eventConditions\": [\n {\n \"comparisonType\": \"\",\n \"comparisonValue\": \"\",\n \"expression\": \"\",\n \"matchType\": \"\",\n \"type\": \"\"\n }\n ],\n \"useEventValue\": false\n },\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"profileId\": \"\",\n \"selfLink\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"urlDestinationDetails\": {\n \"caseSensitive\": false,\n \"firstStepRequired\": false,\n \"matchType\": \"\",\n \"steps\": [\n {\n \"name\": \"\",\n \"number\": 0,\n \"url\": \"\"\n }\n ],\n \"url\": \"\"\n },\n \"value\": \"\",\n \"visitNumPagesDetails\": {\n \"comparisonType\": \"\",\n \"comparisonValue\": \"\"\n },\n \"visitTimeOnSiteDetails\": {\n \"comparisonType\": \"\",\n \"comparisonValue\": \"\"\n },\n \"webPropertyId\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals";
let payload = json!({
"accountId": "",
"active": false,
"created": "",
"eventDetails": json!({
"eventConditions": (
json!({
"comparisonType": "",
"comparisonValue": "",
"expression": "",
"matchType": "",
"type": ""
})
),
"useEventValue": false
}),
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"parentLink": json!({
"href": "",
"type": ""
}),
"profileId": "",
"selfLink": "",
"type": "",
"updated": "",
"urlDestinationDetails": json!({
"caseSensitive": false,
"firstStepRequired": false,
"matchType": "",
"steps": (
json!({
"name": "",
"number": 0,
"url": ""
})
),
"url": ""
}),
"value": "",
"visitNumPagesDetails": json!({
"comparisonType": "",
"comparisonValue": ""
}),
"visitTimeOnSiteDetails": json!({
"comparisonType": "",
"comparisonValue": ""
}),
"webPropertyId": ""
});
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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals \
--header 'content-type: application/json' \
--data '{
"accountId": "",
"active": false,
"created": "",
"eventDetails": {
"eventConditions": [
{
"comparisonType": "",
"comparisonValue": "",
"expression": "",
"matchType": "",
"type": ""
}
],
"useEventValue": false
},
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"profileId": "",
"selfLink": "",
"type": "",
"updated": "",
"urlDestinationDetails": {
"caseSensitive": false,
"firstStepRequired": false,
"matchType": "",
"steps": [
{
"name": "",
"number": 0,
"url": ""
}
],
"url": ""
},
"value": "",
"visitNumPagesDetails": {
"comparisonType": "",
"comparisonValue": ""
},
"visitTimeOnSiteDetails": {
"comparisonType": "",
"comparisonValue": ""
},
"webPropertyId": ""
}'
echo '{
"accountId": "",
"active": false,
"created": "",
"eventDetails": {
"eventConditions": [
{
"comparisonType": "",
"comparisonValue": "",
"expression": "",
"matchType": "",
"type": ""
}
],
"useEventValue": false
},
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"profileId": "",
"selfLink": "",
"type": "",
"updated": "",
"urlDestinationDetails": {
"caseSensitive": false,
"firstStepRequired": false,
"matchType": "",
"steps": [
{
"name": "",
"number": 0,
"url": ""
}
],
"url": ""
},
"value": "",
"visitNumPagesDetails": {
"comparisonType": "",
"comparisonValue": ""
},
"visitTimeOnSiteDetails": {
"comparisonType": "",
"comparisonValue": ""
},
"webPropertyId": ""
}' | \
http POST {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "accountId": "",\n "active": false,\n "created": "",\n "eventDetails": {\n "eventConditions": [\n {\n "comparisonType": "",\n "comparisonValue": "",\n "expression": "",\n "matchType": "",\n "type": ""\n }\n ],\n "useEventValue": false\n },\n "id": "",\n "internalWebPropertyId": "",\n "kind": "",\n "name": "",\n "parentLink": {\n "href": "",\n "type": ""\n },\n "profileId": "",\n "selfLink": "",\n "type": "",\n "updated": "",\n "urlDestinationDetails": {\n "caseSensitive": false,\n "firstStepRequired": false,\n "matchType": "",\n "steps": [\n {\n "name": "",\n "number": 0,\n "url": ""\n }\n ],\n "url": ""\n },\n "value": "",\n "visitNumPagesDetails": {\n "comparisonType": "",\n "comparisonValue": ""\n },\n "visitTimeOnSiteDetails": {\n "comparisonType": "",\n "comparisonValue": ""\n },\n "webPropertyId": ""\n}' \
--output-document \
- {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"accountId": "",
"active": false,
"created": "",
"eventDetails": [
"eventConditions": [
[
"comparisonType": "",
"comparisonValue": "",
"expression": "",
"matchType": "",
"type": ""
]
],
"useEventValue": false
],
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"parentLink": [
"href": "",
"type": ""
],
"profileId": "",
"selfLink": "",
"type": "",
"updated": "",
"urlDestinationDetails": [
"caseSensitive": false,
"firstStepRequired": false,
"matchType": "",
"steps": [
[
"name": "",
"number": 0,
"url": ""
]
],
"url": ""
],
"value": "",
"visitNumPagesDetails": [
"comparisonType": "",
"comparisonValue": ""
],
"visitTimeOnSiteDetails": [
"comparisonType": "",
"comparisonValue": ""
],
"webPropertyId": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals")! 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
analytics.management.goals.list
{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals
QUERY PARAMS
accountId
webPropertyId
profileId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals")
require "http/client"
url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals"
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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals"
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/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals"))
.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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals")
.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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals';
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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals',
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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals');
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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals';
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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals"]
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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals",
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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals');
echo $response->getBody();
setUrl('{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals")
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/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals";
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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals
http GET {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PATCH
analytics.management.goals.patch
{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals/:goalId
QUERY PARAMS
accountId
webPropertyId
profileId
goalId
BODY json
{
"accountId": "",
"active": false,
"created": "",
"eventDetails": {
"eventConditions": [
{
"comparisonType": "",
"comparisonValue": "",
"expression": "",
"matchType": "",
"type": ""
}
],
"useEventValue": false
},
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"profileId": "",
"selfLink": "",
"type": "",
"updated": "",
"urlDestinationDetails": {
"caseSensitive": false,
"firstStepRequired": false,
"matchType": "",
"steps": [
{
"name": "",
"number": 0,
"url": ""
}
],
"url": ""
},
"value": "",
"visitNumPagesDetails": {
"comparisonType": "",
"comparisonValue": ""
},
"visitTimeOnSiteDetails": {
"comparisonType": "",
"comparisonValue": ""
},
"webPropertyId": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals/:goalId");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"accountId\": \"\",\n \"active\": false,\n \"created\": \"\",\n \"eventDetails\": {\n \"eventConditions\": [\n {\n \"comparisonType\": \"\",\n \"comparisonValue\": \"\",\n \"expression\": \"\",\n \"matchType\": \"\",\n \"type\": \"\"\n }\n ],\n \"useEventValue\": false\n },\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"profileId\": \"\",\n \"selfLink\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"urlDestinationDetails\": {\n \"caseSensitive\": false,\n \"firstStepRequired\": false,\n \"matchType\": \"\",\n \"steps\": [\n {\n \"name\": \"\",\n \"number\": 0,\n \"url\": \"\"\n }\n ],\n \"url\": \"\"\n },\n \"value\": \"\",\n \"visitNumPagesDetails\": {\n \"comparisonType\": \"\",\n \"comparisonValue\": \"\"\n },\n \"visitTimeOnSiteDetails\": {\n \"comparisonType\": \"\",\n \"comparisonValue\": \"\"\n },\n \"webPropertyId\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/patch "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals/:goalId" {:content-type :json
:form-params {:accountId ""
:active false
:created ""
:eventDetails {:eventConditions [{:comparisonType ""
:comparisonValue ""
:expression ""
:matchType ""
:type ""}]
:useEventValue false}
:id ""
:internalWebPropertyId ""
:kind ""
:name ""
:parentLink {:href ""
:type ""}
:profileId ""
:selfLink ""
:type ""
:updated ""
:urlDestinationDetails {:caseSensitive false
:firstStepRequired false
:matchType ""
:steps [{:name ""
:number 0
:url ""}]
:url ""}
:value ""
:visitNumPagesDetails {:comparisonType ""
:comparisonValue ""}
:visitTimeOnSiteDetails {:comparisonType ""
:comparisonValue ""}
:webPropertyId ""}})
require "http/client"
url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals/:goalId"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"accountId\": \"\",\n \"active\": false,\n \"created\": \"\",\n \"eventDetails\": {\n \"eventConditions\": [\n {\n \"comparisonType\": \"\",\n \"comparisonValue\": \"\",\n \"expression\": \"\",\n \"matchType\": \"\",\n \"type\": \"\"\n }\n ],\n \"useEventValue\": false\n },\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"profileId\": \"\",\n \"selfLink\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"urlDestinationDetails\": {\n \"caseSensitive\": false,\n \"firstStepRequired\": false,\n \"matchType\": \"\",\n \"steps\": [\n {\n \"name\": \"\",\n \"number\": 0,\n \"url\": \"\"\n }\n ],\n \"url\": \"\"\n },\n \"value\": \"\",\n \"visitNumPagesDetails\": {\n \"comparisonType\": \"\",\n \"comparisonValue\": \"\"\n },\n \"visitTimeOnSiteDetails\": {\n \"comparisonType\": \"\",\n \"comparisonValue\": \"\"\n },\n \"webPropertyId\": \"\"\n}"
response = HTTP::Client.patch url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Patch,
RequestUri = new Uri("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals/:goalId"),
Content = new StringContent("{\n \"accountId\": \"\",\n \"active\": false,\n \"created\": \"\",\n \"eventDetails\": {\n \"eventConditions\": [\n {\n \"comparisonType\": \"\",\n \"comparisonValue\": \"\",\n \"expression\": \"\",\n \"matchType\": \"\",\n \"type\": \"\"\n }\n ],\n \"useEventValue\": false\n },\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"profileId\": \"\",\n \"selfLink\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"urlDestinationDetails\": {\n \"caseSensitive\": false,\n \"firstStepRequired\": false,\n \"matchType\": \"\",\n \"steps\": [\n {\n \"name\": \"\",\n \"number\": 0,\n \"url\": \"\"\n }\n ],\n \"url\": \"\"\n },\n \"value\": \"\",\n \"visitNumPagesDetails\": {\n \"comparisonType\": \"\",\n \"comparisonValue\": \"\"\n },\n \"visitTimeOnSiteDetails\": {\n \"comparisonType\": \"\",\n \"comparisonValue\": \"\"\n },\n \"webPropertyId\": \"\"\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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals/:goalId");
var request = new RestRequest("", Method.Patch);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"accountId\": \"\",\n \"active\": false,\n \"created\": \"\",\n \"eventDetails\": {\n \"eventConditions\": [\n {\n \"comparisonType\": \"\",\n \"comparisonValue\": \"\",\n \"expression\": \"\",\n \"matchType\": \"\",\n \"type\": \"\"\n }\n ],\n \"useEventValue\": false\n },\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"profileId\": \"\",\n \"selfLink\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"urlDestinationDetails\": {\n \"caseSensitive\": false,\n \"firstStepRequired\": false,\n \"matchType\": \"\",\n \"steps\": [\n {\n \"name\": \"\",\n \"number\": 0,\n \"url\": \"\"\n }\n ],\n \"url\": \"\"\n },\n \"value\": \"\",\n \"visitNumPagesDetails\": {\n \"comparisonType\": \"\",\n \"comparisonValue\": \"\"\n },\n \"visitTimeOnSiteDetails\": {\n \"comparisonType\": \"\",\n \"comparisonValue\": \"\"\n },\n \"webPropertyId\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals/:goalId"
payload := strings.NewReader("{\n \"accountId\": \"\",\n \"active\": false,\n \"created\": \"\",\n \"eventDetails\": {\n \"eventConditions\": [\n {\n \"comparisonType\": \"\",\n \"comparisonValue\": \"\",\n \"expression\": \"\",\n \"matchType\": \"\",\n \"type\": \"\"\n }\n ],\n \"useEventValue\": false\n },\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"profileId\": \"\",\n \"selfLink\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"urlDestinationDetails\": {\n \"caseSensitive\": false,\n \"firstStepRequired\": false,\n \"matchType\": \"\",\n \"steps\": [\n {\n \"name\": \"\",\n \"number\": 0,\n \"url\": \"\"\n }\n ],\n \"url\": \"\"\n },\n \"value\": \"\",\n \"visitNumPagesDetails\": {\n \"comparisonType\": \"\",\n \"comparisonValue\": \"\"\n },\n \"visitTimeOnSiteDetails\": {\n \"comparisonType\": \"\",\n \"comparisonValue\": \"\"\n },\n \"webPropertyId\": \"\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
PATCH /baseUrl/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals/:goalId HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 917
{
"accountId": "",
"active": false,
"created": "",
"eventDetails": {
"eventConditions": [
{
"comparisonType": "",
"comparisonValue": "",
"expression": "",
"matchType": "",
"type": ""
}
],
"useEventValue": false
},
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"profileId": "",
"selfLink": "",
"type": "",
"updated": "",
"urlDestinationDetails": {
"caseSensitive": false,
"firstStepRequired": false,
"matchType": "",
"steps": [
{
"name": "",
"number": 0,
"url": ""
}
],
"url": ""
},
"value": "",
"visitNumPagesDetails": {
"comparisonType": "",
"comparisonValue": ""
},
"visitTimeOnSiteDetails": {
"comparisonType": "",
"comparisonValue": ""
},
"webPropertyId": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals/:goalId")
.setHeader("content-type", "application/json")
.setBody("{\n \"accountId\": \"\",\n \"active\": false,\n \"created\": \"\",\n \"eventDetails\": {\n \"eventConditions\": [\n {\n \"comparisonType\": \"\",\n \"comparisonValue\": \"\",\n \"expression\": \"\",\n \"matchType\": \"\",\n \"type\": \"\"\n }\n ],\n \"useEventValue\": false\n },\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"profileId\": \"\",\n \"selfLink\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"urlDestinationDetails\": {\n \"caseSensitive\": false,\n \"firstStepRequired\": false,\n \"matchType\": \"\",\n \"steps\": [\n {\n \"name\": \"\",\n \"number\": 0,\n \"url\": \"\"\n }\n ],\n \"url\": \"\"\n },\n \"value\": \"\",\n \"visitNumPagesDetails\": {\n \"comparisonType\": \"\",\n \"comparisonValue\": \"\"\n },\n \"visitTimeOnSiteDetails\": {\n \"comparisonType\": \"\",\n \"comparisonValue\": \"\"\n },\n \"webPropertyId\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals/:goalId"))
.header("content-type", "application/json")
.method("PATCH", HttpRequest.BodyPublishers.ofString("{\n \"accountId\": \"\",\n \"active\": false,\n \"created\": \"\",\n \"eventDetails\": {\n \"eventConditions\": [\n {\n \"comparisonType\": \"\",\n \"comparisonValue\": \"\",\n \"expression\": \"\",\n \"matchType\": \"\",\n \"type\": \"\"\n }\n ],\n \"useEventValue\": false\n },\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"profileId\": \"\",\n \"selfLink\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"urlDestinationDetails\": {\n \"caseSensitive\": false,\n \"firstStepRequired\": false,\n \"matchType\": \"\",\n \"steps\": [\n {\n \"name\": \"\",\n \"number\": 0,\n \"url\": \"\"\n }\n ],\n \"url\": \"\"\n },\n \"value\": \"\",\n \"visitNumPagesDetails\": {\n \"comparisonType\": \"\",\n \"comparisonValue\": \"\"\n },\n \"visitTimeOnSiteDetails\": {\n \"comparisonType\": \"\",\n \"comparisonValue\": \"\"\n },\n \"webPropertyId\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"accountId\": \"\",\n \"active\": false,\n \"created\": \"\",\n \"eventDetails\": {\n \"eventConditions\": [\n {\n \"comparisonType\": \"\",\n \"comparisonValue\": \"\",\n \"expression\": \"\",\n \"matchType\": \"\",\n \"type\": \"\"\n }\n ],\n \"useEventValue\": false\n },\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"profileId\": \"\",\n \"selfLink\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"urlDestinationDetails\": {\n \"caseSensitive\": false,\n \"firstStepRequired\": false,\n \"matchType\": \"\",\n \"steps\": [\n {\n \"name\": \"\",\n \"number\": 0,\n \"url\": \"\"\n }\n ],\n \"url\": \"\"\n },\n \"value\": \"\",\n \"visitNumPagesDetails\": {\n \"comparisonType\": \"\",\n \"comparisonValue\": \"\"\n },\n \"visitTimeOnSiteDetails\": {\n \"comparisonType\": \"\",\n \"comparisonValue\": \"\"\n },\n \"webPropertyId\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals/:goalId")
.patch(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals/:goalId")
.header("content-type", "application/json")
.body("{\n \"accountId\": \"\",\n \"active\": false,\n \"created\": \"\",\n \"eventDetails\": {\n \"eventConditions\": [\n {\n \"comparisonType\": \"\",\n \"comparisonValue\": \"\",\n \"expression\": \"\",\n \"matchType\": \"\",\n \"type\": \"\"\n }\n ],\n \"useEventValue\": false\n },\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"profileId\": \"\",\n \"selfLink\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"urlDestinationDetails\": {\n \"caseSensitive\": false,\n \"firstStepRequired\": false,\n \"matchType\": \"\",\n \"steps\": [\n {\n \"name\": \"\",\n \"number\": 0,\n \"url\": \"\"\n }\n ],\n \"url\": \"\"\n },\n \"value\": \"\",\n \"visitNumPagesDetails\": {\n \"comparisonType\": \"\",\n \"comparisonValue\": \"\"\n },\n \"visitTimeOnSiteDetails\": {\n \"comparisonType\": \"\",\n \"comparisonValue\": \"\"\n },\n \"webPropertyId\": \"\"\n}")
.asString();
const data = JSON.stringify({
accountId: '',
active: false,
created: '',
eventDetails: {
eventConditions: [
{
comparisonType: '',
comparisonValue: '',
expression: '',
matchType: '',
type: ''
}
],
useEventValue: false
},
id: '',
internalWebPropertyId: '',
kind: '',
name: '',
parentLink: {
href: '',
type: ''
},
profileId: '',
selfLink: '',
type: '',
updated: '',
urlDestinationDetails: {
caseSensitive: false,
firstStepRequired: false,
matchType: '',
steps: [
{
name: '',
number: 0,
url: ''
}
],
url: ''
},
value: '',
visitNumPagesDetails: {
comparisonType: '',
comparisonValue: ''
},
visitTimeOnSiteDetails: {
comparisonType: '',
comparisonValue: ''
},
webPropertyId: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PATCH', '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals/:goalId');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PATCH',
url: '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals/:goalId',
headers: {'content-type': 'application/json'},
data: {
accountId: '',
active: false,
created: '',
eventDetails: {
eventConditions: [
{
comparisonType: '',
comparisonValue: '',
expression: '',
matchType: '',
type: ''
}
],
useEventValue: false
},
id: '',
internalWebPropertyId: '',
kind: '',
name: '',
parentLink: {href: '', type: ''},
profileId: '',
selfLink: '',
type: '',
updated: '',
urlDestinationDetails: {
caseSensitive: false,
firstStepRequired: false,
matchType: '',
steps: [{name: '', number: 0, url: ''}],
url: ''
},
value: '',
visitNumPagesDetails: {comparisonType: '', comparisonValue: ''},
visitTimeOnSiteDetails: {comparisonType: '', comparisonValue: ''},
webPropertyId: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals/:goalId';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"accountId":"","active":false,"created":"","eventDetails":{"eventConditions":[{"comparisonType":"","comparisonValue":"","expression":"","matchType":"","type":""}],"useEventValue":false},"id":"","internalWebPropertyId":"","kind":"","name":"","parentLink":{"href":"","type":""},"profileId":"","selfLink":"","type":"","updated":"","urlDestinationDetails":{"caseSensitive":false,"firstStepRequired":false,"matchType":"","steps":[{"name":"","number":0,"url":""}],"url":""},"value":"","visitNumPagesDetails":{"comparisonType":"","comparisonValue":""},"visitTimeOnSiteDetails":{"comparisonType":"","comparisonValue":""},"webPropertyId":""}'
};
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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals/:goalId',
method: 'PATCH',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "accountId": "",\n "active": false,\n "created": "",\n "eventDetails": {\n "eventConditions": [\n {\n "comparisonType": "",\n "comparisonValue": "",\n "expression": "",\n "matchType": "",\n "type": ""\n }\n ],\n "useEventValue": false\n },\n "id": "",\n "internalWebPropertyId": "",\n "kind": "",\n "name": "",\n "parentLink": {\n "href": "",\n "type": ""\n },\n "profileId": "",\n "selfLink": "",\n "type": "",\n "updated": "",\n "urlDestinationDetails": {\n "caseSensitive": false,\n "firstStepRequired": false,\n "matchType": "",\n "steps": [\n {\n "name": "",\n "number": 0,\n "url": ""\n }\n ],\n "url": ""\n },\n "value": "",\n "visitNumPagesDetails": {\n "comparisonType": "",\n "comparisonValue": ""\n },\n "visitTimeOnSiteDetails": {\n "comparisonType": "",\n "comparisonValue": ""\n },\n "webPropertyId": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"accountId\": \"\",\n \"active\": false,\n \"created\": \"\",\n \"eventDetails\": {\n \"eventConditions\": [\n {\n \"comparisonType\": \"\",\n \"comparisonValue\": \"\",\n \"expression\": \"\",\n \"matchType\": \"\",\n \"type\": \"\"\n }\n ],\n \"useEventValue\": false\n },\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"profileId\": \"\",\n \"selfLink\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"urlDestinationDetails\": {\n \"caseSensitive\": false,\n \"firstStepRequired\": false,\n \"matchType\": \"\",\n \"steps\": [\n {\n \"name\": \"\",\n \"number\": 0,\n \"url\": \"\"\n }\n ],\n \"url\": \"\"\n },\n \"value\": \"\",\n \"visitNumPagesDetails\": {\n \"comparisonType\": \"\",\n \"comparisonValue\": \"\"\n },\n \"visitTimeOnSiteDetails\": {\n \"comparisonType\": \"\",\n \"comparisonValue\": \"\"\n },\n \"webPropertyId\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals/:goalId")
.patch(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PATCH',
hostname: 'example.com',
port: null,
path: '/baseUrl/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals/:goalId',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
accountId: '',
active: false,
created: '',
eventDetails: {
eventConditions: [
{
comparisonType: '',
comparisonValue: '',
expression: '',
matchType: '',
type: ''
}
],
useEventValue: false
},
id: '',
internalWebPropertyId: '',
kind: '',
name: '',
parentLink: {href: '', type: ''},
profileId: '',
selfLink: '',
type: '',
updated: '',
urlDestinationDetails: {
caseSensitive: false,
firstStepRequired: false,
matchType: '',
steps: [{name: '', number: 0, url: ''}],
url: ''
},
value: '',
visitNumPagesDetails: {comparisonType: '', comparisonValue: ''},
visitTimeOnSiteDetails: {comparisonType: '', comparisonValue: ''},
webPropertyId: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PATCH',
url: '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals/:goalId',
headers: {'content-type': 'application/json'},
body: {
accountId: '',
active: false,
created: '',
eventDetails: {
eventConditions: [
{
comparisonType: '',
comparisonValue: '',
expression: '',
matchType: '',
type: ''
}
],
useEventValue: false
},
id: '',
internalWebPropertyId: '',
kind: '',
name: '',
parentLink: {href: '', type: ''},
profileId: '',
selfLink: '',
type: '',
updated: '',
urlDestinationDetails: {
caseSensitive: false,
firstStepRequired: false,
matchType: '',
steps: [{name: '', number: 0, url: ''}],
url: ''
},
value: '',
visitNumPagesDetails: {comparisonType: '', comparisonValue: ''},
visitTimeOnSiteDetails: {comparisonType: '', comparisonValue: ''},
webPropertyId: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PATCH', '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals/:goalId');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
accountId: '',
active: false,
created: '',
eventDetails: {
eventConditions: [
{
comparisonType: '',
comparisonValue: '',
expression: '',
matchType: '',
type: ''
}
],
useEventValue: false
},
id: '',
internalWebPropertyId: '',
kind: '',
name: '',
parentLink: {
href: '',
type: ''
},
profileId: '',
selfLink: '',
type: '',
updated: '',
urlDestinationDetails: {
caseSensitive: false,
firstStepRequired: false,
matchType: '',
steps: [
{
name: '',
number: 0,
url: ''
}
],
url: ''
},
value: '',
visitNumPagesDetails: {
comparisonType: '',
comparisonValue: ''
},
visitTimeOnSiteDetails: {
comparisonType: '',
comparisonValue: ''
},
webPropertyId: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PATCH',
url: '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals/:goalId',
headers: {'content-type': 'application/json'},
data: {
accountId: '',
active: false,
created: '',
eventDetails: {
eventConditions: [
{
comparisonType: '',
comparisonValue: '',
expression: '',
matchType: '',
type: ''
}
],
useEventValue: false
},
id: '',
internalWebPropertyId: '',
kind: '',
name: '',
parentLink: {href: '', type: ''},
profileId: '',
selfLink: '',
type: '',
updated: '',
urlDestinationDetails: {
caseSensitive: false,
firstStepRequired: false,
matchType: '',
steps: [{name: '', number: 0, url: ''}],
url: ''
},
value: '',
visitNumPagesDetails: {comparisonType: '', comparisonValue: ''},
visitTimeOnSiteDetails: {comparisonType: '', comparisonValue: ''},
webPropertyId: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals/:goalId';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"accountId":"","active":false,"created":"","eventDetails":{"eventConditions":[{"comparisonType":"","comparisonValue":"","expression":"","matchType":"","type":""}],"useEventValue":false},"id":"","internalWebPropertyId":"","kind":"","name":"","parentLink":{"href":"","type":""},"profileId":"","selfLink":"","type":"","updated":"","urlDestinationDetails":{"caseSensitive":false,"firstStepRequired":false,"matchType":"","steps":[{"name":"","number":0,"url":""}],"url":""},"value":"","visitNumPagesDetails":{"comparisonType":"","comparisonValue":""},"visitTimeOnSiteDetails":{"comparisonType":"","comparisonValue":""},"webPropertyId":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"accountId": @"",
@"active": @NO,
@"created": @"",
@"eventDetails": @{ @"eventConditions": @[ @{ @"comparisonType": @"", @"comparisonValue": @"", @"expression": @"", @"matchType": @"", @"type": @"" } ], @"useEventValue": @NO },
@"id": @"",
@"internalWebPropertyId": @"",
@"kind": @"",
@"name": @"",
@"parentLink": @{ @"href": @"", @"type": @"" },
@"profileId": @"",
@"selfLink": @"",
@"type": @"",
@"updated": @"",
@"urlDestinationDetails": @{ @"caseSensitive": @NO, @"firstStepRequired": @NO, @"matchType": @"", @"steps": @[ @{ @"name": @"", @"number": @0, @"url": @"" } ], @"url": @"" },
@"value": @"",
@"visitNumPagesDetails": @{ @"comparisonType": @"", @"comparisonValue": @"" },
@"visitTimeOnSiteDetails": @{ @"comparisonType": @"", @"comparisonValue": @"" },
@"webPropertyId": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals/:goalId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PATCH"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals/:goalId" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"accountId\": \"\",\n \"active\": false,\n \"created\": \"\",\n \"eventDetails\": {\n \"eventConditions\": [\n {\n \"comparisonType\": \"\",\n \"comparisonValue\": \"\",\n \"expression\": \"\",\n \"matchType\": \"\",\n \"type\": \"\"\n }\n ],\n \"useEventValue\": false\n },\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"profileId\": \"\",\n \"selfLink\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"urlDestinationDetails\": {\n \"caseSensitive\": false,\n \"firstStepRequired\": false,\n \"matchType\": \"\",\n \"steps\": [\n {\n \"name\": \"\",\n \"number\": 0,\n \"url\": \"\"\n }\n ],\n \"url\": \"\"\n },\n \"value\": \"\",\n \"visitNumPagesDetails\": {\n \"comparisonType\": \"\",\n \"comparisonValue\": \"\"\n },\n \"visitTimeOnSiteDetails\": {\n \"comparisonType\": \"\",\n \"comparisonValue\": \"\"\n },\n \"webPropertyId\": \"\"\n}" in
Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals/:goalId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'accountId' => '',
'active' => null,
'created' => '',
'eventDetails' => [
'eventConditions' => [
[
'comparisonType' => '',
'comparisonValue' => '',
'expression' => '',
'matchType' => '',
'type' => ''
]
],
'useEventValue' => null
],
'id' => '',
'internalWebPropertyId' => '',
'kind' => '',
'name' => '',
'parentLink' => [
'href' => '',
'type' => ''
],
'profileId' => '',
'selfLink' => '',
'type' => '',
'updated' => '',
'urlDestinationDetails' => [
'caseSensitive' => null,
'firstStepRequired' => null,
'matchType' => '',
'steps' => [
[
'name' => '',
'number' => 0,
'url' => ''
]
],
'url' => ''
],
'value' => '',
'visitNumPagesDetails' => [
'comparisonType' => '',
'comparisonValue' => ''
],
'visitTimeOnSiteDetails' => [
'comparisonType' => '',
'comparisonValue' => ''
],
'webPropertyId' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PATCH', '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals/:goalId', [
'body' => '{
"accountId": "",
"active": false,
"created": "",
"eventDetails": {
"eventConditions": [
{
"comparisonType": "",
"comparisonValue": "",
"expression": "",
"matchType": "",
"type": ""
}
],
"useEventValue": false
},
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"profileId": "",
"selfLink": "",
"type": "",
"updated": "",
"urlDestinationDetails": {
"caseSensitive": false,
"firstStepRequired": false,
"matchType": "",
"steps": [
{
"name": "",
"number": 0,
"url": ""
}
],
"url": ""
},
"value": "",
"visitNumPagesDetails": {
"comparisonType": "",
"comparisonValue": ""
},
"visitTimeOnSiteDetails": {
"comparisonType": "",
"comparisonValue": ""
},
"webPropertyId": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals/:goalId');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'accountId' => '',
'active' => null,
'created' => '',
'eventDetails' => [
'eventConditions' => [
[
'comparisonType' => '',
'comparisonValue' => '',
'expression' => '',
'matchType' => '',
'type' => ''
]
],
'useEventValue' => null
],
'id' => '',
'internalWebPropertyId' => '',
'kind' => '',
'name' => '',
'parentLink' => [
'href' => '',
'type' => ''
],
'profileId' => '',
'selfLink' => '',
'type' => '',
'updated' => '',
'urlDestinationDetails' => [
'caseSensitive' => null,
'firstStepRequired' => null,
'matchType' => '',
'steps' => [
[
'name' => '',
'number' => 0,
'url' => ''
]
],
'url' => ''
],
'value' => '',
'visitNumPagesDetails' => [
'comparisonType' => '',
'comparisonValue' => ''
],
'visitTimeOnSiteDetails' => [
'comparisonType' => '',
'comparisonValue' => ''
],
'webPropertyId' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'accountId' => '',
'active' => null,
'created' => '',
'eventDetails' => [
'eventConditions' => [
[
'comparisonType' => '',
'comparisonValue' => '',
'expression' => '',
'matchType' => '',
'type' => ''
]
],
'useEventValue' => null
],
'id' => '',
'internalWebPropertyId' => '',
'kind' => '',
'name' => '',
'parentLink' => [
'href' => '',
'type' => ''
],
'profileId' => '',
'selfLink' => '',
'type' => '',
'updated' => '',
'urlDestinationDetails' => [
'caseSensitive' => null,
'firstStepRequired' => null,
'matchType' => '',
'steps' => [
[
'name' => '',
'number' => 0,
'url' => ''
]
],
'url' => ''
],
'value' => '',
'visitNumPagesDetails' => [
'comparisonType' => '',
'comparisonValue' => ''
],
'visitTimeOnSiteDetails' => [
'comparisonType' => '',
'comparisonValue' => ''
],
'webPropertyId' => ''
]));
$request->setRequestUrl('{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals/:goalId');
$request->setRequestMethod('PATCH');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals/:goalId' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"accountId": "",
"active": false,
"created": "",
"eventDetails": {
"eventConditions": [
{
"comparisonType": "",
"comparisonValue": "",
"expression": "",
"matchType": "",
"type": ""
}
],
"useEventValue": false
},
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"profileId": "",
"selfLink": "",
"type": "",
"updated": "",
"urlDestinationDetails": {
"caseSensitive": false,
"firstStepRequired": false,
"matchType": "",
"steps": [
{
"name": "",
"number": 0,
"url": ""
}
],
"url": ""
},
"value": "",
"visitNumPagesDetails": {
"comparisonType": "",
"comparisonValue": ""
},
"visitTimeOnSiteDetails": {
"comparisonType": "",
"comparisonValue": ""
},
"webPropertyId": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals/:goalId' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"accountId": "",
"active": false,
"created": "",
"eventDetails": {
"eventConditions": [
{
"comparisonType": "",
"comparisonValue": "",
"expression": "",
"matchType": "",
"type": ""
}
],
"useEventValue": false
},
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"profileId": "",
"selfLink": "",
"type": "",
"updated": "",
"urlDestinationDetails": {
"caseSensitive": false,
"firstStepRequired": false,
"matchType": "",
"steps": [
{
"name": "",
"number": 0,
"url": ""
}
],
"url": ""
},
"value": "",
"visitNumPagesDetails": {
"comparisonType": "",
"comparisonValue": ""
},
"visitTimeOnSiteDetails": {
"comparisonType": "",
"comparisonValue": ""
},
"webPropertyId": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"accountId\": \"\",\n \"active\": false,\n \"created\": \"\",\n \"eventDetails\": {\n \"eventConditions\": [\n {\n \"comparisonType\": \"\",\n \"comparisonValue\": \"\",\n \"expression\": \"\",\n \"matchType\": \"\",\n \"type\": \"\"\n }\n ],\n \"useEventValue\": false\n },\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"profileId\": \"\",\n \"selfLink\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"urlDestinationDetails\": {\n \"caseSensitive\": false,\n \"firstStepRequired\": false,\n \"matchType\": \"\",\n \"steps\": [\n {\n \"name\": \"\",\n \"number\": 0,\n \"url\": \"\"\n }\n ],\n \"url\": \"\"\n },\n \"value\": \"\",\n \"visitNumPagesDetails\": {\n \"comparisonType\": \"\",\n \"comparisonValue\": \"\"\n },\n \"visitTimeOnSiteDetails\": {\n \"comparisonType\": \"\",\n \"comparisonValue\": \"\"\n },\n \"webPropertyId\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("PATCH", "/baseUrl/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals/:goalId", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals/:goalId"
payload = {
"accountId": "",
"active": False,
"created": "",
"eventDetails": {
"eventConditions": [
{
"comparisonType": "",
"comparisonValue": "",
"expression": "",
"matchType": "",
"type": ""
}
],
"useEventValue": False
},
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"profileId": "",
"selfLink": "",
"type": "",
"updated": "",
"urlDestinationDetails": {
"caseSensitive": False,
"firstStepRequired": False,
"matchType": "",
"steps": [
{
"name": "",
"number": 0,
"url": ""
}
],
"url": ""
},
"value": "",
"visitNumPagesDetails": {
"comparisonType": "",
"comparisonValue": ""
},
"visitTimeOnSiteDetails": {
"comparisonType": "",
"comparisonValue": ""
},
"webPropertyId": ""
}
headers = {"content-type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals/:goalId"
payload <- "{\n \"accountId\": \"\",\n \"active\": false,\n \"created\": \"\",\n \"eventDetails\": {\n \"eventConditions\": [\n {\n \"comparisonType\": \"\",\n \"comparisonValue\": \"\",\n \"expression\": \"\",\n \"matchType\": \"\",\n \"type\": \"\"\n }\n ],\n \"useEventValue\": false\n },\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"profileId\": \"\",\n \"selfLink\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"urlDestinationDetails\": {\n \"caseSensitive\": false,\n \"firstStepRequired\": false,\n \"matchType\": \"\",\n \"steps\": [\n {\n \"name\": \"\",\n \"number\": 0,\n \"url\": \"\"\n }\n ],\n \"url\": \"\"\n },\n \"value\": \"\",\n \"visitNumPagesDetails\": {\n \"comparisonType\": \"\",\n \"comparisonValue\": \"\"\n },\n \"visitTimeOnSiteDetails\": {\n \"comparisonType\": \"\",\n \"comparisonValue\": \"\"\n },\n \"webPropertyId\": \"\"\n}"
encode <- "json"
response <- VERB("PATCH", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals/:goalId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"accountId\": \"\",\n \"active\": false,\n \"created\": \"\",\n \"eventDetails\": {\n \"eventConditions\": [\n {\n \"comparisonType\": \"\",\n \"comparisonValue\": \"\",\n \"expression\": \"\",\n \"matchType\": \"\",\n \"type\": \"\"\n }\n ],\n \"useEventValue\": false\n },\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"profileId\": \"\",\n \"selfLink\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"urlDestinationDetails\": {\n \"caseSensitive\": false,\n \"firstStepRequired\": false,\n \"matchType\": \"\",\n \"steps\": [\n {\n \"name\": \"\",\n \"number\": 0,\n \"url\": \"\"\n }\n ],\n \"url\": \"\"\n },\n \"value\": \"\",\n \"visitNumPagesDetails\": {\n \"comparisonType\": \"\",\n \"comparisonValue\": \"\"\n },\n \"visitTimeOnSiteDetails\": {\n \"comparisonType\": \"\",\n \"comparisonValue\": \"\"\n },\n \"webPropertyId\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.patch('/baseUrl/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals/:goalId') do |req|
req.body = "{\n \"accountId\": \"\",\n \"active\": false,\n \"created\": \"\",\n \"eventDetails\": {\n \"eventConditions\": [\n {\n \"comparisonType\": \"\",\n \"comparisonValue\": \"\",\n \"expression\": \"\",\n \"matchType\": \"\",\n \"type\": \"\"\n }\n ],\n \"useEventValue\": false\n },\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"profileId\": \"\",\n \"selfLink\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"urlDestinationDetails\": {\n \"caseSensitive\": false,\n \"firstStepRequired\": false,\n \"matchType\": \"\",\n \"steps\": [\n {\n \"name\": \"\",\n \"number\": 0,\n \"url\": \"\"\n }\n ],\n \"url\": \"\"\n },\n \"value\": \"\",\n \"visitNumPagesDetails\": {\n \"comparisonType\": \"\",\n \"comparisonValue\": \"\"\n },\n \"visitTimeOnSiteDetails\": {\n \"comparisonType\": \"\",\n \"comparisonValue\": \"\"\n },\n \"webPropertyId\": \"\"\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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals/:goalId";
let payload = json!({
"accountId": "",
"active": false,
"created": "",
"eventDetails": json!({
"eventConditions": (
json!({
"comparisonType": "",
"comparisonValue": "",
"expression": "",
"matchType": "",
"type": ""
})
),
"useEventValue": false
}),
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"parentLink": json!({
"href": "",
"type": ""
}),
"profileId": "",
"selfLink": "",
"type": "",
"updated": "",
"urlDestinationDetails": json!({
"caseSensitive": false,
"firstStepRequired": false,
"matchType": "",
"steps": (
json!({
"name": "",
"number": 0,
"url": ""
})
),
"url": ""
}),
"value": "",
"visitNumPagesDetails": json!({
"comparisonType": "",
"comparisonValue": ""
}),
"visitTimeOnSiteDetails": json!({
"comparisonType": "",
"comparisonValue": ""
}),
"webPropertyId": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PATCH").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PATCH \
--url {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals/:goalId \
--header 'content-type: application/json' \
--data '{
"accountId": "",
"active": false,
"created": "",
"eventDetails": {
"eventConditions": [
{
"comparisonType": "",
"comparisonValue": "",
"expression": "",
"matchType": "",
"type": ""
}
],
"useEventValue": false
},
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"profileId": "",
"selfLink": "",
"type": "",
"updated": "",
"urlDestinationDetails": {
"caseSensitive": false,
"firstStepRequired": false,
"matchType": "",
"steps": [
{
"name": "",
"number": 0,
"url": ""
}
],
"url": ""
},
"value": "",
"visitNumPagesDetails": {
"comparisonType": "",
"comparisonValue": ""
},
"visitTimeOnSiteDetails": {
"comparisonType": "",
"comparisonValue": ""
},
"webPropertyId": ""
}'
echo '{
"accountId": "",
"active": false,
"created": "",
"eventDetails": {
"eventConditions": [
{
"comparisonType": "",
"comparisonValue": "",
"expression": "",
"matchType": "",
"type": ""
}
],
"useEventValue": false
},
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"profileId": "",
"selfLink": "",
"type": "",
"updated": "",
"urlDestinationDetails": {
"caseSensitive": false,
"firstStepRequired": false,
"matchType": "",
"steps": [
{
"name": "",
"number": 0,
"url": ""
}
],
"url": ""
},
"value": "",
"visitNumPagesDetails": {
"comparisonType": "",
"comparisonValue": ""
},
"visitTimeOnSiteDetails": {
"comparisonType": "",
"comparisonValue": ""
},
"webPropertyId": ""
}' | \
http PATCH {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals/:goalId \
content-type:application/json
wget --quiet \
--method PATCH \
--header 'content-type: application/json' \
--body-data '{\n "accountId": "",\n "active": false,\n "created": "",\n "eventDetails": {\n "eventConditions": [\n {\n "comparisonType": "",\n "comparisonValue": "",\n "expression": "",\n "matchType": "",\n "type": ""\n }\n ],\n "useEventValue": false\n },\n "id": "",\n "internalWebPropertyId": "",\n "kind": "",\n "name": "",\n "parentLink": {\n "href": "",\n "type": ""\n },\n "profileId": "",\n "selfLink": "",\n "type": "",\n "updated": "",\n "urlDestinationDetails": {\n "caseSensitive": false,\n "firstStepRequired": false,\n "matchType": "",\n "steps": [\n {\n "name": "",\n "number": 0,\n "url": ""\n }\n ],\n "url": ""\n },\n "value": "",\n "visitNumPagesDetails": {\n "comparisonType": "",\n "comparisonValue": ""\n },\n "visitTimeOnSiteDetails": {\n "comparisonType": "",\n "comparisonValue": ""\n },\n "webPropertyId": ""\n}' \
--output-document \
- {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals/:goalId
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"accountId": "",
"active": false,
"created": "",
"eventDetails": [
"eventConditions": [
[
"comparisonType": "",
"comparisonValue": "",
"expression": "",
"matchType": "",
"type": ""
]
],
"useEventValue": false
],
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"parentLink": [
"href": "",
"type": ""
],
"profileId": "",
"selfLink": "",
"type": "",
"updated": "",
"urlDestinationDetails": [
"caseSensitive": false,
"firstStepRequired": false,
"matchType": "",
"steps": [
[
"name": "",
"number": 0,
"url": ""
]
],
"url": ""
],
"value": "",
"visitNumPagesDetails": [
"comparisonType": "",
"comparisonValue": ""
],
"visitTimeOnSiteDetails": [
"comparisonType": "",
"comparisonValue": ""
],
"webPropertyId": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals/:goalId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PUT
analytics.management.goals.update
{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals/:goalId
QUERY PARAMS
accountId
webPropertyId
profileId
goalId
BODY json
{
"accountId": "",
"active": false,
"created": "",
"eventDetails": {
"eventConditions": [
{
"comparisonType": "",
"comparisonValue": "",
"expression": "",
"matchType": "",
"type": ""
}
],
"useEventValue": false
},
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"profileId": "",
"selfLink": "",
"type": "",
"updated": "",
"urlDestinationDetails": {
"caseSensitive": false,
"firstStepRequired": false,
"matchType": "",
"steps": [
{
"name": "",
"number": 0,
"url": ""
}
],
"url": ""
},
"value": "",
"visitNumPagesDetails": {
"comparisonType": "",
"comparisonValue": ""
},
"visitTimeOnSiteDetails": {
"comparisonType": "",
"comparisonValue": ""
},
"webPropertyId": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals/:goalId");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"accountId\": \"\",\n \"active\": false,\n \"created\": \"\",\n \"eventDetails\": {\n \"eventConditions\": [\n {\n \"comparisonType\": \"\",\n \"comparisonValue\": \"\",\n \"expression\": \"\",\n \"matchType\": \"\",\n \"type\": \"\"\n }\n ],\n \"useEventValue\": false\n },\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"profileId\": \"\",\n \"selfLink\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"urlDestinationDetails\": {\n \"caseSensitive\": false,\n \"firstStepRequired\": false,\n \"matchType\": \"\",\n \"steps\": [\n {\n \"name\": \"\",\n \"number\": 0,\n \"url\": \"\"\n }\n ],\n \"url\": \"\"\n },\n \"value\": \"\",\n \"visitNumPagesDetails\": {\n \"comparisonType\": \"\",\n \"comparisonValue\": \"\"\n },\n \"visitTimeOnSiteDetails\": {\n \"comparisonType\": \"\",\n \"comparisonValue\": \"\"\n },\n \"webPropertyId\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals/:goalId" {:content-type :json
:form-params {:accountId ""
:active false
:created ""
:eventDetails {:eventConditions [{:comparisonType ""
:comparisonValue ""
:expression ""
:matchType ""
:type ""}]
:useEventValue false}
:id ""
:internalWebPropertyId ""
:kind ""
:name ""
:parentLink {:href ""
:type ""}
:profileId ""
:selfLink ""
:type ""
:updated ""
:urlDestinationDetails {:caseSensitive false
:firstStepRequired false
:matchType ""
:steps [{:name ""
:number 0
:url ""}]
:url ""}
:value ""
:visitNumPagesDetails {:comparisonType ""
:comparisonValue ""}
:visitTimeOnSiteDetails {:comparisonType ""
:comparisonValue ""}
:webPropertyId ""}})
require "http/client"
url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals/:goalId"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"accountId\": \"\",\n \"active\": false,\n \"created\": \"\",\n \"eventDetails\": {\n \"eventConditions\": [\n {\n \"comparisonType\": \"\",\n \"comparisonValue\": \"\",\n \"expression\": \"\",\n \"matchType\": \"\",\n \"type\": \"\"\n }\n ],\n \"useEventValue\": false\n },\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"profileId\": \"\",\n \"selfLink\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"urlDestinationDetails\": {\n \"caseSensitive\": false,\n \"firstStepRequired\": false,\n \"matchType\": \"\",\n \"steps\": [\n {\n \"name\": \"\",\n \"number\": 0,\n \"url\": \"\"\n }\n ],\n \"url\": \"\"\n },\n \"value\": \"\",\n \"visitNumPagesDetails\": {\n \"comparisonType\": \"\",\n \"comparisonValue\": \"\"\n },\n \"visitTimeOnSiteDetails\": {\n \"comparisonType\": \"\",\n \"comparisonValue\": \"\"\n },\n \"webPropertyId\": \"\"\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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals/:goalId"),
Content = new StringContent("{\n \"accountId\": \"\",\n \"active\": false,\n \"created\": \"\",\n \"eventDetails\": {\n \"eventConditions\": [\n {\n \"comparisonType\": \"\",\n \"comparisonValue\": \"\",\n \"expression\": \"\",\n \"matchType\": \"\",\n \"type\": \"\"\n }\n ],\n \"useEventValue\": false\n },\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"profileId\": \"\",\n \"selfLink\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"urlDestinationDetails\": {\n \"caseSensitive\": false,\n \"firstStepRequired\": false,\n \"matchType\": \"\",\n \"steps\": [\n {\n \"name\": \"\",\n \"number\": 0,\n \"url\": \"\"\n }\n ],\n \"url\": \"\"\n },\n \"value\": \"\",\n \"visitNumPagesDetails\": {\n \"comparisonType\": \"\",\n \"comparisonValue\": \"\"\n },\n \"visitTimeOnSiteDetails\": {\n \"comparisonType\": \"\",\n \"comparisonValue\": \"\"\n },\n \"webPropertyId\": \"\"\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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals/:goalId");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"accountId\": \"\",\n \"active\": false,\n \"created\": \"\",\n \"eventDetails\": {\n \"eventConditions\": [\n {\n \"comparisonType\": \"\",\n \"comparisonValue\": \"\",\n \"expression\": \"\",\n \"matchType\": \"\",\n \"type\": \"\"\n }\n ],\n \"useEventValue\": false\n },\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"profileId\": \"\",\n \"selfLink\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"urlDestinationDetails\": {\n \"caseSensitive\": false,\n \"firstStepRequired\": false,\n \"matchType\": \"\",\n \"steps\": [\n {\n \"name\": \"\",\n \"number\": 0,\n \"url\": \"\"\n }\n ],\n \"url\": \"\"\n },\n \"value\": \"\",\n \"visitNumPagesDetails\": {\n \"comparisonType\": \"\",\n \"comparisonValue\": \"\"\n },\n \"visitTimeOnSiteDetails\": {\n \"comparisonType\": \"\",\n \"comparisonValue\": \"\"\n },\n \"webPropertyId\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals/:goalId"
payload := strings.NewReader("{\n \"accountId\": \"\",\n \"active\": false,\n \"created\": \"\",\n \"eventDetails\": {\n \"eventConditions\": [\n {\n \"comparisonType\": \"\",\n \"comparisonValue\": \"\",\n \"expression\": \"\",\n \"matchType\": \"\",\n \"type\": \"\"\n }\n ],\n \"useEventValue\": false\n },\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"profileId\": \"\",\n \"selfLink\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"urlDestinationDetails\": {\n \"caseSensitive\": false,\n \"firstStepRequired\": false,\n \"matchType\": \"\",\n \"steps\": [\n {\n \"name\": \"\",\n \"number\": 0,\n \"url\": \"\"\n }\n ],\n \"url\": \"\"\n },\n \"value\": \"\",\n \"visitNumPagesDetails\": {\n \"comparisonType\": \"\",\n \"comparisonValue\": \"\"\n },\n \"visitTimeOnSiteDetails\": {\n \"comparisonType\": \"\",\n \"comparisonValue\": \"\"\n },\n \"webPropertyId\": \"\"\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/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals/:goalId HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 917
{
"accountId": "",
"active": false,
"created": "",
"eventDetails": {
"eventConditions": [
{
"comparisonType": "",
"comparisonValue": "",
"expression": "",
"matchType": "",
"type": ""
}
],
"useEventValue": false
},
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"profileId": "",
"selfLink": "",
"type": "",
"updated": "",
"urlDestinationDetails": {
"caseSensitive": false,
"firstStepRequired": false,
"matchType": "",
"steps": [
{
"name": "",
"number": 0,
"url": ""
}
],
"url": ""
},
"value": "",
"visitNumPagesDetails": {
"comparisonType": "",
"comparisonValue": ""
},
"visitTimeOnSiteDetails": {
"comparisonType": "",
"comparisonValue": ""
},
"webPropertyId": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals/:goalId")
.setHeader("content-type", "application/json")
.setBody("{\n \"accountId\": \"\",\n \"active\": false,\n \"created\": \"\",\n \"eventDetails\": {\n \"eventConditions\": [\n {\n \"comparisonType\": \"\",\n \"comparisonValue\": \"\",\n \"expression\": \"\",\n \"matchType\": \"\",\n \"type\": \"\"\n }\n ],\n \"useEventValue\": false\n },\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"profileId\": \"\",\n \"selfLink\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"urlDestinationDetails\": {\n \"caseSensitive\": false,\n \"firstStepRequired\": false,\n \"matchType\": \"\",\n \"steps\": [\n {\n \"name\": \"\",\n \"number\": 0,\n \"url\": \"\"\n }\n ],\n \"url\": \"\"\n },\n \"value\": \"\",\n \"visitNumPagesDetails\": {\n \"comparisonType\": \"\",\n \"comparisonValue\": \"\"\n },\n \"visitTimeOnSiteDetails\": {\n \"comparisonType\": \"\",\n \"comparisonValue\": \"\"\n },\n \"webPropertyId\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals/:goalId"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"accountId\": \"\",\n \"active\": false,\n \"created\": \"\",\n \"eventDetails\": {\n \"eventConditions\": [\n {\n \"comparisonType\": \"\",\n \"comparisonValue\": \"\",\n \"expression\": \"\",\n \"matchType\": \"\",\n \"type\": \"\"\n }\n ],\n \"useEventValue\": false\n },\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"profileId\": \"\",\n \"selfLink\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"urlDestinationDetails\": {\n \"caseSensitive\": false,\n \"firstStepRequired\": false,\n \"matchType\": \"\",\n \"steps\": [\n {\n \"name\": \"\",\n \"number\": 0,\n \"url\": \"\"\n }\n ],\n \"url\": \"\"\n },\n \"value\": \"\",\n \"visitNumPagesDetails\": {\n \"comparisonType\": \"\",\n \"comparisonValue\": \"\"\n },\n \"visitTimeOnSiteDetails\": {\n \"comparisonType\": \"\",\n \"comparisonValue\": \"\"\n },\n \"webPropertyId\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"accountId\": \"\",\n \"active\": false,\n \"created\": \"\",\n \"eventDetails\": {\n \"eventConditions\": [\n {\n \"comparisonType\": \"\",\n \"comparisonValue\": \"\",\n \"expression\": \"\",\n \"matchType\": \"\",\n \"type\": \"\"\n }\n ],\n \"useEventValue\": false\n },\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"profileId\": \"\",\n \"selfLink\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"urlDestinationDetails\": {\n \"caseSensitive\": false,\n \"firstStepRequired\": false,\n \"matchType\": \"\",\n \"steps\": [\n {\n \"name\": \"\",\n \"number\": 0,\n \"url\": \"\"\n }\n ],\n \"url\": \"\"\n },\n \"value\": \"\",\n \"visitNumPagesDetails\": {\n \"comparisonType\": \"\",\n \"comparisonValue\": \"\"\n },\n \"visitTimeOnSiteDetails\": {\n \"comparisonType\": \"\",\n \"comparisonValue\": \"\"\n },\n \"webPropertyId\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals/:goalId")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals/:goalId")
.header("content-type", "application/json")
.body("{\n \"accountId\": \"\",\n \"active\": false,\n \"created\": \"\",\n \"eventDetails\": {\n \"eventConditions\": [\n {\n \"comparisonType\": \"\",\n \"comparisonValue\": \"\",\n \"expression\": \"\",\n \"matchType\": \"\",\n \"type\": \"\"\n }\n ],\n \"useEventValue\": false\n },\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"profileId\": \"\",\n \"selfLink\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"urlDestinationDetails\": {\n \"caseSensitive\": false,\n \"firstStepRequired\": false,\n \"matchType\": \"\",\n \"steps\": [\n {\n \"name\": \"\",\n \"number\": 0,\n \"url\": \"\"\n }\n ],\n \"url\": \"\"\n },\n \"value\": \"\",\n \"visitNumPagesDetails\": {\n \"comparisonType\": \"\",\n \"comparisonValue\": \"\"\n },\n \"visitTimeOnSiteDetails\": {\n \"comparisonType\": \"\",\n \"comparisonValue\": \"\"\n },\n \"webPropertyId\": \"\"\n}")
.asString();
const data = JSON.stringify({
accountId: '',
active: false,
created: '',
eventDetails: {
eventConditions: [
{
comparisonType: '',
comparisonValue: '',
expression: '',
matchType: '',
type: ''
}
],
useEventValue: false
},
id: '',
internalWebPropertyId: '',
kind: '',
name: '',
parentLink: {
href: '',
type: ''
},
profileId: '',
selfLink: '',
type: '',
updated: '',
urlDestinationDetails: {
caseSensitive: false,
firstStepRequired: false,
matchType: '',
steps: [
{
name: '',
number: 0,
url: ''
}
],
url: ''
},
value: '',
visitNumPagesDetails: {
comparisonType: '',
comparisonValue: ''
},
visitTimeOnSiteDetails: {
comparisonType: '',
comparisonValue: ''
},
webPropertyId: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals/:goalId');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals/:goalId',
headers: {'content-type': 'application/json'},
data: {
accountId: '',
active: false,
created: '',
eventDetails: {
eventConditions: [
{
comparisonType: '',
comparisonValue: '',
expression: '',
matchType: '',
type: ''
}
],
useEventValue: false
},
id: '',
internalWebPropertyId: '',
kind: '',
name: '',
parentLink: {href: '', type: ''},
profileId: '',
selfLink: '',
type: '',
updated: '',
urlDestinationDetails: {
caseSensitive: false,
firstStepRequired: false,
matchType: '',
steps: [{name: '', number: 0, url: ''}],
url: ''
},
value: '',
visitNumPagesDetails: {comparisonType: '', comparisonValue: ''},
visitTimeOnSiteDetails: {comparisonType: '', comparisonValue: ''},
webPropertyId: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals/:goalId';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"accountId":"","active":false,"created":"","eventDetails":{"eventConditions":[{"comparisonType":"","comparisonValue":"","expression":"","matchType":"","type":""}],"useEventValue":false},"id":"","internalWebPropertyId":"","kind":"","name":"","parentLink":{"href":"","type":""},"profileId":"","selfLink":"","type":"","updated":"","urlDestinationDetails":{"caseSensitive":false,"firstStepRequired":false,"matchType":"","steps":[{"name":"","number":0,"url":""}],"url":""},"value":"","visitNumPagesDetails":{"comparisonType":"","comparisonValue":""},"visitTimeOnSiteDetails":{"comparisonType":"","comparisonValue":""},"webPropertyId":""}'
};
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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals/:goalId',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "accountId": "",\n "active": false,\n "created": "",\n "eventDetails": {\n "eventConditions": [\n {\n "comparisonType": "",\n "comparisonValue": "",\n "expression": "",\n "matchType": "",\n "type": ""\n }\n ],\n "useEventValue": false\n },\n "id": "",\n "internalWebPropertyId": "",\n "kind": "",\n "name": "",\n "parentLink": {\n "href": "",\n "type": ""\n },\n "profileId": "",\n "selfLink": "",\n "type": "",\n "updated": "",\n "urlDestinationDetails": {\n "caseSensitive": false,\n "firstStepRequired": false,\n "matchType": "",\n "steps": [\n {\n "name": "",\n "number": 0,\n "url": ""\n }\n ],\n "url": ""\n },\n "value": "",\n "visitNumPagesDetails": {\n "comparisonType": "",\n "comparisonValue": ""\n },\n "visitTimeOnSiteDetails": {\n "comparisonType": "",\n "comparisonValue": ""\n },\n "webPropertyId": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"accountId\": \"\",\n \"active\": false,\n \"created\": \"\",\n \"eventDetails\": {\n \"eventConditions\": [\n {\n \"comparisonType\": \"\",\n \"comparisonValue\": \"\",\n \"expression\": \"\",\n \"matchType\": \"\",\n \"type\": \"\"\n }\n ],\n \"useEventValue\": false\n },\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"profileId\": \"\",\n \"selfLink\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"urlDestinationDetails\": {\n \"caseSensitive\": false,\n \"firstStepRequired\": false,\n \"matchType\": \"\",\n \"steps\": [\n {\n \"name\": \"\",\n \"number\": 0,\n \"url\": \"\"\n }\n ],\n \"url\": \"\"\n },\n \"value\": \"\",\n \"visitNumPagesDetails\": {\n \"comparisonType\": \"\",\n \"comparisonValue\": \"\"\n },\n \"visitTimeOnSiteDetails\": {\n \"comparisonType\": \"\",\n \"comparisonValue\": \"\"\n },\n \"webPropertyId\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals/:goalId")
.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/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals/:goalId',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
accountId: '',
active: false,
created: '',
eventDetails: {
eventConditions: [
{
comparisonType: '',
comparisonValue: '',
expression: '',
matchType: '',
type: ''
}
],
useEventValue: false
},
id: '',
internalWebPropertyId: '',
kind: '',
name: '',
parentLink: {href: '', type: ''},
profileId: '',
selfLink: '',
type: '',
updated: '',
urlDestinationDetails: {
caseSensitive: false,
firstStepRequired: false,
matchType: '',
steps: [{name: '', number: 0, url: ''}],
url: ''
},
value: '',
visitNumPagesDetails: {comparisonType: '', comparisonValue: ''},
visitTimeOnSiteDetails: {comparisonType: '', comparisonValue: ''},
webPropertyId: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals/:goalId',
headers: {'content-type': 'application/json'},
body: {
accountId: '',
active: false,
created: '',
eventDetails: {
eventConditions: [
{
comparisonType: '',
comparisonValue: '',
expression: '',
matchType: '',
type: ''
}
],
useEventValue: false
},
id: '',
internalWebPropertyId: '',
kind: '',
name: '',
parentLink: {href: '', type: ''},
profileId: '',
selfLink: '',
type: '',
updated: '',
urlDestinationDetails: {
caseSensitive: false,
firstStepRequired: false,
matchType: '',
steps: [{name: '', number: 0, url: ''}],
url: ''
},
value: '',
visitNumPagesDetails: {comparisonType: '', comparisonValue: ''},
visitTimeOnSiteDetails: {comparisonType: '', comparisonValue: ''},
webPropertyId: ''
},
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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals/:goalId');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
accountId: '',
active: false,
created: '',
eventDetails: {
eventConditions: [
{
comparisonType: '',
comparisonValue: '',
expression: '',
matchType: '',
type: ''
}
],
useEventValue: false
},
id: '',
internalWebPropertyId: '',
kind: '',
name: '',
parentLink: {
href: '',
type: ''
},
profileId: '',
selfLink: '',
type: '',
updated: '',
urlDestinationDetails: {
caseSensitive: false,
firstStepRequired: false,
matchType: '',
steps: [
{
name: '',
number: 0,
url: ''
}
],
url: ''
},
value: '',
visitNumPagesDetails: {
comparisonType: '',
comparisonValue: ''
},
visitTimeOnSiteDetails: {
comparisonType: '',
comparisonValue: ''
},
webPropertyId: ''
});
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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals/:goalId',
headers: {'content-type': 'application/json'},
data: {
accountId: '',
active: false,
created: '',
eventDetails: {
eventConditions: [
{
comparisonType: '',
comparisonValue: '',
expression: '',
matchType: '',
type: ''
}
],
useEventValue: false
},
id: '',
internalWebPropertyId: '',
kind: '',
name: '',
parentLink: {href: '', type: ''},
profileId: '',
selfLink: '',
type: '',
updated: '',
urlDestinationDetails: {
caseSensitive: false,
firstStepRequired: false,
matchType: '',
steps: [{name: '', number: 0, url: ''}],
url: ''
},
value: '',
visitNumPagesDetails: {comparisonType: '', comparisonValue: ''},
visitTimeOnSiteDetails: {comparisonType: '', comparisonValue: ''},
webPropertyId: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals/:goalId';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"accountId":"","active":false,"created":"","eventDetails":{"eventConditions":[{"comparisonType":"","comparisonValue":"","expression":"","matchType":"","type":""}],"useEventValue":false},"id":"","internalWebPropertyId":"","kind":"","name":"","parentLink":{"href":"","type":""},"profileId":"","selfLink":"","type":"","updated":"","urlDestinationDetails":{"caseSensitive":false,"firstStepRequired":false,"matchType":"","steps":[{"name":"","number":0,"url":""}],"url":""},"value":"","visitNumPagesDetails":{"comparisonType":"","comparisonValue":""},"visitTimeOnSiteDetails":{"comparisonType":"","comparisonValue":""},"webPropertyId":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"accountId": @"",
@"active": @NO,
@"created": @"",
@"eventDetails": @{ @"eventConditions": @[ @{ @"comparisonType": @"", @"comparisonValue": @"", @"expression": @"", @"matchType": @"", @"type": @"" } ], @"useEventValue": @NO },
@"id": @"",
@"internalWebPropertyId": @"",
@"kind": @"",
@"name": @"",
@"parentLink": @{ @"href": @"", @"type": @"" },
@"profileId": @"",
@"selfLink": @"",
@"type": @"",
@"updated": @"",
@"urlDestinationDetails": @{ @"caseSensitive": @NO, @"firstStepRequired": @NO, @"matchType": @"", @"steps": @[ @{ @"name": @"", @"number": @0, @"url": @"" } ], @"url": @"" },
@"value": @"",
@"visitNumPagesDetails": @{ @"comparisonType": @"", @"comparisonValue": @"" },
@"visitTimeOnSiteDetails": @{ @"comparisonType": @"", @"comparisonValue": @"" },
@"webPropertyId": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals/:goalId"]
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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals/:goalId" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"accountId\": \"\",\n \"active\": false,\n \"created\": \"\",\n \"eventDetails\": {\n \"eventConditions\": [\n {\n \"comparisonType\": \"\",\n \"comparisonValue\": \"\",\n \"expression\": \"\",\n \"matchType\": \"\",\n \"type\": \"\"\n }\n ],\n \"useEventValue\": false\n },\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"profileId\": \"\",\n \"selfLink\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"urlDestinationDetails\": {\n \"caseSensitive\": false,\n \"firstStepRequired\": false,\n \"matchType\": \"\",\n \"steps\": [\n {\n \"name\": \"\",\n \"number\": 0,\n \"url\": \"\"\n }\n ],\n \"url\": \"\"\n },\n \"value\": \"\",\n \"visitNumPagesDetails\": {\n \"comparisonType\": \"\",\n \"comparisonValue\": \"\"\n },\n \"visitTimeOnSiteDetails\": {\n \"comparisonType\": \"\",\n \"comparisonValue\": \"\"\n },\n \"webPropertyId\": \"\"\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals/:goalId",
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([
'accountId' => '',
'active' => null,
'created' => '',
'eventDetails' => [
'eventConditions' => [
[
'comparisonType' => '',
'comparisonValue' => '',
'expression' => '',
'matchType' => '',
'type' => ''
]
],
'useEventValue' => null
],
'id' => '',
'internalWebPropertyId' => '',
'kind' => '',
'name' => '',
'parentLink' => [
'href' => '',
'type' => ''
],
'profileId' => '',
'selfLink' => '',
'type' => '',
'updated' => '',
'urlDestinationDetails' => [
'caseSensitive' => null,
'firstStepRequired' => null,
'matchType' => '',
'steps' => [
[
'name' => '',
'number' => 0,
'url' => ''
]
],
'url' => ''
],
'value' => '',
'visitNumPagesDetails' => [
'comparisonType' => '',
'comparisonValue' => ''
],
'visitTimeOnSiteDetails' => [
'comparisonType' => '',
'comparisonValue' => ''
],
'webPropertyId' => ''
]),
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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals/:goalId', [
'body' => '{
"accountId": "",
"active": false,
"created": "",
"eventDetails": {
"eventConditions": [
{
"comparisonType": "",
"comparisonValue": "",
"expression": "",
"matchType": "",
"type": ""
}
],
"useEventValue": false
},
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"profileId": "",
"selfLink": "",
"type": "",
"updated": "",
"urlDestinationDetails": {
"caseSensitive": false,
"firstStepRequired": false,
"matchType": "",
"steps": [
{
"name": "",
"number": 0,
"url": ""
}
],
"url": ""
},
"value": "",
"visitNumPagesDetails": {
"comparisonType": "",
"comparisonValue": ""
},
"visitTimeOnSiteDetails": {
"comparisonType": "",
"comparisonValue": ""
},
"webPropertyId": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals/:goalId');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'accountId' => '',
'active' => null,
'created' => '',
'eventDetails' => [
'eventConditions' => [
[
'comparisonType' => '',
'comparisonValue' => '',
'expression' => '',
'matchType' => '',
'type' => ''
]
],
'useEventValue' => null
],
'id' => '',
'internalWebPropertyId' => '',
'kind' => '',
'name' => '',
'parentLink' => [
'href' => '',
'type' => ''
],
'profileId' => '',
'selfLink' => '',
'type' => '',
'updated' => '',
'urlDestinationDetails' => [
'caseSensitive' => null,
'firstStepRequired' => null,
'matchType' => '',
'steps' => [
[
'name' => '',
'number' => 0,
'url' => ''
]
],
'url' => ''
],
'value' => '',
'visitNumPagesDetails' => [
'comparisonType' => '',
'comparisonValue' => ''
],
'visitTimeOnSiteDetails' => [
'comparisonType' => '',
'comparisonValue' => ''
],
'webPropertyId' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'accountId' => '',
'active' => null,
'created' => '',
'eventDetails' => [
'eventConditions' => [
[
'comparisonType' => '',
'comparisonValue' => '',
'expression' => '',
'matchType' => '',
'type' => ''
]
],
'useEventValue' => null
],
'id' => '',
'internalWebPropertyId' => '',
'kind' => '',
'name' => '',
'parentLink' => [
'href' => '',
'type' => ''
],
'profileId' => '',
'selfLink' => '',
'type' => '',
'updated' => '',
'urlDestinationDetails' => [
'caseSensitive' => null,
'firstStepRequired' => null,
'matchType' => '',
'steps' => [
[
'name' => '',
'number' => 0,
'url' => ''
]
],
'url' => ''
],
'value' => '',
'visitNumPagesDetails' => [
'comparisonType' => '',
'comparisonValue' => ''
],
'visitTimeOnSiteDetails' => [
'comparisonType' => '',
'comparisonValue' => ''
],
'webPropertyId' => ''
]));
$request->setRequestUrl('{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals/:goalId');
$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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals/:goalId' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"accountId": "",
"active": false,
"created": "",
"eventDetails": {
"eventConditions": [
{
"comparisonType": "",
"comparisonValue": "",
"expression": "",
"matchType": "",
"type": ""
}
],
"useEventValue": false
},
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"profileId": "",
"selfLink": "",
"type": "",
"updated": "",
"urlDestinationDetails": {
"caseSensitive": false,
"firstStepRequired": false,
"matchType": "",
"steps": [
{
"name": "",
"number": 0,
"url": ""
}
],
"url": ""
},
"value": "",
"visitNumPagesDetails": {
"comparisonType": "",
"comparisonValue": ""
},
"visitTimeOnSiteDetails": {
"comparisonType": "",
"comparisonValue": ""
},
"webPropertyId": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals/:goalId' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"accountId": "",
"active": false,
"created": "",
"eventDetails": {
"eventConditions": [
{
"comparisonType": "",
"comparisonValue": "",
"expression": "",
"matchType": "",
"type": ""
}
],
"useEventValue": false
},
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"profileId": "",
"selfLink": "",
"type": "",
"updated": "",
"urlDestinationDetails": {
"caseSensitive": false,
"firstStepRequired": false,
"matchType": "",
"steps": [
{
"name": "",
"number": 0,
"url": ""
}
],
"url": ""
},
"value": "",
"visitNumPagesDetails": {
"comparisonType": "",
"comparisonValue": ""
},
"visitTimeOnSiteDetails": {
"comparisonType": "",
"comparisonValue": ""
},
"webPropertyId": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"accountId\": \"\",\n \"active\": false,\n \"created\": \"\",\n \"eventDetails\": {\n \"eventConditions\": [\n {\n \"comparisonType\": \"\",\n \"comparisonValue\": \"\",\n \"expression\": \"\",\n \"matchType\": \"\",\n \"type\": \"\"\n }\n ],\n \"useEventValue\": false\n },\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"profileId\": \"\",\n \"selfLink\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"urlDestinationDetails\": {\n \"caseSensitive\": false,\n \"firstStepRequired\": false,\n \"matchType\": \"\",\n \"steps\": [\n {\n \"name\": \"\",\n \"number\": 0,\n \"url\": \"\"\n }\n ],\n \"url\": \"\"\n },\n \"value\": \"\",\n \"visitNumPagesDetails\": {\n \"comparisonType\": \"\",\n \"comparisonValue\": \"\"\n },\n \"visitTimeOnSiteDetails\": {\n \"comparisonType\": \"\",\n \"comparisonValue\": \"\"\n },\n \"webPropertyId\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals/:goalId", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals/:goalId"
payload = {
"accountId": "",
"active": False,
"created": "",
"eventDetails": {
"eventConditions": [
{
"comparisonType": "",
"comparisonValue": "",
"expression": "",
"matchType": "",
"type": ""
}
],
"useEventValue": False
},
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"profileId": "",
"selfLink": "",
"type": "",
"updated": "",
"urlDestinationDetails": {
"caseSensitive": False,
"firstStepRequired": False,
"matchType": "",
"steps": [
{
"name": "",
"number": 0,
"url": ""
}
],
"url": ""
},
"value": "",
"visitNumPagesDetails": {
"comparisonType": "",
"comparisonValue": ""
},
"visitTimeOnSiteDetails": {
"comparisonType": "",
"comparisonValue": ""
},
"webPropertyId": ""
}
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals/:goalId"
payload <- "{\n \"accountId\": \"\",\n \"active\": false,\n \"created\": \"\",\n \"eventDetails\": {\n \"eventConditions\": [\n {\n \"comparisonType\": \"\",\n \"comparisonValue\": \"\",\n \"expression\": \"\",\n \"matchType\": \"\",\n \"type\": \"\"\n }\n ],\n \"useEventValue\": false\n },\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"profileId\": \"\",\n \"selfLink\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"urlDestinationDetails\": {\n \"caseSensitive\": false,\n \"firstStepRequired\": false,\n \"matchType\": \"\",\n \"steps\": [\n {\n \"name\": \"\",\n \"number\": 0,\n \"url\": \"\"\n }\n ],\n \"url\": \"\"\n },\n \"value\": \"\",\n \"visitNumPagesDetails\": {\n \"comparisonType\": \"\",\n \"comparisonValue\": \"\"\n },\n \"visitTimeOnSiteDetails\": {\n \"comparisonType\": \"\",\n \"comparisonValue\": \"\"\n },\n \"webPropertyId\": \"\"\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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals/:goalId")
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 \"accountId\": \"\",\n \"active\": false,\n \"created\": \"\",\n \"eventDetails\": {\n \"eventConditions\": [\n {\n \"comparisonType\": \"\",\n \"comparisonValue\": \"\",\n \"expression\": \"\",\n \"matchType\": \"\",\n \"type\": \"\"\n }\n ],\n \"useEventValue\": false\n },\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"profileId\": \"\",\n \"selfLink\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"urlDestinationDetails\": {\n \"caseSensitive\": false,\n \"firstStepRequired\": false,\n \"matchType\": \"\",\n \"steps\": [\n {\n \"name\": \"\",\n \"number\": 0,\n \"url\": \"\"\n }\n ],\n \"url\": \"\"\n },\n \"value\": \"\",\n \"visitNumPagesDetails\": {\n \"comparisonType\": \"\",\n \"comparisonValue\": \"\"\n },\n \"visitTimeOnSiteDetails\": {\n \"comparisonType\": \"\",\n \"comparisonValue\": \"\"\n },\n \"webPropertyId\": \"\"\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/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals/:goalId') do |req|
req.body = "{\n \"accountId\": \"\",\n \"active\": false,\n \"created\": \"\",\n \"eventDetails\": {\n \"eventConditions\": [\n {\n \"comparisonType\": \"\",\n \"comparisonValue\": \"\",\n \"expression\": \"\",\n \"matchType\": \"\",\n \"type\": \"\"\n }\n ],\n \"useEventValue\": false\n },\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"profileId\": \"\",\n \"selfLink\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"urlDestinationDetails\": {\n \"caseSensitive\": false,\n \"firstStepRequired\": false,\n \"matchType\": \"\",\n \"steps\": [\n {\n \"name\": \"\",\n \"number\": 0,\n \"url\": \"\"\n }\n ],\n \"url\": \"\"\n },\n \"value\": \"\",\n \"visitNumPagesDetails\": {\n \"comparisonType\": \"\",\n \"comparisonValue\": \"\"\n },\n \"visitTimeOnSiteDetails\": {\n \"comparisonType\": \"\",\n \"comparisonValue\": \"\"\n },\n \"webPropertyId\": \"\"\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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals/:goalId";
let payload = json!({
"accountId": "",
"active": false,
"created": "",
"eventDetails": json!({
"eventConditions": (
json!({
"comparisonType": "",
"comparisonValue": "",
"expression": "",
"matchType": "",
"type": ""
})
),
"useEventValue": false
}),
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"parentLink": json!({
"href": "",
"type": ""
}),
"profileId": "",
"selfLink": "",
"type": "",
"updated": "",
"urlDestinationDetails": json!({
"caseSensitive": false,
"firstStepRequired": false,
"matchType": "",
"steps": (
json!({
"name": "",
"number": 0,
"url": ""
})
),
"url": ""
}),
"value": "",
"visitNumPagesDetails": json!({
"comparisonType": "",
"comparisonValue": ""
}),
"visitTimeOnSiteDetails": json!({
"comparisonType": "",
"comparisonValue": ""
}),
"webPropertyId": ""
});
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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals/:goalId \
--header 'content-type: application/json' \
--data '{
"accountId": "",
"active": false,
"created": "",
"eventDetails": {
"eventConditions": [
{
"comparisonType": "",
"comparisonValue": "",
"expression": "",
"matchType": "",
"type": ""
}
],
"useEventValue": false
},
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"profileId": "",
"selfLink": "",
"type": "",
"updated": "",
"urlDestinationDetails": {
"caseSensitive": false,
"firstStepRequired": false,
"matchType": "",
"steps": [
{
"name": "",
"number": 0,
"url": ""
}
],
"url": ""
},
"value": "",
"visitNumPagesDetails": {
"comparisonType": "",
"comparisonValue": ""
},
"visitTimeOnSiteDetails": {
"comparisonType": "",
"comparisonValue": ""
},
"webPropertyId": ""
}'
echo '{
"accountId": "",
"active": false,
"created": "",
"eventDetails": {
"eventConditions": [
{
"comparisonType": "",
"comparisonValue": "",
"expression": "",
"matchType": "",
"type": ""
}
],
"useEventValue": false
},
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"profileId": "",
"selfLink": "",
"type": "",
"updated": "",
"urlDestinationDetails": {
"caseSensitive": false,
"firstStepRequired": false,
"matchType": "",
"steps": [
{
"name": "",
"number": 0,
"url": ""
}
],
"url": ""
},
"value": "",
"visitNumPagesDetails": {
"comparisonType": "",
"comparisonValue": ""
},
"visitTimeOnSiteDetails": {
"comparisonType": "",
"comparisonValue": ""
},
"webPropertyId": ""
}' | \
http PUT {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals/:goalId \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '{\n "accountId": "",\n "active": false,\n "created": "",\n "eventDetails": {\n "eventConditions": [\n {\n "comparisonType": "",\n "comparisonValue": "",\n "expression": "",\n "matchType": "",\n "type": ""\n }\n ],\n "useEventValue": false\n },\n "id": "",\n "internalWebPropertyId": "",\n "kind": "",\n "name": "",\n "parentLink": {\n "href": "",\n "type": ""\n },\n "profileId": "",\n "selfLink": "",\n "type": "",\n "updated": "",\n "urlDestinationDetails": {\n "caseSensitive": false,\n "firstStepRequired": false,\n "matchType": "",\n "steps": [\n {\n "name": "",\n "number": 0,\n "url": ""\n }\n ],\n "url": ""\n },\n "value": "",\n "visitNumPagesDetails": {\n "comparisonType": "",\n "comparisonValue": ""\n },\n "visitTimeOnSiteDetails": {\n "comparisonType": "",\n "comparisonValue": ""\n },\n "webPropertyId": ""\n}' \
--output-document \
- {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals/:goalId
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"accountId": "",
"active": false,
"created": "",
"eventDetails": [
"eventConditions": [
[
"comparisonType": "",
"comparisonValue": "",
"expression": "",
"matchType": "",
"type": ""
]
],
"useEventValue": false
],
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"parentLink": [
"href": "",
"type": ""
],
"profileId": "",
"selfLink": "",
"type": "",
"updated": "",
"urlDestinationDetails": [
"caseSensitive": false,
"firstStepRequired": false,
"matchType": "",
"steps": [
[
"name": "",
"number": 0,
"url": ""
]
],
"url": ""
],
"value": "",
"visitNumPagesDetails": [
"comparisonType": "",
"comparisonValue": ""
],
"visitTimeOnSiteDetails": [
"comparisonType": "",
"comparisonValue": ""
],
"webPropertyId": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/goals/:goalId")! 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()
DELETE
analytics.management.profileFilterLinks.delete
{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId
QUERY PARAMS
accountId
webPropertyId
profileId
linkId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId")
require "http/client"
url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId"
response = HTTP::Client.delete url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Delete,
RequestUri = new Uri("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId"
req, _ := http.NewRequest("DELETE", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
DELETE /baseUrl/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId"))
.method("DELETE", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('DELETE', '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'DELETE',
url: '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId';
const options = {method: 'DELETE'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId")
.delete(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'DELETE',
url: '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'DELETE',
url: '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId';
const options = {method: 'DELETE'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"DELETE"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId" in
Client.call `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('DELETE', '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId');
echo $response->getBody();
setUrl('{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId');
$request->setMethod(HTTP_METH_DELETE);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId"
response = requests.delete(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId"
response <- VERB("DELETE", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.delete('/baseUrl/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId";
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("DELETE").unwrap(), url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request DELETE \
--url {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId
http DELETE {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId
wget --quiet \
--method DELETE \
--output-document \
- {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "DELETE"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
analytics.management.profileFilterLinks.get
{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId
QUERY PARAMS
accountId
webPropertyId
profileId
linkId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId")
require "http/client"
url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId"
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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId"
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/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId"))
.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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId")
.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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId';
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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId',
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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId');
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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId';
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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId"]
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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId",
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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId');
echo $response->getBody();
setUrl('{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId")
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/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId";
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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId
http GET {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId")! 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
analytics.management.profileFilterLinks.insert
{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks
QUERY PARAMS
accountId
webPropertyId
profileId
BODY json
{
"filterRef": {
"accountId": "",
"href": "",
"id": "",
"kind": "",
"name": ""
},
"id": "",
"kind": "",
"profileRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"webPropertyId": ""
},
"rank": 0,
"selfLink": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks");
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 \"filterRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"profileRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"webPropertyId\": \"\"\n },\n \"rank\": 0,\n \"selfLink\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks" {:content-type :json
:form-params {:filterRef {:accountId ""
:href ""
:id ""
:kind ""
:name ""}
:id ""
:kind ""
:profileRef {:accountId ""
:href ""
:id ""
:internalWebPropertyId ""
:kind ""
:name ""
:webPropertyId ""}
:rank 0
:selfLink ""}})
require "http/client"
url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"filterRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"profileRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"webPropertyId\": \"\"\n },\n \"rank\": 0,\n \"selfLink\": \"\"\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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks"),
Content = new StringContent("{\n \"filterRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"profileRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"webPropertyId\": \"\"\n },\n \"rank\": 0,\n \"selfLink\": \"\"\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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"filterRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"profileRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"webPropertyId\": \"\"\n },\n \"rank\": 0,\n \"selfLink\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks"
payload := strings.NewReader("{\n \"filterRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"profileRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"webPropertyId\": \"\"\n },\n \"rank\": 0,\n \"selfLink\": \"\"\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/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 326
{
"filterRef": {
"accountId": "",
"href": "",
"id": "",
"kind": "",
"name": ""
},
"id": "",
"kind": "",
"profileRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"webPropertyId": ""
},
"rank": 0,
"selfLink": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks")
.setHeader("content-type", "application/json")
.setBody("{\n \"filterRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"profileRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"webPropertyId\": \"\"\n },\n \"rank\": 0,\n \"selfLink\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"filterRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"profileRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"webPropertyId\": \"\"\n },\n \"rank\": 0,\n \"selfLink\": \"\"\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 \"filterRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"profileRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"webPropertyId\": \"\"\n },\n \"rank\": 0,\n \"selfLink\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks")
.header("content-type", "application/json")
.body("{\n \"filterRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"profileRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"webPropertyId\": \"\"\n },\n \"rank\": 0,\n \"selfLink\": \"\"\n}")
.asString();
const data = JSON.stringify({
filterRef: {
accountId: '',
href: '',
id: '',
kind: '',
name: ''
},
id: '',
kind: '',
profileRef: {
accountId: '',
href: '',
id: '',
internalWebPropertyId: '',
kind: '',
name: '',
webPropertyId: ''
},
rank: 0,
selfLink: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks',
headers: {'content-type': 'application/json'},
data: {
filterRef: {accountId: '', href: '', id: '', kind: '', name: ''},
id: '',
kind: '',
profileRef: {
accountId: '',
href: '',
id: '',
internalWebPropertyId: '',
kind: '',
name: '',
webPropertyId: ''
},
rank: 0,
selfLink: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"filterRef":{"accountId":"","href":"","id":"","kind":"","name":""},"id":"","kind":"","profileRef":{"accountId":"","href":"","id":"","internalWebPropertyId":"","kind":"","name":"","webPropertyId":""},"rank":0,"selfLink":""}'
};
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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "filterRef": {\n "accountId": "",\n "href": "",\n "id": "",\n "kind": "",\n "name": ""\n },\n "id": "",\n "kind": "",\n "profileRef": {\n "accountId": "",\n "href": "",\n "id": "",\n "internalWebPropertyId": "",\n "kind": "",\n "name": "",\n "webPropertyId": ""\n },\n "rank": 0,\n "selfLink": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"filterRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"profileRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"webPropertyId\": \"\"\n },\n \"rank\": 0,\n \"selfLink\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks")
.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/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks',
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({
filterRef: {accountId: '', href: '', id: '', kind: '', name: ''},
id: '',
kind: '',
profileRef: {
accountId: '',
href: '',
id: '',
internalWebPropertyId: '',
kind: '',
name: '',
webPropertyId: ''
},
rank: 0,
selfLink: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks',
headers: {'content-type': 'application/json'},
body: {
filterRef: {accountId: '', href: '', id: '', kind: '', name: ''},
id: '',
kind: '',
profileRef: {
accountId: '',
href: '',
id: '',
internalWebPropertyId: '',
kind: '',
name: '',
webPropertyId: ''
},
rank: 0,
selfLink: ''
},
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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
filterRef: {
accountId: '',
href: '',
id: '',
kind: '',
name: ''
},
id: '',
kind: '',
profileRef: {
accountId: '',
href: '',
id: '',
internalWebPropertyId: '',
kind: '',
name: '',
webPropertyId: ''
},
rank: 0,
selfLink: ''
});
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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks',
headers: {'content-type': 'application/json'},
data: {
filterRef: {accountId: '', href: '', id: '', kind: '', name: ''},
id: '',
kind: '',
profileRef: {
accountId: '',
href: '',
id: '',
internalWebPropertyId: '',
kind: '',
name: '',
webPropertyId: ''
},
rank: 0,
selfLink: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"filterRef":{"accountId":"","href":"","id":"","kind":"","name":""},"id":"","kind":"","profileRef":{"accountId":"","href":"","id":"","internalWebPropertyId":"","kind":"","name":"","webPropertyId":""},"rank":0,"selfLink":""}'
};
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 = @{ @"filterRef": @{ @"accountId": @"", @"href": @"", @"id": @"", @"kind": @"", @"name": @"" },
@"id": @"",
@"kind": @"",
@"profileRef": @{ @"accountId": @"", @"href": @"", @"id": @"", @"internalWebPropertyId": @"", @"kind": @"", @"name": @"", @"webPropertyId": @"" },
@"rank": @0,
@"selfLink": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks"]
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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"filterRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"profileRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"webPropertyId\": \"\"\n },\n \"rank\": 0,\n \"selfLink\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks",
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([
'filterRef' => [
'accountId' => '',
'href' => '',
'id' => '',
'kind' => '',
'name' => ''
],
'id' => '',
'kind' => '',
'profileRef' => [
'accountId' => '',
'href' => '',
'id' => '',
'internalWebPropertyId' => '',
'kind' => '',
'name' => '',
'webPropertyId' => ''
],
'rank' => 0,
'selfLink' => ''
]),
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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks', [
'body' => '{
"filterRef": {
"accountId": "",
"href": "",
"id": "",
"kind": "",
"name": ""
},
"id": "",
"kind": "",
"profileRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"webPropertyId": ""
},
"rank": 0,
"selfLink": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'filterRef' => [
'accountId' => '',
'href' => '',
'id' => '',
'kind' => '',
'name' => ''
],
'id' => '',
'kind' => '',
'profileRef' => [
'accountId' => '',
'href' => '',
'id' => '',
'internalWebPropertyId' => '',
'kind' => '',
'name' => '',
'webPropertyId' => ''
],
'rank' => 0,
'selfLink' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'filterRef' => [
'accountId' => '',
'href' => '',
'id' => '',
'kind' => '',
'name' => ''
],
'id' => '',
'kind' => '',
'profileRef' => [
'accountId' => '',
'href' => '',
'id' => '',
'internalWebPropertyId' => '',
'kind' => '',
'name' => '',
'webPropertyId' => ''
],
'rank' => 0,
'selfLink' => ''
]));
$request->setRequestUrl('{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks');
$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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"filterRef": {
"accountId": "",
"href": "",
"id": "",
"kind": "",
"name": ""
},
"id": "",
"kind": "",
"profileRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"webPropertyId": ""
},
"rank": 0,
"selfLink": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"filterRef": {
"accountId": "",
"href": "",
"id": "",
"kind": "",
"name": ""
},
"id": "",
"kind": "",
"profileRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"webPropertyId": ""
},
"rank": 0,
"selfLink": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"filterRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"profileRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"webPropertyId\": \"\"\n },\n \"rank\": 0,\n \"selfLink\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks"
payload = {
"filterRef": {
"accountId": "",
"href": "",
"id": "",
"kind": "",
"name": ""
},
"id": "",
"kind": "",
"profileRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"webPropertyId": ""
},
"rank": 0,
"selfLink": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks"
payload <- "{\n \"filterRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"profileRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"webPropertyId\": \"\"\n },\n \"rank\": 0,\n \"selfLink\": \"\"\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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks")
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 \"filterRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"profileRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"webPropertyId\": \"\"\n },\n \"rank\": 0,\n \"selfLink\": \"\"\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/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks') do |req|
req.body = "{\n \"filterRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"profileRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"webPropertyId\": \"\"\n },\n \"rank\": 0,\n \"selfLink\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks";
let payload = json!({
"filterRef": json!({
"accountId": "",
"href": "",
"id": "",
"kind": "",
"name": ""
}),
"id": "",
"kind": "",
"profileRef": json!({
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"webPropertyId": ""
}),
"rank": 0,
"selfLink": ""
});
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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks \
--header 'content-type: application/json' \
--data '{
"filterRef": {
"accountId": "",
"href": "",
"id": "",
"kind": "",
"name": ""
},
"id": "",
"kind": "",
"profileRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"webPropertyId": ""
},
"rank": 0,
"selfLink": ""
}'
echo '{
"filterRef": {
"accountId": "",
"href": "",
"id": "",
"kind": "",
"name": ""
},
"id": "",
"kind": "",
"profileRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"webPropertyId": ""
},
"rank": 0,
"selfLink": ""
}' | \
http POST {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "filterRef": {\n "accountId": "",\n "href": "",\n "id": "",\n "kind": "",\n "name": ""\n },\n "id": "",\n "kind": "",\n "profileRef": {\n "accountId": "",\n "href": "",\n "id": "",\n "internalWebPropertyId": "",\n "kind": "",\n "name": "",\n "webPropertyId": ""\n },\n "rank": 0,\n "selfLink": ""\n}' \
--output-document \
- {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"filterRef": [
"accountId": "",
"href": "",
"id": "",
"kind": "",
"name": ""
],
"id": "",
"kind": "",
"profileRef": [
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"webPropertyId": ""
],
"rank": 0,
"selfLink": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks")! 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
analytics.management.profileFilterLinks.list
{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks
QUERY PARAMS
accountId
webPropertyId
profileId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks")
require "http/client"
url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks"
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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks"
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/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks"))
.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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks")
.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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks';
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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks',
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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks');
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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks';
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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks"]
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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks",
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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks');
echo $response->getBody();
setUrl('{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks")
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/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks";
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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks
http GET {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PATCH
analytics.management.profileFilterLinks.patch
{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId
QUERY PARAMS
accountId
webPropertyId
profileId
linkId
BODY json
{
"filterRef": {
"accountId": "",
"href": "",
"id": "",
"kind": "",
"name": ""
},
"id": "",
"kind": "",
"profileRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"webPropertyId": ""
},
"rank": 0,
"selfLink": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId");
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 \"filterRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"profileRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"webPropertyId\": \"\"\n },\n \"rank\": 0,\n \"selfLink\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/patch "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId" {:content-type :json
:form-params {:filterRef {:accountId ""
:href ""
:id ""
:kind ""
:name ""}
:id ""
:kind ""
:profileRef {:accountId ""
:href ""
:id ""
:internalWebPropertyId ""
:kind ""
:name ""
:webPropertyId ""}
:rank 0
:selfLink ""}})
require "http/client"
url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"filterRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"profileRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"webPropertyId\": \"\"\n },\n \"rank\": 0,\n \"selfLink\": \"\"\n}"
response = HTTP::Client.patch url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Patch,
RequestUri = new Uri("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId"),
Content = new StringContent("{\n \"filterRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"profileRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"webPropertyId\": \"\"\n },\n \"rank\": 0,\n \"selfLink\": \"\"\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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId");
var request = new RestRequest("", Method.Patch);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"filterRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"profileRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"webPropertyId\": \"\"\n },\n \"rank\": 0,\n \"selfLink\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId"
payload := strings.NewReader("{\n \"filterRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"profileRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"webPropertyId\": \"\"\n },\n \"rank\": 0,\n \"selfLink\": \"\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
PATCH /baseUrl/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 326
{
"filterRef": {
"accountId": "",
"href": "",
"id": "",
"kind": "",
"name": ""
},
"id": "",
"kind": "",
"profileRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"webPropertyId": ""
},
"rank": 0,
"selfLink": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId")
.setHeader("content-type", "application/json")
.setBody("{\n \"filterRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"profileRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"webPropertyId\": \"\"\n },\n \"rank\": 0,\n \"selfLink\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId"))
.header("content-type", "application/json")
.method("PATCH", HttpRequest.BodyPublishers.ofString("{\n \"filterRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"profileRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"webPropertyId\": \"\"\n },\n \"rank\": 0,\n \"selfLink\": \"\"\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 \"filterRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"profileRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"webPropertyId\": \"\"\n },\n \"rank\": 0,\n \"selfLink\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId")
.patch(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId")
.header("content-type", "application/json")
.body("{\n \"filterRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"profileRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"webPropertyId\": \"\"\n },\n \"rank\": 0,\n \"selfLink\": \"\"\n}")
.asString();
const data = JSON.stringify({
filterRef: {
accountId: '',
href: '',
id: '',
kind: '',
name: ''
},
id: '',
kind: '',
profileRef: {
accountId: '',
href: '',
id: '',
internalWebPropertyId: '',
kind: '',
name: '',
webPropertyId: ''
},
rank: 0,
selfLink: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PATCH', '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PATCH',
url: '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId',
headers: {'content-type': 'application/json'},
data: {
filterRef: {accountId: '', href: '', id: '', kind: '', name: ''},
id: '',
kind: '',
profileRef: {
accountId: '',
href: '',
id: '',
internalWebPropertyId: '',
kind: '',
name: '',
webPropertyId: ''
},
rank: 0,
selfLink: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"filterRef":{"accountId":"","href":"","id":"","kind":"","name":""},"id":"","kind":"","profileRef":{"accountId":"","href":"","id":"","internalWebPropertyId":"","kind":"","name":"","webPropertyId":""},"rank":0,"selfLink":""}'
};
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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId',
method: 'PATCH',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "filterRef": {\n "accountId": "",\n "href": "",\n "id": "",\n "kind": "",\n "name": ""\n },\n "id": "",\n "kind": "",\n "profileRef": {\n "accountId": "",\n "href": "",\n "id": "",\n "internalWebPropertyId": "",\n "kind": "",\n "name": "",\n "webPropertyId": ""\n },\n "rank": 0,\n "selfLink": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"filterRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"profileRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"webPropertyId\": \"\"\n },\n \"rank\": 0,\n \"selfLink\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId")
.patch(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PATCH',
hostname: 'example.com',
port: null,
path: '/baseUrl/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId',
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({
filterRef: {accountId: '', href: '', id: '', kind: '', name: ''},
id: '',
kind: '',
profileRef: {
accountId: '',
href: '',
id: '',
internalWebPropertyId: '',
kind: '',
name: '',
webPropertyId: ''
},
rank: 0,
selfLink: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PATCH',
url: '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId',
headers: {'content-type': 'application/json'},
body: {
filterRef: {accountId: '', href: '', id: '', kind: '', name: ''},
id: '',
kind: '',
profileRef: {
accountId: '',
href: '',
id: '',
internalWebPropertyId: '',
kind: '',
name: '',
webPropertyId: ''
},
rank: 0,
selfLink: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PATCH', '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
filterRef: {
accountId: '',
href: '',
id: '',
kind: '',
name: ''
},
id: '',
kind: '',
profileRef: {
accountId: '',
href: '',
id: '',
internalWebPropertyId: '',
kind: '',
name: '',
webPropertyId: ''
},
rank: 0,
selfLink: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PATCH',
url: '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId',
headers: {'content-type': 'application/json'},
data: {
filterRef: {accountId: '', href: '', id: '', kind: '', name: ''},
id: '',
kind: '',
profileRef: {
accountId: '',
href: '',
id: '',
internalWebPropertyId: '',
kind: '',
name: '',
webPropertyId: ''
},
rank: 0,
selfLink: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"filterRef":{"accountId":"","href":"","id":"","kind":"","name":""},"id":"","kind":"","profileRef":{"accountId":"","href":"","id":"","internalWebPropertyId":"","kind":"","name":"","webPropertyId":""},"rank":0,"selfLink":""}'
};
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 = @{ @"filterRef": @{ @"accountId": @"", @"href": @"", @"id": @"", @"kind": @"", @"name": @"" },
@"id": @"",
@"kind": @"",
@"profileRef": @{ @"accountId": @"", @"href": @"", @"id": @"", @"internalWebPropertyId": @"", @"kind": @"", @"name": @"", @"webPropertyId": @"" },
@"rank": @0,
@"selfLink": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PATCH"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"filterRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"profileRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"webPropertyId\": \"\"\n },\n \"rank\": 0,\n \"selfLink\": \"\"\n}" in
Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'filterRef' => [
'accountId' => '',
'href' => '',
'id' => '',
'kind' => '',
'name' => ''
],
'id' => '',
'kind' => '',
'profileRef' => [
'accountId' => '',
'href' => '',
'id' => '',
'internalWebPropertyId' => '',
'kind' => '',
'name' => '',
'webPropertyId' => ''
],
'rank' => 0,
'selfLink' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PATCH', '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId', [
'body' => '{
"filterRef": {
"accountId": "",
"href": "",
"id": "",
"kind": "",
"name": ""
},
"id": "",
"kind": "",
"profileRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"webPropertyId": ""
},
"rank": 0,
"selfLink": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'filterRef' => [
'accountId' => '',
'href' => '',
'id' => '',
'kind' => '',
'name' => ''
],
'id' => '',
'kind' => '',
'profileRef' => [
'accountId' => '',
'href' => '',
'id' => '',
'internalWebPropertyId' => '',
'kind' => '',
'name' => '',
'webPropertyId' => ''
],
'rank' => 0,
'selfLink' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'filterRef' => [
'accountId' => '',
'href' => '',
'id' => '',
'kind' => '',
'name' => ''
],
'id' => '',
'kind' => '',
'profileRef' => [
'accountId' => '',
'href' => '',
'id' => '',
'internalWebPropertyId' => '',
'kind' => '',
'name' => '',
'webPropertyId' => ''
],
'rank' => 0,
'selfLink' => ''
]));
$request->setRequestUrl('{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId');
$request->setRequestMethod('PATCH');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"filterRef": {
"accountId": "",
"href": "",
"id": "",
"kind": "",
"name": ""
},
"id": "",
"kind": "",
"profileRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"webPropertyId": ""
},
"rank": 0,
"selfLink": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"filterRef": {
"accountId": "",
"href": "",
"id": "",
"kind": "",
"name": ""
},
"id": "",
"kind": "",
"profileRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"webPropertyId": ""
},
"rank": 0,
"selfLink": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"filterRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"profileRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"webPropertyId\": \"\"\n },\n \"rank\": 0,\n \"selfLink\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("PATCH", "/baseUrl/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId"
payload = {
"filterRef": {
"accountId": "",
"href": "",
"id": "",
"kind": "",
"name": ""
},
"id": "",
"kind": "",
"profileRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"webPropertyId": ""
},
"rank": 0,
"selfLink": ""
}
headers = {"content-type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId"
payload <- "{\n \"filterRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"profileRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"webPropertyId\": \"\"\n },\n \"rank\": 0,\n \"selfLink\": \"\"\n}"
encode <- "json"
response <- VERB("PATCH", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"filterRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"profileRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"webPropertyId\": \"\"\n },\n \"rank\": 0,\n \"selfLink\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.patch('/baseUrl/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId') do |req|
req.body = "{\n \"filterRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"profileRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"webPropertyId\": \"\"\n },\n \"rank\": 0,\n \"selfLink\": \"\"\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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId";
let payload = json!({
"filterRef": json!({
"accountId": "",
"href": "",
"id": "",
"kind": "",
"name": ""
}),
"id": "",
"kind": "",
"profileRef": json!({
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"webPropertyId": ""
}),
"rank": 0,
"selfLink": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PATCH").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PATCH \
--url {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId \
--header 'content-type: application/json' \
--data '{
"filterRef": {
"accountId": "",
"href": "",
"id": "",
"kind": "",
"name": ""
},
"id": "",
"kind": "",
"profileRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"webPropertyId": ""
},
"rank": 0,
"selfLink": ""
}'
echo '{
"filterRef": {
"accountId": "",
"href": "",
"id": "",
"kind": "",
"name": ""
},
"id": "",
"kind": "",
"profileRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"webPropertyId": ""
},
"rank": 0,
"selfLink": ""
}' | \
http PATCH {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId \
content-type:application/json
wget --quiet \
--method PATCH \
--header 'content-type: application/json' \
--body-data '{\n "filterRef": {\n "accountId": "",\n "href": "",\n "id": "",\n "kind": "",\n "name": ""\n },\n "id": "",\n "kind": "",\n "profileRef": {\n "accountId": "",\n "href": "",\n "id": "",\n "internalWebPropertyId": "",\n "kind": "",\n "name": "",\n "webPropertyId": ""\n },\n "rank": 0,\n "selfLink": ""\n}' \
--output-document \
- {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"filterRef": [
"accountId": "",
"href": "",
"id": "",
"kind": "",
"name": ""
],
"id": "",
"kind": "",
"profileRef": [
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"webPropertyId": ""
],
"rank": 0,
"selfLink": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PUT
analytics.management.profileFilterLinks.update
{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId
QUERY PARAMS
accountId
webPropertyId
profileId
linkId
BODY json
{
"filterRef": {
"accountId": "",
"href": "",
"id": "",
"kind": "",
"name": ""
},
"id": "",
"kind": "",
"profileRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"webPropertyId": ""
},
"rank": 0,
"selfLink": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId");
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 \"filterRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"profileRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"webPropertyId\": \"\"\n },\n \"rank\": 0,\n \"selfLink\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId" {:content-type :json
:form-params {:filterRef {:accountId ""
:href ""
:id ""
:kind ""
:name ""}
:id ""
:kind ""
:profileRef {:accountId ""
:href ""
:id ""
:internalWebPropertyId ""
:kind ""
:name ""
:webPropertyId ""}
:rank 0
:selfLink ""}})
require "http/client"
url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"filterRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"profileRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"webPropertyId\": \"\"\n },\n \"rank\": 0,\n \"selfLink\": \"\"\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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId"),
Content = new StringContent("{\n \"filterRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"profileRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"webPropertyId\": \"\"\n },\n \"rank\": 0,\n \"selfLink\": \"\"\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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"filterRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"profileRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"webPropertyId\": \"\"\n },\n \"rank\": 0,\n \"selfLink\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId"
payload := strings.NewReader("{\n \"filterRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"profileRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"webPropertyId\": \"\"\n },\n \"rank\": 0,\n \"selfLink\": \"\"\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/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 326
{
"filterRef": {
"accountId": "",
"href": "",
"id": "",
"kind": "",
"name": ""
},
"id": "",
"kind": "",
"profileRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"webPropertyId": ""
},
"rank": 0,
"selfLink": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId")
.setHeader("content-type", "application/json")
.setBody("{\n \"filterRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"profileRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"webPropertyId\": \"\"\n },\n \"rank\": 0,\n \"selfLink\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"filterRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"profileRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"webPropertyId\": \"\"\n },\n \"rank\": 0,\n \"selfLink\": \"\"\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 \"filterRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"profileRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"webPropertyId\": \"\"\n },\n \"rank\": 0,\n \"selfLink\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId")
.header("content-type", "application/json")
.body("{\n \"filterRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"profileRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"webPropertyId\": \"\"\n },\n \"rank\": 0,\n \"selfLink\": \"\"\n}")
.asString();
const data = JSON.stringify({
filterRef: {
accountId: '',
href: '',
id: '',
kind: '',
name: ''
},
id: '',
kind: '',
profileRef: {
accountId: '',
href: '',
id: '',
internalWebPropertyId: '',
kind: '',
name: '',
webPropertyId: ''
},
rank: 0,
selfLink: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId',
headers: {'content-type': 'application/json'},
data: {
filterRef: {accountId: '', href: '', id: '', kind: '', name: ''},
id: '',
kind: '',
profileRef: {
accountId: '',
href: '',
id: '',
internalWebPropertyId: '',
kind: '',
name: '',
webPropertyId: ''
},
rank: 0,
selfLink: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"filterRef":{"accountId":"","href":"","id":"","kind":"","name":""},"id":"","kind":"","profileRef":{"accountId":"","href":"","id":"","internalWebPropertyId":"","kind":"","name":"","webPropertyId":""},"rank":0,"selfLink":""}'
};
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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "filterRef": {\n "accountId": "",\n "href": "",\n "id": "",\n "kind": "",\n "name": ""\n },\n "id": "",\n "kind": "",\n "profileRef": {\n "accountId": "",\n "href": "",\n "id": "",\n "internalWebPropertyId": "",\n "kind": "",\n "name": "",\n "webPropertyId": ""\n },\n "rank": 0,\n "selfLink": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"filterRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"profileRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"webPropertyId\": \"\"\n },\n \"rank\": 0,\n \"selfLink\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId")
.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/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId',
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({
filterRef: {accountId: '', href: '', id: '', kind: '', name: ''},
id: '',
kind: '',
profileRef: {
accountId: '',
href: '',
id: '',
internalWebPropertyId: '',
kind: '',
name: '',
webPropertyId: ''
},
rank: 0,
selfLink: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId',
headers: {'content-type': 'application/json'},
body: {
filterRef: {accountId: '', href: '', id: '', kind: '', name: ''},
id: '',
kind: '',
profileRef: {
accountId: '',
href: '',
id: '',
internalWebPropertyId: '',
kind: '',
name: '',
webPropertyId: ''
},
rank: 0,
selfLink: ''
},
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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
filterRef: {
accountId: '',
href: '',
id: '',
kind: '',
name: ''
},
id: '',
kind: '',
profileRef: {
accountId: '',
href: '',
id: '',
internalWebPropertyId: '',
kind: '',
name: '',
webPropertyId: ''
},
rank: 0,
selfLink: ''
});
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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId',
headers: {'content-type': 'application/json'},
data: {
filterRef: {accountId: '', href: '', id: '', kind: '', name: ''},
id: '',
kind: '',
profileRef: {
accountId: '',
href: '',
id: '',
internalWebPropertyId: '',
kind: '',
name: '',
webPropertyId: ''
},
rank: 0,
selfLink: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"filterRef":{"accountId":"","href":"","id":"","kind":"","name":""},"id":"","kind":"","profileRef":{"accountId":"","href":"","id":"","internalWebPropertyId":"","kind":"","name":"","webPropertyId":""},"rank":0,"selfLink":""}'
};
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 = @{ @"filterRef": @{ @"accountId": @"", @"href": @"", @"id": @"", @"kind": @"", @"name": @"" },
@"id": @"",
@"kind": @"",
@"profileRef": @{ @"accountId": @"", @"href": @"", @"id": @"", @"internalWebPropertyId": @"", @"kind": @"", @"name": @"", @"webPropertyId": @"" },
@"rank": @0,
@"selfLink": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId"]
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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"filterRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"profileRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"webPropertyId\": \"\"\n },\n \"rank\": 0,\n \"selfLink\": \"\"\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId",
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([
'filterRef' => [
'accountId' => '',
'href' => '',
'id' => '',
'kind' => '',
'name' => ''
],
'id' => '',
'kind' => '',
'profileRef' => [
'accountId' => '',
'href' => '',
'id' => '',
'internalWebPropertyId' => '',
'kind' => '',
'name' => '',
'webPropertyId' => ''
],
'rank' => 0,
'selfLink' => ''
]),
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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId', [
'body' => '{
"filterRef": {
"accountId": "",
"href": "",
"id": "",
"kind": "",
"name": ""
},
"id": "",
"kind": "",
"profileRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"webPropertyId": ""
},
"rank": 0,
"selfLink": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'filterRef' => [
'accountId' => '',
'href' => '',
'id' => '',
'kind' => '',
'name' => ''
],
'id' => '',
'kind' => '',
'profileRef' => [
'accountId' => '',
'href' => '',
'id' => '',
'internalWebPropertyId' => '',
'kind' => '',
'name' => '',
'webPropertyId' => ''
],
'rank' => 0,
'selfLink' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'filterRef' => [
'accountId' => '',
'href' => '',
'id' => '',
'kind' => '',
'name' => ''
],
'id' => '',
'kind' => '',
'profileRef' => [
'accountId' => '',
'href' => '',
'id' => '',
'internalWebPropertyId' => '',
'kind' => '',
'name' => '',
'webPropertyId' => ''
],
'rank' => 0,
'selfLink' => ''
]));
$request->setRequestUrl('{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId');
$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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"filterRef": {
"accountId": "",
"href": "",
"id": "",
"kind": "",
"name": ""
},
"id": "",
"kind": "",
"profileRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"webPropertyId": ""
},
"rank": 0,
"selfLink": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"filterRef": {
"accountId": "",
"href": "",
"id": "",
"kind": "",
"name": ""
},
"id": "",
"kind": "",
"profileRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"webPropertyId": ""
},
"rank": 0,
"selfLink": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"filterRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"profileRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"webPropertyId\": \"\"\n },\n \"rank\": 0,\n \"selfLink\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId"
payload = {
"filterRef": {
"accountId": "",
"href": "",
"id": "",
"kind": "",
"name": ""
},
"id": "",
"kind": "",
"profileRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"webPropertyId": ""
},
"rank": 0,
"selfLink": ""
}
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId"
payload <- "{\n \"filterRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"profileRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"webPropertyId\": \"\"\n },\n \"rank\": 0,\n \"selfLink\": \"\"\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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId")
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 \"filterRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"profileRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"webPropertyId\": \"\"\n },\n \"rank\": 0,\n \"selfLink\": \"\"\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/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId') do |req|
req.body = "{\n \"filterRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"profileRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"webPropertyId\": \"\"\n },\n \"rank\": 0,\n \"selfLink\": \"\"\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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId";
let payload = json!({
"filterRef": json!({
"accountId": "",
"href": "",
"id": "",
"kind": "",
"name": ""
}),
"id": "",
"kind": "",
"profileRef": json!({
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"webPropertyId": ""
}),
"rank": 0,
"selfLink": ""
});
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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId \
--header 'content-type: application/json' \
--data '{
"filterRef": {
"accountId": "",
"href": "",
"id": "",
"kind": "",
"name": ""
},
"id": "",
"kind": "",
"profileRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"webPropertyId": ""
},
"rank": 0,
"selfLink": ""
}'
echo '{
"filterRef": {
"accountId": "",
"href": "",
"id": "",
"kind": "",
"name": ""
},
"id": "",
"kind": "",
"profileRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"webPropertyId": ""
},
"rank": 0,
"selfLink": ""
}' | \
http PUT {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '{\n "filterRef": {\n "accountId": "",\n "href": "",\n "id": "",\n "kind": "",\n "name": ""\n },\n "id": "",\n "kind": "",\n "profileRef": {\n "accountId": "",\n "href": "",\n "id": "",\n "internalWebPropertyId": "",\n "kind": "",\n "name": "",\n "webPropertyId": ""\n },\n "rank": 0,\n "selfLink": ""\n}' \
--output-document \
- {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"filterRef": [
"accountId": "",
"href": "",
"id": "",
"kind": "",
"name": ""
],
"id": "",
"kind": "",
"profileRef": [
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"webPropertyId": ""
],
"rank": 0,
"selfLink": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/profileFilterLinks/:linkId")! 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()
DELETE
analytics.management.profileUserLinks.delete
{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks/:linkId
QUERY PARAMS
accountId
webPropertyId
profileId
linkId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks/:linkId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks/:linkId")
require "http/client"
url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks/:linkId"
response = HTTP::Client.delete url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Delete,
RequestUri = new Uri("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks/:linkId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks/:linkId");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks/:linkId"
req, _ := http.NewRequest("DELETE", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
DELETE /baseUrl/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks/:linkId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks/:linkId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks/:linkId"))
.method("DELETE", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks/:linkId")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks/:linkId")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('DELETE', '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks/:linkId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'DELETE',
url: '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks/:linkId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks/:linkId';
const options = {method: 'DELETE'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks/:linkId',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks/:linkId")
.delete(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks/:linkId',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'DELETE',
url: '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks/:linkId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks/:linkId');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'DELETE',
url: '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks/:linkId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks/:linkId';
const options = {method: 'DELETE'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks/:linkId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"DELETE"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks/:linkId" in
Client.call `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks/:linkId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('DELETE', '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks/:linkId');
echo $response->getBody();
setUrl('{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks/:linkId');
$request->setMethod(HTTP_METH_DELETE);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks/:linkId');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks/:linkId' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks/:linkId' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks/:linkId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks/:linkId"
response = requests.delete(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks/:linkId"
response <- VERB("DELETE", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks/:linkId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.delete('/baseUrl/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks/:linkId') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks/:linkId";
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("DELETE").unwrap(), url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request DELETE \
--url {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks/:linkId
http DELETE {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks/:linkId
wget --quiet \
--method DELETE \
--output-document \
- {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks/:linkId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks/:linkId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "DELETE"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
analytics.management.profileUserLinks.insert
{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks
QUERY PARAMS
accountId
webPropertyId
profileId
BODY json
{
"entity": {
"accountRef": {
"href": "",
"id": "",
"kind": "",
"name": ""
},
"profileRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"webPropertyId": ""
},
"webPropertyRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": ""
}
},
"id": "",
"kind": "",
"permissions": {
"effective": [],
"local": []
},
"selfLink": "",
"userRef": {
"email": "",
"id": "",
"kind": ""
}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks");
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 \"entity\": {\n \"accountRef\": {\n \"href\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"profileRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"webPropertyId\": \"\"\n },\n \"webPropertyRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n }\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"permissions\": {\n \"effective\": [],\n \"local\": []\n },\n \"selfLink\": \"\",\n \"userRef\": {\n \"email\": \"\",\n \"id\": \"\",\n \"kind\": \"\"\n }\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks" {:content-type :json
:form-params {:entity {:accountRef {:href ""
:id ""
:kind ""
:name ""}
:profileRef {:accountId ""
:href ""
:id ""
:internalWebPropertyId ""
:kind ""
:name ""
:webPropertyId ""}
:webPropertyRef {:accountId ""
:href ""
:id ""
:internalWebPropertyId ""
:kind ""
:name ""}}
:id ""
:kind ""
:permissions {:effective []
:local []}
:selfLink ""
:userRef {:email ""
:id ""
:kind ""}}})
require "http/client"
url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"entity\": {\n \"accountRef\": {\n \"href\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"profileRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"webPropertyId\": \"\"\n },\n \"webPropertyRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n }\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"permissions\": {\n \"effective\": [],\n \"local\": []\n },\n \"selfLink\": \"\",\n \"userRef\": {\n \"email\": \"\",\n \"id\": \"\",\n \"kind\": \"\"\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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks"),
Content = new StringContent("{\n \"entity\": {\n \"accountRef\": {\n \"href\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"profileRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"webPropertyId\": \"\"\n },\n \"webPropertyRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n }\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"permissions\": {\n \"effective\": [],\n \"local\": []\n },\n \"selfLink\": \"\",\n \"userRef\": {\n \"email\": \"\",\n \"id\": \"\",\n \"kind\": \"\"\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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"entity\": {\n \"accountRef\": {\n \"href\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"profileRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"webPropertyId\": \"\"\n },\n \"webPropertyRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n }\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"permissions\": {\n \"effective\": [],\n \"local\": []\n },\n \"selfLink\": \"\",\n \"userRef\": {\n \"email\": \"\",\n \"id\": \"\",\n \"kind\": \"\"\n }\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks"
payload := strings.NewReader("{\n \"entity\": {\n \"accountRef\": {\n \"href\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"profileRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"webPropertyId\": \"\"\n },\n \"webPropertyRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n }\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"permissions\": {\n \"effective\": [],\n \"local\": []\n },\n \"selfLink\": \"\",\n \"userRef\": {\n \"email\": \"\",\n \"id\": \"\",\n \"kind\": \"\"\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/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 626
{
"entity": {
"accountRef": {
"href": "",
"id": "",
"kind": "",
"name": ""
},
"profileRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"webPropertyId": ""
},
"webPropertyRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": ""
}
},
"id": "",
"kind": "",
"permissions": {
"effective": [],
"local": []
},
"selfLink": "",
"userRef": {
"email": "",
"id": "",
"kind": ""
}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks")
.setHeader("content-type", "application/json")
.setBody("{\n \"entity\": {\n \"accountRef\": {\n \"href\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"profileRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"webPropertyId\": \"\"\n },\n \"webPropertyRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n }\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"permissions\": {\n \"effective\": [],\n \"local\": []\n },\n \"selfLink\": \"\",\n \"userRef\": {\n \"email\": \"\",\n \"id\": \"\",\n \"kind\": \"\"\n }\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"entity\": {\n \"accountRef\": {\n \"href\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"profileRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"webPropertyId\": \"\"\n },\n \"webPropertyRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n }\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"permissions\": {\n \"effective\": [],\n \"local\": []\n },\n \"selfLink\": \"\",\n \"userRef\": {\n \"email\": \"\",\n \"id\": \"\",\n \"kind\": \"\"\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 \"entity\": {\n \"accountRef\": {\n \"href\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"profileRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"webPropertyId\": \"\"\n },\n \"webPropertyRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n }\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"permissions\": {\n \"effective\": [],\n \"local\": []\n },\n \"selfLink\": \"\",\n \"userRef\": {\n \"email\": \"\",\n \"id\": \"\",\n \"kind\": \"\"\n }\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks")
.header("content-type", "application/json")
.body("{\n \"entity\": {\n \"accountRef\": {\n \"href\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"profileRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"webPropertyId\": \"\"\n },\n \"webPropertyRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n }\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"permissions\": {\n \"effective\": [],\n \"local\": []\n },\n \"selfLink\": \"\",\n \"userRef\": {\n \"email\": \"\",\n \"id\": \"\",\n \"kind\": \"\"\n }\n}")
.asString();
const data = JSON.stringify({
entity: {
accountRef: {
href: '',
id: '',
kind: '',
name: ''
},
profileRef: {
accountId: '',
href: '',
id: '',
internalWebPropertyId: '',
kind: '',
name: '',
webPropertyId: ''
},
webPropertyRef: {
accountId: '',
href: '',
id: '',
internalWebPropertyId: '',
kind: '',
name: ''
}
},
id: '',
kind: '',
permissions: {
effective: [],
local: []
},
selfLink: '',
userRef: {
email: '',
id: '',
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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks',
headers: {'content-type': 'application/json'},
data: {
entity: {
accountRef: {href: '', id: '', kind: '', name: ''},
profileRef: {
accountId: '',
href: '',
id: '',
internalWebPropertyId: '',
kind: '',
name: '',
webPropertyId: ''
},
webPropertyRef: {accountId: '', href: '', id: '', internalWebPropertyId: '', kind: '', name: ''}
},
id: '',
kind: '',
permissions: {effective: [], local: []},
selfLink: '',
userRef: {email: '', id: '', kind: ''}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"entity":{"accountRef":{"href":"","id":"","kind":"","name":""},"profileRef":{"accountId":"","href":"","id":"","internalWebPropertyId":"","kind":"","name":"","webPropertyId":""},"webPropertyRef":{"accountId":"","href":"","id":"","internalWebPropertyId":"","kind":"","name":""}},"id":"","kind":"","permissions":{"effective":[],"local":[]},"selfLink":"","userRef":{"email":"","id":"","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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "entity": {\n "accountRef": {\n "href": "",\n "id": "",\n "kind": "",\n "name": ""\n },\n "profileRef": {\n "accountId": "",\n "href": "",\n "id": "",\n "internalWebPropertyId": "",\n "kind": "",\n "name": "",\n "webPropertyId": ""\n },\n "webPropertyRef": {\n "accountId": "",\n "href": "",\n "id": "",\n "internalWebPropertyId": "",\n "kind": "",\n "name": ""\n }\n },\n "id": "",\n "kind": "",\n "permissions": {\n "effective": [],\n "local": []\n },\n "selfLink": "",\n "userRef": {\n "email": "",\n "id": "",\n "kind": ""\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 \"entity\": {\n \"accountRef\": {\n \"href\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"profileRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"webPropertyId\": \"\"\n },\n \"webPropertyRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n }\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"permissions\": {\n \"effective\": [],\n \"local\": []\n },\n \"selfLink\": \"\",\n \"userRef\": {\n \"email\": \"\",\n \"id\": \"\",\n \"kind\": \"\"\n }\n}")
val request = Request.Builder()
.url("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks")
.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/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks',
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({
entity: {
accountRef: {href: '', id: '', kind: '', name: ''},
profileRef: {
accountId: '',
href: '',
id: '',
internalWebPropertyId: '',
kind: '',
name: '',
webPropertyId: ''
},
webPropertyRef: {accountId: '', href: '', id: '', internalWebPropertyId: '', kind: '', name: ''}
},
id: '',
kind: '',
permissions: {effective: [], local: []},
selfLink: '',
userRef: {email: '', id: '', kind: ''}
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks',
headers: {'content-type': 'application/json'},
body: {
entity: {
accountRef: {href: '', id: '', kind: '', name: ''},
profileRef: {
accountId: '',
href: '',
id: '',
internalWebPropertyId: '',
kind: '',
name: '',
webPropertyId: ''
},
webPropertyRef: {accountId: '', href: '', id: '', internalWebPropertyId: '', kind: '', name: ''}
},
id: '',
kind: '',
permissions: {effective: [], local: []},
selfLink: '',
userRef: {email: '', id: '', 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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
entity: {
accountRef: {
href: '',
id: '',
kind: '',
name: ''
},
profileRef: {
accountId: '',
href: '',
id: '',
internalWebPropertyId: '',
kind: '',
name: '',
webPropertyId: ''
},
webPropertyRef: {
accountId: '',
href: '',
id: '',
internalWebPropertyId: '',
kind: '',
name: ''
}
},
id: '',
kind: '',
permissions: {
effective: [],
local: []
},
selfLink: '',
userRef: {
email: '',
id: '',
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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks',
headers: {'content-type': 'application/json'},
data: {
entity: {
accountRef: {href: '', id: '', kind: '', name: ''},
profileRef: {
accountId: '',
href: '',
id: '',
internalWebPropertyId: '',
kind: '',
name: '',
webPropertyId: ''
},
webPropertyRef: {accountId: '', href: '', id: '', internalWebPropertyId: '', kind: '', name: ''}
},
id: '',
kind: '',
permissions: {effective: [], local: []},
selfLink: '',
userRef: {email: '', id: '', kind: ''}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"entity":{"accountRef":{"href":"","id":"","kind":"","name":""},"profileRef":{"accountId":"","href":"","id":"","internalWebPropertyId":"","kind":"","name":"","webPropertyId":""},"webPropertyRef":{"accountId":"","href":"","id":"","internalWebPropertyId":"","kind":"","name":""}},"id":"","kind":"","permissions":{"effective":[],"local":[]},"selfLink":"","userRef":{"email":"","id":"","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 = @{ @"entity": @{ @"accountRef": @{ @"href": @"", @"id": @"", @"kind": @"", @"name": @"" }, @"profileRef": @{ @"accountId": @"", @"href": @"", @"id": @"", @"internalWebPropertyId": @"", @"kind": @"", @"name": @"", @"webPropertyId": @"" }, @"webPropertyRef": @{ @"accountId": @"", @"href": @"", @"id": @"", @"internalWebPropertyId": @"", @"kind": @"", @"name": @"" } },
@"id": @"",
@"kind": @"",
@"permissions": @{ @"effective": @[ ], @"local": @[ ] },
@"selfLink": @"",
@"userRef": @{ @"email": @"", @"id": @"", @"kind": @"" } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks"]
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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"entity\": {\n \"accountRef\": {\n \"href\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"profileRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"webPropertyId\": \"\"\n },\n \"webPropertyRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n }\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"permissions\": {\n \"effective\": [],\n \"local\": []\n },\n \"selfLink\": \"\",\n \"userRef\": {\n \"email\": \"\",\n \"id\": \"\",\n \"kind\": \"\"\n }\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks",
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([
'entity' => [
'accountRef' => [
'href' => '',
'id' => '',
'kind' => '',
'name' => ''
],
'profileRef' => [
'accountId' => '',
'href' => '',
'id' => '',
'internalWebPropertyId' => '',
'kind' => '',
'name' => '',
'webPropertyId' => ''
],
'webPropertyRef' => [
'accountId' => '',
'href' => '',
'id' => '',
'internalWebPropertyId' => '',
'kind' => '',
'name' => ''
]
],
'id' => '',
'kind' => '',
'permissions' => [
'effective' => [
],
'local' => [
]
],
'selfLink' => '',
'userRef' => [
'email' => '',
'id' => '',
'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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks', [
'body' => '{
"entity": {
"accountRef": {
"href": "",
"id": "",
"kind": "",
"name": ""
},
"profileRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"webPropertyId": ""
},
"webPropertyRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": ""
}
},
"id": "",
"kind": "",
"permissions": {
"effective": [],
"local": []
},
"selfLink": "",
"userRef": {
"email": "",
"id": "",
"kind": ""
}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'entity' => [
'accountRef' => [
'href' => '',
'id' => '',
'kind' => '',
'name' => ''
],
'profileRef' => [
'accountId' => '',
'href' => '',
'id' => '',
'internalWebPropertyId' => '',
'kind' => '',
'name' => '',
'webPropertyId' => ''
],
'webPropertyRef' => [
'accountId' => '',
'href' => '',
'id' => '',
'internalWebPropertyId' => '',
'kind' => '',
'name' => ''
]
],
'id' => '',
'kind' => '',
'permissions' => [
'effective' => [
],
'local' => [
]
],
'selfLink' => '',
'userRef' => [
'email' => '',
'id' => '',
'kind' => ''
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'entity' => [
'accountRef' => [
'href' => '',
'id' => '',
'kind' => '',
'name' => ''
],
'profileRef' => [
'accountId' => '',
'href' => '',
'id' => '',
'internalWebPropertyId' => '',
'kind' => '',
'name' => '',
'webPropertyId' => ''
],
'webPropertyRef' => [
'accountId' => '',
'href' => '',
'id' => '',
'internalWebPropertyId' => '',
'kind' => '',
'name' => ''
]
],
'id' => '',
'kind' => '',
'permissions' => [
'effective' => [
],
'local' => [
]
],
'selfLink' => '',
'userRef' => [
'email' => '',
'id' => '',
'kind' => ''
]
]));
$request->setRequestUrl('{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks');
$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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"entity": {
"accountRef": {
"href": "",
"id": "",
"kind": "",
"name": ""
},
"profileRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"webPropertyId": ""
},
"webPropertyRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": ""
}
},
"id": "",
"kind": "",
"permissions": {
"effective": [],
"local": []
},
"selfLink": "",
"userRef": {
"email": "",
"id": "",
"kind": ""
}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"entity": {
"accountRef": {
"href": "",
"id": "",
"kind": "",
"name": ""
},
"profileRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"webPropertyId": ""
},
"webPropertyRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": ""
}
},
"id": "",
"kind": "",
"permissions": {
"effective": [],
"local": []
},
"selfLink": "",
"userRef": {
"email": "",
"id": "",
"kind": ""
}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"entity\": {\n \"accountRef\": {\n \"href\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"profileRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"webPropertyId\": \"\"\n },\n \"webPropertyRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n }\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"permissions\": {\n \"effective\": [],\n \"local\": []\n },\n \"selfLink\": \"\",\n \"userRef\": {\n \"email\": \"\",\n \"id\": \"\",\n \"kind\": \"\"\n }\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks"
payload = {
"entity": {
"accountRef": {
"href": "",
"id": "",
"kind": "",
"name": ""
},
"profileRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"webPropertyId": ""
},
"webPropertyRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": ""
}
},
"id": "",
"kind": "",
"permissions": {
"effective": [],
"local": []
},
"selfLink": "",
"userRef": {
"email": "",
"id": "",
"kind": ""
}
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks"
payload <- "{\n \"entity\": {\n \"accountRef\": {\n \"href\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"profileRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"webPropertyId\": \"\"\n },\n \"webPropertyRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n }\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"permissions\": {\n \"effective\": [],\n \"local\": []\n },\n \"selfLink\": \"\",\n \"userRef\": {\n \"email\": \"\",\n \"id\": \"\",\n \"kind\": \"\"\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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks")
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 \"entity\": {\n \"accountRef\": {\n \"href\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"profileRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"webPropertyId\": \"\"\n },\n \"webPropertyRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n }\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"permissions\": {\n \"effective\": [],\n \"local\": []\n },\n \"selfLink\": \"\",\n \"userRef\": {\n \"email\": \"\",\n \"id\": \"\",\n \"kind\": \"\"\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/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks') do |req|
req.body = "{\n \"entity\": {\n \"accountRef\": {\n \"href\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"profileRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"webPropertyId\": \"\"\n },\n \"webPropertyRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n }\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"permissions\": {\n \"effective\": [],\n \"local\": []\n },\n \"selfLink\": \"\",\n \"userRef\": {\n \"email\": \"\",\n \"id\": \"\",\n \"kind\": \"\"\n }\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks";
let payload = json!({
"entity": json!({
"accountRef": json!({
"href": "",
"id": "",
"kind": "",
"name": ""
}),
"profileRef": json!({
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"webPropertyId": ""
}),
"webPropertyRef": json!({
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": ""
})
}),
"id": "",
"kind": "",
"permissions": json!({
"effective": (),
"local": ()
}),
"selfLink": "",
"userRef": json!({
"email": "",
"id": "",
"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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks \
--header 'content-type: application/json' \
--data '{
"entity": {
"accountRef": {
"href": "",
"id": "",
"kind": "",
"name": ""
},
"profileRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"webPropertyId": ""
},
"webPropertyRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": ""
}
},
"id": "",
"kind": "",
"permissions": {
"effective": [],
"local": []
},
"selfLink": "",
"userRef": {
"email": "",
"id": "",
"kind": ""
}
}'
echo '{
"entity": {
"accountRef": {
"href": "",
"id": "",
"kind": "",
"name": ""
},
"profileRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"webPropertyId": ""
},
"webPropertyRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": ""
}
},
"id": "",
"kind": "",
"permissions": {
"effective": [],
"local": []
},
"selfLink": "",
"userRef": {
"email": "",
"id": "",
"kind": ""
}
}' | \
http POST {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "entity": {\n "accountRef": {\n "href": "",\n "id": "",\n "kind": "",\n "name": ""\n },\n "profileRef": {\n "accountId": "",\n "href": "",\n "id": "",\n "internalWebPropertyId": "",\n "kind": "",\n "name": "",\n "webPropertyId": ""\n },\n "webPropertyRef": {\n "accountId": "",\n "href": "",\n "id": "",\n "internalWebPropertyId": "",\n "kind": "",\n "name": ""\n }\n },\n "id": "",\n "kind": "",\n "permissions": {\n "effective": [],\n "local": []\n },\n "selfLink": "",\n "userRef": {\n "email": "",\n "id": "",\n "kind": ""\n }\n}' \
--output-document \
- {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"entity": [
"accountRef": [
"href": "",
"id": "",
"kind": "",
"name": ""
],
"profileRef": [
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"webPropertyId": ""
],
"webPropertyRef": [
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": ""
]
],
"id": "",
"kind": "",
"permissions": [
"effective": [],
"local": []
],
"selfLink": "",
"userRef": [
"email": "",
"id": "",
"kind": ""
]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks")! 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
analytics.management.profileUserLinks.list
{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks
QUERY PARAMS
accountId
webPropertyId
profileId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks")
require "http/client"
url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks"
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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks"
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/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks"))
.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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks")
.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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks';
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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks',
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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks');
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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks';
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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks"]
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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks",
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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks');
echo $response->getBody();
setUrl('{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks")
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/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks";
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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks
http GET {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PUT
analytics.management.profileUserLinks.update
{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks/:linkId
QUERY PARAMS
accountId
webPropertyId
profileId
linkId
BODY json
{
"entity": {
"accountRef": {
"href": "",
"id": "",
"kind": "",
"name": ""
},
"profileRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"webPropertyId": ""
},
"webPropertyRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": ""
}
},
"id": "",
"kind": "",
"permissions": {
"effective": [],
"local": []
},
"selfLink": "",
"userRef": {
"email": "",
"id": "",
"kind": ""
}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks/:linkId");
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 \"entity\": {\n \"accountRef\": {\n \"href\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"profileRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"webPropertyId\": \"\"\n },\n \"webPropertyRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n }\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"permissions\": {\n \"effective\": [],\n \"local\": []\n },\n \"selfLink\": \"\",\n \"userRef\": {\n \"email\": \"\",\n \"id\": \"\",\n \"kind\": \"\"\n }\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks/:linkId" {:content-type :json
:form-params {:entity {:accountRef {:href ""
:id ""
:kind ""
:name ""}
:profileRef {:accountId ""
:href ""
:id ""
:internalWebPropertyId ""
:kind ""
:name ""
:webPropertyId ""}
:webPropertyRef {:accountId ""
:href ""
:id ""
:internalWebPropertyId ""
:kind ""
:name ""}}
:id ""
:kind ""
:permissions {:effective []
:local []}
:selfLink ""
:userRef {:email ""
:id ""
:kind ""}}})
require "http/client"
url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks/:linkId"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"entity\": {\n \"accountRef\": {\n \"href\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"profileRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"webPropertyId\": \"\"\n },\n \"webPropertyRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n }\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"permissions\": {\n \"effective\": [],\n \"local\": []\n },\n \"selfLink\": \"\",\n \"userRef\": {\n \"email\": \"\",\n \"id\": \"\",\n \"kind\": \"\"\n }\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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks/:linkId"),
Content = new StringContent("{\n \"entity\": {\n \"accountRef\": {\n \"href\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"profileRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"webPropertyId\": \"\"\n },\n \"webPropertyRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n }\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"permissions\": {\n \"effective\": [],\n \"local\": []\n },\n \"selfLink\": \"\",\n \"userRef\": {\n \"email\": \"\",\n \"id\": \"\",\n \"kind\": \"\"\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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks/:linkId");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"entity\": {\n \"accountRef\": {\n \"href\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"profileRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"webPropertyId\": \"\"\n },\n \"webPropertyRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n }\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"permissions\": {\n \"effective\": [],\n \"local\": []\n },\n \"selfLink\": \"\",\n \"userRef\": {\n \"email\": \"\",\n \"id\": \"\",\n \"kind\": \"\"\n }\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks/:linkId"
payload := strings.NewReader("{\n \"entity\": {\n \"accountRef\": {\n \"href\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"profileRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"webPropertyId\": \"\"\n },\n \"webPropertyRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n }\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"permissions\": {\n \"effective\": [],\n \"local\": []\n },\n \"selfLink\": \"\",\n \"userRef\": {\n \"email\": \"\",\n \"id\": \"\",\n \"kind\": \"\"\n }\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/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks/:linkId HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 626
{
"entity": {
"accountRef": {
"href": "",
"id": "",
"kind": "",
"name": ""
},
"profileRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"webPropertyId": ""
},
"webPropertyRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": ""
}
},
"id": "",
"kind": "",
"permissions": {
"effective": [],
"local": []
},
"selfLink": "",
"userRef": {
"email": "",
"id": "",
"kind": ""
}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks/:linkId")
.setHeader("content-type", "application/json")
.setBody("{\n \"entity\": {\n \"accountRef\": {\n \"href\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"profileRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"webPropertyId\": \"\"\n },\n \"webPropertyRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n }\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"permissions\": {\n \"effective\": [],\n \"local\": []\n },\n \"selfLink\": \"\",\n \"userRef\": {\n \"email\": \"\",\n \"id\": \"\",\n \"kind\": \"\"\n }\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks/:linkId"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"entity\": {\n \"accountRef\": {\n \"href\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"profileRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"webPropertyId\": \"\"\n },\n \"webPropertyRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n }\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"permissions\": {\n \"effective\": [],\n \"local\": []\n },\n \"selfLink\": \"\",\n \"userRef\": {\n \"email\": \"\",\n \"id\": \"\",\n \"kind\": \"\"\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 \"entity\": {\n \"accountRef\": {\n \"href\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"profileRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"webPropertyId\": \"\"\n },\n \"webPropertyRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n }\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"permissions\": {\n \"effective\": [],\n \"local\": []\n },\n \"selfLink\": \"\",\n \"userRef\": {\n \"email\": \"\",\n \"id\": \"\",\n \"kind\": \"\"\n }\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks/:linkId")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks/:linkId")
.header("content-type", "application/json")
.body("{\n \"entity\": {\n \"accountRef\": {\n \"href\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"profileRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"webPropertyId\": \"\"\n },\n \"webPropertyRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n }\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"permissions\": {\n \"effective\": [],\n \"local\": []\n },\n \"selfLink\": \"\",\n \"userRef\": {\n \"email\": \"\",\n \"id\": \"\",\n \"kind\": \"\"\n }\n}")
.asString();
const data = JSON.stringify({
entity: {
accountRef: {
href: '',
id: '',
kind: '',
name: ''
},
profileRef: {
accountId: '',
href: '',
id: '',
internalWebPropertyId: '',
kind: '',
name: '',
webPropertyId: ''
},
webPropertyRef: {
accountId: '',
href: '',
id: '',
internalWebPropertyId: '',
kind: '',
name: ''
}
},
id: '',
kind: '',
permissions: {
effective: [],
local: []
},
selfLink: '',
userRef: {
email: '',
id: '',
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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks/:linkId');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks/:linkId',
headers: {'content-type': 'application/json'},
data: {
entity: {
accountRef: {href: '', id: '', kind: '', name: ''},
profileRef: {
accountId: '',
href: '',
id: '',
internalWebPropertyId: '',
kind: '',
name: '',
webPropertyId: ''
},
webPropertyRef: {accountId: '', href: '', id: '', internalWebPropertyId: '', kind: '', name: ''}
},
id: '',
kind: '',
permissions: {effective: [], local: []},
selfLink: '',
userRef: {email: '', id: '', kind: ''}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks/:linkId';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"entity":{"accountRef":{"href":"","id":"","kind":"","name":""},"profileRef":{"accountId":"","href":"","id":"","internalWebPropertyId":"","kind":"","name":"","webPropertyId":""},"webPropertyRef":{"accountId":"","href":"","id":"","internalWebPropertyId":"","kind":"","name":""}},"id":"","kind":"","permissions":{"effective":[],"local":[]},"selfLink":"","userRef":{"email":"","id":"","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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks/:linkId',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "entity": {\n "accountRef": {\n "href": "",\n "id": "",\n "kind": "",\n "name": ""\n },\n "profileRef": {\n "accountId": "",\n "href": "",\n "id": "",\n "internalWebPropertyId": "",\n "kind": "",\n "name": "",\n "webPropertyId": ""\n },\n "webPropertyRef": {\n "accountId": "",\n "href": "",\n "id": "",\n "internalWebPropertyId": "",\n "kind": "",\n "name": ""\n }\n },\n "id": "",\n "kind": "",\n "permissions": {\n "effective": [],\n "local": []\n },\n "selfLink": "",\n "userRef": {\n "email": "",\n "id": "",\n "kind": ""\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 \"entity\": {\n \"accountRef\": {\n \"href\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"profileRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"webPropertyId\": \"\"\n },\n \"webPropertyRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n }\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"permissions\": {\n \"effective\": [],\n \"local\": []\n },\n \"selfLink\": \"\",\n \"userRef\": {\n \"email\": \"\",\n \"id\": \"\",\n \"kind\": \"\"\n }\n}")
val request = Request.Builder()
.url("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks/:linkId")
.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/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks/:linkId',
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({
entity: {
accountRef: {href: '', id: '', kind: '', name: ''},
profileRef: {
accountId: '',
href: '',
id: '',
internalWebPropertyId: '',
kind: '',
name: '',
webPropertyId: ''
},
webPropertyRef: {accountId: '', href: '', id: '', internalWebPropertyId: '', kind: '', name: ''}
},
id: '',
kind: '',
permissions: {effective: [], local: []},
selfLink: '',
userRef: {email: '', id: '', kind: ''}
}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks/:linkId',
headers: {'content-type': 'application/json'},
body: {
entity: {
accountRef: {href: '', id: '', kind: '', name: ''},
profileRef: {
accountId: '',
href: '',
id: '',
internalWebPropertyId: '',
kind: '',
name: '',
webPropertyId: ''
},
webPropertyRef: {accountId: '', href: '', id: '', internalWebPropertyId: '', kind: '', name: ''}
},
id: '',
kind: '',
permissions: {effective: [], local: []},
selfLink: '',
userRef: {email: '', id: '', 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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks/:linkId');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
entity: {
accountRef: {
href: '',
id: '',
kind: '',
name: ''
},
profileRef: {
accountId: '',
href: '',
id: '',
internalWebPropertyId: '',
kind: '',
name: '',
webPropertyId: ''
},
webPropertyRef: {
accountId: '',
href: '',
id: '',
internalWebPropertyId: '',
kind: '',
name: ''
}
},
id: '',
kind: '',
permissions: {
effective: [],
local: []
},
selfLink: '',
userRef: {
email: '',
id: '',
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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks/:linkId',
headers: {'content-type': 'application/json'},
data: {
entity: {
accountRef: {href: '', id: '', kind: '', name: ''},
profileRef: {
accountId: '',
href: '',
id: '',
internalWebPropertyId: '',
kind: '',
name: '',
webPropertyId: ''
},
webPropertyRef: {accountId: '', href: '', id: '', internalWebPropertyId: '', kind: '', name: ''}
},
id: '',
kind: '',
permissions: {effective: [], local: []},
selfLink: '',
userRef: {email: '', id: '', kind: ''}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks/:linkId';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"entity":{"accountRef":{"href":"","id":"","kind":"","name":""},"profileRef":{"accountId":"","href":"","id":"","internalWebPropertyId":"","kind":"","name":"","webPropertyId":""},"webPropertyRef":{"accountId":"","href":"","id":"","internalWebPropertyId":"","kind":"","name":""}},"id":"","kind":"","permissions":{"effective":[],"local":[]},"selfLink":"","userRef":{"email":"","id":"","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 = @{ @"entity": @{ @"accountRef": @{ @"href": @"", @"id": @"", @"kind": @"", @"name": @"" }, @"profileRef": @{ @"accountId": @"", @"href": @"", @"id": @"", @"internalWebPropertyId": @"", @"kind": @"", @"name": @"", @"webPropertyId": @"" }, @"webPropertyRef": @{ @"accountId": @"", @"href": @"", @"id": @"", @"internalWebPropertyId": @"", @"kind": @"", @"name": @"" } },
@"id": @"",
@"kind": @"",
@"permissions": @{ @"effective": @[ ], @"local": @[ ] },
@"selfLink": @"",
@"userRef": @{ @"email": @"", @"id": @"", @"kind": @"" } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks/:linkId"]
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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks/:linkId" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"entity\": {\n \"accountRef\": {\n \"href\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"profileRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"webPropertyId\": \"\"\n },\n \"webPropertyRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n }\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"permissions\": {\n \"effective\": [],\n \"local\": []\n },\n \"selfLink\": \"\",\n \"userRef\": {\n \"email\": \"\",\n \"id\": \"\",\n \"kind\": \"\"\n }\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks/:linkId",
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([
'entity' => [
'accountRef' => [
'href' => '',
'id' => '',
'kind' => '',
'name' => ''
],
'profileRef' => [
'accountId' => '',
'href' => '',
'id' => '',
'internalWebPropertyId' => '',
'kind' => '',
'name' => '',
'webPropertyId' => ''
],
'webPropertyRef' => [
'accountId' => '',
'href' => '',
'id' => '',
'internalWebPropertyId' => '',
'kind' => '',
'name' => ''
]
],
'id' => '',
'kind' => '',
'permissions' => [
'effective' => [
],
'local' => [
]
],
'selfLink' => '',
'userRef' => [
'email' => '',
'id' => '',
'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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks/:linkId', [
'body' => '{
"entity": {
"accountRef": {
"href": "",
"id": "",
"kind": "",
"name": ""
},
"profileRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"webPropertyId": ""
},
"webPropertyRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": ""
}
},
"id": "",
"kind": "",
"permissions": {
"effective": [],
"local": []
},
"selfLink": "",
"userRef": {
"email": "",
"id": "",
"kind": ""
}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks/:linkId');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'entity' => [
'accountRef' => [
'href' => '',
'id' => '',
'kind' => '',
'name' => ''
],
'profileRef' => [
'accountId' => '',
'href' => '',
'id' => '',
'internalWebPropertyId' => '',
'kind' => '',
'name' => '',
'webPropertyId' => ''
],
'webPropertyRef' => [
'accountId' => '',
'href' => '',
'id' => '',
'internalWebPropertyId' => '',
'kind' => '',
'name' => ''
]
],
'id' => '',
'kind' => '',
'permissions' => [
'effective' => [
],
'local' => [
]
],
'selfLink' => '',
'userRef' => [
'email' => '',
'id' => '',
'kind' => ''
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'entity' => [
'accountRef' => [
'href' => '',
'id' => '',
'kind' => '',
'name' => ''
],
'profileRef' => [
'accountId' => '',
'href' => '',
'id' => '',
'internalWebPropertyId' => '',
'kind' => '',
'name' => '',
'webPropertyId' => ''
],
'webPropertyRef' => [
'accountId' => '',
'href' => '',
'id' => '',
'internalWebPropertyId' => '',
'kind' => '',
'name' => ''
]
],
'id' => '',
'kind' => '',
'permissions' => [
'effective' => [
],
'local' => [
]
],
'selfLink' => '',
'userRef' => [
'email' => '',
'id' => '',
'kind' => ''
]
]));
$request->setRequestUrl('{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks/:linkId');
$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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks/:linkId' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"entity": {
"accountRef": {
"href": "",
"id": "",
"kind": "",
"name": ""
},
"profileRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"webPropertyId": ""
},
"webPropertyRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": ""
}
},
"id": "",
"kind": "",
"permissions": {
"effective": [],
"local": []
},
"selfLink": "",
"userRef": {
"email": "",
"id": "",
"kind": ""
}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks/:linkId' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"entity": {
"accountRef": {
"href": "",
"id": "",
"kind": "",
"name": ""
},
"profileRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"webPropertyId": ""
},
"webPropertyRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": ""
}
},
"id": "",
"kind": "",
"permissions": {
"effective": [],
"local": []
},
"selfLink": "",
"userRef": {
"email": "",
"id": "",
"kind": ""
}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"entity\": {\n \"accountRef\": {\n \"href\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"profileRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"webPropertyId\": \"\"\n },\n \"webPropertyRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n }\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"permissions\": {\n \"effective\": [],\n \"local\": []\n },\n \"selfLink\": \"\",\n \"userRef\": {\n \"email\": \"\",\n \"id\": \"\",\n \"kind\": \"\"\n }\n}"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks/:linkId", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks/:linkId"
payload = {
"entity": {
"accountRef": {
"href": "",
"id": "",
"kind": "",
"name": ""
},
"profileRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"webPropertyId": ""
},
"webPropertyRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": ""
}
},
"id": "",
"kind": "",
"permissions": {
"effective": [],
"local": []
},
"selfLink": "",
"userRef": {
"email": "",
"id": "",
"kind": ""
}
}
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks/:linkId"
payload <- "{\n \"entity\": {\n \"accountRef\": {\n \"href\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"profileRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"webPropertyId\": \"\"\n },\n \"webPropertyRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n }\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"permissions\": {\n \"effective\": [],\n \"local\": []\n },\n \"selfLink\": \"\",\n \"userRef\": {\n \"email\": \"\",\n \"id\": \"\",\n \"kind\": \"\"\n }\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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks/:linkId")
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 \"entity\": {\n \"accountRef\": {\n \"href\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"profileRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"webPropertyId\": \"\"\n },\n \"webPropertyRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n }\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"permissions\": {\n \"effective\": [],\n \"local\": []\n },\n \"selfLink\": \"\",\n \"userRef\": {\n \"email\": \"\",\n \"id\": \"\",\n \"kind\": \"\"\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.put('/baseUrl/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks/:linkId') do |req|
req.body = "{\n \"entity\": {\n \"accountRef\": {\n \"href\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"profileRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"webPropertyId\": \"\"\n },\n \"webPropertyRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n }\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"permissions\": {\n \"effective\": [],\n \"local\": []\n },\n \"selfLink\": \"\",\n \"userRef\": {\n \"email\": \"\",\n \"id\": \"\",\n \"kind\": \"\"\n }\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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks/:linkId";
let payload = json!({
"entity": json!({
"accountRef": json!({
"href": "",
"id": "",
"kind": "",
"name": ""
}),
"profileRef": json!({
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"webPropertyId": ""
}),
"webPropertyRef": json!({
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": ""
})
}),
"id": "",
"kind": "",
"permissions": json!({
"effective": (),
"local": ()
}),
"selfLink": "",
"userRef": json!({
"email": "",
"id": "",
"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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks/:linkId \
--header 'content-type: application/json' \
--data '{
"entity": {
"accountRef": {
"href": "",
"id": "",
"kind": "",
"name": ""
},
"profileRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"webPropertyId": ""
},
"webPropertyRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": ""
}
},
"id": "",
"kind": "",
"permissions": {
"effective": [],
"local": []
},
"selfLink": "",
"userRef": {
"email": "",
"id": "",
"kind": ""
}
}'
echo '{
"entity": {
"accountRef": {
"href": "",
"id": "",
"kind": "",
"name": ""
},
"profileRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"webPropertyId": ""
},
"webPropertyRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": ""
}
},
"id": "",
"kind": "",
"permissions": {
"effective": [],
"local": []
},
"selfLink": "",
"userRef": {
"email": "",
"id": "",
"kind": ""
}
}' | \
http PUT {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks/:linkId \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '{\n "entity": {\n "accountRef": {\n "href": "",\n "id": "",\n "kind": "",\n "name": ""\n },\n "profileRef": {\n "accountId": "",\n "href": "",\n "id": "",\n "internalWebPropertyId": "",\n "kind": "",\n "name": "",\n "webPropertyId": ""\n },\n "webPropertyRef": {\n "accountId": "",\n "href": "",\n "id": "",\n "internalWebPropertyId": "",\n "kind": "",\n "name": ""\n }\n },\n "id": "",\n "kind": "",\n "permissions": {\n "effective": [],\n "local": []\n },\n "selfLink": "",\n "userRef": {\n "email": "",\n "id": "",\n "kind": ""\n }\n}' \
--output-document \
- {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks/:linkId
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"entity": [
"accountRef": [
"href": "",
"id": "",
"kind": "",
"name": ""
],
"profileRef": [
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"webPropertyId": ""
],
"webPropertyRef": [
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": ""
]
],
"id": "",
"kind": "",
"permissions": [
"effective": [],
"local": []
],
"selfLink": "",
"userRef": [
"email": "",
"id": "",
"kind": ""
]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/entityUserLinks/:linkId")! 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()
DELETE
analytics.management.profiles.delete
{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId
QUERY PARAMS
accountId
webPropertyId
profileId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId")
require "http/client"
url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId"
response = HTTP::Client.delete url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Delete,
RequestUri = new Uri("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId"
req, _ := http.NewRequest("DELETE", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
DELETE /baseUrl/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId"))
.method("DELETE", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('DELETE', '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'DELETE',
url: '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId';
const options = {method: 'DELETE'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId")
.delete(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'DELETE',
url: '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'DELETE',
url: '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId';
const options = {method: 'DELETE'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"DELETE"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId" in
Client.call `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('DELETE', '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId');
echo $response->getBody();
setUrl('{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId');
$request->setMethod(HTTP_METH_DELETE);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId"
response = requests.delete(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId"
response <- VERB("DELETE", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.delete('/baseUrl/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId";
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("DELETE").unwrap(), url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request DELETE \
--url {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId
http DELETE {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId
wget --quiet \
--method DELETE \
--output-document \
- {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "DELETE"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
analytics.management.profiles.get
{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId
QUERY PARAMS
accountId
webPropertyId
profileId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId")
require "http/client"
url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId"
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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId"
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/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId"))
.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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId")
.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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId';
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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId',
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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId');
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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId';
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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId"]
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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId",
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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId');
echo $response->getBody();
setUrl('{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId")
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/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId";
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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId
http GET {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId")! 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
analytics.management.profiles.insert
{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles
QUERY PARAMS
accountId
webPropertyId
BODY json
{
"accountId": "",
"botFilteringEnabled": false,
"childLink": {
"href": "",
"type": ""
},
"created": "",
"currency": "",
"defaultPage": "",
"eCommerceTracking": false,
"enhancedECommerceTracking": false,
"excludeQueryParameters": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"permissions": {
"effective": []
},
"selfLink": "",
"siteSearchCategoryParameters": "",
"siteSearchQueryParameters": "",
"starred": false,
"stripSiteSearchCategoryParameters": false,
"stripSiteSearchQueryParameters": false,
"timezone": "",
"type": "",
"updated": "",
"webPropertyId": "",
"websiteUrl": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"accountId\": \"\",\n \"botFilteringEnabled\": false,\n \"childLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"created\": \"\",\n \"currency\": \"\",\n \"defaultPage\": \"\",\n \"eCommerceTracking\": false,\n \"enhancedECommerceTracking\": false,\n \"excludeQueryParameters\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"permissions\": {\n \"effective\": []\n },\n \"selfLink\": \"\",\n \"siteSearchCategoryParameters\": \"\",\n \"siteSearchQueryParameters\": \"\",\n \"starred\": false,\n \"stripSiteSearchCategoryParameters\": false,\n \"stripSiteSearchQueryParameters\": false,\n \"timezone\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\",\n \"websiteUrl\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles" {:content-type :json
:form-params {:accountId ""
:botFilteringEnabled false
:childLink {:href ""
:type ""}
:created ""
:currency ""
:defaultPage ""
:eCommerceTracking false
:enhancedECommerceTracking false
:excludeQueryParameters ""
:id ""
:internalWebPropertyId ""
:kind ""
:name ""
:parentLink {:href ""
:type ""}
:permissions {:effective []}
:selfLink ""
:siteSearchCategoryParameters ""
:siteSearchQueryParameters ""
:starred false
:stripSiteSearchCategoryParameters false
:stripSiteSearchQueryParameters false
:timezone ""
:type ""
:updated ""
:webPropertyId ""
:websiteUrl ""}})
require "http/client"
url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"accountId\": \"\",\n \"botFilteringEnabled\": false,\n \"childLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"created\": \"\",\n \"currency\": \"\",\n \"defaultPage\": \"\",\n \"eCommerceTracking\": false,\n \"enhancedECommerceTracking\": false,\n \"excludeQueryParameters\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"permissions\": {\n \"effective\": []\n },\n \"selfLink\": \"\",\n \"siteSearchCategoryParameters\": \"\",\n \"siteSearchQueryParameters\": \"\",\n \"starred\": false,\n \"stripSiteSearchCategoryParameters\": false,\n \"stripSiteSearchQueryParameters\": false,\n \"timezone\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\",\n \"websiteUrl\": \"\"\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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles"),
Content = new StringContent("{\n \"accountId\": \"\",\n \"botFilteringEnabled\": false,\n \"childLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"created\": \"\",\n \"currency\": \"\",\n \"defaultPage\": \"\",\n \"eCommerceTracking\": false,\n \"enhancedECommerceTracking\": false,\n \"excludeQueryParameters\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"permissions\": {\n \"effective\": []\n },\n \"selfLink\": \"\",\n \"siteSearchCategoryParameters\": \"\",\n \"siteSearchQueryParameters\": \"\",\n \"starred\": false,\n \"stripSiteSearchCategoryParameters\": false,\n \"stripSiteSearchQueryParameters\": false,\n \"timezone\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\",\n \"websiteUrl\": \"\"\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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"accountId\": \"\",\n \"botFilteringEnabled\": false,\n \"childLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"created\": \"\",\n \"currency\": \"\",\n \"defaultPage\": \"\",\n \"eCommerceTracking\": false,\n \"enhancedECommerceTracking\": false,\n \"excludeQueryParameters\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"permissions\": {\n \"effective\": []\n },\n \"selfLink\": \"\",\n \"siteSearchCategoryParameters\": \"\",\n \"siteSearchQueryParameters\": \"\",\n \"starred\": false,\n \"stripSiteSearchCategoryParameters\": false,\n \"stripSiteSearchQueryParameters\": false,\n \"timezone\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\",\n \"websiteUrl\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles"
payload := strings.NewReader("{\n \"accountId\": \"\",\n \"botFilteringEnabled\": false,\n \"childLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"created\": \"\",\n \"currency\": \"\",\n \"defaultPage\": \"\",\n \"eCommerceTracking\": false,\n \"enhancedECommerceTracking\": false,\n \"excludeQueryParameters\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"permissions\": {\n \"effective\": []\n },\n \"selfLink\": \"\",\n \"siteSearchCategoryParameters\": \"\",\n \"siteSearchQueryParameters\": \"\",\n \"starred\": false,\n \"stripSiteSearchCategoryParameters\": false,\n \"stripSiteSearchQueryParameters\": false,\n \"timezone\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\",\n \"websiteUrl\": \"\"\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/management/accounts/:accountId/webproperties/:webPropertyId/profiles HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 723
{
"accountId": "",
"botFilteringEnabled": false,
"childLink": {
"href": "",
"type": ""
},
"created": "",
"currency": "",
"defaultPage": "",
"eCommerceTracking": false,
"enhancedECommerceTracking": false,
"excludeQueryParameters": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"permissions": {
"effective": []
},
"selfLink": "",
"siteSearchCategoryParameters": "",
"siteSearchQueryParameters": "",
"starred": false,
"stripSiteSearchCategoryParameters": false,
"stripSiteSearchQueryParameters": false,
"timezone": "",
"type": "",
"updated": "",
"webPropertyId": "",
"websiteUrl": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles")
.setHeader("content-type", "application/json")
.setBody("{\n \"accountId\": \"\",\n \"botFilteringEnabled\": false,\n \"childLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"created\": \"\",\n \"currency\": \"\",\n \"defaultPage\": \"\",\n \"eCommerceTracking\": false,\n \"enhancedECommerceTracking\": false,\n \"excludeQueryParameters\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"permissions\": {\n \"effective\": []\n },\n \"selfLink\": \"\",\n \"siteSearchCategoryParameters\": \"\",\n \"siteSearchQueryParameters\": \"\",\n \"starred\": false,\n \"stripSiteSearchCategoryParameters\": false,\n \"stripSiteSearchQueryParameters\": false,\n \"timezone\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\",\n \"websiteUrl\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"accountId\": \"\",\n \"botFilteringEnabled\": false,\n \"childLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"created\": \"\",\n \"currency\": \"\",\n \"defaultPage\": \"\",\n \"eCommerceTracking\": false,\n \"enhancedECommerceTracking\": false,\n \"excludeQueryParameters\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"permissions\": {\n \"effective\": []\n },\n \"selfLink\": \"\",\n \"siteSearchCategoryParameters\": \"\",\n \"siteSearchQueryParameters\": \"\",\n \"starred\": false,\n \"stripSiteSearchCategoryParameters\": false,\n \"stripSiteSearchQueryParameters\": false,\n \"timezone\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\",\n \"websiteUrl\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"accountId\": \"\",\n \"botFilteringEnabled\": false,\n \"childLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"created\": \"\",\n \"currency\": \"\",\n \"defaultPage\": \"\",\n \"eCommerceTracking\": false,\n \"enhancedECommerceTracking\": false,\n \"excludeQueryParameters\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"permissions\": {\n \"effective\": []\n },\n \"selfLink\": \"\",\n \"siteSearchCategoryParameters\": \"\",\n \"siteSearchQueryParameters\": \"\",\n \"starred\": false,\n \"stripSiteSearchCategoryParameters\": false,\n \"stripSiteSearchQueryParameters\": false,\n \"timezone\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\",\n \"websiteUrl\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles")
.header("content-type", "application/json")
.body("{\n \"accountId\": \"\",\n \"botFilteringEnabled\": false,\n \"childLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"created\": \"\",\n \"currency\": \"\",\n \"defaultPage\": \"\",\n \"eCommerceTracking\": false,\n \"enhancedECommerceTracking\": false,\n \"excludeQueryParameters\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"permissions\": {\n \"effective\": []\n },\n \"selfLink\": \"\",\n \"siteSearchCategoryParameters\": \"\",\n \"siteSearchQueryParameters\": \"\",\n \"starred\": false,\n \"stripSiteSearchCategoryParameters\": false,\n \"stripSiteSearchQueryParameters\": false,\n \"timezone\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\",\n \"websiteUrl\": \"\"\n}")
.asString();
const data = JSON.stringify({
accountId: '',
botFilteringEnabled: false,
childLink: {
href: '',
type: ''
},
created: '',
currency: '',
defaultPage: '',
eCommerceTracking: false,
enhancedECommerceTracking: false,
excludeQueryParameters: '',
id: '',
internalWebPropertyId: '',
kind: '',
name: '',
parentLink: {
href: '',
type: ''
},
permissions: {
effective: []
},
selfLink: '',
siteSearchCategoryParameters: '',
siteSearchQueryParameters: '',
starred: false,
stripSiteSearchCategoryParameters: false,
stripSiteSearchQueryParameters: false,
timezone: '',
type: '',
updated: '',
webPropertyId: '',
websiteUrl: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles',
headers: {'content-type': 'application/json'},
data: {
accountId: '',
botFilteringEnabled: false,
childLink: {href: '', type: ''},
created: '',
currency: '',
defaultPage: '',
eCommerceTracking: false,
enhancedECommerceTracking: false,
excludeQueryParameters: '',
id: '',
internalWebPropertyId: '',
kind: '',
name: '',
parentLink: {href: '', type: ''},
permissions: {effective: []},
selfLink: '',
siteSearchCategoryParameters: '',
siteSearchQueryParameters: '',
starred: false,
stripSiteSearchCategoryParameters: false,
stripSiteSearchQueryParameters: false,
timezone: '',
type: '',
updated: '',
webPropertyId: '',
websiteUrl: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"accountId":"","botFilteringEnabled":false,"childLink":{"href":"","type":""},"created":"","currency":"","defaultPage":"","eCommerceTracking":false,"enhancedECommerceTracking":false,"excludeQueryParameters":"","id":"","internalWebPropertyId":"","kind":"","name":"","parentLink":{"href":"","type":""},"permissions":{"effective":[]},"selfLink":"","siteSearchCategoryParameters":"","siteSearchQueryParameters":"","starred":false,"stripSiteSearchCategoryParameters":false,"stripSiteSearchQueryParameters":false,"timezone":"","type":"","updated":"","webPropertyId":"","websiteUrl":""}'
};
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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "accountId": "",\n "botFilteringEnabled": false,\n "childLink": {\n "href": "",\n "type": ""\n },\n "created": "",\n "currency": "",\n "defaultPage": "",\n "eCommerceTracking": false,\n "enhancedECommerceTracking": false,\n "excludeQueryParameters": "",\n "id": "",\n "internalWebPropertyId": "",\n "kind": "",\n "name": "",\n "parentLink": {\n "href": "",\n "type": ""\n },\n "permissions": {\n "effective": []\n },\n "selfLink": "",\n "siteSearchCategoryParameters": "",\n "siteSearchQueryParameters": "",\n "starred": false,\n "stripSiteSearchCategoryParameters": false,\n "stripSiteSearchQueryParameters": false,\n "timezone": "",\n "type": "",\n "updated": "",\n "webPropertyId": "",\n "websiteUrl": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"accountId\": \"\",\n \"botFilteringEnabled\": false,\n \"childLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"created\": \"\",\n \"currency\": \"\",\n \"defaultPage\": \"\",\n \"eCommerceTracking\": false,\n \"enhancedECommerceTracking\": false,\n \"excludeQueryParameters\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"permissions\": {\n \"effective\": []\n },\n \"selfLink\": \"\",\n \"siteSearchCategoryParameters\": \"\",\n \"siteSearchQueryParameters\": \"\",\n \"starred\": false,\n \"stripSiteSearchCategoryParameters\": false,\n \"stripSiteSearchQueryParameters\": false,\n \"timezone\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\",\n \"websiteUrl\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles")
.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/management/accounts/:accountId/webproperties/:webPropertyId/profiles',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
accountId: '',
botFilteringEnabled: false,
childLink: {href: '', type: ''},
created: '',
currency: '',
defaultPage: '',
eCommerceTracking: false,
enhancedECommerceTracking: false,
excludeQueryParameters: '',
id: '',
internalWebPropertyId: '',
kind: '',
name: '',
parentLink: {href: '', type: ''},
permissions: {effective: []},
selfLink: '',
siteSearchCategoryParameters: '',
siteSearchQueryParameters: '',
starred: false,
stripSiteSearchCategoryParameters: false,
stripSiteSearchQueryParameters: false,
timezone: '',
type: '',
updated: '',
webPropertyId: '',
websiteUrl: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles',
headers: {'content-type': 'application/json'},
body: {
accountId: '',
botFilteringEnabled: false,
childLink: {href: '', type: ''},
created: '',
currency: '',
defaultPage: '',
eCommerceTracking: false,
enhancedECommerceTracking: false,
excludeQueryParameters: '',
id: '',
internalWebPropertyId: '',
kind: '',
name: '',
parentLink: {href: '', type: ''},
permissions: {effective: []},
selfLink: '',
siteSearchCategoryParameters: '',
siteSearchQueryParameters: '',
starred: false,
stripSiteSearchCategoryParameters: false,
stripSiteSearchQueryParameters: false,
timezone: '',
type: '',
updated: '',
webPropertyId: '',
websiteUrl: ''
},
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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
accountId: '',
botFilteringEnabled: false,
childLink: {
href: '',
type: ''
},
created: '',
currency: '',
defaultPage: '',
eCommerceTracking: false,
enhancedECommerceTracking: false,
excludeQueryParameters: '',
id: '',
internalWebPropertyId: '',
kind: '',
name: '',
parentLink: {
href: '',
type: ''
},
permissions: {
effective: []
},
selfLink: '',
siteSearchCategoryParameters: '',
siteSearchQueryParameters: '',
starred: false,
stripSiteSearchCategoryParameters: false,
stripSiteSearchQueryParameters: false,
timezone: '',
type: '',
updated: '',
webPropertyId: '',
websiteUrl: ''
});
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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles',
headers: {'content-type': 'application/json'},
data: {
accountId: '',
botFilteringEnabled: false,
childLink: {href: '', type: ''},
created: '',
currency: '',
defaultPage: '',
eCommerceTracking: false,
enhancedECommerceTracking: false,
excludeQueryParameters: '',
id: '',
internalWebPropertyId: '',
kind: '',
name: '',
parentLink: {href: '', type: ''},
permissions: {effective: []},
selfLink: '',
siteSearchCategoryParameters: '',
siteSearchQueryParameters: '',
starred: false,
stripSiteSearchCategoryParameters: false,
stripSiteSearchQueryParameters: false,
timezone: '',
type: '',
updated: '',
webPropertyId: '',
websiteUrl: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"accountId":"","botFilteringEnabled":false,"childLink":{"href":"","type":""},"created":"","currency":"","defaultPage":"","eCommerceTracking":false,"enhancedECommerceTracking":false,"excludeQueryParameters":"","id":"","internalWebPropertyId":"","kind":"","name":"","parentLink":{"href":"","type":""},"permissions":{"effective":[]},"selfLink":"","siteSearchCategoryParameters":"","siteSearchQueryParameters":"","starred":false,"stripSiteSearchCategoryParameters":false,"stripSiteSearchQueryParameters":false,"timezone":"","type":"","updated":"","webPropertyId":"","websiteUrl":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"accountId": @"",
@"botFilteringEnabled": @NO,
@"childLink": @{ @"href": @"", @"type": @"" },
@"created": @"",
@"currency": @"",
@"defaultPage": @"",
@"eCommerceTracking": @NO,
@"enhancedECommerceTracking": @NO,
@"excludeQueryParameters": @"",
@"id": @"",
@"internalWebPropertyId": @"",
@"kind": @"",
@"name": @"",
@"parentLink": @{ @"href": @"", @"type": @"" },
@"permissions": @{ @"effective": @[ ] },
@"selfLink": @"",
@"siteSearchCategoryParameters": @"",
@"siteSearchQueryParameters": @"",
@"starred": @NO,
@"stripSiteSearchCategoryParameters": @NO,
@"stripSiteSearchQueryParameters": @NO,
@"timezone": @"",
@"type": @"",
@"updated": @"",
@"webPropertyId": @"",
@"websiteUrl": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles"]
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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"accountId\": \"\",\n \"botFilteringEnabled\": false,\n \"childLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"created\": \"\",\n \"currency\": \"\",\n \"defaultPage\": \"\",\n \"eCommerceTracking\": false,\n \"enhancedECommerceTracking\": false,\n \"excludeQueryParameters\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"permissions\": {\n \"effective\": []\n },\n \"selfLink\": \"\",\n \"siteSearchCategoryParameters\": \"\",\n \"siteSearchQueryParameters\": \"\",\n \"starred\": false,\n \"stripSiteSearchCategoryParameters\": false,\n \"stripSiteSearchQueryParameters\": false,\n \"timezone\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\",\n \"websiteUrl\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'accountId' => '',
'botFilteringEnabled' => null,
'childLink' => [
'href' => '',
'type' => ''
],
'created' => '',
'currency' => '',
'defaultPage' => '',
'eCommerceTracking' => null,
'enhancedECommerceTracking' => null,
'excludeQueryParameters' => '',
'id' => '',
'internalWebPropertyId' => '',
'kind' => '',
'name' => '',
'parentLink' => [
'href' => '',
'type' => ''
],
'permissions' => [
'effective' => [
]
],
'selfLink' => '',
'siteSearchCategoryParameters' => '',
'siteSearchQueryParameters' => '',
'starred' => null,
'stripSiteSearchCategoryParameters' => null,
'stripSiteSearchQueryParameters' => null,
'timezone' => '',
'type' => '',
'updated' => '',
'webPropertyId' => '',
'websiteUrl' => ''
]),
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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles', [
'body' => '{
"accountId": "",
"botFilteringEnabled": false,
"childLink": {
"href": "",
"type": ""
},
"created": "",
"currency": "",
"defaultPage": "",
"eCommerceTracking": false,
"enhancedECommerceTracking": false,
"excludeQueryParameters": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"permissions": {
"effective": []
},
"selfLink": "",
"siteSearchCategoryParameters": "",
"siteSearchQueryParameters": "",
"starred": false,
"stripSiteSearchCategoryParameters": false,
"stripSiteSearchQueryParameters": false,
"timezone": "",
"type": "",
"updated": "",
"webPropertyId": "",
"websiteUrl": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'accountId' => '',
'botFilteringEnabled' => null,
'childLink' => [
'href' => '',
'type' => ''
],
'created' => '',
'currency' => '',
'defaultPage' => '',
'eCommerceTracking' => null,
'enhancedECommerceTracking' => null,
'excludeQueryParameters' => '',
'id' => '',
'internalWebPropertyId' => '',
'kind' => '',
'name' => '',
'parentLink' => [
'href' => '',
'type' => ''
],
'permissions' => [
'effective' => [
]
],
'selfLink' => '',
'siteSearchCategoryParameters' => '',
'siteSearchQueryParameters' => '',
'starred' => null,
'stripSiteSearchCategoryParameters' => null,
'stripSiteSearchQueryParameters' => null,
'timezone' => '',
'type' => '',
'updated' => '',
'webPropertyId' => '',
'websiteUrl' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'accountId' => '',
'botFilteringEnabled' => null,
'childLink' => [
'href' => '',
'type' => ''
],
'created' => '',
'currency' => '',
'defaultPage' => '',
'eCommerceTracking' => null,
'enhancedECommerceTracking' => null,
'excludeQueryParameters' => '',
'id' => '',
'internalWebPropertyId' => '',
'kind' => '',
'name' => '',
'parentLink' => [
'href' => '',
'type' => ''
],
'permissions' => [
'effective' => [
]
],
'selfLink' => '',
'siteSearchCategoryParameters' => '',
'siteSearchQueryParameters' => '',
'starred' => null,
'stripSiteSearchCategoryParameters' => null,
'stripSiteSearchQueryParameters' => null,
'timezone' => '',
'type' => '',
'updated' => '',
'webPropertyId' => '',
'websiteUrl' => ''
]));
$request->setRequestUrl('{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles');
$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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"accountId": "",
"botFilteringEnabled": false,
"childLink": {
"href": "",
"type": ""
},
"created": "",
"currency": "",
"defaultPage": "",
"eCommerceTracking": false,
"enhancedECommerceTracking": false,
"excludeQueryParameters": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"permissions": {
"effective": []
},
"selfLink": "",
"siteSearchCategoryParameters": "",
"siteSearchQueryParameters": "",
"starred": false,
"stripSiteSearchCategoryParameters": false,
"stripSiteSearchQueryParameters": false,
"timezone": "",
"type": "",
"updated": "",
"webPropertyId": "",
"websiteUrl": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"accountId": "",
"botFilteringEnabled": false,
"childLink": {
"href": "",
"type": ""
},
"created": "",
"currency": "",
"defaultPage": "",
"eCommerceTracking": false,
"enhancedECommerceTracking": false,
"excludeQueryParameters": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"permissions": {
"effective": []
},
"selfLink": "",
"siteSearchCategoryParameters": "",
"siteSearchQueryParameters": "",
"starred": false,
"stripSiteSearchCategoryParameters": false,
"stripSiteSearchQueryParameters": false,
"timezone": "",
"type": "",
"updated": "",
"webPropertyId": "",
"websiteUrl": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"accountId\": \"\",\n \"botFilteringEnabled\": false,\n \"childLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"created\": \"\",\n \"currency\": \"\",\n \"defaultPage\": \"\",\n \"eCommerceTracking\": false,\n \"enhancedECommerceTracking\": false,\n \"excludeQueryParameters\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"permissions\": {\n \"effective\": []\n },\n \"selfLink\": \"\",\n \"siteSearchCategoryParameters\": \"\",\n \"siteSearchQueryParameters\": \"\",\n \"starred\": false,\n \"stripSiteSearchCategoryParameters\": false,\n \"stripSiteSearchQueryParameters\": false,\n \"timezone\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\",\n \"websiteUrl\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/management/accounts/:accountId/webproperties/:webPropertyId/profiles", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles"
payload = {
"accountId": "",
"botFilteringEnabled": False,
"childLink": {
"href": "",
"type": ""
},
"created": "",
"currency": "",
"defaultPage": "",
"eCommerceTracking": False,
"enhancedECommerceTracking": False,
"excludeQueryParameters": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"permissions": { "effective": [] },
"selfLink": "",
"siteSearchCategoryParameters": "",
"siteSearchQueryParameters": "",
"starred": False,
"stripSiteSearchCategoryParameters": False,
"stripSiteSearchQueryParameters": False,
"timezone": "",
"type": "",
"updated": "",
"webPropertyId": "",
"websiteUrl": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles"
payload <- "{\n \"accountId\": \"\",\n \"botFilteringEnabled\": false,\n \"childLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"created\": \"\",\n \"currency\": \"\",\n \"defaultPage\": \"\",\n \"eCommerceTracking\": false,\n \"enhancedECommerceTracking\": false,\n \"excludeQueryParameters\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"permissions\": {\n \"effective\": []\n },\n \"selfLink\": \"\",\n \"siteSearchCategoryParameters\": \"\",\n \"siteSearchQueryParameters\": \"\",\n \"starred\": false,\n \"stripSiteSearchCategoryParameters\": false,\n \"stripSiteSearchQueryParameters\": false,\n \"timezone\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\",\n \"websiteUrl\": \"\"\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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"accountId\": \"\",\n \"botFilteringEnabled\": false,\n \"childLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"created\": \"\",\n \"currency\": \"\",\n \"defaultPage\": \"\",\n \"eCommerceTracking\": false,\n \"enhancedECommerceTracking\": false,\n \"excludeQueryParameters\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"permissions\": {\n \"effective\": []\n },\n \"selfLink\": \"\",\n \"siteSearchCategoryParameters\": \"\",\n \"siteSearchQueryParameters\": \"\",\n \"starred\": false,\n \"stripSiteSearchCategoryParameters\": false,\n \"stripSiteSearchQueryParameters\": false,\n \"timezone\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\",\n \"websiteUrl\": \"\"\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/management/accounts/:accountId/webproperties/:webPropertyId/profiles') do |req|
req.body = "{\n \"accountId\": \"\",\n \"botFilteringEnabled\": false,\n \"childLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"created\": \"\",\n \"currency\": \"\",\n \"defaultPage\": \"\",\n \"eCommerceTracking\": false,\n \"enhancedECommerceTracking\": false,\n \"excludeQueryParameters\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"permissions\": {\n \"effective\": []\n },\n \"selfLink\": \"\",\n \"siteSearchCategoryParameters\": \"\",\n \"siteSearchQueryParameters\": \"\",\n \"starred\": false,\n \"stripSiteSearchCategoryParameters\": false,\n \"stripSiteSearchQueryParameters\": false,\n \"timezone\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\",\n \"websiteUrl\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles";
let payload = json!({
"accountId": "",
"botFilteringEnabled": false,
"childLink": json!({
"href": "",
"type": ""
}),
"created": "",
"currency": "",
"defaultPage": "",
"eCommerceTracking": false,
"enhancedECommerceTracking": false,
"excludeQueryParameters": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"parentLink": json!({
"href": "",
"type": ""
}),
"permissions": json!({"effective": ()}),
"selfLink": "",
"siteSearchCategoryParameters": "",
"siteSearchQueryParameters": "",
"starred": false,
"stripSiteSearchCategoryParameters": false,
"stripSiteSearchQueryParameters": false,
"timezone": "",
"type": "",
"updated": "",
"webPropertyId": "",
"websiteUrl": ""
});
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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles \
--header 'content-type: application/json' \
--data '{
"accountId": "",
"botFilteringEnabled": false,
"childLink": {
"href": "",
"type": ""
},
"created": "",
"currency": "",
"defaultPage": "",
"eCommerceTracking": false,
"enhancedECommerceTracking": false,
"excludeQueryParameters": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"permissions": {
"effective": []
},
"selfLink": "",
"siteSearchCategoryParameters": "",
"siteSearchQueryParameters": "",
"starred": false,
"stripSiteSearchCategoryParameters": false,
"stripSiteSearchQueryParameters": false,
"timezone": "",
"type": "",
"updated": "",
"webPropertyId": "",
"websiteUrl": ""
}'
echo '{
"accountId": "",
"botFilteringEnabled": false,
"childLink": {
"href": "",
"type": ""
},
"created": "",
"currency": "",
"defaultPage": "",
"eCommerceTracking": false,
"enhancedECommerceTracking": false,
"excludeQueryParameters": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"permissions": {
"effective": []
},
"selfLink": "",
"siteSearchCategoryParameters": "",
"siteSearchQueryParameters": "",
"starred": false,
"stripSiteSearchCategoryParameters": false,
"stripSiteSearchQueryParameters": false,
"timezone": "",
"type": "",
"updated": "",
"webPropertyId": "",
"websiteUrl": ""
}' | \
http POST {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "accountId": "",\n "botFilteringEnabled": false,\n "childLink": {\n "href": "",\n "type": ""\n },\n "created": "",\n "currency": "",\n "defaultPage": "",\n "eCommerceTracking": false,\n "enhancedECommerceTracking": false,\n "excludeQueryParameters": "",\n "id": "",\n "internalWebPropertyId": "",\n "kind": "",\n "name": "",\n "parentLink": {\n "href": "",\n "type": ""\n },\n "permissions": {\n "effective": []\n },\n "selfLink": "",\n "siteSearchCategoryParameters": "",\n "siteSearchQueryParameters": "",\n "starred": false,\n "stripSiteSearchCategoryParameters": false,\n "stripSiteSearchQueryParameters": false,\n "timezone": "",\n "type": "",\n "updated": "",\n "webPropertyId": "",\n "websiteUrl": ""\n}' \
--output-document \
- {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"accountId": "",
"botFilteringEnabled": false,
"childLink": [
"href": "",
"type": ""
],
"created": "",
"currency": "",
"defaultPage": "",
"eCommerceTracking": false,
"enhancedECommerceTracking": false,
"excludeQueryParameters": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"parentLink": [
"href": "",
"type": ""
],
"permissions": ["effective": []],
"selfLink": "",
"siteSearchCategoryParameters": "",
"siteSearchQueryParameters": "",
"starred": false,
"stripSiteSearchCategoryParameters": false,
"stripSiteSearchQueryParameters": false,
"timezone": "",
"type": "",
"updated": "",
"webPropertyId": "",
"websiteUrl": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles")! 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
analytics.management.profiles.list
{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles
QUERY PARAMS
accountId
webPropertyId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles")
require "http/client"
url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles"
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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles"
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/management/accounts/:accountId/webproperties/:webPropertyId/profiles HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles"))
.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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles")
.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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles';
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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/management/accounts/:accountId/webproperties/:webPropertyId/profiles',
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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles');
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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles';
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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles"]
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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles",
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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles');
echo $response->getBody();
setUrl('{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/management/accounts/:accountId/webproperties/:webPropertyId/profiles")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles")
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/management/accounts/:accountId/webproperties/:webPropertyId/profiles') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles";
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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles
http GET {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PATCH
analytics.management.profiles.patch
{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId
QUERY PARAMS
accountId
webPropertyId
profileId
BODY json
{
"accountId": "",
"botFilteringEnabled": false,
"childLink": {
"href": "",
"type": ""
},
"created": "",
"currency": "",
"defaultPage": "",
"eCommerceTracking": false,
"enhancedECommerceTracking": false,
"excludeQueryParameters": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"permissions": {
"effective": []
},
"selfLink": "",
"siteSearchCategoryParameters": "",
"siteSearchQueryParameters": "",
"starred": false,
"stripSiteSearchCategoryParameters": false,
"stripSiteSearchQueryParameters": false,
"timezone": "",
"type": "",
"updated": "",
"webPropertyId": "",
"websiteUrl": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"accountId\": \"\",\n \"botFilteringEnabled\": false,\n \"childLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"created\": \"\",\n \"currency\": \"\",\n \"defaultPage\": \"\",\n \"eCommerceTracking\": false,\n \"enhancedECommerceTracking\": false,\n \"excludeQueryParameters\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"permissions\": {\n \"effective\": []\n },\n \"selfLink\": \"\",\n \"siteSearchCategoryParameters\": \"\",\n \"siteSearchQueryParameters\": \"\",\n \"starred\": false,\n \"stripSiteSearchCategoryParameters\": false,\n \"stripSiteSearchQueryParameters\": false,\n \"timezone\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\",\n \"websiteUrl\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/patch "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId" {:content-type :json
:form-params {:accountId ""
:botFilteringEnabled false
:childLink {:href ""
:type ""}
:created ""
:currency ""
:defaultPage ""
:eCommerceTracking false
:enhancedECommerceTracking false
:excludeQueryParameters ""
:id ""
:internalWebPropertyId ""
:kind ""
:name ""
:parentLink {:href ""
:type ""}
:permissions {:effective []}
:selfLink ""
:siteSearchCategoryParameters ""
:siteSearchQueryParameters ""
:starred false
:stripSiteSearchCategoryParameters false
:stripSiteSearchQueryParameters false
:timezone ""
:type ""
:updated ""
:webPropertyId ""
:websiteUrl ""}})
require "http/client"
url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"accountId\": \"\",\n \"botFilteringEnabled\": false,\n \"childLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"created\": \"\",\n \"currency\": \"\",\n \"defaultPage\": \"\",\n \"eCommerceTracking\": false,\n \"enhancedECommerceTracking\": false,\n \"excludeQueryParameters\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"permissions\": {\n \"effective\": []\n },\n \"selfLink\": \"\",\n \"siteSearchCategoryParameters\": \"\",\n \"siteSearchQueryParameters\": \"\",\n \"starred\": false,\n \"stripSiteSearchCategoryParameters\": false,\n \"stripSiteSearchQueryParameters\": false,\n \"timezone\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\",\n \"websiteUrl\": \"\"\n}"
response = HTTP::Client.patch url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Patch,
RequestUri = new Uri("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId"),
Content = new StringContent("{\n \"accountId\": \"\",\n \"botFilteringEnabled\": false,\n \"childLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"created\": \"\",\n \"currency\": \"\",\n \"defaultPage\": \"\",\n \"eCommerceTracking\": false,\n \"enhancedECommerceTracking\": false,\n \"excludeQueryParameters\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"permissions\": {\n \"effective\": []\n },\n \"selfLink\": \"\",\n \"siteSearchCategoryParameters\": \"\",\n \"siteSearchQueryParameters\": \"\",\n \"starred\": false,\n \"stripSiteSearchCategoryParameters\": false,\n \"stripSiteSearchQueryParameters\": false,\n \"timezone\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\",\n \"websiteUrl\": \"\"\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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId");
var request = new RestRequest("", Method.Patch);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"accountId\": \"\",\n \"botFilteringEnabled\": false,\n \"childLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"created\": \"\",\n \"currency\": \"\",\n \"defaultPage\": \"\",\n \"eCommerceTracking\": false,\n \"enhancedECommerceTracking\": false,\n \"excludeQueryParameters\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"permissions\": {\n \"effective\": []\n },\n \"selfLink\": \"\",\n \"siteSearchCategoryParameters\": \"\",\n \"siteSearchQueryParameters\": \"\",\n \"starred\": false,\n \"stripSiteSearchCategoryParameters\": false,\n \"stripSiteSearchQueryParameters\": false,\n \"timezone\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\",\n \"websiteUrl\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId"
payload := strings.NewReader("{\n \"accountId\": \"\",\n \"botFilteringEnabled\": false,\n \"childLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"created\": \"\",\n \"currency\": \"\",\n \"defaultPage\": \"\",\n \"eCommerceTracking\": false,\n \"enhancedECommerceTracking\": false,\n \"excludeQueryParameters\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"permissions\": {\n \"effective\": []\n },\n \"selfLink\": \"\",\n \"siteSearchCategoryParameters\": \"\",\n \"siteSearchQueryParameters\": \"\",\n \"starred\": false,\n \"stripSiteSearchCategoryParameters\": false,\n \"stripSiteSearchQueryParameters\": false,\n \"timezone\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\",\n \"websiteUrl\": \"\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
PATCH /baseUrl/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 723
{
"accountId": "",
"botFilteringEnabled": false,
"childLink": {
"href": "",
"type": ""
},
"created": "",
"currency": "",
"defaultPage": "",
"eCommerceTracking": false,
"enhancedECommerceTracking": false,
"excludeQueryParameters": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"permissions": {
"effective": []
},
"selfLink": "",
"siteSearchCategoryParameters": "",
"siteSearchQueryParameters": "",
"starred": false,
"stripSiteSearchCategoryParameters": false,
"stripSiteSearchQueryParameters": false,
"timezone": "",
"type": "",
"updated": "",
"webPropertyId": "",
"websiteUrl": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId")
.setHeader("content-type", "application/json")
.setBody("{\n \"accountId\": \"\",\n \"botFilteringEnabled\": false,\n \"childLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"created\": \"\",\n \"currency\": \"\",\n \"defaultPage\": \"\",\n \"eCommerceTracking\": false,\n \"enhancedECommerceTracking\": false,\n \"excludeQueryParameters\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"permissions\": {\n \"effective\": []\n },\n \"selfLink\": \"\",\n \"siteSearchCategoryParameters\": \"\",\n \"siteSearchQueryParameters\": \"\",\n \"starred\": false,\n \"stripSiteSearchCategoryParameters\": false,\n \"stripSiteSearchQueryParameters\": false,\n \"timezone\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\",\n \"websiteUrl\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId"))
.header("content-type", "application/json")
.method("PATCH", HttpRequest.BodyPublishers.ofString("{\n \"accountId\": \"\",\n \"botFilteringEnabled\": false,\n \"childLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"created\": \"\",\n \"currency\": \"\",\n \"defaultPage\": \"\",\n \"eCommerceTracking\": false,\n \"enhancedECommerceTracking\": false,\n \"excludeQueryParameters\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"permissions\": {\n \"effective\": []\n },\n \"selfLink\": \"\",\n \"siteSearchCategoryParameters\": \"\",\n \"siteSearchQueryParameters\": \"\",\n \"starred\": false,\n \"stripSiteSearchCategoryParameters\": false,\n \"stripSiteSearchQueryParameters\": false,\n \"timezone\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\",\n \"websiteUrl\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"accountId\": \"\",\n \"botFilteringEnabled\": false,\n \"childLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"created\": \"\",\n \"currency\": \"\",\n \"defaultPage\": \"\",\n \"eCommerceTracking\": false,\n \"enhancedECommerceTracking\": false,\n \"excludeQueryParameters\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"permissions\": {\n \"effective\": []\n },\n \"selfLink\": \"\",\n \"siteSearchCategoryParameters\": \"\",\n \"siteSearchQueryParameters\": \"\",\n \"starred\": false,\n \"stripSiteSearchCategoryParameters\": false,\n \"stripSiteSearchQueryParameters\": false,\n \"timezone\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\",\n \"websiteUrl\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId")
.patch(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId")
.header("content-type", "application/json")
.body("{\n \"accountId\": \"\",\n \"botFilteringEnabled\": false,\n \"childLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"created\": \"\",\n \"currency\": \"\",\n \"defaultPage\": \"\",\n \"eCommerceTracking\": false,\n \"enhancedECommerceTracking\": false,\n \"excludeQueryParameters\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"permissions\": {\n \"effective\": []\n },\n \"selfLink\": \"\",\n \"siteSearchCategoryParameters\": \"\",\n \"siteSearchQueryParameters\": \"\",\n \"starred\": false,\n \"stripSiteSearchCategoryParameters\": false,\n \"stripSiteSearchQueryParameters\": false,\n \"timezone\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\",\n \"websiteUrl\": \"\"\n}")
.asString();
const data = JSON.stringify({
accountId: '',
botFilteringEnabled: false,
childLink: {
href: '',
type: ''
},
created: '',
currency: '',
defaultPage: '',
eCommerceTracking: false,
enhancedECommerceTracking: false,
excludeQueryParameters: '',
id: '',
internalWebPropertyId: '',
kind: '',
name: '',
parentLink: {
href: '',
type: ''
},
permissions: {
effective: []
},
selfLink: '',
siteSearchCategoryParameters: '',
siteSearchQueryParameters: '',
starred: false,
stripSiteSearchCategoryParameters: false,
stripSiteSearchQueryParameters: false,
timezone: '',
type: '',
updated: '',
webPropertyId: '',
websiteUrl: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PATCH', '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PATCH',
url: '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId',
headers: {'content-type': 'application/json'},
data: {
accountId: '',
botFilteringEnabled: false,
childLink: {href: '', type: ''},
created: '',
currency: '',
defaultPage: '',
eCommerceTracking: false,
enhancedECommerceTracking: false,
excludeQueryParameters: '',
id: '',
internalWebPropertyId: '',
kind: '',
name: '',
parentLink: {href: '', type: ''},
permissions: {effective: []},
selfLink: '',
siteSearchCategoryParameters: '',
siteSearchQueryParameters: '',
starred: false,
stripSiteSearchCategoryParameters: false,
stripSiteSearchQueryParameters: false,
timezone: '',
type: '',
updated: '',
webPropertyId: '',
websiteUrl: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"accountId":"","botFilteringEnabled":false,"childLink":{"href":"","type":""},"created":"","currency":"","defaultPage":"","eCommerceTracking":false,"enhancedECommerceTracking":false,"excludeQueryParameters":"","id":"","internalWebPropertyId":"","kind":"","name":"","parentLink":{"href":"","type":""},"permissions":{"effective":[]},"selfLink":"","siteSearchCategoryParameters":"","siteSearchQueryParameters":"","starred":false,"stripSiteSearchCategoryParameters":false,"stripSiteSearchQueryParameters":false,"timezone":"","type":"","updated":"","webPropertyId":"","websiteUrl":""}'
};
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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId',
method: 'PATCH',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "accountId": "",\n "botFilteringEnabled": false,\n "childLink": {\n "href": "",\n "type": ""\n },\n "created": "",\n "currency": "",\n "defaultPage": "",\n "eCommerceTracking": false,\n "enhancedECommerceTracking": false,\n "excludeQueryParameters": "",\n "id": "",\n "internalWebPropertyId": "",\n "kind": "",\n "name": "",\n "parentLink": {\n "href": "",\n "type": ""\n },\n "permissions": {\n "effective": []\n },\n "selfLink": "",\n "siteSearchCategoryParameters": "",\n "siteSearchQueryParameters": "",\n "starred": false,\n "stripSiteSearchCategoryParameters": false,\n "stripSiteSearchQueryParameters": false,\n "timezone": "",\n "type": "",\n "updated": "",\n "webPropertyId": "",\n "websiteUrl": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"accountId\": \"\",\n \"botFilteringEnabled\": false,\n \"childLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"created\": \"\",\n \"currency\": \"\",\n \"defaultPage\": \"\",\n \"eCommerceTracking\": false,\n \"enhancedECommerceTracking\": false,\n \"excludeQueryParameters\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"permissions\": {\n \"effective\": []\n },\n \"selfLink\": \"\",\n \"siteSearchCategoryParameters\": \"\",\n \"siteSearchQueryParameters\": \"\",\n \"starred\": false,\n \"stripSiteSearchCategoryParameters\": false,\n \"stripSiteSearchQueryParameters\": false,\n \"timezone\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\",\n \"websiteUrl\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId")
.patch(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PATCH',
hostname: 'example.com',
port: null,
path: '/baseUrl/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
accountId: '',
botFilteringEnabled: false,
childLink: {href: '', type: ''},
created: '',
currency: '',
defaultPage: '',
eCommerceTracking: false,
enhancedECommerceTracking: false,
excludeQueryParameters: '',
id: '',
internalWebPropertyId: '',
kind: '',
name: '',
parentLink: {href: '', type: ''},
permissions: {effective: []},
selfLink: '',
siteSearchCategoryParameters: '',
siteSearchQueryParameters: '',
starred: false,
stripSiteSearchCategoryParameters: false,
stripSiteSearchQueryParameters: false,
timezone: '',
type: '',
updated: '',
webPropertyId: '',
websiteUrl: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PATCH',
url: '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId',
headers: {'content-type': 'application/json'},
body: {
accountId: '',
botFilteringEnabled: false,
childLink: {href: '', type: ''},
created: '',
currency: '',
defaultPage: '',
eCommerceTracking: false,
enhancedECommerceTracking: false,
excludeQueryParameters: '',
id: '',
internalWebPropertyId: '',
kind: '',
name: '',
parentLink: {href: '', type: ''},
permissions: {effective: []},
selfLink: '',
siteSearchCategoryParameters: '',
siteSearchQueryParameters: '',
starred: false,
stripSiteSearchCategoryParameters: false,
stripSiteSearchQueryParameters: false,
timezone: '',
type: '',
updated: '',
webPropertyId: '',
websiteUrl: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PATCH', '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
accountId: '',
botFilteringEnabled: false,
childLink: {
href: '',
type: ''
},
created: '',
currency: '',
defaultPage: '',
eCommerceTracking: false,
enhancedECommerceTracking: false,
excludeQueryParameters: '',
id: '',
internalWebPropertyId: '',
kind: '',
name: '',
parentLink: {
href: '',
type: ''
},
permissions: {
effective: []
},
selfLink: '',
siteSearchCategoryParameters: '',
siteSearchQueryParameters: '',
starred: false,
stripSiteSearchCategoryParameters: false,
stripSiteSearchQueryParameters: false,
timezone: '',
type: '',
updated: '',
webPropertyId: '',
websiteUrl: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PATCH',
url: '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId',
headers: {'content-type': 'application/json'},
data: {
accountId: '',
botFilteringEnabled: false,
childLink: {href: '', type: ''},
created: '',
currency: '',
defaultPage: '',
eCommerceTracking: false,
enhancedECommerceTracking: false,
excludeQueryParameters: '',
id: '',
internalWebPropertyId: '',
kind: '',
name: '',
parentLink: {href: '', type: ''},
permissions: {effective: []},
selfLink: '',
siteSearchCategoryParameters: '',
siteSearchQueryParameters: '',
starred: false,
stripSiteSearchCategoryParameters: false,
stripSiteSearchQueryParameters: false,
timezone: '',
type: '',
updated: '',
webPropertyId: '',
websiteUrl: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"accountId":"","botFilteringEnabled":false,"childLink":{"href":"","type":""},"created":"","currency":"","defaultPage":"","eCommerceTracking":false,"enhancedECommerceTracking":false,"excludeQueryParameters":"","id":"","internalWebPropertyId":"","kind":"","name":"","parentLink":{"href":"","type":""},"permissions":{"effective":[]},"selfLink":"","siteSearchCategoryParameters":"","siteSearchQueryParameters":"","starred":false,"stripSiteSearchCategoryParameters":false,"stripSiteSearchQueryParameters":false,"timezone":"","type":"","updated":"","webPropertyId":"","websiteUrl":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"accountId": @"",
@"botFilteringEnabled": @NO,
@"childLink": @{ @"href": @"", @"type": @"" },
@"created": @"",
@"currency": @"",
@"defaultPage": @"",
@"eCommerceTracking": @NO,
@"enhancedECommerceTracking": @NO,
@"excludeQueryParameters": @"",
@"id": @"",
@"internalWebPropertyId": @"",
@"kind": @"",
@"name": @"",
@"parentLink": @{ @"href": @"", @"type": @"" },
@"permissions": @{ @"effective": @[ ] },
@"selfLink": @"",
@"siteSearchCategoryParameters": @"",
@"siteSearchQueryParameters": @"",
@"starred": @NO,
@"stripSiteSearchCategoryParameters": @NO,
@"stripSiteSearchQueryParameters": @NO,
@"timezone": @"",
@"type": @"",
@"updated": @"",
@"webPropertyId": @"",
@"websiteUrl": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PATCH"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"accountId\": \"\",\n \"botFilteringEnabled\": false,\n \"childLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"created\": \"\",\n \"currency\": \"\",\n \"defaultPage\": \"\",\n \"eCommerceTracking\": false,\n \"enhancedECommerceTracking\": false,\n \"excludeQueryParameters\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"permissions\": {\n \"effective\": []\n },\n \"selfLink\": \"\",\n \"siteSearchCategoryParameters\": \"\",\n \"siteSearchQueryParameters\": \"\",\n \"starred\": false,\n \"stripSiteSearchCategoryParameters\": false,\n \"stripSiteSearchQueryParameters\": false,\n \"timezone\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\",\n \"websiteUrl\": \"\"\n}" in
Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'accountId' => '',
'botFilteringEnabled' => null,
'childLink' => [
'href' => '',
'type' => ''
],
'created' => '',
'currency' => '',
'defaultPage' => '',
'eCommerceTracking' => null,
'enhancedECommerceTracking' => null,
'excludeQueryParameters' => '',
'id' => '',
'internalWebPropertyId' => '',
'kind' => '',
'name' => '',
'parentLink' => [
'href' => '',
'type' => ''
],
'permissions' => [
'effective' => [
]
],
'selfLink' => '',
'siteSearchCategoryParameters' => '',
'siteSearchQueryParameters' => '',
'starred' => null,
'stripSiteSearchCategoryParameters' => null,
'stripSiteSearchQueryParameters' => null,
'timezone' => '',
'type' => '',
'updated' => '',
'webPropertyId' => '',
'websiteUrl' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PATCH', '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId', [
'body' => '{
"accountId": "",
"botFilteringEnabled": false,
"childLink": {
"href": "",
"type": ""
},
"created": "",
"currency": "",
"defaultPage": "",
"eCommerceTracking": false,
"enhancedECommerceTracking": false,
"excludeQueryParameters": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"permissions": {
"effective": []
},
"selfLink": "",
"siteSearchCategoryParameters": "",
"siteSearchQueryParameters": "",
"starred": false,
"stripSiteSearchCategoryParameters": false,
"stripSiteSearchQueryParameters": false,
"timezone": "",
"type": "",
"updated": "",
"webPropertyId": "",
"websiteUrl": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'accountId' => '',
'botFilteringEnabled' => null,
'childLink' => [
'href' => '',
'type' => ''
],
'created' => '',
'currency' => '',
'defaultPage' => '',
'eCommerceTracking' => null,
'enhancedECommerceTracking' => null,
'excludeQueryParameters' => '',
'id' => '',
'internalWebPropertyId' => '',
'kind' => '',
'name' => '',
'parentLink' => [
'href' => '',
'type' => ''
],
'permissions' => [
'effective' => [
]
],
'selfLink' => '',
'siteSearchCategoryParameters' => '',
'siteSearchQueryParameters' => '',
'starred' => null,
'stripSiteSearchCategoryParameters' => null,
'stripSiteSearchQueryParameters' => null,
'timezone' => '',
'type' => '',
'updated' => '',
'webPropertyId' => '',
'websiteUrl' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'accountId' => '',
'botFilteringEnabled' => null,
'childLink' => [
'href' => '',
'type' => ''
],
'created' => '',
'currency' => '',
'defaultPage' => '',
'eCommerceTracking' => null,
'enhancedECommerceTracking' => null,
'excludeQueryParameters' => '',
'id' => '',
'internalWebPropertyId' => '',
'kind' => '',
'name' => '',
'parentLink' => [
'href' => '',
'type' => ''
],
'permissions' => [
'effective' => [
]
],
'selfLink' => '',
'siteSearchCategoryParameters' => '',
'siteSearchQueryParameters' => '',
'starred' => null,
'stripSiteSearchCategoryParameters' => null,
'stripSiteSearchQueryParameters' => null,
'timezone' => '',
'type' => '',
'updated' => '',
'webPropertyId' => '',
'websiteUrl' => ''
]));
$request->setRequestUrl('{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId');
$request->setRequestMethod('PATCH');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"accountId": "",
"botFilteringEnabled": false,
"childLink": {
"href": "",
"type": ""
},
"created": "",
"currency": "",
"defaultPage": "",
"eCommerceTracking": false,
"enhancedECommerceTracking": false,
"excludeQueryParameters": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"permissions": {
"effective": []
},
"selfLink": "",
"siteSearchCategoryParameters": "",
"siteSearchQueryParameters": "",
"starred": false,
"stripSiteSearchCategoryParameters": false,
"stripSiteSearchQueryParameters": false,
"timezone": "",
"type": "",
"updated": "",
"webPropertyId": "",
"websiteUrl": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"accountId": "",
"botFilteringEnabled": false,
"childLink": {
"href": "",
"type": ""
},
"created": "",
"currency": "",
"defaultPage": "",
"eCommerceTracking": false,
"enhancedECommerceTracking": false,
"excludeQueryParameters": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"permissions": {
"effective": []
},
"selfLink": "",
"siteSearchCategoryParameters": "",
"siteSearchQueryParameters": "",
"starred": false,
"stripSiteSearchCategoryParameters": false,
"stripSiteSearchQueryParameters": false,
"timezone": "",
"type": "",
"updated": "",
"webPropertyId": "",
"websiteUrl": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"accountId\": \"\",\n \"botFilteringEnabled\": false,\n \"childLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"created\": \"\",\n \"currency\": \"\",\n \"defaultPage\": \"\",\n \"eCommerceTracking\": false,\n \"enhancedECommerceTracking\": false,\n \"excludeQueryParameters\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"permissions\": {\n \"effective\": []\n },\n \"selfLink\": \"\",\n \"siteSearchCategoryParameters\": \"\",\n \"siteSearchQueryParameters\": \"\",\n \"starred\": false,\n \"stripSiteSearchCategoryParameters\": false,\n \"stripSiteSearchQueryParameters\": false,\n \"timezone\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\",\n \"websiteUrl\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("PATCH", "/baseUrl/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId"
payload = {
"accountId": "",
"botFilteringEnabled": False,
"childLink": {
"href": "",
"type": ""
},
"created": "",
"currency": "",
"defaultPage": "",
"eCommerceTracking": False,
"enhancedECommerceTracking": False,
"excludeQueryParameters": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"permissions": { "effective": [] },
"selfLink": "",
"siteSearchCategoryParameters": "",
"siteSearchQueryParameters": "",
"starred": False,
"stripSiteSearchCategoryParameters": False,
"stripSiteSearchQueryParameters": False,
"timezone": "",
"type": "",
"updated": "",
"webPropertyId": "",
"websiteUrl": ""
}
headers = {"content-type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId"
payload <- "{\n \"accountId\": \"\",\n \"botFilteringEnabled\": false,\n \"childLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"created\": \"\",\n \"currency\": \"\",\n \"defaultPage\": \"\",\n \"eCommerceTracking\": false,\n \"enhancedECommerceTracking\": false,\n \"excludeQueryParameters\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"permissions\": {\n \"effective\": []\n },\n \"selfLink\": \"\",\n \"siteSearchCategoryParameters\": \"\",\n \"siteSearchQueryParameters\": \"\",\n \"starred\": false,\n \"stripSiteSearchCategoryParameters\": false,\n \"stripSiteSearchQueryParameters\": false,\n \"timezone\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\",\n \"websiteUrl\": \"\"\n}"
encode <- "json"
response <- VERB("PATCH", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"accountId\": \"\",\n \"botFilteringEnabled\": false,\n \"childLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"created\": \"\",\n \"currency\": \"\",\n \"defaultPage\": \"\",\n \"eCommerceTracking\": false,\n \"enhancedECommerceTracking\": false,\n \"excludeQueryParameters\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"permissions\": {\n \"effective\": []\n },\n \"selfLink\": \"\",\n \"siteSearchCategoryParameters\": \"\",\n \"siteSearchQueryParameters\": \"\",\n \"starred\": false,\n \"stripSiteSearchCategoryParameters\": false,\n \"stripSiteSearchQueryParameters\": false,\n \"timezone\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\",\n \"websiteUrl\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.patch('/baseUrl/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId') do |req|
req.body = "{\n \"accountId\": \"\",\n \"botFilteringEnabled\": false,\n \"childLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"created\": \"\",\n \"currency\": \"\",\n \"defaultPage\": \"\",\n \"eCommerceTracking\": false,\n \"enhancedECommerceTracking\": false,\n \"excludeQueryParameters\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"permissions\": {\n \"effective\": []\n },\n \"selfLink\": \"\",\n \"siteSearchCategoryParameters\": \"\",\n \"siteSearchQueryParameters\": \"\",\n \"starred\": false,\n \"stripSiteSearchCategoryParameters\": false,\n \"stripSiteSearchQueryParameters\": false,\n \"timezone\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\",\n \"websiteUrl\": \"\"\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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId";
let payload = json!({
"accountId": "",
"botFilteringEnabled": false,
"childLink": json!({
"href": "",
"type": ""
}),
"created": "",
"currency": "",
"defaultPage": "",
"eCommerceTracking": false,
"enhancedECommerceTracking": false,
"excludeQueryParameters": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"parentLink": json!({
"href": "",
"type": ""
}),
"permissions": json!({"effective": ()}),
"selfLink": "",
"siteSearchCategoryParameters": "",
"siteSearchQueryParameters": "",
"starred": false,
"stripSiteSearchCategoryParameters": false,
"stripSiteSearchQueryParameters": false,
"timezone": "",
"type": "",
"updated": "",
"webPropertyId": "",
"websiteUrl": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PATCH").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PATCH \
--url {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId \
--header 'content-type: application/json' \
--data '{
"accountId": "",
"botFilteringEnabled": false,
"childLink": {
"href": "",
"type": ""
},
"created": "",
"currency": "",
"defaultPage": "",
"eCommerceTracking": false,
"enhancedECommerceTracking": false,
"excludeQueryParameters": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"permissions": {
"effective": []
},
"selfLink": "",
"siteSearchCategoryParameters": "",
"siteSearchQueryParameters": "",
"starred": false,
"stripSiteSearchCategoryParameters": false,
"stripSiteSearchQueryParameters": false,
"timezone": "",
"type": "",
"updated": "",
"webPropertyId": "",
"websiteUrl": ""
}'
echo '{
"accountId": "",
"botFilteringEnabled": false,
"childLink": {
"href": "",
"type": ""
},
"created": "",
"currency": "",
"defaultPage": "",
"eCommerceTracking": false,
"enhancedECommerceTracking": false,
"excludeQueryParameters": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"permissions": {
"effective": []
},
"selfLink": "",
"siteSearchCategoryParameters": "",
"siteSearchQueryParameters": "",
"starred": false,
"stripSiteSearchCategoryParameters": false,
"stripSiteSearchQueryParameters": false,
"timezone": "",
"type": "",
"updated": "",
"webPropertyId": "",
"websiteUrl": ""
}' | \
http PATCH {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId \
content-type:application/json
wget --quiet \
--method PATCH \
--header 'content-type: application/json' \
--body-data '{\n "accountId": "",\n "botFilteringEnabled": false,\n "childLink": {\n "href": "",\n "type": ""\n },\n "created": "",\n "currency": "",\n "defaultPage": "",\n "eCommerceTracking": false,\n "enhancedECommerceTracking": false,\n "excludeQueryParameters": "",\n "id": "",\n "internalWebPropertyId": "",\n "kind": "",\n "name": "",\n "parentLink": {\n "href": "",\n "type": ""\n },\n "permissions": {\n "effective": []\n },\n "selfLink": "",\n "siteSearchCategoryParameters": "",\n "siteSearchQueryParameters": "",\n "starred": false,\n "stripSiteSearchCategoryParameters": false,\n "stripSiteSearchQueryParameters": false,\n "timezone": "",\n "type": "",\n "updated": "",\n "webPropertyId": "",\n "websiteUrl": ""\n}' \
--output-document \
- {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"accountId": "",
"botFilteringEnabled": false,
"childLink": [
"href": "",
"type": ""
],
"created": "",
"currency": "",
"defaultPage": "",
"eCommerceTracking": false,
"enhancedECommerceTracking": false,
"excludeQueryParameters": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"parentLink": [
"href": "",
"type": ""
],
"permissions": ["effective": []],
"selfLink": "",
"siteSearchCategoryParameters": "",
"siteSearchQueryParameters": "",
"starred": false,
"stripSiteSearchCategoryParameters": false,
"stripSiteSearchQueryParameters": false,
"timezone": "",
"type": "",
"updated": "",
"webPropertyId": "",
"websiteUrl": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PUT
analytics.management.profiles.update
{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId
QUERY PARAMS
accountId
webPropertyId
profileId
BODY json
{
"accountId": "",
"botFilteringEnabled": false,
"childLink": {
"href": "",
"type": ""
},
"created": "",
"currency": "",
"defaultPage": "",
"eCommerceTracking": false,
"enhancedECommerceTracking": false,
"excludeQueryParameters": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"permissions": {
"effective": []
},
"selfLink": "",
"siteSearchCategoryParameters": "",
"siteSearchQueryParameters": "",
"starred": false,
"stripSiteSearchCategoryParameters": false,
"stripSiteSearchQueryParameters": false,
"timezone": "",
"type": "",
"updated": "",
"webPropertyId": "",
"websiteUrl": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"accountId\": \"\",\n \"botFilteringEnabled\": false,\n \"childLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"created\": \"\",\n \"currency\": \"\",\n \"defaultPage\": \"\",\n \"eCommerceTracking\": false,\n \"enhancedECommerceTracking\": false,\n \"excludeQueryParameters\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"permissions\": {\n \"effective\": []\n },\n \"selfLink\": \"\",\n \"siteSearchCategoryParameters\": \"\",\n \"siteSearchQueryParameters\": \"\",\n \"starred\": false,\n \"stripSiteSearchCategoryParameters\": false,\n \"stripSiteSearchQueryParameters\": false,\n \"timezone\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\",\n \"websiteUrl\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId" {:content-type :json
:form-params {:accountId ""
:botFilteringEnabled false
:childLink {:href ""
:type ""}
:created ""
:currency ""
:defaultPage ""
:eCommerceTracking false
:enhancedECommerceTracking false
:excludeQueryParameters ""
:id ""
:internalWebPropertyId ""
:kind ""
:name ""
:parentLink {:href ""
:type ""}
:permissions {:effective []}
:selfLink ""
:siteSearchCategoryParameters ""
:siteSearchQueryParameters ""
:starred false
:stripSiteSearchCategoryParameters false
:stripSiteSearchQueryParameters false
:timezone ""
:type ""
:updated ""
:webPropertyId ""
:websiteUrl ""}})
require "http/client"
url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"accountId\": \"\",\n \"botFilteringEnabled\": false,\n \"childLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"created\": \"\",\n \"currency\": \"\",\n \"defaultPage\": \"\",\n \"eCommerceTracking\": false,\n \"enhancedECommerceTracking\": false,\n \"excludeQueryParameters\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"permissions\": {\n \"effective\": []\n },\n \"selfLink\": \"\",\n \"siteSearchCategoryParameters\": \"\",\n \"siteSearchQueryParameters\": \"\",\n \"starred\": false,\n \"stripSiteSearchCategoryParameters\": false,\n \"stripSiteSearchQueryParameters\": false,\n \"timezone\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\",\n \"websiteUrl\": \"\"\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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId"),
Content = new StringContent("{\n \"accountId\": \"\",\n \"botFilteringEnabled\": false,\n \"childLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"created\": \"\",\n \"currency\": \"\",\n \"defaultPage\": \"\",\n \"eCommerceTracking\": false,\n \"enhancedECommerceTracking\": false,\n \"excludeQueryParameters\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"permissions\": {\n \"effective\": []\n },\n \"selfLink\": \"\",\n \"siteSearchCategoryParameters\": \"\",\n \"siteSearchQueryParameters\": \"\",\n \"starred\": false,\n \"stripSiteSearchCategoryParameters\": false,\n \"stripSiteSearchQueryParameters\": false,\n \"timezone\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\",\n \"websiteUrl\": \"\"\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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"accountId\": \"\",\n \"botFilteringEnabled\": false,\n \"childLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"created\": \"\",\n \"currency\": \"\",\n \"defaultPage\": \"\",\n \"eCommerceTracking\": false,\n \"enhancedECommerceTracking\": false,\n \"excludeQueryParameters\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"permissions\": {\n \"effective\": []\n },\n \"selfLink\": \"\",\n \"siteSearchCategoryParameters\": \"\",\n \"siteSearchQueryParameters\": \"\",\n \"starred\": false,\n \"stripSiteSearchCategoryParameters\": false,\n \"stripSiteSearchQueryParameters\": false,\n \"timezone\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\",\n \"websiteUrl\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId"
payload := strings.NewReader("{\n \"accountId\": \"\",\n \"botFilteringEnabled\": false,\n \"childLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"created\": \"\",\n \"currency\": \"\",\n \"defaultPage\": \"\",\n \"eCommerceTracking\": false,\n \"enhancedECommerceTracking\": false,\n \"excludeQueryParameters\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"permissions\": {\n \"effective\": []\n },\n \"selfLink\": \"\",\n \"siteSearchCategoryParameters\": \"\",\n \"siteSearchQueryParameters\": \"\",\n \"starred\": false,\n \"stripSiteSearchCategoryParameters\": false,\n \"stripSiteSearchQueryParameters\": false,\n \"timezone\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\",\n \"websiteUrl\": \"\"\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/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 723
{
"accountId": "",
"botFilteringEnabled": false,
"childLink": {
"href": "",
"type": ""
},
"created": "",
"currency": "",
"defaultPage": "",
"eCommerceTracking": false,
"enhancedECommerceTracking": false,
"excludeQueryParameters": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"permissions": {
"effective": []
},
"selfLink": "",
"siteSearchCategoryParameters": "",
"siteSearchQueryParameters": "",
"starred": false,
"stripSiteSearchCategoryParameters": false,
"stripSiteSearchQueryParameters": false,
"timezone": "",
"type": "",
"updated": "",
"webPropertyId": "",
"websiteUrl": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId")
.setHeader("content-type", "application/json")
.setBody("{\n \"accountId\": \"\",\n \"botFilteringEnabled\": false,\n \"childLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"created\": \"\",\n \"currency\": \"\",\n \"defaultPage\": \"\",\n \"eCommerceTracking\": false,\n \"enhancedECommerceTracking\": false,\n \"excludeQueryParameters\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"permissions\": {\n \"effective\": []\n },\n \"selfLink\": \"\",\n \"siteSearchCategoryParameters\": \"\",\n \"siteSearchQueryParameters\": \"\",\n \"starred\": false,\n \"stripSiteSearchCategoryParameters\": false,\n \"stripSiteSearchQueryParameters\": false,\n \"timezone\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\",\n \"websiteUrl\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"accountId\": \"\",\n \"botFilteringEnabled\": false,\n \"childLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"created\": \"\",\n \"currency\": \"\",\n \"defaultPage\": \"\",\n \"eCommerceTracking\": false,\n \"enhancedECommerceTracking\": false,\n \"excludeQueryParameters\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"permissions\": {\n \"effective\": []\n },\n \"selfLink\": \"\",\n \"siteSearchCategoryParameters\": \"\",\n \"siteSearchQueryParameters\": \"\",\n \"starred\": false,\n \"stripSiteSearchCategoryParameters\": false,\n \"stripSiteSearchQueryParameters\": false,\n \"timezone\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\",\n \"websiteUrl\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"accountId\": \"\",\n \"botFilteringEnabled\": false,\n \"childLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"created\": \"\",\n \"currency\": \"\",\n \"defaultPage\": \"\",\n \"eCommerceTracking\": false,\n \"enhancedECommerceTracking\": false,\n \"excludeQueryParameters\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"permissions\": {\n \"effective\": []\n },\n \"selfLink\": \"\",\n \"siteSearchCategoryParameters\": \"\",\n \"siteSearchQueryParameters\": \"\",\n \"starred\": false,\n \"stripSiteSearchCategoryParameters\": false,\n \"stripSiteSearchQueryParameters\": false,\n \"timezone\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\",\n \"websiteUrl\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId")
.header("content-type", "application/json")
.body("{\n \"accountId\": \"\",\n \"botFilteringEnabled\": false,\n \"childLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"created\": \"\",\n \"currency\": \"\",\n \"defaultPage\": \"\",\n \"eCommerceTracking\": false,\n \"enhancedECommerceTracking\": false,\n \"excludeQueryParameters\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"permissions\": {\n \"effective\": []\n },\n \"selfLink\": \"\",\n \"siteSearchCategoryParameters\": \"\",\n \"siteSearchQueryParameters\": \"\",\n \"starred\": false,\n \"stripSiteSearchCategoryParameters\": false,\n \"stripSiteSearchQueryParameters\": false,\n \"timezone\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\",\n \"websiteUrl\": \"\"\n}")
.asString();
const data = JSON.stringify({
accountId: '',
botFilteringEnabled: false,
childLink: {
href: '',
type: ''
},
created: '',
currency: '',
defaultPage: '',
eCommerceTracking: false,
enhancedECommerceTracking: false,
excludeQueryParameters: '',
id: '',
internalWebPropertyId: '',
kind: '',
name: '',
parentLink: {
href: '',
type: ''
},
permissions: {
effective: []
},
selfLink: '',
siteSearchCategoryParameters: '',
siteSearchQueryParameters: '',
starred: false,
stripSiteSearchCategoryParameters: false,
stripSiteSearchQueryParameters: false,
timezone: '',
type: '',
updated: '',
webPropertyId: '',
websiteUrl: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId',
headers: {'content-type': 'application/json'},
data: {
accountId: '',
botFilteringEnabled: false,
childLink: {href: '', type: ''},
created: '',
currency: '',
defaultPage: '',
eCommerceTracking: false,
enhancedECommerceTracking: false,
excludeQueryParameters: '',
id: '',
internalWebPropertyId: '',
kind: '',
name: '',
parentLink: {href: '', type: ''},
permissions: {effective: []},
selfLink: '',
siteSearchCategoryParameters: '',
siteSearchQueryParameters: '',
starred: false,
stripSiteSearchCategoryParameters: false,
stripSiteSearchQueryParameters: false,
timezone: '',
type: '',
updated: '',
webPropertyId: '',
websiteUrl: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"accountId":"","botFilteringEnabled":false,"childLink":{"href":"","type":""},"created":"","currency":"","defaultPage":"","eCommerceTracking":false,"enhancedECommerceTracking":false,"excludeQueryParameters":"","id":"","internalWebPropertyId":"","kind":"","name":"","parentLink":{"href":"","type":""},"permissions":{"effective":[]},"selfLink":"","siteSearchCategoryParameters":"","siteSearchQueryParameters":"","starred":false,"stripSiteSearchCategoryParameters":false,"stripSiteSearchQueryParameters":false,"timezone":"","type":"","updated":"","webPropertyId":"","websiteUrl":""}'
};
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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "accountId": "",\n "botFilteringEnabled": false,\n "childLink": {\n "href": "",\n "type": ""\n },\n "created": "",\n "currency": "",\n "defaultPage": "",\n "eCommerceTracking": false,\n "enhancedECommerceTracking": false,\n "excludeQueryParameters": "",\n "id": "",\n "internalWebPropertyId": "",\n "kind": "",\n "name": "",\n "parentLink": {\n "href": "",\n "type": ""\n },\n "permissions": {\n "effective": []\n },\n "selfLink": "",\n "siteSearchCategoryParameters": "",\n "siteSearchQueryParameters": "",\n "starred": false,\n "stripSiteSearchCategoryParameters": false,\n "stripSiteSearchQueryParameters": false,\n "timezone": "",\n "type": "",\n "updated": "",\n "webPropertyId": "",\n "websiteUrl": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"accountId\": \"\",\n \"botFilteringEnabled\": false,\n \"childLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"created\": \"\",\n \"currency\": \"\",\n \"defaultPage\": \"\",\n \"eCommerceTracking\": false,\n \"enhancedECommerceTracking\": false,\n \"excludeQueryParameters\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"permissions\": {\n \"effective\": []\n },\n \"selfLink\": \"\",\n \"siteSearchCategoryParameters\": \"\",\n \"siteSearchQueryParameters\": \"\",\n \"starred\": false,\n \"stripSiteSearchCategoryParameters\": false,\n \"stripSiteSearchQueryParameters\": false,\n \"timezone\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\",\n \"websiteUrl\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId")
.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/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
accountId: '',
botFilteringEnabled: false,
childLink: {href: '', type: ''},
created: '',
currency: '',
defaultPage: '',
eCommerceTracking: false,
enhancedECommerceTracking: false,
excludeQueryParameters: '',
id: '',
internalWebPropertyId: '',
kind: '',
name: '',
parentLink: {href: '', type: ''},
permissions: {effective: []},
selfLink: '',
siteSearchCategoryParameters: '',
siteSearchQueryParameters: '',
starred: false,
stripSiteSearchCategoryParameters: false,
stripSiteSearchQueryParameters: false,
timezone: '',
type: '',
updated: '',
webPropertyId: '',
websiteUrl: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId',
headers: {'content-type': 'application/json'},
body: {
accountId: '',
botFilteringEnabled: false,
childLink: {href: '', type: ''},
created: '',
currency: '',
defaultPage: '',
eCommerceTracking: false,
enhancedECommerceTracking: false,
excludeQueryParameters: '',
id: '',
internalWebPropertyId: '',
kind: '',
name: '',
parentLink: {href: '', type: ''},
permissions: {effective: []},
selfLink: '',
siteSearchCategoryParameters: '',
siteSearchQueryParameters: '',
starred: false,
stripSiteSearchCategoryParameters: false,
stripSiteSearchQueryParameters: false,
timezone: '',
type: '',
updated: '',
webPropertyId: '',
websiteUrl: ''
},
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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
accountId: '',
botFilteringEnabled: false,
childLink: {
href: '',
type: ''
},
created: '',
currency: '',
defaultPage: '',
eCommerceTracking: false,
enhancedECommerceTracking: false,
excludeQueryParameters: '',
id: '',
internalWebPropertyId: '',
kind: '',
name: '',
parentLink: {
href: '',
type: ''
},
permissions: {
effective: []
},
selfLink: '',
siteSearchCategoryParameters: '',
siteSearchQueryParameters: '',
starred: false,
stripSiteSearchCategoryParameters: false,
stripSiteSearchQueryParameters: false,
timezone: '',
type: '',
updated: '',
webPropertyId: '',
websiteUrl: ''
});
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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId',
headers: {'content-type': 'application/json'},
data: {
accountId: '',
botFilteringEnabled: false,
childLink: {href: '', type: ''},
created: '',
currency: '',
defaultPage: '',
eCommerceTracking: false,
enhancedECommerceTracking: false,
excludeQueryParameters: '',
id: '',
internalWebPropertyId: '',
kind: '',
name: '',
parentLink: {href: '', type: ''},
permissions: {effective: []},
selfLink: '',
siteSearchCategoryParameters: '',
siteSearchQueryParameters: '',
starred: false,
stripSiteSearchCategoryParameters: false,
stripSiteSearchQueryParameters: false,
timezone: '',
type: '',
updated: '',
webPropertyId: '',
websiteUrl: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"accountId":"","botFilteringEnabled":false,"childLink":{"href":"","type":""},"created":"","currency":"","defaultPage":"","eCommerceTracking":false,"enhancedECommerceTracking":false,"excludeQueryParameters":"","id":"","internalWebPropertyId":"","kind":"","name":"","parentLink":{"href":"","type":""},"permissions":{"effective":[]},"selfLink":"","siteSearchCategoryParameters":"","siteSearchQueryParameters":"","starred":false,"stripSiteSearchCategoryParameters":false,"stripSiteSearchQueryParameters":false,"timezone":"","type":"","updated":"","webPropertyId":"","websiteUrl":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"accountId": @"",
@"botFilteringEnabled": @NO,
@"childLink": @{ @"href": @"", @"type": @"" },
@"created": @"",
@"currency": @"",
@"defaultPage": @"",
@"eCommerceTracking": @NO,
@"enhancedECommerceTracking": @NO,
@"excludeQueryParameters": @"",
@"id": @"",
@"internalWebPropertyId": @"",
@"kind": @"",
@"name": @"",
@"parentLink": @{ @"href": @"", @"type": @"" },
@"permissions": @{ @"effective": @[ ] },
@"selfLink": @"",
@"siteSearchCategoryParameters": @"",
@"siteSearchQueryParameters": @"",
@"starred": @NO,
@"stripSiteSearchCategoryParameters": @NO,
@"stripSiteSearchQueryParameters": @NO,
@"timezone": @"",
@"type": @"",
@"updated": @"",
@"webPropertyId": @"",
@"websiteUrl": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId"]
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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"accountId\": \"\",\n \"botFilteringEnabled\": false,\n \"childLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"created\": \"\",\n \"currency\": \"\",\n \"defaultPage\": \"\",\n \"eCommerceTracking\": false,\n \"enhancedECommerceTracking\": false,\n \"excludeQueryParameters\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"permissions\": {\n \"effective\": []\n },\n \"selfLink\": \"\",\n \"siteSearchCategoryParameters\": \"\",\n \"siteSearchQueryParameters\": \"\",\n \"starred\": false,\n \"stripSiteSearchCategoryParameters\": false,\n \"stripSiteSearchQueryParameters\": false,\n \"timezone\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\",\n \"websiteUrl\": \"\"\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId",
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([
'accountId' => '',
'botFilteringEnabled' => null,
'childLink' => [
'href' => '',
'type' => ''
],
'created' => '',
'currency' => '',
'defaultPage' => '',
'eCommerceTracking' => null,
'enhancedECommerceTracking' => null,
'excludeQueryParameters' => '',
'id' => '',
'internalWebPropertyId' => '',
'kind' => '',
'name' => '',
'parentLink' => [
'href' => '',
'type' => ''
],
'permissions' => [
'effective' => [
]
],
'selfLink' => '',
'siteSearchCategoryParameters' => '',
'siteSearchQueryParameters' => '',
'starred' => null,
'stripSiteSearchCategoryParameters' => null,
'stripSiteSearchQueryParameters' => null,
'timezone' => '',
'type' => '',
'updated' => '',
'webPropertyId' => '',
'websiteUrl' => ''
]),
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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId', [
'body' => '{
"accountId": "",
"botFilteringEnabled": false,
"childLink": {
"href": "",
"type": ""
},
"created": "",
"currency": "",
"defaultPage": "",
"eCommerceTracking": false,
"enhancedECommerceTracking": false,
"excludeQueryParameters": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"permissions": {
"effective": []
},
"selfLink": "",
"siteSearchCategoryParameters": "",
"siteSearchQueryParameters": "",
"starred": false,
"stripSiteSearchCategoryParameters": false,
"stripSiteSearchQueryParameters": false,
"timezone": "",
"type": "",
"updated": "",
"webPropertyId": "",
"websiteUrl": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'accountId' => '',
'botFilteringEnabled' => null,
'childLink' => [
'href' => '',
'type' => ''
],
'created' => '',
'currency' => '',
'defaultPage' => '',
'eCommerceTracking' => null,
'enhancedECommerceTracking' => null,
'excludeQueryParameters' => '',
'id' => '',
'internalWebPropertyId' => '',
'kind' => '',
'name' => '',
'parentLink' => [
'href' => '',
'type' => ''
],
'permissions' => [
'effective' => [
]
],
'selfLink' => '',
'siteSearchCategoryParameters' => '',
'siteSearchQueryParameters' => '',
'starred' => null,
'stripSiteSearchCategoryParameters' => null,
'stripSiteSearchQueryParameters' => null,
'timezone' => '',
'type' => '',
'updated' => '',
'webPropertyId' => '',
'websiteUrl' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'accountId' => '',
'botFilteringEnabled' => null,
'childLink' => [
'href' => '',
'type' => ''
],
'created' => '',
'currency' => '',
'defaultPage' => '',
'eCommerceTracking' => null,
'enhancedECommerceTracking' => null,
'excludeQueryParameters' => '',
'id' => '',
'internalWebPropertyId' => '',
'kind' => '',
'name' => '',
'parentLink' => [
'href' => '',
'type' => ''
],
'permissions' => [
'effective' => [
]
],
'selfLink' => '',
'siteSearchCategoryParameters' => '',
'siteSearchQueryParameters' => '',
'starred' => null,
'stripSiteSearchCategoryParameters' => null,
'stripSiteSearchQueryParameters' => null,
'timezone' => '',
'type' => '',
'updated' => '',
'webPropertyId' => '',
'websiteUrl' => ''
]));
$request->setRequestUrl('{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId');
$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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"accountId": "",
"botFilteringEnabled": false,
"childLink": {
"href": "",
"type": ""
},
"created": "",
"currency": "",
"defaultPage": "",
"eCommerceTracking": false,
"enhancedECommerceTracking": false,
"excludeQueryParameters": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"permissions": {
"effective": []
},
"selfLink": "",
"siteSearchCategoryParameters": "",
"siteSearchQueryParameters": "",
"starred": false,
"stripSiteSearchCategoryParameters": false,
"stripSiteSearchQueryParameters": false,
"timezone": "",
"type": "",
"updated": "",
"webPropertyId": "",
"websiteUrl": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"accountId": "",
"botFilteringEnabled": false,
"childLink": {
"href": "",
"type": ""
},
"created": "",
"currency": "",
"defaultPage": "",
"eCommerceTracking": false,
"enhancedECommerceTracking": false,
"excludeQueryParameters": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"permissions": {
"effective": []
},
"selfLink": "",
"siteSearchCategoryParameters": "",
"siteSearchQueryParameters": "",
"starred": false,
"stripSiteSearchCategoryParameters": false,
"stripSiteSearchQueryParameters": false,
"timezone": "",
"type": "",
"updated": "",
"webPropertyId": "",
"websiteUrl": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"accountId\": \"\",\n \"botFilteringEnabled\": false,\n \"childLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"created\": \"\",\n \"currency\": \"\",\n \"defaultPage\": \"\",\n \"eCommerceTracking\": false,\n \"enhancedECommerceTracking\": false,\n \"excludeQueryParameters\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"permissions\": {\n \"effective\": []\n },\n \"selfLink\": \"\",\n \"siteSearchCategoryParameters\": \"\",\n \"siteSearchQueryParameters\": \"\",\n \"starred\": false,\n \"stripSiteSearchCategoryParameters\": false,\n \"stripSiteSearchQueryParameters\": false,\n \"timezone\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\",\n \"websiteUrl\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId"
payload = {
"accountId": "",
"botFilteringEnabled": False,
"childLink": {
"href": "",
"type": ""
},
"created": "",
"currency": "",
"defaultPage": "",
"eCommerceTracking": False,
"enhancedECommerceTracking": False,
"excludeQueryParameters": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"permissions": { "effective": [] },
"selfLink": "",
"siteSearchCategoryParameters": "",
"siteSearchQueryParameters": "",
"starred": False,
"stripSiteSearchCategoryParameters": False,
"stripSiteSearchQueryParameters": False,
"timezone": "",
"type": "",
"updated": "",
"webPropertyId": "",
"websiteUrl": ""
}
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId"
payload <- "{\n \"accountId\": \"\",\n \"botFilteringEnabled\": false,\n \"childLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"created\": \"\",\n \"currency\": \"\",\n \"defaultPage\": \"\",\n \"eCommerceTracking\": false,\n \"enhancedECommerceTracking\": false,\n \"excludeQueryParameters\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"permissions\": {\n \"effective\": []\n },\n \"selfLink\": \"\",\n \"siteSearchCategoryParameters\": \"\",\n \"siteSearchQueryParameters\": \"\",\n \"starred\": false,\n \"stripSiteSearchCategoryParameters\": false,\n \"stripSiteSearchQueryParameters\": false,\n \"timezone\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\",\n \"websiteUrl\": \"\"\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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId")
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 \"accountId\": \"\",\n \"botFilteringEnabled\": false,\n \"childLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"created\": \"\",\n \"currency\": \"\",\n \"defaultPage\": \"\",\n \"eCommerceTracking\": false,\n \"enhancedECommerceTracking\": false,\n \"excludeQueryParameters\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"permissions\": {\n \"effective\": []\n },\n \"selfLink\": \"\",\n \"siteSearchCategoryParameters\": \"\",\n \"siteSearchQueryParameters\": \"\",\n \"starred\": false,\n \"stripSiteSearchCategoryParameters\": false,\n \"stripSiteSearchQueryParameters\": false,\n \"timezone\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\",\n \"websiteUrl\": \"\"\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/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId') do |req|
req.body = "{\n \"accountId\": \"\",\n \"botFilteringEnabled\": false,\n \"childLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"created\": \"\",\n \"currency\": \"\",\n \"defaultPage\": \"\",\n \"eCommerceTracking\": false,\n \"enhancedECommerceTracking\": false,\n \"excludeQueryParameters\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"permissions\": {\n \"effective\": []\n },\n \"selfLink\": \"\",\n \"siteSearchCategoryParameters\": \"\",\n \"siteSearchQueryParameters\": \"\",\n \"starred\": false,\n \"stripSiteSearchCategoryParameters\": false,\n \"stripSiteSearchQueryParameters\": false,\n \"timezone\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\",\n \"websiteUrl\": \"\"\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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId";
let payload = json!({
"accountId": "",
"botFilteringEnabled": false,
"childLink": json!({
"href": "",
"type": ""
}),
"created": "",
"currency": "",
"defaultPage": "",
"eCommerceTracking": false,
"enhancedECommerceTracking": false,
"excludeQueryParameters": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"parentLink": json!({
"href": "",
"type": ""
}),
"permissions": json!({"effective": ()}),
"selfLink": "",
"siteSearchCategoryParameters": "",
"siteSearchQueryParameters": "",
"starred": false,
"stripSiteSearchCategoryParameters": false,
"stripSiteSearchQueryParameters": false,
"timezone": "",
"type": "",
"updated": "",
"webPropertyId": "",
"websiteUrl": ""
});
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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId \
--header 'content-type: application/json' \
--data '{
"accountId": "",
"botFilteringEnabled": false,
"childLink": {
"href": "",
"type": ""
},
"created": "",
"currency": "",
"defaultPage": "",
"eCommerceTracking": false,
"enhancedECommerceTracking": false,
"excludeQueryParameters": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"permissions": {
"effective": []
},
"selfLink": "",
"siteSearchCategoryParameters": "",
"siteSearchQueryParameters": "",
"starred": false,
"stripSiteSearchCategoryParameters": false,
"stripSiteSearchQueryParameters": false,
"timezone": "",
"type": "",
"updated": "",
"webPropertyId": "",
"websiteUrl": ""
}'
echo '{
"accountId": "",
"botFilteringEnabled": false,
"childLink": {
"href": "",
"type": ""
},
"created": "",
"currency": "",
"defaultPage": "",
"eCommerceTracking": false,
"enhancedECommerceTracking": false,
"excludeQueryParameters": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"permissions": {
"effective": []
},
"selfLink": "",
"siteSearchCategoryParameters": "",
"siteSearchQueryParameters": "",
"starred": false,
"stripSiteSearchCategoryParameters": false,
"stripSiteSearchQueryParameters": false,
"timezone": "",
"type": "",
"updated": "",
"webPropertyId": "",
"websiteUrl": ""
}' | \
http PUT {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '{\n "accountId": "",\n "botFilteringEnabled": false,\n "childLink": {\n "href": "",\n "type": ""\n },\n "created": "",\n "currency": "",\n "defaultPage": "",\n "eCommerceTracking": false,\n "enhancedECommerceTracking": false,\n "excludeQueryParameters": "",\n "id": "",\n "internalWebPropertyId": "",\n "kind": "",\n "name": "",\n "parentLink": {\n "href": "",\n "type": ""\n },\n "permissions": {\n "effective": []\n },\n "selfLink": "",\n "siteSearchCategoryParameters": "",\n "siteSearchQueryParameters": "",\n "starred": false,\n "stripSiteSearchCategoryParameters": false,\n "stripSiteSearchQueryParameters": false,\n "timezone": "",\n "type": "",\n "updated": "",\n "webPropertyId": "",\n "websiteUrl": ""\n}' \
--output-document \
- {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"accountId": "",
"botFilteringEnabled": false,
"childLink": [
"href": "",
"type": ""
],
"created": "",
"currency": "",
"defaultPage": "",
"eCommerceTracking": false,
"enhancedECommerceTracking": false,
"excludeQueryParameters": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"parentLink": [
"href": "",
"type": ""
],
"permissions": ["effective": []],
"selfLink": "",
"siteSearchCategoryParameters": "",
"siteSearchQueryParameters": "",
"starred": false,
"stripSiteSearchCategoryParameters": false,
"stripSiteSearchQueryParameters": false,
"timezone": "",
"type": "",
"updated": "",
"webPropertyId": "",
"websiteUrl": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId")! 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()
DELETE
analytics.management.remarketingAudience.delete
{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId
QUERY PARAMS
accountId
webPropertyId
remarketingAudienceId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId")
require "http/client"
url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId"
response = HTTP::Client.delete url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Delete,
RequestUri = new Uri("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId"
req, _ := http.NewRequest("DELETE", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
DELETE /baseUrl/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId"))
.method("DELETE", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('DELETE', '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'DELETE',
url: '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId';
const options = {method: 'DELETE'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId")
.delete(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'DELETE',
url: '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'DELETE',
url: '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId';
const options = {method: 'DELETE'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"DELETE"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId" in
Client.call `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('DELETE', '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId');
echo $response->getBody();
setUrl('{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId');
$request->setMethod(HTTP_METH_DELETE);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId"
response = requests.delete(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId"
response <- VERB("DELETE", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.delete('/baseUrl/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId";
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("DELETE").unwrap(), url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request DELETE \
--url {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId
http DELETE {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId
wget --quiet \
--method DELETE \
--output-document \
- {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "DELETE"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
analytics.management.remarketingAudience.get
{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId
QUERY PARAMS
accountId
webPropertyId
remarketingAudienceId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId")
require "http/client"
url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId"
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}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId"
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/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId"))
.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}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId")
.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}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId';
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}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId',
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}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId');
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}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId';
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}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId"]
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}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId",
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}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId');
echo $response->getBody();
setUrl('{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId")
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/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId";
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}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId
http GET {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId")! 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
analytics.management.remarketingAudience.insert
{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences
QUERY PARAMS
accountId
webPropertyId
BODY json
{
"accountId": "",
"audienceDefinition": {
"includeConditions": {
"daysToLookBack": 0,
"isSmartList": false,
"kind": "",
"membershipDurationDays": 0,
"segment": ""
}
},
"audienceType": "",
"created": "",
"description": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"linkedAdAccounts": [
{
"accountId": "",
"eligibleForSearch": false,
"id": "",
"internalWebPropertyId": "",
"kind": "",
"linkedAccountId": "",
"remarketingAudienceId": "",
"status": "",
"type": "",
"webPropertyId": ""
}
],
"linkedViews": [],
"name": "",
"stateBasedAudienceDefinition": {
"excludeConditions": {
"exclusionDuration": "",
"segment": ""
},
"includeConditions": {}
},
"updated": "",
"webPropertyId": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"accountId\": \"\",\n \"audienceDefinition\": {\n \"includeConditions\": {\n \"daysToLookBack\": 0,\n \"isSmartList\": false,\n \"kind\": \"\",\n \"membershipDurationDays\": 0,\n \"segment\": \"\"\n }\n },\n \"audienceType\": \"\",\n \"created\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"linkedAdAccounts\": [\n {\n \"accountId\": \"\",\n \"eligibleForSearch\": false,\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"linkedAccountId\": \"\",\n \"remarketingAudienceId\": \"\",\n \"status\": \"\",\n \"type\": \"\",\n \"webPropertyId\": \"\"\n }\n ],\n \"linkedViews\": [],\n \"name\": \"\",\n \"stateBasedAudienceDefinition\": {\n \"excludeConditions\": {\n \"exclusionDuration\": \"\",\n \"segment\": \"\"\n },\n \"includeConditions\": {}\n },\n \"updated\": \"\",\n \"webPropertyId\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences" {:content-type :json
:form-params {:accountId ""
:audienceDefinition {:includeConditions {:daysToLookBack 0
:isSmartList false
:kind ""
:membershipDurationDays 0
:segment ""}}
:audienceType ""
:created ""
:description ""
:id ""
:internalWebPropertyId ""
:kind ""
:linkedAdAccounts [{:accountId ""
:eligibleForSearch false
:id ""
:internalWebPropertyId ""
:kind ""
:linkedAccountId ""
:remarketingAudienceId ""
:status ""
:type ""
:webPropertyId ""}]
:linkedViews []
:name ""
:stateBasedAudienceDefinition {:excludeConditions {:exclusionDuration ""
:segment ""}
:includeConditions {}}
:updated ""
:webPropertyId ""}})
require "http/client"
url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"accountId\": \"\",\n \"audienceDefinition\": {\n \"includeConditions\": {\n \"daysToLookBack\": 0,\n \"isSmartList\": false,\n \"kind\": \"\",\n \"membershipDurationDays\": 0,\n \"segment\": \"\"\n }\n },\n \"audienceType\": \"\",\n \"created\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"linkedAdAccounts\": [\n {\n \"accountId\": \"\",\n \"eligibleForSearch\": false,\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"linkedAccountId\": \"\",\n \"remarketingAudienceId\": \"\",\n \"status\": \"\",\n \"type\": \"\",\n \"webPropertyId\": \"\"\n }\n ],\n \"linkedViews\": [],\n \"name\": \"\",\n \"stateBasedAudienceDefinition\": {\n \"excludeConditions\": {\n \"exclusionDuration\": \"\",\n \"segment\": \"\"\n },\n \"includeConditions\": {}\n },\n \"updated\": \"\",\n \"webPropertyId\": \"\"\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}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences"),
Content = new StringContent("{\n \"accountId\": \"\",\n \"audienceDefinition\": {\n \"includeConditions\": {\n \"daysToLookBack\": 0,\n \"isSmartList\": false,\n \"kind\": \"\",\n \"membershipDurationDays\": 0,\n \"segment\": \"\"\n }\n },\n \"audienceType\": \"\",\n \"created\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"linkedAdAccounts\": [\n {\n \"accountId\": \"\",\n \"eligibleForSearch\": false,\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"linkedAccountId\": \"\",\n \"remarketingAudienceId\": \"\",\n \"status\": \"\",\n \"type\": \"\",\n \"webPropertyId\": \"\"\n }\n ],\n \"linkedViews\": [],\n \"name\": \"\",\n \"stateBasedAudienceDefinition\": {\n \"excludeConditions\": {\n \"exclusionDuration\": \"\",\n \"segment\": \"\"\n },\n \"includeConditions\": {}\n },\n \"updated\": \"\",\n \"webPropertyId\": \"\"\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}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"accountId\": \"\",\n \"audienceDefinition\": {\n \"includeConditions\": {\n \"daysToLookBack\": 0,\n \"isSmartList\": false,\n \"kind\": \"\",\n \"membershipDurationDays\": 0,\n \"segment\": \"\"\n }\n },\n \"audienceType\": \"\",\n \"created\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"linkedAdAccounts\": [\n {\n \"accountId\": \"\",\n \"eligibleForSearch\": false,\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"linkedAccountId\": \"\",\n \"remarketingAudienceId\": \"\",\n \"status\": \"\",\n \"type\": \"\",\n \"webPropertyId\": \"\"\n }\n ],\n \"linkedViews\": [],\n \"name\": \"\",\n \"stateBasedAudienceDefinition\": {\n \"excludeConditions\": {\n \"exclusionDuration\": \"\",\n \"segment\": \"\"\n },\n \"includeConditions\": {}\n },\n \"updated\": \"\",\n \"webPropertyId\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences"
payload := strings.NewReader("{\n \"accountId\": \"\",\n \"audienceDefinition\": {\n \"includeConditions\": {\n \"daysToLookBack\": 0,\n \"isSmartList\": false,\n \"kind\": \"\",\n \"membershipDurationDays\": 0,\n \"segment\": \"\"\n }\n },\n \"audienceType\": \"\",\n \"created\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"linkedAdAccounts\": [\n {\n \"accountId\": \"\",\n \"eligibleForSearch\": false,\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"linkedAccountId\": \"\",\n \"remarketingAudienceId\": \"\",\n \"status\": \"\",\n \"type\": \"\",\n \"webPropertyId\": \"\"\n }\n ],\n \"linkedViews\": [],\n \"name\": \"\",\n \"stateBasedAudienceDefinition\": {\n \"excludeConditions\": {\n \"exclusionDuration\": \"\",\n \"segment\": \"\"\n },\n \"includeConditions\": {}\n },\n \"updated\": \"\",\n \"webPropertyId\": \"\"\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/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 854
{
"accountId": "",
"audienceDefinition": {
"includeConditions": {
"daysToLookBack": 0,
"isSmartList": false,
"kind": "",
"membershipDurationDays": 0,
"segment": ""
}
},
"audienceType": "",
"created": "",
"description": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"linkedAdAccounts": [
{
"accountId": "",
"eligibleForSearch": false,
"id": "",
"internalWebPropertyId": "",
"kind": "",
"linkedAccountId": "",
"remarketingAudienceId": "",
"status": "",
"type": "",
"webPropertyId": ""
}
],
"linkedViews": [],
"name": "",
"stateBasedAudienceDefinition": {
"excludeConditions": {
"exclusionDuration": "",
"segment": ""
},
"includeConditions": {}
},
"updated": "",
"webPropertyId": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences")
.setHeader("content-type", "application/json")
.setBody("{\n \"accountId\": \"\",\n \"audienceDefinition\": {\n \"includeConditions\": {\n \"daysToLookBack\": 0,\n \"isSmartList\": false,\n \"kind\": \"\",\n \"membershipDurationDays\": 0,\n \"segment\": \"\"\n }\n },\n \"audienceType\": \"\",\n \"created\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"linkedAdAccounts\": [\n {\n \"accountId\": \"\",\n \"eligibleForSearch\": false,\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"linkedAccountId\": \"\",\n \"remarketingAudienceId\": \"\",\n \"status\": \"\",\n \"type\": \"\",\n \"webPropertyId\": \"\"\n }\n ],\n \"linkedViews\": [],\n \"name\": \"\",\n \"stateBasedAudienceDefinition\": {\n \"excludeConditions\": {\n \"exclusionDuration\": \"\",\n \"segment\": \"\"\n },\n \"includeConditions\": {}\n },\n \"updated\": \"\",\n \"webPropertyId\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"accountId\": \"\",\n \"audienceDefinition\": {\n \"includeConditions\": {\n \"daysToLookBack\": 0,\n \"isSmartList\": false,\n \"kind\": \"\",\n \"membershipDurationDays\": 0,\n \"segment\": \"\"\n }\n },\n \"audienceType\": \"\",\n \"created\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"linkedAdAccounts\": [\n {\n \"accountId\": \"\",\n \"eligibleForSearch\": false,\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"linkedAccountId\": \"\",\n \"remarketingAudienceId\": \"\",\n \"status\": \"\",\n \"type\": \"\",\n \"webPropertyId\": \"\"\n }\n ],\n \"linkedViews\": [],\n \"name\": \"\",\n \"stateBasedAudienceDefinition\": {\n \"excludeConditions\": {\n \"exclusionDuration\": \"\",\n \"segment\": \"\"\n },\n \"includeConditions\": {}\n },\n \"updated\": \"\",\n \"webPropertyId\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"accountId\": \"\",\n \"audienceDefinition\": {\n \"includeConditions\": {\n \"daysToLookBack\": 0,\n \"isSmartList\": false,\n \"kind\": \"\",\n \"membershipDurationDays\": 0,\n \"segment\": \"\"\n }\n },\n \"audienceType\": \"\",\n \"created\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"linkedAdAccounts\": [\n {\n \"accountId\": \"\",\n \"eligibleForSearch\": false,\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"linkedAccountId\": \"\",\n \"remarketingAudienceId\": \"\",\n \"status\": \"\",\n \"type\": \"\",\n \"webPropertyId\": \"\"\n }\n ],\n \"linkedViews\": [],\n \"name\": \"\",\n \"stateBasedAudienceDefinition\": {\n \"excludeConditions\": {\n \"exclusionDuration\": \"\",\n \"segment\": \"\"\n },\n \"includeConditions\": {}\n },\n \"updated\": \"\",\n \"webPropertyId\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences")
.header("content-type", "application/json")
.body("{\n \"accountId\": \"\",\n \"audienceDefinition\": {\n \"includeConditions\": {\n \"daysToLookBack\": 0,\n \"isSmartList\": false,\n \"kind\": \"\",\n \"membershipDurationDays\": 0,\n \"segment\": \"\"\n }\n },\n \"audienceType\": \"\",\n \"created\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"linkedAdAccounts\": [\n {\n \"accountId\": \"\",\n \"eligibleForSearch\": false,\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"linkedAccountId\": \"\",\n \"remarketingAudienceId\": \"\",\n \"status\": \"\",\n \"type\": \"\",\n \"webPropertyId\": \"\"\n }\n ],\n \"linkedViews\": [],\n \"name\": \"\",\n \"stateBasedAudienceDefinition\": {\n \"excludeConditions\": {\n \"exclusionDuration\": \"\",\n \"segment\": \"\"\n },\n \"includeConditions\": {}\n },\n \"updated\": \"\",\n \"webPropertyId\": \"\"\n}")
.asString();
const data = JSON.stringify({
accountId: '',
audienceDefinition: {
includeConditions: {
daysToLookBack: 0,
isSmartList: false,
kind: '',
membershipDurationDays: 0,
segment: ''
}
},
audienceType: '',
created: '',
description: '',
id: '',
internalWebPropertyId: '',
kind: '',
linkedAdAccounts: [
{
accountId: '',
eligibleForSearch: false,
id: '',
internalWebPropertyId: '',
kind: '',
linkedAccountId: '',
remarketingAudienceId: '',
status: '',
type: '',
webPropertyId: ''
}
],
linkedViews: [],
name: '',
stateBasedAudienceDefinition: {
excludeConditions: {
exclusionDuration: '',
segment: ''
},
includeConditions: {}
},
updated: '',
webPropertyId: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences',
headers: {'content-type': 'application/json'},
data: {
accountId: '',
audienceDefinition: {
includeConditions: {
daysToLookBack: 0,
isSmartList: false,
kind: '',
membershipDurationDays: 0,
segment: ''
}
},
audienceType: '',
created: '',
description: '',
id: '',
internalWebPropertyId: '',
kind: '',
linkedAdAccounts: [
{
accountId: '',
eligibleForSearch: false,
id: '',
internalWebPropertyId: '',
kind: '',
linkedAccountId: '',
remarketingAudienceId: '',
status: '',
type: '',
webPropertyId: ''
}
],
linkedViews: [],
name: '',
stateBasedAudienceDefinition: {excludeConditions: {exclusionDuration: '', segment: ''}, includeConditions: {}},
updated: '',
webPropertyId: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"accountId":"","audienceDefinition":{"includeConditions":{"daysToLookBack":0,"isSmartList":false,"kind":"","membershipDurationDays":0,"segment":""}},"audienceType":"","created":"","description":"","id":"","internalWebPropertyId":"","kind":"","linkedAdAccounts":[{"accountId":"","eligibleForSearch":false,"id":"","internalWebPropertyId":"","kind":"","linkedAccountId":"","remarketingAudienceId":"","status":"","type":"","webPropertyId":""}],"linkedViews":[],"name":"","stateBasedAudienceDefinition":{"excludeConditions":{"exclusionDuration":"","segment":""},"includeConditions":{}},"updated":"","webPropertyId":""}'
};
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}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "accountId": "",\n "audienceDefinition": {\n "includeConditions": {\n "daysToLookBack": 0,\n "isSmartList": false,\n "kind": "",\n "membershipDurationDays": 0,\n "segment": ""\n }\n },\n "audienceType": "",\n "created": "",\n "description": "",\n "id": "",\n "internalWebPropertyId": "",\n "kind": "",\n "linkedAdAccounts": [\n {\n "accountId": "",\n "eligibleForSearch": false,\n "id": "",\n "internalWebPropertyId": "",\n "kind": "",\n "linkedAccountId": "",\n "remarketingAudienceId": "",\n "status": "",\n "type": "",\n "webPropertyId": ""\n }\n ],\n "linkedViews": [],\n "name": "",\n "stateBasedAudienceDefinition": {\n "excludeConditions": {\n "exclusionDuration": "",\n "segment": ""\n },\n "includeConditions": {}\n },\n "updated": "",\n "webPropertyId": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"accountId\": \"\",\n \"audienceDefinition\": {\n \"includeConditions\": {\n \"daysToLookBack\": 0,\n \"isSmartList\": false,\n \"kind\": \"\",\n \"membershipDurationDays\": 0,\n \"segment\": \"\"\n }\n },\n \"audienceType\": \"\",\n \"created\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"linkedAdAccounts\": [\n {\n \"accountId\": \"\",\n \"eligibleForSearch\": false,\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"linkedAccountId\": \"\",\n \"remarketingAudienceId\": \"\",\n \"status\": \"\",\n \"type\": \"\",\n \"webPropertyId\": \"\"\n }\n ],\n \"linkedViews\": [],\n \"name\": \"\",\n \"stateBasedAudienceDefinition\": {\n \"excludeConditions\": {\n \"exclusionDuration\": \"\",\n \"segment\": \"\"\n },\n \"includeConditions\": {}\n },\n \"updated\": \"\",\n \"webPropertyId\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences")
.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/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
accountId: '',
audienceDefinition: {
includeConditions: {
daysToLookBack: 0,
isSmartList: false,
kind: '',
membershipDurationDays: 0,
segment: ''
}
},
audienceType: '',
created: '',
description: '',
id: '',
internalWebPropertyId: '',
kind: '',
linkedAdAccounts: [
{
accountId: '',
eligibleForSearch: false,
id: '',
internalWebPropertyId: '',
kind: '',
linkedAccountId: '',
remarketingAudienceId: '',
status: '',
type: '',
webPropertyId: ''
}
],
linkedViews: [],
name: '',
stateBasedAudienceDefinition: {excludeConditions: {exclusionDuration: '', segment: ''}, includeConditions: {}},
updated: '',
webPropertyId: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences',
headers: {'content-type': 'application/json'},
body: {
accountId: '',
audienceDefinition: {
includeConditions: {
daysToLookBack: 0,
isSmartList: false,
kind: '',
membershipDurationDays: 0,
segment: ''
}
},
audienceType: '',
created: '',
description: '',
id: '',
internalWebPropertyId: '',
kind: '',
linkedAdAccounts: [
{
accountId: '',
eligibleForSearch: false,
id: '',
internalWebPropertyId: '',
kind: '',
linkedAccountId: '',
remarketingAudienceId: '',
status: '',
type: '',
webPropertyId: ''
}
],
linkedViews: [],
name: '',
stateBasedAudienceDefinition: {excludeConditions: {exclusionDuration: '', segment: ''}, includeConditions: {}},
updated: '',
webPropertyId: ''
},
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}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
accountId: '',
audienceDefinition: {
includeConditions: {
daysToLookBack: 0,
isSmartList: false,
kind: '',
membershipDurationDays: 0,
segment: ''
}
},
audienceType: '',
created: '',
description: '',
id: '',
internalWebPropertyId: '',
kind: '',
linkedAdAccounts: [
{
accountId: '',
eligibleForSearch: false,
id: '',
internalWebPropertyId: '',
kind: '',
linkedAccountId: '',
remarketingAudienceId: '',
status: '',
type: '',
webPropertyId: ''
}
],
linkedViews: [],
name: '',
stateBasedAudienceDefinition: {
excludeConditions: {
exclusionDuration: '',
segment: ''
},
includeConditions: {}
},
updated: '',
webPropertyId: ''
});
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}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences',
headers: {'content-type': 'application/json'},
data: {
accountId: '',
audienceDefinition: {
includeConditions: {
daysToLookBack: 0,
isSmartList: false,
kind: '',
membershipDurationDays: 0,
segment: ''
}
},
audienceType: '',
created: '',
description: '',
id: '',
internalWebPropertyId: '',
kind: '',
linkedAdAccounts: [
{
accountId: '',
eligibleForSearch: false,
id: '',
internalWebPropertyId: '',
kind: '',
linkedAccountId: '',
remarketingAudienceId: '',
status: '',
type: '',
webPropertyId: ''
}
],
linkedViews: [],
name: '',
stateBasedAudienceDefinition: {excludeConditions: {exclusionDuration: '', segment: ''}, includeConditions: {}},
updated: '',
webPropertyId: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"accountId":"","audienceDefinition":{"includeConditions":{"daysToLookBack":0,"isSmartList":false,"kind":"","membershipDurationDays":0,"segment":""}},"audienceType":"","created":"","description":"","id":"","internalWebPropertyId":"","kind":"","linkedAdAccounts":[{"accountId":"","eligibleForSearch":false,"id":"","internalWebPropertyId":"","kind":"","linkedAccountId":"","remarketingAudienceId":"","status":"","type":"","webPropertyId":""}],"linkedViews":[],"name":"","stateBasedAudienceDefinition":{"excludeConditions":{"exclusionDuration":"","segment":""},"includeConditions":{}},"updated":"","webPropertyId":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"accountId": @"",
@"audienceDefinition": @{ @"includeConditions": @{ @"daysToLookBack": @0, @"isSmartList": @NO, @"kind": @"", @"membershipDurationDays": @0, @"segment": @"" } },
@"audienceType": @"",
@"created": @"",
@"description": @"",
@"id": @"",
@"internalWebPropertyId": @"",
@"kind": @"",
@"linkedAdAccounts": @[ @{ @"accountId": @"", @"eligibleForSearch": @NO, @"id": @"", @"internalWebPropertyId": @"", @"kind": @"", @"linkedAccountId": @"", @"remarketingAudienceId": @"", @"status": @"", @"type": @"", @"webPropertyId": @"" } ],
@"linkedViews": @[ ],
@"name": @"",
@"stateBasedAudienceDefinition": @{ @"excludeConditions": @{ @"exclusionDuration": @"", @"segment": @"" }, @"includeConditions": @{ } },
@"updated": @"",
@"webPropertyId": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences"]
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}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"accountId\": \"\",\n \"audienceDefinition\": {\n \"includeConditions\": {\n \"daysToLookBack\": 0,\n \"isSmartList\": false,\n \"kind\": \"\",\n \"membershipDurationDays\": 0,\n \"segment\": \"\"\n }\n },\n \"audienceType\": \"\",\n \"created\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"linkedAdAccounts\": [\n {\n \"accountId\": \"\",\n \"eligibleForSearch\": false,\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"linkedAccountId\": \"\",\n \"remarketingAudienceId\": \"\",\n \"status\": \"\",\n \"type\": \"\",\n \"webPropertyId\": \"\"\n }\n ],\n \"linkedViews\": [],\n \"name\": \"\",\n \"stateBasedAudienceDefinition\": {\n \"excludeConditions\": {\n \"exclusionDuration\": \"\",\n \"segment\": \"\"\n },\n \"includeConditions\": {}\n },\n \"updated\": \"\",\n \"webPropertyId\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'accountId' => '',
'audienceDefinition' => [
'includeConditions' => [
'daysToLookBack' => 0,
'isSmartList' => null,
'kind' => '',
'membershipDurationDays' => 0,
'segment' => ''
]
],
'audienceType' => '',
'created' => '',
'description' => '',
'id' => '',
'internalWebPropertyId' => '',
'kind' => '',
'linkedAdAccounts' => [
[
'accountId' => '',
'eligibleForSearch' => null,
'id' => '',
'internalWebPropertyId' => '',
'kind' => '',
'linkedAccountId' => '',
'remarketingAudienceId' => '',
'status' => '',
'type' => '',
'webPropertyId' => ''
]
],
'linkedViews' => [
],
'name' => '',
'stateBasedAudienceDefinition' => [
'excludeConditions' => [
'exclusionDuration' => '',
'segment' => ''
],
'includeConditions' => [
]
],
'updated' => '',
'webPropertyId' => ''
]),
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}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences', [
'body' => '{
"accountId": "",
"audienceDefinition": {
"includeConditions": {
"daysToLookBack": 0,
"isSmartList": false,
"kind": "",
"membershipDurationDays": 0,
"segment": ""
}
},
"audienceType": "",
"created": "",
"description": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"linkedAdAccounts": [
{
"accountId": "",
"eligibleForSearch": false,
"id": "",
"internalWebPropertyId": "",
"kind": "",
"linkedAccountId": "",
"remarketingAudienceId": "",
"status": "",
"type": "",
"webPropertyId": ""
}
],
"linkedViews": [],
"name": "",
"stateBasedAudienceDefinition": {
"excludeConditions": {
"exclusionDuration": "",
"segment": ""
},
"includeConditions": {}
},
"updated": "",
"webPropertyId": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'accountId' => '',
'audienceDefinition' => [
'includeConditions' => [
'daysToLookBack' => 0,
'isSmartList' => null,
'kind' => '',
'membershipDurationDays' => 0,
'segment' => ''
]
],
'audienceType' => '',
'created' => '',
'description' => '',
'id' => '',
'internalWebPropertyId' => '',
'kind' => '',
'linkedAdAccounts' => [
[
'accountId' => '',
'eligibleForSearch' => null,
'id' => '',
'internalWebPropertyId' => '',
'kind' => '',
'linkedAccountId' => '',
'remarketingAudienceId' => '',
'status' => '',
'type' => '',
'webPropertyId' => ''
]
],
'linkedViews' => [
],
'name' => '',
'stateBasedAudienceDefinition' => [
'excludeConditions' => [
'exclusionDuration' => '',
'segment' => ''
],
'includeConditions' => [
]
],
'updated' => '',
'webPropertyId' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'accountId' => '',
'audienceDefinition' => [
'includeConditions' => [
'daysToLookBack' => 0,
'isSmartList' => null,
'kind' => '',
'membershipDurationDays' => 0,
'segment' => ''
]
],
'audienceType' => '',
'created' => '',
'description' => '',
'id' => '',
'internalWebPropertyId' => '',
'kind' => '',
'linkedAdAccounts' => [
[
'accountId' => '',
'eligibleForSearch' => null,
'id' => '',
'internalWebPropertyId' => '',
'kind' => '',
'linkedAccountId' => '',
'remarketingAudienceId' => '',
'status' => '',
'type' => '',
'webPropertyId' => ''
]
],
'linkedViews' => [
],
'name' => '',
'stateBasedAudienceDefinition' => [
'excludeConditions' => [
'exclusionDuration' => '',
'segment' => ''
],
'includeConditions' => [
]
],
'updated' => '',
'webPropertyId' => ''
]));
$request->setRequestUrl('{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences');
$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}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"accountId": "",
"audienceDefinition": {
"includeConditions": {
"daysToLookBack": 0,
"isSmartList": false,
"kind": "",
"membershipDurationDays": 0,
"segment": ""
}
},
"audienceType": "",
"created": "",
"description": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"linkedAdAccounts": [
{
"accountId": "",
"eligibleForSearch": false,
"id": "",
"internalWebPropertyId": "",
"kind": "",
"linkedAccountId": "",
"remarketingAudienceId": "",
"status": "",
"type": "",
"webPropertyId": ""
}
],
"linkedViews": [],
"name": "",
"stateBasedAudienceDefinition": {
"excludeConditions": {
"exclusionDuration": "",
"segment": ""
},
"includeConditions": {}
},
"updated": "",
"webPropertyId": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"accountId": "",
"audienceDefinition": {
"includeConditions": {
"daysToLookBack": 0,
"isSmartList": false,
"kind": "",
"membershipDurationDays": 0,
"segment": ""
}
},
"audienceType": "",
"created": "",
"description": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"linkedAdAccounts": [
{
"accountId": "",
"eligibleForSearch": false,
"id": "",
"internalWebPropertyId": "",
"kind": "",
"linkedAccountId": "",
"remarketingAudienceId": "",
"status": "",
"type": "",
"webPropertyId": ""
}
],
"linkedViews": [],
"name": "",
"stateBasedAudienceDefinition": {
"excludeConditions": {
"exclusionDuration": "",
"segment": ""
},
"includeConditions": {}
},
"updated": "",
"webPropertyId": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"accountId\": \"\",\n \"audienceDefinition\": {\n \"includeConditions\": {\n \"daysToLookBack\": 0,\n \"isSmartList\": false,\n \"kind\": \"\",\n \"membershipDurationDays\": 0,\n \"segment\": \"\"\n }\n },\n \"audienceType\": \"\",\n \"created\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"linkedAdAccounts\": [\n {\n \"accountId\": \"\",\n \"eligibleForSearch\": false,\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"linkedAccountId\": \"\",\n \"remarketingAudienceId\": \"\",\n \"status\": \"\",\n \"type\": \"\",\n \"webPropertyId\": \"\"\n }\n ],\n \"linkedViews\": [],\n \"name\": \"\",\n \"stateBasedAudienceDefinition\": {\n \"excludeConditions\": {\n \"exclusionDuration\": \"\",\n \"segment\": \"\"\n },\n \"includeConditions\": {}\n },\n \"updated\": \"\",\n \"webPropertyId\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences"
payload = {
"accountId": "",
"audienceDefinition": { "includeConditions": {
"daysToLookBack": 0,
"isSmartList": False,
"kind": "",
"membershipDurationDays": 0,
"segment": ""
} },
"audienceType": "",
"created": "",
"description": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"linkedAdAccounts": [
{
"accountId": "",
"eligibleForSearch": False,
"id": "",
"internalWebPropertyId": "",
"kind": "",
"linkedAccountId": "",
"remarketingAudienceId": "",
"status": "",
"type": "",
"webPropertyId": ""
}
],
"linkedViews": [],
"name": "",
"stateBasedAudienceDefinition": {
"excludeConditions": {
"exclusionDuration": "",
"segment": ""
},
"includeConditions": {}
},
"updated": "",
"webPropertyId": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences"
payload <- "{\n \"accountId\": \"\",\n \"audienceDefinition\": {\n \"includeConditions\": {\n \"daysToLookBack\": 0,\n \"isSmartList\": false,\n \"kind\": \"\",\n \"membershipDurationDays\": 0,\n \"segment\": \"\"\n }\n },\n \"audienceType\": \"\",\n \"created\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"linkedAdAccounts\": [\n {\n \"accountId\": \"\",\n \"eligibleForSearch\": false,\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"linkedAccountId\": \"\",\n \"remarketingAudienceId\": \"\",\n \"status\": \"\",\n \"type\": \"\",\n \"webPropertyId\": \"\"\n }\n ],\n \"linkedViews\": [],\n \"name\": \"\",\n \"stateBasedAudienceDefinition\": {\n \"excludeConditions\": {\n \"exclusionDuration\": \"\",\n \"segment\": \"\"\n },\n \"includeConditions\": {}\n },\n \"updated\": \"\",\n \"webPropertyId\": \"\"\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}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"accountId\": \"\",\n \"audienceDefinition\": {\n \"includeConditions\": {\n \"daysToLookBack\": 0,\n \"isSmartList\": false,\n \"kind\": \"\",\n \"membershipDurationDays\": 0,\n \"segment\": \"\"\n }\n },\n \"audienceType\": \"\",\n \"created\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"linkedAdAccounts\": [\n {\n \"accountId\": \"\",\n \"eligibleForSearch\": false,\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"linkedAccountId\": \"\",\n \"remarketingAudienceId\": \"\",\n \"status\": \"\",\n \"type\": \"\",\n \"webPropertyId\": \"\"\n }\n ],\n \"linkedViews\": [],\n \"name\": \"\",\n \"stateBasedAudienceDefinition\": {\n \"excludeConditions\": {\n \"exclusionDuration\": \"\",\n \"segment\": \"\"\n },\n \"includeConditions\": {}\n },\n \"updated\": \"\",\n \"webPropertyId\": \"\"\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/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences') do |req|
req.body = "{\n \"accountId\": \"\",\n \"audienceDefinition\": {\n \"includeConditions\": {\n \"daysToLookBack\": 0,\n \"isSmartList\": false,\n \"kind\": \"\",\n \"membershipDurationDays\": 0,\n \"segment\": \"\"\n }\n },\n \"audienceType\": \"\",\n \"created\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"linkedAdAccounts\": [\n {\n \"accountId\": \"\",\n \"eligibleForSearch\": false,\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"linkedAccountId\": \"\",\n \"remarketingAudienceId\": \"\",\n \"status\": \"\",\n \"type\": \"\",\n \"webPropertyId\": \"\"\n }\n ],\n \"linkedViews\": [],\n \"name\": \"\",\n \"stateBasedAudienceDefinition\": {\n \"excludeConditions\": {\n \"exclusionDuration\": \"\",\n \"segment\": \"\"\n },\n \"includeConditions\": {}\n },\n \"updated\": \"\",\n \"webPropertyId\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences";
let payload = json!({
"accountId": "",
"audienceDefinition": json!({"includeConditions": json!({
"daysToLookBack": 0,
"isSmartList": false,
"kind": "",
"membershipDurationDays": 0,
"segment": ""
})}),
"audienceType": "",
"created": "",
"description": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"linkedAdAccounts": (
json!({
"accountId": "",
"eligibleForSearch": false,
"id": "",
"internalWebPropertyId": "",
"kind": "",
"linkedAccountId": "",
"remarketingAudienceId": "",
"status": "",
"type": "",
"webPropertyId": ""
})
),
"linkedViews": (),
"name": "",
"stateBasedAudienceDefinition": json!({
"excludeConditions": json!({
"exclusionDuration": "",
"segment": ""
}),
"includeConditions": json!({})
}),
"updated": "",
"webPropertyId": ""
});
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}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences \
--header 'content-type: application/json' \
--data '{
"accountId": "",
"audienceDefinition": {
"includeConditions": {
"daysToLookBack": 0,
"isSmartList": false,
"kind": "",
"membershipDurationDays": 0,
"segment": ""
}
},
"audienceType": "",
"created": "",
"description": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"linkedAdAccounts": [
{
"accountId": "",
"eligibleForSearch": false,
"id": "",
"internalWebPropertyId": "",
"kind": "",
"linkedAccountId": "",
"remarketingAudienceId": "",
"status": "",
"type": "",
"webPropertyId": ""
}
],
"linkedViews": [],
"name": "",
"stateBasedAudienceDefinition": {
"excludeConditions": {
"exclusionDuration": "",
"segment": ""
},
"includeConditions": {}
},
"updated": "",
"webPropertyId": ""
}'
echo '{
"accountId": "",
"audienceDefinition": {
"includeConditions": {
"daysToLookBack": 0,
"isSmartList": false,
"kind": "",
"membershipDurationDays": 0,
"segment": ""
}
},
"audienceType": "",
"created": "",
"description": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"linkedAdAccounts": [
{
"accountId": "",
"eligibleForSearch": false,
"id": "",
"internalWebPropertyId": "",
"kind": "",
"linkedAccountId": "",
"remarketingAudienceId": "",
"status": "",
"type": "",
"webPropertyId": ""
}
],
"linkedViews": [],
"name": "",
"stateBasedAudienceDefinition": {
"excludeConditions": {
"exclusionDuration": "",
"segment": ""
},
"includeConditions": {}
},
"updated": "",
"webPropertyId": ""
}' | \
http POST {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "accountId": "",\n "audienceDefinition": {\n "includeConditions": {\n "daysToLookBack": 0,\n "isSmartList": false,\n "kind": "",\n "membershipDurationDays": 0,\n "segment": ""\n }\n },\n "audienceType": "",\n "created": "",\n "description": "",\n "id": "",\n "internalWebPropertyId": "",\n "kind": "",\n "linkedAdAccounts": [\n {\n "accountId": "",\n "eligibleForSearch": false,\n "id": "",\n "internalWebPropertyId": "",\n "kind": "",\n "linkedAccountId": "",\n "remarketingAudienceId": "",\n "status": "",\n "type": "",\n "webPropertyId": ""\n }\n ],\n "linkedViews": [],\n "name": "",\n "stateBasedAudienceDefinition": {\n "excludeConditions": {\n "exclusionDuration": "",\n "segment": ""\n },\n "includeConditions": {}\n },\n "updated": "",\n "webPropertyId": ""\n}' \
--output-document \
- {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"accountId": "",
"audienceDefinition": ["includeConditions": [
"daysToLookBack": 0,
"isSmartList": false,
"kind": "",
"membershipDurationDays": 0,
"segment": ""
]],
"audienceType": "",
"created": "",
"description": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"linkedAdAccounts": [
[
"accountId": "",
"eligibleForSearch": false,
"id": "",
"internalWebPropertyId": "",
"kind": "",
"linkedAccountId": "",
"remarketingAudienceId": "",
"status": "",
"type": "",
"webPropertyId": ""
]
],
"linkedViews": [],
"name": "",
"stateBasedAudienceDefinition": [
"excludeConditions": [
"exclusionDuration": "",
"segment": ""
],
"includeConditions": []
],
"updated": "",
"webPropertyId": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences")! 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
analytics.management.remarketingAudience.list
{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences
QUERY PARAMS
accountId
webPropertyId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences")
require "http/client"
url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences"
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}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences"
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/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences"))
.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}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences")
.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}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences';
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}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences',
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}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences');
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}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences';
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}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences"]
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}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences",
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}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences');
echo $response->getBody();
setUrl('{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences")
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/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences";
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}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences
http GET {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PATCH
analytics.management.remarketingAudience.patch
{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId
QUERY PARAMS
accountId
webPropertyId
remarketingAudienceId
BODY json
{
"accountId": "",
"audienceDefinition": {
"includeConditions": {
"daysToLookBack": 0,
"isSmartList": false,
"kind": "",
"membershipDurationDays": 0,
"segment": ""
}
},
"audienceType": "",
"created": "",
"description": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"linkedAdAccounts": [
{
"accountId": "",
"eligibleForSearch": false,
"id": "",
"internalWebPropertyId": "",
"kind": "",
"linkedAccountId": "",
"remarketingAudienceId": "",
"status": "",
"type": "",
"webPropertyId": ""
}
],
"linkedViews": [],
"name": "",
"stateBasedAudienceDefinition": {
"excludeConditions": {
"exclusionDuration": "",
"segment": ""
},
"includeConditions": {}
},
"updated": "",
"webPropertyId": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"accountId\": \"\",\n \"audienceDefinition\": {\n \"includeConditions\": {\n \"daysToLookBack\": 0,\n \"isSmartList\": false,\n \"kind\": \"\",\n \"membershipDurationDays\": 0,\n \"segment\": \"\"\n }\n },\n \"audienceType\": \"\",\n \"created\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"linkedAdAccounts\": [\n {\n \"accountId\": \"\",\n \"eligibleForSearch\": false,\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"linkedAccountId\": \"\",\n \"remarketingAudienceId\": \"\",\n \"status\": \"\",\n \"type\": \"\",\n \"webPropertyId\": \"\"\n }\n ],\n \"linkedViews\": [],\n \"name\": \"\",\n \"stateBasedAudienceDefinition\": {\n \"excludeConditions\": {\n \"exclusionDuration\": \"\",\n \"segment\": \"\"\n },\n \"includeConditions\": {}\n },\n \"updated\": \"\",\n \"webPropertyId\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/patch "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId" {:content-type :json
:form-params {:accountId ""
:audienceDefinition {:includeConditions {:daysToLookBack 0
:isSmartList false
:kind ""
:membershipDurationDays 0
:segment ""}}
:audienceType ""
:created ""
:description ""
:id ""
:internalWebPropertyId ""
:kind ""
:linkedAdAccounts [{:accountId ""
:eligibleForSearch false
:id ""
:internalWebPropertyId ""
:kind ""
:linkedAccountId ""
:remarketingAudienceId ""
:status ""
:type ""
:webPropertyId ""}]
:linkedViews []
:name ""
:stateBasedAudienceDefinition {:excludeConditions {:exclusionDuration ""
:segment ""}
:includeConditions {}}
:updated ""
:webPropertyId ""}})
require "http/client"
url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"accountId\": \"\",\n \"audienceDefinition\": {\n \"includeConditions\": {\n \"daysToLookBack\": 0,\n \"isSmartList\": false,\n \"kind\": \"\",\n \"membershipDurationDays\": 0,\n \"segment\": \"\"\n }\n },\n \"audienceType\": \"\",\n \"created\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"linkedAdAccounts\": [\n {\n \"accountId\": \"\",\n \"eligibleForSearch\": false,\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"linkedAccountId\": \"\",\n \"remarketingAudienceId\": \"\",\n \"status\": \"\",\n \"type\": \"\",\n \"webPropertyId\": \"\"\n }\n ],\n \"linkedViews\": [],\n \"name\": \"\",\n \"stateBasedAudienceDefinition\": {\n \"excludeConditions\": {\n \"exclusionDuration\": \"\",\n \"segment\": \"\"\n },\n \"includeConditions\": {}\n },\n \"updated\": \"\",\n \"webPropertyId\": \"\"\n}"
response = HTTP::Client.patch url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Patch,
RequestUri = new Uri("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId"),
Content = new StringContent("{\n \"accountId\": \"\",\n \"audienceDefinition\": {\n \"includeConditions\": {\n \"daysToLookBack\": 0,\n \"isSmartList\": false,\n \"kind\": \"\",\n \"membershipDurationDays\": 0,\n \"segment\": \"\"\n }\n },\n \"audienceType\": \"\",\n \"created\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"linkedAdAccounts\": [\n {\n \"accountId\": \"\",\n \"eligibleForSearch\": false,\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"linkedAccountId\": \"\",\n \"remarketingAudienceId\": \"\",\n \"status\": \"\",\n \"type\": \"\",\n \"webPropertyId\": \"\"\n }\n ],\n \"linkedViews\": [],\n \"name\": \"\",\n \"stateBasedAudienceDefinition\": {\n \"excludeConditions\": {\n \"exclusionDuration\": \"\",\n \"segment\": \"\"\n },\n \"includeConditions\": {}\n },\n \"updated\": \"\",\n \"webPropertyId\": \"\"\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}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId");
var request = new RestRequest("", Method.Patch);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"accountId\": \"\",\n \"audienceDefinition\": {\n \"includeConditions\": {\n \"daysToLookBack\": 0,\n \"isSmartList\": false,\n \"kind\": \"\",\n \"membershipDurationDays\": 0,\n \"segment\": \"\"\n }\n },\n \"audienceType\": \"\",\n \"created\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"linkedAdAccounts\": [\n {\n \"accountId\": \"\",\n \"eligibleForSearch\": false,\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"linkedAccountId\": \"\",\n \"remarketingAudienceId\": \"\",\n \"status\": \"\",\n \"type\": \"\",\n \"webPropertyId\": \"\"\n }\n ],\n \"linkedViews\": [],\n \"name\": \"\",\n \"stateBasedAudienceDefinition\": {\n \"excludeConditions\": {\n \"exclusionDuration\": \"\",\n \"segment\": \"\"\n },\n \"includeConditions\": {}\n },\n \"updated\": \"\",\n \"webPropertyId\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId"
payload := strings.NewReader("{\n \"accountId\": \"\",\n \"audienceDefinition\": {\n \"includeConditions\": {\n \"daysToLookBack\": 0,\n \"isSmartList\": false,\n \"kind\": \"\",\n \"membershipDurationDays\": 0,\n \"segment\": \"\"\n }\n },\n \"audienceType\": \"\",\n \"created\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"linkedAdAccounts\": [\n {\n \"accountId\": \"\",\n \"eligibleForSearch\": false,\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"linkedAccountId\": \"\",\n \"remarketingAudienceId\": \"\",\n \"status\": \"\",\n \"type\": \"\",\n \"webPropertyId\": \"\"\n }\n ],\n \"linkedViews\": [],\n \"name\": \"\",\n \"stateBasedAudienceDefinition\": {\n \"excludeConditions\": {\n \"exclusionDuration\": \"\",\n \"segment\": \"\"\n },\n \"includeConditions\": {}\n },\n \"updated\": \"\",\n \"webPropertyId\": \"\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
PATCH /baseUrl/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 854
{
"accountId": "",
"audienceDefinition": {
"includeConditions": {
"daysToLookBack": 0,
"isSmartList": false,
"kind": "",
"membershipDurationDays": 0,
"segment": ""
}
},
"audienceType": "",
"created": "",
"description": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"linkedAdAccounts": [
{
"accountId": "",
"eligibleForSearch": false,
"id": "",
"internalWebPropertyId": "",
"kind": "",
"linkedAccountId": "",
"remarketingAudienceId": "",
"status": "",
"type": "",
"webPropertyId": ""
}
],
"linkedViews": [],
"name": "",
"stateBasedAudienceDefinition": {
"excludeConditions": {
"exclusionDuration": "",
"segment": ""
},
"includeConditions": {}
},
"updated": "",
"webPropertyId": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId")
.setHeader("content-type", "application/json")
.setBody("{\n \"accountId\": \"\",\n \"audienceDefinition\": {\n \"includeConditions\": {\n \"daysToLookBack\": 0,\n \"isSmartList\": false,\n \"kind\": \"\",\n \"membershipDurationDays\": 0,\n \"segment\": \"\"\n }\n },\n \"audienceType\": \"\",\n \"created\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"linkedAdAccounts\": [\n {\n \"accountId\": \"\",\n \"eligibleForSearch\": false,\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"linkedAccountId\": \"\",\n \"remarketingAudienceId\": \"\",\n \"status\": \"\",\n \"type\": \"\",\n \"webPropertyId\": \"\"\n }\n ],\n \"linkedViews\": [],\n \"name\": \"\",\n \"stateBasedAudienceDefinition\": {\n \"excludeConditions\": {\n \"exclusionDuration\": \"\",\n \"segment\": \"\"\n },\n \"includeConditions\": {}\n },\n \"updated\": \"\",\n \"webPropertyId\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId"))
.header("content-type", "application/json")
.method("PATCH", HttpRequest.BodyPublishers.ofString("{\n \"accountId\": \"\",\n \"audienceDefinition\": {\n \"includeConditions\": {\n \"daysToLookBack\": 0,\n \"isSmartList\": false,\n \"kind\": \"\",\n \"membershipDurationDays\": 0,\n \"segment\": \"\"\n }\n },\n \"audienceType\": \"\",\n \"created\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"linkedAdAccounts\": [\n {\n \"accountId\": \"\",\n \"eligibleForSearch\": false,\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"linkedAccountId\": \"\",\n \"remarketingAudienceId\": \"\",\n \"status\": \"\",\n \"type\": \"\",\n \"webPropertyId\": \"\"\n }\n ],\n \"linkedViews\": [],\n \"name\": \"\",\n \"stateBasedAudienceDefinition\": {\n \"excludeConditions\": {\n \"exclusionDuration\": \"\",\n \"segment\": \"\"\n },\n \"includeConditions\": {}\n },\n \"updated\": \"\",\n \"webPropertyId\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"accountId\": \"\",\n \"audienceDefinition\": {\n \"includeConditions\": {\n \"daysToLookBack\": 0,\n \"isSmartList\": false,\n \"kind\": \"\",\n \"membershipDurationDays\": 0,\n \"segment\": \"\"\n }\n },\n \"audienceType\": \"\",\n \"created\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"linkedAdAccounts\": [\n {\n \"accountId\": \"\",\n \"eligibleForSearch\": false,\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"linkedAccountId\": \"\",\n \"remarketingAudienceId\": \"\",\n \"status\": \"\",\n \"type\": \"\",\n \"webPropertyId\": \"\"\n }\n ],\n \"linkedViews\": [],\n \"name\": \"\",\n \"stateBasedAudienceDefinition\": {\n \"excludeConditions\": {\n \"exclusionDuration\": \"\",\n \"segment\": \"\"\n },\n \"includeConditions\": {}\n },\n \"updated\": \"\",\n \"webPropertyId\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId")
.patch(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId")
.header("content-type", "application/json")
.body("{\n \"accountId\": \"\",\n \"audienceDefinition\": {\n \"includeConditions\": {\n \"daysToLookBack\": 0,\n \"isSmartList\": false,\n \"kind\": \"\",\n \"membershipDurationDays\": 0,\n \"segment\": \"\"\n }\n },\n \"audienceType\": \"\",\n \"created\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"linkedAdAccounts\": [\n {\n \"accountId\": \"\",\n \"eligibleForSearch\": false,\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"linkedAccountId\": \"\",\n \"remarketingAudienceId\": \"\",\n \"status\": \"\",\n \"type\": \"\",\n \"webPropertyId\": \"\"\n }\n ],\n \"linkedViews\": [],\n \"name\": \"\",\n \"stateBasedAudienceDefinition\": {\n \"excludeConditions\": {\n \"exclusionDuration\": \"\",\n \"segment\": \"\"\n },\n \"includeConditions\": {}\n },\n \"updated\": \"\",\n \"webPropertyId\": \"\"\n}")
.asString();
const data = JSON.stringify({
accountId: '',
audienceDefinition: {
includeConditions: {
daysToLookBack: 0,
isSmartList: false,
kind: '',
membershipDurationDays: 0,
segment: ''
}
},
audienceType: '',
created: '',
description: '',
id: '',
internalWebPropertyId: '',
kind: '',
linkedAdAccounts: [
{
accountId: '',
eligibleForSearch: false,
id: '',
internalWebPropertyId: '',
kind: '',
linkedAccountId: '',
remarketingAudienceId: '',
status: '',
type: '',
webPropertyId: ''
}
],
linkedViews: [],
name: '',
stateBasedAudienceDefinition: {
excludeConditions: {
exclusionDuration: '',
segment: ''
},
includeConditions: {}
},
updated: '',
webPropertyId: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PATCH', '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PATCH',
url: '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId',
headers: {'content-type': 'application/json'},
data: {
accountId: '',
audienceDefinition: {
includeConditions: {
daysToLookBack: 0,
isSmartList: false,
kind: '',
membershipDurationDays: 0,
segment: ''
}
},
audienceType: '',
created: '',
description: '',
id: '',
internalWebPropertyId: '',
kind: '',
linkedAdAccounts: [
{
accountId: '',
eligibleForSearch: false,
id: '',
internalWebPropertyId: '',
kind: '',
linkedAccountId: '',
remarketingAudienceId: '',
status: '',
type: '',
webPropertyId: ''
}
],
linkedViews: [],
name: '',
stateBasedAudienceDefinition: {excludeConditions: {exclusionDuration: '', segment: ''}, includeConditions: {}},
updated: '',
webPropertyId: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"accountId":"","audienceDefinition":{"includeConditions":{"daysToLookBack":0,"isSmartList":false,"kind":"","membershipDurationDays":0,"segment":""}},"audienceType":"","created":"","description":"","id":"","internalWebPropertyId":"","kind":"","linkedAdAccounts":[{"accountId":"","eligibleForSearch":false,"id":"","internalWebPropertyId":"","kind":"","linkedAccountId":"","remarketingAudienceId":"","status":"","type":"","webPropertyId":""}],"linkedViews":[],"name":"","stateBasedAudienceDefinition":{"excludeConditions":{"exclusionDuration":"","segment":""},"includeConditions":{}},"updated":"","webPropertyId":""}'
};
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}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId',
method: 'PATCH',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "accountId": "",\n "audienceDefinition": {\n "includeConditions": {\n "daysToLookBack": 0,\n "isSmartList": false,\n "kind": "",\n "membershipDurationDays": 0,\n "segment": ""\n }\n },\n "audienceType": "",\n "created": "",\n "description": "",\n "id": "",\n "internalWebPropertyId": "",\n "kind": "",\n "linkedAdAccounts": [\n {\n "accountId": "",\n "eligibleForSearch": false,\n "id": "",\n "internalWebPropertyId": "",\n "kind": "",\n "linkedAccountId": "",\n "remarketingAudienceId": "",\n "status": "",\n "type": "",\n "webPropertyId": ""\n }\n ],\n "linkedViews": [],\n "name": "",\n "stateBasedAudienceDefinition": {\n "excludeConditions": {\n "exclusionDuration": "",\n "segment": ""\n },\n "includeConditions": {}\n },\n "updated": "",\n "webPropertyId": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"accountId\": \"\",\n \"audienceDefinition\": {\n \"includeConditions\": {\n \"daysToLookBack\": 0,\n \"isSmartList\": false,\n \"kind\": \"\",\n \"membershipDurationDays\": 0,\n \"segment\": \"\"\n }\n },\n \"audienceType\": \"\",\n \"created\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"linkedAdAccounts\": [\n {\n \"accountId\": \"\",\n \"eligibleForSearch\": false,\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"linkedAccountId\": \"\",\n \"remarketingAudienceId\": \"\",\n \"status\": \"\",\n \"type\": \"\",\n \"webPropertyId\": \"\"\n }\n ],\n \"linkedViews\": [],\n \"name\": \"\",\n \"stateBasedAudienceDefinition\": {\n \"excludeConditions\": {\n \"exclusionDuration\": \"\",\n \"segment\": \"\"\n },\n \"includeConditions\": {}\n },\n \"updated\": \"\",\n \"webPropertyId\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId")
.patch(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PATCH',
hostname: 'example.com',
port: null,
path: '/baseUrl/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
accountId: '',
audienceDefinition: {
includeConditions: {
daysToLookBack: 0,
isSmartList: false,
kind: '',
membershipDurationDays: 0,
segment: ''
}
},
audienceType: '',
created: '',
description: '',
id: '',
internalWebPropertyId: '',
kind: '',
linkedAdAccounts: [
{
accountId: '',
eligibleForSearch: false,
id: '',
internalWebPropertyId: '',
kind: '',
linkedAccountId: '',
remarketingAudienceId: '',
status: '',
type: '',
webPropertyId: ''
}
],
linkedViews: [],
name: '',
stateBasedAudienceDefinition: {excludeConditions: {exclusionDuration: '', segment: ''}, includeConditions: {}},
updated: '',
webPropertyId: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PATCH',
url: '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId',
headers: {'content-type': 'application/json'},
body: {
accountId: '',
audienceDefinition: {
includeConditions: {
daysToLookBack: 0,
isSmartList: false,
kind: '',
membershipDurationDays: 0,
segment: ''
}
},
audienceType: '',
created: '',
description: '',
id: '',
internalWebPropertyId: '',
kind: '',
linkedAdAccounts: [
{
accountId: '',
eligibleForSearch: false,
id: '',
internalWebPropertyId: '',
kind: '',
linkedAccountId: '',
remarketingAudienceId: '',
status: '',
type: '',
webPropertyId: ''
}
],
linkedViews: [],
name: '',
stateBasedAudienceDefinition: {excludeConditions: {exclusionDuration: '', segment: ''}, includeConditions: {}},
updated: '',
webPropertyId: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PATCH', '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
accountId: '',
audienceDefinition: {
includeConditions: {
daysToLookBack: 0,
isSmartList: false,
kind: '',
membershipDurationDays: 0,
segment: ''
}
},
audienceType: '',
created: '',
description: '',
id: '',
internalWebPropertyId: '',
kind: '',
linkedAdAccounts: [
{
accountId: '',
eligibleForSearch: false,
id: '',
internalWebPropertyId: '',
kind: '',
linkedAccountId: '',
remarketingAudienceId: '',
status: '',
type: '',
webPropertyId: ''
}
],
linkedViews: [],
name: '',
stateBasedAudienceDefinition: {
excludeConditions: {
exclusionDuration: '',
segment: ''
},
includeConditions: {}
},
updated: '',
webPropertyId: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PATCH',
url: '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId',
headers: {'content-type': 'application/json'},
data: {
accountId: '',
audienceDefinition: {
includeConditions: {
daysToLookBack: 0,
isSmartList: false,
kind: '',
membershipDurationDays: 0,
segment: ''
}
},
audienceType: '',
created: '',
description: '',
id: '',
internalWebPropertyId: '',
kind: '',
linkedAdAccounts: [
{
accountId: '',
eligibleForSearch: false,
id: '',
internalWebPropertyId: '',
kind: '',
linkedAccountId: '',
remarketingAudienceId: '',
status: '',
type: '',
webPropertyId: ''
}
],
linkedViews: [],
name: '',
stateBasedAudienceDefinition: {excludeConditions: {exclusionDuration: '', segment: ''}, includeConditions: {}},
updated: '',
webPropertyId: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"accountId":"","audienceDefinition":{"includeConditions":{"daysToLookBack":0,"isSmartList":false,"kind":"","membershipDurationDays":0,"segment":""}},"audienceType":"","created":"","description":"","id":"","internalWebPropertyId":"","kind":"","linkedAdAccounts":[{"accountId":"","eligibleForSearch":false,"id":"","internalWebPropertyId":"","kind":"","linkedAccountId":"","remarketingAudienceId":"","status":"","type":"","webPropertyId":""}],"linkedViews":[],"name":"","stateBasedAudienceDefinition":{"excludeConditions":{"exclusionDuration":"","segment":""},"includeConditions":{}},"updated":"","webPropertyId":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"accountId": @"",
@"audienceDefinition": @{ @"includeConditions": @{ @"daysToLookBack": @0, @"isSmartList": @NO, @"kind": @"", @"membershipDurationDays": @0, @"segment": @"" } },
@"audienceType": @"",
@"created": @"",
@"description": @"",
@"id": @"",
@"internalWebPropertyId": @"",
@"kind": @"",
@"linkedAdAccounts": @[ @{ @"accountId": @"", @"eligibleForSearch": @NO, @"id": @"", @"internalWebPropertyId": @"", @"kind": @"", @"linkedAccountId": @"", @"remarketingAudienceId": @"", @"status": @"", @"type": @"", @"webPropertyId": @"" } ],
@"linkedViews": @[ ],
@"name": @"",
@"stateBasedAudienceDefinition": @{ @"excludeConditions": @{ @"exclusionDuration": @"", @"segment": @"" }, @"includeConditions": @{ } },
@"updated": @"",
@"webPropertyId": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PATCH"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"accountId\": \"\",\n \"audienceDefinition\": {\n \"includeConditions\": {\n \"daysToLookBack\": 0,\n \"isSmartList\": false,\n \"kind\": \"\",\n \"membershipDurationDays\": 0,\n \"segment\": \"\"\n }\n },\n \"audienceType\": \"\",\n \"created\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"linkedAdAccounts\": [\n {\n \"accountId\": \"\",\n \"eligibleForSearch\": false,\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"linkedAccountId\": \"\",\n \"remarketingAudienceId\": \"\",\n \"status\": \"\",\n \"type\": \"\",\n \"webPropertyId\": \"\"\n }\n ],\n \"linkedViews\": [],\n \"name\": \"\",\n \"stateBasedAudienceDefinition\": {\n \"excludeConditions\": {\n \"exclusionDuration\": \"\",\n \"segment\": \"\"\n },\n \"includeConditions\": {}\n },\n \"updated\": \"\",\n \"webPropertyId\": \"\"\n}" in
Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'accountId' => '',
'audienceDefinition' => [
'includeConditions' => [
'daysToLookBack' => 0,
'isSmartList' => null,
'kind' => '',
'membershipDurationDays' => 0,
'segment' => ''
]
],
'audienceType' => '',
'created' => '',
'description' => '',
'id' => '',
'internalWebPropertyId' => '',
'kind' => '',
'linkedAdAccounts' => [
[
'accountId' => '',
'eligibleForSearch' => null,
'id' => '',
'internalWebPropertyId' => '',
'kind' => '',
'linkedAccountId' => '',
'remarketingAudienceId' => '',
'status' => '',
'type' => '',
'webPropertyId' => ''
]
],
'linkedViews' => [
],
'name' => '',
'stateBasedAudienceDefinition' => [
'excludeConditions' => [
'exclusionDuration' => '',
'segment' => ''
],
'includeConditions' => [
]
],
'updated' => '',
'webPropertyId' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PATCH', '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId', [
'body' => '{
"accountId": "",
"audienceDefinition": {
"includeConditions": {
"daysToLookBack": 0,
"isSmartList": false,
"kind": "",
"membershipDurationDays": 0,
"segment": ""
}
},
"audienceType": "",
"created": "",
"description": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"linkedAdAccounts": [
{
"accountId": "",
"eligibleForSearch": false,
"id": "",
"internalWebPropertyId": "",
"kind": "",
"linkedAccountId": "",
"remarketingAudienceId": "",
"status": "",
"type": "",
"webPropertyId": ""
}
],
"linkedViews": [],
"name": "",
"stateBasedAudienceDefinition": {
"excludeConditions": {
"exclusionDuration": "",
"segment": ""
},
"includeConditions": {}
},
"updated": "",
"webPropertyId": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'accountId' => '',
'audienceDefinition' => [
'includeConditions' => [
'daysToLookBack' => 0,
'isSmartList' => null,
'kind' => '',
'membershipDurationDays' => 0,
'segment' => ''
]
],
'audienceType' => '',
'created' => '',
'description' => '',
'id' => '',
'internalWebPropertyId' => '',
'kind' => '',
'linkedAdAccounts' => [
[
'accountId' => '',
'eligibleForSearch' => null,
'id' => '',
'internalWebPropertyId' => '',
'kind' => '',
'linkedAccountId' => '',
'remarketingAudienceId' => '',
'status' => '',
'type' => '',
'webPropertyId' => ''
]
],
'linkedViews' => [
],
'name' => '',
'stateBasedAudienceDefinition' => [
'excludeConditions' => [
'exclusionDuration' => '',
'segment' => ''
],
'includeConditions' => [
]
],
'updated' => '',
'webPropertyId' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'accountId' => '',
'audienceDefinition' => [
'includeConditions' => [
'daysToLookBack' => 0,
'isSmartList' => null,
'kind' => '',
'membershipDurationDays' => 0,
'segment' => ''
]
],
'audienceType' => '',
'created' => '',
'description' => '',
'id' => '',
'internalWebPropertyId' => '',
'kind' => '',
'linkedAdAccounts' => [
[
'accountId' => '',
'eligibleForSearch' => null,
'id' => '',
'internalWebPropertyId' => '',
'kind' => '',
'linkedAccountId' => '',
'remarketingAudienceId' => '',
'status' => '',
'type' => '',
'webPropertyId' => ''
]
],
'linkedViews' => [
],
'name' => '',
'stateBasedAudienceDefinition' => [
'excludeConditions' => [
'exclusionDuration' => '',
'segment' => ''
],
'includeConditions' => [
]
],
'updated' => '',
'webPropertyId' => ''
]));
$request->setRequestUrl('{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId');
$request->setRequestMethod('PATCH');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"accountId": "",
"audienceDefinition": {
"includeConditions": {
"daysToLookBack": 0,
"isSmartList": false,
"kind": "",
"membershipDurationDays": 0,
"segment": ""
}
},
"audienceType": "",
"created": "",
"description": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"linkedAdAccounts": [
{
"accountId": "",
"eligibleForSearch": false,
"id": "",
"internalWebPropertyId": "",
"kind": "",
"linkedAccountId": "",
"remarketingAudienceId": "",
"status": "",
"type": "",
"webPropertyId": ""
}
],
"linkedViews": [],
"name": "",
"stateBasedAudienceDefinition": {
"excludeConditions": {
"exclusionDuration": "",
"segment": ""
},
"includeConditions": {}
},
"updated": "",
"webPropertyId": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"accountId": "",
"audienceDefinition": {
"includeConditions": {
"daysToLookBack": 0,
"isSmartList": false,
"kind": "",
"membershipDurationDays": 0,
"segment": ""
}
},
"audienceType": "",
"created": "",
"description": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"linkedAdAccounts": [
{
"accountId": "",
"eligibleForSearch": false,
"id": "",
"internalWebPropertyId": "",
"kind": "",
"linkedAccountId": "",
"remarketingAudienceId": "",
"status": "",
"type": "",
"webPropertyId": ""
}
],
"linkedViews": [],
"name": "",
"stateBasedAudienceDefinition": {
"excludeConditions": {
"exclusionDuration": "",
"segment": ""
},
"includeConditions": {}
},
"updated": "",
"webPropertyId": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"accountId\": \"\",\n \"audienceDefinition\": {\n \"includeConditions\": {\n \"daysToLookBack\": 0,\n \"isSmartList\": false,\n \"kind\": \"\",\n \"membershipDurationDays\": 0,\n \"segment\": \"\"\n }\n },\n \"audienceType\": \"\",\n \"created\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"linkedAdAccounts\": [\n {\n \"accountId\": \"\",\n \"eligibleForSearch\": false,\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"linkedAccountId\": \"\",\n \"remarketingAudienceId\": \"\",\n \"status\": \"\",\n \"type\": \"\",\n \"webPropertyId\": \"\"\n }\n ],\n \"linkedViews\": [],\n \"name\": \"\",\n \"stateBasedAudienceDefinition\": {\n \"excludeConditions\": {\n \"exclusionDuration\": \"\",\n \"segment\": \"\"\n },\n \"includeConditions\": {}\n },\n \"updated\": \"\",\n \"webPropertyId\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("PATCH", "/baseUrl/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId"
payload = {
"accountId": "",
"audienceDefinition": { "includeConditions": {
"daysToLookBack": 0,
"isSmartList": False,
"kind": "",
"membershipDurationDays": 0,
"segment": ""
} },
"audienceType": "",
"created": "",
"description": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"linkedAdAccounts": [
{
"accountId": "",
"eligibleForSearch": False,
"id": "",
"internalWebPropertyId": "",
"kind": "",
"linkedAccountId": "",
"remarketingAudienceId": "",
"status": "",
"type": "",
"webPropertyId": ""
}
],
"linkedViews": [],
"name": "",
"stateBasedAudienceDefinition": {
"excludeConditions": {
"exclusionDuration": "",
"segment": ""
},
"includeConditions": {}
},
"updated": "",
"webPropertyId": ""
}
headers = {"content-type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId"
payload <- "{\n \"accountId\": \"\",\n \"audienceDefinition\": {\n \"includeConditions\": {\n \"daysToLookBack\": 0,\n \"isSmartList\": false,\n \"kind\": \"\",\n \"membershipDurationDays\": 0,\n \"segment\": \"\"\n }\n },\n \"audienceType\": \"\",\n \"created\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"linkedAdAccounts\": [\n {\n \"accountId\": \"\",\n \"eligibleForSearch\": false,\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"linkedAccountId\": \"\",\n \"remarketingAudienceId\": \"\",\n \"status\": \"\",\n \"type\": \"\",\n \"webPropertyId\": \"\"\n }\n ],\n \"linkedViews\": [],\n \"name\": \"\",\n \"stateBasedAudienceDefinition\": {\n \"excludeConditions\": {\n \"exclusionDuration\": \"\",\n \"segment\": \"\"\n },\n \"includeConditions\": {}\n },\n \"updated\": \"\",\n \"webPropertyId\": \"\"\n}"
encode <- "json"
response <- VERB("PATCH", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"accountId\": \"\",\n \"audienceDefinition\": {\n \"includeConditions\": {\n \"daysToLookBack\": 0,\n \"isSmartList\": false,\n \"kind\": \"\",\n \"membershipDurationDays\": 0,\n \"segment\": \"\"\n }\n },\n \"audienceType\": \"\",\n \"created\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"linkedAdAccounts\": [\n {\n \"accountId\": \"\",\n \"eligibleForSearch\": false,\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"linkedAccountId\": \"\",\n \"remarketingAudienceId\": \"\",\n \"status\": \"\",\n \"type\": \"\",\n \"webPropertyId\": \"\"\n }\n ],\n \"linkedViews\": [],\n \"name\": \"\",\n \"stateBasedAudienceDefinition\": {\n \"excludeConditions\": {\n \"exclusionDuration\": \"\",\n \"segment\": \"\"\n },\n \"includeConditions\": {}\n },\n \"updated\": \"\",\n \"webPropertyId\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.patch('/baseUrl/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId') do |req|
req.body = "{\n \"accountId\": \"\",\n \"audienceDefinition\": {\n \"includeConditions\": {\n \"daysToLookBack\": 0,\n \"isSmartList\": false,\n \"kind\": \"\",\n \"membershipDurationDays\": 0,\n \"segment\": \"\"\n }\n },\n \"audienceType\": \"\",\n \"created\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"linkedAdAccounts\": [\n {\n \"accountId\": \"\",\n \"eligibleForSearch\": false,\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"linkedAccountId\": \"\",\n \"remarketingAudienceId\": \"\",\n \"status\": \"\",\n \"type\": \"\",\n \"webPropertyId\": \"\"\n }\n ],\n \"linkedViews\": [],\n \"name\": \"\",\n \"stateBasedAudienceDefinition\": {\n \"excludeConditions\": {\n \"exclusionDuration\": \"\",\n \"segment\": \"\"\n },\n \"includeConditions\": {}\n },\n \"updated\": \"\",\n \"webPropertyId\": \"\"\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}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId";
let payload = json!({
"accountId": "",
"audienceDefinition": json!({"includeConditions": json!({
"daysToLookBack": 0,
"isSmartList": false,
"kind": "",
"membershipDurationDays": 0,
"segment": ""
})}),
"audienceType": "",
"created": "",
"description": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"linkedAdAccounts": (
json!({
"accountId": "",
"eligibleForSearch": false,
"id": "",
"internalWebPropertyId": "",
"kind": "",
"linkedAccountId": "",
"remarketingAudienceId": "",
"status": "",
"type": "",
"webPropertyId": ""
})
),
"linkedViews": (),
"name": "",
"stateBasedAudienceDefinition": json!({
"excludeConditions": json!({
"exclusionDuration": "",
"segment": ""
}),
"includeConditions": json!({})
}),
"updated": "",
"webPropertyId": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PATCH").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PATCH \
--url {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId \
--header 'content-type: application/json' \
--data '{
"accountId": "",
"audienceDefinition": {
"includeConditions": {
"daysToLookBack": 0,
"isSmartList": false,
"kind": "",
"membershipDurationDays": 0,
"segment": ""
}
},
"audienceType": "",
"created": "",
"description": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"linkedAdAccounts": [
{
"accountId": "",
"eligibleForSearch": false,
"id": "",
"internalWebPropertyId": "",
"kind": "",
"linkedAccountId": "",
"remarketingAudienceId": "",
"status": "",
"type": "",
"webPropertyId": ""
}
],
"linkedViews": [],
"name": "",
"stateBasedAudienceDefinition": {
"excludeConditions": {
"exclusionDuration": "",
"segment": ""
},
"includeConditions": {}
},
"updated": "",
"webPropertyId": ""
}'
echo '{
"accountId": "",
"audienceDefinition": {
"includeConditions": {
"daysToLookBack": 0,
"isSmartList": false,
"kind": "",
"membershipDurationDays": 0,
"segment": ""
}
},
"audienceType": "",
"created": "",
"description": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"linkedAdAccounts": [
{
"accountId": "",
"eligibleForSearch": false,
"id": "",
"internalWebPropertyId": "",
"kind": "",
"linkedAccountId": "",
"remarketingAudienceId": "",
"status": "",
"type": "",
"webPropertyId": ""
}
],
"linkedViews": [],
"name": "",
"stateBasedAudienceDefinition": {
"excludeConditions": {
"exclusionDuration": "",
"segment": ""
},
"includeConditions": {}
},
"updated": "",
"webPropertyId": ""
}' | \
http PATCH {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId \
content-type:application/json
wget --quiet \
--method PATCH \
--header 'content-type: application/json' \
--body-data '{\n "accountId": "",\n "audienceDefinition": {\n "includeConditions": {\n "daysToLookBack": 0,\n "isSmartList": false,\n "kind": "",\n "membershipDurationDays": 0,\n "segment": ""\n }\n },\n "audienceType": "",\n "created": "",\n "description": "",\n "id": "",\n "internalWebPropertyId": "",\n "kind": "",\n "linkedAdAccounts": [\n {\n "accountId": "",\n "eligibleForSearch": false,\n "id": "",\n "internalWebPropertyId": "",\n "kind": "",\n "linkedAccountId": "",\n "remarketingAudienceId": "",\n "status": "",\n "type": "",\n "webPropertyId": ""\n }\n ],\n "linkedViews": [],\n "name": "",\n "stateBasedAudienceDefinition": {\n "excludeConditions": {\n "exclusionDuration": "",\n "segment": ""\n },\n "includeConditions": {}\n },\n "updated": "",\n "webPropertyId": ""\n}' \
--output-document \
- {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"accountId": "",
"audienceDefinition": ["includeConditions": [
"daysToLookBack": 0,
"isSmartList": false,
"kind": "",
"membershipDurationDays": 0,
"segment": ""
]],
"audienceType": "",
"created": "",
"description": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"linkedAdAccounts": [
[
"accountId": "",
"eligibleForSearch": false,
"id": "",
"internalWebPropertyId": "",
"kind": "",
"linkedAccountId": "",
"remarketingAudienceId": "",
"status": "",
"type": "",
"webPropertyId": ""
]
],
"linkedViews": [],
"name": "",
"stateBasedAudienceDefinition": [
"excludeConditions": [
"exclusionDuration": "",
"segment": ""
],
"includeConditions": []
],
"updated": "",
"webPropertyId": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PUT
analytics.management.remarketingAudience.update
{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId
QUERY PARAMS
accountId
webPropertyId
remarketingAudienceId
BODY json
{
"accountId": "",
"audienceDefinition": {
"includeConditions": {
"daysToLookBack": 0,
"isSmartList": false,
"kind": "",
"membershipDurationDays": 0,
"segment": ""
}
},
"audienceType": "",
"created": "",
"description": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"linkedAdAccounts": [
{
"accountId": "",
"eligibleForSearch": false,
"id": "",
"internalWebPropertyId": "",
"kind": "",
"linkedAccountId": "",
"remarketingAudienceId": "",
"status": "",
"type": "",
"webPropertyId": ""
}
],
"linkedViews": [],
"name": "",
"stateBasedAudienceDefinition": {
"excludeConditions": {
"exclusionDuration": "",
"segment": ""
},
"includeConditions": {}
},
"updated": "",
"webPropertyId": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"accountId\": \"\",\n \"audienceDefinition\": {\n \"includeConditions\": {\n \"daysToLookBack\": 0,\n \"isSmartList\": false,\n \"kind\": \"\",\n \"membershipDurationDays\": 0,\n \"segment\": \"\"\n }\n },\n \"audienceType\": \"\",\n \"created\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"linkedAdAccounts\": [\n {\n \"accountId\": \"\",\n \"eligibleForSearch\": false,\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"linkedAccountId\": \"\",\n \"remarketingAudienceId\": \"\",\n \"status\": \"\",\n \"type\": \"\",\n \"webPropertyId\": \"\"\n }\n ],\n \"linkedViews\": [],\n \"name\": \"\",\n \"stateBasedAudienceDefinition\": {\n \"excludeConditions\": {\n \"exclusionDuration\": \"\",\n \"segment\": \"\"\n },\n \"includeConditions\": {}\n },\n \"updated\": \"\",\n \"webPropertyId\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId" {:content-type :json
:form-params {:accountId ""
:audienceDefinition {:includeConditions {:daysToLookBack 0
:isSmartList false
:kind ""
:membershipDurationDays 0
:segment ""}}
:audienceType ""
:created ""
:description ""
:id ""
:internalWebPropertyId ""
:kind ""
:linkedAdAccounts [{:accountId ""
:eligibleForSearch false
:id ""
:internalWebPropertyId ""
:kind ""
:linkedAccountId ""
:remarketingAudienceId ""
:status ""
:type ""
:webPropertyId ""}]
:linkedViews []
:name ""
:stateBasedAudienceDefinition {:excludeConditions {:exclusionDuration ""
:segment ""}
:includeConditions {}}
:updated ""
:webPropertyId ""}})
require "http/client"
url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"accountId\": \"\",\n \"audienceDefinition\": {\n \"includeConditions\": {\n \"daysToLookBack\": 0,\n \"isSmartList\": false,\n \"kind\": \"\",\n \"membershipDurationDays\": 0,\n \"segment\": \"\"\n }\n },\n \"audienceType\": \"\",\n \"created\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"linkedAdAccounts\": [\n {\n \"accountId\": \"\",\n \"eligibleForSearch\": false,\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"linkedAccountId\": \"\",\n \"remarketingAudienceId\": \"\",\n \"status\": \"\",\n \"type\": \"\",\n \"webPropertyId\": \"\"\n }\n ],\n \"linkedViews\": [],\n \"name\": \"\",\n \"stateBasedAudienceDefinition\": {\n \"excludeConditions\": {\n \"exclusionDuration\": \"\",\n \"segment\": \"\"\n },\n \"includeConditions\": {}\n },\n \"updated\": \"\",\n \"webPropertyId\": \"\"\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}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId"),
Content = new StringContent("{\n \"accountId\": \"\",\n \"audienceDefinition\": {\n \"includeConditions\": {\n \"daysToLookBack\": 0,\n \"isSmartList\": false,\n \"kind\": \"\",\n \"membershipDurationDays\": 0,\n \"segment\": \"\"\n }\n },\n \"audienceType\": \"\",\n \"created\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"linkedAdAccounts\": [\n {\n \"accountId\": \"\",\n \"eligibleForSearch\": false,\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"linkedAccountId\": \"\",\n \"remarketingAudienceId\": \"\",\n \"status\": \"\",\n \"type\": \"\",\n \"webPropertyId\": \"\"\n }\n ],\n \"linkedViews\": [],\n \"name\": \"\",\n \"stateBasedAudienceDefinition\": {\n \"excludeConditions\": {\n \"exclusionDuration\": \"\",\n \"segment\": \"\"\n },\n \"includeConditions\": {}\n },\n \"updated\": \"\",\n \"webPropertyId\": \"\"\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}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"accountId\": \"\",\n \"audienceDefinition\": {\n \"includeConditions\": {\n \"daysToLookBack\": 0,\n \"isSmartList\": false,\n \"kind\": \"\",\n \"membershipDurationDays\": 0,\n \"segment\": \"\"\n }\n },\n \"audienceType\": \"\",\n \"created\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"linkedAdAccounts\": [\n {\n \"accountId\": \"\",\n \"eligibleForSearch\": false,\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"linkedAccountId\": \"\",\n \"remarketingAudienceId\": \"\",\n \"status\": \"\",\n \"type\": \"\",\n \"webPropertyId\": \"\"\n }\n ],\n \"linkedViews\": [],\n \"name\": \"\",\n \"stateBasedAudienceDefinition\": {\n \"excludeConditions\": {\n \"exclusionDuration\": \"\",\n \"segment\": \"\"\n },\n \"includeConditions\": {}\n },\n \"updated\": \"\",\n \"webPropertyId\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId"
payload := strings.NewReader("{\n \"accountId\": \"\",\n \"audienceDefinition\": {\n \"includeConditions\": {\n \"daysToLookBack\": 0,\n \"isSmartList\": false,\n \"kind\": \"\",\n \"membershipDurationDays\": 0,\n \"segment\": \"\"\n }\n },\n \"audienceType\": \"\",\n \"created\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"linkedAdAccounts\": [\n {\n \"accountId\": \"\",\n \"eligibleForSearch\": false,\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"linkedAccountId\": \"\",\n \"remarketingAudienceId\": \"\",\n \"status\": \"\",\n \"type\": \"\",\n \"webPropertyId\": \"\"\n }\n ],\n \"linkedViews\": [],\n \"name\": \"\",\n \"stateBasedAudienceDefinition\": {\n \"excludeConditions\": {\n \"exclusionDuration\": \"\",\n \"segment\": \"\"\n },\n \"includeConditions\": {}\n },\n \"updated\": \"\",\n \"webPropertyId\": \"\"\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/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 854
{
"accountId": "",
"audienceDefinition": {
"includeConditions": {
"daysToLookBack": 0,
"isSmartList": false,
"kind": "",
"membershipDurationDays": 0,
"segment": ""
}
},
"audienceType": "",
"created": "",
"description": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"linkedAdAccounts": [
{
"accountId": "",
"eligibleForSearch": false,
"id": "",
"internalWebPropertyId": "",
"kind": "",
"linkedAccountId": "",
"remarketingAudienceId": "",
"status": "",
"type": "",
"webPropertyId": ""
}
],
"linkedViews": [],
"name": "",
"stateBasedAudienceDefinition": {
"excludeConditions": {
"exclusionDuration": "",
"segment": ""
},
"includeConditions": {}
},
"updated": "",
"webPropertyId": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId")
.setHeader("content-type", "application/json")
.setBody("{\n \"accountId\": \"\",\n \"audienceDefinition\": {\n \"includeConditions\": {\n \"daysToLookBack\": 0,\n \"isSmartList\": false,\n \"kind\": \"\",\n \"membershipDurationDays\": 0,\n \"segment\": \"\"\n }\n },\n \"audienceType\": \"\",\n \"created\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"linkedAdAccounts\": [\n {\n \"accountId\": \"\",\n \"eligibleForSearch\": false,\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"linkedAccountId\": \"\",\n \"remarketingAudienceId\": \"\",\n \"status\": \"\",\n \"type\": \"\",\n \"webPropertyId\": \"\"\n }\n ],\n \"linkedViews\": [],\n \"name\": \"\",\n \"stateBasedAudienceDefinition\": {\n \"excludeConditions\": {\n \"exclusionDuration\": \"\",\n \"segment\": \"\"\n },\n \"includeConditions\": {}\n },\n \"updated\": \"\",\n \"webPropertyId\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"accountId\": \"\",\n \"audienceDefinition\": {\n \"includeConditions\": {\n \"daysToLookBack\": 0,\n \"isSmartList\": false,\n \"kind\": \"\",\n \"membershipDurationDays\": 0,\n \"segment\": \"\"\n }\n },\n \"audienceType\": \"\",\n \"created\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"linkedAdAccounts\": [\n {\n \"accountId\": \"\",\n \"eligibleForSearch\": false,\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"linkedAccountId\": \"\",\n \"remarketingAudienceId\": \"\",\n \"status\": \"\",\n \"type\": \"\",\n \"webPropertyId\": \"\"\n }\n ],\n \"linkedViews\": [],\n \"name\": \"\",\n \"stateBasedAudienceDefinition\": {\n \"excludeConditions\": {\n \"exclusionDuration\": \"\",\n \"segment\": \"\"\n },\n \"includeConditions\": {}\n },\n \"updated\": \"\",\n \"webPropertyId\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"accountId\": \"\",\n \"audienceDefinition\": {\n \"includeConditions\": {\n \"daysToLookBack\": 0,\n \"isSmartList\": false,\n \"kind\": \"\",\n \"membershipDurationDays\": 0,\n \"segment\": \"\"\n }\n },\n \"audienceType\": \"\",\n \"created\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"linkedAdAccounts\": [\n {\n \"accountId\": \"\",\n \"eligibleForSearch\": false,\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"linkedAccountId\": \"\",\n \"remarketingAudienceId\": \"\",\n \"status\": \"\",\n \"type\": \"\",\n \"webPropertyId\": \"\"\n }\n ],\n \"linkedViews\": [],\n \"name\": \"\",\n \"stateBasedAudienceDefinition\": {\n \"excludeConditions\": {\n \"exclusionDuration\": \"\",\n \"segment\": \"\"\n },\n \"includeConditions\": {}\n },\n \"updated\": \"\",\n \"webPropertyId\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId")
.header("content-type", "application/json")
.body("{\n \"accountId\": \"\",\n \"audienceDefinition\": {\n \"includeConditions\": {\n \"daysToLookBack\": 0,\n \"isSmartList\": false,\n \"kind\": \"\",\n \"membershipDurationDays\": 0,\n \"segment\": \"\"\n }\n },\n \"audienceType\": \"\",\n \"created\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"linkedAdAccounts\": [\n {\n \"accountId\": \"\",\n \"eligibleForSearch\": false,\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"linkedAccountId\": \"\",\n \"remarketingAudienceId\": \"\",\n \"status\": \"\",\n \"type\": \"\",\n \"webPropertyId\": \"\"\n }\n ],\n \"linkedViews\": [],\n \"name\": \"\",\n \"stateBasedAudienceDefinition\": {\n \"excludeConditions\": {\n \"exclusionDuration\": \"\",\n \"segment\": \"\"\n },\n \"includeConditions\": {}\n },\n \"updated\": \"\",\n \"webPropertyId\": \"\"\n}")
.asString();
const data = JSON.stringify({
accountId: '',
audienceDefinition: {
includeConditions: {
daysToLookBack: 0,
isSmartList: false,
kind: '',
membershipDurationDays: 0,
segment: ''
}
},
audienceType: '',
created: '',
description: '',
id: '',
internalWebPropertyId: '',
kind: '',
linkedAdAccounts: [
{
accountId: '',
eligibleForSearch: false,
id: '',
internalWebPropertyId: '',
kind: '',
linkedAccountId: '',
remarketingAudienceId: '',
status: '',
type: '',
webPropertyId: ''
}
],
linkedViews: [],
name: '',
stateBasedAudienceDefinition: {
excludeConditions: {
exclusionDuration: '',
segment: ''
},
includeConditions: {}
},
updated: '',
webPropertyId: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId',
headers: {'content-type': 'application/json'},
data: {
accountId: '',
audienceDefinition: {
includeConditions: {
daysToLookBack: 0,
isSmartList: false,
kind: '',
membershipDurationDays: 0,
segment: ''
}
},
audienceType: '',
created: '',
description: '',
id: '',
internalWebPropertyId: '',
kind: '',
linkedAdAccounts: [
{
accountId: '',
eligibleForSearch: false,
id: '',
internalWebPropertyId: '',
kind: '',
linkedAccountId: '',
remarketingAudienceId: '',
status: '',
type: '',
webPropertyId: ''
}
],
linkedViews: [],
name: '',
stateBasedAudienceDefinition: {excludeConditions: {exclusionDuration: '', segment: ''}, includeConditions: {}},
updated: '',
webPropertyId: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"accountId":"","audienceDefinition":{"includeConditions":{"daysToLookBack":0,"isSmartList":false,"kind":"","membershipDurationDays":0,"segment":""}},"audienceType":"","created":"","description":"","id":"","internalWebPropertyId":"","kind":"","linkedAdAccounts":[{"accountId":"","eligibleForSearch":false,"id":"","internalWebPropertyId":"","kind":"","linkedAccountId":"","remarketingAudienceId":"","status":"","type":"","webPropertyId":""}],"linkedViews":[],"name":"","stateBasedAudienceDefinition":{"excludeConditions":{"exclusionDuration":"","segment":""},"includeConditions":{}},"updated":"","webPropertyId":""}'
};
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}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "accountId": "",\n "audienceDefinition": {\n "includeConditions": {\n "daysToLookBack": 0,\n "isSmartList": false,\n "kind": "",\n "membershipDurationDays": 0,\n "segment": ""\n }\n },\n "audienceType": "",\n "created": "",\n "description": "",\n "id": "",\n "internalWebPropertyId": "",\n "kind": "",\n "linkedAdAccounts": [\n {\n "accountId": "",\n "eligibleForSearch": false,\n "id": "",\n "internalWebPropertyId": "",\n "kind": "",\n "linkedAccountId": "",\n "remarketingAudienceId": "",\n "status": "",\n "type": "",\n "webPropertyId": ""\n }\n ],\n "linkedViews": [],\n "name": "",\n "stateBasedAudienceDefinition": {\n "excludeConditions": {\n "exclusionDuration": "",\n "segment": ""\n },\n "includeConditions": {}\n },\n "updated": "",\n "webPropertyId": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"accountId\": \"\",\n \"audienceDefinition\": {\n \"includeConditions\": {\n \"daysToLookBack\": 0,\n \"isSmartList\": false,\n \"kind\": \"\",\n \"membershipDurationDays\": 0,\n \"segment\": \"\"\n }\n },\n \"audienceType\": \"\",\n \"created\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"linkedAdAccounts\": [\n {\n \"accountId\": \"\",\n \"eligibleForSearch\": false,\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"linkedAccountId\": \"\",\n \"remarketingAudienceId\": \"\",\n \"status\": \"\",\n \"type\": \"\",\n \"webPropertyId\": \"\"\n }\n ],\n \"linkedViews\": [],\n \"name\": \"\",\n \"stateBasedAudienceDefinition\": {\n \"excludeConditions\": {\n \"exclusionDuration\": \"\",\n \"segment\": \"\"\n },\n \"includeConditions\": {}\n },\n \"updated\": \"\",\n \"webPropertyId\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId")
.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/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
accountId: '',
audienceDefinition: {
includeConditions: {
daysToLookBack: 0,
isSmartList: false,
kind: '',
membershipDurationDays: 0,
segment: ''
}
},
audienceType: '',
created: '',
description: '',
id: '',
internalWebPropertyId: '',
kind: '',
linkedAdAccounts: [
{
accountId: '',
eligibleForSearch: false,
id: '',
internalWebPropertyId: '',
kind: '',
linkedAccountId: '',
remarketingAudienceId: '',
status: '',
type: '',
webPropertyId: ''
}
],
linkedViews: [],
name: '',
stateBasedAudienceDefinition: {excludeConditions: {exclusionDuration: '', segment: ''}, includeConditions: {}},
updated: '',
webPropertyId: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId',
headers: {'content-type': 'application/json'},
body: {
accountId: '',
audienceDefinition: {
includeConditions: {
daysToLookBack: 0,
isSmartList: false,
kind: '',
membershipDurationDays: 0,
segment: ''
}
},
audienceType: '',
created: '',
description: '',
id: '',
internalWebPropertyId: '',
kind: '',
linkedAdAccounts: [
{
accountId: '',
eligibleForSearch: false,
id: '',
internalWebPropertyId: '',
kind: '',
linkedAccountId: '',
remarketingAudienceId: '',
status: '',
type: '',
webPropertyId: ''
}
],
linkedViews: [],
name: '',
stateBasedAudienceDefinition: {excludeConditions: {exclusionDuration: '', segment: ''}, includeConditions: {}},
updated: '',
webPropertyId: ''
},
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}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
accountId: '',
audienceDefinition: {
includeConditions: {
daysToLookBack: 0,
isSmartList: false,
kind: '',
membershipDurationDays: 0,
segment: ''
}
},
audienceType: '',
created: '',
description: '',
id: '',
internalWebPropertyId: '',
kind: '',
linkedAdAccounts: [
{
accountId: '',
eligibleForSearch: false,
id: '',
internalWebPropertyId: '',
kind: '',
linkedAccountId: '',
remarketingAudienceId: '',
status: '',
type: '',
webPropertyId: ''
}
],
linkedViews: [],
name: '',
stateBasedAudienceDefinition: {
excludeConditions: {
exclusionDuration: '',
segment: ''
},
includeConditions: {}
},
updated: '',
webPropertyId: ''
});
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}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId',
headers: {'content-type': 'application/json'},
data: {
accountId: '',
audienceDefinition: {
includeConditions: {
daysToLookBack: 0,
isSmartList: false,
kind: '',
membershipDurationDays: 0,
segment: ''
}
},
audienceType: '',
created: '',
description: '',
id: '',
internalWebPropertyId: '',
kind: '',
linkedAdAccounts: [
{
accountId: '',
eligibleForSearch: false,
id: '',
internalWebPropertyId: '',
kind: '',
linkedAccountId: '',
remarketingAudienceId: '',
status: '',
type: '',
webPropertyId: ''
}
],
linkedViews: [],
name: '',
stateBasedAudienceDefinition: {excludeConditions: {exclusionDuration: '', segment: ''}, includeConditions: {}},
updated: '',
webPropertyId: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"accountId":"","audienceDefinition":{"includeConditions":{"daysToLookBack":0,"isSmartList":false,"kind":"","membershipDurationDays":0,"segment":""}},"audienceType":"","created":"","description":"","id":"","internalWebPropertyId":"","kind":"","linkedAdAccounts":[{"accountId":"","eligibleForSearch":false,"id":"","internalWebPropertyId":"","kind":"","linkedAccountId":"","remarketingAudienceId":"","status":"","type":"","webPropertyId":""}],"linkedViews":[],"name":"","stateBasedAudienceDefinition":{"excludeConditions":{"exclusionDuration":"","segment":""},"includeConditions":{}},"updated":"","webPropertyId":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"accountId": @"",
@"audienceDefinition": @{ @"includeConditions": @{ @"daysToLookBack": @0, @"isSmartList": @NO, @"kind": @"", @"membershipDurationDays": @0, @"segment": @"" } },
@"audienceType": @"",
@"created": @"",
@"description": @"",
@"id": @"",
@"internalWebPropertyId": @"",
@"kind": @"",
@"linkedAdAccounts": @[ @{ @"accountId": @"", @"eligibleForSearch": @NO, @"id": @"", @"internalWebPropertyId": @"", @"kind": @"", @"linkedAccountId": @"", @"remarketingAudienceId": @"", @"status": @"", @"type": @"", @"webPropertyId": @"" } ],
@"linkedViews": @[ ],
@"name": @"",
@"stateBasedAudienceDefinition": @{ @"excludeConditions": @{ @"exclusionDuration": @"", @"segment": @"" }, @"includeConditions": @{ } },
@"updated": @"",
@"webPropertyId": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId"]
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}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"accountId\": \"\",\n \"audienceDefinition\": {\n \"includeConditions\": {\n \"daysToLookBack\": 0,\n \"isSmartList\": false,\n \"kind\": \"\",\n \"membershipDurationDays\": 0,\n \"segment\": \"\"\n }\n },\n \"audienceType\": \"\",\n \"created\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"linkedAdAccounts\": [\n {\n \"accountId\": \"\",\n \"eligibleForSearch\": false,\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"linkedAccountId\": \"\",\n \"remarketingAudienceId\": \"\",\n \"status\": \"\",\n \"type\": \"\",\n \"webPropertyId\": \"\"\n }\n ],\n \"linkedViews\": [],\n \"name\": \"\",\n \"stateBasedAudienceDefinition\": {\n \"excludeConditions\": {\n \"exclusionDuration\": \"\",\n \"segment\": \"\"\n },\n \"includeConditions\": {}\n },\n \"updated\": \"\",\n \"webPropertyId\": \"\"\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId",
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([
'accountId' => '',
'audienceDefinition' => [
'includeConditions' => [
'daysToLookBack' => 0,
'isSmartList' => null,
'kind' => '',
'membershipDurationDays' => 0,
'segment' => ''
]
],
'audienceType' => '',
'created' => '',
'description' => '',
'id' => '',
'internalWebPropertyId' => '',
'kind' => '',
'linkedAdAccounts' => [
[
'accountId' => '',
'eligibleForSearch' => null,
'id' => '',
'internalWebPropertyId' => '',
'kind' => '',
'linkedAccountId' => '',
'remarketingAudienceId' => '',
'status' => '',
'type' => '',
'webPropertyId' => ''
]
],
'linkedViews' => [
],
'name' => '',
'stateBasedAudienceDefinition' => [
'excludeConditions' => [
'exclusionDuration' => '',
'segment' => ''
],
'includeConditions' => [
]
],
'updated' => '',
'webPropertyId' => ''
]),
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}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId', [
'body' => '{
"accountId": "",
"audienceDefinition": {
"includeConditions": {
"daysToLookBack": 0,
"isSmartList": false,
"kind": "",
"membershipDurationDays": 0,
"segment": ""
}
},
"audienceType": "",
"created": "",
"description": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"linkedAdAccounts": [
{
"accountId": "",
"eligibleForSearch": false,
"id": "",
"internalWebPropertyId": "",
"kind": "",
"linkedAccountId": "",
"remarketingAudienceId": "",
"status": "",
"type": "",
"webPropertyId": ""
}
],
"linkedViews": [],
"name": "",
"stateBasedAudienceDefinition": {
"excludeConditions": {
"exclusionDuration": "",
"segment": ""
},
"includeConditions": {}
},
"updated": "",
"webPropertyId": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'accountId' => '',
'audienceDefinition' => [
'includeConditions' => [
'daysToLookBack' => 0,
'isSmartList' => null,
'kind' => '',
'membershipDurationDays' => 0,
'segment' => ''
]
],
'audienceType' => '',
'created' => '',
'description' => '',
'id' => '',
'internalWebPropertyId' => '',
'kind' => '',
'linkedAdAccounts' => [
[
'accountId' => '',
'eligibleForSearch' => null,
'id' => '',
'internalWebPropertyId' => '',
'kind' => '',
'linkedAccountId' => '',
'remarketingAudienceId' => '',
'status' => '',
'type' => '',
'webPropertyId' => ''
]
],
'linkedViews' => [
],
'name' => '',
'stateBasedAudienceDefinition' => [
'excludeConditions' => [
'exclusionDuration' => '',
'segment' => ''
],
'includeConditions' => [
]
],
'updated' => '',
'webPropertyId' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'accountId' => '',
'audienceDefinition' => [
'includeConditions' => [
'daysToLookBack' => 0,
'isSmartList' => null,
'kind' => '',
'membershipDurationDays' => 0,
'segment' => ''
]
],
'audienceType' => '',
'created' => '',
'description' => '',
'id' => '',
'internalWebPropertyId' => '',
'kind' => '',
'linkedAdAccounts' => [
[
'accountId' => '',
'eligibleForSearch' => null,
'id' => '',
'internalWebPropertyId' => '',
'kind' => '',
'linkedAccountId' => '',
'remarketingAudienceId' => '',
'status' => '',
'type' => '',
'webPropertyId' => ''
]
],
'linkedViews' => [
],
'name' => '',
'stateBasedAudienceDefinition' => [
'excludeConditions' => [
'exclusionDuration' => '',
'segment' => ''
],
'includeConditions' => [
]
],
'updated' => '',
'webPropertyId' => ''
]));
$request->setRequestUrl('{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId');
$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}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"accountId": "",
"audienceDefinition": {
"includeConditions": {
"daysToLookBack": 0,
"isSmartList": false,
"kind": "",
"membershipDurationDays": 0,
"segment": ""
}
},
"audienceType": "",
"created": "",
"description": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"linkedAdAccounts": [
{
"accountId": "",
"eligibleForSearch": false,
"id": "",
"internalWebPropertyId": "",
"kind": "",
"linkedAccountId": "",
"remarketingAudienceId": "",
"status": "",
"type": "",
"webPropertyId": ""
}
],
"linkedViews": [],
"name": "",
"stateBasedAudienceDefinition": {
"excludeConditions": {
"exclusionDuration": "",
"segment": ""
},
"includeConditions": {}
},
"updated": "",
"webPropertyId": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"accountId": "",
"audienceDefinition": {
"includeConditions": {
"daysToLookBack": 0,
"isSmartList": false,
"kind": "",
"membershipDurationDays": 0,
"segment": ""
}
},
"audienceType": "",
"created": "",
"description": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"linkedAdAccounts": [
{
"accountId": "",
"eligibleForSearch": false,
"id": "",
"internalWebPropertyId": "",
"kind": "",
"linkedAccountId": "",
"remarketingAudienceId": "",
"status": "",
"type": "",
"webPropertyId": ""
}
],
"linkedViews": [],
"name": "",
"stateBasedAudienceDefinition": {
"excludeConditions": {
"exclusionDuration": "",
"segment": ""
},
"includeConditions": {}
},
"updated": "",
"webPropertyId": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"accountId\": \"\",\n \"audienceDefinition\": {\n \"includeConditions\": {\n \"daysToLookBack\": 0,\n \"isSmartList\": false,\n \"kind\": \"\",\n \"membershipDurationDays\": 0,\n \"segment\": \"\"\n }\n },\n \"audienceType\": \"\",\n \"created\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"linkedAdAccounts\": [\n {\n \"accountId\": \"\",\n \"eligibleForSearch\": false,\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"linkedAccountId\": \"\",\n \"remarketingAudienceId\": \"\",\n \"status\": \"\",\n \"type\": \"\",\n \"webPropertyId\": \"\"\n }\n ],\n \"linkedViews\": [],\n \"name\": \"\",\n \"stateBasedAudienceDefinition\": {\n \"excludeConditions\": {\n \"exclusionDuration\": \"\",\n \"segment\": \"\"\n },\n \"includeConditions\": {}\n },\n \"updated\": \"\",\n \"webPropertyId\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId"
payload = {
"accountId": "",
"audienceDefinition": { "includeConditions": {
"daysToLookBack": 0,
"isSmartList": False,
"kind": "",
"membershipDurationDays": 0,
"segment": ""
} },
"audienceType": "",
"created": "",
"description": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"linkedAdAccounts": [
{
"accountId": "",
"eligibleForSearch": False,
"id": "",
"internalWebPropertyId": "",
"kind": "",
"linkedAccountId": "",
"remarketingAudienceId": "",
"status": "",
"type": "",
"webPropertyId": ""
}
],
"linkedViews": [],
"name": "",
"stateBasedAudienceDefinition": {
"excludeConditions": {
"exclusionDuration": "",
"segment": ""
},
"includeConditions": {}
},
"updated": "",
"webPropertyId": ""
}
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId"
payload <- "{\n \"accountId\": \"\",\n \"audienceDefinition\": {\n \"includeConditions\": {\n \"daysToLookBack\": 0,\n \"isSmartList\": false,\n \"kind\": \"\",\n \"membershipDurationDays\": 0,\n \"segment\": \"\"\n }\n },\n \"audienceType\": \"\",\n \"created\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"linkedAdAccounts\": [\n {\n \"accountId\": \"\",\n \"eligibleForSearch\": false,\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"linkedAccountId\": \"\",\n \"remarketingAudienceId\": \"\",\n \"status\": \"\",\n \"type\": \"\",\n \"webPropertyId\": \"\"\n }\n ],\n \"linkedViews\": [],\n \"name\": \"\",\n \"stateBasedAudienceDefinition\": {\n \"excludeConditions\": {\n \"exclusionDuration\": \"\",\n \"segment\": \"\"\n },\n \"includeConditions\": {}\n },\n \"updated\": \"\",\n \"webPropertyId\": \"\"\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}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId")
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 \"accountId\": \"\",\n \"audienceDefinition\": {\n \"includeConditions\": {\n \"daysToLookBack\": 0,\n \"isSmartList\": false,\n \"kind\": \"\",\n \"membershipDurationDays\": 0,\n \"segment\": \"\"\n }\n },\n \"audienceType\": \"\",\n \"created\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"linkedAdAccounts\": [\n {\n \"accountId\": \"\",\n \"eligibleForSearch\": false,\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"linkedAccountId\": \"\",\n \"remarketingAudienceId\": \"\",\n \"status\": \"\",\n \"type\": \"\",\n \"webPropertyId\": \"\"\n }\n ],\n \"linkedViews\": [],\n \"name\": \"\",\n \"stateBasedAudienceDefinition\": {\n \"excludeConditions\": {\n \"exclusionDuration\": \"\",\n \"segment\": \"\"\n },\n \"includeConditions\": {}\n },\n \"updated\": \"\",\n \"webPropertyId\": \"\"\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/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId') do |req|
req.body = "{\n \"accountId\": \"\",\n \"audienceDefinition\": {\n \"includeConditions\": {\n \"daysToLookBack\": 0,\n \"isSmartList\": false,\n \"kind\": \"\",\n \"membershipDurationDays\": 0,\n \"segment\": \"\"\n }\n },\n \"audienceType\": \"\",\n \"created\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"linkedAdAccounts\": [\n {\n \"accountId\": \"\",\n \"eligibleForSearch\": false,\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"linkedAccountId\": \"\",\n \"remarketingAudienceId\": \"\",\n \"status\": \"\",\n \"type\": \"\",\n \"webPropertyId\": \"\"\n }\n ],\n \"linkedViews\": [],\n \"name\": \"\",\n \"stateBasedAudienceDefinition\": {\n \"excludeConditions\": {\n \"exclusionDuration\": \"\",\n \"segment\": \"\"\n },\n \"includeConditions\": {}\n },\n \"updated\": \"\",\n \"webPropertyId\": \"\"\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}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId";
let payload = json!({
"accountId": "",
"audienceDefinition": json!({"includeConditions": json!({
"daysToLookBack": 0,
"isSmartList": false,
"kind": "",
"membershipDurationDays": 0,
"segment": ""
})}),
"audienceType": "",
"created": "",
"description": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"linkedAdAccounts": (
json!({
"accountId": "",
"eligibleForSearch": false,
"id": "",
"internalWebPropertyId": "",
"kind": "",
"linkedAccountId": "",
"remarketingAudienceId": "",
"status": "",
"type": "",
"webPropertyId": ""
})
),
"linkedViews": (),
"name": "",
"stateBasedAudienceDefinition": json!({
"excludeConditions": json!({
"exclusionDuration": "",
"segment": ""
}),
"includeConditions": json!({})
}),
"updated": "",
"webPropertyId": ""
});
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}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId \
--header 'content-type: application/json' \
--data '{
"accountId": "",
"audienceDefinition": {
"includeConditions": {
"daysToLookBack": 0,
"isSmartList": false,
"kind": "",
"membershipDurationDays": 0,
"segment": ""
}
},
"audienceType": "",
"created": "",
"description": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"linkedAdAccounts": [
{
"accountId": "",
"eligibleForSearch": false,
"id": "",
"internalWebPropertyId": "",
"kind": "",
"linkedAccountId": "",
"remarketingAudienceId": "",
"status": "",
"type": "",
"webPropertyId": ""
}
],
"linkedViews": [],
"name": "",
"stateBasedAudienceDefinition": {
"excludeConditions": {
"exclusionDuration": "",
"segment": ""
},
"includeConditions": {}
},
"updated": "",
"webPropertyId": ""
}'
echo '{
"accountId": "",
"audienceDefinition": {
"includeConditions": {
"daysToLookBack": 0,
"isSmartList": false,
"kind": "",
"membershipDurationDays": 0,
"segment": ""
}
},
"audienceType": "",
"created": "",
"description": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"linkedAdAccounts": [
{
"accountId": "",
"eligibleForSearch": false,
"id": "",
"internalWebPropertyId": "",
"kind": "",
"linkedAccountId": "",
"remarketingAudienceId": "",
"status": "",
"type": "",
"webPropertyId": ""
}
],
"linkedViews": [],
"name": "",
"stateBasedAudienceDefinition": {
"excludeConditions": {
"exclusionDuration": "",
"segment": ""
},
"includeConditions": {}
},
"updated": "",
"webPropertyId": ""
}' | \
http PUT {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '{\n "accountId": "",\n "audienceDefinition": {\n "includeConditions": {\n "daysToLookBack": 0,\n "isSmartList": false,\n "kind": "",\n "membershipDurationDays": 0,\n "segment": ""\n }\n },\n "audienceType": "",\n "created": "",\n "description": "",\n "id": "",\n "internalWebPropertyId": "",\n "kind": "",\n "linkedAdAccounts": [\n {\n "accountId": "",\n "eligibleForSearch": false,\n "id": "",\n "internalWebPropertyId": "",\n "kind": "",\n "linkedAccountId": "",\n "remarketingAudienceId": "",\n "status": "",\n "type": "",\n "webPropertyId": ""\n }\n ],\n "linkedViews": [],\n "name": "",\n "stateBasedAudienceDefinition": {\n "excludeConditions": {\n "exclusionDuration": "",\n "segment": ""\n },\n "includeConditions": {}\n },\n "updated": "",\n "webPropertyId": ""\n}' \
--output-document \
- {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"accountId": "",
"audienceDefinition": ["includeConditions": [
"daysToLookBack": 0,
"isSmartList": false,
"kind": "",
"membershipDurationDays": 0,
"segment": ""
]],
"audienceType": "",
"created": "",
"description": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"linkedAdAccounts": [
[
"accountId": "",
"eligibleForSearch": false,
"id": "",
"internalWebPropertyId": "",
"kind": "",
"linkedAccountId": "",
"remarketingAudienceId": "",
"status": "",
"type": "",
"webPropertyId": ""
]
],
"linkedViews": [],
"name": "",
"stateBasedAudienceDefinition": [
"excludeConditions": [
"exclusionDuration": "",
"segment": ""
],
"includeConditions": []
],
"updated": "",
"webPropertyId": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/remarketingAudiences/:remarketingAudienceId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
analytics.management.segments.list
{{baseUrl}}/management/segments
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/management/segments");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/management/segments")
require "http/client"
url = "{{baseUrl}}/management/segments"
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}}/management/segments"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/management/segments");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/management/segments"
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/management/segments HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/management/segments")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/management/segments"))
.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}}/management/segments")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/management/segments")
.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}}/management/segments');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/management/segments'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/management/segments';
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}}/management/segments',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/management/segments")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/management/segments',
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}}/management/segments'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/management/segments');
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}}/management/segments'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/management/segments';
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}}/management/segments"]
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}}/management/segments" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/management/segments",
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}}/management/segments');
echo $response->getBody();
setUrl('{{baseUrl}}/management/segments');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/management/segments');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/management/segments' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/management/segments' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/management/segments")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/management/segments"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/management/segments"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/management/segments")
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/management/segments') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/management/segments";
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}}/management/segments
http GET {{baseUrl}}/management/segments
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/management/segments
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/management/segments")! 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()
DELETE
analytics.management.unsampledReports.delete
{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports/:unsampledReportId
QUERY PARAMS
accountId
webPropertyId
profileId
unsampledReportId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports/:unsampledReportId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports/:unsampledReportId")
require "http/client"
url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports/:unsampledReportId"
response = HTTP::Client.delete url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Delete,
RequestUri = new Uri("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports/:unsampledReportId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports/:unsampledReportId");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports/:unsampledReportId"
req, _ := http.NewRequest("DELETE", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
DELETE /baseUrl/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports/:unsampledReportId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports/:unsampledReportId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports/:unsampledReportId"))
.method("DELETE", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports/:unsampledReportId")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports/:unsampledReportId")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('DELETE', '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports/:unsampledReportId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'DELETE',
url: '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports/:unsampledReportId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports/:unsampledReportId';
const options = {method: 'DELETE'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports/:unsampledReportId',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports/:unsampledReportId")
.delete(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports/:unsampledReportId',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'DELETE',
url: '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports/:unsampledReportId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports/:unsampledReportId');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'DELETE',
url: '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports/:unsampledReportId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports/:unsampledReportId';
const options = {method: 'DELETE'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports/:unsampledReportId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"DELETE"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports/:unsampledReportId" in
Client.call `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports/:unsampledReportId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('DELETE', '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports/:unsampledReportId');
echo $response->getBody();
setUrl('{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports/:unsampledReportId');
$request->setMethod(HTTP_METH_DELETE);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports/:unsampledReportId');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports/:unsampledReportId' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports/:unsampledReportId' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports/:unsampledReportId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports/:unsampledReportId"
response = requests.delete(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports/:unsampledReportId"
response <- VERB("DELETE", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports/:unsampledReportId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.delete('/baseUrl/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports/:unsampledReportId') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports/:unsampledReportId";
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("DELETE").unwrap(), url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request DELETE \
--url {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports/:unsampledReportId
http DELETE {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports/:unsampledReportId
wget --quiet \
--method DELETE \
--output-document \
- {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports/:unsampledReportId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports/:unsampledReportId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "DELETE"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
analytics.management.unsampledReports.get
{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports/:unsampledReportId
QUERY PARAMS
accountId
webPropertyId
profileId
unsampledReportId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports/:unsampledReportId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports/:unsampledReportId")
require "http/client"
url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports/:unsampledReportId"
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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports/:unsampledReportId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports/:unsampledReportId");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports/:unsampledReportId"
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/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports/:unsampledReportId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports/:unsampledReportId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports/:unsampledReportId"))
.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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports/:unsampledReportId")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports/:unsampledReportId")
.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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports/:unsampledReportId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports/:unsampledReportId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports/:unsampledReportId';
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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports/:unsampledReportId',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports/:unsampledReportId")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports/:unsampledReportId',
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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports/:unsampledReportId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports/:unsampledReportId');
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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports/:unsampledReportId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports/:unsampledReportId';
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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports/:unsampledReportId"]
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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports/:unsampledReportId" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports/:unsampledReportId",
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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports/:unsampledReportId');
echo $response->getBody();
setUrl('{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports/:unsampledReportId');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports/:unsampledReportId');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports/:unsampledReportId' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports/:unsampledReportId' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports/:unsampledReportId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports/:unsampledReportId"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports/:unsampledReportId"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports/:unsampledReportId")
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/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports/:unsampledReportId') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports/:unsampledReportId";
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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports/:unsampledReportId
http GET {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports/:unsampledReportId
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports/:unsampledReportId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports/:unsampledReportId")! 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
analytics.management.unsampledReports.insert
{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports
QUERY PARAMS
accountId
webPropertyId
profileId
BODY json
{
"accountId": "",
"cloudStorageDownloadDetails": {
"bucketId": "",
"objectId": ""
},
"created": "",
"dimensions": "",
"downloadType": "",
"driveDownloadDetails": {
"documentId": ""
},
"end-date": "",
"filters": "",
"id": "",
"kind": "",
"metrics": "",
"profileId": "",
"segment": "",
"selfLink": "",
"start-date": "",
"status": "",
"title": "",
"updated": "",
"webPropertyId": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"accountId\": \"\",\n \"cloudStorageDownloadDetails\": {\n \"bucketId\": \"\",\n \"objectId\": \"\"\n },\n \"created\": \"\",\n \"dimensions\": \"\",\n \"downloadType\": \"\",\n \"driveDownloadDetails\": {\n \"documentId\": \"\"\n },\n \"end-date\": \"\",\n \"filters\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"metrics\": \"\",\n \"profileId\": \"\",\n \"segment\": \"\",\n \"selfLink\": \"\",\n \"start-date\": \"\",\n \"status\": \"\",\n \"title\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports" {:content-type :json
:form-params {:accountId ""
:cloudStorageDownloadDetails {:bucketId ""
:objectId ""}
:created ""
:dimensions ""
:downloadType ""
:driveDownloadDetails {:documentId ""}
:end-date ""
:filters ""
:id ""
:kind ""
:metrics ""
:profileId ""
:segment ""
:selfLink ""
:start-date ""
:status ""
:title ""
:updated ""
:webPropertyId ""}})
require "http/client"
url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"accountId\": \"\",\n \"cloudStorageDownloadDetails\": {\n \"bucketId\": \"\",\n \"objectId\": \"\"\n },\n \"created\": \"\",\n \"dimensions\": \"\",\n \"downloadType\": \"\",\n \"driveDownloadDetails\": {\n \"documentId\": \"\"\n },\n \"end-date\": \"\",\n \"filters\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"metrics\": \"\",\n \"profileId\": \"\",\n \"segment\": \"\",\n \"selfLink\": \"\",\n \"start-date\": \"\",\n \"status\": \"\",\n \"title\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\"\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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports"),
Content = new StringContent("{\n \"accountId\": \"\",\n \"cloudStorageDownloadDetails\": {\n \"bucketId\": \"\",\n \"objectId\": \"\"\n },\n \"created\": \"\",\n \"dimensions\": \"\",\n \"downloadType\": \"\",\n \"driveDownloadDetails\": {\n \"documentId\": \"\"\n },\n \"end-date\": \"\",\n \"filters\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"metrics\": \"\",\n \"profileId\": \"\",\n \"segment\": \"\",\n \"selfLink\": \"\",\n \"start-date\": \"\",\n \"status\": \"\",\n \"title\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\"\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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"accountId\": \"\",\n \"cloudStorageDownloadDetails\": {\n \"bucketId\": \"\",\n \"objectId\": \"\"\n },\n \"created\": \"\",\n \"dimensions\": \"\",\n \"downloadType\": \"\",\n \"driveDownloadDetails\": {\n \"documentId\": \"\"\n },\n \"end-date\": \"\",\n \"filters\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"metrics\": \"\",\n \"profileId\": \"\",\n \"segment\": \"\",\n \"selfLink\": \"\",\n \"start-date\": \"\",\n \"status\": \"\",\n \"title\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports"
payload := strings.NewReader("{\n \"accountId\": \"\",\n \"cloudStorageDownloadDetails\": {\n \"bucketId\": \"\",\n \"objectId\": \"\"\n },\n \"created\": \"\",\n \"dimensions\": \"\",\n \"downloadType\": \"\",\n \"driveDownloadDetails\": {\n \"documentId\": \"\"\n },\n \"end-date\": \"\",\n \"filters\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"metrics\": \"\",\n \"profileId\": \"\",\n \"segment\": \"\",\n \"selfLink\": \"\",\n \"start-date\": \"\",\n \"status\": \"\",\n \"title\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\"\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/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 436
{
"accountId": "",
"cloudStorageDownloadDetails": {
"bucketId": "",
"objectId": ""
},
"created": "",
"dimensions": "",
"downloadType": "",
"driveDownloadDetails": {
"documentId": ""
},
"end-date": "",
"filters": "",
"id": "",
"kind": "",
"metrics": "",
"profileId": "",
"segment": "",
"selfLink": "",
"start-date": "",
"status": "",
"title": "",
"updated": "",
"webPropertyId": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports")
.setHeader("content-type", "application/json")
.setBody("{\n \"accountId\": \"\",\n \"cloudStorageDownloadDetails\": {\n \"bucketId\": \"\",\n \"objectId\": \"\"\n },\n \"created\": \"\",\n \"dimensions\": \"\",\n \"downloadType\": \"\",\n \"driveDownloadDetails\": {\n \"documentId\": \"\"\n },\n \"end-date\": \"\",\n \"filters\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"metrics\": \"\",\n \"profileId\": \"\",\n \"segment\": \"\",\n \"selfLink\": \"\",\n \"start-date\": \"\",\n \"status\": \"\",\n \"title\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"accountId\": \"\",\n \"cloudStorageDownloadDetails\": {\n \"bucketId\": \"\",\n \"objectId\": \"\"\n },\n \"created\": \"\",\n \"dimensions\": \"\",\n \"downloadType\": \"\",\n \"driveDownloadDetails\": {\n \"documentId\": \"\"\n },\n \"end-date\": \"\",\n \"filters\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"metrics\": \"\",\n \"profileId\": \"\",\n \"segment\": \"\",\n \"selfLink\": \"\",\n \"start-date\": \"\",\n \"status\": \"\",\n \"title\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"accountId\": \"\",\n \"cloudStorageDownloadDetails\": {\n \"bucketId\": \"\",\n \"objectId\": \"\"\n },\n \"created\": \"\",\n \"dimensions\": \"\",\n \"downloadType\": \"\",\n \"driveDownloadDetails\": {\n \"documentId\": \"\"\n },\n \"end-date\": \"\",\n \"filters\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"metrics\": \"\",\n \"profileId\": \"\",\n \"segment\": \"\",\n \"selfLink\": \"\",\n \"start-date\": \"\",\n \"status\": \"\",\n \"title\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports")
.header("content-type", "application/json")
.body("{\n \"accountId\": \"\",\n \"cloudStorageDownloadDetails\": {\n \"bucketId\": \"\",\n \"objectId\": \"\"\n },\n \"created\": \"\",\n \"dimensions\": \"\",\n \"downloadType\": \"\",\n \"driveDownloadDetails\": {\n \"documentId\": \"\"\n },\n \"end-date\": \"\",\n \"filters\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"metrics\": \"\",\n \"profileId\": \"\",\n \"segment\": \"\",\n \"selfLink\": \"\",\n \"start-date\": \"\",\n \"status\": \"\",\n \"title\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\"\n}")
.asString();
const data = JSON.stringify({
accountId: '',
cloudStorageDownloadDetails: {
bucketId: '',
objectId: ''
},
created: '',
dimensions: '',
downloadType: '',
driveDownloadDetails: {
documentId: ''
},
'end-date': '',
filters: '',
id: '',
kind: '',
metrics: '',
profileId: '',
segment: '',
selfLink: '',
'start-date': '',
status: '',
title: '',
updated: '',
webPropertyId: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports',
headers: {'content-type': 'application/json'},
data: {
accountId: '',
cloudStorageDownloadDetails: {bucketId: '', objectId: ''},
created: '',
dimensions: '',
downloadType: '',
driveDownloadDetails: {documentId: ''},
'end-date': '',
filters: '',
id: '',
kind: '',
metrics: '',
profileId: '',
segment: '',
selfLink: '',
'start-date': '',
status: '',
title: '',
updated: '',
webPropertyId: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"accountId":"","cloudStorageDownloadDetails":{"bucketId":"","objectId":""},"created":"","dimensions":"","downloadType":"","driveDownloadDetails":{"documentId":""},"end-date":"","filters":"","id":"","kind":"","metrics":"","profileId":"","segment":"","selfLink":"","start-date":"","status":"","title":"","updated":"","webPropertyId":""}'
};
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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "accountId": "",\n "cloudStorageDownloadDetails": {\n "bucketId": "",\n "objectId": ""\n },\n "created": "",\n "dimensions": "",\n "downloadType": "",\n "driveDownloadDetails": {\n "documentId": ""\n },\n "end-date": "",\n "filters": "",\n "id": "",\n "kind": "",\n "metrics": "",\n "profileId": "",\n "segment": "",\n "selfLink": "",\n "start-date": "",\n "status": "",\n "title": "",\n "updated": "",\n "webPropertyId": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"accountId\": \"\",\n \"cloudStorageDownloadDetails\": {\n \"bucketId\": \"\",\n \"objectId\": \"\"\n },\n \"created\": \"\",\n \"dimensions\": \"\",\n \"downloadType\": \"\",\n \"driveDownloadDetails\": {\n \"documentId\": \"\"\n },\n \"end-date\": \"\",\n \"filters\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"metrics\": \"\",\n \"profileId\": \"\",\n \"segment\": \"\",\n \"selfLink\": \"\",\n \"start-date\": \"\",\n \"status\": \"\",\n \"title\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports")
.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/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
accountId: '',
cloudStorageDownloadDetails: {bucketId: '', objectId: ''},
created: '',
dimensions: '',
downloadType: '',
driveDownloadDetails: {documentId: ''},
'end-date': '',
filters: '',
id: '',
kind: '',
metrics: '',
profileId: '',
segment: '',
selfLink: '',
'start-date': '',
status: '',
title: '',
updated: '',
webPropertyId: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports',
headers: {'content-type': 'application/json'},
body: {
accountId: '',
cloudStorageDownloadDetails: {bucketId: '', objectId: ''},
created: '',
dimensions: '',
downloadType: '',
driveDownloadDetails: {documentId: ''},
'end-date': '',
filters: '',
id: '',
kind: '',
metrics: '',
profileId: '',
segment: '',
selfLink: '',
'start-date': '',
status: '',
title: '',
updated: '',
webPropertyId: ''
},
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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
accountId: '',
cloudStorageDownloadDetails: {
bucketId: '',
objectId: ''
},
created: '',
dimensions: '',
downloadType: '',
driveDownloadDetails: {
documentId: ''
},
'end-date': '',
filters: '',
id: '',
kind: '',
metrics: '',
profileId: '',
segment: '',
selfLink: '',
'start-date': '',
status: '',
title: '',
updated: '',
webPropertyId: ''
});
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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports',
headers: {'content-type': 'application/json'},
data: {
accountId: '',
cloudStorageDownloadDetails: {bucketId: '', objectId: ''},
created: '',
dimensions: '',
downloadType: '',
driveDownloadDetails: {documentId: ''},
'end-date': '',
filters: '',
id: '',
kind: '',
metrics: '',
profileId: '',
segment: '',
selfLink: '',
'start-date': '',
status: '',
title: '',
updated: '',
webPropertyId: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"accountId":"","cloudStorageDownloadDetails":{"bucketId":"","objectId":""},"created":"","dimensions":"","downloadType":"","driveDownloadDetails":{"documentId":""},"end-date":"","filters":"","id":"","kind":"","metrics":"","profileId":"","segment":"","selfLink":"","start-date":"","status":"","title":"","updated":"","webPropertyId":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"accountId": @"",
@"cloudStorageDownloadDetails": @{ @"bucketId": @"", @"objectId": @"" },
@"created": @"",
@"dimensions": @"",
@"downloadType": @"",
@"driveDownloadDetails": @{ @"documentId": @"" },
@"end-date": @"",
@"filters": @"",
@"id": @"",
@"kind": @"",
@"metrics": @"",
@"profileId": @"",
@"segment": @"",
@"selfLink": @"",
@"start-date": @"",
@"status": @"",
@"title": @"",
@"updated": @"",
@"webPropertyId": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports"]
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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"accountId\": \"\",\n \"cloudStorageDownloadDetails\": {\n \"bucketId\": \"\",\n \"objectId\": \"\"\n },\n \"created\": \"\",\n \"dimensions\": \"\",\n \"downloadType\": \"\",\n \"driveDownloadDetails\": {\n \"documentId\": \"\"\n },\n \"end-date\": \"\",\n \"filters\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"metrics\": \"\",\n \"profileId\": \"\",\n \"segment\": \"\",\n \"selfLink\": \"\",\n \"start-date\": \"\",\n \"status\": \"\",\n \"title\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'accountId' => '',
'cloudStorageDownloadDetails' => [
'bucketId' => '',
'objectId' => ''
],
'created' => '',
'dimensions' => '',
'downloadType' => '',
'driveDownloadDetails' => [
'documentId' => ''
],
'end-date' => '',
'filters' => '',
'id' => '',
'kind' => '',
'metrics' => '',
'profileId' => '',
'segment' => '',
'selfLink' => '',
'start-date' => '',
'status' => '',
'title' => '',
'updated' => '',
'webPropertyId' => ''
]),
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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports', [
'body' => '{
"accountId": "",
"cloudStorageDownloadDetails": {
"bucketId": "",
"objectId": ""
},
"created": "",
"dimensions": "",
"downloadType": "",
"driveDownloadDetails": {
"documentId": ""
},
"end-date": "",
"filters": "",
"id": "",
"kind": "",
"metrics": "",
"profileId": "",
"segment": "",
"selfLink": "",
"start-date": "",
"status": "",
"title": "",
"updated": "",
"webPropertyId": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'accountId' => '',
'cloudStorageDownloadDetails' => [
'bucketId' => '',
'objectId' => ''
],
'created' => '',
'dimensions' => '',
'downloadType' => '',
'driveDownloadDetails' => [
'documentId' => ''
],
'end-date' => '',
'filters' => '',
'id' => '',
'kind' => '',
'metrics' => '',
'profileId' => '',
'segment' => '',
'selfLink' => '',
'start-date' => '',
'status' => '',
'title' => '',
'updated' => '',
'webPropertyId' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'accountId' => '',
'cloudStorageDownloadDetails' => [
'bucketId' => '',
'objectId' => ''
],
'created' => '',
'dimensions' => '',
'downloadType' => '',
'driveDownloadDetails' => [
'documentId' => ''
],
'end-date' => '',
'filters' => '',
'id' => '',
'kind' => '',
'metrics' => '',
'profileId' => '',
'segment' => '',
'selfLink' => '',
'start-date' => '',
'status' => '',
'title' => '',
'updated' => '',
'webPropertyId' => ''
]));
$request->setRequestUrl('{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports');
$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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"accountId": "",
"cloudStorageDownloadDetails": {
"bucketId": "",
"objectId": ""
},
"created": "",
"dimensions": "",
"downloadType": "",
"driveDownloadDetails": {
"documentId": ""
},
"end-date": "",
"filters": "",
"id": "",
"kind": "",
"metrics": "",
"profileId": "",
"segment": "",
"selfLink": "",
"start-date": "",
"status": "",
"title": "",
"updated": "",
"webPropertyId": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"accountId": "",
"cloudStorageDownloadDetails": {
"bucketId": "",
"objectId": ""
},
"created": "",
"dimensions": "",
"downloadType": "",
"driveDownloadDetails": {
"documentId": ""
},
"end-date": "",
"filters": "",
"id": "",
"kind": "",
"metrics": "",
"profileId": "",
"segment": "",
"selfLink": "",
"start-date": "",
"status": "",
"title": "",
"updated": "",
"webPropertyId": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"accountId\": \"\",\n \"cloudStorageDownloadDetails\": {\n \"bucketId\": \"\",\n \"objectId\": \"\"\n },\n \"created\": \"\",\n \"dimensions\": \"\",\n \"downloadType\": \"\",\n \"driveDownloadDetails\": {\n \"documentId\": \"\"\n },\n \"end-date\": \"\",\n \"filters\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"metrics\": \"\",\n \"profileId\": \"\",\n \"segment\": \"\",\n \"selfLink\": \"\",\n \"start-date\": \"\",\n \"status\": \"\",\n \"title\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports"
payload = {
"accountId": "",
"cloudStorageDownloadDetails": {
"bucketId": "",
"objectId": ""
},
"created": "",
"dimensions": "",
"downloadType": "",
"driveDownloadDetails": { "documentId": "" },
"end-date": "",
"filters": "",
"id": "",
"kind": "",
"metrics": "",
"profileId": "",
"segment": "",
"selfLink": "",
"start-date": "",
"status": "",
"title": "",
"updated": "",
"webPropertyId": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports"
payload <- "{\n \"accountId\": \"\",\n \"cloudStorageDownloadDetails\": {\n \"bucketId\": \"\",\n \"objectId\": \"\"\n },\n \"created\": \"\",\n \"dimensions\": \"\",\n \"downloadType\": \"\",\n \"driveDownloadDetails\": {\n \"documentId\": \"\"\n },\n \"end-date\": \"\",\n \"filters\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"metrics\": \"\",\n \"profileId\": \"\",\n \"segment\": \"\",\n \"selfLink\": \"\",\n \"start-date\": \"\",\n \"status\": \"\",\n \"title\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\"\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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"accountId\": \"\",\n \"cloudStorageDownloadDetails\": {\n \"bucketId\": \"\",\n \"objectId\": \"\"\n },\n \"created\": \"\",\n \"dimensions\": \"\",\n \"downloadType\": \"\",\n \"driveDownloadDetails\": {\n \"documentId\": \"\"\n },\n \"end-date\": \"\",\n \"filters\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"metrics\": \"\",\n \"profileId\": \"\",\n \"segment\": \"\",\n \"selfLink\": \"\",\n \"start-date\": \"\",\n \"status\": \"\",\n \"title\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\"\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/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports') do |req|
req.body = "{\n \"accountId\": \"\",\n \"cloudStorageDownloadDetails\": {\n \"bucketId\": \"\",\n \"objectId\": \"\"\n },\n \"created\": \"\",\n \"dimensions\": \"\",\n \"downloadType\": \"\",\n \"driveDownloadDetails\": {\n \"documentId\": \"\"\n },\n \"end-date\": \"\",\n \"filters\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"metrics\": \"\",\n \"profileId\": \"\",\n \"segment\": \"\",\n \"selfLink\": \"\",\n \"start-date\": \"\",\n \"status\": \"\",\n \"title\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports";
let payload = json!({
"accountId": "",
"cloudStorageDownloadDetails": json!({
"bucketId": "",
"objectId": ""
}),
"created": "",
"dimensions": "",
"downloadType": "",
"driveDownloadDetails": json!({"documentId": ""}),
"end-date": "",
"filters": "",
"id": "",
"kind": "",
"metrics": "",
"profileId": "",
"segment": "",
"selfLink": "",
"start-date": "",
"status": "",
"title": "",
"updated": "",
"webPropertyId": ""
});
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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports \
--header 'content-type: application/json' \
--data '{
"accountId": "",
"cloudStorageDownloadDetails": {
"bucketId": "",
"objectId": ""
},
"created": "",
"dimensions": "",
"downloadType": "",
"driveDownloadDetails": {
"documentId": ""
},
"end-date": "",
"filters": "",
"id": "",
"kind": "",
"metrics": "",
"profileId": "",
"segment": "",
"selfLink": "",
"start-date": "",
"status": "",
"title": "",
"updated": "",
"webPropertyId": ""
}'
echo '{
"accountId": "",
"cloudStorageDownloadDetails": {
"bucketId": "",
"objectId": ""
},
"created": "",
"dimensions": "",
"downloadType": "",
"driveDownloadDetails": {
"documentId": ""
},
"end-date": "",
"filters": "",
"id": "",
"kind": "",
"metrics": "",
"profileId": "",
"segment": "",
"selfLink": "",
"start-date": "",
"status": "",
"title": "",
"updated": "",
"webPropertyId": ""
}' | \
http POST {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "accountId": "",\n "cloudStorageDownloadDetails": {\n "bucketId": "",\n "objectId": ""\n },\n "created": "",\n "dimensions": "",\n "downloadType": "",\n "driveDownloadDetails": {\n "documentId": ""\n },\n "end-date": "",\n "filters": "",\n "id": "",\n "kind": "",\n "metrics": "",\n "profileId": "",\n "segment": "",\n "selfLink": "",\n "start-date": "",\n "status": "",\n "title": "",\n "updated": "",\n "webPropertyId": ""\n}' \
--output-document \
- {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"accountId": "",
"cloudStorageDownloadDetails": [
"bucketId": "",
"objectId": ""
],
"created": "",
"dimensions": "",
"downloadType": "",
"driveDownloadDetails": ["documentId": ""],
"end-date": "",
"filters": "",
"id": "",
"kind": "",
"metrics": "",
"profileId": "",
"segment": "",
"selfLink": "",
"start-date": "",
"status": "",
"title": "",
"updated": "",
"webPropertyId": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports")! 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
analytics.management.unsampledReports.list
{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports
QUERY PARAMS
accountId
webPropertyId
profileId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports")
require "http/client"
url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports"
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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports"
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/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports"))
.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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports")
.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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports';
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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports',
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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports');
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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports';
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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports"]
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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports",
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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports');
echo $response->getBody();
setUrl('{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports")
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/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports";
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}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports
http GET {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/unsampledReports")! 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
analytics.management.uploads.deleteUploadData
{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/deleteUploadData
QUERY PARAMS
accountId
webPropertyId
customDataSourceId
BODY json
{
"customDataImportUids": []
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/deleteUploadData");
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 \"customDataImportUids\": []\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/deleteUploadData" {:content-type :json
:form-params {:customDataImportUids []}})
require "http/client"
url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/deleteUploadData"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"customDataImportUids\": []\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}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/deleteUploadData"),
Content = new StringContent("{\n \"customDataImportUids\": []\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}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/deleteUploadData");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"customDataImportUids\": []\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/deleteUploadData"
payload := strings.NewReader("{\n \"customDataImportUids\": []\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/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/deleteUploadData HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 32
{
"customDataImportUids": []
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/deleteUploadData")
.setHeader("content-type", "application/json")
.setBody("{\n \"customDataImportUids\": []\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/deleteUploadData"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"customDataImportUids\": []\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 \"customDataImportUids\": []\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/deleteUploadData")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/deleteUploadData")
.header("content-type", "application/json")
.body("{\n \"customDataImportUids\": []\n}")
.asString();
const data = JSON.stringify({
customDataImportUids: []
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/deleteUploadData');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/deleteUploadData',
headers: {'content-type': 'application/json'},
data: {customDataImportUids: []}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/deleteUploadData';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"customDataImportUids":[]}'
};
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}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/deleteUploadData',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "customDataImportUids": []\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"customDataImportUids\": []\n}")
val request = Request.Builder()
.url("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/deleteUploadData")
.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/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/deleteUploadData',
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({customDataImportUids: []}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/deleteUploadData',
headers: {'content-type': 'application/json'},
body: {customDataImportUids: []},
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}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/deleteUploadData');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
customDataImportUids: []
});
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}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/deleteUploadData',
headers: {'content-type': 'application/json'},
data: {customDataImportUids: []}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/deleteUploadData';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"customDataImportUids":[]}'
};
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 = @{ @"customDataImportUids": @[ ] };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/deleteUploadData"]
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}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/deleteUploadData" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"customDataImportUids\": []\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/deleteUploadData",
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([
'customDataImportUids' => [
]
]),
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}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/deleteUploadData', [
'body' => '{
"customDataImportUids": []
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/deleteUploadData');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'customDataImportUids' => [
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'customDataImportUids' => [
]
]));
$request->setRequestUrl('{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/deleteUploadData');
$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}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/deleteUploadData' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"customDataImportUids": []
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/deleteUploadData' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"customDataImportUids": []
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"customDataImportUids\": []\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/deleteUploadData", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/deleteUploadData"
payload = { "customDataImportUids": [] }
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/deleteUploadData"
payload <- "{\n \"customDataImportUids\": []\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}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/deleteUploadData")
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 \"customDataImportUids\": []\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/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/deleteUploadData') do |req|
req.body = "{\n \"customDataImportUids\": []\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/deleteUploadData";
let payload = json!({"customDataImportUids": ()});
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}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/deleteUploadData \
--header 'content-type: application/json' \
--data '{
"customDataImportUids": []
}'
echo '{
"customDataImportUids": []
}' | \
http POST {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/deleteUploadData \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "customDataImportUids": []\n}' \
--output-document \
- {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/deleteUploadData
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["customDataImportUids": []] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/deleteUploadData")! 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
analytics.management.uploads.get
{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/uploads/:uploadId
QUERY PARAMS
accountId
webPropertyId
customDataSourceId
uploadId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/uploads/:uploadId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/uploads/:uploadId")
require "http/client"
url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/uploads/:uploadId"
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}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/uploads/:uploadId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/uploads/:uploadId");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/uploads/:uploadId"
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/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/uploads/:uploadId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/uploads/:uploadId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/uploads/:uploadId"))
.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}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/uploads/:uploadId")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/uploads/:uploadId")
.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}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/uploads/:uploadId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/uploads/:uploadId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/uploads/:uploadId';
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}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/uploads/:uploadId',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/uploads/:uploadId")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/uploads/:uploadId',
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}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/uploads/:uploadId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/uploads/:uploadId');
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}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/uploads/:uploadId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/uploads/:uploadId';
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}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/uploads/:uploadId"]
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}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/uploads/:uploadId" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/uploads/:uploadId",
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}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/uploads/:uploadId');
echo $response->getBody();
setUrl('{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/uploads/:uploadId');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/uploads/:uploadId');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/uploads/:uploadId' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/uploads/:uploadId' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/uploads/:uploadId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/uploads/:uploadId"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/uploads/:uploadId"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/uploads/:uploadId")
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/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/uploads/:uploadId') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/uploads/:uploadId";
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}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/uploads/:uploadId
http GET {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/uploads/:uploadId
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/uploads/:uploadId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/uploads/:uploadId")! 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
analytics.management.uploads.list
{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/uploads
QUERY PARAMS
accountId
webPropertyId
customDataSourceId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/uploads");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/uploads")
require "http/client"
url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/uploads"
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}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/uploads"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/uploads");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/uploads"
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/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/uploads HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/uploads")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/uploads"))
.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}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/uploads")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/uploads")
.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}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/uploads');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/uploads'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/uploads';
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}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/uploads',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/uploads")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/uploads',
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}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/uploads'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/uploads');
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}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/uploads'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/uploads';
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}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/uploads"]
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}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/uploads" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/uploads",
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}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/uploads');
echo $response->getBody();
setUrl('{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/uploads');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/uploads');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/uploads' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/uploads' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/uploads")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/uploads"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/uploads"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/uploads")
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/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/uploads') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/uploads";
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}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/uploads
http GET {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/uploads
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/uploads
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/uploads")! 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
analytics.management.uploads.uploadData
{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/uploads
QUERY PARAMS
accountId
webPropertyId
customDataSourceId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/uploads");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/uploads")
require "http/client"
url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/uploads"
response = HTTP::Client.post url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/uploads"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/uploads");
var request = new RestRequest("", Method.Post);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/uploads"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/uploads HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/uploads")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/uploads"))
.method("POST", 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}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/uploads")
.post(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/uploads")
.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('POST', '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/uploads');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/uploads'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/uploads';
const options = {method: 'POST'};
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}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/uploads',
method: 'POST',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/uploads")
.post(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/uploads',
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: 'POST',
url: '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/uploads'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/uploads');
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}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/uploads'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/uploads';
const options = {method: 'POST'};
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}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/uploads"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
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}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/uploads" in
Client.call `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/uploads",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/uploads');
echo $response->getBody();
setUrl('{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/uploads');
$request->setMethod(HTTP_METH_POST);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/uploads');
$request->setRequestMethod('POST');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/uploads' -Method POST
$response = Invoke-RestMethod -Uri '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/uploads' -Method POST
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("POST", "/baseUrl/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/uploads")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/uploads"
response = requests.post(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/uploads"
response <- VERB("POST", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/uploads")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.post('/baseUrl/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/uploads') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/uploads";
let client = reqwest::Client::new();
let response = client.post(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/uploads
http POST {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/uploads
wget --quiet \
--method POST \
--output-document \
- {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/uploads
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customDataSources/:customDataSourceId/uploads")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
DELETE
analytics.management.webPropertyAdWordsLinks.delete
{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId
QUERY PARAMS
accountId
webPropertyId
webPropertyAdWordsLinkId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId")
require "http/client"
url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId"
response = HTTP::Client.delete url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Delete,
RequestUri = new Uri("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId"
req, _ := http.NewRequest("DELETE", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
DELETE /baseUrl/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId"))
.method("DELETE", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('DELETE', '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'DELETE',
url: '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId';
const options = {method: 'DELETE'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId")
.delete(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'DELETE',
url: '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'DELETE',
url: '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId';
const options = {method: 'DELETE'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"DELETE"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId" in
Client.call `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('DELETE', '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId');
echo $response->getBody();
setUrl('{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId');
$request->setMethod(HTTP_METH_DELETE);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId"
response = requests.delete(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId"
response <- VERB("DELETE", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.delete('/baseUrl/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId";
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("DELETE").unwrap(), url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request DELETE \
--url {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId
http DELETE {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId
wget --quiet \
--method DELETE \
--output-document \
- {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "DELETE"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
analytics.management.webPropertyAdWordsLinks.get
{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId
QUERY PARAMS
accountId
webPropertyId
webPropertyAdWordsLinkId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId")
require "http/client"
url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId"
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}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId"
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/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId"))
.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}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId")
.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}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId';
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}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId',
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}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId');
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}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId';
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}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId"]
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}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId",
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}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId');
echo $response->getBody();
setUrl('{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId")
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/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId";
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}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId
http GET {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId")! 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
analytics.management.webPropertyAdWordsLinks.insert
{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks
QUERY PARAMS
accountId
webPropertyId
BODY json
{
"adWordsAccounts": [
{
"autoTaggingEnabled": false,
"customerId": "",
"kind": ""
}
],
"entity": {
"webPropertyRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": ""
}
},
"id": "",
"kind": "",
"name": "",
"profileIds": [],
"selfLink": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks");
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 \"adWordsAccounts\": [\n {\n \"autoTaggingEnabled\": false,\n \"customerId\": \"\",\n \"kind\": \"\"\n }\n ],\n \"entity\": {\n \"webPropertyRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n }\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"profileIds\": [],\n \"selfLink\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks" {:content-type :json
:form-params {:adWordsAccounts [{:autoTaggingEnabled false
:customerId ""
:kind ""}]
:entity {:webPropertyRef {:accountId ""
:href ""
:id ""
:internalWebPropertyId ""
:kind ""
:name ""}}
:id ""
:kind ""
:name ""
:profileIds []
:selfLink ""}})
require "http/client"
url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"adWordsAccounts\": [\n {\n \"autoTaggingEnabled\": false,\n \"customerId\": \"\",\n \"kind\": \"\"\n }\n ],\n \"entity\": {\n \"webPropertyRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n }\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"profileIds\": [],\n \"selfLink\": \"\"\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}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks"),
Content = new StringContent("{\n \"adWordsAccounts\": [\n {\n \"autoTaggingEnabled\": false,\n \"customerId\": \"\",\n \"kind\": \"\"\n }\n ],\n \"entity\": {\n \"webPropertyRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n }\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"profileIds\": [],\n \"selfLink\": \"\"\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}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"adWordsAccounts\": [\n {\n \"autoTaggingEnabled\": false,\n \"customerId\": \"\",\n \"kind\": \"\"\n }\n ],\n \"entity\": {\n \"webPropertyRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n }\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"profileIds\": [],\n \"selfLink\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks"
payload := strings.NewReader("{\n \"adWordsAccounts\": [\n {\n \"autoTaggingEnabled\": false,\n \"customerId\": \"\",\n \"kind\": \"\"\n }\n ],\n \"entity\": {\n \"webPropertyRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n }\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"profileIds\": [],\n \"selfLink\": \"\"\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/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 372
{
"adWordsAccounts": [
{
"autoTaggingEnabled": false,
"customerId": "",
"kind": ""
}
],
"entity": {
"webPropertyRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": ""
}
},
"id": "",
"kind": "",
"name": "",
"profileIds": [],
"selfLink": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks")
.setHeader("content-type", "application/json")
.setBody("{\n \"adWordsAccounts\": [\n {\n \"autoTaggingEnabled\": false,\n \"customerId\": \"\",\n \"kind\": \"\"\n }\n ],\n \"entity\": {\n \"webPropertyRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n }\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"profileIds\": [],\n \"selfLink\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"adWordsAccounts\": [\n {\n \"autoTaggingEnabled\": false,\n \"customerId\": \"\",\n \"kind\": \"\"\n }\n ],\n \"entity\": {\n \"webPropertyRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n }\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"profileIds\": [],\n \"selfLink\": \"\"\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 \"adWordsAccounts\": [\n {\n \"autoTaggingEnabled\": false,\n \"customerId\": \"\",\n \"kind\": \"\"\n }\n ],\n \"entity\": {\n \"webPropertyRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n }\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"profileIds\": [],\n \"selfLink\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks")
.header("content-type", "application/json")
.body("{\n \"adWordsAccounts\": [\n {\n \"autoTaggingEnabled\": false,\n \"customerId\": \"\",\n \"kind\": \"\"\n }\n ],\n \"entity\": {\n \"webPropertyRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n }\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"profileIds\": [],\n \"selfLink\": \"\"\n}")
.asString();
const data = JSON.stringify({
adWordsAccounts: [
{
autoTaggingEnabled: false,
customerId: '',
kind: ''
}
],
entity: {
webPropertyRef: {
accountId: '',
href: '',
id: '',
internalWebPropertyId: '',
kind: '',
name: ''
}
},
id: '',
kind: '',
name: '',
profileIds: [],
selfLink: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks',
headers: {'content-type': 'application/json'},
data: {
adWordsAccounts: [{autoTaggingEnabled: false, customerId: '', kind: ''}],
entity: {
webPropertyRef: {accountId: '', href: '', id: '', internalWebPropertyId: '', kind: '', name: ''}
},
id: '',
kind: '',
name: '',
profileIds: [],
selfLink: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"adWordsAccounts":[{"autoTaggingEnabled":false,"customerId":"","kind":""}],"entity":{"webPropertyRef":{"accountId":"","href":"","id":"","internalWebPropertyId":"","kind":"","name":""}},"id":"","kind":"","name":"","profileIds":[],"selfLink":""}'
};
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}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "adWordsAccounts": [\n {\n "autoTaggingEnabled": false,\n "customerId": "",\n "kind": ""\n }\n ],\n "entity": {\n "webPropertyRef": {\n "accountId": "",\n "href": "",\n "id": "",\n "internalWebPropertyId": "",\n "kind": "",\n "name": ""\n }\n },\n "id": "",\n "kind": "",\n "name": "",\n "profileIds": [],\n "selfLink": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"adWordsAccounts\": [\n {\n \"autoTaggingEnabled\": false,\n \"customerId\": \"\",\n \"kind\": \"\"\n }\n ],\n \"entity\": {\n \"webPropertyRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n }\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"profileIds\": [],\n \"selfLink\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks")
.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/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks',
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({
adWordsAccounts: [{autoTaggingEnabled: false, customerId: '', kind: ''}],
entity: {
webPropertyRef: {accountId: '', href: '', id: '', internalWebPropertyId: '', kind: '', name: ''}
},
id: '',
kind: '',
name: '',
profileIds: [],
selfLink: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks',
headers: {'content-type': 'application/json'},
body: {
adWordsAccounts: [{autoTaggingEnabled: false, customerId: '', kind: ''}],
entity: {
webPropertyRef: {accountId: '', href: '', id: '', internalWebPropertyId: '', kind: '', name: ''}
},
id: '',
kind: '',
name: '',
profileIds: [],
selfLink: ''
},
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}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
adWordsAccounts: [
{
autoTaggingEnabled: false,
customerId: '',
kind: ''
}
],
entity: {
webPropertyRef: {
accountId: '',
href: '',
id: '',
internalWebPropertyId: '',
kind: '',
name: ''
}
},
id: '',
kind: '',
name: '',
profileIds: [],
selfLink: ''
});
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}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks',
headers: {'content-type': 'application/json'},
data: {
adWordsAccounts: [{autoTaggingEnabled: false, customerId: '', kind: ''}],
entity: {
webPropertyRef: {accountId: '', href: '', id: '', internalWebPropertyId: '', kind: '', name: ''}
},
id: '',
kind: '',
name: '',
profileIds: [],
selfLink: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"adWordsAccounts":[{"autoTaggingEnabled":false,"customerId":"","kind":""}],"entity":{"webPropertyRef":{"accountId":"","href":"","id":"","internalWebPropertyId":"","kind":"","name":""}},"id":"","kind":"","name":"","profileIds":[],"selfLink":""}'
};
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 = @{ @"adWordsAccounts": @[ @{ @"autoTaggingEnabled": @NO, @"customerId": @"", @"kind": @"" } ],
@"entity": @{ @"webPropertyRef": @{ @"accountId": @"", @"href": @"", @"id": @"", @"internalWebPropertyId": @"", @"kind": @"", @"name": @"" } },
@"id": @"",
@"kind": @"",
@"name": @"",
@"profileIds": @[ ],
@"selfLink": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks"]
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}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"adWordsAccounts\": [\n {\n \"autoTaggingEnabled\": false,\n \"customerId\": \"\",\n \"kind\": \"\"\n }\n ],\n \"entity\": {\n \"webPropertyRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n }\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"profileIds\": [],\n \"selfLink\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks",
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([
'adWordsAccounts' => [
[
'autoTaggingEnabled' => null,
'customerId' => '',
'kind' => ''
]
],
'entity' => [
'webPropertyRef' => [
'accountId' => '',
'href' => '',
'id' => '',
'internalWebPropertyId' => '',
'kind' => '',
'name' => ''
]
],
'id' => '',
'kind' => '',
'name' => '',
'profileIds' => [
],
'selfLink' => ''
]),
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}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks', [
'body' => '{
"adWordsAccounts": [
{
"autoTaggingEnabled": false,
"customerId": "",
"kind": ""
}
],
"entity": {
"webPropertyRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": ""
}
},
"id": "",
"kind": "",
"name": "",
"profileIds": [],
"selfLink": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'adWordsAccounts' => [
[
'autoTaggingEnabled' => null,
'customerId' => '',
'kind' => ''
]
],
'entity' => [
'webPropertyRef' => [
'accountId' => '',
'href' => '',
'id' => '',
'internalWebPropertyId' => '',
'kind' => '',
'name' => ''
]
],
'id' => '',
'kind' => '',
'name' => '',
'profileIds' => [
],
'selfLink' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'adWordsAccounts' => [
[
'autoTaggingEnabled' => null,
'customerId' => '',
'kind' => ''
]
],
'entity' => [
'webPropertyRef' => [
'accountId' => '',
'href' => '',
'id' => '',
'internalWebPropertyId' => '',
'kind' => '',
'name' => ''
]
],
'id' => '',
'kind' => '',
'name' => '',
'profileIds' => [
],
'selfLink' => ''
]));
$request->setRequestUrl('{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks');
$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}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"adWordsAccounts": [
{
"autoTaggingEnabled": false,
"customerId": "",
"kind": ""
}
],
"entity": {
"webPropertyRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": ""
}
},
"id": "",
"kind": "",
"name": "",
"profileIds": [],
"selfLink": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"adWordsAccounts": [
{
"autoTaggingEnabled": false,
"customerId": "",
"kind": ""
}
],
"entity": {
"webPropertyRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": ""
}
},
"id": "",
"kind": "",
"name": "",
"profileIds": [],
"selfLink": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"adWordsAccounts\": [\n {\n \"autoTaggingEnabled\": false,\n \"customerId\": \"\",\n \"kind\": \"\"\n }\n ],\n \"entity\": {\n \"webPropertyRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n }\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"profileIds\": [],\n \"selfLink\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks"
payload = {
"adWordsAccounts": [
{
"autoTaggingEnabled": False,
"customerId": "",
"kind": ""
}
],
"entity": { "webPropertyRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": ""
} },
"id": "",
"kind": "",
"name": "",
"profileIds": [],
"selfLink": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks"
payload <- "{\n \"adWordsAccounts\": [\n {\n \"autoTaggingEnabled\": false,\n \"customerId\": \"\",\n \"kind\": \"\"\n }\n ],\n \"entity\": {\n \"webPropertyRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n }\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"profileIds\": [],\n \"selfLink\": \"\"\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}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks")
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 \"adWordsAccounts\": [\n {\n \"autoTaggingEnabled\": false,\n \"customerId\": \"\",\n \"kind\": \"\"\n }\n ],\n \"entity\": {\n \"webPropertyRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n }\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"profileIds\": [],\n \"selfLink\": \"\"\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/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks') do |req|
req.body = "{\n \"adWordsAccounts\": [\n {\n \"autoTaggingEnabled\": false,\n \"customerId\": \"\",\n \"kind\": \"\"\n }\n ],\n \"entity\": {\n \"webPropertyRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n }\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"profileIds\": [],\n \"selfLink\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks";
let payload = json!({
"adWordsAccounts": (
json!({
"autoTaggingEnabled": false,
"customerId": "",
"kind": ""
})
),
"entity": json!({"webPropertyRef": json!({
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": ""
})}),
"id": "",
"kind": "",
"name": "",
"profileIds": (),
"selfLink": ""
});
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}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks \
--header 'content-type: application/json' \
--data '{
"adWordsAccounts": [
{
"autoTaggingEnabled": false,
"customerId": "",
"kind": ""
}
],
"entity": {
"webPropertyRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": ""
}
},
"id": "",
"kind": "",
"name": "",
"profileIds": [],
"selfLink": ""
}'
echo '{
"adWordsAccounts": [
{
"autoTaggingEnabled": false,
"customerId": "",
"kind": ""
}
],
"entity": {
"webPropertyRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": ""
}
},
"id": "",
"kind": "",
"name": "",
"profileIds": [],
"selfLink": ""
}' | \
http POST {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "adWordsAccounts": [\n {\n "autoTaggingEnabled": false,\n "customerId": "",\n "kind": ""\n }\n ],\n "entity": {\n "webPropertyRef": {\n "accountId": "",\n "href": "",\n "id": "",\n "internalWebPropertyId": "",\n "kind": "",\n "name": ""\n }\n },\n "id": "",\n "kind": "",\n "name": "",\n "profileIds": [],\n "selfLink": ""\n}' \
--output-document \
- {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"adWordsAccounts": [
[
"autoTaggingEnabled": false,
"customerId": "",
"kind": ""
]
],
"entity": ["webPropertyRef": [
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": ""
]],
"id": "",
"kind": "",
"name": "",
"profileIds": [],
"selfLink": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks")! 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
analytics.management.webPropertyAdWordsLinks.list
{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks
QUERY PARAMS
accountId
webPropertyId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks")
require "http/client"
url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks"
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}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks"
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/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks"))
.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}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks")
.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}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks';
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}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks',
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}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks');
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}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks';
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}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks"]
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}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks",
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}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks');
echo $response->getBody();
setUrl('{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks")
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/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks";
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}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks
http GET {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PATCH
analytics.management.webPropertyAdWordsLinks.patch
{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId
QUERY PARAMS
accountId
webPropertyId
webPropertyAdWordsLinkId
BODY json
{
"adWordsAccounts": [
{
"autoTaggingEnabled": false,
"customerId": "",
"kind": ""
}
],
"entity": {
"webPropertyRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": ""
}
},
"id": "",
"kind": "",
"name": "",
"profileIds": [],
"selfLink": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId");
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 \"adWordsAccounts\": [\n {\n \"autoTaggingEnabled\": false,\n \"customerId\": \"\",\n \"kind\": \"\"\n }\n ],\n \"entity\": {\n \"webPropertyRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n }\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"profileIds\": [],\n \"selfLink\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/patch "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId" {:content-type :json
:form-params {:adWordsAccounts [{:autoTaggingEnabled false
:customerId ""
:kind ""}]
:entity {:webPropertyRef {:accountId ""
:href ""
:id ""
:internalWebPropertyId ""
:kind ""
:name ""}}
:id ""
:kind ""
:name ""
:profileIds []
:selfLink ""}})
require "http/client"
url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"adWordsAccounts\": [\n {\n \"autoTaggingEnabled\": false,\n \"customerId\": \"\",\n \"kind\": \"\"\n }\n ],\n \"entity\": {\n \"webPropertyRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n }\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"profileIds\": [],\n \"selfLink\": \"\"\n}"
response = HTTP::Client.patch url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Patch,
RequestUri = new Uri("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId"),
Content = new StringContent("{\n \"adWordsAccounts\": [\n {\n \"autoTaggingEnabled\": false,\n \"customerId\": \"\",\n \"kind\": \"\"\n }\n ],\n \"entity\": {\n \"webPropertyRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n }\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"profileIds\": [],\n \"selfLink\": \"\"\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}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId");
var request = new RestRequest("", Method.Patch);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"adWordsAccounts\": [\n {\n \"autoTaggingEnabled\": false,\n \"customerId\": \"\",\n \"kind\": \"\"\n }\n ],\n \"entity\": {\n \"webPropertyRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n }\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"profileIds\": [],\n \"selfLink\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId"
payload := strings.NewReader("{\n \"adWordsAccounts\": [\n {\n \"autoTaggingEnabled\": false,\n \"customerId\": \"\",\n \"kind\": \"\"\n }\n ],\n \"entity\": {\n \"webPropertyRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n }\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"profileIds\": [],\n \"selfLink\": \"\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
PATCH /baseUrl/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 372
{
"adWordsAccounts": [
{
"autoTaggingEnabled": false,
"customerId": "",
"kind": ""
}
],
"entity": {
"webPropertyRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": ""
}
},
"id": "",
"kind": "",
"name": "",
"profileIds": [],
"selfLink": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId")
.setHeader("content-type", "application/json")
.setBody("{\n \"adWordsAccounts\": [\n {\n \"autoTaggingEnabled\": false,\n \"customerId\": \"\",\n \"kind\": \"\"\n }\n ],\n \"entity\": {\n \"webPropertyRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n }\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"profileIds\": [],\n \"selfLink\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId"))
.header("content-type", "application/json")
.method("PATCH", HttpRequest.BodyPublishers.ofString("{\n \"adWordsAccounts\": [\n {\n \"autoTaggingEnabled\": false,\n \"customerId\": \"\",\n \"kind\": \"\"\n }\n ],\n \"entity\": {\n \"webPropertyRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n }\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"profileIds\": [],\n \"selfLink\": \"\"\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 \"adWordsAccounts\": [\n {\n \"autoTaggingEnabled\": false,\n \"customerId\": \"\",\n \"kind\": \"\"\n }\n ],\n \"entity\": {\n \"webPropertyRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n }\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"profileIds\": [],\n \"selfLink\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId")
.patch(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId")
.header("content-type", "application/json")
.body("{\n \"adWordsAccounts\": [\n {\n \"autoTaggingEnabled\": false,\n \"customerId\": \"\",\n \"kind\": \"\"\n }\n ],\n \"entity\": {\n \"webPropertyRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n }\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"profileIds\": [],\n \"selfLink\": \"\"\n}")
.asString();
const data = JSON.stringify({
adWordsAccounts: [
{
autoTaggingEnabled: false,
customerId: '',
kind: ''
}
],
entity: {
webPropertyRef: {
accountId: '',
href: '',
id: '',
internalWebPropertyId: '',
kind: '',
name: ''
}
},
id: '',
kind: '',
name: '',
profileIds: [],
selfLink: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PATCH', '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PATCH',
url: '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId',
headers: {'content-type': 'application/json'},
data: {
adWordsAccounts: [{autoTaggingEnabled: false, customerId: '', kind: ''}],
entity: {
webPropertyRef: {accountId: '', href: '', id: '', internalWebPropertyId: '', kind: '', name: ''}
},
id: '',
kind: '',
name: '',
profileIds: [],
selfLink: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"adWordsAccounts":[{"autoTaggingEnabled":false,"customerId":"","kind":""}],"entity":{"webPropertyRef":{"accountId":"","href":"","id":"","internalWebPropertyId":"","kind":"","name":""}},"id":"","kind":"","name":"","profileIds":[],"selfLink":""}'
};
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}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId',
method: 'PATCH',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "adWordsAccounts": [\n {\n "autoTaggingEnabled": false,\n "customerId": "",\n "kind": ""\n }\n ],\n "entity": {\n "webPropertyRef": {\n "accountId": "",\n "href": "",\n "id": "",\n "internalWebPropertyId": "",\n "kind": "",\n "name": ""\n }\n },\n "id": "",\n "kind": "",\n "name": "",\n "profileIds": [],\n "selfLink": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"adWordsAccounts\": [\n {\n \"autoTaggingEnabled\": false,\n \"customerId\": \"\",\n \"kind\": \"\"\n }\n ],\n \"entity\": {\n \"webPropertyRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n }\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"profileIds\": [],\n \"selfLink\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId")
.patch(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PATCH',
hostname: 'example.com',
port: null,
path: '/baseUrl/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId',
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({
adWordsAccounts: [{autoTaggingEnabled: false, customerId: '', kind: ''}],
entity: {
webPropertyRef: {accountId: '', href: '', id: '', internalWebPropertyId: '', kind: '', name: ''}
},
id: '',
kind: '',
name: '',
profileIds: [],
selfLink: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PATCH',
url: '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId',
headers: {'content-type': 'application/json'},
body: {
adWordsAccounts: [{autoTaggingEnabled: false, customerId: '', kind: ''}],
entity: {
webPropertyRef: {accountId: '', href: '', id: '', internalWebPropertyId: '', kind: '', name: ''}
},
id: '',
kind: '',
name: '',
profileIds: [],
selfLink: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PATCH', '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
adWordsAccounts: [
{
autoTaggingEnabled: false,
customerId: '',
kind: ''
}
],
entity: {
webPropertyRef: {
accountId: '',
href: '',
id: '',
internalWebPropertyId: '',
kind: '',
name: ''
}
},
id: '',
kind: '',
name: '',
profileIds: [],
selfLink: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PATCH',
url: '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId',
headers: {'content-type': 'application/json'},
data: {
adWordsAccounts: [{autoTaggingEnabled: false, customerId: '', kind: ''}],
entity: {
webPropertyRef: {accountId: '', href: '', id: '', internalWebPropertyId: '', kind: '', name: ''}
},
id: '',
kind: '',
name: '',
profileIds: [],
selfLink: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"adWordsAccounts":[{"autoTaggingEnabled":false,"customerId":"","kind":""}],"entity":{"webPropertyRef":{"accountId":"","href":"","id":"","internalWebPropertyId":"","kind":"","name":""}},"id":"","kind":"","name":"","profileIds":[],"selfLink":""}'
};
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 = @{ @"adWordsAccounts": @[ @{ @"autoTaggingEnabled": @NO, @"customerId": @"", @"kind": @"" } ],
@"entity": @{ @"webPropertyRef": @{ @"accountId": @"", @"href": @"", @"id": @"", @"internalWebPropertyId": @"", @"kind": @"", @"name": @"" } },
@"id": @"",
@"kind": @"",
@"name": @"",
@"profileIds": @[ ],
@"selfLink": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PATCH"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"adWordsAccounts\": [\n {\n \"autoTaggingEnabled\": false,\n \"customerId\": \"\",\n \"kind\": \"\"\n }\n ],\n \"entity\": {\n \"webPropertyRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n }\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"profileIds\": [],\n \"selfLink\": \"\"\n}" in
Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'adWordsAccounts' => [
[
'autoTaggingEnabled' => null,
'customerId' => '',
'kind' => ''
]
],
'entity' => [
'webPropertyRef' => [
'accountId' => '',
'href' => '',
'id' => '',
'internalWebPropertyId' => '',
'kind' => '',
'name' => ''
]
],
'id' => '',
'kind' => '',
'name' => '',
'profileIds' => [
],
'selfLink' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PATCH', '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId', [
'body' => '{
"adWordsAccounts": [
{
"autoTaggingEnabled": false,
"customerId": "",
"kind": ""
}
],
"entity": {
"webPropertyRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": ""
}
},
"id": "",
"kind": "",
"name": "",
"profileIds": [],
"selfLink": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'adWordsAccounts' => [
[
'autoTaggingEnabled' => null,
'customerId' => '',
'kind' => ''
]
],
'entity' => [
'webPropertyRef' => [
'accountId' => '',
'href' => '',
'id' => '',
'internalWebPropertyId' => '',
'kind' => '',
'name' => ''
]
],
'id' => '',
'kind' => '',
'name' => '',
'profileIds' => [
],
'selfLink' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'adWordsAccounts' => [
[
'autoTaggingEnabled' => null,
'customerId' => '',
'kind' => ''
]
],
'entity' => [
'webPropertyRef' => [
'accountId' => '',
'href' => '',
'id' => '',
'internalWebPropertyId' => '',
'kind' => '',
'name' => ''
]
],
'id' => '',
'kind' => '',
'name' => '',
'profileIds' => [
],
'selfLink' => ''
]));
$request->setRequestUrl('{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId');
$request->setRequestMethod('PATCH');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"adWordsAccounts": [
{
"autoTaggingEnabled": false,
"customerId": "",
"kind": ""
}
],
"entity": {
"webPropertyRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": ""
}
},
"id": "",
"kind": "",
"name": "",
"profileIds": [],
"selfLink": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"adWordsAccounts": [
{
"autoTaggingEnabled": false,
"customerId": "",
"kind": ""
}
],
"entity": {
"webPropertyRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": ""
}
},
"id": "",
"kind": "",
"name": "",
"profileIds": [],
"selfLink": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"adWordsAccounts\": [\n {\n \"autoTaggingEnabled\": false,\n \"customerId\": \"\",\n \"kind\": \"\"\n }\n ],\n \"entity\": {\n \"webPropertyRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n }\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"profileIds\": [],\n \"selfLink\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("PATCH", "/baseUrl/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId"
payload = {
"adWordsAccounts": [
{
"autoTaggingEnabled": False,
"customerId": "",
"kind": ""
}
],
"entity": { "webPropertyRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": ""
} },
"id": "",
"kind": "",
"name": "",
"profileIds": [],
"selfLink": ""
}
headers = {"content-type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId"
payload <- "{\n \"adWordsAccounts\": [\n {\n \"autoTaggingEnabled\": false,\n \"customerId\": \"\",\n \"kind\": \"\"\n }\n ],\n \"entity\": {\n \"webPropertyRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n }\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"profileIds\": [],\n \"selfLink\": \"\"\n}"
encode <- "json"
response <- VERB("PATCH", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"adWordsAccounts\": [\n {\n \"autoTaggingEnabled\": false,\n \"customerId\": \"\",\n \"kind\": \"\"\n }\n ],\n \"entity\": {\n \"webPropertyRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n }\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"profileIds\": [],\n \"selfLink\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.patch('/baseUrl/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId') do |req|
req.body = "{\n \"adWordsAccounts\": [\n {\n \"autoTaggingEnabled\": false,\n \"customerId\": \"\",\n \"kind\": \"\"\n }\n ],\n \"entity\": {\n \"webPropertyRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n }\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"profileIds\": [],\n \"selfLink\": \"\"\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}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId";
let payload = json!({
"adWordsAccounts": (
json!({
"autoTaggingEnabled": false,
"customerId": "",
"kind": ""
})
),
"entity": json!({"webPropertyRef": json!({
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": ""
})}),
"id": "",
"kind": "",
"name": "",
"profileIds": (),
"selfLink": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PATCH").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PATCH \
--url {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId \
--header 'content-type: application/json' \
--data '{
"adWordsAccounts": [
{
"autoTaggingEnabled": false,
"customerId": "",
"kind": ""
}
],
"entity": {
"webPropertyRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": ""
}
},
"id": "",
"kind": "",
"name": "",
"profileIds": [],
"selfLink": ""
}'
echo '{
"adWordsAccounts": [
{
"autoTaggingEnabled": false,
"customerId": "",
"kind": ""
}
],
"entity": {
"webPropertyRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": ""
}
},
"id": "",
"kind": "",
"name": "",
"profileIds": [],
"selfLink": ""
}' | \
http PATCH {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId \
content-type:application/json
wget --quiet \
--method PATCH \
--header 'content-type: application/json' \
--body-data '{\n "adWordsAccounts": [\n {\n "autoTaggingEnabled": false,\n "customerId": "",\n "kind": ""\n }\n ],\n "entity": {\n "webPropertyRef": {\n "accountId": "",\n "href": "",\n "id": "",\n "internalWebPropertyId": "",\n "kind": "",\n "name": ""\n }\n },\n "id": "",\n "kind": "",\n "name": "",\n "profileIds": [],\n "selfLink": ""\n}' \
--output-document \
- {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"adWordsAccounts": [
[
"autoTaggingEnabled": false,
"customerId": "",
"kind": ""
]
],
"entity": ["webPropertyRef": [
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": ""
]],
"id": "",
"kind": "",
"name": "",
"profileIds": [],
"selfLink": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PUT
analytics.management.webPropertyAdWordsLinks.update
{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId
QUERY PARAMS
accountId
webPropertyId
webPropertyAdWordsLinkId
BODY json
{
"adWordsAccounts": [
{
"autoTaggingEnabled": false,
"customerId": "",
"kind": ""
}
],
"entity": {
"webPropertyRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": ""
}
},
"id": "",
"kind": "",
"name": "",
"profileIds": [],
"selfLink": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId");
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 \"adWordsAccounts\": [\n {\n \"autoTaggingEnabled\": false,\n \"customerId\": \"\",\n \"kind\": \"\"\n }\n ],\n \"entity\": {\n \"webPropertyRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n }\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"profileIds\": [],\n \"selfLink\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId" {:content-type :json
:form-params {:adWordsAccounts [{:autoTaggingEnabled false
:customerId ""
:kind ""}]
:entity {:webPropertyRef {:accountId ""
:href ""
:id ""
:internalWebPropertyId ""
:kind ""
:name ""}}
:id ""
:kind ""
:name ""
:profileIds []
:selfLink ""}})
require "http/client"
url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"adWordsAccounts\": [\n {\n \"autoTaggingEnabled\": false,\n \"customerId\": \"\",\n \"kind\": \"\"\n }\n ],\n \"entity\": {\n \"webPropertyRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n }\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"profileIds\": [],\n \"selfLink\": \"\"\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}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId"),
Content = new StringContent("{\n \"adWordsAccounts\": [\n {\n \"autoTaggingEnabled\": false,\n \"customerId\": \"\",\n \"kind\": \"\"\n }\n ],\n \"entity\": {\n \"webPropertyRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n }\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"profileIds\": [],\n \"selfLink\": \"\"\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}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"adWordsAccounts\": [\n {\n \"autoTaggingEnabled\": false,\n \"customerId\": \"\",\n \"kind\": \"\"\n }\n ],\n \"entity\": {\n \"webPropertyRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n }\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"profileIds\": [],\n \"selfLink\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId"
payload := strings.NewReader("{\n \"adWordsAccounts\": [\n {\n \"autoTaggingEnabled\": false,\n \"customerId\": \"\",\n \"kind\": \"\"\n }\n ],\n \"entity\": {\n \"webPropertyRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n }\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"profileIds\": [],\n \"selfLink\": \"\"\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/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 372
{
"adWordsAccounts": [
{
"autoTaggingEnabled": false,
"customerId": "",
"kind": ""
}
],
"entity": {
"webPropertyRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": ""
}
},
"id": "",
"kind": "",
"name": "",
"profileIds": [],
"selfLink": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId")
.setHeader("content-type", "application/json")
.setBody("{\n \"adWordsAccounts\": [\n {\n \"autoTaggingEnabled\": false,\n \"customerId\": \"\",\n \"kind\": \"\"\n }\n ],\n \"entity\": {\n \"webPropertyRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n }\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"profileIds\": [],\n \"selfLink\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"adWordsAccounts\": [\n {\n \"autoTaggingEnabled\": false,\n \"customerId\": \"\",\n \"kind\": \"\"\n }\n ],\n \"entity\": {\n \"webPropertyRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n }\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"profileIds\": [],\n \"selfLink\": \"\"\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 \"adWordsAccounts\": [\n {\n \"autoTaggingEnabled\": false,\n \"customerId\": \"\",\n \"kind\": \"\"\n }\n ],\n \"entity\": {\n \"webPropertyRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n }\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"profileIds\": [],\n \"selfLink\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId")
.header("content-type", "application/json")
.body("{\n \"adWordsAccounts\": [\n {\n \"autoTaggingEnabled\": false,\n \"customerId\": \"\",\n \"kind\": \"\"\n }\n ],\n \"entity\": {\n \"webPropertyRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n }\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"profileIds\": [],\n \"selfLink\": \"\"\n}")
.asString();
const data = JSON.stringify({
adWordsAccounts: [
{
autoTaggingEnabled: false,
customerId: '',
kind: ''
}
],
entity: {
webPropertyRef: {
accountId: '',
href: '',
id: '',
internalWebPropertyId: '',
kind: '',
name: ''
}
},
id: '',
kind: '',
name: '',
profileIds: [],
selfLink: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId',
headers: {'content-type': 'application/json'},
data: {
adWordsAccounts: [{autoTaggingEnabled: false, customerId: '', kind: ''}],
entity: {
webPropertyRef: {accountId: '', href: '', id: '', internalWebPropertyId: '', kind: '', name: ''}
},
id: '',
kind: '',
name: '',
profileIds: [],
selfLink: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"adWordsAccounts":[{"autoTaggingEnabled":false,"customerId":"","kind":""}],"entity":{"webPropertyRef":{"accountId":"","href":"","id":"","internalWebPropertyId":"","kind":"","name":""}},"id":"","kind":"","name":"","profileIds":[],"selfLink":""}'
};
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}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "adWordsAccounts": [\n {\n "autoTaggingEnabled": false,\n "customerId": "",\n "kind": ""\n }\n ],\n "entity": {\n "webPropertyRef": {\n "accountId": "",\n "href": "",\n "id": "",\n "internalWebPropertyId": "",\n "kind": "",\n "name": ""\n }\n },\n "id": "",\n "kind": "",\n "name": "",\n "profileIds": [],\n "selfLink": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"adWordsAccounts\": [\n {\n \"autoTaggingEnabled\": false,\n \"customerId\": \"\",\n \"kind\": \"\"\n }\n ],\n \"entity\": {\n \"webPropertyRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n }\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"profileIds\": [],\n \"selfLink\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId")
.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/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId',
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({
adWordsAccounts: [{autoTaggingEnabled: false, customerId: '', kind: ''}],
entity: {
webPropertyRef: {accountId: '', href: '', id: '', internalWebPropertyId: '', kind: '', name: ''}
},
id: '',
kind: '',
name: '',
profileIds: [],
selfLink: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId',
headers: {'content-type': 'application/json'},
body: {
adWordsAccounts: [{autoTaggingEnabled: false, customerId: '', kind: ''}],
entity: {
webPropertyRef: {accountId: '', href: '', id: '', internalWebPropertyId: '', kind: '', name: ''}
},
id: '',
kind: '',
name: '',
profileIds: [],
selfLink: ''
},
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}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
adWordsAccounts: [
{
autoTaggingEnabled: false,
customerId: '',
kind: ''
}
],
entity: {
webPropertyRef: {
accountId: '',
href: '',
id: '',
internalWebPropertyId: '',
kind: '',
name: ''
}
},
id: '',
kind: '',
name: '',
profileIds: [],
selfLink: ''
});
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}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId',
headers: {'content-type': 'application/json'},
data: {
adWordsAccounts: [{autoTaggingEnabled: false, customerId: '', kind: ''}],
entity: {
webPropertyRef: {accountId: '', href: '', id: '', internalWebPropertyId: '', kind: '', name: ''}
},
id: '',
kind: '',
name: '',
profileIds: [],
selfLink: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"adWordsAccounts":[{"autoTaggingEnabled":false,"customerId":"","kind":""}],"entity":{"webPropertyRef":{"accountId":"","href":"","id":"","internalWebPropertyId":"","kind":"","name":""}},"id":"","kind":"","name":"","profileIds":[],"selfLink":""}'
};
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 = @{ @"adWordsAccounts": @[ @{ @"autoTaggingEnabled": @NO, @"customerId": @"", @"kind": @"" } ],
@"entity": @{ @"webPropertyRef": @{ @"accountId": @"", @"href": @"", @"id": @"", @"internalWebPropertyId": @"", @"kind": @"", @"name": @"" } },
@"id": @"",
@"kind": @"",
@"name": @"",
@"profileIds": @[ ],
@"selfLink": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId"]
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}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"adWordsAccounts\": [\n {\n \"autoTaggingEnabled\": false,\n \"customerId\": \"\",\n \"kind\": \"\"\n }\n ],\n \"entity\": {\n \"webPropertyRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n }\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"profileIds\": [],\n \"selfLink\": \"\"\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId",
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([
'adWordsAccounts' => [
[
'autoTaggingEnabled' => null,
'customerId' => '',
'kind' => ''
]
],
'entity' => [
'webPropertyRef' => [
'accountId' => '',
'href' => '',
'id' => '',
'internalWebPropertyId' => '',
'kind' => '',
'name' => ''
]
],
'id' => '',
'kind' => '',
'name' => '',
'profileIds' => [
],
'selfLink' => ''
]),
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}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId', [
'body' => '{
"adWordsAccounts": [
{
"autoTaggingEnabled": false,
"customerId": "",
"kind": ""
}
],
"entity": {
"webPropertyRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": ""
}
},
"id": "",
"kind": "",
"name": "",
"profileIds": [],
"selfLink": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'adWordsAccounts' => [
[
'autoTaggingEnabled' => null,
'customerId' => '',
'kind' => ''
]
],
'entity' => [
'webPropertyRef' => [
'accountId' => '',
'href' => '',
'id' => '',
'internalWebPropertyId' => '',
'kind' => '',
'name' => ''
]
],
'id' => '',
'kind' => '',
'name' => '',
'profileIds' => [
],
'selfLink' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'adWordsAccounts' => [
[
'autoTaggingEnabled' => null,
'customerId' => '',
'kind' => ''
]
],
'entity' => [
'webPropertyRef' => [
'accountId' => '',
'href' => '',
'id' => '',
'internalWebPropertyId' => '',
'kind' => '',
'name' => ''
]
],
'id' => '',
'kind' => '',
'name' => '',
'profileIds' => [
],
'selfLink' => ''
]));
$request->setRequestUrl('{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId');
$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}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"adWordsAccounts": [
{
"autoTaggingEnabled": false,
"customerId": "",
"kind": ""
}
],
"entity": {
"webPropertyRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": ""
}
},
"id": "",
"kind": "",
"name": "",
"profileIds": [],
"selfLink": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"adWordsAccounts": [
{
"autoTaggingEnabled": false,
"customerId": "",
"kind": ""
}
],
"entity": {
"webPropertyRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": ""
}
},
"id": "",
"kind": "",
"name": "",
"profileIds": [],
"selfLink": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"adWordsAccounts\": [\n {\n \"autoTaggingEnabled\": false,\n \"customerId\": \"\",\n \"kind\": \"\"\n }\n ],\n \"entity\": {\n \"webPropertyRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n }\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"profileIds\": [],\n \"selfLink\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId"
payload = {
"adWordsAccounts": [
{
"autoTaggingEnabled": False,
"customerId": "",
"kind": ""
}
],
"entity": { "webPropertyRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": ""
} },
"id": "",
"kind": "",
"name": "",
"profileIds": [],
"selfLink": ""
}
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId"
payload <- "{\n \"adWordsAccounts\": [\n {\n \"autoTaggingEnabled\": false,\n \"customerId\": \"\",\n \"kind\": \"\"\n }\n ],\n \"entity\": {\n \"webPropertyRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n }\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"profileIds\": [],\n \"selfLink\": \"\"\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}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId")
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 \"adWordsAccounts\": [\n {\n \"autoTaggingEnabled\": false,\n \"customerId\": \"\",\n \"kind\": \"\"\n }\n ],\n \"entity\": {\n \"webPropertyRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n }\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"profileIds\": [],\n \"selfLink\": \"\"\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/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId') do |req|
req.body = "{\n \"adWordsAccounts\": [\n {\n \"autoTaggingEnabled\": false,\n \"customerId\": \"\",\n \"kind\": \"\"\n }\n ],\n \"entity\": {\n \"webPropertyRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n }\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"profileIds\": [],\n \"selfLink\": \"\"\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}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId";
let payload = json!({
"adWordsAccounts": (
json!({
"autoTaggingEnabled": false,
"customerId": "",
"kind": ""
})
),
"entity": json!({"webPropertyRef": json!({
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": ""
})}),
"id": "",
"kind": "",
"name": "",
"profileIds": (),
"selfLink": ""
});
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}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId \
--header 'content-type: application/json' \
--data '{
"adWordsAccounts": [
{
"autoTaggingEnabled": false,
"customerId": "",
"kind": ""
}
],
"entity": {
"webPropertyRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": ""
}
},
"id": "",
"kind": "",
"name": "",
"profileIds": [],
"selfLink": ""
}'
echo '{
"adWordsAccounts": [
{
"autoTaggingEnabled": false,
"customerId": "",
"kind": ""
}
],
"entity": {
"webPropertyRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": ""
}
},
"id": "",
"kind": "",
"name": "",
"profileIds": [],
"selfLink": ""
}' | \
http PUT {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '{\n "adWordsAccounts": [\n {\n "autoTaggingEnabled": false,\n "customerId": "",\n "kind": ""\n }\n ],\n "entity": {\n "webPropertyRef": {\n "accountId": "",\n "href": "",\n "id": "",\n "internalWebPropertyId": "",\n "kind": "",\n "name": ""\n }\n },\n "id": "",\n "kind": "",\n "name": "",\n "profileIds": [],\n "selfLink": ""\n}' \
--output-document \
- {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"adWordsAccounts": [
[
"autoTaggingEnabled": false,
"customerId": "",
"kind": ""
]
],
"entity": ["webPropertyRef": [
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": ""
]],
"id": "",
"kind": "",
"name": "",
"profileIds": [],
"selfLink": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityAdWordsLinks/:webPropertyAdWordsLinkId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
analytics.management.webproperties.get
{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId
QUERY PARAMS
accountId
webPropertyId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId")
require "http/client"
url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId"
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}}/management/accounts/:accountId/webproperties/:webPropertyId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId"
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/management/accounts/:accountId/webproperties/:webPropertyId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId"))
.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}}/management/accounts/:accountId/webproperties/:webPropertyId")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId")
.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}}/management/accounts/:accountId/webproperties/:webPropertyId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId';
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}}/management/accounts/:accountId/webproperties/:webPropertyId',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/management/accounts/:accountId/webproperties/:webPropertyId',
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}}/management/accounts/:accountId/webproperties/:webPropertyId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId');
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}}/management/accounts/:accountId/webproperties/:webPropertyId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId';
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}}/management/accounts/:accountId/webproperties/:webPropertyId"]
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}}/management/accounts/:accountId/webproperties/:webPropertyId" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId",
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}}/management/accounts/:accountId/webproperties/:webPropertyId');
echo $response->getBody();
setUrl('{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/management/accounts/:accountId/webproperties/:webPropertyId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId")
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/management/accounts/:accountId/webproperties/:webPropertyId') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId";
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}}/management/accounts/:accountId/webproperties/:webPropertyId
http GET {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId")! 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
analytics.management.webproperties.insert
{{baseUrl}}/management/accounts/:accountId/webproperties
QUERY PARAMS
accountId
BODY json
{
"accountId": "",
"childLink": {
"href": "",
"type": ""
},
"created": "",
"dataRetentionResetOnNewActivity": false,
"dataRetentionTtl": "",
"defaultProfileId": "",
"id": "",
"industryVertical": "",
"internalWebPropertyId": "",
"kind": "",
"level": "",
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"permissions": {
"effective": []
},
"profileCount": 0,
"selfLink": "",
"starred": false,
"updated": "",
"websiteUrl": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/management/accounts/:accountId/webproperties");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"accountId\": \"\",\n \"childLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"created\": \"\",\n \"dataRetentionResetOnNewActivity\": false,\n \"dataRetentionTtl\": \"\",\n \"defaultProfileId\": \"\",\n \"id\": \"\",\n \"industryVertical\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"level\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"permissions\": {\n \"effective\": []\n },\n \"profileCount\": 0,\n \"selfLink\": \"\",\n \"starred\": false,\n \"updated\": \"\",\n \"websiteUrl\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/management/accounts/:accountId/webproperties" {:content-type :json
:form-params {:accountId ""
:childLink {:href ""
:type ""}
:created ""
:dataRetentionResetOnNewActivity false
:dataRetentionTtl ""
:defaultProfileId ""
:id ""
:industryVertical ""
:internalWebPropertyId ""
:kind ""
:level ""
:name ""
:parentLink {:href ""
:type ""}
:permissions {:effective []}
:profileCount 0
:selfLink ""
:starred false
:updated ""
:websiteUrl ""}})
require "http/client"
url = "{{baseUrl}}/management/accounts/:accountId/webproperties"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"accountId\": \"\",\n \"childLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"created\": \"\",\n \"dataRetentionResetOnNewActivity\": false,\n \"dataRetentionTtl\": \"\",\n \"defaultProfileId\": \"\",\n \"id\": \"\",\n \"industryVertical\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"level\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"permissions\": {\n \"effective\": []\n },\n \"profileCount\": 0,\n \"selfLink\": \"\",\n \"starred\": false,\n \"updated\": \"\",\n \"websiteUrl\": \"\"\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}}/management/accounts/:accountId/webproperties"),
Content = new StringContent("{\n \"accountId\": \"\",\n \"childLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"created\": \"\",\n \"dataRetentionResetOnNewActivity\": false,\n \"dataRetentionTtl\": \"\",\n \"defaultProfileId\": \"\",\n \"id\": \"\",\n \"industryVertical\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"level\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"permissions\": {\n \"effective\": []\n },\n \"profileCount\": 0,\n \"selfLink\": \"\",\n \"starred\": false,\n \"updated\": \"\",\n \"websiteUrl\": \"\"\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}}/management/accounts/:accountId/webproperties");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"accountId\": \"\",\n \"childLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"created\": \"\",\n \"dataRetentionResetOnNewActivity\": false,\n \"dataRetentionTtl\": \"\",\n \"defaultProfileId\": \"\",\n \"id\": \"\",\n \"industryVertical\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"level\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"permissions\": {\n \"effective\": []\n },\n \"profileCount\": 0,\n \"selfLink\": \"\",\n \"starred\": false,\n \"updated\": \"\",\n \"websiteUrl\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/management/accounts/:accountId/webproperties"
payload := strings.NewReader("{\n \"accountId\": \"\",\n \"childLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"created\": \"\",\n \"dataRetentionResetOnNewActivity\": false,\n \"dataRetentionTtl\": \"\",\n \"defaultProfileId\": \"\",\n \"id\": \"\",\n \"industryVertical\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"level\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"permissions\": {\n \"effective\": []\n },\n \"profileCount\": 0,\n \"selfLink\": \"\",\n \"starred\": false,\n \"updated\": \"\",\n \"websiteUrl\": \"\"\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/management/accounts/:accountId/webproperties HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 493
{
"accountId": "",
"childLink": {
"href": "",
"type": ""
},
"created": "",
"dataRetentionResetOnNewActivity": false,
"dataRetentionTtl": "",
"defaultProfileId": "",
"id": "",
"industryVertical": "",
"internalWebPropertyId": "",
"kind": "",
"level": "",
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"permissions": {
"effective": []
},
"profileCount": 0,
"selfLink": "",
"starred": false,
"updated": "",
"websiteUrl": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/management/accounts/:accountId/webproperties")
.setHeader("content-type", "application/json")
.setBody("{\n \"accountId\": \"\",\n \"childLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"created\": \"\",\n \"dataRetentionResetOnNewActivity\": false,\n \"dataRetentionTtl\": \"\",\n \"defaultProfileId\": \"\",\n \"id\": \"\",\n \"industryVertical\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"level\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"permissions\": {\n \"effective\": []\n },\n \"profileCount\": 0,\n \"selfLink\": \"\",\n \"starred\": false,\n \"updated\": \"\",\n \"websiteUrl\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/management/accounts/:accountId/webproperties"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"accountId\": \"\",\n \"childLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"created\": \"\",\n \"dataRetentionResetOnNewActivity\": false,\n \"dataRetentionTtl\": \"\",\n \"defaultProfileId\": \"\",\n \"id\": \"\",\n \"industryVertical\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"level\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"permissions\": {\n \"effective\": []\n },\n \"profileCount\": 0,\n \"selfLink\": \"\",\n \"starred\": false,\n \"updated\": \"\",\n \"websiteUrl\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"accountId\": \"\",\n \"childLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"created\": \"\",\n \"dataRetentionResetOnNewActivity\": false,\n \"dataRetentionTtl\": \"\",\n \"defaultProfileId\": \"\",\n \"id\": \"\",\n \"industryVertical\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"level\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"permissions\": {\n \"effective\": []\n },\n \"profileCount\": 0,\n \"selfLink\": \"\",\n \"starred\": false,\n \"updated\": \"\",\n \"websiteUrl\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/management/accounts/:accountId/webproperties")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/management/accounts/:accountId/webproperties")
.header("content-type", "application/json")
.body("{\n \"accountId\": \"\",\n \"childLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"created\": \"\",\n \"dataRetentionResetOnNewActivity\": false,\n \"dataRetentionTtl\": \"\",\n \"defaultProfileId\": \"\",\n \"id\": \"\",\n \"industryVertical\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"level\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"permissions\": {\n \"effective\": []\n },\n \"profileCount\": 0,\n \"selfLink\": \"\",\n \"starred\": false,\n \"updated\": \"\",\n \"websiteUrl\": \"\"\n}")
.asString();
const data = JSON.stringify({
accountId: '',
childLink: {
href: '',
type: ''
},
created: '',
dataRetentionResetOnNewActivity: false,
dataRetentionTtl: '',
defaultProfileId: '',
id: '',
industryVertical: '',
internalWebPropertyId: '',
kind: '',
level: '',
name: '',
parentLink: {
href: '',
type: ''
},
permissions: {
effective: []
},
profileCount: 0,
selfLink: '',
starred: false,
updated: '',
websiteUrl: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/management/accounts/:accountId/webproperties');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/management/accounts/:accountId/webproperties',
headers: {'content-type': 'application/json'},
data: {
accountId: '',
childLink: {href: '', type: ''},
created: '',
dataRetentionResetOnNewActivity: false,
dataRetentionTtl: '',
defaultProfileId: '',
id: '',
industryVertical: '',
internalWebPropertyId: '',
kind: '',
level: '',
name: '',
parentLink: {href: '', type: ''},
permissions: {effective: []},
profileCount: 0,
selfLink: '',
starred: false,
updated: '',
websiteUrl: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/management/accounts/:accountId/webproperties';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"accountId":"","childLink":{"href":"","type":""},"created":"","dataRetentionResetOnNewActivity":false,"dataRetentionTtl":"","defaultProfileId":"","id":"","industryVertical":"","internalWebPropertyId":"","kind":"","level":"","name":"","parentLink":{"href":"","type":""},"permissions":{"effective":[]},"profileCount":0,"selfLink":"","starred":false,"updated":"","websiteUrl":""}'
};
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}}/management/accounts/:accountId/webproperties',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "accountId": "",\n "childLink": {\n "href": "",\n "type": ""\n },\n "created": "",\n "dataRetentionResetOnNewActivity": false,\n "dataRetentionTtl": "",\n "defaultProfileId": "",\n "id": "",\n "industryVertical": "",\n "internalWebPropertyId": "",\n "kind": "",\n "level": "",\n "name": "",\n "parentLink": {\n "href": "",\n "type": ""\n },\n "permissions": {\n "effective": []\n },\n "profileCount": 0,\n "selfLink": "",\n "starred": false,\n "updated": "",\n "websiteUrl": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"accountId\": \"\",\n \"childLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"created\": \"\",\n \"dataRetentionResetOnNewActivity\": false,\n \"dataRetentionTtl\": \"\",\n \"defaultProfileId\": \"\",\n \"id\": \"\",\n \"industryVertical\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"level\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"permissions\": {\n \"effective\": []\n },\n \"profileCount\": 0,\n \"selfLink\": \"\",\n \"starred\": false,\n \"updated\": \"\",\n \"websiteUrl\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/management/accounts/:accountId/webproperties")
.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/management/accounts/:accountId/webproperties',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
accountId: '',
childLink: {href: '', type: ''},
created: '',
dataRetentionResetOnNewActivity: false,
dataRetentionTtl: '',
defaultProfileId: '',
id: '',
industryVertical: '',
internalWebPropertyId: '',
kind: '',
level: '',
name: '',
parentLink: {href: '', type: ''},
permissions: {effective: []},
profileCount: 0,
selfLink: '',
starred: false,
updated: '',
websiteUrl: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/management/accounts/:accountId/webproperties',
headers: {'content-type': 'application/json'},
body: {
accountId: '',
childLink: {href: '', type: ''},
created: '',
dataRetentionResetOnNewActivity: false,
dataRetentionTtl: '',
defaultProfileId: '',
id: '',
industryVertical: '',
internalWebPropertyId: '',
kind: '',
level: '',
name: '',
parentLink: {href: '', type: ''},
permissions: {effective: []},
profileCount: 0,
selfLink: '',
starred: false,
updated: '',
websiteUrl: ''
},
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}}/management/accounts/:accountId/webproperties');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
accountId: '',
childLink: {
href: '',
type: ''
},
created: '',
dataRetentionResetOnNewActivity: false,
dataRetentionTtl: '',
defaultProfileId: '',
id: '',
industryVertical: '',
internalWebPropertyId: '',
kind: '',
level: '',
name: '',
parentLink: {
href: '',
type: ''
},
permissions: {
effective: []
},
profileCount: 0,
selfLink: '',
starred: false,
updated: '',
websiteUrl: ''
});
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}}/management/accounts/:accountId/webproperties',
headers: {'content-type': 'application/json'},
data: {
accountId: '',
childLink: {href: '', type: ''},
created: '',
dataRetentionResetOnNewActivity: false,
dataRetentionTtl: '',
defaultProfileId: '',
id: '',
industryVertical: '',
internalWebPropertyId: '',
kind: '',
level: '',
name: '',
parentLink: {href: '', type: ''},
permissions: {effective: []},
profileCount: 0,
selfLink: '',
starred: false,
updated: '',
websiteUrl: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/management/accounts/:accountId/webproperties';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"accountId":"","childLink":{"href":"","type":""},"created":"","dataRetentionResetOnNewActivity":false,"dataRetentionTtl":"","defaultProfileId":"","id":"","industryVertical":"","internalWebPropertyId":"","kind":"","level":"","name":"","parentLink":{"href":"","type":""},"permissions":{"effective":[]},"profileCount":0,"selfLink":"","starred":false,"updated":"","websiteUrl":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"accountId": @"",
@"childLink": @{ @"href": @"", @"type": @"" },
@"created": @"",
@"dataRetentionResetOnNewActivity": @NO,
@"dataRetentionTtl": @"",
@"defaultProfileId": @"",
@"id": @"",
@"industryVertical": @"",
@"internalWebPropertyId": @"",
@"kind": @"",
@"level": @"",
@"name": @"",
@"parentLink": @{ @"href": @"", @"type": @"" },
@"permissions": @{ @"effective": @[ ] },
@"profileCount": @0,
@"selfLink": @"",
@"starred": @NO,
@"updated": @"",
@"websiteUrl": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/management/accounts/:accountId/webproperties"]
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}}/management/accounts/:accountId/webproperties" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"accountId\": \"\",\n \"childLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"created\": \"\",\n \"dataRetentionResetOnNewActivity\": false,\n \"dataRetentionTtl\": \"\",\n \"defaultProfileId\": \"\",\n \"id\": \"\",\n \"industryVertical\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"level\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"permissions\": {\n \"effective\": []\n },\n \"profileCount\": 0,\n \"selfLink\": \"\",\n \"starred\": false,\n \"updated\": \"\",\n \"websiteUrl\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/management/accounts/:accountId/webproperties",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'accountId' => '',
'childLink' => [
'href' => '',
'type' => ''
],
'created' => '',
'dataRetentionResetOnNewActivity' => null,
'dataRetentionTtl' => '',
'defaultProfileId' => '',
'id' => '',
'industryVertical' => '',
'internalWebPropertyId' => '',
'kind' => '',
'level' => '',
'name' => '',
'parentLink' => [
'href' => '',
'type' => ''
],
'permissions' => [
'effective' => [
]
],
'profileCount' => 0,
'selfLink' => '',
'starred' => null,
'updated' => '',
'websiteUrl' => ''
]),
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}}/management/accounts/:accountId/webproperties', [
'body' => '{
"accountId": "",
"childLink": {
"href": "",
"type": ""
},
"created": "",
"dataRetentionResetOnNewActivity": false,
"dataRetentionTtl": "",
"defaultProfileId": "",
"id": "",
"industryVertical": "",
"internalWebPropertyId": "",
"kind": "",
"level": "",
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"permissions": {
"effective": []
},
"profileCount": 0,
"selfLink": "",
"starred": false,
"updated": "",
"websiteUrl": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/management/accounts/:accountId/webproperties');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'accountId' => '',
'childLink' => [
'href' => '',
'type' => ''
],
'created' => '',
'dataRetentionResetOnNewActivity' => null,
'dataRetentionTtl' => '',
'defaultProfileId' => '',
'id' => '',
'industryVertical' => '',
'internalWebPropertyId' => '',
'kind' => '',
'level' => '',
'name' => '',
'parentLink' => [
'href' => '',
'type' => ''
],
'permissions' => [
'effective' => [
]
],
'profileCount' => 0,
'selfLink' => '',
'starred' => null,
'updated' => '',
'websiteUrl' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'accountId' => '',
'childLink' => [
'href' => '',
'type' => ''
],
'created' => '',
'dataRetentionResetOnNewActivity' => null,
'dataRetentionTtl' => '',
'defaultProfileId' => '',
'id' => '',
'industryVertical' => '',
'internalWebPropertyId' => '',
'kind' => '',
'level' => '',
'name' => '',
'parentLink' => [
'href' => '',
'type' => ''
],
'permissions' => [
'effective' => [
]
],
'profileCount' => 0,
'selfLink' => '',
'starred' => null,
'updated' => '',
'websiteUrl' => ''
]));
$request->setRequestUrl('{{baseUrl}}/management/accounts/:accountId/webproperties');
$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}}/management/accounts/:accountId/webproperties' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"accountId": "",
"childLink": {
"href": "",
"type": ""
},
"created": "",
"dataRetentionResetOnNewActivity": false,
"dataRetentionTtl": "",
"defaultProfileId": "",
"id": "",
"industryVertical": "",
"internalWebPropertyId": "",
"kind": "",
"level": "",
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"permissions": {
"effective": []
},
"profileCount": 0,
"selfLink": "",
"starred": false,
"updated": "",
"websiteUrl": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/management/accounts/:accountId/webproperties' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"accountId": "",
"childLink": {
"href": "",
"type": ""
},
"created": "",
"dataRetentionResetOnNewActivity": false,
"dataRetentionTtl": "",
"defaultProfileId": "",
"id": "",
"industryVertical": "",
"internalWebPropertyId": "",
"kind": "",
"level": "",
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"permissions": {
"effective": []
},
"profileCount": 0,
"selfLink": "",
"starred": false,
"updated": "",
"websiteUrl": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"accountId\": \"\",\n \"childLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"created\": \"\",\n \"dataRetentionResetOnNewActivity\": false,\n \"dataRetentionTtl\": \"\",\n \"defaultProfileId\": \"\",\n \"id\": \"\",\n \"industryVertical\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"level\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"permissions\": {\n \"effective\": []\n },\n \"profileCount\": 0,\n \"selfLink\": \"\",\n \"starred\": false,\n \"updated\": \"\",\n \"websiteUrl\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/management/accounts/:accountId/webproperties", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/management/accounts/:accountId/webproperties"
payload = {
"accountId": "",
"childLink": {
"href": "",
"type": ""
},
"created": "",
"dataRetentionResetOnNewActivity": False,
"dataRetentionTtl": "",
"defaultProfileId": "",
"id": "",
"industryVertical": "",
"internalWebPropertyId": "",
"kind": "",
"level": "",
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"permissions": { "effective": [] },
"profileCount": 0,
"selfLink": "",
"starred": False,
"updated": "",
"websiteUrl": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/management/accounts/:accountId/webproperties"
payload <- "{\n \"accountId\": \"\",\n \"childLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"created\": \"\",\n \"dataRetentionResetOnNewActivity\": false,\n \"dataRetentionTtl\": \"\",\n \"defaultProfileId\": \"\",\n \"id\": \"\",\n \"industryVertical\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"level\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"permissions\": {\n \"effective\": []\n },\n \"profileCount\": 0,\n \"selfLink\": \"\",\n \"starred\": false,\n \"updated\": \"\",\n \"websiteUrl\": \"\"\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}}/management/accounts/:accountId/webproperties")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"accountId\": \"\",\n \"childLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"created\": \"\",\n \"dataRetentionResetOnNewActivity\": false,\n \"dataRetentionTtl\": \"\",\n \"defaultProfileId\": \"\",\n \"id\": \"\",\n \"industryVertical\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"level\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"permissions\": {\n \"effective\": []\n },\n \"profileCount\": 0,\n \"selfLink\": \"\",\n \"starred\": false,\n \"updated\": \"\",\n \"websiteUrl\": \"\"\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/management/accounts/:accountId/webproperties') do |req|
req.body = "{\n \"accountId\": \"\",\n \"childLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"created\": \"\",\n \"dataRetentionResetOnNewActivity\": false,\n \"dataRetentionTtl\": \"\",\n \"defaultProfileId\": \"\",\n \"id\": \"\",\n \"industryVertical\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"level\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"permissions\": {\n \"effective\": []\n },\n \"profileCount\": 0,\n \"selfLink\": \"\",\n \"starred\": false,\n \"updated\": \"\",\n \"websiteUrl\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/management/accounts/:accountId/webproperties";
let payload = json!({
"accountId": "",
"childLink": json!({
"href": "",
"type": ""
}),
"created": "",
"dataRetentionResetOnNewActivity": false,
"dataRetentionTtl": "",
"defaultProfileId": "",
"id": "",
"industryVertical": "",
"internalWebPropertyId": "",
"kind": "",
"level": "",
"name": "",
"parentLink": json!({
"href": "",
"type": ""
}),
"permissions": json!({"effective": ()}),
"profileCount": 0,
"selfLink": "",
"starred": false,
"updated": "",
"websiteUrl": ""
});
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}}/management/accounts/:accountId/webproperties \
--header 'content-type: application/json' \
--data '{
"accountId": "",
"childLink": {
"href": "",
"type": ""
},
"created": "",
"dataRetentionResetOnNewActivity": false,
"dataRetentionTtl": "",
"defaultProfileId": "",
"id": "",
"industryVertical": "",
"internalWebPropertyId": "",
"kind": "",
"level": "",
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"permissions": {
"effective": []
},
"profileCount": 0,
"selfLink": "",
"starred": false,
"updated": "",
"websiteUrl": ""
}'
echo '{
"accountId": "",
"childLink": {
"href": "",
"type": ""
},
"created": "",
"dataRetentionResetOnNewActivity": false,
"dataRetentionTtl": "",
"defaultProfileId": "",
"id": "",
"industryVertical": "",
"internalWebPropertyId": "",
"kind": "",
"level": "",
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"permissions": {
"effective": []
},
"profileCount": 0,
"selfLink": "",
"starred": false,
"updated": "",
"websiteUrl": ""
}' | \
http POST {{baseUrl}}/management/accounts/:accountId/webproperties \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "accountId": "",\n "childLink": {\n "href": "",\n "type": ""\n },\n "created": "",\n "dataRetentionResetOnNewActivity": false,\n "dataRetentionTtl": "",\n "defaultProfileId": "",\n "id": "",\n "industryVertical": "",\n "internalWebPropertyId": "",\n "kind": "",\n "level": "",\n "name": "",\n "parentLink": {\n "href": "",\n "type": ""\n },\n "permissions": {\n "effective": []\n },\n "profileCount": 0,\n "selfLink": "",\n "starred": false,\n "updated": "",\n "websiteUrl": ""\n}' \
--output-document \
- {{baseUrl}}/management/accounts/:accountId/webproperties
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"accountId": "",
"childLink": [
"href": "",
"type": ""
],
"created": "",
"dataRetentionResetOnNewActivity": false,
"dataRetentionTtl": "",
"defaultProfileId": "",
"id": "",
"industryVertical": "",
"internalWebPropertyId": "",
"kind": "",
"level": "",
"name": "",
"parentLink": [
"href": "",
"type": ""
],
"permissions": ["effective": []],
"profileCount": 0,
"selfLink": "",
"starred": false,
"updated": "",
"websiteUrl": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/management/accounts/:accountId/webproperties")! 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
analytics.management.webproperties.list
{{baseUrl}}/management/accounts/:accountId/webproperties
QUERY PARAMS
accountId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/management/accounts/:accountId/webproperties");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/management/accounts/:accountId/webproperties")
require "http/client"
url = "{{baseUrl}}/management/accounts/:accountId/webproperties"
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}}/management/accounts/:accountId/webproperties"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/management/accounts/:accountId/webproperties");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/management/accounts/:accountId/webproperties"
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/management/accounts/:accountId/webproperties HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/management/accounts/:accountId/webproperties")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/management/accounts/:accountId/webproperties"))
.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}}/management/accounts/:accountId/webproperties")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/management/accounts/:accountId/webproperties")
.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}}/management/accounts/:accountId/webproperties');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/management/accounts/:accountId/webproperties'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/management/accounts/:accountId/webproperties';
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}}/management/accounts/:accountId/webproperties',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/management/accounts/:accountId/webproperties")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/management/accounts/:accountId/webproperties',
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}}/management/accounts/:accountId/webproperties'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/management/accounts/:accountId/webproperties');
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}}/management/accounts/:accountId/webproperties'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/management/accounts/:accountId/webproperties';
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}}/management/accounts/:accountId/webproperties"]
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}}/management/accounts/:accountId/webproperties" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/management/accounts/:accountId/webproperties",
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}}/management/accounts/:accountId/webproperties');
echo $response->getBody();
setUrl('{{baseUrl}}/management/accounts/:accountId/webproperties');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/management/accounts/:accountId/webproperties');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/management/accounts/:accountId/webproperties' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/management/accounts/:accountId/webproperties' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/management/accounts/:accountId/webproperties")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/management/accounts/:accountId/webproperties"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/management/accounts/:accountId/webproperties"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/management/accounts/:accountId/webproperties")
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/management/accounts/:accountId/webproperties') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/management/accounts/:accountId/webproperties";
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}}/management/accounts/:accountId/webproperties
http GET {{baseUrl}}/management/accounts/:accountId/webproperties
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/management/accounts/:accountId/webproperties
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/management/accounts/:accountId/webproperties")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PATCH
analytics.management.webproperties.patch
{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId
QUERY PARAMS
accountId
webPropertyId
BODY json
{
"accountId": "",
"childLink": {
"href": "",
"type": ""
},
"created": "",
"dataRetentionResetOnNewActivity": false,
"dataRetentionTtl": "",
"defaultProfileId": "",
"id": "",
"industryVertical": "",
"internalWebPropertyId": "",
"kind": "",
"level": "",
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"permissions": {
"effective": []
},
"profileCount": 0,
"selfLink": "",
"starred": false,
"updated": "",
"websiteUrl": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"accountId\": \"\",\n \"childLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"created\": \"\",\n \"dataRetentionResetOnNewActivity\": false,\n \"dataRetentionTtl\": \"\",\n \"defaultProfileId\": \"\",\n \"id\": \"\",\n \"industryVertical\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"level\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"permissions\": {\n \"effective\": []\n },\n \"profileCount\": 0,\n \"selfLink\": \"\",\n \"starred\": false,\n \"updated\": \"\",\n \"websiteUrl\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/patch "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId" {:content-type :json
:form-params {:accountId ""
:childLink {:href ""
:type ""}
:created ""
:dataRetentionResetOnNewActivity false
:dataRetentionTtl ""
:defaultProfileId ""
:id ""
:industryVertical ""
:internalWebPropertyId ""
:kind ""
:level ""
:name ""
:parentLink {:href ""
:type ""}
:permissions {:effective []}
:profileCount 0
:selfLink ""
:starred false
:updated ""
:websiteUrl ""}})
require "http/client"
url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"accountId\": \"\",\n \"childLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"created\": \"\",\n \"dataRetentionResetOnNewActivity\": false,\n \"dataRetentionTtl\": \"\",\n \"defaultProfileId\": \"\",\n \"id\": \"\",\n \"industryVertical\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"level\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"permissions\": {\n \"effective\": []\n },\n \"profileCount\": 0,\n \"selfLink\": \"\",\n \"starred\": false,\n \"updated\": \"\",\n \"websiteUrl\": \"\"\n}"
response = HTTP::Client.patch url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Patch,
RequestUri = new Uri("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId"),
Content = new StringContent("{\n \"accountId\": \"\",\n \"childLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"created\": \"\",\n \"dataRetentionResetOnNewActivity\": false,\n \"dataRetentionTtl\": \"\",\n \"defaultProfileId\": \"\",\n \"id\": \"\",\n \"industryVertical\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"level\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"permissions\": {\n \"effective\": []\n },\n \"profileCount\": 0,\n \"selfLink\": \"\",\n \"starred\": false,\n \"updated\": \"\",\n \"websiteUrl\": \"\"\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}}/management/accounts/:accountId/webproperties/:webPropertyId");
var request = new RestRequest("", Method.Patch);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"accountId\": \"\",\n \"childLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"created\": \"\",\n \"dataRetentionResetOnNewActivity\": false,\n \"dataRetentionTtl\": \"\",\n \"defaultProfileId\": \"\",\n \"id\": \"\",\n \"industryVertical\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"level\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"permissions\": {\n \"effective\": []\n },\n \"profileCount\": 0,\n \"selfLink\": \"\",\n \"starred\": false,\n \"updated\": \"\",\n \"websiteUrl\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId"
payload := strings.NewReader("{\n \"accountId\": \"\",\n \"childLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"created\": \"\",\n \"dataRetentionResetOnNewActivity\": false,\n \"dataRetentionTtl\": \"\",\n \"defaultProfileId\": \"\",\n \"id\": \"\",\n \"industryVertical\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"level\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"permissions\": {\n \"effective\": []\n },\n \"profileCount\": 0,\n \"selfLink\": \"\",\n \"starred\": false,\n \"updated\": \"\",\n \"websiteUrl\": \"\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
PATCH /baseUrl/management/accounts/:accountId/webproperties/:webPropertyId HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 493
{
"accountId": "",
"childLink": {
"href": "",
"type": ""
},
"created": "",
"dataRetentionResetOnNewActivity": false,
"dataRetentionTtl": "",
"defaultProfileId": "",
"id": "",
"industryVertical": "",
"internalWebPropertyId": "",
"kind": "",
"level": "",
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"permissions": {
"effective": []
},
"profileCount": 0,
"selfLink": "",
"starred": false,
"updated": "",
"websiteUrl": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId")
.setHeader("content-type", "application/json")
.setBody("{\n \"accountId\": \"\",\n \"childLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"created\": \"\",\n \"dataRetentionResetOnNewActivity\": false,\n \"dataRetentionTtl\": \"\",\n \"defaultProfileId\": \"\",\n \"id\": \"\",\n \"industryVertical\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"level\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"permissions\": {\n \"effective\": []\n },\n \"profileCount\": 0,\n \"selfLink\": \"\",\n \"starred\": false,\n \"updated\": \"\",\n \"websiteUrl\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId"))
.header("content-type", "application/json")
.method("PATCH", HttpRequest.BodyPublishers.ofString("{\n \"accountId\": \"\",\n \"childLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"created\": \"\",\n \"dataRetentionResetOnNewActivity\": false,\n \"dataRetentionTtl\": \"\",\n \"defaultProfileId\": \"\",\n \"id\": \"\",\n \"industryVertical\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"level\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"permissions\": {\n \"effective\": []\n },\n \"profileCount\": 0,\n \"selfLink\": \"\",\n \"starred\": false,\n \"updated\": \"\",\n \"websiteUrl\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"accountId\": \"\",\n \"childLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"created\": \"\",\n \"dataRetentionResetOnNewActivity\": false,\n \"dataRetentionTtl\": \"\",\n \"defaultProfileId\": \"\",\n \"id\": \"\",\n \"industryVertical\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"level\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"permissions\": {\n \"effective\": []\n },\n \"profileCount\": 0,\n \"selfLink\": \"\",\n \"starred\": false,\n \"updated\": \"\",\n \"websiteUrl\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId")
.patch(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId")
.header("content-type", "application/json")
.body("{\n \"accountId\": \"\",\n \"childLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"created\": \"\",\n \"dataRetentionResetOnNewActivity\": false,\n \"dataRetentionTtl\": \"\",\n \"defaultProfileId\": \"\",\n \"id\": \"\",\n \"industryVertical\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"level\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"permissions\": {\n \"effective\": []\n },\n \"profileCount\": 0,\n \"selfLink\": \"\",\n \"starred\": false,\n \"updated\": \"\",\n \"websiteUrl\": \"\"\n}")
.asString();
const data = JSON.stringify({
accountId: '',
childLink: {
href: '',
type: ''
},
created: '',
dataRetentionResetOnNewActivity: false,
dataRetentionTtl: '',
defaultProfileId: '',
id: '',
industryVertical: '',
internalWebPropertyId: '',
kind: '',
level: '',
name: '',
parentLink: {
href: '',
type: ''
},
permissions: {
effective: []
},
profileCount: 0,
selfLink: '',
starred: false,
updated: '',
websiteUrl: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PATCH', '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PATCH',
url: '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId',
headers: {'content-type': 'application/json'},
data: {
accountId: '',
childLink: {href: '', type: ''},
created: '',
dataRetentionResetOnNewActivity: false,
dataRetentionTtl: '',
defaultProfileId: '',
id: '',
industryVertical: '',
internalWebPropertyId: '',
kind: '',
level: '',
name: '',
parentLink: {href: '', type: ''},
permissions: {effective: []},
profileCount: 0,
selfLink: '',
starred: false,
updated: '',
websiteUrl: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"accountId":"","childLink":{"href":"","type":""},"created":"","dataRetentionResetOnNewActivity":false,"dataRetentionTtl":"","defaultProfileId":"","id":"","industryVertical":"","internalWebPropertyId":"","kind":"","level":"","name":"","parentLink":{"href":"","type":""},"permissions":{"effective":[]},"profileCount":0,"selfLink":"","starred":false,"updated":"","websiteUrl":""}'
};
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}}/management/accounts/:accountId/webproperties/:webPropertyId',
method: 'PATCH',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "accountId": "",\n "childLink": {\n "href": "",\n "type": ""\n },\n "created": "",\n "dataRetentionResetOnNewActivity": false,\n "dataRetentionTtl": "",\n "defaultProfileId": "",\n "id": "",\n "industryVertical": "",\n "internalWebPropertyId": "",\n "kind": "",\n "level": "",\n "name": "",\n "parentLink": {\n "href": "",\n "type": ""\n },\n "permissions": {\n "effective": []\n },\n "profileCount": 0,\n "selfLink": "",\n "starred": false,\n "updated": "",\n "websiteUrl": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"accountId\": \"\",\n \"childLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"created\": \"\",\n \"dataRetentionResetOnNewActivity\": false,\n \"dataRetentionTtl\": \"\",\n \"defaultProfileId\": \"\",\n \"id\": \"\",\n \"industryVertical\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"level\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"permissions\": {\n \"effective\": []\n },\n \"profileCount\": 0,\n \"selfLink\": \"\",\n \"starred\": false,\n \"updated\": \"\",\n \"websiteUrl\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId")
.patch(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PATCH',
hostname: 'example.com',
port: null,
path: '/baseUrl/management/accounts/:accountId/webproperties/:webPropertyId',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
accountId: '',
childLink: {href: '', type: ''},
created: '',
dataRetentionResetOnNewActivity: false,
dataRetentionTtl: '',
defaultProfileId: '',
id: '',
industryVertical: '',
internalWebPropertyId: '',
kind: '',
level: '',
name: '',
parentLink: {href: '', type: ''},
permissions: {effective: []},
profileCount: 0,
selfLink: '',
starred: false,
updated: '',
websiteUrl: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PATCH',
url: '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId',
headers: {'content-type': 'application/json'},
body: {
accountId: '',
childLink: {href: '', type: ''},
created: '',
dataRetentionResetOnNewActivity: false,
dataRetentionTtl: '',
defaultProfileId: '',
id: '',
industryVertical: '',
internalWebPropertyId: '',
kind: '',
level: '',
name: '',
parentLink: {href: '', type: ''},
permissions: {effective: []},
profileCount: 0,
selfLink: '',
starred: false,
updated: '',
websiteUrl: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PATCH', '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
accountId: '',
childLink: {
href: '',
type: ''
},
created: '',
dataRetentionResetOnNewActivity: false,
dataRetentionTtl: '',
defaultProfileId: '',
id: '',
industryVertical: '',
internalWebPropertyId: '',
kind: '',
level: '',
name: '',
parentLink: {
href: '',
type: ''
},
permissions: {
effective: []
},
profileCount: 0,
selfLink: '',
starred: false,
updated: '',
websiteUrl: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PATCH',
url: '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId',
headers: {'content-type': 'application/json'},
data: {
accountId: '',
childLink: {href: '', type: ''},
created: '',
dataRetentionResetOnNewActivity: false,
dataRetentionTtl: '',
defaultProfileId: '',
id: '',
industryVertical: '',
internalWebPropertyId: '',
kind: '',
level: '',
name: '',
parentLink: {href: '', type: ''},
permissions: {effective: []},
profileCount: 0,
selfLink: '',
starred: false,
updated: '',
websiteUrl: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"accountId":"","childLink":{"href":"","type":""},"created":"","dataRetentionResetOnNewActivity":false,"dataRetentionTtl":"","defaultProfileId":"","id":"","industryVertical":"","internalWebPropertyId":"","kind":"","level":"","name":"","parentLink":{"href":"","type":""},"permissions":{"effective":[]},"profileCount":0,"selfLink":"","starred":false,"updated":"","websiteUrl":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"accountId": @"",
@"childLink": @{ @"href": @"", @"type": @"" },
@"created": @"",
@"dataRetentionResetOnNewActivity": @NO,
@"dataRetentionTtl": @"",
@"defaultProfileId": @"",
@"id": @"",
@"industryVertical": @"",
@"internalWebPropertyId": @"",
@"kind": @"",
@"level": @"",
@"name": @"",
@"parentLink": @{ @"href": @"", @"type": @"" },
@"permissions": @{ @"effective": @[ ] },
@"profileCount": @0,
@"selfLink": @"",
@"starred": @NO,
@"updated": @"",
@"websiteUrl": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PATCH"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"accountId\": \"\",\n \"childLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"created\": \"\",\n \"dataRetentionResetOnNewActivity\": false,\n \"dataRetentionTtl\": \"\",\n \"defaultProfileId\": \"\",\n \"id\": \"\",\n \"industryVertical\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"level\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"permissions\": {\n \"effective\": []\n },\n \"profileCount\": 0,\n \"selfLink\": \"\",\n \"starred\": false,\n \"updated\": \"\",\n \"websiteUrl\": \"\"\n}" in
Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'accountId' => '',
'childLink' => [
'href' => '',
'type' => ''
],
'created' => '',
'dataRetentionResetOnNewActivity' => null,
'dataRetentionTtl' => '',
'defaultProfileId' => '',
'id' => '',
'industryVertical' => '',
'internalWebPropertyId' => '',
'kind' => '',
'level' => '',
'name' => '',
'parentLink' => [
'href' => '',
'type' => ''
],
'permissions' => [
'effective' => [
]
],
'profileCount' => 0,
'selfLink' => '',
'starred' => null,
'updated' => '',
'websiteUrl' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PATCH', '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId', [
'body' => '{
"accountId": "",
"childLink": {
"href": "",
"type": ""
},
"created": "",
"dataRetentionResetOnNewActivity": false,
"dataRetentionTtl": "",
"defaultProfileId": "",
"id": "",
"industryVertical": "",
"internalWebPropertyId": "",
"kind": "",
"level": "",
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"permissions": {
"effective": []
},
"profileCount": 0,
"selfLink": "",
"starred": false,
"updated": "",
"websiteUrl": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'accountId' => '',
'childLink' => [
'href' => '',
'type' => ''
],
'created' => '',
'dataRetentionResetOnNewActivity' => null,
'dataRetentionTtl' => '',
'defaultProfileId' => '',
'id' => '',
'industryVertical' => '',
'internalWebPropertyId' => '',
'kind' => '',
'level' => '',
'name' => '',
'parentLink' => [
'href' => '',
'type' => ''
],
'permissions' => [
'effective' => [
]
],
'profileCount' => 0,
'selfLink' => '',
'starred' => null,
'updated' => '',
'websiteUrl' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'accountId' => '',
'childLink' => [
'href' => '',
'type' => ''
],
'created' => '',
'dataRetentionResetOnNewActivity' => null,
'dataRetentionTtl' => '',
'defaultProfileId' => '',
'id' => '',
'industryVertical' => '',
'internalWebPropertyId' => '',
'kind' => '',
'level' => '',
'name' => '',
'parentLink' => [
'href' => '',
'type' => ''
],
'permissions' => [
'effective' => [
]
],
'profileCount' => 0,
'selfLink' => '',
'starred' => null,
'updated' => '',
'websiteUrl' => ''
]));
$request->setRequestUrl('{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId');
$request->setRequestMethod('PATCH');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"accountId": "",
"childLink": {
"href": "",
"type": ""
},
"created": "",
"dataRetentionResetOnNewActivity": false,
"dataRetentionTtl": "",
"defaultProfileId": "",
"id": "",
"industryVertical": "",
"internalWebPropertyId": "",
"kind": "",
"level": "",
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"permissions": {
"effective": []
},
"profileCount": 0,
"selfLink": "",
"starred": false,
"updated": "",
"websiteUrl": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"accountId": "",
"childLink": {
"href": "",
"type": ""
},
"created": "",
"dataRetentionResetOnNewActivity": false,
"dataRetentionTtl": "",
"defaultProfileId": "",
"id": "",
"industryVertical": "",
"internalWebPropertyId": "",
"kind": "",
"level": "",
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"permissions": {
"effective": []
},
"profileCount": 0,
"selfLink": "",
"starred": false,
"updated": "",
"websiteUrl": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"accountId\": \"\",\n \"childLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"created\": \"\",\n \"dataRetentionResetOnNewActivity\": false,\n \"dataRetentionTtl\": \"\",\n \"defaultProfileId\": \"\",\n \"id\": \"\",\n \"industryVertical\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"level\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"permissions\": {\n \"effective\": []\n },\n \"profileCount\": 0,\n \"selfLink\": \"\",\n \"starred\": false,\n \"updated\": \"\",\n \"websiteUrl\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("PATCH", "/baseUrl/management/accounts/:accountId/webproperties/:webPropertyId", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId"
payload = {
"accountId": "",
"childLink": {
"href": "",
"type": ""
},
"created": "",
"dataRetentionResetOnNewActivity": False,
"dataRetentionTtl": "",
"defaultProfileId": "",
"id": "",
"industryVertical": "",
"internalWebPropertyId": "",
"kind": "",
"level": "",
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"permissions": { "effective": [] },
"profileCount": 0,
"selfLink": "",
"starred": False,
"updated": "",
"websiteUrl": ""
}
headers = {"content-type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId"
payload <- "{\n \"accountId\": \"\",\n \"childLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"created\": \"\",\n \"dataRetentionResetOnNewActivity\": false,\n \"dataRetentionTtl\": \"\",\n \"defaultProfileId\": \"\",\n \"id\": \"\",\n \"industryVertical\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"level\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"permissions\": {\n \"effective\": []\n },\n \"profileCount\": 0,\n \"selfLink\": \"\",\n \"starred\": false,\n \"updated\": \"\",\n \"websiteUrl\": \"\"\n}"
encode <- "json"
response <- VERB("PATCH", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"accountId\": \"\",\n \"childLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"created\": \"\",\n \"dataRetentionResetOnNewActivity\": false,\n \"dataRetentionTtl\": \"\",\n \"defaultProfileId\": \"\",\n \"id\": \"\",\n \"industryVertical\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"level\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"permissions\": {\n \"effective\": []\n },\n \"profileCount\": 0,\n \"selfLink\": \"\",\n \"starred\": false,\n \"updated\": \"\",\n \"websiteUrl\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.patch('/baseUrl/management/accounts/:accountId/webproperties/:webPropertyId') do |req|
req.body = "{\n \"accountId\": \"\",\n \"childLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"created\": \"\",\n \"dataRetentionResetOnNewActivity\": false,\n \"dataRetentionTtl\": \"\",\n \"defaultProfileId\": \"\",\n \"id\": \"\",\n \"industryVertical\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"level\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"permissions\": {\n \"effective\": []\n },\n \"profileCount\": 0,\n \"selfLink\": \"\",\n \"starred\": false,\n \"updated\": \"\",\n \"websiteUrl\": \"\"\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}}/management/accounts/:accountId/webproperties/:webPropertyId";
let payload = json!({
"accountId": "",
"childLink": json!({
"href": "",
"type": ""
}),
"created": "",
"dataRetentionResetOnNewActivity": false,
"dataRetentionTtl": "",
"defaultProfileId": "",
"id": "",
"industryVertical": "",
"internalWebPropertyId": "",
"kind": "",
"level": "",
"name": "",
"parentLink": json!({
"href": "",
"type": ""
}),
"permissions": json!({"effective": ()}),
"profileCount": 0,
"selfLink": "",
"starred": false,
"updated": "",
"websiteUrl": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PATCH").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PATCH \
--url {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId \
--header 'content-type: application/json' \
--data '{
"accountId": "",
"childLink": {
"href": "",
"type": ""
},
"created": "",
"dataRetentionResetOnNewActivity": false,
"dataRetentionTtl": "",
"defaultProfileId": "",
"id": "",
"industryVertical": "",
"internalWebPropertyId": "",
"kind": "",
"level": "",
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"permissions": {
"effective": []
},
"profileCount": 0,
"selfLink": "",
"starred": false,
"updated": "",
"websiteUrl": ""
}'
echo '{
"accountId": "",
"childLink": {
"href": "",
"type": ""
},
"created": "",
"dataRetentionResetOnNewActivity": false,
"dataRetentionTtl": "",
"defaultProfileId": "",
"id": "",
"industryVertical": "",
"internalWebPropertyId": "",
"kind": "",
"level": "",
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"permissions": {
"effective": []
},
"profileCount": 0,
"selfLink": "",
"starred": false,
"updated": "",
"websiteUrl": ""
}' | \
http PATCH {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId \
content-type:application/json
wget --quiet \
--method PATCH \
--header 'content-type: application/json' \
--body-data '{\n "accountId": "",\n "childLink": {\n "href": "",\n "type": ""\n },\n "created": "",\n "dataRetentionResetOnNewActivity": false,\n "dataRetentionTtl": "",\n "defaultProfileId": "",\n "id": "",\n "industryVertical": "",\n "internalWebPropertyId": "",\n "kind": "",\n "level": "",\n "name": "",\n "parentLink": {\n "href": "",\n "type": ""\n },\n "permissions": {\n "effective": []\n },\n "profileCount": 0,\n "selfLink": "",\n "starred": false,\n "updated": "",\n "websiteUrl": ""\n}' \
--output-document \
- {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"accountId": "",
"childLink": [
"href": "",
"type": ""
],
"created": "",
"dataRetentionResetOnNewActivity": false,
"dataRetentionTtl": "",
"defaultProfileId": "",
"id": "",
"industryVertical": "",
"internalWebPropertyId": "",
"kind": "",
"level": "",
"name": "",
"parentLink": [
"href": "",
"type": ""
],
"permissions": ["effective": []],
"profileCount": 0,
"selfLink": "",
"starred": false,
"updated": "",
"websiteUrl": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PUT
analytics.management.webproperties.update
{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId
QUERY PARAMS
accountId
webPropertyId
BODY json
{
"accountId": "",
"childLink": {
"href": "",
"type": ""
},
"created": "",
"dataRetentionResetOnNewActivity": false,
"dataRetentionTtl": "",
"defaultProfileId": "",
"id": "",
"industryVertical": "",
"internalWebPropertyId": "",
"kind": "",
"level": "",
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"permissions": {
"effective": []
},
"profileCount": 0,
"selfLink": "",
"starred": false,
"updated": "",
"websiteUrl": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"accountId\": \"\",\n \"childLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"created\": \"\",\n \"dataRetentionResetOnNewActivity\": false,\n \"dataRetentionTtl\": \"\",\n \"defaultProfileId\": \"\",\n \"id\": \"\",\n \"industryVertical\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"level\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"permissions\": {\n \"effective\": []\n },\n \"profileCount\": 0,\n \"selfLink\": \"\",\n \"starred\": false,\n \"updated\": \"\",\n \"websiteUrl\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId" {:content-type :json
:form-params {:accountId ""
:childLink {:href ""
:type ""}
:created ""
:dataRetentionResetOnNewActivity false
:dataRetentionTtl ""
:defaultProfileId ""
:id ""
:industryVertical ""
:internalWebPropertyId ""
:kind ""
:level ""
:name ""
:parentLink {:href ""
:type ""}
:permissions {:effective []}
:profileCount 0
:selfLink ""
:starred false
:updated ""
:websiteUrl ""}})
require "http/client"
url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"accountId\": \"\",\n \"childLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"created\": \"\",\n \"dataRetentionResetOnNewActivity\": false,\n \"dataRetentionTtl\": \"\",\n \"defaultProfileId\": \"\",\n \"id\": \"\",\n \"industryVertical\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"level\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"permissions\": {\n \"effective\": []\n },\n \"profileCount\": 0,\n \"selfLink\": \"\",\n \"starred\": false,\n \"updated\": \"\",\n \"websiteUrl\": \"\"\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}}/management/accounts/:accountId/webproperties/:webPropertyId"),
Content = new StringContent("{\n \"accountId\": \"\",\n \"childLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"created\": \"\",\n \"dataRetentionResetOnNewActivity\": false,\n \"dataRetentionTtl\": \"\",\n \"defaultProfileId\": \"\",\n \"id\": \"\",\n \"industryVertical\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"level\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"permissions\": {\n \"effective\": []\n },\n \"profileCount\": 0,\n \"selfLink\": \"\",\n \"starred\": false,\n \"updated\": \"\",\n \"websiteUrl\": \"\"\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}}/management/accounts/:accountId/webproperties/:webPropertyId");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"accountId\": \"\",\n \"childLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"created\": \"\",\n \"dataRetentionResetOnNewActivity\": false,\n \"dataRetentionTtl\": \"\",\n \"defaultProfileId\": \"\",\n \"id\": \"\",\n \"industryVertical\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"level\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"permissions\": {\n \"effective\": []\n },\n \"profileCount\": 0,\n \"selfLink\": \"\",\n \"starred\": false,\n \"updated\": \"\",\n \"websiteUrl\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId"
payload := strings.NewReader("{\n \"accountId\": \"\",\n \"childLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"created\": \"\",\n \"dataRetentionResetOnNewActivity\": false,\n \"dataRetentionTtl\": \"\",\n \"defaultProfileId\": \"\",\n \"id\": \"\",\n \"industryVertical\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"level\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"permissions\": {\n \"effective\": []\n },\n \"profileCount\": 0,\n \"selfLink\": \"\",\n \"starred\": false,\n \"updated\": \"\",\n \"websiteUrl\": \"\"\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/management/accounts/:accountId/webproperties/:webPropertyId HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 493
{
"accountId": "",
"childLink": {
"href": "",
"type": ""
},
"created": "",
"dataRetentionResetOnNewActivity": false,
"dataRetentionTtl": "",
"defaultProfileId": "",
"id": "",
"industryVertical": "",
"internalWebPropertyId": "",
"kind": "",
"level": "",
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"permissions": {
"effective": []
},
"profileCount": 0,
"selfLink": "",
"starred": false,
"updated": "",
"websiteUrl": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId")
.setHeader("content-type", "application/json")
.setBody("{\n \"accountId\": \"\",\n \"childLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"created\": \"\",\n \"dataRetentionResetOnNewActivity\": false,\n \"dataRetentionTtl\": \"\",\n \"defaultProfileId\": \"\",\n \"id\": \"\",\n \"industryVertical\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"level\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"permissions\": {\n \"effective\": []\n },\n \"profileCount\": 0,\n \"selfLink\": \"\",\n \"starred\": false,\n \"updated\": \"\",\n \"websiteUrl\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"accountId\": \"\",\n \"childLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"created\": \"\",\n \"dataRetentionResetOnNewActivity\": false,\n \"dataRetentionTtl\": \"\",\n \"defaultProfileId\": \"\",\n \"id\": \"\",\n \"industryVertical\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"level\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"permissions\": {\n \"effective\": []\n },\n \"profileCount\": 0,\n \"selfLink\": \"\",\n \"starred\": false,\n \"updated\": \"\",\n \"websiteUrl\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"accountId\": \"\",\n \"childLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"created\": \"\",\n \"dataRetentionResetOnNewActivity\": false,\n \"dataRetentionTtl\": \"\",\n \"defaultProfileId\": \"\",\n \"id\": \"\",\n \"industryVertical\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"level\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"permissions\": {\n \"effective\": []\n },\n \"profileCount\": 0,\n \"selfLink\": \"\",\n \"starred\": false,\n \"updated\": \"\",\n \"websiteUrl\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId")
.header("content-type", "application/json")
.body("{\n \"accountId\": \"\",\n \"childLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"created\": \"\",\n \"dataRetentionResetOnNewActivity\": false,\n \"dataRetentionTtl\": \"\",\n \"defaultProfileId\": \"\",\n \"id\": \"\",\n \"industryVertical\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"level\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"permissions\": {\n \"effective\": []\n },\n \"profileCount\": 0,\n \"selfLink\": \"\",\n \"starred\": false,\n \"updated\": \"\",\n \"websiteUrl\": \"\"\n}")
.asString();
const data = JSON.stringify({
accountId: '',
childLink: {
href: '',
type: ''
},
created: '',
dataRetentionResetOnNewActivity: false,
dataRetentionTtl: '',
defaultProfileId: '',
id: '',
industryVertical: '',
internalWebPropertyId: '',
kind: '',
level: '',
name: '',
parentLink: {
href: '',
type: ''
},
permissions: {
effective: []
},
profileCount: 0,
selfLink: '',
starred: false,
updated: '',
websiteUrl: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId',
headers: {'content-type': 'application/json'},
data: {
accountId: '',
childLink: {href: '', type: ''},
created: '',
dataRetentionResetOnNewActivity: false,
dataRetentionTtl: '',
defaultProfileId: '',
id: '',
industryVertical: '',
internalWebPropertyId: '',
kind: '',
level: '',
name: '',
parentLink: {href: '', type: ''},
permissions: {effective: []},
profileCount: 0,
selfLink: '',
starred: false,
updated: '',
websiteUrl: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"accountId":"","childLink":{"href":"","type":""},"created":"","dataRetentionResetOnNewActivity":false,"dataRetentionTtl":"","defaultProfileId":"","id":"","industryVertical":"","internalWebPropertyId":"","kind":"","level":"","name":"","parentLink":{"href":"","type":""},"permissions":{"effective":[]},"profileCount":0,"selfLink":"","starred":false,"updated":"","websiteUrl":""}'
};
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}}/management/accounts/:accountId/webproperties/:webPropertyId',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "accountId": "",\n "childLink": {\n "href": "",\n "type": ""\n },\n "created": "",\n "dataRetentionResetOnNewActivity": false,\n "dataRetentionTtl": "",\n "defaultProfileId": "",\n "id": "",\n "industryVertical": "",\n "internalWebPropertyId": "",\n "kind": "",\n "level": "",\n "name": "",\n "parentLink": {\n "href": "",\n "type": ""\n },\n "permissions": {\n "effective": []\n },\n "profileCount": 0,\n "selfLink": "",\n "starred": false,\n "updated": "",\n "websiteUrl": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"accountId\": \"\",\n \"childLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"created\": \"\",\n \"dataRetentionResetOnNewActivity\": false,\n \"dataRetentionTtl\": \"\",\n \"defaultProfileId\": \"\",\n \"id\": \"\",\n \"industryVertical\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"level\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"permissions\": {\n \"effective\": []\n },\n \"profileCount\": 0,\n \"selfLink\": \"\",\n \"starred\": false,\n \"updated\": \"\",\n \"websiteUrl\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId")
.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/management/accounts/:accountId/webproperties/:webPropertyId',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
accountId: '',
childLink: {href: '', type: ''},
created: '',
dataRetentionResetOnNewActivity: false,
dataRetentionTtl: '',
defaultProfileId: '',
id: '',
industryVertical: '',
internalWebPropertyId: '',
kind: '',
level: '',
name: '',
parentLink: {href: '', type: ''},
permissions: {effective: []},
profileCount: 0,
selfLink: '',
starred: false,
updated: '',
websiteUrl: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId',
headers: {'content-type': 'application/json'},
body: {
accountId: '',
childLink: {href: '', type: ''},
created: '',
dataRetentionResetOnNewActivity: false,
dataRetentionTtl: '',
defaultProfileId: '',
id: '',
industryVertical: '',
internalWebPropertyId: '',
kind: '',
level: '',
name: '',
parentLink: {href: '', type: ''},
permissions: {effective: []},
profileCount: 0,
selfLink: '',
starred: false,
updated: '',
websiteUrl: ''
},
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}}/management/accounts/:accountId/webproperties/:webPropertyId');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
accountId: '',
childLink: {
href: '',
type: ''
},
created: '',
dataRetentionResetOnNewActivity: false,
dataRetentionTtl: '',
defaultProfileId: '',
id: '',
industryVertical: '',
internalWebPropertyId: '',
kind: '',
level: '',
name: '',
parentLink: {
href: '',
type: ''
},
permissions: {
effective: []
},
profileCount: 0,
selfLink: '',
starred: false,
updated: '',
websiteUrl: ''
});
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}}/management/accounts/:accountId/webproperties/:webPropertyId',
headers: {'content-type': 'application/json'},
data: {
accountId: '',
childLink: {href: '', type: ''},
created: '',
dataRetentionResetOnNewActivity: false,
dataRetentionTtl: '',
defaultProfileId: '',
id: '',
industryVertical: '',
internalWebPropertyId: '',
kind: '',
level: '',
name: '',
parentLink: {href: '', type: ''},
permissions: {effective: []},
profileCount: 0,
selfLink: '',
starred: false,
updated: '',
websiteUrl: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"accountId":"","childLink":{"href":"","type":""},"created":"","dataRetentionResetOnNewActivity":false,"dataRetentionTtl":"","defaultProfileId":"","id":"","industryVertical":"","internalWebPropertyId":"","kind":"","level":"","name":"","parentLink":{"href":"","type":""},"permissions":{"effective":[]},"profileCount":0,"selfLink":"","starred":false,"updated":"","websiteUrl":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"accountId": @"",
@"childLink": @{ @"href": @"", @"type": @"" },
@"created": @"",
@"dataRetentionResetOnNewActivity": @NO,
@"dataRetentionTtl": @"",
@"defaultProfileId": @"",
@"id": @"",
@"industryVertical": @"",
@"internalWebPropertyId": @"",
@"kind": @"",
@"level": @"",
@"name": @"",
@"parentLink": @{ @"href": @"", @"type": @"" },
@"permissions": @{ @"effective": @[ ] },
@"profileCount": @0,
@"selfLink": @"",
@"starred": @NO,
@"updated": @"",
@"websiteUrl": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId"]
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}}/management/accounts/:accountId/webproperties/:webPropertyId" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"accountId\": \"\",\n \"childLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"created\": \"\",\n \"dataRetentionResetOnNewActivity\": false,\n \"dataRetentionTtl\": \"\",\n \"defaultProfileId\": \"\",\n \"id\": \"\",\n \"industryVertical\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"level\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"permissions\": {\n \"effective\": []\n },\n \"profileCount\": 0,\n \"selfLink\": \"\",\n \"starred\": false,\n \"updated\": \"\",\n \"websiteUrl\": \"\"\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId",
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([
'accountId' => '',
'childLink' => [
'href' => '',
'type' => ''
],
'created' => '',
'dataRetentionResetOnNewActivity' => null,
'dataRetentionTtl' => '',
'defaultProfileId' => '',
'id' => '',
'industryVertical' => '',
'internalWebPropertyId' => '',
'kind' => '',
'level' => '',
'name' => '',
'parentLink' => [
'href' => '',
'type' => ''
],
'permissions' => [
'effective' => [
]
],
'profileCount' => 0,
'selfLink' => '',
'starred' => null,
'updated' => '',
'websiteUrl' => ''
]),
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}}/management/accounts/:accountId/webproperties/:webPropertyId', [
'body' => '{
"accountId": "",
"childLink": {
"href": "",
"type": ""
},
"created": "",
"dataRetentionResetOnNewActivity": false,
"dataRetentionTtl": "",
"defaultProfileId": "",
"id": "",
"industryVertical": "",
"internalWebPropertyId": "",
"kind": "",
"level": "",
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"permissions": {
"effective": []
},
"profileCount": 0,
"selfLink": "",
"starred": false,
"updated": "",
"websiteUrl": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'accountId' => '',
'childLink' => [
'href' => '',
'type' => ''
],
'created' => '',
'dataRetentionResetOnNewActivity' => null,
'dataRetentionTtl' => '',
'defaultProfileId' => '',
'id' => '',
'industryVertical' => '',
'internalWebPropertyId' => '',
'kind' => '',
'level' => '',
'name' => '',
'parentLink' => [
'href' => '',
'type' => ''
],
'permissions' => [
'effective' => [
]
],
'profileCount' => 0,
'selfLink' => '',
'starred' => null,
'updated' => '',
'websiteUrl' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'accountId' => '',
'childLink' => [
'href' => '',
'type' => ''
],
'created' => '',
'dataRetentionResetOnNewActivity' => null,
'dataRetentionTtl' => '',
'defaultProfileId' => '',
'id' => '',
'industryVertical' => '',
'internalWebPropertyId' => '',
'kind' => '',
'level' => '',
'name' => '',
'parentLink' => [
'href' => '',
'type' => ''
],
'permissions' => [
'effective' => [
]
],
'profileCount' => 0,
'selfLink' => '',
'starred' => null,
'updated' => '',
'websiteUrl' => ''
]));
$request->setRequestUrl('{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId');
$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}}/management/accounts/:accountId/webproperties/:webPropertyId' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"accountId": "",
"childLink": {
"href": "",
"type": ""
},
"created": "",
"dataRetentionResetOnNewActivity": false,
"dataRetentionTtl": "",
"defaultProfileId": "",
"id": "",
"industryVertical": "",
"internalWebPropertyId": "",
"kind": "",
"level": "",
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"permissions": {
"effective": []
},
"profileCount": 0,
"selfLink": "",
"starred": false,
"updated": "",
"websiteUrl": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"accountId": "",
"childLink": {
"href": "",
"type": ""
},
"created": "",
"dataRetentionResetOnNewActivity": false,
"dataRetentionTtl": "",
"defaultProfileId": "",
"id": "",
"industryVertical": "",
"internalWebPropertyId": "",
"kind": "",
"level": "",
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"permissions": {
"effective": []
},
"profileCount": 0,
"selfLink": "",
"starred": false,
"updated": "",
"websiteUrl": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"accountId\": \"\",\n \"childLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"created\": \"\",\n \"dataRetentionResetOnNewActivity\": false,\n \"dataRetentionTtl\": \"\",\n \"defaultProfileId\": \"\",\n \"id\": \"\",\n \"industryVertical\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"level\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"permissions\": {\n \"effective\": []\n },\n \"profileCount\": 0,\n \"selfLink\": \"\",\n \"starred\": false,\n \"updated\": \"\",\n \"websiteUrl\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/management/accounts/:accountId/webproperties/:webPropertyId", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId"
payload = {
"accountId": "",
"childLink": {
"href": "",
"type": ""
},
"created": "",
"dataRetentionResetOnNewActivity": False,
"dataRetentionTtl": "",
"defaultProfileId": "",
"id": "",
"industryVertical": "",
"internalWebPropertyId": "",
"kind": "",
"level": "",
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"permissions": { "effective": [] },
"profileCount": 0,
"selfLink": "",
"starred": False,
"updated": "",
"websiteUrl": ""
}
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId"
payload <- "{\n \"accountId\": \"\",\n \"childLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"created\": \"\",\n \"dataRetentionResetOnNewActivity\": false,\n \"dataRetentionTtl\": \"\",\n \"defaultProfileId\": \"\",\n \"id\": \"\",\n \"industryVertical\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"level\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"permissions\": {\n \"effective\": []\n },\n \"profileCount\": 0,\n \"selfLink\": \"\",\n \"starred\": false,\n \"updated\": \"\",\n \"websiteUrl\": \"\"\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}}/management/accounts/:accountId/webproperties/:webPropertyId")
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 \"accountId\": \"\",\n \"childLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"created\": \"\",\n \"dataRetentionResetOnNewActivity\": false,\n \"dataRetentionTtl\": \"\",\n \"defaultProfileId\": \"\",\n \"id\": \"\",\n \"industryVertical\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"level\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"permissions\": {\n \"effective\": []\n },\n \"profileCount\": 0,\n \"selfLink\": \"\",\n \"starred\": false,\n \"updated\": \"\",\n \"websiteUrl\": \"\"\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/management/accounts/:accountId/webproperties/:webPropertyId') do |req|
req.body = "{\n \"accountId\": \"\",\n \"childLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"created\": \"\",\n \"dataRetentionResetOnNewActivity\": false,\n \"dataRetentionTtl\": \"\",\n \"defaultProfileId\": \"\",\n \"id\": \"\",\n \"industryVertical\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"level\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"permissions\": {\n \"effective\": []\n },\n \"profileCount\": 0,\n \"selfLink\": \"\",\n \"starred\": false,\n \"updated\": \"\",\n \"websiteUrl\": \"\"\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}}/management/accounts/:accountId/webproperties/:webPropertyId";
let payload = json!({
"accountId": "",
"childLink": json!({
"href": "",
"type": ""
}),
"created": "",
"dataRetentionResetOnNewActivity": false,
"dataRetentionTtl": "",
"defaultProfileId": "",
"id": "",
"industryVertical": "",
"internalWebPropertyId": "",
"kind": "",
"level": "",
"name": "",
"parentLink": json!({
"href": "",
"type": ""
}),
"permissions": json!({"effective": ()}),
"profileCount": 0,
"selfLink": "",
"starred": false,
"updated": "",
"websiteUrl": ""
});
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}}/management/accounts/:accountId/webproperties/:webPropertyId \
--header 'content-type: application/json' \
--data '{
"accountId": "",
"childLink": {
"href": "",
"type": ""
},
"created": "",
"dataRetentionResetOnNewActivity": false,
"dataRetentionTtl": "",
"defaultProfileId": "",
"id": "",
"industryVertical": "",
"internalWebPropertyId": "",
"kind": "",
"level": "",
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"permissions": {
"effective": []
},
"profileCount": 0,
"selfLink": "",
"starred": false,
"updated": "",
"websiteUrl": ""
}'
echo '{
"accountId": "",
"childLink": {
"href": "",
"type": ""
},
"created": "",
"dataRetentionResetOnNewActivity": false,
"dataRetentionTtl": "",
"defaultProfileId": "",
"id": "",
"industryVertical": "",
"internalWebPropertyId": "",
"kind": "",
"level": "",
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"permissions": {
"effective": []
},
"profileCount": 0,
"selfLink": "",
"starred": false,
"updated": "",
"websiteUrl": ""
}' | \
http PUT {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '{\n "accountId": "",\n "childLink": {\n "href": "",\n "type": ""\n },\n "created": "",\n "dataRetentionResetOnNewActivity": false,\n "dataRetentionTtl": "",\n "defaultProfileId": "",\n "id": "",\n "industryVertical": "",\n "internalWebPropertyId": "",\n "kind": "",\n "level": "",\n "name": "",\n "parentLink": {\n "href": "",\n "type": ""\n },\n "permissions": {\n "effective": []\n },\n "profileCount": 0,\n "selfLink": "",\n "starred": false,\n "updated": "",\n "websiteUrl": ""\n}' \
--output-document \
- {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"accountId": "",
"childLink": [
"href": "",
"type": ""
],
"created": "",
"dataRetentionResetOnNewActivity": false,
"dataRetentionTtl": "",
"defaultProfileId": "",
"id": "",
"industryVertical": "",
"internalWebPropertyId": "",
"kind": "",
"level": "",
"name": "",
"parentLink": [
"href": "",
"type": ""
],
"permissions": ["effective": []],
"profileCount": 0,
"selfLink": "",
"starred": false,
"updated": "",
"websiteUrl": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId")! 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()
DELETE
analytics.management.webpropertyUserLinks.delete
{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks/:linkId
QUERY PARAMS
accountId
webPropertyId
linkId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks/:linkId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks/:linkId")
require "http/client"
url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks/:linkId"
response = HTTP::Client.delete url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Delete,
RequestUri = new Uri("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks/:linkId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks/:linkId");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks/:linkId"
req, _ := http.NewRequest("DELETE", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
DELETE /baseUrl/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks/:linkId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks/:linkId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks/:linkId"))
.method("DELETE", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks/:linkId")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks/:linkId")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('DELETE', '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks/:linkId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'DELETE',
url: '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks/:linkId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks/:linkId';
const options = {method: 'DELETE'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks/:linkId',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks/:linkId")
.delete(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks/:linkId',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'DELETE',
url: '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks/:linkId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks/:linkId');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'DELETE',
url: '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks/:linkId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks/:linkId';
const options = {method: 'DELETE'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks/:linkId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"DELETE"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks/:linkId" in
Client.call `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks/:linkId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('DELETE', '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks/:linkId');
echo $response->getBody();
setUrl('{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks/:linkId');
$request->setMethod(HTTP_METH_DELETE);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks/:linkId');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks/:linkId' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks/:linkId' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks/:linkId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks/:linkId"
response = requests.delete(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks/:linkId"
response <- VERB("DELETE", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks/:linkId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.delete('/baseUrl/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks/:linkId') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks/:linkId";
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("DELETE").unwrap(), url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request DELETE \
--url {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks/:linkId
http DELETE {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks/:linkId
wget --quiet \
--method DELETE \
--output-document \
- {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks/:linkId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks/:linkId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "DELETE"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
analytics.management.webpropertyUserLinks.insert
{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks
QUERY PARAMS
accountId
webPropertyId
BODY json
{
"entity": {
"accountRef": {
"href": "",
"id": "",
"kind": "",
"name": ""
},
"profileRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"webPropertyId": ""
},
"webPropertyRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": ""
}
},
"id": "",
"kind": "",
"permissions": {
"effective": [],
"local": []
},
"selfLink": "",
"userRef": {
"email": "",
"id": "",
"kind": ""
}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks");
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 \"entity\": {\n \"accountRef\": {\n \"href\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"profileRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"webPropertyId\": \"\"\n },\n \"webPropertyRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n }\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"permissions\": {\n \"effective\": [],\n \"local\": []\n },\n \"selfLink\": \"\",\n \"userRef\": {\n \"email\": \"\",\n \"id\": \"\",\n \"kind\": \"\"\n }\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks" {:content-type :json
:form-params {:entity {:accountRef {:href ""
:id ""
:kind ""
:name ""}
:profileRef {:accountId ""
:href ""
:id ""
:internalWebPropertyId ""
:kind ""
:name ""
:webPropertyId ""}
:webPropertyRef {:accountId ""
:href ""
:id ""
:internalWebPropertyId ""
:kind ""
:name ""}}
:id ""
:kind ""
:permissions {:effective []
:local []}
:selfLink ""
:userRef {:email ""
:id ""
:kind ""}}})
require "http/client"
url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"entity\": {\n \"accountRef\": {\n \"href\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"profileRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"webPropertyId\": \"\"\n },\n \"webPropertyRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n }\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"permissions\": {\n \"effective\": [],\n \"local\": []\n },\n \"selfLink\": \"\",\n \"userRef\": {\n \"email\": \"\",\n \"id\": \"\",\n \"kind\": \"\"\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}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks"),
Content = new StringContent("{\n \"entity\": {\n \"accountRef\": {\n \"href\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"profileRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"webPropertyId\": \"\"\n },\n \"webPropertyRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n }\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"permissions\": {\n \"effective\": [],\n \"local\": []\n },\n \"selfLink\": \"\",\n \"userRef\": {\n \"email\": \"\",\n \"id\": \"\",\n \"kind\": \"\"\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}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"entity\": {\n \"accountRef\": {\n \"href\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"profileRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"webPropertyId\": \"\"\n },\n \"webPropertyRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n }\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"permissions\": {\n \"effective\": [],\n \"local\": []\n },\n \"selfLink\": \"\",\n \"userRef\": {\n \"email\": \"\",\n \"id\": \"\",\n \"kind\": \"\"\n }\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks"
payload := strings.NewReader("{\n \"entity\": {\n \"accountRef\": {\n \"href\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"profileRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"webPropertyId\": \"\"\n },\n \"webPropertyRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n }\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"permissions\": {\n \"effective\": [],\n \"local\": []\n },\n \"selfLink\": \"\",\n \"userRef\": {\n \"email\": \"\",\n \"id\": \"\",\n \"kind\": \"\"\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/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 626
{
"entity": {
"accountRef": {
"href": "",
"id": "",
"kind": "",
"name": ""
},
"profileRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"webPropertyId": ""
},
"webPropertyRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": ""
}
},
"id": "",
"kind": "",
"permissions": {
"effective": [],
"local": []
},
"selfLink": "",
"userRef": {
"email": "",
"id": "",
"kind": ""
}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks")
.setHeader("content-type", "application/json")
.setBody("{\n \"entity\": {\n \"accountRef\": {\n \"href\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"profileRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"webPropertyId\": \"\"\n },\n \"webPropertyRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n }\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"permissions\": {\n \"effective\": [],\n \"local\": []\n },\n \"selfLink\": \"\",\n \"userRef\": {\n \"email\": \"\",\n \"id\": \"\",\n \"kind\": \"\"\n }\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"entity\": {\n \"accountRef\": {\n \"href\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"profileRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"webPropertyId\": \"\"\n },\n \"webPropertyRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n }\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"permissions\": {\n \"effective\": [],\n \"local\": []\n },\n \"selfLink\": \"\",\n \"userRef\": {\n \"email\": \"\",\n \"id\": \"\",\n \"kind\": \"\"\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 \"entity\": {\n \"accountRef\": {\n \"href\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"profileRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"webPropertyId\": \"\"\n },\n \"webPropertyRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n }\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"permissions\": {\n \"effective\": [],\n \"local\": []\n },\n \"selfLink\": \"\",\n \"userRef\": {\n \"email\": \"\",\n \"id\": \"\",\n \"kind\": \"\"\n }\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks")
.header("content-type", "application/json")
.body("{\n \"entity\": {\n \"accountRef\": {\n \"href\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"profileRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"webPropertyId\": \"\"\n },\n \"webPropertyRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n }\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"permissions\": {\n \"effective\": [],\n \"local\": []\n },\n \"selfLink\": \"\",\n \"userRef\": {\n \"email\": \"\",\n \"id\": \"\",\n \"kind\": \"\"\n }\n}")
.asString();
const data = JSON.stringify({
entity: {
accountRef: {
href: '',
id: '',
kind: '',
name: ''
},
profileRef: {
accountId: '',
href: '',
id: '',
internalWebPropertyId: '',
kind: '',
name: '',
webPropertyId: ''
},
webPropertyRef: {
accountId: '',
href: '',
id: '',
internalWebPropertyId: '',
kind: '',
name: ''
}
},
id: '',
kind: '',
permissions: {
effective: [],
local: []
},
selfLink: '',
userRef: {
email: '',
id: '',
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}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks',
headers: {'content-type': 'application/json'},
data: {
entity: {
accountRef: {href: '', id: '', kind: '', name: ''},
profileRef: {
accountId: '',
href: '',
id: '',
internalWebPropertyId: '',
kind: '',
name: '',
webPropertyId: ''
},
webPropertyRef: {accountId: '', href: '', id: '', internalWebPropertyId: '', kind: '', name: ''}
},
id: '',
kind: '',
permissions: {effective: [], local: []},
selfLink: '',
userRef: {email: '', id: '', kind: ''}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"entity":{"accountRef":{"href":"","id":"","kind":"","name":""},"profileRef":{"accountId":"","href":"","id":"","internalWebPropertyId":"","kind":"","name":"","webPropertyId":""},"webPropertyRef":{"accountId":"","href":"","id":"","internalWebPropertyId":"","kind":"","name":""}},"id":"","kind":"","permissions":{"effective":[],"local":[]},"selfLink":"","userRef":{"email":"","id":"","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}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "entity": {\n "accountRef": {\n "href": "",\n "id": "",\n "kind": "",\n "name": ""\n },\n "profileRef": {\n "accountId": "",\n "href": "",\n "id": "",\n "internalWebPropertyId": "",\n "kind": "",\n "name": "",\n "webPropertyId": ""\n },\n "webPropertyRef": {\n "accountId": "",\n "href": "",\n "id": "",\n "internalWebPropertyId": "",\n "kind": "",\n "name": ""\n }\n },\n "id": "",\n "kind": "",\n "permissions": {\n "effective": [],\n "local": []\n },\n "selfLink": "",\n "userRef": {\n "email": "",\n "id": "",\n "kind": ""\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 \"entity\": {\n \"accountRef\": {\n \"href\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"profileRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"webPropertyId\": \"\"\n },\n \"webPropertyRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n }\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"permissions\": {\n \"effective\": [],\n \"local\": []\n },\n \"selfLink\": \"\",\n \"userRef\": {\n \"email\": \"\",\n \"id\": \"\",\n \"kind\": \"\"\n }\n}")
val request = Request.Builder()
.url("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks")
.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/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks',
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({
entity: {
accountRef: {href: '', id: '', kind: '', name: ''},
profileRef: {
accountId: '',
href: '',
id: '',
internalWebPropertyId: '',
kind: '',
name: '',
webPropertyId: ''
},
webPropertyRef: {accountId: '', href: '', id: '', internalWebPropertyId: '', kind: '', name: ''}
},
id: '',
kind: '',
permissions: {effective: [], local: []},
selfLink: '',
userRef: {email: '', id: '', kind: ''}
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks',
headers: {'content-type': 'application/json'},
body: {
entity: {
accountRef: {href: '', id: '', kind: '', name: ''},
profileRef: {
accountId: '',
href: '',
id: '',
internalWebPropertyId: '',
kind: '',
name: '',
webPropertyId: ''
},
webPropertyRef: {accountId: '', href: '', id: '', internalWebPropertyId: '', kind: '', name: ''}
},
id: '',
kind: '',
permissions: {effective: [], local: []},
selfLink: '',
userRef: {email: '', id: '', 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}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
entity: {
accountRef: {
href: '',
id: '',
kind: '',
name: ''
},
profileRef: {
accountId: '',
href: '',
id: '',
internalWebPropertyId: '',
kind: '',
name: '',
webPropertyId: ''
},
webPropertyRef: {
accountId: '',
href: '',
id: '',
internalWebPropertyId: '',
kind: '',
name: ''
}
},
id: '',
kind: '',
permissions: {
effective: [],
local: []
},
selfLink: '',
userRef: {
email: '',
id: '',
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}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks',
headers: {'content-type': 'application/json'},
data: {
entity: {
accountRef: {href: '', id: '', kind: '', name: ''},
profileRef: {
accountId: '',
href: '',
id: '',
internalWebPropertyId: '',
kind: '',
name: '',
webPropertyId: ''
},
webPropertyRef: {accountId: '', href: '', id: '', internalWebPropertyId: '', kind: '', name: ''}
},
id: '',
kind: '',
permissions: {effective: [], local: []},
selfLink: '',
userRef: {email: '', id: '', kind: ''}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"entity":{"accountRef":{"href":"","id":"","kind":"","name":""},"profileRef":{"accountId":"","href":"","id":"","internalWebPropertyId":"","kind":"","name":"","webPropertyId":""},"webPropertyRef":{"accountId":"","href":"","id":"","internalWebPropertyId":"","kind":"","name":""}},"id":"","kind":"","permissions":{"effective":[],"local":[]},"selfLink":"","userRef":{"email":"","id":"","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 = @{ @"entity": @{ @"accountRef": @{ @"href": @"", @"id": @"", @"kind": @"", @"name": @"" }, @"profileRef": @{ @"accountId": @"", @"href": @"", @"id": @"", @"internalWebPropertyId": @"", @"kind": @"", @"name": @"", @"webPropertyId": @"" }, @"webPropertyRef": @{ @"accountId": @"", @"href": @"", @"id": @"", @"internalWebPropertyId": @"", @"kind": @"", @"name": @"" } },
@"id": @"",
@"kind": @"",
@"permissions": @{ @"effective": @[ ], @"local": @[ ] },
@"selfLink": @"",
@"userRef": @{ @"email": @"", @"id": @"", @"kind": @"" } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks"]
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}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"entity\": {\n \"accountRef\": {\n \"href\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"profileRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"webPropertyId\": \"\"\n },\n \"webPropertyRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n }\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"permissions\": {\n \"effective\": [],\n \"local\": []\n },\n \"selfLink\": \"\",\n \"userRef\": {\n \"email\": \"\",\n \"id\": \"\",\n \"kind\": \"\"\n }\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks",
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([
'entity' => [
'accountRef' => [
'href' => '',
'id' => '',
'kind' => '',
'name' => ''
],
'profileRef' => [
'accountId' => '',
'href' => '',
'id' => '',
'internalWebPropertyId' => '',
'kind' => '',
'name' => '',
'webPropertyId' => ''
],
'webPropertyRef' => [
'accountId' => '',
'href' => '',
'id' => '',
'internalWebPropertyId' => '',
'kind' => '',
'name' => ''
]
],
'id' => '',
'kind' => '',
'permissions' => [
'effective' => [
],
'local' => [
]
],
'selfLink' => '',
'userRef' => [
'email' => '',
'id' => '',
'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}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks', [
'body' => '{
"entity": {
"accountRef": {
"href": "",
"id": "",
"kind": "",
"name": ""
},
"profileRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"webPropertyId": ""
},
"webPropertyRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": ""
}
},
"id": "",
"kind": "",
"permissions": {
"effective": [],
"local": []
},
"selfLink": "",
"userRef": {
"email": "",
"id": "",
"kind": ""
}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'entity' => [
'accountRef' => [
'href' => '',
'id' => '',
'kind' => '',
'name' => ''
],
'profileRef' => [
'accountId' => '',
'href' => '',
'id' => '',
'internalWebPropertyId' => '',
'kind' => '',
'name' => '',
'webPropertyId' => ''
],
'webPropertyRef' => [
'accountId' => '',
'href' => '',
'id' => '',
'internalWebPropertyId' => '',
'kind' => '',
'name' => ''
]
],
'id' => '',
'kind' => '',
'permissions' => [
'effective' => [
],
'local' => [
]
],
'selfLink' => '',
'userRef' => [
'email' => '',
'id' => '',
'kind' => ''
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'entity' => [
'accountRef' => [
'href' => '',
'id' => '',
'kind' => '',
'name' => ''
],
'profileRef' => [
'accountId' => '',
'href' => '',
'id' => '',
'internalWebPropertyId' => '',
'kind' => '',
'name' => '',
'webPropertyId' => ''
],
'webPropertyRef' => [
'accountId' => '',
'href' => '',
'id' => '',
'internalWebPropertyId' => '',
'kind' => '',
'name' => ''
]
],
'id' => '',
'kind' => '',
'permissions' => [
'effective' => [
],
'local' => [
]
],
'selfLink' => '',
'userRef' => [
'email' => '',
'id' => '',
'kind' => ''
]
]));
$request->setRequestUrl('{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks');
$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}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"entity": {
"accountRef": {
"href": "",
"id": "",
"kind": "",
"name": ""
},
"profileRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"webPropertyId": ""
},
"webPropertyRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": ""
}
},
"id": "",
"kind": "",
"permissions": {
"effective": [],
"local": []
},
"selfLink": "",
"userRef": {
"email": "",
"id": "",
"kind": ""
}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"entity": {
"accountRef": {
"href": "",
"id": "",
"kind": "",
"name": ""
},
"profileRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"webPropertyId": ""
},
"webPropertyRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": ""
}
},
"id": "",
"kind": "",
"permissions": {
"effective": [],
"local": []
},
"selfLink": "",
"userRef": {
"email": "",
"id": "",
"kind": ""
}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"entity\": {\n \"accountRef\": {\n \"href\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"profileRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"webPropertyId\": \"\"\n },\n \"webPropertyRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n }\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"permissions\": {\n \"effective\": [],\n \"local\": []\n },\n \"selfLink\": \"\",\n \"userRef\": {\n \"email\": \"\",\n \"id\": \"\",\n \"kind\": \"\"\n }\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks"
payload = {
"entity": {
"accountRef": {
"href": "",
"id": "",
"kind": "",
"name": ""
},
"profileRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"webPropertyId": ""
},
"webPropertyRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": ""
}
},
"id": "",
"kind": "",
"permissions": {
"effective": [],
"local": []
},
"selfLink": "",
"userRef": {
"email": "",
"id": "",
"kind": ""
}
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks"
payload <- "{\n \"entity\": {\n \"accountRef\": {\n \"href\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"profileRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"webPropertyId\": \"\"\n },\n \"webPropertyRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n }\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"permissions\": {\n \"effective\": [],\n \"local\": []\n },\n \"selfLink\": \"\",\n \"userRef\": {\n \"email\": \"\",\n \"id\": \"\",\n \"kind\": \"\"\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}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks")
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 \"entity\": {\n \"accountRef\": {\n \"href\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"profileRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"webPropertyId\": \"\"\n },\n \"webPropertyRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n }\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"permissions\": {\n \"effective\": [],\n \"local\": []\n },\n \"selfLink\": \"\",\n \"userRef\": {\n \"email\": \"\",\n \"id\": \"\",\n \"kind\": \"\"\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/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks') do |req|
req.body = "{\n \"entity\": {\n \"accountRef\": {\n \"href\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"profileRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"webPropertyId\": \"\"\n },\n \"webPropertyRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n }\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"permissions\": {\n \"effective\": [],\n \"local\": []\n },\n \"selfLink\": \"\",\n \"userRef\": {\n \"email\": \"\",\n \"id\": \"\",\n \"kind\": \"\"\n }\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks";
let payload = json!({
"entity": json!({
"accountRef": json!({
"href": "",
"id": "",
"kind": "",
"name": ""
}),
"profileRef": json!({
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"webPropertyId": ""
}),
"webPropertyRef": json!({
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": ""
})
}),
"id": "",
"kind": "",
"permissions": json!({
"effective": (),
"local": ()
}),
"selfLink": "",
"userRef": json!({
"email": "",
"id": "",
"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}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks \
--header 'content-type: application/json' \
--data '{
"entity": {
"accountRef": {
"href": "",
"id": "",
"kind": "",
"name": ""
},
"profileRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"webPropertyId": ""
},
"webPropertyRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": ""
}
},
"id": "",
"kind": "",
"permissions": {
"effective": [],
"local": []
},
"selfLink": "",
"userRef": {
"email": "",
"id": "",
"kind": ""
}
}'
echo '{
"entity": {
"accountRef": {
"href": "",
"id": "",
"kind": "",
"name": ""
},
"profileRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"webPropertyId": ""
},
"webPropertyRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": ""
}
},
"id": "",
"kind": "",
"permissions": {
"effective": [],
"local": []
},
"selfLink": "",
"userRef": {
"email": "",
"id": "",
"kind": ""
}
}' | \
http POST {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "entity": {\n "accountRef": {\n "href": "",\n "id": "",\n "kind": "",\n "name": ""\n },\n "profileRef": {\n "accountId": "",\n "href": "",\n "id": "",\n "internalWebPropertyId": "",\n "kind": "",\n "name": "",\n "webPropertyId": ""\n },\n "webPropertyRef": {\n "accountId": "",\n "href": "",\n "id": "",\n "internalWebPropertyId": "",\n "kind": "",\n "name": ""\n }\n },\n "id": "",\n "kind": "",\n "permissions": {\n "effective": [],\n "local": []\n },\n "selfLink": "",\n "userRef": {\n "email": "",\n "id": "",\n "kind": ""\n }\n}' \
--output-document \
- {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"entity": [
"accountRef": [
"href": "",
"id": "",
"kind": "",
"name": ""
],
"profileRef": [
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"webPropertyId": ""
],
"webPropertyRef": [
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": ""
]
],
"id": "",
"kind": "",
"permissions": [
"effective": [],
"local": []
],
"selfLink": "",
"userRef": [
"email": "",
"id": "",
"kind": ""
]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks")! 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
analytics.management.webpropertyUserLinks.list
{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks
QUERY PARAMS
accountId
webPropertyId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks")
require "http/client"
url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks"
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}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks"
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/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks"))
.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}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks")
.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}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks';
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}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks',
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}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks');
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}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks';
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}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks"]
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}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks",
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}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks');
echo $response->getBody();
setUrl('{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks")
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/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks";
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}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks
http GET {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PUT
analytics.management.webpropertyUserLinks.update
{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks/:linkId
QUERY PARAMS
accountId
webPropertyId
linkId
BODY json
{
"entity": {
"accountRef": {
"href": "",
"id": "",
"kind": "",
"name": ""
},
"profileRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"webPropertyId": ""
},
"webPropertyRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": ""
}
},
"id": "",
"kind": "",
"permissions": {
"effective": [],
"local": []
},
"selfLink": "",
"userRef": {
"email": "",
"id": "",
"kind": ""
}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks/:linkId");
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 \"entity\": {\n \"accountRef\": {\n \"href\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"profileRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"webPropertyId\": \"\"\n },\n \"webPropertyRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n }\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"permissions\": {\n \"effective\": [],\n \"local\": []\n },\n \"selfLink\": \"\",\n \"userRef\": {\n \"email\": \"\",\n \"id\": \"\",\n \"kind\": \"\"\n }\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks/:linkId" {:content-type :json
:form-params {:entity {:accountRef {:href ""
:id ""
:kind ""
:name ""}
:profileRef {:accountId ""
:href ""
:id ""
:internalWebPropertyId ""
:kind ""
:name ""
:webPropertyId ""}
:webPropertyRef {:accountId ""
:href ""
:id ""
:internalWebPropertyId ""
:kind ""
:name ""}}
:id ""
:kind ""
:permissions {:effective []
:local []}
:selfLink ""
:userRef {:email ""
:id ""
:kind ""}}})
require "http/client"
url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks/:linkId"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"entity\": {\n \"accountRef\": {\n \"href\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"profileRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"webPropertyId\": \"\"\n },\n \"webPropertyRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n }\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"permissions\": {\n \"effective\": [],\n \"local\": []\n },\n \"selfLink\": \"\",\n \"userRef\": {\n \"email\": \"\",\n \"id\": \"\",\n \"kind\": \"\"\n }\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}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks/:linkId"),
Content = new StringContent("{\n \"entity\": {\n \"accountRef\": {\n \"href\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"profileRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"webPropertyId\": \"\"\n },\n \"webPropertyRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n }\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"permissions\": {\n \"effective\": [],\n \"local\": []\n },\n \"selfLink\": \"\",\n \"userRef\": {\n \"email\": \"\",\n \"id\": \"\",\n \"kind\": \"\"\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}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks/:linkId");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"entity\": {\n \"accountRef\": {\n \"href\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"profileRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"webPropertyId\": \"\"\n },\n \"webPropertyRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n }\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"permissions\": {\n \"effective\": [],\n \"local\": []\n },\n \"selfLink\": \"\",\n \"userRef\": {\n \"email\": \"\",\n \"id\": \"\",\n \"kind\": \"\"\n }\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks/:linkId"
payload := strings.NewReader("{\n \"entity\": {\n \"accountRef\": {\n \"href\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"profileRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"webPropertyId\": \"\"\n },\n \"webPropertyRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n }\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"permissions\": {\n \"effective\": [],\n \"local\": []\n },\n \"selfLink\": \"\",\n \"userRef\": {\n \"email\": \"\",\n \"id\": \"\",\n \"kind\": \"\"\n }\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/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks/:linkId HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 626
{
"entity": {
"accountRef": {
"href": "",
"id": "",
"kind": "",
"name": ""
},
"profileRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"webPropertyId": ""
},
"webPropertyRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": ""
}
},
"id": "",
"kind": "",
"permissions": {
"effective": [],
"local": []
},
"selfLink": "",
"userRef": {
"email": "",
"id": "",
"kind": ""
}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks/:linkId")
.setHeader("content-type", "application/json")
.setBody("{\n \"entity\": {\n \"accountRef\": {\n \"href\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"profileRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"webPropertyId\": \"\"\n },\n \"webPropertyRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n }\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"permissions\": {\n \"effective\": [],\n \"local\": []\n },\n \"selfLink\": \"\",\n \"userRef\": {\n \"email\": \"\",\n \"id\": \"\",\n \"kind\": \"\"\n }\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks/:linkId"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"entity\": {\n \"accountRef\": {\n \"href\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"profileRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"webPropertyId\": \"\"\n },\n \"webPropertyRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n }\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"permissions\": {\n \"effective\": [],\n \"local\": []\n },\n \"selfLink\": \"\",\n \"userRef\": {\n \"email\": \"\",\n \"id\": \"\",\n \"kind\": \"\"\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 \"entity\": {\n \"accountRef\": {\n \"href\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"profileRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"webPropertyId\": \"\"\n },\n \"webPropertyRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n }\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"permissions\": {\n \"effective\": [],\n \"local\": []\n },\n \"selfLink\": \"\",\n \"userRef\": {\n \"email\": \"\",\n \"id\": \"\",\n \"kind\": \"\"\n }\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks/:linkId")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks/:linkId")
.header("content-type", "application/json")
.body("{\n \"entity\": {\n \"accountRef\": {\n \"href\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"profileRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"webPropertyId\": \"\"\n },\n \"webPropertyRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n }\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"permissions\": {\n \"effective\": [],\n \"local\": []\n },\n \"selfLink\": \"\",\n \"userRef\": {\n \"email\": \"\",\n \"id\": \"\",\n \"kind\": \"\"\n }\n}")
.asString();
const data = JSON.stringify({
entity: {
accountRef: {
href: '',
id: '',
kind: '',
name: ''
},
profileRef: {
accountId: '',
href: '',
id: '',
internalWebPropertyId: '',
kind: '',
name: '',
webPropertyId: ''
},
webPropertyRef: {
accountId: '',
href: '',
id: '',
internalWebPropertyId: '',
kind: '',
name: ''
}
},
id: '',
kind: '',
permissions: {
effective: [],
local: []
},
selfLink: '',
userRef: {
email: '',
id: '',
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}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks/:linkId');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks/:linkId',
headers: {'content-type': 'application/json'},
data: {
entity: {
accountRef: {href: '', id: '', kind: '', name: ''},
profileRef: {
accountId: '',
href: '',
id: '',
internalWebPropertyId: '',
kind: '',
name: '',
webPropertyId: ''
},
webPropertyRef: {accountId: '', href: '', id: '', internalWebPropertyId: '', kind: '', name: ''}
},
id: '',
kind: '',
permissions: {effective: [], local: []},
selfLink: '',
userRef: {email: '', id: '', kind: ''}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks/:linkId';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"entity":{"accountRef":{"href":"","id":"","kind":"","name":""},"profileRef":{"accountId":"","href":"","id":"","internalWebPropertyId":"","kind":"","name":"","webPropertyId":""},"webPropertyRef":{"accountId":"","href":"","id":"","internalWebPropertyId":"","kind":"","name":""}},"id":"","kind":"","permissions":{"effective":[],"local":[]},"selfLink":"","userRef":{"email":"","id":"","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}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks/:linkId',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "entity": {\n "accountRef": {\n "href": "",\n "id": "",\n "kind": "",\n "name": ""\n },\n "profileRef": {\n "accountId": "",\n "href": "",\n "id": "",\n "internalWebPropertyId": "",\n "kind": "",\n "name": "",\n "webPropertyId": ""\n },\n "webPropertyRef": {\n "accountId": "",\n "href": "",\n "id": "",\n "internalWebPropertyId": "",\n "kind": "",\n "name": ""\n }\n },\n "id": "",\n "kind": "",\n "permissions": {\n "effective": [],\n "local": []\n },\n "selfLink": "",\n "userRef": {\n "email": "",\n "id": "",\n "kind": ""\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 \"entity\": {\n \"accountRef\": {\n \"href\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"profileRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"webPropertyId\": \"\"\n },\n \"webPropertyRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n }\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"permissions\": {\n \"effective\": [],\n \"local\": []\n },\n \"selfLink\": \"\",\n \"userRef\": {\n \"email\": \"\",\n \"id\": \"\",\n \"kind\": \"\"\n }\n}")
val request = Request.Builder()
.url("{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks/:linkId")
.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/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks/:linkId',
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({
entity: {
accountRef: {href: '', id: '', kind: '', name: ''},
profileRef: {
accountId: '',
href: '',
id: '',
internalWebPropertyId: '',
kind: '',
name: '',
webPropertyId: ''
},
webPropertyRef: {accountId: '', href: '', id: '', internalWebPropertyId: '', kind: '', name: ''}
},
id: '',
kind: '',
permissions: {effective: [], local: []},
selfLink: '',
userRef: {email: '', id: '', kind: ''}
}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks/:linkId',
headers: {'content-type': 'application/json'},
body: {
entity: {
accountRef: {href: '', id: '', kind: '', name: ''},
profileRef: {
accountId: '',
href: '',
id: '',
internalWebPropertyId: '',
kind: '',
name: '',
webPropertyId: ''
},
webPropertyRef: {accountId: '', href: '', id: '', internalWebPropertyId: '', kind: '', name: ''}
},
id: '',
kind: '',
permissions: {effective: [], local: []},
selfLink: '',
userRef: {email: '', id: '', 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}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks/:linkId');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
entity: {
accountRef: {
href: '',
id: '',
kind: '',
name: ''
},
profileRef: {
accountId: '',
href: '',
id: '',
internalWebPropertyId: '',
kind: '',
name: '',
webPropertyId: ''
},
webPropertyRef: {
accountId: '',
href: '',
id: '',
internalWebPropertyId: '',
kind: '',
name: ''
}
},
id: '',
kind: '',
permissions: {
effective: [],
local: []
},
selfLink: '',
userRef: {
email: '',
id: '',
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}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks/:linkId',
headers: {'content-type': 'application/json'},
data: {
entity: {
accountRef: {href: '', id: '', kind: '', name: ''},
profileRef: {
accountId: '',
href: '',
id: '',
internalWebPropertyId: '',
kind: '',
name: '',
webPropertyId: ''
},
webPropertyRef: {accountId: '', href: '', id: '', internalWebPropertyId: '', kind: '', name: ''}
},
id: '',
kind: '',
permissions: {effective: [], local: []},
selfLink: '',
userRef: {email: '', id: '', kind: ''}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks/:linkId';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"entity":{"accountRef":{"href":"","id":"","kind":"","name":""},"profileRef":{"accountId":"","href":"","id":"","internalWebPropertyId":"","kind":"","name":"","webPropertyId":""},"webPropertyRef":{"accountId":"","href":"","id":"","internalWebPropertyId":"","kind":"","name":""}},"id":"","kind":"","permissions":{"effective":[],"local":[]},"selfLink":"","userRef":{"email":"","id":"","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 = @{ @"entity": @{ @"accountRef": @{ @"href": @"", @"id": @"", @"kind": @"", @"name": @"" }, @"profileRef": @{ @"accountId": @"", @"href": @"", @"id": @"", @"internalWebPropertyId": @"", @"kind": @"", @"name": @"", @"webPropertyId": @"" }, @"webPropertyRef": @{ @"accountId": @"", @"href": @"", @"id": @"", @"internalWebPropertyId": @"", @"kind": @"", @"name": @"" } },
@"id": @"",
@"kind": @"",
@"permissions": @{ @"effective": @[ ], @"local": @[ ] },
@"selfLink": @"",
@"userRef": @{ @"email": @"", @"id": @"", @"kind": @"" } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks/:linkId"]
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}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks/:linkId" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"entity\": {\n \"accountRef\": {\n \"href\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"profileRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"webPropertyId\": \"\"\n },\n \"webPropertyRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n }\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"permissions\": {\n \"effective\": [],\n \"local\": []\n },\n \"selfLink\": \"\",\n \"userRef\": {\n \"email\": \"\",\n \"id\": \"\",\n \"kind\": \"\"\n }\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks/:linkId",
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([
'entity' => [
'accountRef' => [
'href' => '',
'id' => '',
'kind' => '',
'name' => ''
],
'profileRef' => [
'accountId' => '',
'href' => '',
'id' => '',
'internalWebPropertyId' => '',
'kind' => '',
'name' => '',
'webPropertyId' => ''
],
'webPropertyRef' => [
'accountId' => '',
'href' => '',
'id' => '',
'internalWebPropertyId' => '',
'kind' => '',
'name' => ''
]
],
'id' => '',
'kind' => '',
'permissions' => [
'effective' => [
],
'local' => [
]
],
'selfLink' => '',
'userRef' => [
'email' => '',
'id' => '',
'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}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks/:linkId', [
'body' => '{
"entity": {
"accountRef": {
"href": "",
"id": "",
"kind": "",
"name": ""
},
"profileRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"webPropertyId": ""
},
"webPropertyRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": ""
}
},
"id": "",
"kind": "",
"permissions": {
"effective": [],
"local": []
},
"selfLink": "",
"userRef": {
"email": "",
"id": "",
"kind": ""
}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks/:linkId');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'entity' => [
'accountRef' => [
'href' => '',
'id' => '',
'kind' => '',
'name' => ''
],
'profileRef' => [
'accountId' => '',
'href' => '',
'id' => '',
'internalWebPropertyId' => '',
'kind' => '',
'name' => '',
'webPropertyId' => ''
],
'webPropertyRef' => [
'accountId' => '',
'href' => '',
'id' => '',
'internalWebPropertyId' => '',
'kind' => '',
'name' => ''
]
],
'id' => '',
'kind' => '',
'permissions' => [
'effective' => [
],
'local' => [
]
],
'selfLink' => '',
'userRef' => [
'email' => '',
'id' => '',
'kind' => ''
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'entity' => [
'accountRef' => [
'href' => '',
'id' => '',
'kind' => '',
'name' => ''
],
'profileRef' => [
'accountId' => '',
'href' => '',
'id' => '',
'internalWebPropertyId' => '',
'kind' => '',
'name' => '',
'webPropertyId' => ''
],
'webPropertyRef' => [
'accountId' => '',
'href' => '',
'id' => '',
'internalWebPropertyId' => '',
'kind' => '',
'name' => ''
]
],
'id' => '',
'kind' => '',
'permissions' => [
'effective' => [
],
'local' => [
]
],
'selfLink' => '',
'userRef' => [
'email' => '',
'id' => '',
'kind' => ''
]
]));
$request->setRequestUrl('{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks/:linkId');
$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}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks/:linkId' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"entity": {
"accountRef": {
"href": "",
"id": "",
"kind": "",
"name": ""
},
"profileRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"webPropertyId": ""
},
"webPropertyRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": ""
}
},
"id": "",
"kind": "",
"permissions": {
"effective": [],
"local": []
},
"selfLink": "",
"userRef": {
"email": "",
"id": "",
"kind": ""
}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks/:linkId' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"entity": {
"accountRef": {
"href": "",
"id": "",
"kind": "",
"name": ""
},
"profileRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"webPropertyId": ""
},
"webPropertyRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": ""
}
},
"id": "",
"kind": "",
"permissions": {
"effective": [],
"local": []
},
"selfLink": "",
"userRef": {
"email": "",
"id": "",
"kind": ""
}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"entity\": {\n \"accountRef\": {\n \"href\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"profileRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"webPropertyId\": \"\"\n },\n \"webPropertyRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n }\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"permissions\": {\n \"effective\": [],\n \"local\": []\n },\n \"selfLink\": \"\",\n \"userRef\": {\n \"email\": \"\",\n \"id\": \"\",\n \"kind\": \"\"\n }\n}"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks/:linkId", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks/:linkId"
payload = {
"entity": {
"accountRef": {
"href": "",
"id": "",
"kind": "",
"name": ""
},
"profileRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"webPropertyId": ""
},
"webPropertyRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": ""
}
},
"id": "",
"kind": "",
"permissions": {
"effective": [],
"local": []
},
"selfLink": "",
"userRef": {
"email": "",
"id": "",
"kind": ""
}
}
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks/:linkId"
payload <- "{\n \"entity\": {\n \"accountRef\": {\n \"href\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"profileRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"webPropertyId\": \"\"\n },\n \"webPropertyRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n }\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"permissions\": {\n \"effective\": [],\n \"local\": []\n },\n \"selfLink\": \"\",\n \"userRef\": {\n \"email\": \"\",\n \"id\": \"\",\n \"kind\": \"\"\n }\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}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks/:linkId")
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 \"entity\": {\n \"accountRef\": {\n \"href\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"profileRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"webPropertyId\": \"\"\n },\n \"webPropertyRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n }\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"permissions\": {\n \"effective\": [],\n \"local\": []\n },\n \"selfLink\": \"\",\n \"userRef\": {\n \"email\": \"\",\n \"id\": \"\",\n \"kind\": \"\"\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.put('/baseUrl/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks/:linkId') do |req|
req.body = "{\n \"entity\": {\n \"accountRef\": {\n \"href\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"profileRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"webPropertyId\": \"\"\n },\n \"webPropertyRef\": {\n \"accountId\": \"\",\n \"href\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\"\n }\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"permissions\": {\n \"effective\": [],\n \"local\": []\n },\n \"selfLink\": \"\",\n \"userRef\": {\n \"email\": \"\",\n \"id\": \"\",\n \"kind\": \"\"\n }\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}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks/:linkId";
let payload = json!({
"entity": json!({
"accountRef": json!({
"href": "",
"id": "",
"kind": "",
"name": ""
}),
"profileRef": json!({
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"webPropertyId": ""
}),
"webPropertyRef": json!({
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": ""
})
}),
"id": "",
"kind": "",
"permissions": json!({
"effective": (),
"local": ()
}),
"selfLink": "",
"userRef": json!({
"email": "",
"id": "",
"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}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks/:linkId \
--header 'content-type: application/json' \
--data '{
"entity": {
"accountRef": {
"href": "",
"id": "",
"kind": "",
"name": ""
},
"profileRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"webPropertyId": ""
},
"webPropertyRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": ""
}
},
"id": "",
"kind": "",
"permissions": {
"effective": [],
"local": []
},
"selfLink": "",
"userRef": {
"email": "",
"id": "",
"kind": ""
}
}'
echo '{
"entity": {
"accountRef": {
"href": "",
"id": "",
"kind": "",
"name": ""
},
"profileRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"webPropertyId": ""
},
"webPropertyRef": {
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": ""
}
},
"id": "",
"kind": "",
"permissions": {
"effective": [],
"local": []
},
"selfLink": "",
"userRef": {
"email": "",
"id": "",
"kind": ""
}
}' | \
http PUT {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks/:linkId \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '{\n "entity": {\n "accountRef": {\n "href": "",\n "id": "",\n "kind": "",\n "name": ""\n },\n "profileRef": {\n "accountId": "",\n "href": "",\n "id": "",\n "internalWebPropertyId": "",\n "kind": "",\n "name": "",\n "webPropertyId": ""\n },\n "webPropertyRef": {\n "accountId": "",\n "href": "",\n "id": "",\n "internalWebPropertyId": "",\n "kind": "",\n "name": ""\n }\n },\n "id": "",\n "kind": "",\n "permissions": {\n "effective": [],\n "local": []\n },\n "selfLink": "",\n "userRef": {\n "email": "",\n "id": "",\n "kind": ""\n }\n}' \
--output-document \
- {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks/:linkId
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"entity": [
"accountRef": [
"href": "",
"id": "",
"kind": "",
"name": ""
],
"profileRef": [
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"webPropertyId": ""
],
"webPropertyRef": [
"accountId": "",
"href": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": ""
]
],
"id": "",
"kind": "",
"permissions": [
"effective": [],
"local": []
],
"selfLink": "",
"userRef": [
"email": "",
"id": "",
"kind": ""
]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/entityUserLinks/:linkId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
analytics.metadata.columns.list
{{baseUrl}}/metadata/:reportType/columns
QUERY PARAMS
reportType
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/metadata/:reportType/columns");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/metadata/:reportType/columns")
require "http/client"
url = "{{baseUrl}}/metadata/:reportType/columns"
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}}/metadata/:reportType/columns"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/metadata/:reportType/columns");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/metadata/:reportType/columns"
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/metadata/:reportType/columns HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/metadata/:reportType/columns")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/metadata/:reportType/columns"))
.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}}/metadata/:reportType/columns")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/metadata/:reportType/columns")
.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}}/metadata/:reportType/columns');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/metadata/:reportType/columns'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/metadata/:reportType/columns';
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}}/metadata/:reportType/columns',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/metadata/:reportType/columns")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/metadata/:reportType/columns',
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}}/metadata/:reportType/columns'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/metadata/:reportType/columns');
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}}/metadata/:reportType/columns'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/metadata/:reportType/columns';
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}}/metadata/:reportType/columns"]
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}}/metadata/:reportType/columns" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/metadata/:reportType/columns",
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}}/metadata/:reportType/columns');
echo $response->getBody();
setUrl('{{baseUrl}}/metadata/:reportType/columns');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/metadata/:reportType/columns');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/metadata/:reportType/columns' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/metadata/:reportType/columns' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/metadata/:reportType/columns")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/metadata/:reportType/columns"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/metadata/:reportType/columns"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/metadata/:reportType/columns")
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/metadata/:reportType/columns') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/metadata/:reportType/columns";
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}}/metadata/:reportType/columns
http GET {{baseUrl}}/metadata/:reportType/columns
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/metadata/:reportType/columns
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/metadata/:reportType/columns")! 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
analytics.provisioning.createAccountTicket
{{baseUrl}}/provisioning/createAccountTicket
BODY json
{
"account": {
"childLink": {
"href": "",
"type": ""
},
"created": "",
"id": "",
"kind": "",
"name": "",
"permissions": {
"effective": []
},
"selfLink": "",
"starred": false,
"updated": ""
},
"id": "",
"kind": "",
"profile": {
"accountId": "",
"botFilteringEnabled": false,
"childLink": {
"href": "",
"type": ""
},
"created": "",
"currency": "",
"defaultPage": "",
"eCommerceTracking": false,
"enhancedECommerceTracking": false,
"excludeQueryParameters": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"permissions": {
"effective": []
},
"selfLink": "",
"siteSearchCategoryParameters": "",
"siteSearchQueryParameters": "",
"starred": false,
"stripSiteSearchCategoryParameters": false,
"stripSiteSearchQueryParameters": false,
"timezone": "",
"type": "",
"updated": "",
"webPropertyId": "",
"websiteUrl": ""
},
"redirectUri": "",
"webproperty": {
"accountId": "",
"childLink": {
"href": "",
"type": ""
},
"created": "",
"dataRetentionResetOnNewActivity": false,
"dataRetentionTtl": "",
"defaultProfileId": "",
"id": "",
"industryVertical": "",
"internalWebPropertyId": "",
"kind": "",
"level": "",
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"permissions": {
"effective": []
},
"profileCount": 0,
"selfLink": "",
"starred": false,
"updated": "",
"websiteUrl": ""
}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/provisioning/createAccountTicket");
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 \"account\": {\n \"childLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"created\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"permissions\": {\n \"effective\": []\n },\n \"selfLink\": \"\",\n \"starred\": false,\n \"updated\": \"\"\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"profile\": {\n \"accountId\": \"\",\n \"botFilteringEnabled\": false,\n \"childLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"created\": \"\",\n \"currency\": \"\",\n \"defaultPage\": \"\",\n \"eCommerceTracking\": false,\n \"enhancedECommerceTracking\": false,\n \"excludeQueryParameters\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"permissions\": {\n \"effective\": []\n },\n \"selfLink\": \"\",\n \"siteSearchCategoryParameters\": \"\",\n \"siteSearchQueryParameters\": \"\",\n \"starred\": false,\n \"stripSiteSearchCategoryParameters\": false,\n \"stripSiteSearchQueryParameters\": false,\n \"timezone\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\",\n \"websiteUrl\": \"\"\n },\n \"redirectUri\": \"\",\n \"webproperty\": {\n \"accountId\": \"\",\n \"childLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"created\": \"\",\n \"dataRetentionResetOnNewActivity\": false,\n \"dataRetentionTtl\": \"\",\n \"defaultProfileId\": \"\",\n \"id\": \"\",\n \"industryVertical\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"level\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"permissions\": {\n \"effective\": []\n },\n \"profileCount\": 0,\n \"selfLink\": \"\",\n \"starred\": false,\n \"updated\": \"\",\n \"websiteUrl\": \"\"\n }\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/provisioning/createAccountTicket" {:content-type :json
:form-params {:account {:childLink {:href ""
:type ""}
:created ""
:id ""
:kind ""
:name ""
:permissions {:effective []}
:selfLink ""
:starred false
:updated ""}
:id ""
:kind ""
:profile {:accountId ""
:botFilteringEnabled false
:childLink {:href ""
:type ""}
:created ""
:currency ""
:defaultPage ""
:eCommerceTracking false
:enhancedECommerceTracking false
:excludeQueryParameters ""
:id ""
:internalWebPropertyId ""
:kind ""
:name ""
:parentLink {:href ""
:type ""}
:permissions {:effective []}
:selfLink ""
:siteSearchCategoryParameters ""
:siteSearchQueryParameters ""
:starred false
:stripSiteSearchCategoryParameters false
:stripSiteSearchQueryParameters false
:timezone ""
:type ""
:updated ""
:webPropertyId ""
:websiteUrl ""}
:redirectUri ""
:webproperty {:accountId ""
:childLink {:href ""
:type ""}
:created ""
:dataRetentionResetOnNewActivity false
:dataRetentionTtl ""
:defaultProfileId ""
:id ""
:industryVertical ""
:internalWebPropertyId ""
:kind ""
:level ""
:name ""
:parentLink {:href ""
:type ""}
:permissions {:effective []}
:profileCount 0
:selfLink ""
:starred false
:updated ""
:websiteUrl ""}}})
require "http/client"
url = "{{baseUrl}}/provisioning/createAccountTicket"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"account\": {\n \"childLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"created\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"permissions\": {\n \"effective\": []\n },\n \"selfLink\": \"\",\n \"starred\": false,\n \"updated\": \"\"\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"profile\": {\n \"accountId\": \"\",\n \"botFilteringEnabled\": false,\n \"childLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"created\": \"\",\n \"currency\": \"\",\n \"defaultPage\": \"\",\n \"eCommerceTracking\": false,\n \"enhancedECommerceTracking\": false,\n \"excludeQueryParameters\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"permissions\": {\n \"effective\": []\n },\n \"selfLink\": \"\",\n \"siteSearchCategoryParameters\": \"\",\n \"siteSearchQueryParameters\": \"\",\n \"starred\": false,\n \"stripSiteSearchCategoryParameters\": false,\n \"stripSiteSearchQueryParameters\": false,\n \"timezone\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\",\n \"websiteUrl\": \"\"\n },\n \"redirectUri\": \"\",\n \"webproperty\": {\n \"accountId\": \"\",\n \"childLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"created\": \"\",\n \"dataRetentionResetOnNewActivity\": false,\n \"dataRetentionTtl\": \"\",\n \"defaultProfileId\": \"\",\n \"id\": \"\",\n \"industryVertical\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"level\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"permissions\": {\n \"effective\": []\n },\n \"profileCount\": 0,\n \"selfLink\": \"\",\n \"starred\": false,\n \"updated\": \"\",\n \"websiteUrl\": \"\"\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}}/provisioning/createAccountTicket"),
Content = new StringContent("{\n \"account\": {\n \"childLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"created\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"permissions\": {\n \"effective\": []\n },\n \"selfLink\": \"\",\n \"starred\": false,\n \"updated\": \"\"\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"profile\": {\n \"accountId\": \"\",\n \"botFilteringEnabled\": false,\n \"childLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"created\": \"\",\n \"currency\": \"\",\n \"defaultPage\": \"\",\n \"eCommerceTracking\": false,\n \"enhancedECommerceTracking\": false,\n \"excludeQueryParameters\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"permissions\": {\n \"effective\": []\n },\n \"selfLink\": \"\",\n \"siteSearchCategoryParameters\": \"\",\n \"siteSearchQueryParameters\": \"\",\n \"starred\": false,\n \"stripSiteSearchCategoryParameters\": false,\n \"stripSiteSearchQueryParameters\": false,\n \"timezone\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\",\n \"websiteUrl\": \"\"\n },\n \"redirectUri\": \"\",\n \"webproperty\": {\n \"accountId\": \"\",\n \"childLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"created\": \"\",\n \"dataRetentionResetOnNewActivity\": false,\n \"dataRetentionTtl\": \"\",\n \"defaultProfileId\": \"\",\n \"id\": \"\",\n \"industryVertical\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"level\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"permissions\": {\n \"effective\": []\n },\n \"profileCount\": 0,\n \"selfLink\": \"\",\n \"starred\": false,\n \"updated\": \"\",\n \"websiteUrl\": \"\"\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}}/provisioning/createAccountTicket");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"account\": {\n \"childLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"created\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"permissions\": {\n \"effective\": []\n },\n \"selfLink\": \"\",\n \"starred\": false,\n \"updated\": \"\"\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"profile\": {\n \"accountId\": \"\",\n \"botFilteringEnabled\": false,\n \"childLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"created\": \"\",\n \"currency\": \"\",\n \"defaultPage\": \"\",\n \"eCommerceTracking\": false,\n \"enhancedECommerceTracking\": false,\n \"excludeQueryParameters\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"permissions\": {\n \"effective\": []\n },\n \"selfLink\": \"\",\n \"siteSearchCategoryParameters\": \"\",\n \"siteSearchQueryParameters\": \"\",\n \"starred\": false,\n \"stripSiteSearchCategoryParameters\": false,\n \"stripSiteSearchQueryParameters\": false,\n \"timezone\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\",\n \"websiteUrl\": \"\"\n },\n \"redirectUri\": \"\",\n \"webproperty\": {\n \"accountId\": \"\",\n \"childLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"created\": \"\",\n \"dataRetentionResetOnNewActivity\": false,\n \"dataRetentionTtl\": \"\",\n \"defaultProfileId\": \"\",\n \"id\": \"\",\n \"industryVertical\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"level\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"permissions\": {\n \"effective\": []\n },\n \"profileCount\": 0,\n \"selfLink\": \"\",\n \"starred\": false,\n \"updated\": \"\",\n \"websiteUrl\": \"\"\n }\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/provisioning/createAccountTicket"
payload := strings.NewReader("{\n \"account\": {\n \"childLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"created\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"permissions\": {\n \"effective\": []\n },\n \"selfLink\": \"\",\n \"starred\": false,\n \"updated\": \"\"\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"profile\": {\n \"accountId\": \"\",\n \"botFilteringEnabled\": false,\n \"childLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"created\": \"\",\n \"currency\": \"\",\n \"defaultPage\": \"\",\n \"eCommerceTracking\": false,\n \"enhancedECommerceTracking\": false,\n \"excludeQueryParameters\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"permissions\": {\n \"effective\": []\n },\n \"selfLink\": \"\",\n \"siteSearchCategoryParameters\": \"\",\n \"siteSearchQueryParameters\": \"\",\n \"starred\": false,\n \"stripSiteSearchCategoryParameters\": false,\n \"stripSiteSearchQueryParameters\": false,\n \"timezone\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\",\n \"websiteUrl\": \"\"\n },\n \"redirectUri\": \"\",\n \"webproperty\": {\n \"accountId\": \"\",\n \"childLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"created\": \"\",\n \"dataRetentionResetOnNewActivity\": false,\n \"dataRetentionTtl\": \"\",\n \"defaultProfileId\": \"\",\n \"id\": \"\",\n \"industryVertical\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"level\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"permissions\": {\n \"effective\": []\n },\n \"profileCount\": 0,\n \"selfLink\": \"\",\n \"starred\": false,\n \"updated\": \"\",\n \"websiteUrl\": \"\"\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/provisioning/createAccountTicket HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 1681
{
"account": {
"childLink": {
"href": "",
"type": ""
},
"created": "",
"id": "",
"kind": "",
"name": "",
"permissions": {
"effective": []
},
"selfLink": "",
"starred": false,
"updated": ""
},
"id": "",
"kind": "",
"profile": {
"accountId": "",
"botFilteringEnabled": false,
"childLink": {
"href": "",
"type": ""
},
"created": "",
"currency": "",
"defaultPage": "",
"eCommerceTracking": false,
"enhancedECommerceTracking": false,
"excludeQueryParameters": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"permissions": {
"effective": []
},
"selfLink": "",
"siteSearchCategoryParameters": "",
"siteSearchQueryParameters": "",
"starred": false,
"stripSiteSearchCategoryParameters": false,
"stripSiteSearchQueryParameters": false,
"timezone": "",
"type": "",
"updated": "",
"webPropertyId": "",
"websiteUrl": ""
},
"redirectUri": "",
"webproperty": {
"accountId": "",
"childLink": {
"href": "",
"type": ""
},
"created": "",
"dataRetentionResetOnNewActivity": false,
"dataRetentionTtl": "",
"defaultProfileId": "",
"id": "",
"industryVertical": "",
"internalWebPropertyId": "",
"kind": "",
"level": "",
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"permissions": {
"effective": []
},
"profileCount": 0,
"selfLink": "",
"starred": false,
"updated": "",
"websiteUrl": ""
}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/provisioning/createAccountTicket")
.setHeader("content-type", "application/json")
.setBody("{\n \"account\": {\n \"childLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"created\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"permissions\": {\n \"effective\": []\n },\n \"selfLink\": \"\",\n \"starred\": false,\n \"updated\": \"\"\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"profile\": {\n \"accountId\": \"\",\n \"botFilteringEnabled\": false,\n \"childLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"created\": \"\",\n \"currency\": \"\",\n \"defaultPage\": \"\",\n \"eCommerceTracking\": false,\n \"enhancedECommerceTracking\": false,\n \"excludeQueryParameters\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"permissions\": {\n \"effective\": []\n },\n \"selfLink\": \"\",\n \"siteSearchCategoryParameters\": \"\",\n \"siteSearchQueryParameters\": \"\",\n \"starred\": false,\n \"stripSiteSearchCategoryParameters\": false,\n \"stripSiteSearchQueryParameters\": false,\n \"timezone\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\",\n \"websiteUrl\": \"\"\n },\n \"redirectUri\": \"\",\n \"webproperty\": {\n \"accountId\": \"\",\n \"childLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"created\": \"\",\n \"dataRetentionResetOnNewActivity\": false,\n \"dataRetentionTtl\": \"\",\n \"defaultProfileId\": \"\",\n \"id\": \"\",\n \"industryVertical\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"level\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"permissions\": {\n \"effective\": []\n },\n \"profileCount\": 0,\n \"selfLink\": \"\",\n \"starred\": false,\n \"updated\": \"\",\n \"websiteUrl\": \"\"\n }\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/provisioning/createAccountTicket"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"account\": {\n \"childLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"created\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"permissions\": {\n \"effective\": []\n },\n \"selfLink\": \"\",\n \"starred\": false,\n \"updated\": \"\"\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"profile\": {\n \"accountId\": \"\",\n \"botFilteringEnabled\": false,\n \"childLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"created\": \"\",\n \"currency\": \"\",\n \"defaultPage\": \"\",\n \"eCommerceTracking\": false,\n \"enhancedECommerceTracking\": false,\n \"excludeQueryParameters\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"permissions\": {\n \"effective\": []\n },\n \"selfLink\": \"\",\n \"siteSearchCategoryParameters\": \"\",\n \"siteSearchQueryParameters\": \"\",\n \"starred\": false,\n \"stripSiteSearchCategoryParameters\": false,\n \"stripSiteSearchQueryParameters\": false,\n \"timezone\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\",\n \"websiteUrl\": \"\"\n },\n \"redirectUri\": \"\",\n \"webproperty\": {\n \"accountId\": \"\",\n \"childLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"created\": \"\",\n \"dataRetentionResetOnNewActivity\": false,\n \"dataRetentionTtl\": \"\",\n \"defaultProfileId\": \"\",\n \"id\": \"\",\n \"industryVertical\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"level\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"permissions\": {\n \"effective\": []\n },\n \"profileCount\": 0,\n \"selfLink\": \"\",\n \"starred\": false,\n \"updated\": \"\",\n \"websiteUrl\": \"\"\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 \"account\": {\n \"childLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"created\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"permissions\": {\n \"effective\": []\n },\n \"selfLink\": \"\",\n \"starred\": false,\n \"updated\": \"\"\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"profile\": {\n \"accountId\": \"\",\n \"botFilteringEnabled\": false,\n \"childLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"created\": \"\",\n \"currency\": \"\",\n \"defaultPage\": \"\",\n \"eCommerceTracking\": false,\n \"enhancedECommerceTracking\": false,\n \"excludeQueryParameters\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"permissions\": {\n \"effective\": []\n },\n \"selfLink\": \"\",\n \"siteSearchCategoryParameters\": \"\",\n \"siteSearchQueryParameters\": \"\",\n \"starred\": false,\n \"stripSiteSearchCategoryParameters\": false,\n \"stripSiteSearchQueryParameters\": false,\n \"timezone\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\",\n \"websiteUrl\": \"\"\n },\n \"redirectUri\": \"\",\n \"webproperty\": {\n \"accountId\": \"\",\n \"childLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"created\": \"\",\n \"dataRetentionResetOnNewActivity\": false,\n \"dataRetentionTtl\": \"\",\n \"defaultProfileId\": \"\",\n \"id\": \"\",\n \"industryVertical\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"level\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"permissions\": {\n \"effective\": []\n },\n \"profileCount\": 0,\n \"selfLink\": \"\",\n \"starred\": false,\n \"updated\": \"\",\n \"websiteUrl\": \"\"\n }\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/provisioning/createAccountTicket")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/provisioning/createAccountTicket")
.header("content-type", "application/json")
.body("{\n \"account\": {\n \"childLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"created\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"permissions\": {\n \"effective\": []\n },\n \"selfLink\": \"\",\n \"starred\": false,\n \"updated\": \"\"\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"profile\": {\n \"accountId\": \"\",\n \"botFilteringEnabled\": false,\n \"childLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"created\": \"\",\n \"currency\": \"\",\n \"defaultPage\": \"\",\n \"eCommerceTracking\": false,\n \"enhancedECommerceTracking\": false,\n \"excludeQueryParameters\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"permissions\": {\n \"effective\": []\n },\n \"selfLink\": \"\",\n \"siteSearchCategoryParameters\": \"\",\n \"siteSearchQueryParameters\": \"\",\n \"starred\": false,\n \"stripSiteSearchCategoryParameters\": false,\n \"stripSiteSearchQueryParameters\": false,\n \"timezone\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\",\n \"websiteUrl\": \"\"\n },\n \"redirectUri\": \"\",\n \"webproperty\": {\n \"accountId\": \"\",\n \"childLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"created\": \"\",\n \"dataRetentionResetOnNewActivity\": false,\n \"dataRetentionTtl\": \"\",\n \"defaultProfileId\": \"\",\n \"id\": \"\",\n \"industryVertical\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"level\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"permissions\": {\n \"effective\": []\n },\n \"profileCount\": 0,\n \"selfLink\": \"\",\n \"starred\": false,\n \"updated\": \"\",\n \"websiteUrl\": \"\"\n }\n}")
.asString();
const data = JSON.stringify({
account: {
childLink: {
href: '',
type: ''
},
created: '',
id: '',
kind: '',
name: '',
permissions: {
effective: []
},
selfLink: '',
starred: false,
updated: ''
},
id: '',
kind: '',
profile: {
accountId: '',
botFilteringEnabled: false,
childLink: {
href: '',
type: ''
},
created: '',
currency: '',
defaultPage: '',
eCommerceTracking: false,
enhancedECommerceTracking: false,
excludeQueryParameters: '',
id: '',
internalWebPropertyId: '',
kind: '',
name: '',
parentLink: {
href: '',
type: ''
},
permissions: {
effective: []
},
selfLink: '',
siteSearchCategoryParameters: '',
siteSearchQueryParameters: '',
starred: false,
stripSiteSearchCategoryParameters: false,
stripSiteSearchQueryParameters: false,
timezone: '',
type: '',
updated: '',
webPropertyId: '',
websiteUrl: ''
},
redirectUri: '',
webproperty: {
accountId: '',
childLink: {
href: '',
type: ''
},
created: '',
dataRetentionResetOnNewActivity: false,
dataRetentionTtl: '',
defaultProfileId: '',
id: '',
industryVertical: '',
internalWebPropertyId: '',
kind: '',
level: '',
name: '',
parentLink: {
href: '',
type: ''
},
permissions: {
effective: []
},
profileCount: 0,
selfLink: '',
starred: false,
updated: '',
websiteUrl: ''
}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/provisioning/createAccountTicket');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/provisioning/createAccountTicket',
headers: {'content-type': 'application/json'},
data: {
account: {
childLink: {href: '', type: ''},
created: '',
id: '',
kind: '',
name: '',
permissions: {effective: []},
selfLink: '',
starred: false,
updated: ''
},
id: '',
kind: '',
profile: {
accountId: '',
botFilteringEnabled: false,
childLink: {href: '', type: ''},
created: '',
currency: '',
defaultPage: '',
eCommerceTracking: false,
enhancedECommerceTracking: false,
excludeQueryParameters: '',
id: '',
internalWebPropertyId: '',
kind: '',
name: '',
parentLink: {href: '', type: ''},
permissions: {effective: []},
selfLink: '',
siteSearchCategoryParameters: '',
siteSearchQueryParameters: '',
starred: false,
stripSiteSearchCategoryParameters: false,
stripSiteSearchQueryParameters: false,
timezone: '',
type: '',
updated: '',
webPropertyId: '',
websiteUrl: ''
},
redirectUri: '',
webproperty: {
accountId: '',
childLink: {href: '', type: ''},
created: '',
dataRetentionResetOnNewActivity: false,
dataRetentionTtl: '',
defaultProfileId: '',
id: '',
industryVertical: '',
internalWebPropertyId: '',
kind: '',
level: '',
name: '',
parentLink: {href: '', type: ''},
permissions: {effective: []},
profileCount: 0,
selfLink: '',
starred: false,
updated: '',
websiteUrl: ''
}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/provisioning/createAccountTicket';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"account":{"childLink":{"href":"","type":""},"created":"","id":"","kind":"","name":"","permissions":{"effective":[]},"selfLink":"","starred":false,"updated":""},"id":"","kind":"","profile":{"accountId":"","botFilteringEnabled":false,"childLink":{"href":"","type":""},"created":"","currency":"","defaultPage":"","eCommerceTracking":false,"enhancedECommerceTracking":false,"excludeQueryParameters":"","id":"","internalWebPropertyId":"","kind":"","name":"","parentLink":{"href":"","type":""},"permissions":{"effective":[]},"selfLink":"","siteSearchCategoryParameters":"","siteSearchQueryParameters":"","starred":false,"stripSiteSearchCategoryParameters":false,"stripSiteSearchQueryParameters":false,"timezone":"","type":"","updated":"","webPropertyId":"","websiteUrl":""},"redirectUri":"","webproperty":{"accountId":"","childLink":{"href":"","type":""},"created":"","dataRetentionResetOnNewActivity":false,"dataRetentionTtl":"","defaultProfileId":"","id":"","industryVertical":"","internalWebPropertyId":"","kind":"","level":"","name":"","parentLink":{"href":"","type":""},"permissions":{"effective":[]},"profileCount":0,"selfLink":"","starred":false,"updated":"","websiteUrl":""}}'
};
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}}/provisioning/createAccountTicket',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "account": {\n "childLink": {\n "href": "",\n "type": ""\n },\n "created": "",\n "id": "",\n "kind": "",\n "name": "",\n "permissions": {\n "effective": []\n },\n "selfLink": "",\n "starred": false,\n "updated": ""\n },\n "id": "",\n "kind": "",\n "profile": {\n "accountId": "",\n "botFilteringEnabled": false,\n "childLink": {\n "href": "",\n "type": ""\n },\n "created": "",\n "currency": "",\n "defaultPage": "",\n "eCommerceTracking": false,\n "enhancedECommerceTracking": false,\n "excludeQueryParameters": "",\n "id": "",\n "internalWebPropertyId": "",\n "kind": "",\n "name": "",\n "parentLink": {\n "href": "",\n "type": ""\n },\n "permissions": {\n "effective": []\n },\n "selfLink": "",\n "siteSearchCategoryParameters": "",\n "siteSearchQueryParameters": "",\n "starred": false,\n "stripSiteSearchCategoryParameters": false,\n "stripSiteSearchQueryParameters": false,\n "timezone": "",\n "type": "",\n "updated": "",\n "webPropertyId": "",\n "websiteUrl": ""\n },\n "redirectUri": "",\n "webproperty": {\n "accountId": "",\n "childLink": {\n "href": "",\n "type": ""\n },\n "created": "",\n "dataRetentionResetOnNewActivity": false,\n "dataRetentionTtl": "",\n "defaultProfileId": "",\n "id": "",\n "industryVertical": "",\n "internalWebPropertyId": "",\n "kind": "",\n "level": "",\n "name": "",\n "parentLink": {\n "href": "",\n "type": ""\n },\n "permissions": {\n "effective": []\n },\n "profileCount": 0,\n "selfLink": "",\n "starred": false,\n "updated": "",\n "websiteUrl": ""\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 \"account\": {\n \"childLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"created\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"permissions\": {\n \"effective\": []\n },\n \"selfLink\": \"\",\n \"starred\": false,\n \"updated\": \"\"\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"profile\": {\n \"accountId\": \"\",\n \"botFilteringEnabled\": false,\n \"childLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"created\": \"\",\n \"currency\": \"\",\n \"defaultPage\": \"\",\n \"eCommerceTracking\": false,\n \"enhancedECommerceTracking\": false,\n \"excludeQueryParameters\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"permissions\": {\n \"effective\": []\n },\n \"selfLink\": \"\",\n \"siteSearchCategoryParameters\": \"\",\n \"siteSearchQueryParameters\": \"\",\n \"starred\": false,\n \"stripSiteSearchCategoryParameters\": false,\n \"stripSiteSearchQueryParameters\": false,\n \"timezone\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\",\n \"websiteUrl\": \"\"\n },\n \"redirectUri\": \"\",\n \"webproperty\": {\n \"accountId\": \"\",\n \"childLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"created\": \"\",\n \"dataRetentionResetOnNewActivity\": false,\n \"dataRetentionTtl\": \"\",\n \"defaultProfileId\": \"\",\n \"id\": \"\",\n \"industryVertical\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"level\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"permissions\": {\n \"effective\": []\n },\n \"profileCount\": 0,\n \"selfLink\": \"\",\n \"starred\": false,\n \"updated\": \"\",\n \"websiteUrl\": \"\"\n }\n}")
val request = Request.Builder()
.url("{{baseUrl}}/provisioning/createAccountTicket")
.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/provisioning/createAccountTicket',
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({
account: {
childLink: {href: '', type: ''},
created: '',
id: '',
kind: '',
name: '',
permissions: {effective: []},
selfLink: '',
starred: false,
updated: ''
},
id: '',
kind: '',
profile: {
accountId: '',
botFilteringEnabled: false,
childLink: {href: '', type: ''},
created: '',
currency: '',
defaultPage: '',
eCommerceTracking: false,
enhancedECommerceTracking: false,
excludeQueryParameters: '',
id: '',
internalWebPropertyId: '',
kind: '',
name: '',
parentLink: {href: '', type: ''},
permissions: {effective: []},
selfLink: '',
siteSearchCategoryParameters: '',
siteSearchQueryParameters: '',
starred: false,
stripSiteSearchCategoryParameters: false,
stripSiteSearchQueryParameters: false,
timezone: '',
type: '',
updated: '',
webPropertyId: '',
websiteUrl: ''
},
redirectUri: '',
webproperty: {
accountId: '',
childLink: {href: '', type: ''},
created: '',
dataRetentionResetOnNewActivity: false,
dataRetentionTtl: '',
defaultProfileId: '',
id: '',
industryVertical: '',
internalWebPropertyId: '',
kind: '',
level: '',
name: '',
parentLink: {href: '', type: ''},
permissions: {effective: []},
profileCount: 0,
selfLink: '',
starred: false,
updated: '',
websiteUrl: ''
}
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/provisioning/createAccountTicket',
headers: {'content-type': 'application/json'},
body: {
account: {
childLink: {href: '', type: ''},
created: '',
id: '',
kind: '',
name: '',
permissions: {effective: []},
selfLink: '',
starred: false,
updated: ''
},
id: '',
kind: '',
profile: {
accountId: '',
botFilteringEnabled: false,
childLink: {href: '', type: ''},
created: '',
currency: '',
defaultPage: '',
eCommerceTracking: false,
enhancedECommerceTracking: false,
excludeQueryParameters: '',
id: '',
internalWebPropertyId: '',
kind: '',
name: '',
parentLink: {href: '', type: ''},
permissions: {effective: []},
selfLink: '',
siteSearchCategoryParameters: '',
siteSearchQueryParameters: '',
starred: false,
stripSiteSearchCategoryParameters: false,
stripSiteSearchQueryParameters: false,
timezone: '',
type: '',
updated: '',
webPropertyId: '',
websiteUrl: ''
},
redirectUri: '',
webproperty: {
accountId: '',
childLink: {href: '', type: ''},
created: '',
dataRetentionResetOnNewActivity: false,
dataRetentionTtl: '',
defaultProfileId: '',
id: '',
industryVertical: '',
internalWebPropertyId: '',
kind: '',
level: '',
name: '',
parentLink: {href: '', type: ''},
permissions: {effective: []},
profileCount: 0,
selfLink: '',
starred: false,
updated: '',
websiteUrl: ''
}
},
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}}/provisioning/createAccountTicket');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
account: {
childLink: {
href: '',
type: ''
},
created: '',
id: '',
kind: '',
name: '',
permissions: {
effective: []
},
selfLink: '',
starred: false,
updated: ''
},
id: '',
kind: '',
profile: {
accountId: '',
botFilteringEnabled: false,
childLink: {
href: '',
type: ''
},
created: '',
currency: '',
defaultPage: '',
eCommerceTracking: false,
enhancedECommerceTracking: false,
excludeQueryParameters: '',
id: '',
internalWebPropertyId: '',
kind: '',
name: '',
parentLink: {
href: '',
type: ''
},
permissions: {
effective: []
},
selfLink: '',
siteSearchCategoryParameters: '',
siteSearchQueryParameters: '',
starred: false,
stripSiteSearchCategoryParameters: false,
stripSiteSearchQueryParameters: false,
timezone: '',
type: '',
updated: '',
webPropertyId: '',
websiteUrl: ''
},
redirectUri: '',
webproperty: {
accountId: '',
childLink: {
href: '',
type: ''
},
created: '',
dataRetentionResetOnNewActivity: false,
dataRetentionTtl: '',
defaultProfileId: '',
id: '',
industryVertical: '',
internalWebPropertyId: '',
kind: '',
level: '',
name: '',
parentLink: {
href: '',
type: ''
},
permissions: {
effective: []
},
profileCount: 0,
selfLink: '',
starred: false,
updated: '',
websiteUrl: ''
}
});
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}}/provisioning/createAccountTicket',
headers: {'content-type': 'application/json'},
data: {
account: {
childLink: {href: '', type: ''},
created: '',
id: '',
kind: '',
name: '',
permissions: {effective: []},
selfLink: '',
starred: false,
updated: ''
},
id: '',
kind: '',
profile: {
accountId: '',
botFilteringEnabled: false,
childLink: {href: '', type: ''},
created: '',
currency: '',
defaultPage: '',
eCommerceTracking: false,
enhancedECommerceTracking: false,
excludeQueryParameters: '',
id: '',
internalWebPropertyId: '',
kind: '',
name: '',
parentLink: {href: '', type: ''},
permissions: {effective: []},
selfLink: '',
siteSearchCategoryParameters: '',
siteSearchQueryParameters: '',
starred: false,
stripSiteSearchCategoryParameters: false,
stripSiteSearchQueryParameters: false,
timezone: '',
type: '',
updated: '',
webPropertyId: '',
websiteUrl: ''
},
redirectUri: '',
webproperty: {
accountId: '',
childLink: {href: '', type: ''},
created: '',
dataRetentionResetOnNewActivity: false,
dataRetentionTtl: '',
defaultProfileId: '',
id: '',
industryVertical: '',
internalWebPropertyId: '',
kind: '',
level: '',
name: '',
parentLink: {href: '', type: ''},
permissions: {effective: []},
profileCount: 0,
selfLink: '',
starred: false,
updated: '',
websiteUrl: ''
}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/provisioning/createAccountTicket';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"account":{"childLink":{"href":"","type":""},"created":"","id":"","kind":"","name":"","permissions":{"effective":[]},"selfLink":"","starred":false,"updated":""},"id":"","kind":"","profile":{"accountId":"","botFilteringEnabled":false,"childLink":{"href":"","type":""},"created":"","currency":"","defaultPage":"","eCommerceTracking":false,"enhancedECommerceTracking":false,"excludeQueryParameters":"","id":"","internalWebPropertyId":"","kind":"","name":"","parentLink":{"href":"","type":""},"permissions":{"effective":[]},"selfLink":"","siteSearchCategoryParameters":"","siteSearchQueryParameters":"","starred":false,"stripSiteSearchCategoryParameters":false,"stripSiteSearchQueryParameters":false,"timezone":"","type":"","updated":"","webPropertyId":"","websiteUrl":""},"redirectUri":"","webproperty":{"accountId":"","childLink":{"href":"","type":""},"created":"","dataRetentionResetOnNewActivity":false,"dataRetentionTtl":"","defaultProfileId":"","id":"","industryVertical":"","internalWebPropertyId":"","kind":"","level":"","name":"","parentLink":{"href":"","type":""},"permissions":{"effective":[]},"profileCount":0,"selfLink":"","starred":false,"updated":"","websiteUrl":""}}'
};
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 = @{ @"account": @{ @"childLink": @{ @"href": @"", @"type": @"" }, @"created": @"", @"id": @"", @"kind": @"", @"name": @"", @"permissions": @{ @"effective": @[ ] }, @"selfLink": @"", @"starred": @NO, @"updated": @"" },
@"id": @"",
@"kind": @"",
@"profile": @{ @"accountId": @"", @"botFilteringEnabled": @NO, @"childLink": @{ @"href": @"", @"type": @"" }, @"created": @"", @"currency": @"", @"defaultPage": @"", @"eCommerceTracking": @NO, @"enhancedECommerceTracking": @NO, @"excludeQueryParameters": @"", @"id": @"", @"internalWebPropertyId": @"", @"kind": @"", @"name": @"", @"parentLink": @{ @"href": @"", @"type": @"" }, @"permissions": @{ @"effective": @[ ] }, @"selfLink": @"", @"siteSearchCategoryParameters": @"", @"siteSearchQueryParameters": @"", @"starred": @NO, @"stripSiteSearchCategoryParameters": @NO, @"stripSiteSearchQueryParameters": @NO, @"timezone": @"", @"type": @"", @"updated": @"", @"webPropertyId": @"", @"websiteUrl": @"" },
@"redirectUri": @"",
@"webproperty": @{ @"accountId": @"", @"childLink": @{ @"href": @"", @"type": @"" }, @"created": @"", @"dataRetentionResetOnNewActivity": @NO, @"dataRetentionTtl": @"", @"defaultProfileId": @"", @"id": @"", @"industryVertical": @"", @"internalWebPropertyId": @"", @"kind": @"", @"level": @"", @"name": @"", @"parentLink": @{ @"href": @"", @"type": @"" }, @"permissions": @{ @"effective": @[ ] }, @"profileCount": @0, @"selfLink": @"", @"starred": @NO, @"updated": @"", @"websiteUrl": @"" } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/provisioning/createAccountTicket"]
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}}/provisioning/createAccountTicket" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"account\": {\n \"childLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"created\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"permissions\": {\n \"effective\": []\n },\n \"selfLink\": \"\",\n \"starred\": false,\n \"updated\": \"\"\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"profile\": {\n \"accountId\": \"\",\n \"botFilteringEnabled\": false,\n \"childLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"created\": \"\",\n \"currency\": \"\",\n \"defaultPage\": \"\",\n \"eCommerceTracking\": false,\n \"enhancedECommerceTracking\": false,\n \"excludeQueryParameters\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"permissions\": {\n \"effective\": []\n },\n \"selfLink\": \"\",\n \"siteSearchCategoryParameters\": \"\",\n \"siteSearchQueryParameters\": \"\",\n \"starred\": false,\n \"stripSiteSearchCategoryParameters\": false,\n \"stripSiteSearchQueryParameters\": false,\n \"timezone\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\",\n \"websiteUrl\": \"\"\n },\n \"redirectUri\": \"\",\n \"webproperty\": {\n \"accountId\": \"\",\n \"childLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"created\": \"\",\n \"dataRetentionResetOnNewActivity\": false,\n \"dataRetentionTtl\": \"\",\n \"defaultProfileId\": \"\",\n \"id\": \"\",\n \"industryVertical\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"level\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"permissions\": {\n \"effective\": []\n },\n \"profileCount\": 0,\n \"selfLink\": \"\",\n \"starred\": false,\n \"updated\": \"\",\n \"websiteUrl\": \"\"\n }\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/provisioning/createAccountTicket",
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([
'account' => [
'childLink' => [
'href' => '',
'type' => ''
],
'created' => '',
'id' => '',
'kind' => '',
'name' => '',
'permissions' => [
'effective' => [
]
],
'selfLink' => '',
'starred' => null,
'updated' => ''
],
'id' => '',
'kind' => '',
'profile' => [
'accountId' => '',
'botFilteringEnabled' => null,
'childLink' => [
'href' => '',
'type' => ''
],
'created' => '',
'currency' => '',
'defaultPage' => '',
'eCommerceTracking' => null,
'enhancedECommerceTracking' => null,
'excludeQueryParameters' => '',
'id' => '',
'internalWebPropertyId' => '',
'kind' => '',
'name' => '',
'parentLink' => [
'href' => '',
'type' => ''
],
'permissions' => [
'effective' => [
]
],
'selfLink' => '',
'siteSearchCategoryParameters' => '',
'siteSearchQueryParameters' => '',
'starred' => null,
'stripSiteSearchCategoryParameters' => null,
'stripSiteSearchQueryParameters' => null,
'timezone' => '',
'type' => '',
'updated' => '',
'webPropertyId' => '',
'websiteUrl' => ''
],
'redirectUri' => '',
'webproperty' => [
'accountId' => '',
'childLink' => [
'href' => '',
'type' => ''
],
'created' => '',
'dataRetentionResetOnNewActivity' => null,
'dataRetentionTtl' => '',
'defaultProfileId' => '',
'id' => '',
'industryVertical' => '',
'internalWebPropertyId' => '',
'kind' => '',
'level' => '',
'name' => '',
'parentLink' => [
'href' => '',
'type' => ''
],
'permissions' => [
'effective' => [
]
],
'profileCount' => 0,
'selfLink' => '',
'starred' => null,
'updated' => '',
'websiteUrl' => ''
]
]),
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}}/provisioning/createAccountTicket', [
'body' => '{
"account": {
"childLink": {
"href": "",
"type": ""
},
"created": "",
"id": "",
"kind": "",
"name": "",
"permissions": {
"effective": []
},
"selfLink": "",
"starred": false,
"updated": ""
},
"id": "",
"kind": "",
"profile": {
"accountId": "",
"botFilteringEnabled": false,
"childLink": {
"href": "",
"type": ""
},
"created": "",
"currency": "",
"defaultPage": "",
"eCommerceTracking": false,
"enhancedECommerceTracking": false,
"excludeQueryParameters": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"permissions": {
"effective": []
},
"selfLink": "",
"siteSearchCategoryParameters": "",
"siteSearchQueryParameters": "",
"starred": false,
"stripSiteSearchCategoryParameters": false,
"stripSiteSearchQueryParameters": false,
"timezone": "",
"type": "",
"updated": "",
"webPropertyId": "",
"websiteUrl": ""
},
"redirectUri": "",
"webproperty": {
"accountId": "",
"childLink": {
"href": "",
"type": ""
},
"created": "",
"dataRetentionResetOnNewActivity": false,
"dataRetentionTtl": "",
"defaultProfileId": "",
"id": "",
"industryVertical": "",
"internalWebPropertyId": "",
"kind": "",
"level": "",
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"permissions": {
"effective": []
},
"profileCount": 0,
"selfLink": "",
"starred": false,
"updated": "",
"websiteUrl": ""
}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/provisioning/createAccountTicket');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'account' => [
'childLink' => [
'href' => '',
'type' => ''
],
'created' => '',
'id' => '',
'kind' => '',
'name' => '',
'permissions' => [
'effective' => [
]
],
'selfLink' => '',
'starred' => null,
'updated' => ''
],
'id' => '',
'kind' => '',
'profile' => [
'accountId' => '',
'botFilteringEnabled' => null,
'childLink' => [
'href' => '',
'type' => ''
],
'created' => '',
'currency' => '',
'defaultPage' => '',
'eCommerceTracking' => null,
'enhancedECommerceTracking' => null,
'excludeQueryParameters' => '',
'id' => '',
'internalWebPropertyId' => '',
'kind' => '',
'name' => '',
'parentLink' => [
'href' => '',
'type' => ''
],
'permissions' => [
'effective' => [
]
],
'selfLink' => '',
'siteSearchCategoryParameters' => '',
'siteSearchQueryParameters' => '',
'starred' => null,
'stripSiteSearchCategoryParameters' => null,
'stripSiteSearchQueryParameters' => null,
'timezone' => '',
'type' => '',
'updated' => '',
'webPropertyId' => '',
'websiteUrl' => ''
],
'redirectUri' => '',
'webproperty' => [
'accountId' => '',
'childLink' => [
'href' => '',
'type' => ''
],
'created' => '',
'dataRetentionResetOnNewActivity' => null,
'dataRetentionTtl' => '',
'defaultProfileId' => '',
'id' => '',
'industryVertical' => '',
'internalWebPropertyId' => '',
'kind' => '',
'level' => '',
'name' => '',
'parentLink' => [
'href' => '',
'type' => ''
],
'permissions' => [
'effective' => [
]
],
'profileCount' => 0,
'selfLink' => '',
'starred' => null,
'updated' => '',
'websiteUrl' => ''
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'account' => [
'childLink' => [
'href' => '',
'type' => ''
],
'created' => '',
'id' => '',
'kind' => '',
'name' => '',
'permissions' => [
'effective' => [
]
],
'selfLink' => '',
'starred' => null,
'updated' => ''
],
'id' => '',
'kind' => '',
'profile' => [
'accountId' => '',
'botFilteringEnabled' => null,
'childLink' => [
'href' => '',
'type' => ''
],
'created' => '',
'currency' => '',
'defaultPage' => '',
'eCommerceTracking' => null,
'enhancedECommerceTracking' => null,
'excludeQueryParameters' => '',
'id' => '',
'internalWebPropertyId' => '',
'kind' => '',
'name' => '',
'parentLink' => [
'href' => '',
'type' => ''
],
'permissions' => [
'effective' => [
]
],
'selfLink' => '',
'siteSearchCategoryParameters' => '',
'siteSearchQueryParameters' => '',
'starred' => null,
'stripSiteSearchCategoryParameters' => null,
'stripSiteSearchQueryParameters' => null,
'timezone' => '',
'type' => '',
'updated' => '',
'webPropertyId' => '',
'websiteUrl' => ''
],
'redirectUri' => '',
'webproperty' => [
'accountId' => '',
'childLink' => [
'href' => '',
'type' => ''
],
'created' => '',
'dataRetentionResetOnNewActivity' => null,
'dataRetentionTtl' => '',
'defaultProfileId' => '',
'id' => '',
'industryVertical' => '',
'internalWebPropertyId' => '',
'kind' => '',
'level' => '',
'name' => '',
'parentLink' => [
'href' => '',
'type' => ''
],
'permissions' => [
'effective' => [
]
],
'profileCount' => 0,
'selfLink' => '',
'starred' => null,
'updated' => '',
'websiteUrl' => ''
]
]));
$request->setRequestUrl('{{baseUrl}}/provisioning/createAccountTicket');
$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}}/provisioning/createAccountTicket' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"account": {
"childLink": {
"href": "",
"type": ""
},
"created": "",
"id": "",
"kind": "",
"name": "",
"permissions": {
"effective": []
},
"selfLink": "",
"starred": false,
"updated": ""
},
"id": "",
"kind": "",
"profile": {
"accountId": "",
"botFilteringEnabled": false,
"childLink": {
"href": "",
"type": ""
},
"created": "",
"currency": "",
"defaultPage": "",
"eCommerceTracking": false,
"enhancedECommerceTracking": false,
"excludeQueryParameters": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"permissions": {
"effective": []
},
"selfLink": "",
"siteSearchCategoryParameters": "",
"siteSearchQueryParameters": "",
"starred": false,
"stripSiteSearchCategoryParameters": false,
"stripSiteSearchQueryParameters": false,
"timezone": "",
"type": "",
"updated": "",
"webPropertyId": "",
"websiteUrl": ""
},
"redirectUri": "",
"webproperty": {
"accountId": "",
"childLink": {
"href": "",
"type": ""
},
"created": "",
"dataRetentionResetOnNewActivity": false,
"dataRetentionTtl": "",
"defaultProfileId": "",
"id": "",
"industryVertical": "",
"internalWebPropertyId": "",
"kind": "",
"level": "",
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"permissions": {
"effective": []
},
"profileCount": 0,
"selfLink": "",
"starred": false,
"updated": "",
"websiteUrl": ""
}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/provisioning/createAccountTicket' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"account": {
"childLink": {
"href": "",
"type": ""
},
"created": "",
"id": "",
"kind": "",
"name": "",
"permissions": {
"effective": []
},
"selfLink": "",
"starred": false,
"updated": ""
},
"id": "",
"kind": "",
"profile": {
"accountId": "",
"botFilteringEnabled": false,
"childLink": {
"href": "",
"type": ""
},
"created": "",
"currency": "",
"defaultPage": "",
"eCommerceTracking": false,
"enhancedECommerceTracking": false,
"excludeQueryParameters": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"permissions": {
"effective": []
},
"selfLink": "",
"siteSearchCategoryParameters": "",
"siteSearchQueryParameters": "",
"starred": false,
"stripSiteSearchCategoryParameters": false,
"stripSiteSearchQueryParameters": false,
"timezone": "",
"type": "",
"updated": "",
"webPropertyId": "",
"websiteUrl": ""
},
"redirectUri": "",
"webproperty": {
"accountId": "",
"childLink": {
"href": "",
"type": ""
},
"created": "",
"dataRetentionResetOnNewActivity": false,
"dataRetentionTtl": "",
"defaultProfileId": "",
"id": "",
"industryVertical": "",
"internalWebPropertyId": "",
"kind": "",
"level": "",
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"permissions": {
"effective": []
},
"profileCount": 0,
"selfLink": "",
"starred": false,
"updated": "",
"websiteUrl": ""
}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"account\": {\n \"childLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"created\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"permissions\": {\n \"effective\": []\n },\n \"selfLink\": \"\",\n \"starred\": false,\n \"updated\": \"\"\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"profile\": {\n \"accountId\": \"\",\n \"botFilteringEnabled\": false,\n \"childLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"created\": \"\",\n \"currency\": \"\",\n \"defaultPage\": \"\",\n \"eCommerceTracking\": false,\n \"enhancedECommerceTracking\": false,\n \"excludeQueryParameters\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"permissions\": {\n \"effective\": []\n },\n \"selfLink\": \"\",\n \"siteSearchCategoryParameters\": \"\",\n \"siteSearchQueryParameters\": \"\",\n \"starred\": false,\n \"stripSiteSearchCategoryParameters\": false,\n \"stripSiteSearchQueryParameters\": false,\n \"timezone\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\",\n \"websiteUrl\": \"\"\n },\n \"redirectUri\": \"\",\n \"webproperty\": {\n \"accountId\": \"\",\n \"childLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"created\": \"\",\n \"dataRetentionResetOnNewActivity\": false,\n \"dataRetentionTtl\": \"\",\n \"defaultProfileId\": \"\",\n \"id\": \"\",\n \"industryVertical\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"level\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"permissions\": {\n \"effective\": []\n },\n \"profileCount\": 0,\n \"selfLink\": \"\",\n \"starred\": false,\n \"updated\": \"\",\n \"websiteUrl\": \"\"\n }\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/provisioning/createAccountTicket", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/provisioning/createAccountTicket"
payload = {
"account": {
"childLink": {
"href": "",
"type": ""
},
"created": "",
"id": "",
"kind": "",
"name": "",
"permissions": { "effective": [] },
"selfLink": "",
"starred": False,
"updated": ""
},
"id": "",
"kind": "",
"profile": {
"accountId": "",
"botFilteringEnabled": False,
"childLink": {
"href": "",
"type": ""
},
"created": "",
"currency": "",
"defaultPage": "",
"eCommerceTracking": False,
"enhancedECommerceTracking": False,
"excludeQueryParameters": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"permissions": { "effective": [] },
"selfLink": "",
"siteSearchCategoryParameters": "",
"siteSearchQueryParameters": "",
"starred": False,
"stripSiteSearchCategoryParameters": False,
"stripSiteSearchQueryParameters": False,
"timezone": "",
"type": "",
"updated": "",
"webPropertyId": "",
"websiteUrl": ""
},
"redirectUri": "",
"webproperty": {
"accountId": "",
"childLink": {
"href": "",
"type": ""
},
"created": "",
"dataRetentionResetOnNewActivity": False,
"dataRetentionTtl": "",
"defaultProfileId": "",
"id": "",
"industryVertical": "",
"internalWebPropertyId": "",
"kind": "",
"level": "",
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"permissions": { "effective": [] },
"profileCount": 0,
"selfLink": "",
"starred": False,
"updated": "",
"websiteUrl": ""
}
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/provisioning/createAccountTicket"
payload <- "{\n \"account\": {\n \"childLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"created\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"permissions\": {\n \"effective\": []\n },\n \"selfLink\": \"\",\n \"starred\": false,\n \"updated\": \"\"\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"profile\": {\n \"accountId\": \"\",\n \"botFilteringEnabled\": false,\n \"childLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"created\": \"\",\n \"currency\": \"\",\n \"defaultPage\": \"\",\n \"eCommerceTracking\": false,\n \"enhancedECommerceTracking\": false,\n \"excludeQueryParameters\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"permissions\": {\n \"effective\": []\n },\n \"selfLink\": \"\",\n \"siteSearchCategoryParameters\": \"\",\n \"siteSearchQueryParameters\": \"\",\n \"starred\": false,\n \"stripSiteSearchCategoryParameters\": false,\n \"stripSiteSearchQueryParameters\": false,\n \"timezone\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\",\n \"websiteUrl\": \"\"\n },\n \"redirectUri\": \"\",\n \"webproperty\": {\n \"accountId\": \"\",\n \"childLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"created\": \"\",\n \"dataRetentionResetOnNewActivity\": false,\n \"dataRetentionTtl\": \"\",\n \"defaultProfileId\": \"\",\n \"id\": \"\",\n \"industryVertical\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"level\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"permissions\": {\n \"effective\": []\n },\n \"profileCount\": 0,\n \"selfLink\": \"\",\n \"starred\": false,\n \"updated\": \"\",\n \"websiteUrl\": \"\"\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}}/provisioning/createAccountTicket")
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 \"account\": {\n \"childLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"created\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"permissions\": {\n \"effective\": []\n },\n \"selfLink\": \"\",\n \"starred\": false,\n \"updated\": \"\"\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"profile\": {\n \"accountId\": \"\",\n \"botFilteringEnabled\": false,\n \"childLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"created\": \"\",\n \"currency\": \"\",\n \"defaultPage\": \"\",\n \"eCommerceTracking\": false,\n \"enhancedECommerceTracking\": false,\n \"excludeQueryParameters\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"permissions\": {\n \"effective\": []\n },\n \"selfLink\": \"\",\n \"siteSearchCategoryParameters\": \"\",\n \"siteSearchQueryParameters\": \"\",\n \"starred\": false,\n \"stripSiteSearchCategoryParameters\": false,\n \"stripSiteSearchQueryParameters\": false,\n \"timezone\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\",\n \"websiteUrl\": \"\"\n },\n \"redirectUri\": \"\",\n \"webproperty\": {\n \"accountId\": \"\",\n \"childLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"created\": \"\",\n \"dataRetentionResetOnNewActivity\": false,\n \"dataRetentionTtl\": \"\",\n \"defaultProfileId\": \"\",\n \"id\": \"\",\n \"industryVertical\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"level\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"permissions\": {\n \"effective\": []\n },\n \"profileCount\": 0,\n \"selfLink\": \"\",\n \"starred\": false,\n \"updated\": \"\",\n \"websiteUrl\": \"\"\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/provisioning/createAccountTicket') do |req|
req.body = "{\n \"account\": {\n \"childLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"created\": \"\",\n \"id\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"permissions\": {\n \"effective\": []\n },\n \"selfLink\": \"\",\n \"starred\": false,\n \"updated\": \"\"\n },\n \"id\": \"\",\n \"kind\": \"\",\n \"profile\": {\n \"accountId\": \"\",\n \"botFilteringEnabled\": false,\n \"childLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"created\": \"\",\n \"currency\": \"\",\n \"defaultPage\": \"\",\n \"eCommerceTracking\": false,\n \"enhancedECommerceTracking\": false,\n \"excludeQueryParameters\": \"\",\n \"id\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"permissions\": {\n \"effective\": []\n },\n \"selfLink\": \"\",\n \"siteSearchCategoryParameters\": \"\",\n \"siteSearchQueryParameters\": \"\",\n \"starred\": false,\n \"stripSiteSearchCategoryParameters\": false,\n \"stripSiteSearchQueryParameters\": false,\n \"timezone\": \"\",\n \"type\": \"\",\n \"updated\": \"\",\n \"webPropertyId\": \"\",\n \"websiteUrl\": \"\"\n },\n \"redirectUri\": \"\",\n \"webproperty\": {\n \"accountId\": \"\",\n \"childLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"created\": \"\",\n \"dataRetentionResetOnNewActivity\": false,\n \"dataRetentionTtl\": \"\",\n \"defaultProfileId\": \"\",\n \"id\": \"\",\n \"industryVertical\": \"\",\n \"internalWebPropertyId\": \"\",\n \"kind\": \"\",\n \"level\": \"\",\n \"name\": \"\",\n \"parentLink\": {\n \"href\": \"\",\n \"type\": \"\"\n },\n \"permissions\": {\n \"effective\": []\n },\n \"profileCount\": 0,\n \"selfLink\": \"\",\n \"starred\": false,\n \"updated\": \"\",\n \"websiteUrl\": \"\"\n }\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/provisioning/createAccountTicket";
let payload = json!({
"account": json!({
"childLink": json!({
"href": "",
"type": ""
}),
"created": "",
"id": "",
"kind": "",
"name": "",
"permissions": json!({"effective": ()}),
"selfLink": "",
"starred": false,
"updated": ""
}),
"id": "",
"kind": "",
"profile": json!({
"accountId": "",
"botFilteringEnabled": false,
"childLink": json!({
"href": "",
"type": ""
}),
"created": "",
"currency": "",
"defaultPage": "",
"eCommerceTracking": false,
"enhancedECommerceTracking": false,
"excludeQueryParameters": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"parentLink": json!({
"href": "",
"type": ""
}),
"permissions": json!({"effective": ()}),
"selfLink": "",
"siteSearchCategoryParameters": "",
"siteSearchQueryParameters": "",
"starred": false,
"stripSiteSearchCategoryParameters": false,
"stripSiteSearchQueryParameters": false,
"timezone": "",
"type": "",
"updated": "",
"webPropertyId": "",
"websiteUrl": ""
}),
"redirectUri": "",
"webproperty": json!({
"accountId": "",
"childLink": json!({
"href": "",
"type": ""
}),
"created": "",
"dataRetentionResetOnNewActivity": false,
"dataRetentionTtl": "",
"defaultProfileId": "",
"id": "",
"industryVertical": "",
"internalWebPropertyId": "",
"kind": "",
"level": "",
"name": "",
"parentLink": json!({
"href": "",
"type": ""
}),
"permissions": json!({"effective": ()}),
"profileCount": 0,
"selfLink": "",
"starred": false,
"updated": "",
"websiteUrl": ""
})
});
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}}/provisioning/createAccountTicket \
--header 'content-type: application/json' \
--data '{
"account": {
"childLink": {
"href": "",
"type": ""
},
"created": "",
"id": "",
"kind": "",
"name": "",
"permissions": {
"effective": []
},
"selfLink": "",
"starred": false,
"updated": ""
},
"id": "",
"kind": "",
"profile": {
"accountId": "",
"botFilteringEnabled": false,
"childLink": {
"href": "",
"type": ""
},
"created": "",
"currency": "",
"defaultPage": "",
"eCommerceTracking": false,
"enhancedECommerceTracking": false,
"excludeQueryParameters": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"permissions": {
"effective": []
},
"selfLink": "",
"siteSearchCategoryParameters": "",
"siteSearchQueryParameters": "",
"starred": false,
"stripSiteSearchCategoryParameters": false,
"stripSiteSearchQueryParameters": false,
"timezone": "",
"type": "",
"updated": "",
"webPropertyId": "",
"websiteUrl": ""
},
"redirectUri": "",
"webproperty": {
"accountId": "",
"childLink": {
"href": "",
"type": ""
},
"created": "",
"dataRetentionResetOnNewActivity": false,
"dataRetentionTtl": "",
"defaultProfileId": "",
"id": "",
"industryVertical": "",
"internalWebPropertyId": "",
"kind": "",
"level": "",
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"permissions": {
"effective": []
},
"profileCount": 0,
"selfLink": "",
"starred": false,
"updated": "",
"websiteUrl": ""
}
}'
echo '{
"account": {
"childLink": {
"href": "",
"type": ""
},
"created": "",
"id": "",
"kind": "",
"name": "",
"permissions": {
"effective": []
},
"selfLink": "",
"starred": false,
"updated": ""
},
"id": "",
"kind": "",
"profile": {
"accountId": "",
"botFilteringEnabled": false,
"childLink": {
"href": "",
"type": ""
},
"created": "",
"currency": "",
"defaultPage": "",
"eCommerceTracking": false,
"enhancedECommerceTracking": false,
"excludeQueryParameters": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"permissions": {
"effective": []
},
"selfLink": "",
"siteSearchCategoryParameters": "",
"siteSearchQueryParameters": "",
"starred": false,
"stripSiteSearchCategoryParameters": false,
"stripSiteSearchQueryParameters": false,
"timezone": "",
"type": "",
"updated": "",
"webPropertyId": "",
"websiteUrl": ""
},
"redirectUri": "",
"webproperty": {
"accountId": "",
"childLink": {
"href": "",
"type": ""
},
"created": "",
"dataRetentionResetOnNewActivity": false,
"dataRetentionTtl": "",
"defaultProfileId": "",
"id": "",
"industryVertical": "",
"internalWebPropertyId": "",
"kind": "",
"level": "",
"name": "",
"parentLink": {
"href": "",
"type": ""
},
"permissions": {
"effective": []
},
"profileCount": 0,
"selfLink": "",
"starred": false,
"updated": "",
"websiteUrl": ""
}
}' | \
http POST {{baseUrl}}/provisioning/createAccountTicket \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "account": {\n "childLink": {\n "href": "",\n "type": ""\n },\n "created": "",\n "id": "",\n "kind": "",\n "name": "",\n "permissions": {\n "effective": []\n },\n "selfLink": "",\n "starred": false,\n "updated": ""\n },\n "id": "",\n "kind": "",\n "profile": {\n "accountId": "",\n "botFilteringEnabled": false,\n "childLink": {\n "href": "",\n "type": ""\n },\n "created": "",\n "currency": "",\n "defaultPage": "",\n "eCommerceTracking": false,\n "enhancedECommerceTracking": false,\n "excludeQueryParameters": "",\n "id": "",\n "internalWebPropertyId": "",\n "kind": "",\n "name": "",\n "parentLink": {\n "href": "",\n "type": ""\n },\n "permissions": {\n "effective": []\n },\n "selfLink": "",\n "siteSearchCategoryParameters": "",\n "siteSearchQueryParameters": "",\n "starred": false,\n "stripSiteSearchCategoryParameters": false,\n "stripSiteSearchQueryParameters": false,\n "timezone": "",\n "type": "",\n "updated": "",\n "webPropertyId": "",\n "websiteUrl": ""\n },\n "redirectUri": "",\n "webproperty": {\n "accountId": "",\n "childLink": {\n "href": "",\n "type": ""\n },\n "created": "",\n "dataRetentionResetOnNewActivity": false,\n "dataRetentionTtl": "",\n "defaultProfileId": "",\n "id": "",\n "industryVertical": "",\n "internalWebPropertyId": "",\n "kind": "",\n "level": "",\n "name": "",\n "parentLink": {\n "href": "",\n "type": ""\n },\n "permissions": {\n "effective": []\n },\n "profileCount": 0,\n "selfLink": "",\n "starred": false,\n "updated": "",\n "websiteUrl": ""\n }\n}' \
--output-document \
- {{baseUrl}}/provisioning/createAccountTicket
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"account": [
"childLink": [
"href": "",
"type": ""
],
"created": "",
"id": "",
"kind": "",
"name": "",
"permissions": ["effective": []],
"selfLink": "",
"starred": false,
"updated": ""
],
"id": "",
"kind": "",
"profile": [
"accountId": "",
"botFilteringEnabled": false,
"childLink": [
"href": "",
"type": ""
],
"created": "",
"currency": "",
"defaultPage": "",
"eCommerceTracking": false,
"enhancedECommerceTracking": false,
"excludeQueryParameters": "",
"id": "",
"internalWebPropertyId": "",
"kind": "",
"name": "",
"parentLink": [
"href": "",
"type": ""
],
"permissions": ["effective": []],
"selfLink": "",
"siteSearchCategoryParameters": "",
"siteSearchQueryParameters": "",
"starred": false,
"stripSiteSearchCategoryParameters": false,
"stripSiteSearchQueryParameters": false,
"timezone": "",
"type": "",
"updated": "",
"webPropertyId": "",
"websiteUrl": ""
],
"redirectUri": "",
"webproperty": [
"accountId": "",
"childLink": [
"href": "",
"type": ""
],
"created": "",
"dataRetentionResetOnNewActivity": false,
"dataRetentionTtl": "",
"defaultProfileId": "",
"id": "",
"industryVertical": "",
"internalWebPropertyId": "",
"kind": "",
"level": "",
"name": "",
"parentLink": [
"href": "",
"type": ""
],
"permissions": ["effective": []],
"profileCount": 0,
"selfLink": "",
"starred": false,
"updated": "",
"websiteUrl": ""
]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/provisioning/createAccountTicket")! 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
analytics.provisioning.createAccountTree
{{baseUrl}}/provisioning/createAccountTree
BODY json
{
"accountName": "",
"kind": "",
"profileName": "",
"timezone": "",
"webpropertyName": "",
"websiteUrl": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/provisioning/createAccountTree");
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 \"accountName\": \"\",\n \"kind\": \"\",\n \"profileName\": \"\",\n \"timezone\": \"\",\n \"webpropertyName\": \"\",\n \"websiteUrl\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/provisioning/createAccountTree" {:content-type :json
:form-params {:accountName ""
:kind ""
:profileName ""
:timezone ""
:webpropertyName ""
:websiteUrl ""}})
require "http/client"
url = "{{baseUrl}}/provisioning/createAccountTree"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"accountName\": \"\",\n \"kind\": \"\",\n \"profileName\": \"\",\n \"timezone\": \"\",\n \"webpropertyName\": \"\",\n \"websiteUrl\": \"\"\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}}/provisioning/createAccountTree"),
Content = new StringContent("{\n \"accountName\": \"\",\n \"kind\": \"\",\n \"profileName\": \"\",\n \"timezone\": \"\",\n \"webpropertyName\": \"\",\n \"websiteUrl\": \"\"\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}}/provisioning/createAccountTree");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"accountName\": \"\",\n \"kind\": \"\",\n \"profileName\": \"\",\n \"timezone\": \"\",\n \"webpropertyName\": \"\",\n \"websiteUrl\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/provisioning/createAccountTree"
payload := strings.NewReader("{\n \"accountName\": \"\",\n \"kind\": \"\",\n \"profileName\": \"\",\n \"timezone\": \"\",\n \"webpropertyName\": \"\",\n \"websiteUrl\": \"\"\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/provisioning/createAccountTree HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 121
{
"accountName": "",
"kind": "",
"profileName": "",
"timezone": "",
"webpropertyName": "",
"websiteUrl": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/provisioning/createAccountTree")
.setHeader("content-type", "application/json")
.setBody("{\n \"accountName\": \"\",\n \"kind\": \"\",\n \"profileName\": \"\",\n \"timezone\": \"\",\n \"webpropertyName\": \"\",\n \"websiteUrl\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/provisioning/createAccountTree"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"accountName\": \"\",\n \"kind\": \"\",\n \"profileName\": \"\",\n \"timezone\": \"\",\n \"webpropertyName\": \"\",\n \"websiteUrl\": \"\"\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 \"accountName\": \"\",\n \"kind\": \"\",\n \"profileName\": \"\",\n \"timezone\": \"\",\n \"webpropertyName\": \"\",\n \"websiteUrl\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/provisioning/createAccountTree")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/provisioning/createAccountTree")
.header("content-type", "application/json")
.body("{\n \"accountName\": \"\",\n \"kind\": \"\",\n \"profileName\": \"\",\n \"timezone\": \"\",\n \"webpropertyName\": \"\",\n \"websiteUrl\": \"\"\n}")
.asString();
const data = JSON.stringify({
accountName: '',
kind: '',
profileName: '',
timezone: '',
webpropertyName: '',
websiteUrl: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/provisioning/createAccountTree');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/provisioning/createAccountTree',
headers: {'content-type': 'application/json'},
data: {
accountName: '',
kind: '',
profileName: '',
timezone: '',
webpropertyName: '',
websiteUrl: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/provisioning/createAccountTree';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"accountName":"","kind":"","profileName":"","timezone":"","webpropertyName":"","websiteUrl":""}'
};
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}}/provisioning/createAccountTree',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "accountName": "",\n "kind": "",\n "profileName": "",\n "timezone": "",\n "webpropertyName": "",\n "websiteUrl": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"accountName\": \"\",\n \"kind\": \"\",\n \"profileName\": \"\",\n \"timezone\": \"\",\n \"webpropertyName\": \"\",\n \"websiteUrl\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/provisioning/createAccountTree")
.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/provisioning/createAccountTree',
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({
accountName: '',
kind: '',
profileName: '',
timezone: '',
webpropertyName: '',
websiteUrl: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/provisioning/createAccountTree',
headers: {'content-type': 'application/json'},
body: {
accountName: '',
kind: '',
profileName: '',
timezone: '',
webpropertyName: '',
websiteUrl: ''
},
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}}/provisioning/createAccountTree');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
accountName: '',
kind: '',
profileName: '',
timezone: '',
webpropertyName: '',
websiteUrl: ''
});
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}}/provisioning/createAccountTree',
headers: {'content-type': 'application/json'},
data: {
accountName: '',
kind: '',
profileName: '',
timezone: '',
webpropertyName: '',
websiteUrl: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/provisioning/createAccountTree';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"accountName":"","kind":"","profileName":"","timezone":"","webpropertyName":"","websiteUrl":""}'
};
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 = @{ @"accountName": @"",
@"kind": @"",
@"profileName": @"",
@"timezone": @"",
@"webpropertyName": @"",
@"websiteUrl": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/provisioning/createAccountTree"]
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}}/provisioning/createAccountTree" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"accountName\": \"\",\n \"kind\": \"\",\n \"profileName\": \"\",\n \"timezone\": \"\",\n \"webpropertyName\": \"\",\n \"websiteUrl\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/provisioning/createAccountTree",
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([
'accountName' => '',
'kind' => '',
'profileName' => '',
'timezone' => '',
'webpropertyName' => '',
'websiteUrl' => ''
]),
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}}/provisioning/createAccountTree', [
'body' => '{
"accountName": "",
"kind": "",
"profileName": "",
"timezone": "",
"webpropertyName": "",
"websiteUrl": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/provisioning/createAccountTree');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'accountName' => '',
'kind' => '',
'profileName' => '',
'timezone' => '',
'webpropertyName' => '',
'websiteUrl' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'accountName' => '',
'kind' => '',
'profileName' => '',
'timezone' => '',
'webpropertyName' => '',
'websiteUrl' => ''
]));
$request->setRequestUrl('{{baseUrl}}/provisioning/createAccountTree');
$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}}/provisioning/createAccountTree' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"accountName": "",
"kind": "",
"profileName": "",
"timezone": "",
"webpropertyName": "",
"websiteUrl": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/provisioning/createAccountTree' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"accountName": "",
"kind": "",
"profileName": "",
"timezone": "",
"webpropertyName": "",
"websiteUrl": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"accountName\": \"\",\n \"kind\": \"\",\n \"profileName\": \"\",\n \"timezone\": \"\",\n \"webpropertyName\": \"\",\n \"websiteUrl\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/provisioning/createAccountTree", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/provisioning/createAccountTree"
payload = {
"accountName": "",
"kind": "",
"profileName": "",
"timezone": "",
"webpropertyName": "",
"websiteUrl": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/provisioning/createAccountTree"
payload <- "{\n \"accountName\": \"\",\n \"kind\": \"\",\n \"profileName\": \"\",\n \"timezone\": \"\",\n \"webpropertyName\": \"\",\n \"websiteUrl\": \"\"\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}}/provisioning/createAccountTree")
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 \"accountName\": \"\",\n \"kind\": \"\",\n \"profileName\": \"\",\n \"timezone\": \"\",\n \"webpropertyName\": \"\",\n \"websiteUrl\": \"\"\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/provisioning/createAccountTree') do |req|
req.body = "{\n \"accountName\": \"\",\n \"kind\": \"\",\n \"profileName\": \"\",\n \"timezone\": \"\",\n \"webpropertyName\": \"\",\n \"websiteUrl\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/provisioning/createAccountTree";
let payload = json!({
"accountName": "",
"kind": "",
"profileName": "",
"timezone": "",
"webpropertyName": "",
"websiteUrl": ""
});
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}}/provisioning/createAccountTree \
--header 'content-type: application/json' \
--data '{
"accountName": "",
"kind": "",
"profileName": "",
"timezone": "",
"webpropertyName": "",
"websiteUrl": ""
}'
echo '{
"accountName": "",
"kind": "",
"profileName": "",
"timezone": "",
"webpropertyName": "",
"websiteUrl": ""
}' | \
http POST {{baseUrl}}/provisioning/createAccountTree \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "accountName": "",\n "kind": "",\n "profileName": "",\n "timezone": "",\n "webpropertyName": "",\n "websiteUrl": ""\n}' \
--output-document \
- {{baseUrl}}/provisioning/createAccountTree
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"accountName": "",
"kind": "",
"profileName": "",
"timezone": "",
"webpropertyName": "",
"websiteUrl": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/provisioning/createAccountTree")! 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
analytics.userDeletion.userDeletionRequest.upsert
{{baseUrl}}/userDeletion/userDeletionRequests:upsert
BODY json
{
"deletionRequestTime": "",
"firebaseProjectId": "",
"id": {
"type": "",
"userId": ""
},
"kind": "",
"propertyId": "",
"webPropertyId": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/userDeletion/userDeletionRequests:upsert");
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 \"deletionRequestTime\": \"\",\n \"firebaseProjectId\": \"\",\n \"id\": {\n \"type\": \"\",\n \"userId\": \"\"\n },\n \"kind\": \"\",\n \"propertyId\": \"\",\n \"webPropertyId\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/userDeletion/userDeletionRequests:upsert" {:content-type :json
:form-params {:deletionRequestTime ""
:firebaseProjectId ""
:id {:type ""
:userId ""}
:kind ""
:propertyId ""
:webPropertyId ""}})
require "http/client"
url = "{{baseUrl}}/userDeletion/userDeletionRequests:upsert"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"deletionRequestTime\": \"\",\n \"firebaseProjectId\": \"\",\n \"id\": {\n \"type\": \"\",\n \"userId\": \"\"\n },\n \"kind\": \"\",\n \"propertyId\": \"\",\n \"webPropertyId\": \"\"\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}}/userDeletion/userDeletionRequests:upsert"),
Content = new StringContent("{\n \"deletionRequestTime\": \"\",\n \"firebaseProjectId\": \"\",\n \"id\": {\n \"type\": \"\",\n \"userId\": \"\"\n },\n \"kind\": \"\",\n \"propertyId\": \"\",\n \"webPropertyId\": \"\"\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}}/userDeletion/userDeletionRequests:upsert");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"deletionRequestTime\": \"\",\n \"firebaseProjectId\": \"\",\n \"id\": {\n \"type\": \"\",\n \"userId\": \"\"\n },\n \"kind\": \"\",\n \"propertyId\": \"\",\n \"webPropertyId\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/userDeletion/userDeletionRequests:upsert"
payload := strings.NewReader("{\n \"deletionRequestTime\": \"\",\n \"firebaseProjectId\": \"\",\n \"id\": {\n \"type\": \"\",\n \"userId\": \"\"\n },\n \"kind\": \"\",\n \"propertyId\": \"\",\n \"webPropertyId\": \"\"\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/userDeletion/userDeletionRequests:upsert HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 163
{
"deletionRequestTime": "",
"firebaseProjectId": "",
"id": {
"type": "",
"userId": ""
},
"kind": "",
"propertyId": "",
"webPropertyId": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/userDeletion/userDeletionRequests:upsert")
.setHeader("content-type", "application/json")
.setBody("{\n \"deletionRequestTime\": \"\",\n \"firebaseProjectId\": \"\",\n \"id\": {\n \"type\": \"\",\n \"userId\": \"\"\n },\n \"kind\": \"\",\n \"propertyId\": \"\",\n \"webPropertyId\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/userDeletion/userDeletionRequests:upsert"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"deletionRequestTime\": \"\",\n \"firebaseProjectId\": \"\",\n \"id\": {\n \"type\": \"\",\n \"userId\": \"\"\n },\n \"kind\": \"\",\n \"propertyId\": \"\",\n \"webPropertyId\": \"\"\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 \"deletionRequestTime\": \"\",\n \"firebaseProjectId\": \"\",\n \"id\": {\n \"type\": \"\",\n \"userId\": \"\"\n },\n \"kind\": \"\",\n \"propertyId\": \"\",\n \"webPropertyId\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/userDeletion/userDeletionRequests:upsert")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/userDeletion/userDeletionRequests:upsert")
.header("content-type", "application/json")
.body("{\n \"deletionRequestTime\": \"\",\n \"firebaseProjectId\": \"\",\n \"id\": {\n \"type\": \"\",\n \"userId\": \"\"\n },\n \"kind\": \"\",\n \"propertyId\": \"\",\n \"webPropertyId\": \"\"\n}")
.asString();
const data = JSON.stringify({
deletionRequestTime: '',
firebaseProjectId: '',
id: {
type: '',
userId: ''
},
kind: '',
propertyId: '',
webPropertyId: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/userDeletion/userDeletionRequests:upsert');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/userDeletion/userDeletionRequests:upsert',
headers: {'content-type': 'application/json'},
data: {
deletionRequestTime: '',
firebaseProjectId: '',
id: {type: '', userId: ''},
kind: '',
propertyId: '',
webPropertyId: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/userDeletion/userDeletionRequests:upsert';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"deletionRequestTime":"","firebaseProjectId":"","id":{"type":"","userId":""},"kind":"","propertyId":"","webPropertyId":""}'
};
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}}/userDeletion/userDeletionRequests:upsert',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "deletionRequestTime": "",\n "firebaseProjectId": "",\n "id": {\n "type": "",\n "userId": ""\n },\n "kind": "",\n "propertyId": "",\n "webPropertyId": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"deletionRequestTime\": \"\",\n \"firebaseProjectId\": \"\",\n \"id\": {\n \"type\": \"\",\n \"userId\": \"\"\n },\n \"kind\": \"\",\n \"propertyId\": \"\",\n \"webPropertyId\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/userDeletion/userDeletionRequests:upsert")
.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/userDeletion/userDeletionRequests:upsert',
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({
deletionRequestTime: '',
firebaseProjectId: '',
id: {type: '', userId: ''},
kind: '',
propertyId: '',
webPropertyId: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/userDeletion/userDeletionRequests:upsert',
headers: {'content-type': 'application/json'},
body: {
deletionRequestTime: '',
firebaseProjectId: '',
id: {type: '', userId: ''},
kind: '',
propertyId: '',
webPropertyId: ''
},
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}}/userDeletion/userDeletionRequests:upsert');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
deletionRequestTime: '',
firebaseProjectId: '',
id: {
type: '',
userId: ''
},
kind: '',
propertyId: '',
webPropertyId: ''
});
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}}/userDeletion/userDeletionRequests:upsert',
headers: {'content-type': 'application/json'},
data: {
deletionRequestTime: '',
firebaseProjectId: '',
id: {type: '', userId: ''},
kind: '',
propertyId: '',
webPropertyId: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/userDeletion/userDeletionRequests:upsert';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"deletionRequestTime":"","firebaseProjectId":"","id":{"type":"","userId":""},"kind":"","propertyId":"","webPropertyId":""}'
};
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 = @{ @"deletionRequestTime": @"",
@"firebaseProjectId": @"",
@"id": @{ @"type": @"", @"userId": @"" },
@"kind": @"",
@"propertyId": @"",
@"webPropertyId": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/userDeletion/userDeletionRequests:upsert"]
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}}/userDeletion/userDeletionRequests:upsert" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"deletionRequestTime\": \"\",\n \"firebaseProjectId\": \"\",\n \"id\": {\n \"type\": \"\",\n \"userId\": \"\"\n },\n \"kind\": \"\",\n \"propertyId\": \"\",\n \"webPropertyId\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/userDeletion/userDeletionRequests:upsert",
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([
'deletionRequestTime' => '',
'firebaseProjectId' => '',
'id' => [
'type' => '',
'userId' => ''
],
'kind' => '',
'propertyId' => '',
'webPropertyId' => ''
]),
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}}/userDeletion/userDeletionRequests:upsert', [
'body' => '{
"deletionRequestTime": "",
"firebaseProjectId": "",
"id": {
"type": "",
"userId": ""
},
"kind": "",
"propertyId": "",
"webPropertyId": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/userDeletion/userDeletionRequests:upsert');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'deletionRequestTime' => '',
'firebaseProjectId' => '',
'id' => [
'type' => '',
'userId' => ''
],
'kind' => '',
'propertyId' => '',
'webPropertyId' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'deletionRequestTime' => '',
'firebaseProjectId' => '',
'id' => [
'type' => '',
'userId' => ''
],
'kind' => '',
'propertyId' => '',
'webPropertyId' => ''
]));
$request->setRequestUrl('{{baseUrl}}/userDeletion/userDeletionRequests:upsert');
$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}}/userDeletion/userDeletionRequests:upsert' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"deletionRequestTime": "",
"firebaseProjectId": "",
"id": {
"type": "",
"userId": ""
},
"kind": "",
"propertyId": "",
"webPropertyId": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/userDeletion/userDeletionRequests:upsert' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"deletionRequestTime": "",
"firebaseProjectId": "",
"id": {
"type": "",
"userId": ""
},
"kind": "",
"propertyId": "",
"webPropertyId": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"deletionRequestTime\": \"\",\n \"firebaseProjectId\": \"\",\n \"id\": {\n \"type\": \"\",\n \"userId\": \"\"\n },\n \"kind\": \"\",\n \"propertyId\": \"\",\n \"webPropertyId\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/userDeletion/userDeletionRequests:upsert", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/userDeletion/userDeletionRequests:upsert"
payload = {
"deletionRequestTime": "",
"firebaseProjectId": "",
"id": {
"type": "",
"userId": ""
},
"kind": "",
"propertyId": "",
"webPropertyId": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/userDeletion/userDeletionRequests:upsert"
payload <- "{\n \"deletionRequestTime\": \"\",\n \"firebaseProjectId\": \"\",\n \"id\": {\n \"type\": \"\",\n \"userId\": \"\"\n },\n \"kind\": \"\",\n \"propertyId\": \"\",\n \"webPropertyId\": \"\"\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}}/userDeletion/userDeletionRequests:upsert")
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 \"deletionRequestTime\": \"\",\n \"firebaseProjectId\": \"\",\n \"id\": {\n \"type\": \"\",\n \"userId\": \"\"\n },\n \"kind\": \"\",\n \"propertyId\": \"\",\n \"webPropertyId\": \"\"\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/userDeletion/userDeletionRequests:upsert') do |req|
req.body = "{\n \"deletionRequestTime\": \"\",\n \"firebaseProjectId\": \"\",\n \"id\": {\n \"type\": \"\",\n \"userId\": \"\"\n },\n \"kind\": \"\",\n \"propertyId\": \"\",\n \"webPropertyId\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/userDeletion/userDeletionRequests:upsert";
let payload = json!({
"deletionRequestTime": "",
"firebaseProjectId": "",
"id": json!({
"type": "",
"userId": ""
}),
"kind": "",
"propertyId": "",
"webPropertyId": ""
});
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}}/userDeletion/userDeletionRequests:upsert \
--header 'content-type: application/json' \
--data '{
"deletionRequestTime": "",
"firebaseProjectId": "",
"id": {
"type": "",
"userId": ""
},
"kind": "",
"propertyId": "",
"webPropertyId": ""
}'
echo '{
"deletionRequestTime": "",
"firebaseProjectId": "",
"id": {
"type": "",
"userId": ""
},
"kind": "",
"propertyId": "",
"webPropertyId": ""
}' | \
http POST {{baseUrl}}/userDeletion/userDeletionRequests:upsert \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "deletionRequestTime": "",\n "firebaseProjectId": "",\n "id": {\n "type": "",\n "userId": ""\n },\n "kind": "",\n "propertyId": "",\n "webPropertyId": ""\n}' \
--output-document \
- {{baseUrl}}/userDeletion/userDeletionRequests:upsert
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"deletionRequestTime": "",
"firebaseProjectId": "",
"id": [
"type": "",
"userId": ""
],
"kind": "",
"propertyId": "",
"webPropertyId": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/userDeletion/userDeletionRequests:upsert")! 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()