Google Analytics Data API
POST
analyticsdata.properties.batchRunPivotReports
{{baseUrl}}/v1beta/:property:batchRunPivotReports
QUERY PARAMS
property
BODY json
{
"requests": [
{
"cohortSpec": {
"cohortReportSettings": {
"accumulate": false
},
"cohorts": [
{
"dateRange": {
"endDate": "",
"name": "",
"startDate": ""
},
"dimension": "",
"name": ""
}
],
"cohortsRange": {
"endOffset": 0,
"granularity": "",
"startOffset": 0
}
},
"currencyCode": "",
"dateRanges": [
{}
],
"dimensionFilter": {
"andGroup": {
"expressions": []
},
"filter": {
"betweenFilter": {
"fromValue": {
"doubleValue": "",
"int64Value": ""
},
"toValue": {}
},
"fieldName": "",
"inListFilter": {
"caseSensitive": false,
"values": []
},
"numericFilter": {
"operation": "",
"value": {}
},
"stringFilter": {
"caseSensitive": false,
"matchType": "",
"value": ""
}
},
"notExpression": "",
"orGroup": {}
},
"dimensions": [
{
"dimensionExpression": {
"concatenate": {
"delimiter": "",
"dimensionNames": []
},
"lowerCase": {
"dimensionName": ""
},
"upperCase": {}
},
"name": ""
}
],
"keepEmptyRows": false,
"metricFilter": {},
"metrics": [
{
"expression": "",
"invisible": false,
"name": ""
}
],
"pivots": [
{
"fieldNames": [],
"limit": "",
"metricAggregations": [],
"offset": "",
"orderBys": [
{
"desc": false,
"dimension": {
"dimensionName": "",
"orderType": ""
},
"metric": {
"metricName": ""
},
"pivot": {
"metricName": "",
"pivotSelections": [
{
"dimensionName": "",
"dimensionValue": ""
}
]
}
}
]
}
],
"property": "",
"returnPropertyQuota": false
}
]
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1beta/:property:batchRunPivotReports");
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 \"requests\": [\n {\n \"cohortSpec\": {\n \"cohortReportSettings\": {\n \"accumulate\": false\n },\n \"cohorts\": [\n {\n \"dateRange\": {\n \"endDate\": \"\",\n \"name\": \"\",\n \"startDate\": \"\"\n },\n \"dimension\": \"\",\n \"name\": \"\"\n }\n ],\n \"cohortsRange\": {\n \"endOffset\": 0,\n \"granularity\": \"\",\n \"startOffset\": 0\n }\n },\n \"currencyCode\": \"\",\n \"dateRanges\": [\n {}\n ],\n \"dimensionFilter\": {\n \"andGroup\": {\n \"expressions\": []\n },\n \"filter\": {\n \"betweenFilter\": {\n \"fromValue\": {\n \"doubleValue\": \"\",\n \"int64Value\": \"\"\n },\n \"toValue\": {}\n },\n \"fieldName\": \"\",\n \"inListFilter\": {\n \"caseSensitive\": false,\n \"values\": []\n },\n \"numericFilter\": {\n \"operation\": \"\",\n \"value\": {}\n },\n \"stringFilter\": {\n \"caseSensitive\": false,\n \"matchType\": \"\",\n \"value\": \"\"\n }\n },\n \"notExpression\": \"\",\n \"orGroup\": {}\n },\n \"dimensions\": [\n {\n \"dimensionExpression\": {\n \"concatenate\": {\n \"delimiter\": \"\",\n \"dimensionNames\": []\n },\n \"lowerCase\": {\n \"dimensionName\": \"\"\n },\n \"upperCase\": {}\n },\n \"name\": \"\"\n }\n ],\n \"keepEmptyRows\": false,\n \"metricFilter\": {},\n \"metrics\": [\n {\n \"expression\": \"\",\n \"invisible\": false,\n \"name\": \"\"\n }\n ],\n \"pivots\": [\n {\n \"fieldNames\": [],\n \"limit\": \"\",\n \"metricAggregations\": [],\n \"offset\": \"\",\n \"orderBys\": [\n {\n \"desc\": false,\n \"dimension\": {\n \"dimensionName\": \"\",\n \"orderType\": \"\"\n },\n \"metric\": {\n \"metricName\": \"\"\n },\n \"pivot\": {\n \"metricName\": \"\",\n \"pivotSelections\": [\n {\n \"dimensionName\": \"\",\n \"dimensionValue\": \"\"\n }\n ]\n }\n }\n ]\n }\n ],\n \"property\": \"\",\n \"returnPropertyQuota\": false\n }\n ]\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1beta/:property:batchRunPivotReports" {:content-type :json
:form-params {:requests [{:cohortSpec {:cohortReportSettings {:accumulate false}
:cohorts [{:dateRange {:endDate ""
:name ""
:startDate ""}
:dimension ""
:name ""}]
:cohortsRange {:endOffset 0
:granularity ""
:startOffset 0}}
:currencyCode ""
:dateRanges [{}]
:dimensionFilter {:andGroup {:expressions []}
:filter {:betweenFilter {:fromValue {:doubleValue ""
:int64Value ""}
:toValue {}}
:fieldName ""
:inListFilter {:caseSensitive false
:values []}
:numericFilter {:operation ""
:value {}}
:stringFilter {:caseSensitive false
:matchType ""
:value ""}}
:notExpression ""
:orGroup {}}
:dimensions [{:dimensionExpression {:concatenate {:delimiter ""
:dimensionNames []}
:lowerCase {:dimensionName ""}
:upperCase {}}
:name ""}]
:keepEmptyRows false
:metricFilter {}
:metrics [{:expression ""
:invisible false
:name ""}]
:pivots [{:fieldNames []
:limit ""
:metricAggregations []
:offset ""
:orderBys [{:desc false
:dimension {:dimensionName ""
:orderType ""}
:metric {:metricName ""}
:pivot {:metricName ""
:pivotSelections [{:dimensionName ""
:dimensionValue ""}]}}]}]
:property ""
:returnPropertyQuota false}]}})
require "http/client"
url = "{{baseUrl}}/v1beta/:property:batchRunPivotReports"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"requests\": [\n {\n \"cohortSpec\": {\n \"cohortReportSettings\": {\n \"accumulate\": false\n },\n \"cohorts\": [\n {\n \"dateRange\": {\n \"endDate\": \"\",\n \"name\": \"\",\n \"startDate\": \"\"\n },\n \"dimension\": \"\",\n \"name\": \"\"\n }\n ],\n \"cohortsRange\": {\n \"endOffset\": 0,\n \"granularity\": \"\",\n \"startOffset\": 0\n }\n },\n \"currencyCode\": \"\",\n \"dateRanges\": [\n {}\n ],\n \"dimensionFilter\": {\n \"andGroup\": {\n \"expressions\": []\n },\n \"filter\": {\n \"betweenFilter\": {\n \"fromValue\": {\n \"doubleValue\": \"\",\n \"int64Value\": \"\"\n },\n \"toValue\": {}\n },\n \"fieldName\": \"\",\n \"inListFilter\": {\n \"caseSensitive\": false,\n \"values\": []\n },\n \"numericFilter\": {\n \"operation\": \"\",\n \"value\": {}\n },\n \"stringFilter\": {\n \"caseSensitive\": false,\n \"matchType\": \"\",\n \"value\": \"\"\n }\n },\n \"notExpression\": \"\",\n \"orGroup\": {}\n },\n \"dimensions\": [\n {\n \"dimensionExpression\": {\n \"concatenate\": {\n \"delimiter\": \"\",\n \"dimensionNames\": []\n },\n \"lowerCase\": {\n \"dimensionName\": \"\"\n },\n \"upperCase\": {}\n },\n \"name\": \"\"\n }\n ],\n \"keepEmptyRows\": false,\n \"metricFilter\": {},\n \"metrics\": [\n {\n \"expression\": \"\",\n \"invisible\": false,\n \"name\": \"\"\n }\n ],\n \"pivots\": [\n {\n \"fieldNames\": [],\n \"limit\": \"\",\n \"metricAggregations\": [],\n \"offset\": \"\",\n \"orderBys\": [\n {\n \"desc\": false,\n \"dimension\": {\n \"dimensionName\": \"\",\n \"orderType\": \"\"\n },\n \"metric\": {\n \"metricName\": \"\"\n },\n \"pivot\": {\n \"metricName\": \"\",\n \"pivotSelections\": [\n {\n \"dimensionName\": \"\",\n \"dimensionValue\": \"\"\n }\n ]\n }\n }\n ]\n }\n ],\n \"property\": \"\",\n \"returnPropertyQuota\": false\n }\n ]\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/v1beta/:property:batchRunPivotReports"),
Content = new StringContent("{\n \"requests\": [\n {\n \"cohortSpec\": {\n \"cohortReportSettings\": {\n \"accumulate\": false\n },\n \"cohorts\": [\n {\n \"dateRange\": {\n \"endDate\": \"\",\n \"name\": \"\",\n \"startDate\": \"\"\n },\n \"dimension\": \"\",\n \"name\": \"\"\n }\n ],\n \"cohortsRange\": {\n \"endOffset\": 0,\n \"granularity\": \"\",\n \"startOffset\": 0\n }\n },\n \"currencyCode\": \"\",\n \"dateRanges\": [\n {}\n ],\n \"dimensionFilter\": {\n \"andGroup\": {\n \"expressions\": []\n },\n \"filter\": {\n \"betweenFilter\": {\n \"fromValue\": {\n \"doubleValue\": \"\",\n \"int64Value\": \"\"\n },\n \"toValue\": {}\n },\n \"fieldName\": \"\",\n \"inListFilter\": {\n \"caseSensitive\": false,\n \"values\": []\n },\n \"numericFilter\": {\n \"operation\": \"\",\n \"value\": {}\n },\n \"stringFilter\": {\n \"caseSensitive\": false,\n \"matchType\": \"\",\n \"value\": \"\"\n }\n },\n \"notExpression\": \"\",\n \"orGroup\": {}\n },\n \"dimensions\": [\n {\n \"dimensionExpression\": {\n \"concatenate\": {\n \"delimiter\": \"\",\n \"dimensionNames\": []\n },\n \"lowerCase\": {\n \"dimensionName\": \"\"\n },\n \"upperCase\": {}\n },\n \"name\": \"\"\n }\n ],\n \"keepEmptyRows\": false,\n \"metricFilter\": {},\n \"metrics\": [\n {\n \"expression\": \"\",\n \"invisible\": false,\n \"name\": \"\"\n }\n ],\n \"pivots\": [\n {\n \"fieldNames\": [],\n \"limit\": \"\",\n \"metricAggregations\": [],\n \"offset\": \"\",\n \"orderBys\": [\n {\n \"desc\": false,\n \"dimension\": {\n \"dimensionName\": \"\",\n \"orderType\": \"\"\n },\n \"metric\": {\n \"metricName\": \"\"\n },\n \"pivot\": {\n \"metricName\": \"\",\n \"pivotSelections\": [\n {\n \"dimensionName\": \"\",\n \"dimensionValue\": \"\"\n }\n ]\n }\n }\n ]\n }\n ],\n \"property\": \"\",\n \"returnPropertyQuota\": false\n }\n ]\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1beta/:property:batchRunPivotReports");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"requests\": [\n {\n \"cohortSpec\": {\n \"cohortReportSettings\": {\n \"accumulate\": false\n },\n \"cohorts\": [\n {\n \"dateRange\": {\n \"endDate\": \"\",\n \"name\": \"\",\n \"startDate\": \"\"\n },\n \"dimension\": \"\",\n \"name\": \"\"\n }\n ],\n \"cohortsRange\": {\n \"endOffset\": 0,\n \"granularity\": \"\",\n \"startOffset\": 0\n }\n },\n \"currencyCode\": \"\",\n \"dateRanges\": [\n {}\n ],\n \"dimensionFilter\": {\n \"andGroup\": {\n \"expressions\": []\n },\n \"filter\": {\n \"betweenFilter\": {\n \"fromValue\": {\n \"doubleValue\": \"\",\n \"int64Value\": \"\"\n },\n \"toValue\": {}\n },\n \"fieldName\": \"\",\n \"inListFilter\": {\n \"caseSensitive\": false,\n \"values\": []\n },\n \"numericFilter\": {\n \"operation\": \"\",\n \"value\": {}\n },\n \"stringFilter\": {\n \"caseSensitive\": false,\n \"matchType\": \"\",\n \"value\": \"\"\n }\n },\n \"notExpression\": \"\",\n \"orGroup\": {}\n },\n \"dimensions\": [\n {\n \"dimensionExpression\": {\n \"concatenate\": {\n \"delimiter\": \"\",\n \"dimensionNames\": []\n },\n \"lowerCase\": {\n \"dimensionName\": \"\"\n },\n \"upperCase\": {}\n },\n \"name\": \"\"\n }\n ],\n \"keepEmptyRows\": false,\n \"metricFilter\": {},\n \"metrics\": [\n {\n \"expression\": \"\",\n \"invisible\": false,\n \"name\": \"\"\n }\n ],\n \"pivots\": [\n {\n \"fieldNames\": [],\n \"limit\": \"\",\n \"metricAggregations\": [],\n \"offset\": \"\",\n \"orderBys\": [\n {\n \"desc\": false,\n \"dimension\": {\n \"dimensionName\": \"\",\n \"orderType\": \"\"\n },\n \"metric\": {\n \"metricName\": \"\"\n },\n \"pivot\": {\n \"metricName\": \"\",\n \"pivotSelections\": [\n {\n \"dimensionName\": \"\",\n \"dimensionValue\": \"\"\n }\n ]\n }\n }\n ]\n }\n ],\n \"property\": \"\",\n \"returnPropertyQuota\": false\n }\n ]\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1beta/:property:batchRunPivotReports"
payload := strings.NewReader("{\n \"requests\": [\n {\n \"cohortSpec\": {\n \"cohortReportSettings\": {\n \"accumulate\": false\n },\n \"cohorts\": [\n {\n \"dateRange\": {\n \"endDate\": \"\",\n \"name\": \"\",\n \"startDate\": \"\"\n },\n \"dimension\": \"\",\n \"name\": \"\"\n }\n ],\n \"cohortsRange\": {\n \"endOffset\": 0,\n \"granularity\": \"\",\n \"startOffset\": 0\n }\n },\n \"currencyCode\": \"\",\n \"dateRanges\": [\n {}\n ],\n \"dimensionFilter\": {\n \"andGroup\": {\n \"expressions\": []\n },\n \"filter\": {\n \"betweenFilter\": {\n \"fromValue\": {\n \"doubleValue\": \"\",\n \"int64Value\": \"\"\n },\n \"toValue\": {}\n },\n \"fieldName\": \"\",\n \"inListFilter\": {\n \"caseSensitive\": false,\n \"values\": []\n },\n \"numericFilter\": {\n \"operation\": \"\",\n \"value\": {}\n },\n \"stringFilter\": {\n \"caseSensitive\": false,\n \"matchType\": \"\",\n \"value\": \"\"\n }\n },\n \"notExpression\": \"\",\n \"orGroup\": {}\n },\n \"dimensions\": [\n {\n \"dimensionExpression\": {\n \"concatenate\": {\n \"delimiter\": \"\",\n \"dimensionNames\": []\n },\n \"lowerCase\": {\n \"dimensionName\": \"\"\n },\n \"upperCase\": {}\n },\n \"name\": \"\"\n }\n ],\n \"keepEmptyRows\": false,\n \"metricFilter\": {},\n \"metrics\": [\n {\n \"expression\": \"\",\n \"invisible\": false,\n \"name\": \"\"\n }\n ],\n \"pivots\": [\n {\n \"fieldNames\": [],\n \"limit\": \"\",\n \"metricAggregations\": [],\n \"offset\": \"\",\n \"orderBys\": [\n {\n \"desc\": false,\n \"dimension\": {\n \"dimensionName\": \"\",\n \"orderType\": \"\"\n },\n \"metric\": {\n \"metricName\": \"\"\n },\n \"pivot\": {\n \"metricName\": \"\",\n \"pivotSelections\": [\n {\n \"dimensionName\": \"\",\n \"dimensionValue\": \"\"\n }\n ]\n }\n }\n ]\n }\n ],\n \"property\": \"\",\n \"returnPropertyQuota\": false\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/v1beta/:property:batchRunPivotReports HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 2536
{
"requests": [
{
"cohortSpec": {
"cohortReportSettings": {
"accumulate": false
},
"cohorts": [
{
"dateRange": {
"endDate": "",
"name": "",
"startDate": ""
},
"dimension": "",
"name": ""
}
],
"cohortsRange": {
"endOffset": 0,
"granularity": "",
"startOffset": 0
}
},
"currencyCode": "",
"dateRanges": [
{}
],
"dimensionFilter": {
"andGroup": {
"expressions": []
},
"filter": {
"betweenFilter": {
"fromValue": {
"doubleValue": "",
"int64Value": ""
},
"toValue": {}
},
"fieldName": "",
"inListFilter": {
"caseSensitive": false,
"values": []
},
"numericFilter": {
"operation": "",
"value": {}
},
"stringFilter": {
"caseSensitive": false,
"matchType": "",
"value": ""
}
},
"notExpression": "",
"orGroup": {}
},
"dimensions": [
{
"dimensionExpression": {
"concatenate": {
"delimiter": "",
"dimensionNames": []
},
"lowerCase": {
"dimensionName": ""
},
"upperCase": {}
},
"name": ""
}
],
"keepEmptyRows": false,
"metricFilter": {},
"metrics": [
{
"expression": "",
"invisible": false,
"name": ""
}
],
"pivots": [
{
"fieldNames": [],
"limit": "",
"metricAggregations": [],
"offset": "",
"orderBys": [
{
"desc": false,
"dimension": {
"dimensionName": "",
"orderType": ""
},
"metric": {
"metricName": ""
},
"pivot": {
"metricName": "",
"pivotSelections": [
{
"dimensionName": "",
"dimensionValue": ""
}
]
}
}
]
}
],
"property": "",
"returnPropertyQuota": false
}
]
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1beta/:property:batchRunPivotReports")
.setHeader("content-type", "application/json")
.setBody("{\n \"requests\": [\n {\n \"cohortSpec\": {\n \"cohortReportSettings\": {\n \"accumulate\": false\n },\n \"cohorts\": [\n {\n \"dateRange\": {\n \"endDate\": \"\",\n \"name\": \"\",\n \"startDate\": \"\"\n },\n \"dimension\": \"\",\n \"name\": \"\"\n }\n ],\n \"cohortsRange\": {\n \"endOffset\": 0,\n \"granularity\": \"\",\n \"startOffset\": 0\n }\n },\n \"currencyCode\": \"\",\n \"dateRanges\": [\n {}\n ],\n \"dimensionFilter\": {\n \"andGroup\": {\n \"expressions\": []\n },\n \"filter\": {\n \"betweenFilter\": {\n \"fromValue\": {\n \"doubleValue\": \"\",\n \"int64Value\": \"\"\n },\n \"toValue\": {}\n },\n \"fieldName\": \"\",\n \"inListFilter\": {\n \"caseSensitive\": false,\n \"values\": []\n },\n \"numericFilter\": {\n \"operation\": \"\",\n \"value\": {}\n },\n \"stringFilter\": {\n \"caseSensitive\": false,\n \"matchType\": \"\",\n \"value\": \"\"\n }\n },\n \"notExpression\": \"\",\n \"orGroup\": {}\n },\n \"dimensions\": [\n {\n \"dimensionExpression\": {\n \"concatenate\": {\n \"delimiter\": \"\",\n \"dimensionNames\": []\n },\n \"lowerCase\": {\n \"dimensionName\": \"\"\n },\n \"upperCase\": {}\n },\n \"name\": \"\"\n }\n ],\n \"keepEmptyRows\": false,\n \"metricFilter\": {},\n \"metrics\": [\n {\n \"expression\": \"\",\n \"invisible\": false,\n \"name\": \"\"\n }\n ],\n \"pivots\": [\n {\n \"fieldNames\": [],\n \"limit\": \"\",\n \"metricAggregations\": [],\n \"offset\": \"\",\n \"orderBys\": [\n {\n \"desc\": false,\n \"dimension\": {\n \"dimensionName\": \"\",\n \"orderType\": \"\"\n },\n \"metric\": {\n \"metricName\": \"\"\n },\n \"pivot\": {\n \"metricName\": \"\",\n \"pivotSelections\": [\n {\n \"dimensionName\": \"\",\n \"dimensionValue\": \"\"\n }\n ]\n }\n }\n ]\n }\n ],\n \"property\": \"\",\n \"returnPropertyQuota\": false\n }\n ]\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1beta/:property:batchRunPivotReports"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"requests\": [\n {\n \"cohortSpec\": {\n \"cohortReportSettings\": {\n \"accumulate\": false\n },\n \"cohorts\": [\n {\n \"dateRange\": {\n \"endDate\": \"\",\n \"name\": \"\",\n \"startDate\": \"\"\n },\n \"dimension\": \"\",\n \"name\": \"\"\n }\n ],\n \"cohortsRange\": {\n \"endOffset\": 0,\n \"granularity\": \"\",\n \"startOffset\": 0\n }\n },\n \"currencyCode\": \"\",\n \"dateRanges\": [\n {}\n ],\n \"dimensionFilter\": {\n \"andGroup\": {\n \"expressions\": []\n },\n \"filter\": {\n \"betweenFilter\": {\n \"fromValue\": {\n \"doubleValue\": \"\",\n \"int64Value\": \"\"\n },\n \"toValue\": {}\n },\n \"fieldName\": \"\",\n \"inListFilter\": {\n \"caseSensitive\": false,\n \"values\": []\n },\n \"numericFilter\": {\n \"operation\": \"\",\n \"value\": {}\n },\n \"stringFilter\": {\n \"caseSensitive\": false,\n \"matchType\": \"\",\n \"value\": \"\"\n }\n },\n \"notExpression\": \"\",\n \"orGroup\": {}\n },\n \"dimensions\": [\n {\n \"dimensionExpression\": {\n \"concatenate\": {\n \"delimiter\": \"\",\n \"dimensionNames\": []\n },\n \"lowerCase\": {\n \"dimensionName\": \"\"\n },\n \"upperCase\": {}\n },\n \"name\": \"\"\n }\n ],\n \"keepEmptyRows\": false,\n \"metricFilter\": {},\n \"metrics\": [\n {\n \"expression\": \"\",\n \"invisible\": false,\n \"name\": \"\"\n }\n ],\n \"pivots\": [\n {\n \"fieldNames\": [],\n \"limit\": \"\",\n \"metricAggregations\": [],\n \"offset\": \"\",\n \"orderBys\": [\n {\n \"desc\": false,\n \"dimension\": {\n \"dimensionName\": \"\",\n \"orderType\": \"\"\n },\n \"metric\": {\n \"metricName\": \"\"\n },\n \"pivot\": {\n \"metricName\": \"\",\n \"pivotSelections\": [\n {\n \"dimensionName\": \"\",\n \"dimensionValue\": \"\"\n }\n ]\n }\n }\n ]\n }\n ],\n \"property\": \"\",\n \"returnPropertyQuota\": false\n }\n ]\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"requests\": [\n {\n \"cohortSpec\": {\n \"cohortReportSettings\": {\n \"accumulate\": false\n },\n \"cohorts\": [\n {\n \"dateRange\": {\n \"endDate\": \"\",\n \"name\": \"\",\n \"startDate\": \"\"\n },\n \"dimension\": \"\",\n \"name\": \"\"\n }\n ],\n \"cohortsRange\": {\n \"endOffset\": 0,\n \"granularity\": \"\",\n \"startOffset\": 0\n }\n },\n \"currencyCode\": \"\",\n \"dateRanges\": [\n {}\n ],\n \"dimensionFilter\": {\n \"andGroup\": {\n \"expressions\": []\n },\n \"filter\": {\n \"betweenFilter\": {\n \"fromValue\": {\n \"doubleValue\": \"\",\n \"int64Value\": \"\"\n },\n \"toValue\": {}\n },\n \"fieldName\": \"\",\n \"inListFilter\": {\n \"caseSensitive\": false,\n \"values\": []\n },\n \"numericFilter\": {\n \"operation\": \"\",\n \"value\": {}\n },\n \"stringFilter\": {\n \"caseSensitive\": false,\n \"matchType\": \"\",\n \"value\": \"\"\n }\n },\n \"notExpression\": \"\",\n \"orGroup\": {}\n },\n \"dimensions\": [\n {\n \"dimensionExpression\": {\n \"concatenate\": {\n \"delimiter\": \"\",\n \"dimensionNames\": []\n },\n \"lowerCase\": {\n \"dimensionName\": \"\"\n },\n \"upperCase\": {}\n },\n \"name\": \"\"\n }\n ],\n \"keepEmptyRows\": false,\n \"metricFilter\": {},\n \"metrics\": [\n {\n \"expression\": \"\",\n \"invisible\": false,\n \"name\": \"\"\n }\n ],\n \"pivots\": [\n {\n \"fieldNames\": [],\n \"limit\": \"\",\n \"metricAggregations\": [],\n \"offset\": \"\",\n \"orderBys\": [\n {\n \"desc\": false,\n \"dimension\": {\n \"dimensionName\": \"\",\n \"orderType\": \"\"\n },\n \"metric\": {\n \"metricName\": \"\"\n },\n \"pivot\": {\n \"metricName\": \"\",\n \"pivotSelections\": [\n {\n \"dimensionName\": \"\",\n \"dimensionValue\": \"\"\n }\n ]\n }\n }\n ]\n }\n ],\n \"property\": \"\",\n \"returnPropertyQuota\": false\n }\n ]\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1beta/:property:batchRunPivotReports")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1beta/:property:batchRunPivotReports")
.header("content-type", "application/json")
.body("{\n \"requests\": [\n {\n \"cohortSpec\": {\n \"cohortReportSettings\": {\n \"accumulate\": false\n },\n \"cohorts\": [\n {\n \"dateRange\": {\n \"endDate\": \"\",\n \"name\": \"\",\n \"startDate\": \"\"\n },\n \"dimension\": \"\",\n \"name\": \"\"\n }\n ],\n \"cohortsRange\": {\n \"endOffset\": 0,\n \"granularity\": \"\",\n \"startOffset\": 0\n }\n },\n \"currencyCode\": \"\",\n \"dateRanges\": [\n {}\n ],\n \"dimensionFilter\": {\n \"andGroup\": {\n \"expressions\": []\n },\n \"filter\": {\n \"betweenFilter\": {\n \"fromValue\": {\n \"doubleValue\": \"\",\n \"int64Value\": \"\"\n },\n \"toValue\": {}\n },\n \"fieldName\": \"\",\n \"inListFilter\": {\n \"caseSensitive\": false,\n \"values\": []\n },\n \"numericFilter\": {\n \"operation\": \"\",\n \"value\": {}\n },\n \"stringFilter\": {\n \"caseSensitive\": false,\n \"matchType\": \"\",\n \"value\": \"\"\n }\n },\n \"notExpression\": \"\",\n \"orGroup\": {}\n },\n \"dimensions\": [\n {\n \"dimensionExpression\": {\n \"concatenate\": {\n \"delimiter\": \"\",\n \"dimensionNames\": []\n },\n \"lowerCase\": {\n \"dimensionName\": \"\"\n },\n \"upperCase\": {}\n },\n \"name\": \"\"\n }\n ],\n \"keepEmptyRows\": false,\n \"metricFilter\": {},\n \"metrics\": [\n {\n \"expression\": \"\",\n \"invisible\": false,\n \"name\": \"\"\n }\n ],\n \"pivots\": [\n {\n \"fieldNames\": [],\n \"limit\": \"\",\n \"metricAggregations\": [],\n \"offset\": \"\",\n \"orderBys\": [\n {\n \"desc\": false,\n \"dimension\": {\n \"dimensionName\": \"\",\n \"orderType\": \"\"\n },\n \"metric\": {\n \"metricName\": \"\"\n },\n \"pivot\": {\n \"metricName\": \"\",\n \"pivotSelections\": [\n {\n \"dimensionName\": \"\",\n \"dimensionValue\": \"\"\n }\n ]\n }\n }\n ]\n }\n ],\n \"property\": \"\",\n \"returnPropertyQuota\": false\n }\n ]\n}")
.asString();
const data = JSON.stringify({
requests: [
{
cohortSpec: {
cohortReportSettings: {
accumulate: false
},
cohorts: [
{
dateRange: {
endDate: '',
name: '',
startDate: ''
},
dimension: '',
name: ''
}
],
cohortsRange: {
endOffset: 0,
granularity: '',
startOffset: 0
}
},
currencyCode: '',
dateRanges: [
{}
],
dimensionFilter: {
andGroup: {
expressions: []
},
filter: {
betweenFilter: {
fromValue: {
doubleValue: '',
int64Value: ''
},
toValue: {}
},
fieldName: '',
inListFilter: {
caseSensitive: false,
values: []
},
numericFilter: {
operation: '',
value: {}
},
stringFilter: {
caseSensitive: false,
matchType: '',
value: ''
}
},
notExpression: '',
orGroup: {}
},
dimensions: [
{
dimensionExpression: {
concatenate: {
delimiter: '',
dimensionNames: []
},
lowerCase: {
dimensionName: ''
},
upperCase: {}
},
name: ''
}
],
keepEmptyRows: false,
metricFilter: {},
metrics: [
{
expression: '',
invisible: false,
name: ''
}
],
pivots: [
{
fieldNames: [],
limit: '',
metricAggregations: [],
offset: '',
orderBys: [
{
desc: false,
dimension: {
dimensionName: '',
orderType: ''
},
metric: {
metricName: ''
},
pivot: {
metricName: '',
pivotSelections: [
{
dimensionName: '',
dimensionValue: ''
}
]
}
}
]
}
],
property: '',
returnPropertyQuota: false
}
]
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v1beta/:property:batchRunPivotReports');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1beta/:property:batchRunPivotReports',
headers: {'content-type': 'application/json'},
data: {
requests: [
{
cohortSpec: {
cohortReportSettings: {accumulate: false},
cohorts: [{dateRange: {endDate: '', name: '', startDate: ''}, dimension: '', name: ''}],
cohortsRange: {endOffset: 0, granularity: '', startOffset: 0}
},
currencyCode: '',
dateRanges: [{}],
dimensionFilter: {
andGroup: {expressions: []},
filter: {
betweenFilter: {fromValue: {doubleValue: '', int64Value: ''}, toValue: {}},
fieldName: '',
inListFilter: {caseSensitive: false, values: []},
numericFilter: {operation: '', value: {}},
stringFilter: {caseSensitive: false, matchType: '', value: ''}
},
notExpression: '',
orGroup: {}
},
dimensions: [
{
dimensionExpression: {
concatenate: {delimiter: '', dimensionNames: []},
lowerCase: {dimensionName: ''},
upperCase: {}
},
name: ''
}
],
keepEmptyRows: false,
metricFilter: {},
metrics: [{expression: '', invisible: false, name: ''}],
pivots: [
{
fieldNames: [],
limit: '',
metricAggregations: [],
offset: '',
orderBys: [
{
desc: false,
dimension: {dimensionName: '', orderType: ''},
metric: {metricName: ''},
pivot: {metricName: '', pivotSelections: [{dimensionName: '', dimensionValue: ''}]}
}
]
}
],
property: '',
returnPropertyQuota: false
}
]
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1beta/:property:batchRunPivotReports';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"requests":[{"cohortSpec":{"cohortReportSettings":{"accumulate":false},"cohorts":[{"dateRange":{"endDate":"","name":"","startDate":""},"dimension":"","name":""}],"cohortsRange":{"endOffset":0,"granularity":"","startOffset":0}},"currencyCode":"","dateRanges":[{}],"dimensionFilter":{"andGroup":{"expressions":[]},"filter":{"betweenFilter":{"fromValue":{"doubleValue":"","int64Value":""},"toValue":{}},"fieldName":"","inListFilter":{"caseSensitive":false,"values":[]},"numericFilter":{"operation":"","value":{}},"stringFilter":{"caseSensitive":false,"matchType":"","value":""}},"notExpression":"","orGroup":{}},"dimensions":[{"dimensionExpression":{"concatenate":{"delimiter":"","dimensionNames":[]},"lowerCase":{"dimensionName":""},"upperCase":{}},"name":""}],"keepEmptyRows":false,"metricFilter":{},"metrics":[{"expression":"","invisible":false,"name":""}],"pivots":[{"fieldNames":[],"limit":"","metricAggregations":[],"offset":"","orderBys":[{"desc":false,"dimension":{"dimensionName":"","orderType":""},"metric":{"metricName":""},"pivot":{"metricName":"","pivotSelections":[{"dimensionName":"","dimensionValue":""}]}}]}],"property":"","returnPropertyQuota":false}]}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1beta/:property:batchRunPivotReports',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "requests": [\n {\n "cohortSpec": {\n "cohortReportSettings": {\n "accumulate": false\n },\n "cohorts": [\n {\n "dateRange": {\n "endDate": "",\n "name": "",\n "startDate": ""\n },\n "dimension": "",\n "name": ""\n }\n ],\n "cohortsRange": {\n "endOffset": 0,\n "granularity": "",\n "startOffset": 0\n }\n },\n "currencyCode": "",\n "dateRanges": [\n {}\n ],\n "dimensionFilter": {\n "andGroup": {\n "expressions": []\n },\n "filter": {\n "betweenFilter": {\n "fromValue": {\n "doubleValue": "",\n "int64Value": ""\n },\n "toValue": {}\n },\n "fieldName": "",\n "inListFilter": {\n "caseSensitive": false,\n "values": []\n },\n "numericFilter": {\n "operation": "",\n "value": {}\n },\n "stringFilter": {\n "caseSensitive": false,\n "matchType": "",\n "value": ""\n }\n },\n "notExpression": "",\n "orGroup": {}\n },\n "dimensions": [\n {\n "dimensionExpression": {\n "concatenate": {\n "delimiter": "",\n "dimensionNames": []\n },\n "lowerCase": {\n "dimensionName": ""\n },\n "upperCase": {}\n },\n "name": ""\n }\n ],\n "keepEmptyRows": false,\n "metricFilter": {},\n "metrics": [\n {\n "expression": "",\n "invisible": false,\n "name": ""\n }\n ],\n "pivots": [\n {\n "fieldNames": [],\n "limit": "",\n "metricAggregations": [],\n "offset": "",\n "orderBys": [\n {\n "desc": false,\n "dimension": {\n "dimensionName": "",\n "orderType": ""\n },\n "metric": {\n "metricName": ""\n },\n "pivot": {\n "metricName": "",\n "pivotSelections": [\n {\n "dimensionName": "",\n "dimensionValue": ""\n }\n ]\n }\n }\n ]\n }\n ],\n "property": "",\n "returnPropertyQuota": false\n }\n ]\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"requests\": [\n {\n \"cohortSpec\": {\n \"cohortReportSettings\": {\n \"accumulate\": false\n },\n \"cohorts\": [\n {\n \"dateRange\": {\n \"endDate\": \"\",\n \"name\": \"\",\n \"startDate\": \"\"\n },\n \"dimension\": \"\",\n \"name\": \"\"\n }\n ],\n \"cohortsRange\": {\n \"endOffset\": 0,\n \"granularity\": \"\",\n \"startOffset\": 0\n }\n },\n \"currencyCode\": \"\",\n \"dateRanges\": [\n {}\n ],\n \"dimensionFilter\": {\n \"andGroup\": {\n \"expressions\": []\n },\n \"filter\": {\n \"betweenFilter\": {\n \"fromValue\": {\n \"doubleValue\": \"\",\n \"int64Value\": \"\"\n },\n \"toValue\": {}\n },\n \"fieldName\": \"\",\n \"inListFilter\": {\n \"caseSensitive\": false,\n \"values\": []\n },\n \"numericFilter\": {\n \"operation\": \"\",\n \"value\": {}\n },\n \"stringFilter\": {\n \"caseSensitive\": false,\n \"matchType\": \"\",\n \"value\": \"\"\n }\n },\n \"notExpression\": \"\",\n \"orGroup\": {}\n },\n \"dimensions\": [\n {\n \"dimensionExpression\": {\n \"concatenate\": {\n \"delimiter\": \"\",\n \"dimensionNames\": []\n },\n \"lowerCase\": {\n \"dimensionName\": \"\"\n },\n \"upperCase\": {}\n },\n \"name\": \"\"\n }\n ],\n \"keepEmptyRows\": false,\n \"metricFilter\": {},\n \"metrics\": [\n {\n \"expression\": \"\",\n \"invisible\": false,\n \"name\": \"\"\n }\n ],\n \"pivots\": [\n {\n \"fieldNames\": [],\n \"limit\": \"\",\n \"metricAggregations\": [],\n \"offset\": \"\",\n \"orderBys\": [\n {\n \"desc\": false,\n \"dimension\": {\n \"dimensionName\": \"\",\n \"orderType\": \"\"\n },\n \"metric\": {\n \"metricName\": \"\"\n },\n \"pivot\": {\n \"metricName\": \"\",\n \"pivotSelections\": [\n {\n \"dimensionName\": \"\",\n \"dimensionValue\": \"\"\n }\n ]\n }\n }\n ]\n }\n ],\n \"property\": \"\",\n \"returnPropertyQuota\": false\n }\n ]\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1beta/:property:batchRunPivotReports")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1beta/:property:batchRunPivotReports',
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({
requests: [
{
cohortSpec: {
cohortReportSettings: {accumulate: false},
cohorts: [{dateRange: {endDate: '', name: '', startDate: ''}, dimension: '', name: ''}],
cohortsRange: {endOffset: 0, granularity: '', startOffset: 0}
},
currencyCode: '',
dateRanges: [{}],
dimensionFilter: {
andGroup: {expressions: []},
filter: {
betweenFilter: {fromValue: {doubleValue: '', int64Value: ''}, toValue: {}},
fieldName: '',
inListFilter: {caseSensitive: false, values: []},
numericFilter: {operation: '', value: {}},
stringFilter: {caseSensitive: false, matchType: '', value: ''}
},
notExpression: '',
orGroup: {}
},
dimensions: [
{
dimensionExpression: {
concatenate: {delimiter: '', dimensionNames: []},
lowerCase: {dimensionName: ''},
upperCase: {}
},
name: ''
}
],
keepEmptyRows: false,
metricFilter: {},
metrics: [{expression: '', invisible: false, name: ''}],
pivots: [
{
fieldNames: [],
limit: '',
metricAggregations: [],
offset: '',
orderBys: [
{
desc: false,
dimension: {dimensionName: '', orderType: ''},
metric: {metricName: ''},
pivot: {metricName: '', pivotSelections: [{dimensionName: '', dimensionValue: ''}]}
}
]
}
],
property: '',
returnPropertyQuota: false
}
]
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1beta/:property:batchRunPivotReports',
headers: {'content-type': 'application/json'},
body: {
requests: [
{
cohortSpec: {
cohortReportSettings: {accumulate: false},
cohorts: [{dateRange: {endDate: '', name: '', startDate: ''}, dimension: '', name: ''}],
cohortsRange: {endOffset: 0, granularity: '', startOffset: 0}
},
currencyCode: '',
dateRanges: [{}],
dimensionFilter: {
andGroup: {expressions: []},
filter: {
betweenFilter: {fromValue: {doubleValue: '', int64Value: ''}, toValue: {}},
fieldName: '',
inListFilter: {caseSensitive: false, values: []},
numericFilter: {operation: '', value: {}},
stringFilter: {caseSensitive: false, matchType: '', value: ''}
},
notExpression: '',
orGroup: {}
},
dimensions: [
{
dimensionExpression: {
concatenate: {delimiter: '', dimensionNames: []},
lowerCase: {dimensionName: ''},
upperCase: {}
},
name: ''
}
],
keepEmptyRows: false,
metricFilter: {},
metrics: [{expression: '', invisible: false, name: ''}],
pivots: [
{
fieldNames: [],
limit: '',
metricAggregations: [],
offset: '',
orderBys: [
{
desc: false,
dimension: {dimensionName: '', orderType: ''},
metric: {metricName: ''},
pivot: {metricName: '', pivotSelections: [{dimensionName: '', dimensionValue: ''}]}
}
]
}
],
property: '',
returnPropertyQuota: false
}
]
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/v1beta/:property:batchRunPivotReports');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
requests: [
{
cohortSpec: {
cohortReportSettings: {
accumulate: false
},
cohorts: [
{
dateRange: {
endDate: '',
name: '',
startDate: ''
},
dimension: '',
name: ''
}
],
cohortsRange: {
endOffset: 0,
granularity: '',
startOffset: 0
}
},
currencyCode: '',
dateRanges: [
{}
],
dimensionFilter: {
andGroup: {
expressions: []
},
filter: {
betweenFilter: {
fromValue: {
doubleValue: '',
int64Value: ''
},
toValue: {}
},
fieldName: '',
inListFilter: {
caseSensitive: false,
values: []
},
numericFilter: {
operation: '',
value: {}
},
stringFilter: {
caseSensitive: false,
matchType: '',
value: ''
}
},
notExpression: '',
orGroup: {}
},
dimensions: [
{
dimensionExpression: {
concatenate: {
delimiter: '',
dimensionNames: []
},
lowerCase: {
dimensionName: ''
},
upperCase: {}
},
name: ''
}
],
keepEmptyRows: false,
metricFilter: {},
metrics: [
{
expression: '',
invisible: false,
name: ''
}
],
pivots: [
{
fieldNames: [],
limit: '',
metricAggregations: [],
offset: '',
orderBys: [
{
desc: false,
dimension: {
dimensionName: '',
orderType: ''
},
metric: {
metricName: ''
},
pivot: {
metricName: '',
pivotSelections: [
{
dimensionName: '',
dimensionValue: ''
}
]
}
}
]
}
],
property: '',
returnPropertyQuota: false
}
]
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/v1beta/:property:batchRunPivotReports',
headers: {'content-type': 'application/json'},
data: {
requests: [
{
cohortSpec: {
cohortReportSettings: {accumulate: false},
cohorts: [{dateRange: {endDate: '', name: '', startDate: ''}, dimension: '', name: ''}],
cohortsRange: {endOffset: 0, granularity: '', startOffset: 0}
},
currencyCode: '',
dateRanges: [{}],
dimensionFilter: {
andGroup: {expressions: []},
filter: {
betweenFilter: {fromValue: {doubleValue: '', int64Value: ''}, toValue: {}},
fieldName: '',
inListFilter: {caseSensitive: false, values: []},
numericFilter: {operation: '', value: {}},
stringFilter: {caseSensitive: false, matchType: '', value: ''}
},
notExpression: '',
orGroup: {}
},
dimensions: [
{
dimensionExpression: {
concatenate: {delimiter: '', dimensionNames: []},
lowerCase: {dimensionName: ''},
upperCase: {}
},
name: ''
}
],
keepEmptyRows: false,
metricFilter: {},
metrics: [{expression: '', invisible: false, name: ''}],
pivots: [
{
fieldNames: [],
limit: '',
metricAggregations: [],
offset: '',
orderBys: [
{
desc: false,
dimension: {dimensionName: '', orderType: ''},
metric: {metricName: ''},
pivot: {metricName: '', pivotSelections: [{dimensionName: '', dimensionValue: ''}]}
}
]
}
],
property: '',
returnPropertyQuota: false
}
]
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1beta/:property:batchRunPivotReports';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"requests":[{"cohortSpec":{"cohortReportSettings":{"accumulate":false},"cohorts":[{"dateRange":{"endDate":"","name":"","startDate":""},"dimension":"","name":""}],"cohortsRange":{"endOffset":0,"granularity":"","startOffset":0}},"currencyCode":"","dateRanges":[{}],"dimensionFilter":{"andGroup":{"expressions":[]},"filter":{"betweenFilter":{"fromValue":{"doubleValue":"","int64Value":""},"toValue":{}},"fieldName":"","inListFilter":{"caseSensitive":false,"values":[]},"numericFilter":{"operation":"","value":{}},"stringFilter":{"caseSensitive":false,"matchType":"","value":""}},"notExpression":"","orGroup":{}},"dimensions":[{"dimensionExpression":{"concatenate":{"delimiter":"","dimensionNames":[]},"lowerCase":{"dimensionName":""},"upperCase":{}},"name":""}],"keepEmptyRows":false,"metricFilter":{},"metrics":[{"expression":"","invisible":false,"name":""}],"pivots":[{"fieldNames":[],"limit":"","metricAggregations":[],"offset":"","orderBys":[{"desc":false,"dimension":{"dimensionName":"","orderType":""},"metric":{"metricName":""},"pivot":{"metricName":"","pivotSelections":[{"dimensionName":"","dimensionValue":""}]}}]}],"property":"","returnPropertyQuota":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 = @{ @"requests": @[ @{ @"cohortSpec": @{ @"cohortReportSettings": @{ @"accumulate": @NO }, @"cohorts": @[ @{ @"dateRange": @{ @"endDate": @"", @"name": @"", @"startDate": @"" }, @"dimension": @"", @"name": @"" } ], @"cohortsRange": @{ @"endOffset": @0, @"granularity": @"", @"startOffset": @0 } }, @"currencyCode": @"", @"dateRanges": @[ @{ } ], @"dimensionFilter": @{ @"andGroup": @{ @"expressions": @[ ] }, @"filter": @{ @"betweenFilter": @{ @"fromValue": @{ @"doubleValue": @"", @"int64Value": @"" }, @"toValue": @{ } }, @"fieldName": @"", @"inListFilter": @{ @"caseSensitive": @NO, @"values": @[ ] }, @"numericFilter": @{ @"operation": @"", @"value": @{ } }, @"stringFilter": @{ @"caseSensitive": @NO, @"matchType": @"", @"value": @"" } }, @"notExpression": @"", @"orGroup": @{ } }, @"dimensions": @[ @{ @"dimensionExpression": @{ @"concatenate": @{ @"delimiter": @"", @"dimensionNames": @[ ] }, @"lowerCase": @{ @"dimensionName": @"" }, @"upperCase": @{ } }, @"name": @"" } ], @"keepEmptyRows": @NO, @"metricFilter": @{ }, @"metrics": @[ @{ @"expression": @"", @"invisible": @NO, @"name": @"" } ], @"pivots": @[ @{ @"fieldNames": @[ ], @"limit": @"", @"metricAggregations": @[ ], @"offset": @"", @"orderBys": @[ @{ @"desc": @NO, @"dimension": @{ @"dimensionName": @"", @"orderType": @"" }, @"metric": @{ @"metricName": @"" }, @"pivot": @{ @"metricName": @"", @"pivotSelections": @[ @{ @"dimensionName": @"", @"dimensionValue": @"" } ] } } ] } ], @"property": @"", @"returnPropertyQuota": @NO } ] };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1beta/:property:batchRunPivotReports"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1beta/:property:batchRunPivotReports" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"requests\": [\n {\n \"cohortSpec\": {\n \"cohortReportSettings\": {\n \"accumulate\": false\n },\n \"cohorts\": [\n {\n \"dateRange\": {\n \"endDate\": \"\",\n \"name\": \"\",\n \"startDate\": \"\"\n },\n \"dimension\": \"\",\n \"name\": \"\"\n }\n ],\n \"cohortsRange\": {\n \"endOffset\": 0,\n \"granularity\": \"\",\n \"startOffset\": 0\n }\n },\n \"currencyCode\": \"\",\n \"dateRanges\": [\n {}\n ],\n \"dimensionFilter\": {\n \"andGroup\": {\n \"expressions\": []\n },\n \"filter\": {\n \"betweenFilter\": {\n \"fromValue\": {\n \"doubleValue\": \"\",\n \"int64Value\": \"\"\n },\n \"toValue\": {}\n },\n \"fieldName\": \"\",\n \"inListFilter\": {\n \"caseSensitive\": false,\n \"values\": []\n },\n \"numericFilter\": {\n \"operation\": \"\",\n \"value\": {}\n },\n \"stringFilter\": {\n \"caseSensitive\": false,\n \"matchType\": \"\",\n \"value\": \"\"\n }\n },\n \"notExpression\": \"\",\n \"orGroup\": {}\n },\n \"dimensions\": [\n {\n \"dimensionExpression\": {\n \"concatenate\": {\n \"delimiter\": \"\",\n \"dimensionNames\": []\n },\n \"lowerCase\": {\n \"dimensionName\": \"\"\n },\n \"upperCase\": {}\n },\n \"name\": \"\"\n }\n ],\n \"keepEmptyRows\": false,\n \"metricFilter\": {},\n \"metrics\": [\n {\n \"expression\": \"\",\n \"invisible\": false,\n \"name\": \"\"\n }\n ],\n \"pivots\": [\n {\n \"fieldNames\": [],\n \"limit\": \"\",\n \"metricAggregations\": [],\n \"offset\": \"\",\n \"orderBys\": [\n {\n \"desc\": false,\n \"dimension\": {\n \"dimensionName\": \"\",\n \"orderType\": \"\"\n },\n \"metric\": {\n \"metricName\": \"\"\n },\n \"pivot\": {\n \"metricName\": \"\",\n \"pivotSelections\": [\n {\n \"dimensionName\": \"\",\n \"dimensionValue\": \"\"\n }\n ]\n }\n }\n ]\n }\n ],\n \"property\": \"\",\n \"returnPropertyQuota\": false\n }\n ]\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1beta/:property:batchRunPivotReports",
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([
'requests' => [
[
'cohortSpec' => [
'cohortReportSettings' => [
'accumulate' => null
],
'cohorts' => [
[
'dateRange' => [
'endDate' => '',
'name' => '',
'startDate' => ''
],
'dimension' => '',
'name' => ''
]
],
'cohortsRange' => [
'endOffset' => 0,
'granularity' => '',
'startOffset' => 0
]
],
'currencyCode' => '',
'dateRanges' => [
[
]
],
'dimensionFilter' => [
'andGroup' => [
'expressions' => [
]
],
'filter' => [
'betweenFilter' => [
'fromValue' => [
'doubleValue' => '',
'int64Value' => ''
],
'toValue' => [
]
],
'fieldName' => '',
'inListFilter' => [
'caseSensitive' => null,
'values' => [
]
],
'numericFilter' => [
'operation' => '',
'value' => [
]
],
'stringFilter' => [
'caseSensitive' => null,
'matchType' => '',
'value' => ''
]
],
'notExpression' => '',
'orGroup' => [
]
],
'dimensions' => [
[
'dimensionExpression' => [
'concatenate' => [
'delimiter' => '',
'dimensionNames' => [
]
],
'lowerCase' => [
'dimensionName' => ''
],
'upperCase' => [
]
],
'name' => ''
]
],
'keepEmptyRows' => null,
'metricFilter' => [
],
'metrics' => [
[
'expression' => '',
'invisible' => null,
'name' => ''
]
],
'pivots' => [
[
'fieldNames' => [
],
'limit' => '',
'metricAggregations' => [
],
'offset' => '',
'orderBys' => [
[
'desc' => null,
'dimension' => [
'dimensionName' => '',
'orderType' => ''
],
'metric' => [
'metricName' => ''
],
'pivot' => [
'metricName' => '',
'pivotSelections' => [
[
'dimensionName' => '',
'dimensionValue' => ''
]
]
]
]
]
]
],
'property' => '',
'returnPropertyQuota' => null
]
]
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/v1beta/:property:batchRunPivotReports', [
'body' => '{
"requests": [
{
"cohortSpec": {
"cohortReportSettings": {
"accumulate": false
},
"cohorts": [
{
"dateRange": {
"endDate": "",
"name": "",
"startDate": ""
},
"dimension": "",
"name": ""
}
],
"cohortsRange": {
"endOffset": 0,
"granularity": "",
"startOffset": 0
}
},
"currencyCode": "",
"dateRanges": [
{}
],
"dimensionFilter": {
"andGroup": {
"expressions": []
},
"filter": {
"betweenFilter": {
"fromValue": {
"doubleValue": "",
"int64Value": ""
},
"toValue": {}
},
"fieldName": "",
"inListFilter": {
"caseSensitive": false,
"values": []
},
"numericFilter": {
"operation": "",
"value": {}
},
"stringFilter": {
"caseSensitive": false,
"matchType": "",
"value": ""
}
},
"notExpression": "",
"orGroup": {}
},
"dimensions": [
{
"dimensionExpression": {
"concatenate": {
"delimiter": "",
"dimensionNames": []
},
"lowerCase": {
"dimensionName": ""
},
"upperCase": {}
},
"name": ""
}
],
"keepEmptyRows": false,
"metricFilter": {},
"metrics": [
{
"expression": "",
"invisible": false,
"name": ""
}
],
"pivots": [
{
"fieldNames": [],
"limit": "",
"metricAggregations": [],
"offset": "",
"orderBys": [
{
"desc": false,
"dimension": {
"dimensionName": "",
"orderType": ""
},
"metric": {
"metricName": ""
},
"pivot": {
"metricName": "",
"pivotSelections": [
{
"dimensionName": "",
"dimensionValue": ""
}
]
}
}
]
}
],
"property": "",
"returnPropertyQuota": false
}
]
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1beta/:property:batchRunPivotReports');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'requests' => [
[
'cohortSpec' => [
'cohortReportSettings' => [
'accumulate' => null
],
'cohorts' => [
[
'dateRange' => [
'endDate' => '',
'name' => '',
'startDate' => ''
],
'dimension' => '',
'name' => ''
]
],
'cohortsRange' => [
'endOffset' => 0,
'granularity' => '',
'startOffset' => 0
]
],
'currencyCode' => '',
'dateRanges' => [
[
]
],
'dimensionFilter' => [
'andGroup' => [
'expressions' => [
]
],
'filter' => [
'betweenFilter' => [
'fromValue' => [
'doubleValue' => '',
'int64Value' => ''
],
'toValue' => [
]
],
'fieldName' => '',
'inListFilter' => [
'caseSensitive' => null,
'values' => [
]
],
'numericFilter' => [
'operation' => '',
'value' => [
]
],
'stringFilter' => [
'caseSensitive' => null,
'matchType' => '',
'value' => ''
]
],
'notExpression' => '',
'orGroup' => [
]
],
'dimensions' => [
[
'dimensionExpression' => [
'concatenate' => [
'delimiter' => '',
'dimensionNames' => [
]
],
'lowerCase' => [
'dimensionName' => ''
],
'upperCase' => [
]
],
'name' => ''
]
],
'keepEmptyRows' => null,
'metricFilter' => [
],
'metrics' => [
[
'expression' => '',
'invisible' => null,
'name' => ''
]
],
'pivots' => [
[
'fieldNames' => [
],
'limit' => '',
'metricAggregations' => [
],
'offset' => '',
'orderBys' => [
[
'desc' => null,
'dimension' => [
'dimensionName' => '',
'orderType' => ''
],
'metric' => [
'metricName' => ''
],
'pivot' => [
'metricName' => '',
'pivotSelections' => [
[
'dimensionName' => '',
'dimensionValue' => ''
]
]
]
]
]
]
],
'property' => '',
'returnPropertyQuota' => null
]
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'requests' => [
[
'cohortSpec' => [
'cohortReportSettings' => [
'accumulate' => null
],
'cohorts' => [
[
'dateRange' => [
'endDate' => '',
'name' => '',
'startDate' => ''
],
'dimension' => '',
'name' => ''
]
],
'cohortsRange' => [
'endOffset' => 0,
'granularity' => '',
'startOffset' => 0
]
],
'currencyCode' => '',
'dateRanges' => [
[
]
],
'dimensionFilter' => [
'andGroup' => [
'expressions' => [
]
],
'filter' => [
'betweenFilter' => [
'fromValue' => [
'doubleValue' => '',
'int64Value' => ''
],
'toValue' => [
]
],
'fieldName' => '',
'inListFilter' => [
'caseSensitive' => null,
'values' => [
]
],
'numericFilter' => [
'operation' => '',
'value' => [
]
],
'stringFilter' => [
'caseSensitive' => null,
'matchType' => '',
'value' => ''
]
],
'notExpression' => '',
'orGroup' => [
]
],
'dimensions' => [
[
'dimensionExpression' => [
'concatenate' => [
'delimiter' => '',
'dimensionNames' => [
]
],
'lowerCase' => [
'dimensionName' => ''
],
'upperCase' => [
]
],
'name' => ''
]
],
'keepEmptyRows' => null,
'metricFilter' => [
],
'metrics' => [
[
'expression' => '',
'invisible' => null,
'name' => ''
]
],
'pivots' => [
[
'fieldNames' => [
],
'limit' => '',
'metricAggregations' => [
],
'offset' => '',
'orderBys' => [
[
'desc' => null,
'dimension' => [
'dimensionName' => '',
'orderType' => ''
],
'metric' => [
'metricName' => ''
],
'pivot' => [
'metricName' => '',
'pivotSelections' => [
[
'dimensionName' => '',
'dimensionValue' => ''
]
]
]
]
]
]
],
'property' => '',
'returnPropertyQuota' => null
]
]
]));
$request->setRequestUrl('{{baseUrl}}/v1beta/:property:batchRunPivotReports');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1beta/:property:batchRunPivotReports' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"requests": [
{
"cohortSpec": {
"cohortReportSettings": {
"accumulate": false
},
"cohorts": [
{
"dateRange": {
"endDate": "",
"name": "",
"startDate": ""
},
"dimension": "",
"name": ""
}
],
"cohortsRange": {
"endOffset": 0,
"granularity": "",
"startOffset": 0
}
},
"currencyCode": "",
"dateRanges": [
{}
],
"dimensionFilter": {
"andGroup": {
"expressions": []
},
"filter": {
"betweenFilter": {
"fromValue": {
"doubleValue": "",
"int64Value": ""
},
"toValue": {}
},
"fieldName": "",
"inListFilter": {
"caseSensitive": false,
"values": []
},
"numericFilter": {
"operation": "",
"value": {}
},
"stringFilter": {
"caseSensitive": false,
"matchType": "",
"value": ""
}
},
"notExpression": "",
"orGroup": {}
},
"dimensions": [
{
"dimensionExpression": {
"concatenate": {
"delimiter": "",
"dimensionNames": []
},
"lowerCase": {
"dimensionName": ""
},
"upperCase": {}
},
"name": ""
}
],
"keepEmptyRows": false,
"metricFilter": {},
"metrics": [
{
"expression": "",
"invisible": false,
"name": ""
}
],
"pivots": [
{
"fieldNames": [],
"limit": "",
"metricAggregations": [],
"offset": "",
"orderBys": [
{
"desc": false,
"dimension": {
"dimensionName": "",
"orderType": ""
},
"metric": {
"metricName": ""
},
"pivot": {
"metricName": "",
"pivotSelections": [
{
"dimensionName": "",
"dimensionValue": ""
}
]
}
}
]
}
],
"property": "",
"returnPropertyQuota": false
}
]
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1beta/:property:batchRunPivotReports' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"requests": [
{
"cohortSpec": {
"cohortReportSettings": {
"accumulate": false
},
"cohorts": [
{
"dateRange": {
"endDate": "",
"name": "",
"startDate": ""
},
"dimension": "",
"name": ""
}
],
"cohortsRange": {
"endOffset": 0,
"granularity": "",
"startOffset": 0
}
},
"currencyCode": "",
"dateRanges": [
{}
],
"dimensionFilter": {
"andGroup": {
"expressions": []
},
"filter": {
"betweenFilter": {
"fromValue": {
"doubleValue": "",
"int64Value": ""
},
"toValue": {}
},
"fieldName": "",
"inListFilter": {
"caseSensitive": false,
"values": []
},
"numericFilter": {
"operation": "",
"value": {}
},
"stringFilter": {
"caseSensitive": false,
"matchType": "",
"value": ""
}
},
"notExpression": "",
"orGroup": {}
},
"dimensions": [
{
"dimensionExpression": {
"concatenate": {
"delimiter": "",
"dimensionNames": []
},
"lowerCase": {
"dimensionName": ""
},
"upperCase": {}
},
"name": ""
}
],
"keepEmptyRows": false,
"metricFilter": {},
"metrics": [
{
"expression": "",
"invisible": false,
"name": ""
}
],
"pivots": [
{
"fieldNames": [],
"limit": "",
"metricAggregations": [],
"offset": "",
"orderBys": [
{
"desc": false,
"dimension": {
"dimensionName": "",
"orderType": ""
},
"metric": {
"metricName": ""
},
"pivot": {
"metricName": "",
"pivotSelections": [
{
"dimensionName": "",
"dimensionValue": ""
}
]
}
}
]
}
],
"property": "",
"returnPropertyQuota": false
}
]
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"requests\": [\n {\n \"cohortSpec\": {\n \"cohortReportSettings\": {\n \"accumulate\": false\n },\n \"cohorts\": [\n {\n \"dateRange\": {\n \"endDate\": \"\",\n \"name\": \"\",\n \"startDate\": \"\"\n },\n \"dimension\": \"\",\n \"name\": \"\"\n }\n ],\n \"cohortsRange\": {\n \"endOffset\": 0,\n \"granularity\": \"\",\n \"startOffset\": 0\n }\n },\n \"currencyCode\": \"\",\n \"dateRanges\": [\n {}\n ],\n \"dimensionFilter\": {\n \"andGroup\": {\n \"expressions\": []\n },\n \"filter\": {\n \"betweenFilter\": {\n \"fromValue\": {\n \"doubleValue\": \"\",\n \"int64Value\": \"\"\n },\n \"toValue\": {}\n },\n \"fieldName\": \"\",\n \"inListFilter\": {\n \"caseSensitive\": false,\n \"values\": []\n },\n \"numericFilter\": {\n \"operation\": \"\",\n \"value\": {}\n },\n \"stringFilter\": {\n \"caseSensitive\": false,\n \"matchType\": \"\",\n \"value\": \"\"\n }\n },\n \"notExpression\": \"\",\n \"orGroup\": {}\n },\n \"dimensions\": [\n {\n \"dimensionExpression\": {\n \"concatenate\": {\n \"delimiter\": \"\",\n \"dimensionNames\": []\n },\n \"lowerCase\": {\n \"dimensionName\": \"\"\n },\n \"upperCase\": {}\n },\n \"name\": \"\"\n }\n ],\n \"keepEmptyRows\": false,\n \"metricFilter\": {},\n \"metrics\": [\n {\n \"expression\": \"\",\n \"invisible\": false,\n \"name\": \"\"\n }\n ],\n \"pivots\": [\n {\n \"fieldNames\": [],\n \"limit\": \"\",\n \"metricAggregations\": [],\n \"offset\": \"\",\n \"orderBys\": [\n {\n \"desc\": false,\n \"dimension\": {\n \"dimensionName\": \"\",\n \"orderType\": \"\"\n },\n \"metric\": {\n \"metricName\": \"\"\n },\n \"pivot\": {\n \"metricName\": \"\",\n \"pivotSelections\": [\n {\n \"dimensionName\": \"\",\n \"dimensionValue\": \"\"\n }\n ]\n }\n }\n ]\n }\n ],\n \"property\": \"\",\n \"returnPropertyQuota\": false\n }\n ]\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1beta/:property:batchRunPivotReports", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1beta/:property:batchRunPivotReports"
payload = { "requests": [
{
"cohortSpec": {
"cohortReportSettings": { "accumulate": False },
"cohorts": [
{
"dateRange": {
"endDate": "",
"name": "",
"startDate": ""
},
"dimension": "",
"name": ""
}
],
"cohortsRange": {
"endOffset": 0,
"granularity": "",
"startOffset": 0
}
},
"currencyCode": "",
"dateRanges": [{}],
"dimensionFilter": {
"andGroup": { "expressions": [] },
"filter": {
"betweenFilter": {
"fromValue": {
"doubleValue": "",
"int64Value": ""
},
"toValue": {}
},
"fieldName": "",
"inListFilter": {
"caseSensitive": False,
"values": []
},
"numericFilter": {
"operation": "",
"value": {}
},
"stringFilter": {
"caseSensitive": False,
"matchType": "",
"value": ""
}
},
"notExpression": "",
"orGroup": {}
},
"dimensions": [
{
"dimensionExpression": {
"concatenate": {
"delimiter": "",
"dimensionNames": []
},
"lowerCase": { "dimensionName": "" },
"upperCase": {}
},
"name": ""
}
],
"keepEmptyRows": False,
"metricFilter": {},
"metrics": [
{
"expression": "",
"invisible": False,
"name": ""
}
],
"pivots": [
{
"fieldNames": [],
"limit": "",
"metricAggregations": [],
"offset": "",
"orderBys": [
{
"desc": False,
"dimension": {
"dimensionName": "",
"orderType": ""
},
"metric": { "metricName": "" },
"pivot": {
"metricName": "",
"pivotSelections": [
{
"dimensionName": "",
"dimensionValue": ""
}
]
}
}
]
}
],
"property": "",
"returnPropertyQuota": False
}
] }
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1beta/:property:batchRunPivotReports"
payload <- "{\n \"requests\": [\n {\n \"cohortSpec\": {\n \"cohortReportSettings\": {\n \"accumulate\": false\n },\n \"cohorts\": [\n {\n \"dateRange\": {\n \"endDate\": \"\",\n \"name\": \"\",\n \"startDate\": \"\"\n },\n \"dimension\": \"\",\n \"name\": \"\"\n }\n ],\n \"cohortsRange\": {\n \"endOffset\": 0,\n \"granularity\": \"\",\n \"startOffset\": 0\n }\n },\n \"currencyCode\": \"\",\n \"dateRanges\": [\n {}\n ],\n \"dimensionFilter\": {\n \"andGroup\": {\n \"expressions\": []\n },\n \"filter\": {\n \"betweenFilter\": {\n \"fromValue\": {\n \"doubleValue\": \"\",\n \"int64Value\": \"\"\n },\n \"toValue\": {}\n },\n \"fieldName\": \"\",\n \"inListFilter\": {\n \"caseSensitive\": false,\n \"values\": []\n },\n \"numericFilter\": {\n \"operation\": \"\",\n \"value\": {}\n },\n \"stringFilter\": {\n \"caseSensitive\": false,\n \"matchType\": \"\",\n \"value\": \"\"\n }\n },\n \"notExpression\": \"\",\n \"orGroup\": {}\n },\n \"dimensions\": [\n {\n \"dimensionExpression\": {\n \"concatenate\": {\n \"delimiter\": \"\",\n \"dimensionNames\": []\n },\n \"lowerCase\": {\n \"dimensionName\": \"\"\n },\n \"upperCase\": {}\n },\n \"name\": \"\"\n }\n ],\n \"keepEmptyRows\": false,\n \"metricFilter\": {},\n \"metrics\": [\n {\n \"expression\": \"\",\n \"invisible\": false,\n \"name\": \"\"\n }\n ],\n \"pivots\": [\n {\n \"fieldNames\": [],\n \"limit\": \"\",\n \"metricAggregations\": [],\n \"offset\": \"\",\n \"orderBys\": [\n {\n \"desc\": false,\n \"dimension\": {\n \"dimensionName\": \"\",\n \"orderType\": \"\"\n },\n \"metric\": {\n \"metricName\": \"\"\n },\n \"pivot\": {\n \"metricName\": \"\",\n \"pivotSelections\": [\n {\n \"dimensionName\": \"\",\n \"dimensionValue\": \"\"\n }\n ]\n }\n }\n ]\n }\n ],\n \"property\": \"\",\n \"returnPropertyQuota\": false\n }\n ]\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1beta/:property:batchRunPivotReports")
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 \"requests\": [\n {\n \"cohortSpec\": {\n \"cohortReportSettings\": {\n \"accumulate\": false\n },\n \"cohorts\": [\n {\n \"dateRange\": {\n \"endDate\": \"\",\n \"name\": \"\",\n \"startDate\": \"\"\n },\n \"dimension\": \"\",\n \"name\": \"\"\n }\n ],\n \"cohortsRange\": {\n \"endOffset\": 0,\n \"granularity\": \"\",\n \"startOffset\": 0\n }\n },\n \"currencyCode\": \"\",\n \"dateRanges\": [\n {}\n ],\n \"dimensionFilter\": {\n \"andGroup\": {\n \"expressions\": []\n },\n \"filter\": {\n \"betweenFilter\": {\n \"fromValue\": {\n \"doubleValue\": \"\",\n \"int64Value\": \"\"\n },\n \"toValue\": {}\n },\n \"fieldName\": \"\",\n \"inListFilter\": {\n \"caseSensitive\": false,\n \"values\": []\n },\n \"numericFilter\": {\n \"operation\": \"\",\n \"value\": {}\n },\n \"stringFilter\": {\n \"caseSensitive\": false,\n \"matchType\": \"\",\n \"value\": \"\"\n }\n },\n \"notExpression\": \"\",\n \"orGroup\": {}\n },\n \"dimensions\": [\n {\n \"dimensionExpression\": {\n \"concatenate\": {\n \"delimiter\": \"\",\n \"dimensionNames\": []\n },\n \"lowerCase\": {\n \"dimensionName\": \"\"\n },\n \"upperCase\": {}\n },\n \"name\": \"\"\n }\n ],\n \"keepEmptyRows\": false,\n \"metricFilter\": {},\n \"metrics\": [\n {\n \"expression\": \"\",\n \"invisible\": false,\n \"name\": \"\"\n }\n ],\n \"pivots\": [\n {\n \"fieldNames\": [],\n \"limit\": \"\",\n \"metricAggregations\": [],\n \"offset\": \"\",\n \"orderBys\": [\n {\n \"desc\": false,\n \"dimension\": {\n \"dimensionName\": \"\",\n \"orderType\": \"\"\n },\n \"metric\": {\n \"metricName\": \"\"\n },\n \"pivot\": {\n \"metricName\": \"\",\n \"pivotSelections\": [\n {\n \"dimensionName\": \"\",\n \"dimensionValue\": \"\"\n }\n ]\n }\n }\n ]\n }\n ],\n \"property\": \"\",\n \"returnPropertyQuota\": false\n }\n ]\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/v1beta/:property:batchRunPivotReports') do |req|
req.body = "{\n \"requests\": [\n {\n \"cohortSpec\": {\n \"cohortReportSettings\": {\n \"accumulate\": false\n },\n \"cohorts\": [\n {\n \"dateRange\": {\n \"endDate\": \"\",\n \"name\": \"\",\n \"startDate\": \"\"\n },\n \"dimension\": \"\",\n \"name\": \"\"\n }\n ],\n \"cohortsRange\": {\n \"endOffset\": 0,\n \"granularity\": \"\",\n \"startOffset\": 0\n }\n },\n \"currencyCode\": \"\",\n \"dateRanges\": [\n {}\n ],\n \"dimensionFilter\": {\n \"andGroup\": {\n \"expressions\": []\n },\n \"filter\": {\n \"betweenFilter\": {\n \"fromValue\": {\n \"doubleValue\": \"\",\n \"int64Value\": \"\"\n },\n \"toValue\": {}\n },\n \"fieldName\": \"\",\n \"inListFilter\": {\n \"caseSensitive\": false,\n \"values\": []\n },\n \"numericFilter\": {\n \"operation\": \"\",\n \"value\": {}\n },\n \"stringFilter\": {\n \"caseSensitive\": false,\n \"matchType\": \"\",\n \"value\": \"\"\n }\n },\n \"notExpression\": \"\",\n \"orGroup\": {}\n },\n \"dimensions\": [\n {\n \"dimensionExpression\": {\n \"concatenate\": {\n \"delimiter\": \"\",\n \"dimensionNames\": []\n },\n \"lowerCase\": {\n \"dimensionName\": \"\"\n },\n \"upperCase\": {}\n },\n \"name\": \"\"\n }\n ],\n \"keepEmptyRows\": false,\n \"metricFilter\": {},\n \"metrics\": [\n {\n \"expression\": \"\",\n \"invisible\": false,\n \"name\": \"\"\n }\n ],\n \"pivots\": [\n {\n \"fieldNames\": [],\n \"limit\": \"\",\n \"metricAggregations\": [],\n \"offset\": \"\",\n \"orderBys\": [\n {\n \"desc\": false,\n \"dimension\": {\n \"dimensionName\": \"\",\n \"orderType\": \"\"\n },\n \"metric\": {\n \"metricName\": \"\"\n },\n \"pivot\": {\n \"metricName\": \"\",\n \"pivotSelections\": [\n {\n \"dimensionName\": \"\",\n \"dimensionValue\": \"\"\n }\n ]\n }\n }\n ]\n }\n ],\n \"property\": \"\",\n \"returnPropertyQuota\": false\n }\n ]\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1beta/:property:batchRunPivotReports";
let payload = json!({"requests": (
json!({
"cohortSpec": json!({
"cohortReportSettings": json!({"accumulate": false}),
"cohorts": (
json!({
"dateRange": json!({
"endDate": "",
"name": "",
"startDate": ""
}),
"dimension": "",
"name": ""
})
),
"cohortsRange": json!({
"endOffset": 0,
"granularity": "",
"startOffset": 0
})
}),
"currencyCode": "",
"dateRanges": (json!({})),
"dimensionFilter": json!({
"andGroup": json!({"expressions": ()}),
"filter": json!({
"betweenFilter": json!({
"fromValue": json!({
"doubleValue": "",
"int64Value": ""
}),
"toValue": json!({})
}),
"fieldName": "",
"inListFilter": json!({
"caseSensitive": false,
"values": ()
}),
"numericFilter": json!({
"operation": "",
"value": json!({})
}),
"stringFilter": json!({
"caseSensitive": false,
"matchType": "",
"value": ""
})
}),
"notExpression": "",
"orGroup": json!({})
}),
"dimensions": (
json!({
"dimensionExpression": json!({
"concatenate": json!({
"delimiter": "",
"dimensionNames": ()
}),
"lowerCase": json!({"dimensionName": ""}),
"upperCase": json!({})
}),
"name": ""
})
),
"keepEmptyRows": false,
"metricFilter": json!({}),
"metrics": (
json!({
"expression": "",
"invisible": false,
"name": ""
})
),
"pivots": (
json!({
"fieldNames": (),
"limit": "",
"metricAggregations": (),
"offset": "",
"orderBys": (
json!({
"desc": false,
"dimension": json!({
"dimensionName": "",
"orderType": ""
}),
"metric": json!({"metricName": ""}),
"pivot": json!({
"metricName": "",
"pivotSelections": (
json!({
"dimensionName": "",
"dimensionValue": ""
})
)
})
})
)
})
),
"property": "",
"returnPropertyQuota": false
})
)});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/v1beta/:property:batchRunPivotReports \
--header 'content-type: application/json' \
--data '{
"requests": [
{
"cohortSpec": {
"cohortReportSettings": {
"accumulate": false
},
"cohorts": [
{
"dateRange": {
"endDate": "",
"name": "",
"startDate": ""
},
"dimension": "",
"name": ""
}
],
"cohortsRange": {
"endOffset": 0,
"granularity": "",
"startOffset": 0
}
},
"currencyCode": "",
"dateRanges": [
{}
],
"dimensionFilter": {
"andGroup": {
"expressions": []
},
"filter": {
"betweenFilter": {
"fromValue": {
"doubleValue": "",
"int64Value": ""
},
"toValue": {}
},
"fieldName": "",
"inListFilter": {
"caseSensitive": false,
"values": []
},
"numericFilter": {
"operation": "",
"value": {}
},
"stringFilter": {
"caseSensitive": false,
"matchType": "",
"value": ""
}
},
"notExpression": "",
"orGroup": {}
},
"dimensions": [
{
"dimensionExpression": {
"concatenate": {
"delimiter": "",
"dimensionNames": []
},
"lowerCase": {
"dimensionName": ""
},
"upperCase": {}
},
"name": ""
}
],
"keepEmptyRows": false,
"metricFilter": {},
"metrics": [
{
"expression": "",
"invisible": false,
"name": ""
}
],
"pivots": [
{
"fieldNames": [],
"limit": "",
"metricAggregations": [],
"offset": "",
"orderBys": [
{
"desc": false,
"dimension": {
"dimensionName": "",
"orderType": ""
},
"metric": {
"metricName": ""
},
"pivot": {
"metricName": "",
"pivotSelections": [
{
"dimensionName": "",
"dimensionValue": ""
}
]
}
}
]
}
],
"property": "",
"returnPropertyQuota": false
}
]
}'
echo '{
"requests": [
{
"cohortSpec": {
"cohortReportSettings": {
"accumulate": false
},
"cohorts": [
{
"dateRange": {
"endDate": "",
"name": "",
"startDate": ""
},
"dimension": "",
"name": ""
}
],
"cohortsRange": {
"endOffset": 0,
"granularity": "",
"startOffset": 0
}
},
"currencyCode": "",
"dateRanges": [
{}
],
"dimensionFilter": {
"andGroup": {
"expressions": []
},
"filter": {
"betweenFilter": {
"fromValue": {
"doubleValue": "",
"int64Value": ""
},
"toValue": {}
},
"fieldName": "",
"inListFilter": {
"caseSensitive": false,
"values": []
},
"numericFilter": {
"operation": "",
"value": {}
},
"stringFilter": {
"caseSensitive": false,
"matchType": "",
"value": ""
}
},
"notExpression": "",
"orGroup": {}
},
"dimensions": [
{
"dimensionExpression": {
"concatenate": {
"delimiter": "",
"dimensionNames": []
},
"lowerCase": {
"dimensionName": ""
},
"upperCase": {}
},
"name": ""
}
],
"keepEmptyRows": false,
"metricFilter": {},
"metrics": [
{
"expression": "",
"invisible": false,
"name": ""
}
],
"pivots": [
{
"fieldNames": [],
"limit": "",
"metricAggregations": [],
"offset": "",
"orderBys": [
{
"desc": false,
"dimension": {
"dimensionName": "",
"orderType": ""
},
"metric": {
"metricName": ""
},
"pivot": {
"metricName": "",
"pivotSelections": [
{
"dimensionName": "",
"dimensionValue": ""
}
]
}
}
]
}
],
"property": "",
"returnPropertyQuota": false
}
]
}' | \
http POST {{baseUrl}}/v1beta/:property:batchRunPivotReports \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "requests": [\n {\n "cohortSpec": {\n "cohortReportSettings": {\n "accumulate": false\n },\n "cohorts": [\n {\n "dateRange": {\n "endDate": "",\n "name": "",\n "startDate": ""\n },\n "dimension": "",\n "name": ""\n }\n ],\n "cohortsRange": {\n "endOffset": 0,\n "granularity": "",\n "startOffset": 0\n }\n },\n "currencyCode": "",\n "dateRanges": [\n {}\n ],\n "dimensionFilter": {\n "andGroup": {\n "expressions": []\n },\n "filter": {\n "betweenFilter": {\n "fromValue": {\n "doubleValue": "",\n "int64Value": ""\n },\n "toValue": {}\n },\n "fieldName": "",\n "inListFilter": {\n "caseSensitive": false,\n "values": []\n },\n "numericFilter": {\n "operation": "",\n "value": {}\n },\n "stringFilter": {\n "caseSensitive": false,\n "matchType": "",\n "value": ""\n }\n },\n "notExpression": "",\n "orGroup": {}\n },\n "dimensions": [\n {\n "dimensionExpression": {\n "concatenate": {\n "delimiter": "",\n "dimensionNames": []\n },\n "lowerCase": {\n "dimensionName": ""\n },\n "upperCase": {}\n },\n "name": ""\n }\n ],\n "keepEmptyRows": false,\n "metricFilter": {},\n "metrics": [\n {\n "expression": "",\n "invisible": false,\n "name": ""\n }\n ],\n "pivots": [\n {\n "fieldNames": [],\n "limit": "",\n "metricAggregations": [],\n "offset": "",\n "orderBys": [\n {\n "desc": false,\n "dimension": {\n "dimensionName": "",\n "orderType": ""\n },\n "metric": {\n "metricName": ""\n },\n "pivot": {\n "metricName": "",\n "pivotSelections": [\n {\n "dimensionName": "",\n "dimensionValue": ""\n }\n ]\n }\n }\n ]\n }\n ],\n "property": "",\n "returnPropertyQuota": false\n }\n ]\n}' \
--output-document \
- {{baseUrl}}/v1beta/:property:batchRunPivotReports
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["requests": [
[
"cohortSpec": [
"cohortReportSettings": ["accumulate": false],
"cohorts": [
[
"dateRange": [
"endDate": "",
"name": "",
"startDate": ""
],
"dimension": "",
"name": ""
]
],
"cohortsRange": [
"endOffset": 0,
"granularity": "",
"startOffset": 0
]
],
"currencyCode": "",
"dateRanges": [[]],
"dimensionFilter": [
"andGroup": ["expressions": []],
"filter": [
"betweenFilter": [
"fromValue": [
"doubleValue": "",
"int64Value": ""
],
"toValue": []
],
"fieldName": "",
"inListFilter": [
"caseSensitive": false,
"values": []
],
"numericFilter": [
"operation": "",
"value": []
],
"stringFilter": [
"caseSensitive": false,
"matchType": "",
"value": ""
]
],
"notExpression": "",
"orGroup": []
],
"dimensions": [
[
"dimensionExpression": [
"concatenate": [
"delimiter": "",
"dimensionNames": []
],
"lowerCase": ["dimensionName": ""],
"upperCase": []
],
"name": ""
]
],
"keepEmptyRows": false,
"metricFilter": [],
"metrics": [
[
"expression": "",
"invisible": false,
"name": ""
]
],
"pivots": [
[
"fieldNames": [],
"limit": "",
"metricAggregations": [],
"offset": "",
"orderBys": [
[
"desc": false,
"dimension": [
"dimensionName": "",
"orderType": ""
],
"metric": ["metricName": ""],
"pivot": [
"metricName": "",
"pivotSelections": [
[
"dimensionName": "",
"dimensionValue": ""
]
]
]
]
]
]
],
"property": "",
"returnPropertyQuota": false
]
]] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1beta/:property:batchRunPivotReports")! 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
analyticsdata.properties.batchRunReports
{{baseUrl}}/v1beta/:property:batchRunReports
QUERY PARAMS
property
BODY json
{
"requests": [
{
"cohortSpec": {
"cohortReportSettings": {
"accumulate": false
},
"cohorts": [
{
"dateRange": {
"endDate": "",
"name": "",
"startDate": ""
},
"dimension": "",
"name": ""
}
],
"cohortsRange": {
"endOffset": 0,
"granularity": "",
"startOffset": 0
}
},
"currencyCode": "",
"dateRanges": [
{}
],
"dimensionFilter": {
"andGroup": {
"expressions": []
},
"filter": {
"betweenFilter": {
"fromValue": {
"doubleValue": "",
"int64Value": ""
},
"toValue": {}
},
"fieldName": "",
"inListFilter": {
"caseSensitive": false,
"values": []
},
"numericFilter": {
"operation": "",
"value": {}
},
"stringFilter": {
"caseSensitive": false,
"matchType": "",
"value": ""
}
},
"notExpression": "",
"orGroup": {}
},
"dimensions": [
{
"dimensionExpression": {
"concatenate": {
"delimiter": "",
"dimensionNames": []
},
"lowerCase": {
"dimensionName": ""
},
"upperCase": {}
},
"name": ""
}
],
"keepEmptyRows": false,
"limit": "",
"metricAggregations": [],
"metricFilter": {},
"metrics": [
{
"expression": "",
"invisible": false,
"name": ""
}
],
"offset": "",
"orderBys": [
{
"desc": false,
"dimension": {
"dimensionName": "",
"orderType": ""
},
"metric": {
"metricName": ""
},
"pivot": {
"metricName": "",
"pivotSelections": [
{
"dimensionName": "",
"dimensionValue": ""
}
]
}
}
],
"property": "",
"returnPropertyQuota": false
}
]
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1beta/:property:batchRunReports");
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 \"requests\": [\n {\n \"cohortSpec\": {\n \"cohortReportSettings\": {\n \"accumulate\": false\n },\n \"cohorts\": [\n {\n \"dateRange\": {\n \"endDate\": \"\",\n \"name\": \"\",\n \"startDate\": \"\"\n },\n \"dimension\": \"\",\n \"name\": \"\"\n }\n ],\n \"cohortsRange\": {\n \"endOffset\": 0,\n \"granularity\": \"\",\n \"startOffset\": 0\n }\n },\n \"currencyCode\": \"\",\n \"dateRanges\": [\n {}\n ],\n \"dimensionFilter\": {\n \"andGroup\": {\n \"expressions\": []\n },\n \"filter\": {\n \"betweenFilter\": {\n \"fromValue\": {\n \"doubleValue\": \"\",\n \"int64Value\": \"\"\n },\n \"toValue\": {}\n },\n \"fieldName\": \"\",\n \"inListFilter\": {\n \"caseSensitive\": false,\n \"values\": []\n },\n \"numericFilter\": {\n \"operation\": \"\",\n \"value\": {}\n },\n \"stringFilter\": {\n \"caseSensitive\": false,\n \"matchType\": \"\",\n \"value\": \"\"\n }\n },\n \"notExpression\": \"\",\n \"orGroup\": {}\n },\n \"dimensions\": [\n {\n \"dimensionExpression\": {\n \"concatenate\": {\n \"delimiter\": \"\",\n \"dimensionNames\": []\n },\n \"lowerCase\": {\n \"dimensionName\": \"\"\n },\n \"upperCase\": {}\n },\n \"name\": \"\"\n }\n ],\n \"keepEmptyRows\": false,\n \"limit\": \"\",\n \"metricAggregations\": [],\n \"metricFilter\": {},\n \"metrics\": [\n {\n \"expression\": \"\",\n \"invisible\": false,\n \"name\": \"\"\n }\n ],\n \"offset\": \"\",\n \"orderBys\": [\n {\n \"desc\": false,\n \"dimension\": {\n \"dimensionName\": \"\",\n \"orderType\": \"\"\n },\n \"metric\": {\n \"metricName\": \"\"\n },\n \"pivot\": {\n \"metricName\": \"\",\n \"pivotSelections\": [\n {\n \"dimensionName\": \"\",\n \"dimensionValue\": \"\"\n }\n ]\n }\n }\n ],\n \"property\": \"\",\n \"returnPropertyQuota\": false\n }\n ]\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1beta/:property:batchRunReports" {:content-type :json
:form-params {:requests [{:cohortSpec {:cohortReportSettings {:accumulate false}
:cohorts [{:dateRange {:endDate ""
:name ""
:startDate ""}
:dimension ""
:name ""}]
:cohortsRange {:endOffset 0
:granularity ""
:startOffset 0}}
:currencyCode ""
:dateRanges [{}]
:dimensionFilter {:andGroup {:expressions []}
:filter {:betweenFilter {:fromValue {:doubleValue ""
:int64Value ""}
:toValue {}}
:fieldName ""
:inListFilter {:caseSensitive false
:values []}
:numericFilter {:operation ""
:value {}}
:stringFilter {:caseSensitive false
:matchType ""
:value ""}}
:notExpression ""
:orGroup {}}
:dimensions [{:dimensionExpression {:concatenate {:delimiter ""
:dimensionNames []}
:lowerCase {:dimensionName ""}
:upperCase {}}
:name ""}]
:keepEmptyRows false
:limit ""
:metricAggregations []
:metricFilter {}
:metrics [{:expression ""
:invisible false
:name ""}]
:offset ""
:orderBys [{:desc false
:dimension {:dimensionName ""
:orderType ""}
:metric {:metricName ""}
:pivot {:metricName ""
:pivotSelections [{:dimensionName ""
:dimensionValue ""}]}}]
:property ""
:returnPropertyQuota false}]}})
require "http/client"
url = "{{baseUrl}}/v1beta/:property:batchRunReports"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"requests\": [\n {\n \"cohortSpec\": {\n \"cohortReportSettings\": {\n \"accumulate\": false\n },\n \"cohorts\": [\n {\n \"dateRange\": {\n \"endDate\": \"\",\n \"name\": \"\",\n \"startDate\": \"\"\n },\n \"dimension\": \"\",\n \"name\": \"\"\n }\n ],\n \"cohortsRange\": {\n \"endOffset\": 0,\n \"granularity\": \"\",\n \"startOffset\": 0\n }\n },\n \"currencyCode\": \"\",\n \"dateRanges\": [\n {}\n ],\n \"dimensionFilter\": {\n \"andGroup\": {\n \"expressions\": []\n },\n \"filter\": {\n \"betweenFilter\": {\n \"fromValue\": {\n \"doubleValue\": \"\",\n \"int64Value\": \"\"\n },\n \"toValue\": {}\n },\n \"fieldName\": \"\",\n \"inListFilter\": {\n \"caseSensitive\": false,\n \"values\": []\n },\n \"numericFilter\": {\n \"operation\": \"\",\n \"value\": {}\n },\n \"stringFilter\": {\n \"caseSensitive\": false,\n \"matchType\": \"\",\n \"value\": \"\"\n }\n },\n \"notExpression\": \"\",\n \"orGroup\": {}\n },\n \"dimensions\": [\n {\n \"dimensionExpression\": {\n \"concatenate\": {\n \"delimiter\": \"\",\n \"dimensionNames\": []\n },\n \"lowerCase\": {\n \"dimensionName\": \"\"\n },\n \"upperCase\": {}\n },\n \"name\": \"\"\n }\n ],\n \"keepEmptyRows\": false,\n \"limit\": \"\",\n \"metricAggregations\": [],\n \"metricFilter\": {},\n \"metrics\": [\n {\n \"expression\": \"\",\n \"invisible\": false,\n \"name\": \"\"\n }\n ],\n \"offset\": \"\",\n \"orderBys\": [\n {\n \"desc\": false,\n \"dimension\": {\n \"dimensionName\": \"\",\n \"orderType\": \"\"\n },\n \"metric\": {\n \"metricName\": \"\"\n },\n \"pivot\": {\n \"metricName\": \"\",\n \"pivotSelections\": [\n {\n \"dimensionName\": \"\",\n \"dimensionValue\": \"\"\n }\n ]\n }\n }\n ],\n \"property\": \"\",\n \"returnPropertyQuota\": false\n }\n ]\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/v1beta/:property:batchRunReports"),
Content = new StringContent("{\n \"requests\": [\n {\n \"cohortSpec\": {\n \"cohortReportSettings\": {\n \"accumulate\": false\n },\n \"cohorts\": [\n {\n \"dateRange\": {\n \"endDate\": \"\",\n \"name\": \"\",\n \"startDate\": \"\"\n },\n \"dimension\": \"\",\n \"name\": \"\"\n }\n ],\n \"cohortsRange\": {\n \"endOffset\": 0,\n \"granularity\": \"\",\n \"startOffset\": 0\n }\n },\n \"currencyCode\": \"\",\n \"dateRanges\": [\n {}\n ],\n \"dimensionFilter\": {\n \"andGroup\": {\n \"expressions\": []\n },\n \"filter\": {\n \"betweenFilter\": {\n \"fromValue\": {\n \"doubleValue\": \"\",\n \"int64Value\": \"\"\n },\n \"toValue\": {}\n },\n \"fieldName\": \"\",\n \"inListFilter\": {\n \"caseSensitive\": false,\n \"values\": []\n },\n \"numericFilter\": {\n \"operation\": \"\",\n \"value\": {}\n },\n \"stringFilter\": {\n \"caseSensitive\": false,\n \"matchType\": \"\",\n \"value\": \"\"\n }\n },\n \"notExpression\": \"\",\n \"orGroup\": {}\n },\n \"dimensions\": [\n {\n \"dimensionExpression\": {\n \"concatenate\": {\n \"delimiter\": \"\",\n \"dimensionNames\": []\n },\n \"lowerCase\": {\n \"dimensionName\": \"\"\n },\n \"upperCase\": {}\n },\n \"name\": \"\"\n }\n ],\n \"keepEmptyRows\": false,\n \"limit\": \"\",\n \"metricAggregations\": [],\n \"metricFilter\": {},\n \"metrics\": [\n {\n \"expression\": \"\",\n \"invisible\": false,\n \"name\": \"\"\n }\n ],\n \"offset\": \"\",\n \"orderBys\": [\n {\n \"desc\": false,\n \"dimension\": {\n \"dimensionName\": \"\",\n \"orderType\": \"\"\n },\n \"metric\": {\n \"metricName\": \"\"\n },\n \"pivot\": {\n \"metricName\": \"\",\n \"pivotSelections\": [\n {\n \"dimensionName\": \"\",\n \"dimensionValue\": \"\"\n }\n ]\n }\n }\n ],\n \"property\": \"\",\n \"returnPropertyQuota\": false\n }\n ]\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1beta/:property:batchRunReports");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"requests\": [\n {\n \"cohortSpec\": {\n \"cohortReportSettings\": {\n \"accumulate\": false\n },\n \"cohorts\": [\n {\n \"dateRange\": {\n \"endDate\": \"\",\n \"name\": \"\",\n \"startDate\": \"\"\n },\n \"dimension\": \"\",\n \"name\": \"\"\n }\n ],\n \"cohortsRange\": {\n \"endOffset\": 0,\n \"granularity\": \"\",\n \"startOffset\": 0\n }\n },\n \"currencyCode\": \"\",\n \"dateRanges\": [\n {}\n ],\n \"dimensionFilter\": {\n \"andGroup\": {\n \"expressions\": []\n },\n \"filter\": {\n \"betweenFilter\": {\n \"fromValue\": {\n \"doubleValue\": \"\",\n \"int64Value\": \"\"\n },\n \"toValue\": {}\n },\n \"fieldName\": \"\",\n \"inListFilter\": {\n \"caseSensitive\": false,\n \"values\": []\n },\n \"numericFilter\": {\n \"operation\": \"\",\n \"value\": {}\n },\n \"stringFilter\": {\n \"caseSensitive\": false,\n \"matchType\": \"\",\n \"value\": \"\"\n }\n },\n \"notExpression\": \"\",\n \"orGroup\": {}\n },\n \"dimensions\": [\n {\n \"dimensionExpression\": {\n \"concatenate\": {\n \"delimiter\": \"\",\n \"dimensionNames\": []\n },\n \"lowerCase\": {\n \"dimensionName\": \"\"\n },\n \"upperCase\": {}\n },\n \"name\": \"\"\n }\n ],\n \"keepEmptyRows\": false,\n \"limit\": \"\",\n \"metricAggregations\": [],\n \"metricFilter\": {},\n \"metrics\": [\n {\n \"expression\": \"\",\n \"invisible\": false,\n \"name\": \"\"\n }\n ],\n \"offset\": \"\",\n \"orderBys\": [\n {\n \"desc\": false,\n \"dimension\": {\n \"dimensionName\": \"\",\n \"orderType\": \"\"\n },\n \"metric\": {\n \"metricName\": \"\"\n },\n \"pivot\": {\n \"metricName\": \"\",\n \"pivotSelections\": [\n {\n \"dimensionName\": \"\",\n \"dimensionValue\": \"\"\n }\n ]\n }\n }\n ],\n \"property\": \"\",\n \"returnPropertyQuota\": false\n }\n ]\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1beta/:property:batchRunReports"
payload := strings.NewReader("{\n \"requests\": [\n {\n \"cohortSpec\": {\n \"cohortReportSettings\": {\n \"accumulate\": false\n },\n \"cohorts\": [\n {\n \"dateRange\": {\n \"endDate\": \"\",\n \"name\": \"\",\n \"startDate\": \"\"\n },\n \"dimension\": \"\",\n \"name\": \"\"\n }\n ],\n \"cohortsRange\": {\n \"endOffset\": 0,\n \"granularity\": \"\",\n \"startOffset\": 0\n }\n },\n \"currencyCode\": \"\",\n \"dateRanges\": [\n {}\n ],\n \"dimensionFilter\": {\n \"andGroup\": {\n \"expressions\": []\n },\n \"filter\": {\n \"betweenFilter\": {\n \"fromValue\": {\n \"doubleValue\": \"\",\n \"int64Value\": \"\"\n },\n \"toValue\": {}\n },\n \"fieldName\": \"\",\n \"inListFilter\": {\n \"caseSensitive\": false,\n \"values\": []\n },\n \"numericFilter\": {\n \"operation\": \"\",\n \"value\": {}\n },\n \"stringFilter\": {\n \"caseSensitive\": false,\n \"matchType\": \"\",\n \"value\": \"\"\n }\n },\n \"notExpression\": \"\",\n \"orGroup\": {}\n },\n \"dimensions\": [\n {\n \"dimensionExpression\": {\n \"concatenate\": {\n \"delimiter\": \"\",\n \"dimensionNames\": []\n },\n \"lowerCase\": {\n \"dimensionName\": \"\"\n },\n \"upperCase\": {}\n },\n \"name\": \"\"\n }\n ],\n \"keepEmptyRows\": false,\n \"limit\": \"\",\n \"metricAggregations\": [],\n \"metricFilter\": {},\n \"metrics\": [\n {\n \"expression\": \"\",\n \"invisible\": false,\n \"name\": \"\"\n }\n ],\n \"offset\": \"\",\n \"orderBys\": [\n {\n \"desc\": false,\n \"dimension\": {\n \"dimensionName\": \"\",\n \"orderType\": \"\"\n },\n \"metric\": {\n \"metricName\": \"\"\n },\n \"pivot\": {\n \"metricName\": \"\",\n \"pivotSelections\": [\n {\n \"dimensionName\": \"\",\n \"dimensionValue\": \"\"\n }\n ]\n }\n }\n ],\n \"property\": \"\",\n \"returnPropertyQuota\": false\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/v1beta/:property:batchRunReports HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 2366
{
"requests": [
{
"cohortSpec": {
"cohortReportSettings": {
"accumulate": false
},
"cohorts": [
{
"dateRange": {
"endDate": "",
"name": "",
"startDate": ""
},
"dimension": "",
"name": ""
}
],
"cohortsRange": {
"endOffset": 0,
"granularity": "",
"startOffset": 0
}
},
"currencyCode": "",
"dateRanges": [
{}
],
"dimensionFilter": {
"andGroup": {
"expressions": []
},
"filter": {
"betweenFilter": {
"fromValue": {
"doubleValue": "",
"int64Value": ""
},
"toValue": {}
},
"fieldName": "",
"inListFilter": {
"caseSensitive": false,
"values": []
},
"numericFilter": {
"operation": "",
"value": {}
},
"stringFilter": {
"caseSensitive": false,
"matchType": "",
"value": ""
}
},
"notExpression": "",
"orGroup": {}
},
"dimensions": [
{
"dimensionExpression": {
"concatenate": {
"delimiter": "",
"dimensionNames": []
},
"lowerCase": {
"dimensionName": ""
},
"upperCase": {}
},
"name": ""
}
],
"keepEmptyRows": false,
"limit": "",
"metricAggregations": [],
"metricFilter": {},
"metrics": [
{
"expression": "",
"invisible": false,
"name": ""
}
],
"offset": "",
"orderBys": [
{
"desc": false,
"dimension": {
"dimensionName": "",
"orderType": ""
},
"metric": {
"metricName": ""
},
"pivot": {
"metricName": "",
"pivotSelections": [
{
"dimensionName": "",
"dimensionValue": ""
}
]
}
}
],
"property": "",
"returnPropertyQuota": false
}
]
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1beta/:property:batchRunReports")
.setHeader("content-type", "application/json")
.setBody("{\n \"requests\": [\n {\n \"cohortSpec\": {\n \"cohortReportSettings\": {\n \"accumulate\": false\n },\n \"cohorts\": [\n {\n \"dateRange\": {\n \"endDate\": \"\",\n \"name\": \"\",\n \"startDate\": \"\"\n },\n \"dimension\": \"\",\n \"name\": \"\"\n }\n ],\n \"cohortsRange\": {\n \"endOffset\": 0,\n \"granularity\": \"\",\n \"startOffset\": 0\n }\n },\n \"currencyCode\": \"\",\n \"dateRanges\": [\n {}\n ],\n \"dimensionFilter\": {\n \"andGroup\": {\n \"expressions\": []\n },\n \"filter\": {\n \"betweenFilter\": {\n \"fromValue\": {\n \"doubleValue\": \"\",\n \"int64Value\": \"\"\n },\n \"toValue\": {}\n },\n \"fieldName\": \"\",\n \"inListFilter\": {\n \"caseSensitive\": false,\n \"values\": []\n },\n \"numericFilter\": {\n \"operation\": \"\",\n \"value\": {}\n },\n \"stringFilter\": {\n \"caseSensitive\": false,\n \"matchType\": \"\",\n \"value\": \"\"\n }\n },\n \"notExpression\": \"\",\n \"orGroup\": {}\n },\n \"dimensions\": [\n {\n \"dimensionExpression\": {\n \"concatenate\": {\n \"delimiter\": \"\",\n \"dimensionNames\": []\n },\n \"lowerCase\": {\n \"dimensionName\": \"\"\n },\n \"upperCase\": {}\n },\n \"name\": \"\"\n }\n ],\n \"keepEmptyRows\": false,\n \"limit\": \"\",\n \"metricAggregations\": [],\n \"metricFilter\": {},\n \"metrics\": [\n {\n \"expression\": \"\",\n \"invisible\": false,\n \"name\": \"\"\n }\n ],\n \"offset\": \"\",\n \"orderBys\": [\n {\n \"desc\": false,\n \"dimension\": {\n \"dimensionName\": \"\",\n \"orderType\": \"\"\n },\n \"metric\": {\n \"metricName\": \"\"\n },\n \"pivot\": {\n \"metricName\": \"\",\n \"pivotSelections\": [\n {\n \"dimensionName\": \"\",\n \"dimensionValue\": \"\"\n }\n ]\n }\n }\n ],\n \"property\": \"\",\n \"returnPropertyQuota\": false\n }\n ]\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1beta/:property:batchRunReports"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"requests\": [\n {\n \"cohortSpec\": {\n \"cohortReportSettings\": {\n \"accumulate\": false\n },\n \"cohorts\": [\n {\n \"dateRange\": {\n \"endDate\": \"\",\n \"name\": \"\",\n \"startDate\": \"\"\n },\n \"dimension\": \"\",\n \"name\": \"\"\n }\n ],\n \"cohortsRange\": {\n \"endOffset\": 0,\n \"granularity\": \"\",\n \"startOffset\": 0\n }\n },\n \"currencyCode\": \"\",\n \"dateRanges\": [\n {}\n ],\n \"dimensionFilter\": {\n \"andGroup\": {\n \"expressions\": []\n },\n \"filter\": {\n \"betweenFilter\": {\n \"fromValue\": {\n \"doubleValue\": \"\",\n \"int64Value\": \"\"\n },\n \"toValue\": {}\n },\n \"fieldName\": \"\",\n \"inListFilter\": {\n \"caseSensitive\": false,\n \"values\": []\n },\n \"numericFilter\": {\n \"operation\": \"\",\n \"value\": {}\n },\n \"stringFilter\": {\n \"caseSensitive\": false,\n \"matchType\": \"\",\n \"value\": \"\"\n }\n },\n \"notExpression\": \"\",\n \"orGroup\": {}\n },\n \"dimensions\": [\n {\n \"dimensionExpression\": {\n \"concatenate\": {\n \"delimiter\": \"\",\n \"dimensionNames\": []\n },\n \"lowerCase\": {\n \"dimensionName\": \"\"\n },\n \"upperCase\": {}\n },\n \"name\": \"\"\n }\n ],\n \"keepEmptyRows\": false,\n \"limit\": \"\",\n \"metricAggregations\": [],\n \"metricFilter\": {},\n \"metrics\": [\n {\n \"expression\": \"\",\n \"invisible\": false,\n \"name\": \"\"\n }\n ],\n \"offset\": \"\",\n \"orderBys\": [\n {\n \"desc\": false,\n \"dimension\": {\n \"dimensionName\": \"\",\n \"orderType\": \"\"\n },\n \"metric\": {\n \"metricName\": \"\"\n },\n \"pivot\": {\n \"metricName\": \"\",\n \"pivotSelections\": [\n {\n \"dimensionName\": \"\",\n \"dimensionValue\": \"\"\n }\n ]\n }\n }\n ],\n \"property\": \"\",\n \"returnPropertyQuota\": false\n }\n ]\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"requests\": [\n {\n \"cohortSpec\": {\n \"cohortReportSettings\": {\n \"accumulate\": false\n },\n \"cohorts\": [\n {\n \"dateRange\": {\n \"endDate\": \"\",\n \"name\": \"\",\n \"startDate\": \"\"\n },\n \"dimension\": \"\",\n \"name\": \"\"\n }\n ],\n \"cohortsRange\": {\n \"endOffset\": 0,\n \"granularity\": \"\",\n \"startOffset\": 0\n }\n },\n \"currencyCode\": \"\",\n \"dateRanges\": [\n {}\n ],\n \"dimensionFilter\": {\n \"andGroup\": {\n \"expressions\": []\n },\n \"filter\": {\n \"betweenFilter\": {\n \"fromValue\": {\n \"doubleValue\": \"\",\n \"int64Value\": \"\"\n },\n \"toValue\": {}\n },\n \"fieldName\": \"\",\n \"inListFilter\": {\n \"caseSensitive\": false,\n \"values\": []\n },\n \"numericFilter\": {\n \"operation\": \"\",\n \"value\": {}\n },\n \"stringFilter\": {\n \"caseSensitive\": false,\n \"matchType\": \"\",\n \"value\": \"\"\n }\n },\n \"notExpression\": \"\",\n \"orGroup\": {}\n },\n \"dimensions\": [\n {\n \"dimensionExpression\": {\n \"concatenate\": {\n \"delimiter\": \"\",\n \"dimensionNames\": []\n },\n \"lowerCase\": {\n \"dimensionName\": \"\"\n },\n \"upperCase\": {}\n },\n \"name\": \"\"\n }\n ],\n \"keepEmptyRows\": false,\n \"limit\": \"\",\n \"metricAggregations\": [],\n \"metricFilter\": {},\n \"metrics\": [\n {\n \"expression\": \"\",\n \"invisible\": false,\n \"name\": \"\"\n }\n ],\n \"offset\": \"\",\n \"orderBys\": [\n {\n \"desc\": false,\n \"dimension\": {\n \"dimensionName\": \"\",\n \"orderType\": \"\"\n },\n \"metric\": {\n \"metricName\": \"\"\n },\n \"pivot\": {\n \"metricName\": \"\",\n \"pivotSelections\": [\n {\n \"dimensionName\": \"\",\n \"dimensionValue\": \"\"\n }\n ]\n }\n }\n ],\n \"property\": \"\",\n \"returnPropertyQuota\": false\n }\n ]\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1beta/:property:batchRunReports")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1beta/:property:batchRunReports")
.header("content-type", "application/json")
.body("{\n \"requests\": [\n {\n \"cohortSpec\": {\n \"cohortReportSettings\": {\n \"accumulate\": false\n },\n \"cohorts\": [\n {\n \"dateRange\": {\n \"endDate\": \"\",\n \"name\": \"\",\n \"startDate\": \"\"\n },\n \"dimension\": \"\",\n \"name\": \"\"\n }\n ],\n \"cohortsRange\": {\n \"endOffset\": 0,\n \"granularity\": \"\",\n \"startOffset\": 0\n }\n },\n \"currencyCode\": \"\",\n \"dateRanges\": [\n {}\n ],\n \"dimensionFilter\": {\n \"andGroup\": {\n \"expressions\": []\n },\n \"filter\": {\n \"betweenFilter\": {\n \"fromValue\": {\n \"doubleValue\": \"\",\n \"int64Value\": \"\"\n },\n \"toValue\": {}\n },\n \"fieldName\": \"\",\n \"inListFilter\": {\n \"caseSensitive\": false,\n \"values\": []\n },\n \"numericFilter\": {\n \"operation\": \"\",\n \"value\": {}\n },\n \"stringFilter\": {\n \"caseSensitive\": false,\n \"matchType\": \"\",\n \"value\": \"\"\n }\n },\n \"notExpression\": \"\",\n \"orGroup\": {}\n },\n \"dimensions\": [\n {\n \"dimensionExpression\": {\n \"concatenate\": {\n \"delimiter\": \"\",\n \"dimensionNames\": []\n },\n \"lowerCase\": {\n \"dimensionName\": \"\"\n },\n \"upperCase\": {}\n },\n \"name\": \"\"\n }\n ],\n \"keepEmptyRows\": false,\n \"limit\": \"\",\n \"metricAggregations\": [],\n \"metricFilter\": {},\n \"metrics\": [\n {\n \"expression\": \"\",\n \"invisible\": false,\n \"name\": \"\"\n }\n ],\n \"offset\": \"\",\n \"orderBys\": [\n {\n \"desc\": false,\n \"dimension\": {\n \"dimensionName\": \"\",\n \"orderType\": \"\"\n },\n \"metric\": {\n \"metricName\": \"\"\n },\n \"pivot\": {\n \"metricName\": \"\",\n \"pivotSelections\": [\n {\n \"dimensionName\": \"\",\n \"dimensionValue\": \"\"\n }\n ]\n }\n }\n ],\n \"property\": \"\",\n \"returnPropertyQuota\": false\n }\n ]\n}")
.asString();
const data = JSON.stringify({
requests: [
{
cohortSpec: {
cohortReportSettings: {
accumulate: false
},
cohorts: [
{
dateRange: {
endDate: '',
name: '',
startDate: ''
},
dimension: '',
name: ''
}
],
cohortsRange: {
endOffset: 0,
granularity: '',
startOffset: 0
}
},
currencyCode: '',
dateRanges: [
{}
],
dimensionFilter: {
andGroup: {
expressions: []
},
filter: {
betweenFilter: {
fromValue: {
doubleValue: '',
int64Value: ''
},
toValue: {}
},
fieldName: '',
inListFilter: {
caseSensitive: false,
values: []
},
numericFilter: {
operation: '',
value: {}
},
stringFilter: {
caseSensitive: false,
matchType: '',
value: ''
}
},
notExpression: '',
orGroup: {}
},
dimensions: [
{
dimensionExpression: {
concatenate: {
delimiter: '',
dimensionNames: []
},
lowerCase: {
dimensionName: ''
},
upperCase: {}
},
name: ''
}
],
keepEmptyRows: false,
limit: '',
metricAggregations: [],
metricFilter: {},
metrics: [
{
expression: '',
invisible: false,
name: ''
}
],
offset: '',
orderBys: [
{
desc: false,
dimension: {
dimensionName: '',
orderType: ''
},
metric: {
metricName: ''
},
pivot: {
metricName: '',
pivotSelections: [
{
dimensionName: '',
dimensionValue: ''
}
]
}
}
],
property: '',
returnPropertyQuota: false
}
]
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v1beta/:property:batchRunReports');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1beta/:property:batchRunReports',
headers: {'content-type': 'application/json'},
data: {
requests: [
{
cohortSpec: {
cohortReportSettings: {accumulate: false},
cohorts: [{dateRange: {endDate: '', name: '', startDate: ''}, dimension: '', name: ''}],
cohortsRange: {endOffset: 0, granularity: '', startOffset: 0}
},
currencyCode: '',
dateRanges: [{}],
dimensionFilter: {
andGroup: {expressions: []},
filter: {
betweenFilter: {fromValue: {doubleValue: '', int64Value: ''}, toValue: {}},
fieldName: '',
inListFilter: {caseSensitive: false, values: []},
numericFilter: {operation: '', value: {}},
stringFilter: {caseSensitive: false, matchType: '', value: ''}
},
notExpression: '',
orGroup: {}
},
dimensions: [
{
dimensionExpression: {
concatenate: {delimiter: '', dimensionNames: []},
lowerCase: {dimensionName: ''},
upperCase: {}
},
name: ''
}
],
keepEmptyRows: false,
limit: '',
metricAggregations: [],
metricFilter: {},
metrics: [{expression: '', invisible: false, name: ''}],
offset: '',
orderBys: [
{
desc: false,
dimension: {dimensionName: '', orderType: ''},
metric: {metricName: ''},
pivot: {metricName: '', pivotSelections: [{dimensionName: '', dimensionValue: ''}]}
}
],
property: '',
returnPropertyQuota: false
}
]
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1beta/:property:batchRunReports';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"requests":[{"cohortSpec":{"cohortReportSettings":{"accumulate":false},"cohorts":[{"dateRange":{"endDate":"","name":"","startDate":""},"dimension":"","name":""}],"cohortsRange":{"endOffset":0,"granularity":"","startOffset":0}},"currencyCode":"","dateRanges":[{}],"dimensionFilter":{"andGroup":{"expressions":[]},"filter":{"betweenFilter":{"fromValue":{"doubleValue":"","int64Value":""},"toValue":{}},"fieldName":"","inListFilter":{"caseSensitive":false,"values":[]},"numericFilter":{"operation":"","value":{}},"stringFilter":{"caseSensitive":false,"matchType":"","value":""}},"notExpression":"","orGroup":{}},"dimensions":[{"dimensionExpression":{"concatenate":{"delimiter":"","dimensionNames":[]},"lowerCase":{"dimensionName":""},"upperCase":{}},"name":""}],"keepEmptyRows":false,"limit":"","metricAggregations":[],"metricFilter":{},"metrics":[{"expression":"","invisible":false,"name":""}],"offset":"","orderBys":[{"desc":false,"dimension":{"dimensionName":"","orderType":""},"metric":{"metricName":""},"pivot":{"metricName":"","pivotSelections":[{"dimensionName":"","dimensionValue":""}]}}],"property":"","returnPropertyQuota":false}]}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1beta/:property:batchRunReports',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "requests": [\n {\n "cohortSpec": {\n "cohortReportSettings": {\n "accumulate": false\n },\n "cohorts": [\n {\n "dateRange": {\n "endDate": "",\n "name": "",\n "startDate": ""\n },\n "dimension": "",\n "name": ""\n }\n ],\n "cohortsRange": {\n "endOffset": 0,\n "granularity": "",\n "startOffset": 0\n }\n },\n "currencyCode": "",\n "dateRanges": [\n {}\n ],\n "dimensionFilter": {\n "andGroup": {\n "expressions": []\n },\n "filter": {\n "betweenFilter": {\n "fromValue": {\n "doubleValue": "",\n "int64Value": ""\n },\n "toValue": {}\n },\n "fieldName": "",\n "inListFilter": {\n "caseSensitive": false,\n "values": []\n },\n "numericFilter": {\n "operation": "",\n "value": {}\n },\n "stringFilter": {\n "caseSensitive": false,\n "matchType": "",\n "value": ""\n }\n },\n "notExpression": "",\n "orGroup": {}\n },\n "dimensions": [\n {\n "dimensionExpression": {\n "concatenate": {\n "delimiter": "",\n "dimensionNames": []\n },\n "lowerCase": {\n "dimensionName": ""\n },\n "upperCase": {}\n },\n "name": ""\n }\n ],\n "keepEmptyRows": false,\n "limit": "",\n "metricAggregations": [],\n "metricFilter": {},\n "metrics": [\n {\n "expression": "",\n "invisible": false,\n "name": ""\n }\n ],\n "offset": "",\n "orderBys": [\n {\n "desc": false,\n "dimension": {\n "dimensionName": "",\n "orderType": ""\n },\n "metric": {\n "metricName": ""\n },\n "pivot": {\n "metricName": "",\n "pivotSelections": [\n {\n "dimensionName": "",\n "dimensionValue": ""\n }\n ]\n }\n }\n ],\n "property": "",\n "returnPropertyQuota": false\n }\n ]\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"requests\": [\n {\n \"cohortSpec\": {\n \"cohortReportSettings\": {\n \"accumulate\": false\n },\n \"cohorts\": [\n {\n \"dateRange\": {\n \"endDate\": \"\",\n \"name\": \"\",\n \"startDate\": \"\"\n },\n \"dimension\": \"\",\n \"name\": \"\"\n }\n ],\n \"cohortsRange\": {\n \"endOffset\": 0,\n \"granularity\": \"\",\n \"startOffset\": 0\n }\n },\n \"currencyCode\": \"\",\n \"dateRanges\": [\n {}\n ],\n \"dimensionFilter\": {\n \"andGroup\": {\n \"expressions\": []\n },\n \"filter\": {\n \"betweenFilter\": {\n \"fromValue\": {\n \"doubleValue\": \"\",\n \"int64Value\": \"\"\n },\n \"toValue\": {}\n },\n \"fieldName\": \"\",\n \"inListFilter\": {\n \"caseSensitive\": false,\n \"values\": []\n },\n \"numericFilter\": {\n \"operation\": \"\",\n \"value\": {}\n },\n \"stringFilter\": {\n \"caseSensitive\": false,\n \"matchType\": \"\",\n \"value\": \"\"\n }\n },\n \"notExpression\": \"\",\n \"orGroup\": {}\n },\n \"dimensions\": [\n {\n \"dimensionExpression\": {\n \"concatenate\": {\n \"delimiter\": \"\",\n \"dimensionNames\": []\n },\n \"lowerCase\": {\n \"dimensionName\": \"\"\n },\n \"upperCase\": {}\n },\n \"name\": \"\"\n }\n ],\n \"keepEmptyRows\": false,\n \"limit\": \"\",\n \"metricAggregations\": [],\n \"metricFilter\": {},\n \"metrics\": [\n {\n \"expression\": \"\",\n \"invisible\": false,\n \"name\": \"\"\n }\n ],\n \"offset\": \"\",\n \"orderBys\": [\n {\n \"desc\": false,\n \"dimension\": {\n \"dimensionName\": \"\",\n \"orderType\": \"\"\n },\n \"metric\": {\n \"metricName\": \"\"\n },\n \"pivot\": {\n \"metricName\": \"\",\n \"pivotSelections\": [\n {\n \"dimensionName\": \"\",\n \"dimensionValue\": \"\"\n }\n ]\n }\n }\n ],\n \"property\": \"\",\n \"returnPropertyQuota\": false\n }\n ]\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1beta/:property:batchRunReports")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1beta/:property:batchRunReports',
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({
requests: [
{
cohortSpec: {
cohortReportSettings: {accumulate: false},
cohorts: [{dateRange: {endDate: '', name: '', startDate: ''}, dimension: '', name: ''}],
cohortsRange: {endOffset: 0, granularity: '', startOffset: 0}
},
currencyCode: '',
dateRanges: [{}],
dimensionFilter: {
andGroup: {expressions: []},
filter: {
betweenFilter: {fromValue: {doubleValue: '', int64Value: ''}, toValue: {}},
fieldName: '',
inListFilter: {caseSensitive: false, values: []},
numericFilter: {operation: '', value: {}},
stringFilter: {caseSensitive: false, matchType: '', value: ''}
},
notExpression: '',
orGroup: {}
},
dimensions: [
{
dimensionExpression: {
concatenate: {delimiter: '', dimensionNames: []},
lowerCase: {dimensionName: ''},
upperCase: {}
},
name: ''
}
],
keepEmptyRows: false,
limit: '',
metricAggregations: [],
metricFilter: {},
metrics: [{expression: '', invisible: false, name: ''}],
offset: '',
orderBys: [
{
desc: false,
dimension: {dimensionName: '', orderType: ''},
metric: {metricName: ''},
pivot: {metricName: '', pivotSelections: [{dimensionName: '', dimensionValue: ''}]}
}
],
property: '',
returnPropertyQuota: false
}
]
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1beta/:property:batchRunReports',
headers: {'content-type': 'application/json'},
body: {
requests: [
{
cohortSpec: {
cohortReportSettings: {accumulate: false},
cohorts: [{dateRange: {endDate: '', name: '', startDate: ''}, dimension: '', name: ''}],
cohortsRange: {endOffset: 0, granularity: '', startOffset: 0}
},
currencyCode: '',
dateRanges: [{}],
dimensionFilter: {
andGroup: {expressions: []},
filter: {
betweenFilter: {fromValue: {doubleValue: '', int64Value: ''}, toValue: {}},
fieldName: '',
inListFilter: {caseSensitive: false, values: []},
numericFilter: {operation: '', value: {}},
stringFilter: {caseSensitive: false, matchType: '', value: ''}
},
notExpression: '',
orGroup: {}
},
dimensions: [
{
dimensionExpression: {
concatenate: {delimiter: '', dimensionNames: []},
lowerCase: {dimensionName: ''},
upperCase: {}
},
name: ''
}
],
keepEmptyRows: false,
limit: '',
metricAggregations: [],
metricFilter: {},
metrics: [{expression: '', invisible: false, name: ''}],
offset: '',
orderBys: [
{
desc: false,
dimension: {dimensionName: '', orderType: ''},
metric: {metricName: ''},
pivot: {metricName: '', pivotSelections: [{dimensionName: '', dimensionValue: ''}]}
}
],
property: '',
returnPropertyQuota: false
}
]
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/v1beta/:property:batchRunReports');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
requests: [
{
cohortSpec: {
cohortReportSettings: {
accumulate: false
},
cohorts: [
{
dateRange: {
endDate: '',
name: '',
startDate: ''
},
dimension: '',
name: ''
}
],
cohortsRange: {
endOffset: 0,
granularity: '',
startOffset: 0
}
},
currencyCode: '',
dateRanges: [
{}
],
dimensionFilter: {
andGroup: {
expressions: []
},
filter: {
betweenFilter: {
fromValue: {
doubleValue: '',
int64Value: ''
},
toValue: {}
},
fieldName: '',
inListFilter: {
caseSensitive: false,
values: []
},
numericFilter: {
operation: '',
value: {}
},
stringFilter: {
caseSensitive: false,
matchType: '',
value: ''
}
},
notExpression: '',
orGroup: {}
},
dimensions: [
{
dimensionExpression: {
concatenate: {
delimiter: '',
dimensionNames: []
},
lowerCase: {
dimensionName: ''
},
upperCase: {}
},
name: ''
}
],
keepEmptyRows: false,
limit: '',
metricAggregations: [],
metricFilter: {},
metrics: [
{
expression: '',
invisible: false,
name: ''
}
],
offset: '',
orderBys: [
{
desc: false,
dimension: {
dimensionName: '',
orderType: ''
},
metric: {
metricName: ''
},
pivot: {
metricName: '',
pivotSelections: [
{
dimensionName: '',
dimensionValue: ''
}
]
}
}
],
property: '',
returnPropertyQuota: false
}
]
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/v1beta/:property:batchRunReports',
headers: {'content-type': 'application/json'},
data: {
requests: [
{
cohortSpec: {
cohortReportSettings: {accumulate: false},
cohorts: [{dateRange: {endDate: '', name: '', startDate: ''}, dimension: '', name: ''}],
cohortsRange: {endOffset: 0, granularity: '', startOffset: 0}
},
currencyCode: '',
dateRanges: [{}],
dimensionFilter: {
andGroup: {expressions: []},
filter: {
betweenFilter: {fromValue: {doubleValue: '', int64Value: ''}, toValue: {}},
fieldName: '',
inListFilter: {caseSensitive: false, values: []},
numericFilter: {operation: '', value: {}},
stringFilter: {caseSensitive: false, matchType: '', value: ''}
},
notExpression: '',
orGroup: {}
},
dimensions: [
{
dimensionExpression: {
concatenate: {delimiter: '', dimensionNames: []},
lowerCase: {dimensionName: ''},
upperCase: {}
},
name: ''
}
],
keepEmptyRows: false,
limit: '',
metricAggregations: [],
metricFilter: {},
metrics: [{expression: '', invisible: false, name: ''}],
offset: '',
orderBys: [
{
desc: false,
dimension: {dimensionName: '', orderType: ''},
metric: {metricName: ''},
pivot: {metricName: '', pivotSelections: [{dimensionName: '', dimensionValue: ''}]}
}
],
property: '',
returnPropertyQuota: false
}
]
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1beta/:property:batchRunReports';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"requests":[{"cohortSpec":{"cohortReportSettings":{"accumulate":false},"cohorts":[{"dateRange":{"endDate":"","name":"","startDate":""},"dimension":"","name":""}],"cohortsRange":{"endOffset":0,"granularity":"","startOffset":0}},"currencyCode":"","dateRanges":[{}],"dimensionFilter":{"andGroup":{"expressions":[]},"filter":{"betweenFilter":{"fromValue":{"doubleValue":"","int64Value":""},"toValue":{}},"fieldName":"","inListFilter":{"caseSensitive":false,"values":[]},"numericFilter":{"operation":"","value":{}},"stringFilter":{"caseSensitive":false,"matchType":"","value":""}},"notExpression":"","orGroup":{}},"dimensions":[{"dimensionExpression":{"concatenate":{"delimiter":"","dimensionNames":[]},"lowerCase":{"dimensionName":""},"upperCase":{}},"name":""}],"keepEmptyRows":false,"limit":"","metricAggregations":[],"metricFilter":{},"metrics":[{"expression":"","invisible":false,"name":""}],"offset":"","orderBys":[{"desc":false,"dimension":{"dimensionName":"","orderType":""},"metric":{"metricName":""},"pivot":{"metricName":"","pivotSelections":[{"dimensionName":"","dimensionValue":""}]}}],"property":"","returnPropertyQuota":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 = @{ @"requests": @[ @{ @"cohortSpec": @{ @"cohortReportSettings": @{ @"accumulate": @NO }, @"cohorts": @[ @{ @"dateRange": @{ @"endDate": @"", @"name": @"", @"startDate": @"" }, @"dimension": @"", @"name": @"" } ], @"cohortsRange": @{ @"endOffset": @0, @"granularity": @"", @"startOffset": @0 } }, @"currencyCode": @"", @"dateRanges": @[ @{ } ], @"dimensionFilter": @{ @"andGroup": @{ @"expressions": @[ ] }, @"filter": @{ @"betweenFilter": @{ @"fromValue": @{ @"doubleValue": @"", @"int64Value": @"" }, @"toValue": @{ } }, @"fieldName": @"", @"inListFilter": @{ @"caseSensitive": @NO, @"values": @[ ] }, @"numericFilter": @{ @"operation": @"", @"value": @{ } }, @"stringFilter": @{ @"caseSensitive": @NO, @"matchType": @"", @"value": @"" } }, @"notExpression": @"", @"orGroup": @{ } }, @"dimensions": @[ @{ @"dimensionExpression": @{ @"concatenate": @{ @"delimiter": @"", @"dimensionNames": @[ ] }, @"lowerCase": @{ @"dimensionName": @"" }, @"upperCase": @{ } }, @"name": @"" } ], @"keepEmptyRows": @NO, @"limit": @"", @"metricAggregations": @[ ], @"metricFilter": @{ }, @"metrics": @[ @{ @"expression": @"", @"invisible": @NO, @"name": @"" } ], @"offset": @"", @"orderBys": @[ @{ @"desc": @NO, @"dimension": @{ @"dimensionName": @"", @"orderType": @"" }, @"metric": @{ @"metricName": @"" }, @"pivot": @{ @"metricName": @"", @"pivotSelections": @[ @{ @"dimensionName": @"", @"dimensionValue": @"" } ] } } ], @"property": @"", @"returnPropertyQuota": @NO } ] };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1beta/:property:batchRunReports"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1beta/:property:batchRunReports" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"requests\": [\n {\n \"cohortSpec\": {\n \"cohortReportSettings\": {\n \"accumulate\": false\n },\n \"cohorts\": [\n {\n \"dateRange\": {\n \"endDate\": \"\",\n \"name\": \"\",\n \"startDate\": \"\"\n },\n \"dimension\": \"\",\n \"name\": \"\"\n }\n ],\n \"cohortsRange\": {\n \"endOffset\": 0,\n \"granularity\": \"\",\n \"startOffset\": 0\n }\n },\n \"currencyCode\": \"\",\n \"dateRanges\": [\n {}\n ],\n \"dimensionFilter\": {\n \"andGroup\": {\n \"expressions\": []\n },\n \"filter\": {\n \"betweenFilter\": {\n \"fromValue\": {\n \"doubleValue\": \"\",\n \"int64Value\": \"\"\n },\n \"toValue\": {}\n },\n \"fieldName\": \"\",\n \"inListFilter\": {\n \"caseSensitive\": false,\n \"values\": []\n },\n \"numericFilter\": {\n \"operation\": \"\",\n \"value\": {}\n },\n \"stringFilter\": {\n \"caseSensitive\": false,\n \"matchType\": \"\",\n \"value\": \"\"\n }\n },\n \"notExpression\": \"\",\n \"orGroup\": {}\n },\n \"dimensions\": [\n {\n \"dimensionExpression\": {\n \"concatenate\": {\n \"delimiter\": \"\",\n \"dimensionNames\": []\n },\n \"lowerCase\": {\n \"dimensionName\": \"\"\n },\n \"upperCase\": {}\n },\n \"name\": \"\"\n }\n ],\n \"keepEmptyRows\": false,\n \"limit\": \"\",\n \"metricAggregations\": [],\n \"metricFilter\": {},\n \"metrics\": [\n {\n \"expression\": \"\",\n \"invisible\": false,\n \"name\": \"\"\n }\n ],\n \"offset\": \"\",\n \"orderBys\": [\n {\n \"desc\": false,\n \"dimension\": {\n \"dimensionName\": \"\",\n \"orderType\": \"\"\n },\n \"metric\": {\n \"metricName\": \"\"\n },\n \"pivot\": {\n \"metricName\": \"\",\n \"pivotSelections\": [\n {\n \"dimensionName\": \"\",\n \"dimensionValue\": \"\"\n }\n ]\n }\n }\n ],\n \"property\": \"\",\n \"returnPropertyQuota\": false\n }\n ]\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1beta/:property:batchRunReports",
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([
'requests' => [
[
'cohortSpec' => [
'cohortReportSettings' => [
'accumulate' => null
],
'cohorts' => [
[
'dateRange' => [
'endDate' => '',
'name' => '',
'startDate' => ''
],
'dimension' => '',
'name' => ''
]
],
'cohortsRange' => [
'endOffset' => 0,
'granularity' => '',
'startOffset' => 0
]
],
'currencyCode' => '',
'dateRanges' => [
[
]
],
'dimensionFilter' => [
'andGroup' => [
'expressions' => [
]
],
'filter' => [
'betweenFilter' => [
'fromValue' => [
'doubleValue' => '',
'int64Value' => ''
],
'toValue' => [
]
],
'fieldName' => '',
'inListFilter' => [
'caseSensitive' => null,
'values' => [
]
],
'numericFilter' => [
'operation' => '',
'value' => [
]
],
'stringFilter' => [
'caseSensitive' => null,
'matchType' => '',
'value' => ''
]
],
'notExpression' => '',
'orGroup' => [
]
],
'dimensions' => [
[
'dimensionExpression' => [
'concatenate' => [
'delimiter' => '',
'dimensionNames' => [
]
],
'lowerCase' => [
'dimensionName' => ''
],
'upperCase' => [
]
],
'name' => ''
]
],
'keepEmptyRows' => null,
'limit' => '',
'metricAggregations' => [
],
'metricFilter' => [
],
'metrics' => [
[
'expression' => '',
'invisible' => null,
'name' => ''
]
],
'offset' => '',
'orderBys' => [
[
'desc' => null,
'dimension' => [
'dimensionName' => '',
'orderType' => ''
],
'metric' => [
'metricName' => ''
],
'pivot' => [
'metricName' => '',
'pivotSelections' => [
[
'dimensionName' => '',
'dimensionValue' => ''
]
]
]
]
],
'property' => '',
'returnPropertyQuota' => null
]
]
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/v1beta/:property:batchRunReports', [
'body' => '{
"requests": [
{
"cohortSpec": {
"cohortReportSettings": {
"accumulate": false
},
"cohorts": [
{
"dateRange": {
"endDate": "",
"name": "",
"startDate": ""
},
"dimension": "",
"name": ""
}
],
"cohortsRange": {
"endOffset": 0,
"granularity": "",
"startOffset": 0
}
},
"currencyCode": "",
"dateRanges": [
{}
],
"dimensionFilter": {
"andGroup": {
"expressions": []
},
"filter": {
"betweenFilter": {
"fromValue": {
"doubleValue": "",
"int64Value": ""
},
"toValue": {}
},
"fieldName": "",
"inListFilter": {
"caseSensitive": false,
"values": []
},
"numericFilter": {
"operation": "",
"value": {}
},
"stringFilter": {
"caseSensitive": false,
"matchType": "",
"value": ""
}
},
"notExpression": "",
"orGroup": {}
},
"dimensions": [
{
"dimensionExpression": {
"concatenate": {
"delimiter": "",
"dimensionNames": []
},
"lowerCase": {
"dimensionName": ""
},
"upperCase": {}
},
"name": ""
}
],
"keepEmptyRows": false,
"limit": "",
"metricAggregations": [],
"metricFilter": {},
"metrics": [
{
"expression": "",
"invisible": false,
"name": ""
}
],
"offset": "",
"orderBys": [
{
"desc": false,
"dimension": {
"dimensionName": "",
"orderType": ""
},
"metric": {
"metricName": ""
},
"pivot": {
"metricName": "",
"pivotSelections": [
{
"dimensionName": "",
"dimensionValue": ""
}
]
}
}
],
"property": "",
"returnPropertyQuota": false
}
]
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1beta/:property:batchRunReports');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'requests' => [
[
'cohortSpec' => [
'cohortReportSettings' => [
'accumulate' => null
],
'cohorts' => [
[
'dateRange' => [
'endDate' => '',
'name' => '',
'startDate' => ''
],
'dimension' => '',
'name' => ''
]
],
'cohortsRange' => [
'endOffset' => 0,
'granularity' => '',
'startOffset' => 0
]
],
'currencyCode' => '',
'dateRanges' => [
[
]
],
'dimensionFilter' => [
'andGroup' => [
'expressions' => [
]
],
'filter' => [
'betweenFilter' => [
'fromValue' => [
'doubleValue' => '',
'int64Value' => ''
],
'toValue' => [
]
],
'fieldName' => '',
'inListFilter' => [
'caseSensitive' => null,
'values' => [
]
],
'numericFilter' => [
'operation' => '',
'value' => [
]
],
'stringFilter' => [
'caseSensitive' => null,
'matchType' => '',
'value' => ''
]
],
'notExpression' => '',
'orGroup' => [
]
],
'dimensions' => [
[
'dimensionExpression' => [
'concatenate' => [
'delimiter' => '',
'dimensionNames' => [
]
],
'lowerCase' => [
'dimensionName' => ''
],
'upperCase' => [
]
],
'name' => ''
]
],
'keepEmptyRows' => null,
'limit' => '',
'metricAggregations' => [
],
'metricFilter' => [
],
'metrics' => [
[
'expression' => '',
'invisible' => null,
'name' => ''
]
],
'offset' => '',
'orderBys' => [
[
'desc' => null,
'dimension' => [
'dimensionName' => '',
'orderType' => ''
],
'metric' => [
'metricName' => ''
],
'pivot' => [
'metricName' => '',
'pivotSelections' => [
[
'dimensionName' => '',
'dimensionValue' => ''
]
]
]
]
],
'property' => '',
'returnPropertyQuota' => null
]
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'requests' => [
[
'cohortSpec' => [
'cohortReportSettings' => [
'accumulate' => null
],
'cohorts' => [
[
'dateRange' => [
'endDate' => '',
'name' => '',
'startDate' => ''
],
'dimension' => '',
'name' => ''
]
],
'cohortsRange' => [
'endOffset' => 0,
'granularity' => '',
'startOffset' => 0
]
],
'currencyCode' => '',
'dateRanges' => [
[
]
],
'dimensionFilter' => [
'andGroup' => [
'expressions' => [
]
],
'filter' => [
'betweenFilter' => [
'fromValue' => [
'doubleValue' => '',
'int64Value' => ''
],
'toValue' => [
]
],
'fieldName' => '',
'inListFilter' => [
'caseSensitive' => null,
'values' => [
]
],
'numericFilter' => [
'operation' => '',
'value' => [
]
],
'stringFilter' => [
'caseSensitive' => null,
'matchType' => '',
'value' => ''
]
],
'notExpression' => '',
'orGroup' => [
]
],
'dimensions' => [
[
'dimensionExpression' => [
'concatenate' => [
'delimiter' => '',
'dimensionNames' => [
]
],
'lowerCase' => [
'dimensionName' => ''
],
'upperCase' => [
]
],
'name' => ''
]
],
'keepEmptyRows' => null,
'limit' => '',
'metricAggregations' => [
],
'metricFilter' => [
],
'metrics' => [
[
'expression' => '',
'invisible' => null,
'name' => ''
]
],
'offset' => '',
'orderBys' => [
[
'desc' => null,
'dimension' => [
'dimensionName' => '',
'orderType' => ''
],
'metric' => [
'metricName' => ''
],
'pivot' => [
'metricName' => '',
'pivotSelections' => [
[
'dimensionName' => '',
'dimensionValue' => ''
]
]
]
]
],
'property' => '',
'returnPropertyQuota' => null
]
]
]));
$request->setRequestUrl('{{baseUrl}}/v1beta/:property:batchRunReports');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1beta/:property:batchRunReports' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"requests": [
{
"cohortSpec": {
"cohortReportSettings": {
"accumulate": false
},
"cohorts": [
{
"dateRange": {
"endDate": "",
"name": "",
"startDate": ""
},
"dimension": "",
"name": ""
}
],
"cohortsRange": {
"endOffset": 0,
"granularity": "",
"startOffset": 0
}
},
"currencyCode": "",
"dateRanges": [
{}
],
"dimensionFilter": {
"andGroup": {
"expressions": []
},
"filter": {
"betweenFilter": {
"fromValue": {
"doubleValue": "",
"int64Value": ""
},
"toValue": {}
},
"fieldName": "",
"inListFilter": {
"caseSensitive": false,
"values": []
},
"numericFilter": {
"operation": "",
"value": {}
},
"stringFilter": {
"caseSensitive": false,
"matchType": "",
"value": ""
}
},
"notExpression": "",
"orGroup": {}
},
"dimensions": [
{
"dimensionExpression": {
"concatenate": {
"delimiter": "",
"dimensionNames": []
},
"lowerCase": {
"dimensionName": ""
},
"upperCase": {}
},
"name": ""
}
],
"keepEmptyRows": false,
"limit": "",
"metricAggregations": [],
"metricFilter": {},
"metrics": [
{
"expression": "",
"invisible": false,
"name": ""
}
],
"offset": "",
"orderBys": [
{
"desc": false,
"dimension": {
"dimensionName": "",
"orderType": ""
},
"metric": {
"metricName": ""
},
"pivot": {
"metricName": "",
"pivotSelections": [
{
"dimensionName": "",
"dimensionValue": ""
}
]
}
}
],
"property": "",
"returnPropertyQuota": false
}
]
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1beta/:property:batchRunReports' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"requests": [
{
"cohortSpec": {
"cohortReportSettings": {
"accumulate": false
},
"cohorts": [
{
"dateRange": {
"endDate": "",
"name": "",
"startDate": ""
},
"dimension": "",
"name": ""
}
],
"cohortsRange": {
"endOffset": 0,
"granularity": "",
"startOffset": 0
}
},
"currencyCode": "",
"dateRanges": [
{}
],
"dimensionFilter": {
"andGroup": {
"expressions": []
},
"filter": {
"betweenFilter": {
"fromValue": {
"doubleValue": "",
"int64Value": ""
},
"toValue": {}
},
"fieldName": "",
"inListFilter": {
"caseSensitive": false,
"values": []
},
"numericFilter": {
"operation": "",
"value": {}
},
"stringFilter": {
"caseSensitive": false,
"matchType": "",
"value": ""
}
},
"notExpression": "",
"orGroup": {}
},
"dimensions": [
{
"dimensionExpression": {
"concatenate": {
"delimiter": "",
"dimensionNames": []
},
"lowerCase": {
"dimensionName": ""
},
"upperCase": {}
},
"name": ""
}
],
"keepEmptyRows": false,
"limit": "",
"metricAggregations": [],
"metricFilter": {},
"metrics": [
{
"expression": "",
"invisible": false,
"name": ""
}
],
"offset": "",
"orderBys": [
{
"desc": false,
"dimension": {
"dimensionName": "",
"orderType": ""
},
"metric": {
"metricName": ""
},
"pivot": {
"metricName": "",
"pivotSelections": [
{
"dimensionName": "",
"dimensionValue": ""
}
]
}
}
],
"property": "",
"returnPropertyQuota": false
}
]
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"requests\": [\n {\n \"cohortSpec\": {\n \"cohortReportSettings\": {\n \"accumulate\": false\n },\n \"cohorts\": [\n {\n \"dateRange\": {\n \"endDate\": \"\",\n \"name\": \"\",\n \"startDate\": \"\"\n },\n \"dimension\": \"\",\n \"name\": \"\"\n }\n ],\n \"cohortsRange\": {\n \"endOffset\": 0,\n \"granularity\": \"\",\n \"startOffset\": 0\n }\n },\n \"currencyCode\": \"\",\n \"dateRanges\": [\n {}\n ],\n \"dimensionFilter\": {\n \"andGroup\": {\n \"expressions\": []\n },\n \"filter\": {\n \"betweenFilter\": {\n \"fromValue\": {\n \"doubleValue\": \"\",\n \"int64Value\": \"\"\n },\n \"toValue\": {}\n },\n \"fieldName\": \"\",\n \"inListFilter\": {\n \"caseSensitive\": false,\n \"values\": []\n },\n \"numericFilter\": {\n \"operation\": \"\",\n \"value\": {}\n },\n \"stringFilter\": {\n \"caseSensitive\": false,\n \"matchType\": \"\",\n \"value\": \"\"\n }\n },\n \"notExpression\": \"\",\n \"orGroup\": {}\n },\n \"dimensions\": [\n {\n \"dimensionExpression\": {\n \"concatenate\": {\n \"delimiter\": \"\",\n \"dimensionNames\": []\n },\n \"lowerCase\": {\n \"dimensionName\": \"\"\n },\n \"upperCase\": {}\n },\n \"name\": \"\"\n }\n ],\n \"keepEmptyRows\": false,\n \"limit\": \"\",\n \"metricAggregations\": [],\n \"metricFilter\": {},\n \"metrics\": [\n {\n \"expression\": \"\",\n \"invisible\": false,\n \"name\": \"\"\n }\n ],\n \"offset\": \"\",\n \"orderBys\": [\n {\n \"desc\": false,\n \"dimension\": {\n \"dimensionName\": \"\",\n \"orderType\": \"\"\n },\n \"metric\": {\n \"metricName\": \"\"\n },\n \"pivot\": {\n \"metricName\": \"\",\n \"pivotSelections\": [\n {\n \"dimensionName\": \"\",\n \"dimensionValue\": \"\"\n }\n ]\n }\n }\n ],\n \"property\": \"\",\n \"returnPropertyQuota\": false\n }\n ]\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1beta/:property:batchRunReports", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1beta/:property:batchRunReports"
payload = { "requests": [
{
"cohortSpec": {
"cohortReportSettings": { "accumulate": False },
"cohorts": [
{
"dateRange": {
"endDate": "",
"name": "",
"startDate": ""
},
"dimension": "",
"name": ""
}
],
"cohortsRange": {
"endOffset": 0,
"granularity": "",
"startOffset": 0
}
},
"currencyCode": "",
"dateRanges": [{}],
"dimensionFilter": {
"andGroup": { "expressions": [] },
"filter": {
"betweenFilter": {
"fromValue": {
"doubleValue": "",
"int64Value": ""
},
"toValue": {}
},
"fieldName": "",
"inListFilter": {
"caseSensitive": False,
"values": []
},
"numericFilter": {
"operation": "",
"value": {}
},
"stringFilter": {
"caseSensitive": False,
"matchType": "",
"value": ""
}
},
"notExpression": "",
"orGroup": {}
},
"dimensions": [
{
"dimensionExpression": {
"concatenate": {
"delimiter": "",
"dimensionNames": []
},
"lowerCase": { "dimensionName": "" },
"upperCase": {}
},
"name": ""
}
],
"keepEmptyRows": False,
"limit": "",
"metricAggregations": [],
"metricFilter": {},
"metrics": [
{
"expression": "",
"invisible": False,
"name": ""
}
],
"offset": "",
"orderBys": [
{
"desc": False,
"dimension": {
"dimensionName": "",
"orderType": ""
},
"metric": { "metricName": "" },
"pivot": {
"metricName": "",
"pivotSelections": [
{
"dimensionName": "",
"dimensionValue": ""
}
]
}
}
],
"property": "",
"returnPropertyQuota": False
}
] }
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1beta/:property:batchRunReports"
payload <- "{\n \"requests\": [\n {\n \"cohortSpec\": {\n \"cohortReportSettings\": {\n \"accumulate\": false\n },\n \"cohorts\": [\n {\n \"dateRange\": {\n \"endDate\": \"\",\n \"name\": \"\",\n \"startDate\": \"\"\n },\n \"dimension\": \"\",\n \"name\": \"\"\n }\n ],\n \"cohortsRange\": {\n \"endOffset\": 0,\n \"granularity\": \"\",\n \"startOffset\": 0\n }\n },\n \"currencyCode\": \"\",\n \"dateRanges\": [\n {}\n ],\n \"dimensionFilter\": {\n \"andGroup\": {\n \"expressions\": []\n },\n \"filter\": {\n \"betweenFilter\": {\n \"fromValue\": {\n \"doubleValue\": \"\",\n \"int64Value\": \"\"\n },\n \"toValue\": {}\n },\n \"fieldName\": \"\",\n \"inListFilter\": {\n \"caseSensitive\": false,\n \"values\": []\n },\n \"numericFilter\": {\n \"operation\": \"\",\n \"value\": {}\n },\n \"stringFilter\": {\n \"caseSensitive\": false,\n \"matchType\": \"\",\n \"value\": \"\"\n }\n },\n \"notExpression\": \"\",\n \"orGroup\": {}\n },\n \"dimensions\": [\n {\n \"dimensionExpression\": {\n \"concatenate\": {\n \"delimiter\": \"\",\n \"dimensionNames\": []\n },\n \"lowerCase\": {\n \"dimensionName\": \"\"\n },\n \"upperCase\": {}\n },\n \"name\": \"\"\n }\n ],\n \"keepEmptyRows\": false,\n \"limit\": \"\",\n \"metricAggregations\": [],\n \"metricFilter\": {},\n \"metrics\": [\n {\n \"expression\": \"\",\n \"invisible\": false,\n \"name\": \"\"\n }\n ],\n \"offset\": \"\",\n \"orderBys\": [\n {\n \"desc\": false,\n \"dimension\": {\n \"dimensionName\": \"\",\n \"orderType\": \"\"\n },\n \"metric\": {\n \"metricName\": \"\"\n },\n \"pivot\": {\n \"metricName\": \"\",\n \"pivotSelections\": [\n {\n \"dimensionName\": \"\",\n \"dimensionValue\": \"\"\n }\n ]\n }\n }\n ],\n \"property\": \"\",\n \"returnPropertyQuota\": false\n }\n ]\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1beta/:property:batchRunReports")
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 \"requests\": [\n {\n \"cohortSpec\": {\n \"cohortReportSettings\": {\n \"accumulate\": false\n },\n \"cohorts\": [\n {\n \"dateRange\": {\n \"endDate\": \"\",\n \"name\": \"\",\n \"startDate\": \"\"\n },\n \"dimension\": \"\",\n \"name\": \"\"\n }\n ],\n \"cohortsRange\": {\n \"endOffset\": 0,\n \"granularity\": \"\",\n \"startOffset\": 0\n }\n },\n \"currencyCode\": \"\",\n \"dateRanges\": [\n {}\n ],\n \"dimensionFilter\": {\n \"andGroup\": {\n \"expressions\": []\n },\n \"filter\": {\n \"betweenFilter\": {\n \"fromValue\": {\n \"doubleValue\": \"\",\n \"int64Value\": \"\"\n },\n \"toValue\": {}\n },\n \"fieldName\": \"\",\n \"inListFilter\": {\n \"caseSensitive\": false,\n \"values\": []\n },\n \"numericFilter\": {\n \"operation\": \"\",\n \"value\": {}\n },\n \"stringFilter\": {\n \"caseSensitive\": false,\n \"matchType\": \"\",\n \"value\": \"\"\n }\n },\n \"notExpression\": \"\",\n \"orGroup\": {}\n },\n \"dimensions\": [\n {\n \"dimensionExpression\": {\n \"concatenate\": {\n \"delimiter\": \"\",\n \"dimensionNames\": []\n },\n \"lowerCase\": {\n \"dimensionName\": \"\"\n },\n \"upperCase\": {}\n },\n \"name\": \"\"\n }\n ],\n \"keepEmptyRows\": false,\n \"limit\": \"\",\n \"metricAggregations\": [],\n \"metricFilter\": {},\n \"metrics\": [\n {\n \"expression\": \"\",\n \"invisible\": false,\n \"name\": \"\"\n }\n ],\n \"offset\": \"\",\n \"orderBys\": [\n {\n \"desc\": false,\n \"dimension\": {\n \"dimensionName\": \"\",\n \"orderType\": \"\"\n },\n \"metric\": {\n \"metricName\": \"\"\n },\n \"pivot\": {\n \"metricName\": \"\",\n \"pivotSelections\": [\n {\n \"dimensionName\": \"\",\n \"dimensionValue\": \"\"\n }\n ]\n }\n }\n ],\n \"property\": \"\",\n \"returnPropertyQuota\": false\n }\n ]\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/v1beta/:property:batchRunReports') do |req|
req.body = "{\n \"requests\": [\n {\n \"cohortSpec\": {\n \"cohortReportSettings\": {\n \"accumulate\": false\n },\n \"cohorts\": [\n {\n \"dateRange\": {\n \"endDate\": \"\",\n \"name\": \"\",\n \"startDate\": \"\"\n },\n \"dimension\": \"\",\n \"name\": \"\"\n }\n ],\n \"cohortsRange\": {\n \"endOffset\": 0,\n \"granularity\": \"\",\n \"startOffset\": 0\n }\n },\n \"currencyCode\": \"\",\n \"dateRanges\": [\n {}\n ],\n \"dimensionFilter\": {\n \"andGroup\": {\n \"expressions\": []\n },\n \"filter\": {\n \"betweenFilter\": {\n \"fromValue\": {\n \"doubleValue\": \"\",\n \"int64Value\": \"\"\n },\n \"toValue\": {}\n },\n \"fieldName\": \"\",\n \"inListFilter\": {\n \"caseSensitive\": false,\n \"values\": []\n },\n \"numericFilter\": {\n \"operation\": \"\",\n \"value\": {}\n },\n \"stringFilter\": {\n \"caseSensitive\": false,\n \"matchType\": \"\",\n \"value\": \"\"\n }\n },\n \"notExpression\": \"\",\n \"orGroup\": {}\n },\n \"dimensions\": [\n {\n \"dimensionExpression\": {\n \"concatenate\": {\n \"delimiter\": \"\",\n \"dimensionNames\": []\n },\n \"lowerCase\": {\n \"dimensionName\": \"\"\n },\n \"upperCase\": {}\n },\n \"name\": \"\"\n }\n ],\n \"keepEmptyRows\": false,\n \"limit\": \"\",\n \"metricAggregations\": [],\n \"metricFilter\": {},\n \"metrics\": [\n {\n \"expression\": \"\",\n \"invisible\": false,\n \"name\": \"\"\n }\n ],\n \"offset\": \"\",\n \"orderBys\": [\n {\n \"desc\": false,\n \"dimension\": {\n \"dimensionName\": \"\",\n \"orderType\": \"\"\n },\n \"metric\": {\n \"metricName\": \"\"\n },\n \"pivot\": {\n \"metricName\": \"\",\n \"pivotSelections\": [\n {\n \"dimensionName\": \"\",\n \"dimensionValue\": \"\"\n }\n ]\n }\n }\n ],\n \"property\": \"\",\n \"returnPropertyQuota\": false\n }\n ]\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1beta/:property:batchRunReports";
let payload = json!({"requests": (
json!({
"cohortSpec": json!({
"cohortReportSettings": json!({"accumulate": false}),
"cohorts": (
json!({
"dateRange": json!({
"endDate": "",
"name": "",
"startDate": ""
}),
"dimension": "",
"name": ""
})
),
"cohortsRange": json!({
"endOffset": 0,
"granularity": "",
"startOffset": 0
})
}),
"currencyCode": "",
"dateRanges": (json!({})),
"dimensionFilter": json!({
"andGroup": json!({"expressions": ()}),
"filter": json!({
"betweenFilter": json!({
"fromValue": json!({
"doubleValue": "",
"int64Value": ""
}),
"toValue": json!({})
}),
"fieldName": "",
"inListFilter": json!({
"caseSensitive": false,
"values": ()
}),
"numericFilter": json!({
"operation": "",
"value": json!({})
}),
"stringFilter": json!({
"caseSensitive": false,
"matchType": "",
"value": ""
})
}),
"notExpression": "",
"orGroup": json!({})
}),
"dimensions": (
json!({
"dimensionExpression": json!({
"concatenate": json!({
"delimiter": "",
"dimensionNames": ()
}),
"lowerCase": json!({"dimensionName": ""}),
"upperCase": json!({})
}),
"name": ""
})
),
"keepEmptyRows": false,
"limit": "",
"metricAggregations": (),
"metricFilter": json!({}),
"metrics": (
json!({
"expression": "",
"invisible": false,
"name": ""
})
),
"offset": "",
"orderBys": (
json!({
"desc": false,
"dimension": json!({
"dimensionName": "",
"orderType": ""
}),
"metric": json!({"metricName": ""}),
"pivot": json!({
"metricName": "",
"pivotSelections": (
json!({
"dimensionName": "",
"dimensionValue": ""
})
)
})
})
),
"property": "",
"returnPropertyQuota": false
})
)});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/v1beta/:property:batchRunReports \
--header 'content-type: application/json' \
--data '{
"requests": [
{
"cohortSpec": {
"cohortReportSettings": {
"accumulate": false
},
"cohorts": [
{
"dateRange": {
"endDate": "",
"name": "",
"startDate": ""
},
"dimension": "",
"name": ""
}
],
"cohortsRange": {
"endOffset": 0,
"granularity": "",
"startOffset": 0
}
},
"currencyCode": "",
"dateRanges": [
{}
],
"dimensionFilter": {
"andGroup": {
"expressions": []
},
"filter": {
"betweenFilter": {
"fromValue": {
"doubleValue": "",
"int64Value": ""
},
"toValue": {}
},
"fieldName": "",
"inListFilter": {
"caseSensitive": false,
"values": []
},
"numericFilter": {
"operation": "",
"value": {}
},
"stringFilter": {
"caseSensitive": false,
"matchType": "",
"value": ""
}
},
"notExpression": "",
"orGroup": {}
},
"dimensions": [
{
"dimensionExpression": {
"concatenate": {
"delimiter": "",
"dimensionNames": []
},
"lowerCase": {
"dimensionName": ""
},
"upperCase": {}
},
"name": ""
}
],
"keepEmptyRows": false,
"limit": "",
"metricAggregations": [],
"metricFilter": {},
"metrics": [
{
"expression": "",
"invisible": false,
"name": ""
}
],
"offset": "",
"orderBys": [
{
"desc": false,
"dimension": {
"dimensionName": "",
"orderType": ""
},
"metric": {
"metricName": ""
},
"pivot": {
"metricName": "",
"pivotSelections": [
{
"dimensionName": "",
"dimensionValue": ""
}
]
}
}
],
"property": "",
"returnPropertyQuota": false
}
]
}'
echo '{
"requests": [
{
"cohortSpec": {
"cohortReportSettings": {
"accumulate": false
},
"cohorts": [
{
"dateRange": {
"endDate": "",
"name": "",
"startDate": ""
},
"dimension": "",
"name": ""
}
],
"cohortsRange": {
"endOffset": 0,
"granularity": "",
"startOffset": 0
}
},
"currencyCode": "",
"dateRanges": [
{}
],
"dimensionFilter": {
"andGroup": {
"expressions": []
},
"filter": {
"betweenFilter": {
"fromValue": {
"doubleValue": "",
"int64Value": ""
},
"toValue": {}
},
"fieldName": "",
"inListFilter": {
"caseSensitive": false,
"values": []
},
"numericFilter": {
"operation": "",
"value": {}
},
"stringFilter": {
"caseSensitive": false,
"matchType": "",
"value": ""
}
},
"notExpression": "",
"orGroup": {}
},
"dimensions": [
{
"dimensionExpression": {
"concatenate": {
"delimiter": "",
"dimensionNames": []
},
"lowerCase": {
"dimensionName": ""
},
"upperCase": {}
},
"name": ""
}
],
"keepEmptyRows": false,
"limit": "",
"metricAggregations": [],
"metricFilter": {},
"metrics": [
{
"expression": "",
"invisible": false,
"name": ""
}
],
"offset": "",
"orderBys": [
{
"desc": false,
"dimension": {
"dimensionName": "",
"orderType": ""
},
"metric": {
"metricName": ""
},
"pivot": {
"metricName": "",
"pivotSelections": [
{
"dimensionName": "",
"dimensionValue": ""
}
]
}
}
],
"property": "",
"returnPropertyQuota": false
}
]
}' | \
http POST {{baseUrl}}/v1beta/:property:batchRunReports \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "requests": [\n {\n "cohortSpec": {\n "cohortReportSettings": {\n "accumulate": false\n },\n "cohorts": [\n {\n "dateRange": {\n "endDate": "",\n "name": "",\n "startDate": ""\n },\n "dimension": "",\n "name": ""\n }\n ],\n "cohortsRange": {\n "endOffset": 0,\n "granularity": "",\n "startOffset": 0\n }\n },\n "currencyCode": "",\n "dateRanges": [\n {}\n ],\n "dimensionFilter": {\n "andGroup": {\n "expressions": []\n },\n "filter": {\n "betweenFilter": {\n "fromValue": {\n "doubleValue": "",\n "int64Value": ""\n },\n "toValue": {}\n },\n "fieldName": "",\n "inListFilter": {\n "caseSensitive": false,\n "values": []\n },\n "numericFilter": {\n "operation": "",\n "value": {}\n },\n "stringFilter": {\n "caseSensitive": false,\n "matchType": "",\n "value": ""\n }\n },\n "notExpression": "",\n "orGroup": {}\n },\n "dimensions": [\n {\n "dimensionExpression": {\n "concatenate": {\n "delimiter": "",\n "dimensionNames": []\n },\n "lowerCase": {\n "dimensionName": ""\n },\n "upperCase": {}\n },\n "name": ""\n }\n ],\n "keepEmptyRows": false,\n "limit": "",\n "metricAggregations": [],\n "metricFilter": {},\n "metrics": [\n {\n "expression": "",\n "invisible": false,\n "name": ""\n }\n ],\n "offset": "",\n "orderBys": [\n {\n "desc": false,\n "dimension": {\n "dimensionName": "",\n "orderType": ""\n },\n "metric": {\n "metricName": ""\n },\n "pivot": {\n "metricName": "",\n "pivotSelections": [\n {\n "dimensionName": "",\n "dimensionValue": ""\n }\n ]\n }\n }\n ],\n "property": "",\n "returnPropertyQuota": false\n }\n ]\n}' \
--output-document \
- {{baseUrl}}/v1beta/:property:batchRunReports
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["requests": [
[
"cohortSpec": [
"cohortReportSettings": ["accumulate": false],
"cohorts": [
[
"dateRange": [
"endDate": "",
"name": "",
"startDate": ""
],
"dimension": "",
"name": ""
]
],
"cohortsRange": [
"endOffset": 0,
"granularity": "",
"startOffset": 0
]
],
"currencyCode": "",
"dateRanges": [[]],
"dimensionFilter": [
"andGroup": ["expressions": []],
"filter": [
"betweenFilter": [
"fromValue": [
"doubleValue": "",
"int64Value": ""
],
"toValue": []
],
"fieldName": "",
"inListFilter": [
"caseSensitive": false,
"values": []
],
"numericFilter": [
"operation": "",
"value": []
],
"stringFilter": [
"caseSensitive": false,
"matchType": "",
"value": ""
]
],
"notExpression": "",
"orGroup": []
],
"dimensions": [
[
"dimensionExpression": [
"concatenate": [
"delimiter": "",
"dimensionNames": []
],
"lowerCase": ["dimensionName": ""],
"upperCase": []
],
"name": ""
]
],
"keepEmptyRows": false,
"limit": "",
"metricAggregations": [],
"metricFilter": [],
"metrics": [
[
"expression": "",
"invisible": false,
"name": ""
]
],
"offset": "",
"orderBys": [
[
"desc": false,
"dimension": [
"dimensionName": "",
"orderType": ""
],
"metric": ["metricName": ""],
"pivot": [
"metricName": "",
"pivotSelections": [
[
"dimensionName": "",
"dimensionValue": ""
]
]
]
]
],
"property": "",
"returnPropertyQuota": false
]
]] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1beta/:property:batchRunReports")! 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
analyticsdata.properties.checkCompatibility
{{baseUrl}}/v1beta/:property:checkCompatibility
QUERY PARAMS
property
BODY json
{
"compatibilityFilter": "",
"dimensionFilter": {
"andGroup": {
"expressions": []
},
"filter": {
"betweenFilter": {
"fromValue": {
"doubleValue": "",
"int64Value": ""
},
"toValue": {}
},
"fieldName": "",
"inListFilter": {
"caseSensitive": false,
"values": []
},
"numericFilter": {
"operation": "",
"value": {}
},
"stringFilter": {
"caseSensitive": false,
"matchType": "",
"value": ""
}
},
"notExpression": "",
"orGroup": {}
},
"dimensions": [
{
"dimensionExpression": {
"concatenate": {
"delimiter": "",
"dimensionNames": []
},
"lowerCase": {
"dimensionName": ""
},
"upperCase": {}
},
"name": ""
}
],
"metricFilter": {},
"metrics": [
{
"expression": "",
"invisible": false,
"name": ""
}
]
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1beta/:property:checkCompatibility");
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 \"compatibilityFilter\": \"\",\n \"dimensionFilter\": {\n \"andGroup\": {\n \"expressions\": []\n },\n \"filter\": {\n \"betweenFilter\": {\n \"fromValue\": {\n \"doubleValue\": \"\",\n \"int64Value\": \"\"\n },\n \"toValue\": {}\n },\n \"fieldName\": \"\",\n \"inListFilter\": {\n \"caseSensitive\": false,\n \"values\": []\n },\n \"numericFilter\": {\n \"operation\": \"\",\n \"value\": {}\n },\n \"stringFilter\": {\n \"caseSensitive\": false,\n \"matchType\": \"\",\n \"value\": \"\"\n }\n },\n \"notExpression\": \"\",\n \"orGroup\": {}\n },\n \"dimensions\": [\n {\n \"dimensionExpression\": {\n \"concatenate\": {\n \"delimiter\": \"\",\n \"dimensionNames\": []\n },\n \"lowerCase\": {\n \"dimensionName\": \"\"\n },\n \"upperCase\": {}\n },\n \"name\": \"\"\n }\n ],\n \"metricFilter\": {},\n \"metrics\": [\n {\n \"expression\": \"\",\n \"invisible\": false,\n \"name\": \"\"\n }\n ]\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1beta/:property:checkCompatibility" {:content-type :json
:form-params {:compatibilityFilter ""
:dimensionFilter {:andGroup {:expressions []}
:filter {:betweenFilter {:fromValue {:doubleValue ""
:int64Value ""}
:toValue {}}
:fieldName ""
:inListFilter {:caseSensitive false
:values []}
:numericFilter {:operation ""
:value {}}
:stringFilter {:caseSensitive false
:matchType ""
:value ""}}
:notExpression ""
:orGroup {}}
:dimensions [{:dimensionExpression {:concatenate {:delimiter ""
:dimensionNames []}
:lowerCase {:dimensionName ""}
:upperCase {}}
:name ""}]
:metricFilter {}
:metrics [{:expression ""
:invisible false
:name ""}]}})
require "http/client"
url = "{{baseUrl}}/v1beta/:property:checkCompatibility"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"compatibilityFilter\": \"\",\n \"dimensionFilter\": {\n \"andGroup\": {\n \"expressions\": []\n },\n \"filter\": {\n \"betweenFilter\": {\n \"fromValue\": {\n \"doubleValue\": \"\",\n \"int64Value\": \"\"\n },\n \"toValue\": {}\n },\n \"fieldName\": \"\",\n \"inListFilter\": {\n \"caseSensitive\": false,\n \"values\": []\n },\n \"numericFilter\": {\n \"operation\": \"\",\n \"value\": {}\n },\n \"stringFilter\": {\n \"caseSensitive\": false,\n \"matchType\": \"\",\n \"value\": \"\"\n }\n },\n \"notExpression\": \"\",\n \"orGroup\": {}\n },\n \"dimensions\": [\n {\n \"dimensionExpression\": {\n \"concatenate\": {\n \"delimiter\": \"\",\n \"dimensionNames\": []\n },\n \"lowerCase\": {\n \"dimensionName\": \"\"\n },\n \"upperCase\": {}\n },\n \"name\": \"\"\n }\n ],\n \"metricFilter\": {},\n \"metrics\": [\n {\n \"expression\": \"\",\n \"invisible\": false,\n \"name\": \"\"\n }\n ]\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/v1beta/:property:checkCompatibility"),
Content = new StringContent("{\n \"compatibilityFilter\": \"\",\n \"dimensionFilter\": {\n \"andGroup\": {\n \"expressions\": []\n },\n \"filter\": {\n \"betweenFilter\": {\n \"fromValue\": {\n \"doubleValue\": \"\",\n \"int64Value\": \"\"\n },\n \"toValue\": {}\n },\n \"fieldName\": \"\",\n \"inListFilter\": {\n \"caseSensitive\": false,\n \"values\": []\n },\n \"numericFilter\": {\n \"operation\": \"\",\n \"value\": {}\n },\n \"stringFilter\": {\n \"caseSensitive\": false,\n \"matchType\": \"\",\n \"value\": \"\"\n }\n },\n \"notExpression\": \"\",\n \"orGroup\": {}\n },\n \"dimensions\": [\n {\n \"dimensionExpression\": {\n \"concatenate\": {\n \"delimiter\": \"\",\n \"dimensionNames\": []\n },\n \"lowerCase\": {\n \"dimensionName\": \"\"\n },\n \"upperCase\": {}\n },\n \"name\": \"\"\n }\n ],\n \"metricFilter\": {},\n \"metrics\": [\n {\n \"expression\": \"\",\n \"invisible\": false,\n \"name\": \"\"\n }\n ]\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1beta/:property:checkCompatibility");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"compatibilityFilter\": \"\",\n \"dimensionFilter\": {\n \"andGroup\": {\n \"expressions\": []\n },\n \"filter\": {\n \"betweenFilter\": {\n \"fromValue\": {\n \"doubleValue\": \"\",\n \"int64Value\": \"\"\n },\n \"toValue\": {}\n },\n \"fieldName\": \"\",\n \"inListFilter\": {\n \"caseSensitive\": false,\n \"values\": []\n },\n \"numericFilter\": {\n \"operation\": \"\",\n \"value\": {}\n },\n \"stringFilter\": {\n \"caseSensitive\": false,\n \"matchType\": \"\",\n \"value\": \"\"\n }\n },\n \"notExpression\": \"\",\n \"orGroup\": {}\n },\n \"dimensions\": [\n {\n \"dimensionExpression\": {\n \"concatenate\": {\n \"delimiter\": \"\",\n \"dimensionNames\": []\n },\n \"lowerCase\": {\n \"dimensionName\": \"\"\n },\n \"upperCase\": {}\n },\n \"name\": \"\"\n }\n ],\n \"metricFilter\": {},\n \"metrics\": [\n {\n \"expression\": \"\",\n \"invisible\": false,\n \"name\": \"\"\n }\n ]\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1beta/:property:checkCompatibility"
payload := strings.NewReader("{\n \"compatibilityFilter\": \"\",\n \"dimensionFilter\": {\n \"andGroup\": {\n \"expressions\": []\n },\n \"filter\": {\n \"betweenFilter\": {\n \"fromValue\": {\n \"doubleValue\": \"\",\n \"int64Value\": \"\"\n },\n \"toValue\": {}\n },\n \"fieldName\": \"\",\n \"inListFilter\": {\n \"caseSensitive\": false,\n \"values\": []\n },\n \"numericFilter\": {\n \"operation\": \"\",\n \"value\": {}\n },\n \"stringFilter\": {\n \"caseSensitive\": false,\n \"matchType\": \"\",\n \"value\": \"\"\n }\n },\n \"notExpression\": \"\",\n \"orGroup\": {}\n },\n \"dimensions\": [\n {\n \"dimensionExpression\": {\n \"concatenate\": {\n \"delimiter\": \"\",\n \"dimensionNames\": []\n },\n \"lowerCase\": {\n \"dimensionName\": \"\"\n },\n \"upperCase\": {}\n },\n \"name\": \"\"\n }\n ],\n \"metricFilter\": {},\n \"metrics\": [\n {\n \"expression\": \"\",\n \"invisible\": false,\n \"name\": \"\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/v1beta/:property:checkCompatibility HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 1012
{
"compatibilityFilter": "",
"dimensionFilter": {
"andGroup": {
"expressions": []
},
"filter": {
"betweenFilter": {
"fromValue": {
"doubleValue": "",
"int64Value": ""
},
"toValue": {}
},
"fieldName": "",
"inListFilter": {
"caseSensitive": false,
"values": []
},
"numericFilter": {
"operation": "",
"value": {}
},
"stringFilter": {
"caseSensitive": false,
"matchType": "",
"value": ""
}
},
"notExpression": "",
"orGroup": {}
},
"dimensions": [
{
"dimensionExpression": {
"concatenate": {
"delimiter": "",
"dimensionNames": []
},
"lowerCase": {
"dimensionName": ""
},
"upperCase": {}
},
"name": ""
}
],
"metricFilter": {},
"metrics": [
{
"expression": "",
"invisible": false,
"name": ""
}
]
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1beta/:property:checkCompatibility")
.setHeader("content-type", "application/json")
.setBody("{\n \"compatibilityFilter\": \"\",\n \"dimensionFilter\": {\n \"andGroup\": {\n \"expressions\": []\n },\n \"filter\": {\n \"betweenFilter\": {\n \"fromValue\": {\n \"doubleValue\": \"\",\n \"int64Value\": \"\"\n },\n \"toValue\": {}\n },\n \"fieldName\": \"\",\n \"inListFilter\": {\n \"caseSensitive\": false,\n \"values\": []\n },\n \"numericFilter\": {\n \"operation\": \"\",\n \"value\": {}\n },\n \"stringFilter\": {\n \"caseSensitive\": false,\n \"matchType\": \"\",\n \"value\": \"\"\n }\n },\n \"notExpression\": \"\",\n \"orGroup\": {}\n },\n \"dimensions\": [\n {\n \"dimensionExpression\": {\n \"concatenate\": {\n \"delimiter\": \"\",\n \"dimensionNames\": []\n },\n \"lowerCase\": {\n \"dimensionName\": \"\"\n },\n \"upperCase\": {}\n },\n \"name\": \"\"\n }\n ],\n \"metricFilter\": {},\n \"metrics\": [\n {\n \"expression\": \"\",\n \"invisible\": false,\n \"name\": \"\"\n }\n ]\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1beta/:property:checkCompatibility"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"compatibilityFilter\": \"\",\n \"dimensionFilter\": {\n \"andGroup\": {\n \"expressions\": []\n },\n \"filter\": {\n \"betweenFilter\": {\n \"fromValue\": {\n \"doubleValue\": \"\",\n \"int64Value\": \"\"\n },\n \"toValue\": {}\n },\n \"fieldName\": \"\",\n \"inListFilter\": {\n \"caseSensitive\": false,\n \"values\": []\n },\n \"numericFilter\": {\n \"operation\": \"\",\n \"value\": {}\n },\n \"stringFilter\": {\n \"caseSensitive\": false,\n \"matchType\": \"\",\n \"value\": \"\"\n }\n },\n \"notExpression\": \"\",\n \"orGroup\": {}\n },\n \"dimensions\": [\n {\n \"dimensionExpression\": {\n \"concatenate\": {\n \"delimiter\": \"\",\n \"dimensionNames\": []\n },\n \"lowerCase\": {\n \"dimensionName\": \"\"\n },\n \"upperCase\": {}\n },\n \"name\": \"\"\n }\n ],\n \"metricFilter\": {},\n \"metrics\": [\n {\n \"expression\": \"\",\n \"invisible\": false,\n \"name\": \"\"\n }\n ]\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"compatibilityFilter\": \"\",\n \"dimensionFilter\": {\n \"andGroup\": {\n \"expressions\": []\n },\n \"filter\": {\n \"betweenFilter\": {\n \"fromValue\": {\n \"doubleValue\": \"\",\n \"int64Value\": \"\"\n },\n \"toValue\": {}\n },\n \"fieldName\": \"\",\n \"inListFilter\": {\n \"caseSensitive\": false,\n \"values\": []\n },\n \"numericFilter\": {\n \"operation\": \"\",\n \"value\": {}\n },\n \"stringFilter\": {\n \"caseSensitive\": false,\n \"matchType\": \"\",\n \"value\": \"\"\n }\n },\n \"notExpression\": \"\",\n \"orGroup\": {}\n },\n \"dimensions\": [\n {\n \"dimensionExpression\": {\n \"concatenate\": {\n \"delimiter\": \"\",\n \"dimensionNames\": []\n },\n \"lowerCase\": {\n \"dimensionName\": \"\"\n },\n \"upperCase\": {}\n },\n \"name\": \"\"\n }\n ],\n \"metricFilter\": {},\n \"metrics\": [\n {\n \"expression\": \"\",\n \"invisible\": false,\n \"name\": \"\"\n }\n ]\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1beta/:property:checkCompatibility")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1beta/:property:checkCompatibility")
.header("content-type", "application/json")
.body("{\n \"compatibilityFilter\": \"\",\n \"dimensionFilter\": {\n \"andGroup\": {\n \"expressions\": []\n },\n \"filter\": {\n \"betweenFilter\": {\n \"fromValue\": {\n \"doubleValue\": \"\",\n \"int64Value\": \"\"\n },\n \"toValue\": {}\n },\n \"fieldName\": \"\",\n \"inListFilter\": {\n \"caseSensitive\": false,\n \"values\": []\n },\n \"numericFilter\": {\n \"operation\": \"\",\n \"value\": {}\n },\n \"stringFilter\": {\n \"caseSensitive\": false,\n \"matchType\": \"\",\n \"value\": \"\"\n }\n },\n \"notExpression\": \"\",\n \"orGroup\": {}\n },\n \"dimensions\": [\n {\n \"dimensionExpression\": {\n \"concatenate\": {\n \"delimiter\": \"\",\n \"dimensionNames\": []\n },\n \"lowerCase\": {\n \"dimensionName\": \"\"\n },\n \"upperCase\": {}\n },\n \"name\": \"\"\n }\n ],\n \"metricFilter\": {},\n \"metrics\": [\n {\n \"expression\": \"\",\n \"invisible\": false,\n \"name\": \"\"\n }\n ]\n}")
.asString();
const data = JSON.stringify({
compatibilityFilter: '',
dimensionFilter: {
andGroup: {
expressions: []
},
filter: {
betweenFilter: {
fromValue: {
doubleValue: '',
int64Value: ''
},
toValue: {}
},
fieldName: '',
inListFilter: {
caseSensitive: false,
values: []
},
numericFilter: {
operation: '',
value: {}
},
stringFilter: {
caseSensitive: false,
matchType: '',
value: ''
}
},
notExpression: '',
orGroup: {}
},
dimensions: [
{
dimensionExpression: {
concatenate: {
delimiter: '',
dimensionNames: []
},
lowerCase: {
dimensionName: ''
},
upperCase: {}
},
name: ''
}
],
metricFilter: {},
metrics: [
{
expression: '',
invisible: false,
name: ''
}
]
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v1beta/:property:checkCompatibility');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1beta/:property:checkCompatibility',
headers: {'content-type': 'application/json'},
data: {
compatibilityFilter: '',
dimensionFilter: {
andGroup: {expressions: []},
filter: {
betweenFilter: {fromValue: {doubleValue: '', int64Value: ''}, toValue: {}},
fieldName: '',
inListFilter: {caseSensitive: false, values: []},
numericFilter: {operation: '', value: {}},
stringFilter: {caseSensitive: false, matchType: '', value: ''}
},
notExpression: '',
orGroup: {}
},
dimensions: [
{
dimensionExpression: {
concatenate: {delimiter: '', dimensionNames: []},
lowerCase: {dimensionName: ''},
upperCase: {}
},
name: ''
}
],
metricFilter: {},
metrics: [{expression: '', invisible: false, name: ''}]
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1beta/:property:checkCompatibility';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"compatibilityFilter":"","dimensionFilter":{"andGroup":{"expressions":[]},"filter":{"betweenFilter":{"fromValue":{"doubleValue":"","int64Value":""},"toValue":{}},"fieldName":"","inListFilter":{"caseSensitive":false,"values":[]},"numericFilter":{"operation":"","value":{}},"stringFilter":{"caseSensitive":false,"matchType":"","value":""}},"notExpression":"","orGroup":{}},"dimensions":[{"dimensionExpression":{"concatenate":{"delimiter":"","dimensionNames":[]},"lowerCase":{"dimensionName":""},"upperCase":{}},"name":""}],"metricFilter":{},"metrics":[{"expression":"","invisible":false,"name":""}]}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1beta/:property:checkCompatibility',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "compatibilityFilter": "",\n "dimensionFilter": {\n "andGroup": {\n "expressions": []\n },\n "filter": {\n "betweenFilter": {\n "fromValue": {\n "doubleValue": "",\n "int64Value": ""\n },\n "toValue": {}\n },\n "fieldName": "",\n "inListFilter": {\n "caseSensitive": false,\n "values": []\n },\n "numericFilter": {\n "operation": "",\n "value": {}\n },\n "stringFilter": {\n "caseSensitive": false,\n "matchType": "",\n "value": ""\n }\n },\n "notExpression": "",\n "orGroup": {}\n },\n "dimensions": [\n {\n "dimensionExpression": {\n "concatenate": {\n "delimiter": "",\n "dimensionNames": []\n },\n "lowerCase": {\n "dimensionName": ""\n },\n "upperCase": {}\n },\n "name": ""\n }\n ],\n "metricFilter": {},\n "metrics": [\n {\n "expression": "",\n "invisible": false,\n "name": ""\n }\n ]\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"compatibilityFilter\": \"\",\n \"dimensionFilter\": {\n \"andGroup\": {\n \"expressions\": []\n },\n \"filter\": {\n \"betweenFilter\": {\n \"fromValue\": {\n \"doubleValue\": \"\",\n \"int64Value\": \"\"\n },\n \"toValue\": {}\n },\n \"fieldName\": \"\",\n \"inListFilter\": {\n \"caseSensitive\": false,\n \"values\": []\n },\n \"numericFilter\": {\n \"operation\": \"\",\n \"value\": {}\n },\n \"stringFilter\": {\n \"caseSensitive\": false,\n \"matchType\": \"\",\n \"value\": \"\"\n }\n },\n \"notExpression\": \"\",\n \"orGroup\": {}\n },\n \"dimensions\": [\n {\n \"dimensionExpression\": {\n \"concatenate\": {\n \"delimiter\": \"\",\n \"dimensionNames\": []\n },\n \"lowerCase\": {\n \"dimensionName\": \"\"\n },\n \"upperCase\": {}\n },\n \"name\": \"\"\n }\n ],\n \"metricFilter\": {},\n \"metrics\": [\n {\n \"expression\": \"\",\n \"invisible\": false,\n \"name\": \"\"\n }\n ]\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1beta/:property:checkCompatibility")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1beta/:property:checkCompatibility',
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({
compatibilityFilter: '',
dimensionFilter: {
andGroup: {expressions: []},
filter: {
betweenFilter: {fromValue: {doubleValue: '', int64Value: ''}, toValue: {}},
fieldName: '',
inListFilter: {caseSensitive: false, values: []},
numericFilter: {operation: '', value: {}},
stringFilter: {caseSensitive: false, matchType: '', value: ''}
},
notExpression: '',
orGroup: {}
},
dimensions: [
{
dimensionExpression: {
concatenate: {delimiter: '', dimensionNames: []},
lowerCase: {dimensionName: ''},
upperCase: {}
},
name: ''
}
],
metricFilter: {},
metrics: [{expression: '', invisible: false, name: ''}]
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1beta/:property:checkCompatibility',
headers: {'content-type': 'application/json'},
body: {
compatibilityFilter: '',
dimensionFilter: {
andGroup: {expressions: []},
filter: {
betweenFilter: {fromValue: {doubleValue: '', int64Value: ''}, toValue: {}},
fieldName: '',
inListFilter: {caseSensitive: false, values: []},
numericFilter: {operation: '', value: {}},
stringFilter: {caseSensitive: false, matchType: '', value: ''}
},
notExpression: '',
orGroup: {}
},
dimensions: [
{
dimensionExpression: {
concatenate: {delimiter: '', dimensionNames: []},
lowerCase: {dimensionName: ''},
upperCase: {}
},
name: ''
}
],
metricFilter: {},
metrics: [{expression: '', invisible: false, name: ''}]
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/v1beta/:property:checkCompatibility');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
compatibilityFilter: '',
dimensionFilter: {
andGroup: {
expressions: []
},
filter: {
betweenFilter: {
fromValue: {
doubleValue: '',
int64Value: ''
},
toValue: {}
},
fieldName: '',
inListFilter: {
caseSensitive: false,
values: []
},
numericFilter: {
operation: '',
value: {}
},
stringFilter: {
caseSensitive: false,
matchType: '',
value: ''
}
},
notExpression: '',
orGroup: {}
},
dimensions: [
{
dimensionExpression: {
concatenate: {
delimiter: '',
dimensionNames: []
},
lowerCase: {
dimensionName: ''
},
upperCase: {}
},
name: ''
}
],
metricFilter: {},
metrics: [
{
expression: '',
invisible: false,
name: ''
}
]
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/v1beta/:property:checkCompatibility',
headers: {'content-type': 'application/json'},
data: {
compatibilityFilter: '',
dimensionFilter: {
andGroup: {expressions: []},
filter: {
betweenFilter: {fromValue: {doubleValue: '', int64Value: ''}, toValue: {}},
fieldName: '',
inListFilter: {caseSensitive: false, values: []},
numericFilter: {operation: '', value: {}},
stringFilter: {caseSensitive: false, matchType: '', value: ''}
},
notExpression: '',
orGroup: {}
},
dimensions: [
{
dimensionExpression: {
concatenate: {delimiter: '', dimensionNames: []},
lowerCase: {dimensionName: ''},
upperCase: {}
},
name: ''
}
],
metricFilter: {},
metrics: [{expression: '', invisible: false, name: ''}]
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1beta/:property:checkCompatibility';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"compatibilityFilter":"","dimensionFilter":{"andGroup":{"expressions":[]},"filter":{"betweenFilter":{"fromValue":{"doubleValue":"","int64Value":""},"toValue":{}},"fieldName":"","inListFilter":{"caseSensitive":false,"values":[]},"numericFilter":{"operation":"","value":{}},"stringFilter":{"caseSensitive":false,"matchType":"","value":""}},"notExpression":"","orGroup":{}},"dimensions":[{"dimensionExpression":{"concatenate":{"delimiter":"","dimensionNames":[]},"lowerCase":{"dimensionName":""},"upperCase":{}},"name":""}],"metricFilter":{},"metrics":[{"expression":"","invisible":false,"name":""}]}'
};
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 = @{ @"compatibilityFilter": @"",
@"dimensionFilter": @{ @"andGroup": @{ @"expressions": @[ ] }, @"filter": @{ @"betweenFilter": @{ @"fromValue": @{ @"doubleValue": @"", @"int64Value": @"" }, @"toValue": @{ } }, @"fieldName": @"", @"inListFilter": @{ @"caseSensitive": @NO, @"values": @[ ] }, @"numericFilter": @{ @"operation": @"", @"value": @{ } }, @"stringFilter": @{ @"caseSensitive": @NO, @"matchType": @"", @"value": @"" } }, @"notExpression": @"", @"orGroup": @{ } },
@"dimensions": @[ @{ @"dimensionExpression": @{ @"concatenate": @{ @"delimiter": @"", @"dimensionNames": @[ ] }, @"lowerCase": @{ @"dimensionName": @"" }, @"upperCase": @{ } }, @"name": @"" } ],
@"metricFilter": @{ },
@"metrics": @[ @{ @"expression": @"", @"invisible": @NO, @"name": @"" } ] };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1beta/:property:checkCompatibility"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1beta/:property:checkCompatibility" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"compatibilityFilter\": \"\",\n \"dimensionFilter\": {\n \"andGroup\": {\n \"expressions\": []\n },\n \"filter\": {\n \"betweenFilter\": {\n \"fromValue\": {\n \"doubleValue\": \"\",\n \"int64Value\": \"\"\n },\n \"toValue\": {}\n },\n \"fieldName\": \"\",\n \"inListFilter\": {\n \"caseSensitive\": false,\n \"values\": []\n },\n \"numericFilter\": {\n \"operation\": \"\",\n \"value\": {}\n },\n \"stringFilter\": {\n \"caseSensitive\": false,\n \"matchType\": \"\",\n \"value\": \"\"\n }\n },\n \"notExpression\": \"\",\n \"orGroup\": {}\n },\n \"dimensions\": [\n {\n \"dimensionExpression\": {\n \"concatenate\": {\n \"delimiter\": \"\",\n \"dimensionNames\": []\n },\n \"lowerCase\": {\n \"dimensionName\": \"\"\n },\n \"upperCase\": {}\n },\n \"name\": \"\"\n }\n ],\n \"metricFilter\": {},\n \"metrics\": [\n {\n \"expression\": \"\",\n \"invisible\": false,\n \"name\": \"\"\n }\n ]\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1beta/:property:checkCompatibility",
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([
'compatibilityFilter' => '',
'dimensionFilter' => [
'andGroup' => [
'expressions' => [
]
],
'filter' => [
'betweenFilter' => [
'fromValue' => [
'doubleValue' => '',
'int64Value' => ''
],
'toValue' => [
]
],
'fieldName' => '',
'inListFilter' => [
'caseSensitive' => null,
'values' => [
]
],
'numericFilter' => [
'operation' => '',
'value' => [
]
],
'stringFilter' => [
'caseSensitive' => null,
'matchType' => '',
'value' => ''
]
],
'notExpression' => '',
'orGroup' => [
]
],
'dimensions' => [
[
'dimensionExpression' => [
'concatenate' => [
'delimiter' => '',
'dimensionNames' => [
]
],
'lowerCase' => [
'dimensionName' => ''
],
'upperCase' => [
]
],
'name' => ''
]
],
'metricFilter' => [
],
'metrics' => [
[
'expression' => '',
'invisible' => null,
'name' => ''
]
]
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/v1beta/:property:checkCompatibility', [
'body' => '{
"compatibilityFilter": "",
"dimensionFilter": {
"andGroup": {
"expressions": []
},
"filter": {
"betweenFilter": {
"fromValue": {
"doubleValue": "",
"int64Value": ""
},
"toValue": {}
},
"fieldName": "",
"inListFilter": {
"caseSensitive": false,
"values": []
},
"numericFilter": {
"operation": "",
"value": {}
},
"stringFilter": {
"caseSensitive": false,
"matchType": "",
"value": ""
}
},
"notExpression": "",
"orGroup": {}
},
"dimensions": [
{
"dimensionExpression": {
"concatenate": {
"delimiter": "",
"dimensionNames": []
},
"lowerCase": {
"dimensionName": ""
},
"upperCase": {}
},
"name": ""
}
],
"metricFilter": {},
"metrics": [
{
"expression": "",
"invisible": false,
"name": ""
}
]
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1beta/:property:checkCompatibility');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'compatibilityFilter' => '',
'dimensionFilter' => [
'andGroup' => [
'expressions' => [
]
],
'filter' => [
'betweenFilter' => [
'fromValue' => [
'doubleValue' => '',
'int64Value' => ''
],
'toValue' => [
]
],
'fieldName' => '',
'inListFilter' => [
'caseSensitive' => null,
'values' => [
]
],
'numericFilter' => [
'operation' => '',
'value' => [
]
],
'stringFilter' => [
'caseSensitive' => null,
'matchType' => '',
'value' => ''
]
],
'notExpression' => '',
'orGroup' => [
]
],
'dimensions' => [
[
'dimensionExpression' => [
'concatenate' => [
'delimiter' => '',
'dimensionNames' => [
]
],
'lowerCase' => [
'dimensionName' => ''
],
'upperCase' => [
]
],
'name' => ''
]
],
'metricFilter' => [
],
'metrics' => [
[
'expression' => '',
'invisible' => null,
'name' => ''
]
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'compatibilityFilter' => '',
'dimensionFilter' => [
'andGroup' => [
'expressions' => [
]
],
'filter' => [
'betweenFilter' => [
'fromValue' => [
'doubleValue' => '',
'int64Value' => ''
],
'toValue' => [
]
],
'fieldName' => '',
'inListFilter' => [
'caseSensitive' => null,
'values' => [
]
],
'numericFilter' => [
'operation' => '',
'value' => [
]
],
'stringFilter' => [
'caseSensitive' => null,
'matchType' => '',
'value' => ''
]
],
'notExpression' => '',
'orGroup' => [
]
],
'dimensions' => [
[
'dimensionExpression' => [
'concatenate' => [
'delimiter' => '',
'dimensionNames' => [
]
],
'lowerCase' => [
'dimensionName' => ''
],
'upperCase' => [
]
],
'name' => ''
]
],
'metricFilter' => [
],
'metrics' => [
[
'expression' => '',
'invisible' => null,
'name' => ''
]
]
]));
$request->setRequestUrl('{{baseUrl}}/v1beta/:property:checkCompatibility');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1beta/:property:checkCompatibility' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"compatibilityFilter": "",
"dimensionFilter": {
"andGroup": {
"expressions": []
},
"filter": {
"betweenFilter": {
"fromValue": {
"doubleValue": "",
"int64Value": ""
},
"toValue": {}
},
"fieldName": "",
"inListFilter": {
"caseSensitive": false,
"values": []
},
"numericFilter": {
"operation": "",
"value": {}
},
"stringFilter": {
"caseSensitive": false,
"matchType": "",
"value": ""
}
},
"notExpression": "",
"orGroup": {}
},
"dimensions": [
{
"dimensionExpression": {
"concatenate": {
"delimiter": "",
"dimensionNames": []
},
"lowerCase": {
"dimensionName": ""
},
"upperCase": {}
},
"name": ""
}
],
"metricFilter": {},
"metrics": [
{
"expression": "",
"invisible": false,
"name": ""
}
]
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1beta/:property:checkCompatibility' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"compatibilityFilter": "",
"dimensionFilter": {
"andGroup": {
"expressions": []
},
"filter": {
"betweenFilter": {
"fromValue": {
"doubleValue": "",
"int64Value": ""
},
"toValue": {}
},
"fieldName": "",
"inListFilter": {
"caseSensitive": false,
"values": []
},
"numericFilter": {
"operation": "",
"value": {}
},
"stringFilter": {
"caseSensitive": false,
"matchType": "",
"value": ""
}
},
"notExpression": "",
"orGroup": {}
},
"dimensions": [
{
"dimensionExpression": {
"concatenate": {
"delimiter": "",
"dimensionNames": []
},
"lowerCase": {
"dimensionName": ""
},
"upperCase": {}
},
"name": ""
}
],
"metricFilter": {},
"metrics": [
{
"expression": "",
"invisible": false,
"name": ""
}
]
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"compatibilityFilter\": \"\",\n \"dimensionFilter\": {\n \"andGroup\": {\n \"expressions\": []\n },\n \"filter\": {\n \"betweenFilter\": {\n \"fromValue\": {\n \"doubleValue\": \"\",\n \"int64Value\": \"\"\n },\n \"toValue\": {}\n },\n \"fieldName\": \"\",\n \"inListFilter\": {\n \"caseSensitive\": false,\n \"values\": []\n },\n \"numericFilter\": {\n \"operation\": \"\",\n \"value\": {}\n },\n \"stringFilter\": {\n \"caseSensitive\": false,\n \"matchType\": \"\",\n \"value\": \"\"\n }\n },\n \"notExpression\": \"\",\n \"orGroup\": {}\n },\n \"dimensions\": [\n {\n \"dimensionExpression\": {\n \"concatenate\": {\n \"delimiter\": \"\",\n \"dimensionNames\": []\n },\n \"lowerCase\": {\n \"dimensionName\": \"\"\n },\n \"upperCase\": {}\n },\n \"name\": \"\"\n }\n ],\n \"metricFilter\": {},\n \"metrics\": [\n {\n \"expression\": \"\",\n \"invisible\": false,\n \"name\": \"\"\n }\n ]\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1beta/:property:checkCompatibility", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1beta/:property:checkCompatibility"
payload = {
"compatibilityFilter": "",
"dimensionFilter": {
"andGroup": { "expressions": [] },
"filter": {
"betweenFilter": {
"fromValue": {
"doubleValue": "",
"int64Value": ""
},
"toValue": {}
},
"fieldName": "",
"inListFilter": {
"caseSensitive": False,
"values": []
},
"numericFilter": {
"operation": "",
"value": {}
},
"stringFilter": {
"caseSensitive": False,
"matchType": "",
"value": ""
}
},
"notExpression": "",
"orGroup": {}
},
"dimensions": [
{
"dimensionExpression": {
"concatenate": {
"delimiter": "",
"dimensionNames": []
},
"lowerCase": { "dimensionName": "" },
"upperCase": {}
},
"name": ""
}
],
"metricFilter": {},
"metrics": [
{
"expression": "",
"invisible": False,
"name": ""
}
]
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1beta/:property:checkCompatibility"
payload <- "{\n \"compatibilityFilter\": \"\",\n \"dimensionFilter\": {\n \"andGroup\": {\n \"expressions\": []\n },\n \"filter\": {\n \"betweenFilter\": {\n \"fromValue\": {\n \"doubleValue\": \"\",\n \"int64Value\": \"\"\n },\n \"toValue\": {}\n },\n \"fieldName\": \"\",\n \"inListFilter\": {\n \"caseSensitive\": false,\n \"values\": []\n },\n \"numericFilter\": {\n \"operation\": \"\",\n \"value\": {}\n },\n \"stringFilter\": {\n \"caseSensitive\": false,\n \"matchType\": \"\",\n \"value\": \"\"\n }\n },\n \"notExpression\": \"\",\n \"orGroup\": {}\n },\n \"dimensions\": [\n {\n \"dimensionExpression\": {\n \"concatenate\": {\n \"delimiter\": \"\",\n \"dimensionNames\": []\n },\n \"lowerCase\": {\n \"dimensionName\": \"\"\n },\n \"upperCase\": {}\n },\n \"name\": \"\"\n }\n ],\n \"metricFilter\": {},\n \"metrics\": [\n {\n \"expression\": \"\",\n \"invisible\": false,\n \"name\": \"\"\n }\n ]\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1beta/:property:checkCompatibility")
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 \"compatibilityFilter\": \"\",\n \"dimensionFilter\": {\n \"andGroup\": {\n \"expressions\": []\n },\n \"filter\": {\n \"betweenFilter\": {\n \"fromValue\": {\n \"doubleValue\": \"\",\n \"int64Value\": \"\"\n },\n \"toValue\": {}\n },\n \"fieldName\": \"\",\n \"inListFilter\": {\n \"caseSensitive\": false,\n \"values\": []\n },\n \"numericFilter\": {\n \"operation\": \"\",\n \"value\": {}\n },\n \"stringFilter\": {\n \"caseSensitive\": false,\n \"matchType\": \"\",\n \"value\": \"\"\n }\n },\n \"notExpression\": \"\",\n \"orGroup\": {}\n },\n \"dimensions\": [\n {\n \"dimensionExpression\": {\n \"concatenate\": {\n \"delimiter\": \"\",\n \"dimensionNames\": []\n },\n \"lowerCase\": {\n \"dimensionName\": \"\"\n },\n \"upperCase\": {}\n },\n \"name\": \"\"\n }\n ],\n \"metricFilter\": {},\n \"metrics\": [\n {\n \"expression\": \"\",\n \"invisible\": false,\n \"name\": \"\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/v1beta/:property:checkCompatibility') do |req|
req.body = "{\n \"compatibilityFilter\": \"\",\n \"dimensionFilter\": {\n \"andGroup\": {\n \"expressions\": []\n },\n \"filter\": {\n \"betweenFilter\": {\n \"fromValue\": {\n \"doubleValue\": \"\",\n \"int64Value\": \"\"\n },\n \"toValue\": {}\n },\n \"fieldName\": \"\",\n \"inListFilter\": {\n \"caseSensitive\": false,\n \"values\": []\n },\n \"numericFilter\": {\n \"operation\": \"\",\n \"value\": {}\n },\n \"stringFilter\": {\n \"caseSensitive\": false,\n \"matchType\": \"\",\n \"value\": \"\"\n }\n },\n \"notExpression\": \"\",\n \"orGroup\": {}\n },\n \"dimensions\": [\n {\n \"dimensionExpression\": {\n \"concatenate\": {\n \"delimiter\": \"\",\n \"dimensionNames\": []\n },\n \"lowerCase\": {\n \"dimensionName\": \"\"\n },\n \"upperCase\": {}\n },\n \"name\": \"\"\n }\n ],\n \"metricFilter\": {},\n \"metrics\": [\n {\n \"expression\": \"\",\n \"invisible\": false,\n \"name\": \"\"\n }\n ]\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1beta/:property:checkCompatibility";
let payload = json!({
"compatibilityFilter": "",
"dimensionFilter": json!({
"andGroup": json!({"expressions": ()}),
"filter": json!({
"betweenFilter": json!({
"fromValue": json!({
"doubleValue": "",
"int64Value": ""
}),
"toValue": json!({})
}),
"fieldName": "",
"inListFilter": json!({
"caseSensitive": false,
"values": ()
}),
"numericFilter": json!({
"operation": "",
"value": json!({})
}),
"stringFilter": json!({
"caseSensitive": false,
"matchType": "",
"value": ""
})
}),
"notExpression": "",
"orGroup": json!({})
}),
"dimensions": (
json!({
"dimensionExpression": json!({
"concatenate": json!({
"delimiter": "",
"dimensionNames": ()
}),
"lowerCase": json!({"dimensionName": ""}),
"upperCase": json!({})
}),
"name": ""
})
),
"metricFilter": json!({}),
"metrics": (
json!({
"expression": "",
"invisible": false,
"name": ""
})
)
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/v1beta/:property:checkCompatibility \
--header 'content-type: application/json' \
--data '{
"compatibilityFilter": "",
"dimensionFilter": {
"andGroup": {
"expressions": []
},
"filter": {
"betweenFilter": {
"fromValue": {
"doubleValue": "",
"int64Value": ""
},
"toValue": {}
},
"fieldName": "",
"inListFilter": {
"caseSensitive": false,
"values": []
},
"numericFilter": {
"operation": "",
"value": {}
},
"stringFilter": {
"caseSensitive": false,
"matchType": "",
"value": ""
}
},
"notExpression": "",
"orGroup": {}
},
"dimensions": [
{
"dimensionExpression": {
"concatenate": {
"delimiter": "",
"dimensionNames": []
},
"lowerCase": {
"dimensionName": ""
},
"upperCase": {}
},
"name": ""
}
],
"metricFilter": {},
"metrics": [
{
"expression": "",
"invisible": false,
"name": ""
}
]
}'
echo '{
"compatibilityFilter": "",
"dimensionFilter": {
"andGroup": {
"expressions": []
},
"filter": {
"betweenFilter": {
"fromValue": {
"doubleValue": "",
"int64Value": ""
},
"toValue": {}
},
"fieldName": "",
"inListFilter": {
"caseSensitive": false,
"values": []
},
"numericFilter": {
"operation": "",
"value": {}
},
"stringFilter": {
"caseSensitive": false,
"matchType": "",
"value": ""
}
},
"notExpression": "",
"orGroup": {}
},
"dimensions": [
{
"dimensionExpression": {
"concatenate": {
"delimiter": "",
"dimensionNames": []
},
"lowerCase": {
"dimensionName": ""
},
"upperCase": {}
},
"name": ""
}
],
"metricFilter": {},
"metrics": [
{
"expression": "",
"invisible": false,
"name": ""
}
]
}' | \
http POST {{baseUrl}}/v1beta/:property:checkCompatibility \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "compatibilityFilter": "",\n "dimensionFilter": {\n "andGroup": {\n "expressions": []\n },\n "filter": {\n "betweenFilter": {\n "fromValue": {\n "doubleValue": "",\n "int64Value": ""\n },\n "toValue": {}\n },\n "fieldName": "",\n "inListFilter": {\n "caseSensitive": false,\n "values": []\n },\n "numericFilter": {\n "operation": "",\n "value": {}\n },\n "stringFilter": {\n "caseSensitive": false,\n "matchType": "",\n "value": ""\n }\n },\n "notExpression": "",\n "orGroup": {}\n },\n "dimensions": [\n {\n "dimensionExpression": {\n "concatenate": {\n "delimiter": "",\n "dimensionNames": []\n },\n "lowerCase": {\n "dimensionName": ""\n },\n "upperCase": {}\n },\n "name": ""\n }\n ],\n "metricFilter": {},\n "metrics": [\n {\n "expression": "",\n "invisible": false,\n "name": ""\n }\n ]\n}' \
--output-document \
- {{baseUrl}}/v1beta/:property:checkCompatibility
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"compatibilityFilter": "",
"dimensionFilter": [
"andGroup": ["expressions": []],
"filter": [
"betweenFilter": [
"fromValue": [
"doubleValue": "",
"int64Value": ""
],
"toValue": []
],
"fieldName": "",
"inListFilter": [
"caseSensitive": false,
"values": []
],
"numericFilter": [
"operation": "",
"value": []
],
"stringFilter": [
"caseSensitive": false,
"matchType": "",
"value": ""
]
],
"notExpression": "",
"orGroup": []
],
"dimensions": [
[
"dimensionExpression": [
"concatenate": [
"delimiter": "",
"dimensionNames": []
],
"lowerCase": ["dimensionName": ""],
"upperCase": []
],
"name": ""
]
],
"metricFilter": [],
"metrics": [
[
"expression": "",
"invisible": false,
"name": ""
]
]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1beta/:property:checkCompatibility")! 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
analyticsdata.properties.getMetadata
{{baseUrl}}/v1beta/:name
QUERY PARAMS
name
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1beta/:name");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v1beta/:name")
require "http/client"
url = "{{baseUrl}}/v1beta/:name"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/v1beta/:name"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1beta/:name");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1beta/:name"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/v1beta/:name HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1beta/:name")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1beta/:name"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/v1beta/:name")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1beta/:name")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/v1beta/:name');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/v1beta/:name'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1beta/:name';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1beta/:name',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1beta/:name")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1beta/:name',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'GET', url: '{{baseUrl}}/v1beta/:name'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v1beta/:name');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {method: 'GET', url: '{{baseUrl}}/v1beta/:name'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1beta/:name';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1beta/:name"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1beta/:name" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1beta/:name",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/v1beta/:name');
echo $response->getBody();
setUrl('{{baseUrl}}/v1beta/:name');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1beta/:name');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1beta/:name' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1beta/:name' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v1beta/:name")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1beta/:name"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1beta/:name"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1beta/:name")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/v1beta/:name') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1beta/:name";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/v1beta/:name
http GET {{baseUrl}}/v1beta/:name
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v1beta/:name
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1beta/:name")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
analyticsdata.properties.runPivotReport
{{baseUrl}}/v1beta/:property:runPivotReport
QUERY PARAMS
property
BODY json
{
"cohortSpec": {
"cohortReportSettings": {
"accumulate": false
},
"cohorts": [
{
"dateRange": {
"endDate": "",
"name": "",
"startDate": ""
},
"dimension": "",
"name": ""
}
],
"cohortsRange": {
"endOffset": 0,
"granularity": "",
"startOffset": 0
}
},
"currencyCode": "",
"dateRanges": [
{}
],
"dimensionFilter": {
"andGroup": {
"expressions": []
},
"filter": {
"betweenFilter": {
"fromValue": {
"doubleValue": "",
"int64Value": ""
},
"toValue": {}
},
"fieldName": "",
"inListFilter": {
"caseSensitive": false,
"values": []
},
"numericFilter": {
"operation": "",
"value": {}
},
"stringFilter": {
"caseSensitive": false,
"matchType": "",
"value": ""
}
},
"notExpression": "",
"orGroup": {}
},
"dimensions": [
{
"dimensionExpression": {
"concatenate": {
"delimiter": "",
"dimensionNames": []
},
"lowerCase": {
"dimensionName": ""
},
"upperCase": {}
},
"name": ""
}
],
"keepEmptyRows": false,
"metricFilter": {},
"metrics": [
{
"expression": "",
"invisible": false,
"name": ""
}
],
"pivots": [
{
"fieldNames": [],
"limit": "",
"metricAggregations": [],
"offset": "",
"orderBys": [
{
"desc": false,
"dimension": {
"dimensionName": "",
"orderType": ""
},
"metric": {
"metricName": ""
},
"pivot": {
"metricName": "",
"pivotSelections": [
{
"dimensionName": "",
"dimensionValue": ""
}
]
}
}
]
}
],
"property": "",
"returnPropertyQuota": false
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1beta/:property:runPivotReport");
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 \"cohortSpec\": {\n \"cohortReportSettings\": {\n \"accumulate\": false\n },\n \"cohorts\": [\n {\n \"dateRange\": {\n \"endDate\": \"\",\n \"name\": \"\",\n \"startDate\": \"\"\n },\n \"dimension\": \"\",\n \"name\": \"\"\n }\n ],\n \"cohortsRange\": {\n \"endOffset\": 0,\n \"granularity\": \"\",\n \"startOffset\": 0\n }\n },\n \"currencyCode\": \"\",\n \"dateRanges\": [\n {}\n ],\n \"dimensionFilter\": {\n \"andGroup\": {\n \"expressions\": []\n },\n \"filter\": {\n \"betweenFilter\": {\n \"fromValue\": {\n \"doubleValue\": \"\",\n \"int64Value\": \"\"\n },\n \"toValue\": {}\n },\n \"fieldName\": \"\",\n \"inListFilter\": {\n \"caseSensitive\": false,\n \"values\": []\n },\n \"numericFilter\": {\n \"operation\": \"\",\n \"value\": {}\n },\n \"stringFilter\": {\n \"caseSensitive\": false,\n \"matchType\": \"\",\n \"value\": \"\"\n }\n },\n \"notExpression\": \"\",\n \"orGroup\": {}\n },\n \"dimensions\": [\n {\n \"dimensionExpression\": {\n \"concatenate\": {\n \"delimiter\": \"\",\n \"dimensionNames\": []\n },\n \"lowerCase\": {\n \"dimensionName\": \"\"\n },\n \"upperCase\": {}\n },\n \"name\": \"\"\n }\n ],\n \"keepEmptyRows\": false,\n \"metricFilter\": {},\n \"metrics\": [\n {\n \"expression\": \"\",\n \"invisible\": false,\n \"name\": \"\"\n }\n ],\n \"pivots\": [\n {\n \"fieldNames\": [],\n \"limit\": \"\",\n \"metricAggregations\": [],\n \"offset\": \"\",\n \"orderBys\": [\n {\n \"desc\": false,\n \"dimension\": {\n \"dimensionName\": \"\",\n \"orderType\": \"\"\n },\n \"metric\": {\n \"metricName\": \"\"\n },\n \"pivot\": {\n \"metricName\": \"\",\n \"pivotSelections\": [\n {\n \"dimensionName\": \"\",\n \"dimensionValue\": \"\"\n }\n ]\n }\n }\n ]\n }\n ],\n \"property\": \"\",\n \"returnPropertyQuota\": false\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1beta/:property:runPivotReport" {:content-type :json
:form-params {:cohortSpec {:cohortReportSettings {:accumulate false}
:cohorts [{:dateRange {:endDate ""
:name ""
:startDate ""}
:dimension ""
:name ""}]
:cohortsRange {:endOffset 0
:granularity ""
:startOffset 0}}
:currencyCode ""
:dateRanges [{}]
:dimensionFilter {:andGroup {:expressions []}
:filter {:betweenFilter {:fromValue {:doubleValue ""
:int64Value ""}
:toValue {}}
:fieldName ""
:inListFilter {:caseSensitive false
:values []}
:numericFilter {:operation ""
:value {}}
:stringFilter {:caseSensitive false
:matchType ""
:value ""}}
:notExpression ""
:orGroup {}}
:dimensions [{:dimensionExpression {:concatenate {:delimiter ""
:dimensionNames []}
:lowerCase {:dimensionName ""}
:upperCase {}}
:name ""}]
:keepEmptyRows false
:metricFilter {}
:metrics [{:expression ""
:invisible false
:name ""}]
:pivots [{:fieldNames []
:limit ""
:metricAggregations []
:offset ""
:orderBys [{:desc false
:dimension {:dimensionName ""
:orderType ""}
:metric {:metricName ""}
:pivot {:metricName ""
:pivotSelections [{:dimensionName ""
:dimensionValue ""}]}}]}]
:property ""
:returnPropertyQuota false}})
require "http/client"
url = "{{baseUrl}}/v1beta/:property:runPivotReport"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"cohortSpec\": {\n \"cohortReportSettings\": {\n \"accumulate\": false\n },\n \"cohorts\": [\n {\n \"dateRange\": {\n \"endDate\": \"\",\n \"name\": \"\",\n \"startDate\": \"\"\n },\n \"dimension\": \"\",\n \"name\": \"\"\n }\n ],\n \"cohortsRange\": {\n \"endOffset\": 0,\n \"granularity\": \"\",\n \"startOffset\": 0\n }\n },\n \"currencyCode\": \"\",\n \"dateRanges\": [\n {}\n ],\n \"dimensionFilter\": {\n \"andGroup\": {\n \"expressions\": []\n },\n \"filter\": {\n \"betweenFilter\": {\n \"fromValue\": {\n \"doubleValue\": \"\",\n \"int64Value\": \"\"\n },\n \"toValue\": {}\n },\n \"fieldName\": \"\",\n \"inListFilter\": {\n \"caseSensitive\": false,\n \"values\": []\n },\n \"numericFilter\": {\n \"operation\": \"\",\n \"value\": {}\n },\n \"stringFilter\": {\n \"caseSensitive\": false,\n \"matchType\": \"\",\n \"value\": \"\"\n }\n },\n \"notExpression\": \"\",\n \"orGroup\": {}\n },\n \"dimensions\": [\n {\n \"dimensionExpression\": {\n \"concatenate\": {\n \"delimiter\": \"\",\n \"dimensionNames\": []\n },\n \"lowerCase\": {\n \"dimensionName\": \"\"\n },\n \"upperCase\": {}\n },\n \"name\": \"\"\n }\n ],\n \"keepEmptyRows\": false,\n \"metricFilter\": {},\n \"metrics\": [\n {\n \"expression\": \"\",\n \"invisible\": false,\n \"name\": \"\"\n }\n ],\n \"pivots\": [\n {\n \"fieldNames\": [],\n \"limit\": \"\",\n \"metricAggregations\": [],\n \"offset\": \"\",\n \"orderBys\": [\n {\n \"desc\": false,\n \"dimension\": {\n \"dimensionName\": \"\",\n \"orderType\": \"\"\n },\n \"metric\": {\n \"metricName\": \"\"\n },\n \"pivot\": {\n \"metricName\": \"\",\n \"pivotSelections\": [\n {\n \"dimensionName\": \"\",\n \"dimensionValue\": \"\"\n }\n ]\n }\n }\n ]\n }\n ],\n \"property\": \"\",\n \"returnPropertyQuota\": false\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/v1beta/:property:runPivotReport"),
Content = new StringContent("{\n \"cohortSpec\": {\n \"cohortReportSettings\": {\n \"accumulate\": false\n },\n \"cohorts\": [\n {\n \"dateRange\": {\n \"endDate\": \"\",\n \"name\": \"\",\n \"startDate\": \"\"\n },\n \"dimension\": \"\",\n \"name\": \"\"\n }\n ],\n \"cohortsRange\": {\n \"endOffset\": 0,\n \"granularity\": \"\",\n \"startOffset\": 0\n }\n },\n \"currencyCode\": \"\",\n \"dateRanges\": [\n {}\n ],\n \"dimensionFilter\": {\n \"andGroup\": {\n \"expressions\": []\n },\n \"filter\": {\n \"betweenFilter\": {\n \"fromValue\": {\n \"doubleValue\": \"\",\n \"int64Value\": \"\"\n },\n \"toValue\": {}\n },\n \"fieldName\": \"\",\n \"inListFilter\": {\n \"caseSensitive\": false,\n \"values\": []\n },\n \"numericFilter\": {\n \"operation\": \"\",\n \"value\": {}\n },\n \"stringFilter\": {\n \"caseSensitive\": false,\n \"matchType\": \"\",\n \"value\": \"\"\n }\n },\n \"notExpression\": \"\",\n \"orGroup\": {}\n },\n \"dimensions\": [\n {\n \"dimensionExpression\": {\n \"concatenate\": {\n \"delimiter\": \"\",\n \"dimensionNames\": []\n },\n \"lowerCase\": {\n \"dimensionName\": \"\"\n },\n \"upperCase\": {}\n },\n \"name\": \"\"\n }\n ],\n \"keepEmptyRows\": false,\n \"metricFilter\": {},\n \"metrics\": [\n {\n \"expression\": \"\",\n \"invisible\": false,\n \"name\": \"\"\n }\n ],\n \"pivots\": [\n {\n \"fieldNames\": [],\n \"limit\": \"\",\n \"metricAggregations\": [],\n \"offset\": \"\",\n \"orderBys\": [\n {\n \"desc\": false,\n \"dimension\": {\n \"dimensionName\": \"\",\n \"orderType\": \"\"\n },\n \"metric\": {\n \"metricName\": \"\"\n },\n \"pivot\": {\n \"metricName\": \"\",\n \"pivotSelections\": [\n {\n \"dimensionName\": \"\",\n \"dimensionValue\": \"\"\n }\n ]\n }\n }\n ]\n }\n ],\n \"property\": \"\",\n \"returnPropertyQuota\": false\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1beta/:property:runPivotReport");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"cohortSpec\": {\n \"cohortReportSettings\": {\n \"accumulate\": false\n },\n \"cohorts\": [\n {\n \"dateRange\": {\n \"endDate\": \"\",\n \"name\": \"\",\n \"startDate\": \"\"\n },\n \"dimension\": \"\",\n \"name\": \"\"\n }\n ],\n \"cohortsRange\": {\n \"endOffset\": 0,\n \"granularity\": \"\",\n \"startOffset\": 0\n }\n },\n \"currencyCode\": \"\",\n \"dateRanges\": [\n {}\n ],\n \"dimensionFilter\": {\n \"andGroup\": {\n \"expressions\": []\n },\n \"filter\": {\n \"betweenFilter\": {\n \"fromValue\": {\n \"doubleValue\": \"\",\n \"int64Value\": \"\"\n },\n \"toValue\": {}\n },\n \"fieldName\": \"\",\n \"inListFilter\": {\n \"caseSensitive\": false,\n \"values\": []\n },\n \"numericFilter\": {\n \"operation\": \"\",\n \"value\": {}\n },\n \"stringFilter\": {\n \"caseSensitive\": false,\n \"matchType\": \"\",\n \"value\": \"\"\n }\n },\n \"notExpression\": \"\",\n \"orGroup\": {}\n },\n \"dimensions\": [\n {\n \"dimensionExpression\": {\n \"concatenate\": {\n \"delimiter\": \"\",\n \"dimensionNames\": []\n },\n \"lowerCase\": {\n \"dimensionName\": \"\"\n },\n \"upperCase\": {}\n },\n \"name\": \"\"\n }\n ],\n \"keepEmptyRows\": false,\n \"metricFilter\": {},\n \"metrics\": [\n {\n \"expression\": \"\",\n \"invisible\": false,\n \"name\": \"\"\n }\n ],\n \"pivots\": [\n {\n \"fieldNames\": [],\n \"limit\": \"\",\n \"metricAggregations\": [],\n \"offset\": \"\",\n \"orderBys\": [\n {\n \"desc\": false,\n \"dimension\": {\n \"dimensionName\": \"\",\n \"orderType\": \"\"\n },\n \"metric\": {\n \"metricName\": \"\"\n },\n \"pivot\": {\n \"metricName\": \"\",\n \"pivotSelections\": [\n {\n \"dimensionName\": \"\",\n \"dimensionValue\": \"\"\n }\n ]\n }\n }\n ]\n }\n ],\n \"property\": \"\",\n \"returnPropertyQuota\": false\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1beta/:property:runPivotReport"
payload := strings.NewReader("{\n \"cohortSpec\": {\n \"cohortReportSettings\": {\n \"accumulate\": false\n },\n \"cohorts\": [\n {\n \"dateRange\": {\n \"endDate\": \"\",\n \"name\": \"\",\n \"startDate\": \"\"\n },\n \"dimension\": \"\",\n \"name\": \"\"\n }\n ],\n \"cohortsRange\": {\n \"endOffset\": 0,\n \"granularity\": \"\",\n \"startOffset\": 0\n }\n },\n \"currencyCode\": \"\",\n \"dateRanges\": [\n {}\n ],\n \"dimensionFilter\": {\n \"andGroup\": {\n \"expressions\": []\n },\n \"filter\": {\n \"betweenFilter\": {\n \"fromValue\": {\n \"doubleValue\": \"\",\n \"int64Value\": \"\"\n },\n \"toValue\": {}\n },\n \"fieldName\": \"\",\n \"inListFilter\": {\n \"caseSensitive\": false,\n \"values\": []\n },\n \"numericFilter\": {\n \"operation\": \"\",\n \"value\": {}\n },\n \"stringFilter\": {\n \"caseSensitive\": false,\n \"matchType\": \"\",\n \"value\": \"\"\n }\n },\n \"notExpression\": \"\",\n \"orGroup\": {}\n },\n \"dimensions\": [\n {\n \"dimensionExpression\": {\n \"concatenate\": {\n \"delimiter\": \"\",\n \"dimensionNames\": []\n },\n \"lowerCase\": {\n \"dimensionName\": \"\"\n },\n \"upperCase\": {}\n },\n \"name\": \"\"\n }\n ],\n \"keepEmptyRows\": false,\n \"metricFilter\": {},\n \"metrics\": [\n {\n \"expression\": \"\",\n \"invisible\": false,\n \"name\": \"\"\n }\n ],\n \"pivots\": [\n {\n \"fieldNames\": [],\n \"limit\": \"\",\n \"metricAggregations\": [],\n \"offset\": \"\",\n \"orderBys\": [\n {\n \"desc\": false,\n \"dimension\": {\n \"dimensionName\": \"\",\n \"orderType\": \"\"\n },\n \"metric\": {\n \"metricName\": \"\"\n },\n \"pivot\": {\n \"metricName\": \"\",\n \"pivotSelections\": [\n {\n \"dimensionName\": \"\",\n \"dimensionValue\": \"\"\n }\n ]\n }\n }\n ]\n }\n ],\n \"property\": \"\",\n \"returnPropertyQuota\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/v1beta/:property:runPivotReport HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 2064
{
"cohortSpec": {
"cohortReportSettings": {
"accumulate": false
},
"cohorts": [
{
"dateRange": {
"endDate": "",
"name": "",
"startDate": ""
},
"dimension": "",
"name": ""
}
],
"cohortsRange": {
"endOffset": 0,
"granularity": "",
"startOffset": 0
}
},
"currencyCode": "",
"dateRanges": [
{}
],
"dimensionFilter": {
"andGroup": {
"expressions": []
},
"filter": {
"betweenFilter": {
"fromValue": {
"doubleValue": "",
"int64Value": ""
},
"toValue": {}
},
"fieldName": "",
"inListFilter": {
"caseSensitive": false,
"values": []
},
"numericFilter": {
"operation": "",
"value": {}
},
"stringFilter": {
"caseSensitive": false,
"matchType": "",
"value": ""
}
},
"notExpression": "",
"orGroup": {}
},
"dimensions": [
{
"dimensionExpression": {
"concatenate": {
"delimiter": "",
"dimensionNames": []
},
"lowerCase": {
"dimensionName": ""
},
"upperCase": {}
},
"name": ""
}
],
"keepEmptyRows": false,
"metricFilter": {},
"metrics": [
{
"expression": "",
"invisible": false,
"name": ""
}
],
"pivots": [
{
"fieldNames": [],
"limit": "",
"metricAggregations": [],
"offset": "",
"orderBys": [
{
"desc": false,
"dimension": {
"dimensionName": "",
"orderType": ""
},
"metric": {
"metricName": ""
},
"pivot": {
"metricName": "",
"pivotSelections": [
{
"dimensionName": "",
"dimensionValue": ""
}
]
}
}
]
}
],
"property": "",
"returnPropertyQuota": false
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1beta/:property:runPivotReport")
.setHeader("content-type", "application/json")
.setBody("{\n \"cohortSpec\": {\n \"cohortReportSettings\": {\n \"accumulate\": false\n },\n \"cohorts\": [\n {\n \"dateRange\": {\n \"endDate\": \"\",\n \"name\": \"\",\n \"startDate\": \"\"\n },\n \"dimension\": \"\",\n \"name\": \"\"\n }\n ],\n \"cohortsRange\": {\n \"endOffset\": 0,\n \"granularity\": \"\",\n \"startOffset\": 0\n }\n },\n \"currencyCode\": \"\",\n \"dateRanges\": [\n {}\n ],\n \"dimensionFilter\": {\n \"andGroup\": {\n \"expressions\": []\n },\n \"filter\": {\n \"betweenFilter\": {\n \"fromValue\": {\n \"doubleValue\": \"\",\n \"int64Value\": \"\"\n },\n \"toValue\": {}\n },\n \"fieldName\": \"\",\n \"inListFilter\": {\n \"caseSensitive\": false,\n \"values\": []\n },\n \"numericFilter\": {\n \"operation\": \"\",\n \"value\": {}\n },\n \"stringFilter\": {\n \"caseSensitive\": false,\n \"matchType\": \"\",\n \"value\": \"\"\n }\n },\n \"notExpression\": \"\",\n \"orGroup\": {}\n },\n \"dimensions\": [\n {\n \"dimensionExpression\": {\n \"concatenate\": {\n \"delimiter\": \"\",\n \"dimensionNames\": []\n },\n \"lowerCase\": {\n \"dimensionName\": \"\"\n },\n \"upperCase\": {}\n },\n \"name\": \"\"\n }\n ],\n \"keepEmptyRows\": false,\n \"metricFilter\": {},\n \"metrics\": [\n {\n \"expression\": \"\",\n \"invisible\": false,\n \"name\": \"\"\n }\n ],\n \"pivots\": [\n {\n \"fieldNames\": [],\n \"limit\": \"\",\n \"metricAggregations\": [],\n \"offset\": \"\",\n \"orderBys\": [\n {\n \"desc\": false,\n \"dimension\": {\n \"dimensionName\": \"\",\n \"orderType\": \"\"\n },\n \"metric\": {\n \"metricName\": \"\"\n },\n \"pivot\": {\n \"metricName\": \"\",\n \"pivotSelections\": [\n {\n \"dimensionName\": \"\",\n \"dimensionValue\": \"\"\n }\n ]\n }\n }\n ]\n }\n ],\n \"property\": \"\",\n \"returnPropertyQuota\": false\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1beta/:property:runPivotReport"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"cohortSpec\": {\n \"cohortReportSettings\": {\n \"accumulate\": false\n },\n \"cohorts\": [\n {\n \"dateRange\": {\n \"endDate\": \"\",\n \"name\": \"\",\n \"startDate\": \"\"\n },\n \"dimension\": \"\",\n \"name\": \"\"\n }\n ],\n \"cohortsRange\": {\n \"endOffset\": 0,\n \"granularity\": \"\",\n \"startOffset\": 0\n }\n },\n \"currencyCode\": \"\",\n \"dateRanges\": [\n {}\n ],\n \"dimensionFilter\": {\n \"andGroup\": {\n \"expressions\": []\n },\n \"filter\": {\n \"betweenFilter\": {\n \"fromValue\": {\n \"doubleValue\": \"\",\n \"int64Value\": \"\"\n },\n \"toValue\": {}\n },\n \"fieldName\": \"\",\n \"inListFilter\": {\n \"caseSensitive\": false,\n \"values\": []\n },\n \"numericFilter\": {\n \"operation\": \"\",\n \"value\": {}\n },\n \"stringFilter\": {\n \"caseSensitive\": false,\n \"matchType\": \"\",\n \"value\": \"\"\n }\n },\n \"notExpression\": \"\",\n \"orGroup\": {}\n },\n \"dimensions\": [\n {\n \"dimensionExpression\": {\n \"concatenate\": {\n \"delimiter\": \"\",\n \"dimensionNames\": []\n },\n \"lowerCase\": {\n \"dimensionName\": \"\"\n },\n \"upperCase\": {}\n },\n \"name\": \"\"\n }\n ],\n \"keepEmptyRows\": false,\n \"metricFilter\": {},\n \"metrics\": [\n {\n \"expression\": \"\",\n \"invisible\": false,\n \"name\": \"\"\n }\n ],\n \"pivots\": [\n {\n \"fieldNames\": [],\n \"limit\": \"\",\n \"metricAggregations\": [],\n \"offset\": \"\",\n \"orderBys\": [\n {\n \"desc\": false,\n \"dimension\": {\n \"dimensionName\": \"\",\n \"orderType\": \"\"\n },\n \"metric\": {\n \"metricName\": \"\"\n },\n \"pivot\": {\n \"metricName\": \"\",\n \"pivotSelections\": [\n {\n \"dimensionName\": \"\",\n \"dimensionValue\": \"\"\n }\n ]\n }\n }\n ]\n }\n ],\n \"property\": \"\",\n \"returnPropertyQuota\": 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 \"cohortSpec\": {\n \"cohortReportSettings\": {\n \"accumulate\": false\n },\n \"cohorts\": [\n {\n \"dateRange\": {\n \"endDate\": \"\",\n \"name\": \"\",\n \"startDate\": \"\"\n },\n \"dimension\": \"\",\n \"name\": \"\"\n }\n ],\n \"cohortsRange\": {\n \"endOffset\": 0,\n \"granularity\": \"\",\n \"startOffset\": 0\n }\n },\n \"currencyCode\": \"\",\n \"dateRanges\": [\n {}\n ],\n \"dimensionFilter\": {\n \"andGroup\": {\n \"expressions\": []\n },\n \"filter\": {\n \"betweenFilter\": {\n \"fromValue\": {\n \"doubleValue\": \"\",\n \"int64Value\": \"\"\n },\n \"toValue\": {}\n },\n \"fieldName\": \"\",\n \"inListFilter\": {\n \"caseSensitive\": false,\n \"values\": []\n },\n \"numericFilter\": {\n \"operation\": \"\",\n \"value\": {}\n },\n \"stringFilter\": {\n \"caseSensitive\": false,\n \"matchType\": \"\",\n \"value\": \"\"\n }\n },\n \"notExpression\": \"\",\n \"orGroup\": {}\n },\n \"dimensions\": [\n {\n \"dimensionExpression\": {\n \"concatenate\": {\n \"delimiter\": \"\",\n \"dimensionNames\": []\n },\n \"lowerCase\": {\n \"dimensionName\": \"\"\n },\n \"upperCase\": {}\n },\n \"name\": \"\"\n }\n ],\n \"keepEmptyRows\": false,\n \"metricFilter\": {},\n \"metrics\": [\n {\n \"expression\": \"\",\n \"invisible\": false,\n \"name\": \"\"\n }\n ],\n \"pivots\": [\n {\n \"fieldNames\": [],\n \"limit\": \"\",\n \"metricAggregations\": [],\n \"offset\": \"\",\n \"orderBys\": [\n {\n \"desc\": false,\n \"dimension\": {\n \"dimensionName\": \"\",\n \"orderType\": \"\"\n },\n \"metric\": {\n \"metricName\": \"\"\n },\n \"pivot\": {\n \"metricName\": \"\",\n \"pivotSelections\": [\n {\n \"dimensionName\": \"\",\n \"dimensionValue\": \"\"\n }\n ]\n }\n }\n ]\n }\n ],\n \"property\": \"\",\n \"returnPropertyQuota\": false\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1beta/:property:runPivotReport")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1beta/:property:runPivotReport")
.header("content-type", "application/json")
.body("{\n \"cohortSpec\": {\n \"cohortReportSettings\": {\n \"accumulate\": false\n },\n \"cohorts\": [\n {\n \"dateRange\": {\n \"endDate\": \"\",\n \"name\": \"\",\n \"startDate\": \"\"\n },\n \"dimension\": \"\",\n \"name\": \"\"\n }\n ],\n \"cohortsRange\": {\n \"endOffset\": 0,\n \"granularity\": \"\",\n \"startOffset\": 0\n }\n },\n \"currencyCode\": \"\",\n \"dateRanges\": [\n {}\n ],\n \"dimensionFilter\": {\n \"andGroup\": {\n \"expressions\": []\n },\n \"filter\": {\n \"betweenFilter\": {\n \"fromValue\": {\n \"doubleValue\": \"\",\n \"int64Value\": \"\"\n },\n \"toValue\": {}\n },\n \"fieldName\": \"\",\n \"inListFilter\": {\n \"caseSensitive\": false,\n \"values\": []\n },\n \"numericFilter\": {\n \"operation\": \"\",\n \"value\": {}\n },\n \"stringFilter\": {\n \"caseSensitive\": false,\n \"matchType\": \"\",\n \"value\": \"\"\n }\n },\n \"notExpression\": \"\",\n \"orGroup\": {}\n },\n \"dimensions\": [\n {\n \"dimensionExpression\": {\n \"concatenate\": {\n \"delimiter\": \"\",\n \"dimensionNames\": []\n },\n \"lowerCase\": {\n \"dimensionName\": \"\"\n },\n \"upperCase\": {}\n },\n \"name\": \"\"\n }\n ],\n \"keepEmptyRows\": false,\n \"metricFilter\": {},\n \"metrics\": [\n {\n \"expression\": \"\",\n \"invisible\": false,\n \"name\": \"\"\n }\n ],\n \"pivots\": [\n {\n \"fieldNames\": [],\n \"limit\": \"\",\n \"metricAggregations\": [],\n \"offset\": \"\",\n \"orderBys\": [\n {\n \"desc\": false,\n \"dimension\": {\n \"dimensionName\": \"\",\n \"orderType\": \"\"\n },\n \"metric\": {\n \"metricName\": \"\"\n },\n \"pivot\": {\n \"metricName\": \"\",\n \"pivotSelections\": [\n {\n \"dimensionName\": \"\",\n \"dimensionValue\": \"\"\n }\n ]\n }\n }\n ]\n }\n ],\n \"property\": \"\",\n \"returnPropertyQuota\": false\n}")
.asString();
const data = JSON.stringify({
cohortSpec: {
cohortReportSettings: {
accumulate: false
},
cohorts: [
{
dateRange: {
endDate: '',
name: '',
startDate: ''
},
dimension: '',
name: ''
}
],
cohortsRange: {
endOffset: 0,
granularity: '',
startOffset: 0
}
},
currencyCode: '',
dateRanges: [
{}
],
dimensionFilter: {
andGroup: {
expressions: []
},
filter: {
betweenFilter: {
fromValue: {
doubleValue: '',
int64Value: ''
},
toValue: {}
},
fieldName: '',
inListFilter: {
caseSensitive: false,
values: []
},
numericFilter: {
operation: '',
value: {}
},
stringFilter: {
caseSensitive: false,
matchType: '',
value: ''
}
},
notExpression: '',
orGroup: {}
},
dimensions: [
{
dimensionExpression: {
concatenate: {
delimiter: '',
dimensionNames: []
},
lowerCase: {
dimensionName: ''
},
upperCase: {}
},
name: ''
}
],
keepEmptyRows: false,
metricFilter: {},
metrics: [
{
expression: '',
invisible: false,
name: ''
}
],
pivots: [
{
fieldNames: [],
limit: '',
metricAggregations: [],
offset: '',
orderBys: [
{
desc: false,
dimension: {
dimensionName: '',
orderType: ''
},
metric: {
metricName: ''
},
pivot: {
metricName: '',
pivotSelections: [
{
dimensionName: '',
dimensionValue: ''
}
]
}
}
]
}
],
property: '',
returnPropertyQuota: false
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v1beta/:property:runPivotReport');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1beta/:property:runPivotReport',
headers: {'content-type': 'application/json'},
data: {
cohortSpec: {
cohortReportSettings: {accumulate: false},
cohorts: [{dateRange: {endDate: '', name: '', startDate: ''}, dimension: '', name: ''}],
cohortsRange: {endOffset: 0, granularity: '', startOffset: 0}
},
currencyCode: '',
dateRanges: [{}],
dimensionFilter: {
andGroup: {expressions: []},
filter: {
betweenFilter: {fromValue: {doubleValue: '', int64Value: ''}, toValue: {}},
fieldName: '',
inListFilter: {caseSensitive: false, values: []},
numericFilter: {operation: '', value: {}},
stringFilter: {caseSensitive: false, matchType: '', value: ''}
},
notExpression: '',
orGroup: {}
},
dimensions: [
{
dimensionExpression: {
concatenate: {delimiter: '', dimensionNames: []},
lowerCase: {dimensionName: ''},
upperCase: {}
},
name: ''
}
],
keepEmptyRows: false,
metricFilter: {},
metrics: [{expression: '', invisible: false, name: ''}],
pivots: [
{
fieldNames: [],
limit: '',
metricAggregations: [],
offset: '',
orderBys: [
{
desc: false,
dimension: {dimensionName: '', orderType: ''},
metric: {metricName: ''},
pivot: {metricName: '', pivotSelections: [{dimensionName: '', dimensionValue: ''}]}
}
]
}
],
property: '',
returnPropertyQuota: false
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1beta/:property:runPivotReport';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"cohortSpec":{"cohortReportSettings":{"accumulate":false},"cohorts":[{"dateRange":{"endDate":"","name":"","startDate":""},"dimension":"","name":""}],"cohortsRange":{"endOffset":0,"granularity":"","startOffset":0}},"currencyCode":"","dateRanges":[{}],"dimensionFilter":{"andGroup":{"expressions":[]},"filter":{"betweenFilter":{"fromValue":{"doubleValue":"","int64Value":""},"toValue":{}},"fieldName":"","inListFilter":{"caseSensitive":false,"values":[]},"numericFilter":{"operation":"","value":{}},"stringFilter":{"caseSensitive":false,"matchType":"","value":""}},"notExpression":"","orGroup":{}},"dimensions":[{"dimensionExpression":{"concatenate":{"delimiter":"","dimensionNames":[]},"lowerCase":{"dimensionName":""},"upperCase":{}},"name":""}],"keepEmptyRows":false,"metricFilter":{},"metrics":[{"expression":"","invisible":false,"name":""}],"pivots":[{"fieldNames":[],"limit":"","metricAggregations":[],"offset":"","orderBys":[{"desc":false,"dimension":{"dimensionName":"","orderType":""},"metric":{"metricName":""},"pivot":{"metricName":"","pivotSelections":[{"dimensionName":"","dimensionValue":""}]}}]}],"property":"","returnPropertyQuota":false}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1beta/:property:runPivotReport',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "cohortSpec": {\n "cohortReportSettings": {\n "accumulate": false\n },\n "cohorts": [\n {\n "dateRange": {\n "endDate": "",\n "name": "",\n "startDate": ""\n },\n "dimension": "",\n "name": ""\n }\n ],\n "cohortsRange": {\n "endOffset": 0,\n "granularity": "",\n "startOffset": 0\n }\n },\n "currencyCode": "",\n "dateRanges": [\n {}\n ],\n "dimensionFilter": {\n "andGroup": {\n "expressions": []\n },\n "filter": {\n "betweenFilter": {\n "fromValue": {\n "doubleValue": "",\n "int64Value": ""\n },\n "toValue": {}\n },\n "fieldName": "",\n "inListFilter": {\n "caseSensitive": false,\n "values": []\n },\n "numericFilter": {\n "operation": "",\n "value": {}\n },\n "stringFilter": {\n "caseSensitive": false,\n "matchType": "",\n "value": ""\n }\n },\n "notExpression": "",\n "orGroup": {}\n },\n "dimensions": [\n {\n "dimensionExpression": {\n "concatenate": {\n "delimiter": "",\n "dimensionNames": []\n },\n "lowerCase": {\n "dimensionName": ""\n },\n "upperCase": {}\n },\n "name": ""\n }\n ],\n "keepEmptyRows": false,\n "metricFilter": {},\n "metrics": [\n {\n "expression": "",\n "invisible": false,\n "name": ""\n }\n ],\n "pivots": [\n {\n "fieldNames": [],\n "limit": "",\n "metricAggregations": [],\n "offset": "",\n "orderBys": [\n {\n "desc": false,\n "dimension": {\n "dimensionName": "",\n "orderType": ""\n },\n "metric": {\n "metricName": ""\n },\n "pivot": {\n "metricName": "",\n "pivotSelections": [\n {\n "dimensionName": "",\n "dimensionValue": ""\n }\n ]\n }\n }\n ]\n }\n ],\n "property": "",\n "returnPropertyQuota": 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 \"cohortSpec\": {\n \"cohortReportSettings\": {\n \"accumulate\": false\n },\n \"cohorts\": [\n {\n \"dateRange\": {\n \"endDate\": \"\",\n \"name\": \"\",\n \"startDate\": \"\"\n },\n \"dimension\": \"\",\n \"name\": \"\"\n }\n ],\n \"cohortsRange\": {\n \"endOffset\": 0,\n \"granularity\": \"\",\n \"startOffset\": 0\n }\n },\n \"currencyCode\": \"\",\n \"dateRanges\": [\n {}\n ],\n \"dimensionFilter\": {\n \"andGroup\": {\n \"expressions\": []\n },\n \"filter\": {\n \"betweenFilter\": {\n \"fromValue\": {\n \"doubleValue\": \"\",\n \"int64Value\": \"\"\n },\n \"toValue\": {}\n },\n \"fieldName\": \"\",\n \"inListFilter\": {\n \"caseSensitive\": false,\n \"values\": []\n },\n \"numericFilter\": {\n \"operation\": \"\",\n \"value\": {}\n },\n \"stringFilter\": {\n \"caseSensitive\": false,\n \"matchType\": \"\",\n \"value\": \"\"\n }\n },\n \"notExpression\": \"\",\n \"orGroup\": {}\n },\n \"dimensions\": [\n {\n \"dimensionExpression\": {\n \"concatenate\": {\n \"delimiter\": \"\",\n \"dimensionNames\": []\n },\n \"lowerCase\": {\n \"dimensionName\": \"\"\n },\n \"upperCase\": {}\n },\n \"name\": \"\"\n }\n ],\n \"keepEmptyRows\": false,\n \"metricFilter\": {},\n \"metrics\": [\n {\n \"expression\": \"\",\n \"invisible\": false,\n \"name\": \"\"\n }\n ],\n \"pivots\": [\n {\n \"fieldNames\": [],\n \"limit\": \"\",\n \"metricAggregations\": [],\n \"offset\": \"\",\n \"orderBys\": [\n {\n \"desc\": false,\n \"dimension\": {\n \"dimensionName\": \"\",\n \"orderType\": \"\"\n },\n \"metric\": {\n \"metricName\": \"\"\n },\n \"pivot\": {\n \"metricName\": \"\",\n \"pivotSelections\": [\n {\n \"dimensionName\": \"\",\n \"dimensionValue\": \"\"\n }\n ]\n }\n }\n ]\n }\n ],\n \"property\": \"\",\n \"returnPropertyQuota\": false\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1beta/:property:runPivotReport")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1beta/:property:runPivotReport',
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({
cohortSpec: {
cohortReportSettings: {accumulate: false},
cohorts: [{dateRange: {endDate: '', name: '', startDate: ''}, dimension: '', name: ''}],
cohortsRange: {endOffset: 0, granularity: '', startOffset: 0}
},
currencyCode: '',
dateRanges: [{}],
dimensionFilter: {
andGroup: {expressions: []},
filter: {
betweenFilter: {fromValue: {doubleValue: '', int64Value: ''}, toValue: {}},
fieldName: '',
inListFilter: {caseSensitive: false, values: []},
numericFilter: {operation: '', value: {}},
stringFilter: {caseSensitive: false, matchType: '', value: ''}
},
notExpression: '',
orGroup: {}
},
dimensions: [
{
dimensionExpression: {
concatenate: {delimiter: '', dimensionNames: []},
lowerCase: {dimensionName: ''},
upperCase: {}
},
name: ''
}
],
keepEmptyRows: false,
metricFilter: {},
metrics: [{expression: '', invisible: false, name: ''}],
pivots: [
{
fieldNames: [],
limit: '',
metricAggregations: [],
offset: '',
orderBys: [
{
desc: false,
dimension: {dimensionName: '', orderType: ''},
metric: {metricName: ''},
pivot: {metricName: '', pivotSelections: [{dimensionName: '', dimensionValue: ''}]}
}
]
}
],
property: '',
returnPropertyQuota: false
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1beta/:property:runPivotReport',
headers: {'content-type': 'application/json'},
body: {
cohortSpec: {
cohortReportSettings: {accumulate: false},
cohorts: [{dateRange: {endDate: '', name: '', startDate: ''}, dimension: '', name: ''}],
cohortsRange: {endOffset: 0, granularity: '', startOffset: 0}
},
currencyCode: '',
dateRanges: [{}],
dimensionFilter: {
andGroup: {expressions: []},
filter: {
betweenFilter: {fromValue: {doubleValue: '', int64Value: ''}, toValue: {}},
fieldName: '',
inListFilter: {caseSensitive: false, values: []},
numericFilter: {operation: '', value: {}},
stringFilter: {caseSensitive: false, matchType: '', value: ''}
},
notExpression: '',
orGroup: {}
},
dimensions: [
{
dimensionExpression: {
concatenate: {delimiter: '', dimensionNames: []},
lowerCase: {dimensionName: ''},
upperCase: {}
},
name: ''
}
],
keepEmptyRows: false,
metricFilter: {},
metrics: [{expression: '', invisible: false, name: ''}],
pivots: [
{
fieldNames: [],
limit: '',
metricAggregations: [],
offset: '',
orderBys: [
{
desc: false,
dimension: {dimensionName: '', orderType: ''},
metric: {metricName: ''},
pivot: {metricName: '', pivotSelections: [{dimensionName: '', dimensionValue: ''}]}
}
]
}
],
property: '',
returnPropertyQuota: false
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/v1beta/:property:runPivotReport');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
cohortSpec: {
cohortReportSettings: {
accumulate: false
},
cohorts: [
{
dateRange: {
endDate: '',
name: '',
startDate: ''
},
dimension: '',
name: ''
}
],
cohortsRange: {
endOffset: 0,
granularity: '',
startOffset: 0
}
},
currencyCode: '',
dateRanges: [
{}
],
dimensionFilter: {
andGroup: {
expressions: []
},
filter: {
betweenFilter: {
fromValue: {
doubleValue: '',
int64Value: ''
},
toValue: {}
},
fieldName: '',
inListFilter: {
caseSensitive: false,
values: []
},
numericFilter: {
operation: '',
value: {}
},
stringFilter: {
caseSensitive: false,
matchType: '',
value: ''
}
},
notExpression: '',
orGroup: {}
},
dimensions: [
{
dimensionExpression: {
concatenate: {
delimiter: '',
dimensionNames: []
},
lowerCase: {
dimensionName: ''
},
upperCase: {}
},
name: ''
}
],
keepEmptyRows: false,
metricFilter: {},
metrics: [
{
expression: '',
invisible: false,
name: ''
}
],
pivots: [
{
fieldNames: [],
limit: '',
metricAggregations: [],
offset: '',
orderBys: [
{
desc: false,
dimension: {
dimensionName: '',
orderType: ''
},
metric: {
metricName: ''
},
pivot: {
metricName: '',
pivotSelections: [
{
dimensionName: '',
dimensionValue: ''
}
]
}
}
]
}
],
property: '',
returnPropertyQuota: false
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/v1beta/:property:runPivotReport',
headers: {'content-type': 'application/json'},
data: {
cohortSpec: {
cohortReportSettings: {accumulate: false},
cohorts: [{dateRange: {endDate: '', name: '', startDate: ''}, dimension: '', name: ''}],
cohortsRange: {endOffset: 0, granularity: '', startOffset: 0}
},
currencyCode: '',
dateRanges: [{}],
dimensionFilter: {
andGroup: {expressions: []},
filter: {
betweenFilter: {fromValue: {doubleValue: '', int64Value: ''}, toValue: {}},
fieldName: '',
inListFilter: {caseSensitive: false, values: []},
numericFilter: {operation: '', value: {}},
stringFilter: {caseSensitive: false, matchType: '', value: ''}
},
notExpression: '',
orGroup: {}
},
dimensions: [
{
dimensionExpression: {
concatenate: {delimiter: '', dimensionNames: []},
lowerCase: {dimensionName: ''},
upperCase: {}
},
name: ''
}
],
keepEmptyRows: false,
metricFilter: {},
metrics: [{expression: '', invisible: false, name: ''}],
pivots: [
{
fieldNames: [],
limit: '',
metricAggregations: [],
offset: '',
orderBys: [
{
desc: false,
dimension: {dimensionName: '', orderType: ''},
metric: {metricName: ''},
pivot: {metricName: '', pivotSelections: [{dimensionName: '', dimensionValue: ''}]}
}
]
}
],
property: '',
returnPropertyQuota: false
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1beta/:property:runPivotReport';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"cohortSpec":{"cohortReportSettings":{"accumulate":false},"cohorts":[{"dateRange":{"endDate":"","name":"","startDate":""},"dimension":"","name":""}],"cohortsRange":{"endOffset":0,"granularity":"","startOffset":0}},"currencyCode":"","dateRanges":[{}],"dimensionFilter":{"andGroup":{"expressions":[]},"filter":{"betweenFilter":{"fromValue":{"doubleValue":"","int64Value":""},"toValue":{}},"fieldName":"","inListFilter":{"caseSensitive":false,"values":[]},"numericFilter":{"operation":"","value":{}},"stringFilter":{"caseSensitive":false,"matchType":"","value":""}},"notExpression":"","orGroup":{}},"dimensions":[{"dimensionExpression":{"concatenate":{"delimiter":"","dimensionNames":[]},"lowerCase":{"dimensionName":""},"upperCase":{}},"name":""}],"keepEmptyRows":false,"metricFilter":{},"metrics":[{"expression":"","invisible":false,"name":""}],"pivots":[{"fieldNames":[],"limit":"","metricAggregations":[],"offset":"","orderBys":[{"desc":false,"dimension":{"dimensionName":"","orderType":""},"metric":{"metricName":""},"pivot":{"metricName":"","pivotSelections":[{"dimensionName":"","dimensionValue":""}]}}]}],"property":"","returnPropertyQuota":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 = @{ @"cohortSpec": @{ @"cohortReportSettings": @{ @"accumulate": @NO }, @"cohorts": @[ @{ @"dateRange": @{ @"endDate": @"", @"name": @"", @"startDate": @"" }, @"dimension": @"", @"name": @"" } ], @"cohortsRange": @{ @"endOffset": @0, @"granularity": @"", @"startOffset": @0 } },
@"currencyCode": @"",
@"dateRanges": @[ @{ } ],
@"dimensionFilter": @{ @"andGroup": @{ @"expressions": @[ ] }, @"filter": @{ @"betweenFilter": @{ @"fromValue": @{ @"doubleValue": @"", @"int64Value": @"" }, @"toValue": @{ } }, @"fieldName": @"", @"inListFilter": @{ @"caseSensitive": @NO, @"values": @[ ] }, @"numericFilter": @{ @"operation": @"", @"value": @{ } }, @"stringFilter": @{ @"caseSensitive": @NO, @"matchType": @"", @"value": @"" } }, @"notExpression": @"", @"orGroup": @{ } },
@"dimensions": @[ @{ @"dimensionExpression": @{ @"concatenate": @{ @"delimiter": @"", @"dimensionNames": @[ ] }, @"lowerCase": @{ @"dimensionName": @"" }, @"upperCase": @{ } }, @"name": @"" } ],
@"keepEmptyRows": @NO,
@"metricFilter": @{ },
@"metrics": @[ @{ @"expression": @"", @"invisible": @NO, @"name": @"" } ],
@"pivots": @[ @{ @"fieldNames": @[ ], @"limit": @"", @"metricAggregations": @[ ], @"offset": @"", @"orderBys": @[ @{ @"desc": @NO, @"dimension": @{ @"dimensionName": @"", @"orderType": @"" }, @"metric": @{ @"metricName": @"" }, @"pivot": @{ @"metricName": @"", @"pivotSelections": @[ @{ @"dimensionName": @"", @"dimensionValue": @"" } ] } } ] } ],
@"property": @"",
@"returnPropertyQuota": @NO };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1beta/:property:runPivotReport"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1beta/:property:runPivotReport" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"cohortSpec\": {\n \"cohortReportSettings\": {\n \"accumulate\": false\n },\n \"cohorts\": [\n {\n \"dateRange\": {\n \"endDate\": \"\",\n \"name\": \"\",\n \"startDate\": \"\"\n },\n \"dimension\": \"\",\n \"name\": \"\"\n }\n ],\n \"cohortsRange\": {\n \"endOffset\": 0,\n \"granularity\": \"\",\n \"startOffset\": 0\n }\n },\n \"currencyCode\": \"\",\n \"dateRanges\": [\n {}\n ],\n \"dimensionFilter\": {\n \"andGroup\": {\n \"expressions\": []\n },\n \"filter\": {\n \"betweenFilter\": {\n \"fromValue\": {\n \"doubleValue\": \"\",\n \"int64Value\": \"\"\n },\n \"toValue\": {}\n },\n \"fieldName\": \"\",\n \"inListFilter\": {\n \"caseSensitive\": false,\n \"values\": []\n },\n \"numericFilter\": {\n \"operation\": \"\",\n \"value\": {}\n },\n \"stringFilter\": {\n \"caseSensitive\": false,\n \"matchType\": \"\",\n \"value\": \"\"\n }\n },\n \"notExpression\": \"\",\n \"orGroup\": {}\n },\n \"dimensions\": [\n {\n \"dimensionExpression\": {\n \"concatenate\": {\n \"delimiter\": \"\",\n \"dimensionNames\": []\n },\n \"lowerCase\": {\n \"dimensionName\": \"\"\n },\n \"upperCase\": {}\n },\n \"name\": \"\"\n }\n ],\n \"keepEmptyRows\": false,\n \"metricFilter\": {},\n \"metrics\": [\n {\n \"expression\": \"\",\n \"invisible\": false,\n \"name\": \"\"\n }\n ],\n \"pivots\": [\n {\n \"fieldNames\": [],\n \"limit\": \"\",\n \"metricAggregations\": [],\n \"offset\": \"\",\n \"orderBys\": [\n {\n \"desc\": false,\n \"dimension\": {\n \"dimensionName\": \"\",\n \"orderType\": \"\"\n },\n \"metric\": {\n \"metricName\": \"\"\n },\n \"pivot\": {\n \"metricName\": \"\",\n \"pivotSelections\": [\n {\n \"dimensionName\": \"\",\n \"dimensionValue\": \"\"\n }\n ]\n }\n }\n ]\n }\n ],\n \"property\": \"\",\n \"returnPropertyQuota\": false\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1beta/:property:runPivotReport",
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([
'cohortSpec' => [
'cohortReportSettings' => [
'accumulate' => null
],
'cohorts' => [
[
'dateRange' => [
'endDate' => '',
'name' => '',
'startDate' => ''
],
'dimension' => '',
'name' => ''
]
],
'cohortsRange' => [
'endOffset' => 0,
'granularity' => '',
'startOffset' => 0
]
],
'currencyCode' => '',
'dateRanges' => [
[
]
],
'dimensionFilter' => [
'andGroup' => [
'expressions' => [
]
],
'filter' => [
'betweenFilter' => [
'fromValue' => [
'doubleValue' => '',
'int64Value' => ''
],
'toValue' => [
]
],
'fieldName' => '',
'inListFilter' => [
'caseSensitive' => null,
'values' => [
]
],
'numericFilter' => [
'operation' => '',
'value' => [
]
],
'stringFilter' => [
'caseSensitive' => null,
'matchType' => '',
'value' => ''
]
],
'notExpression' => '',
'orGroup' => [
]
],
'dimensions' => [
[
'dimensionExpression' => [
'concatenate' => [
'delimiter' => '',
'dimensionNames' => [
]
],
'lowerCase' => [
'dimensionName' => ''
],
'upperCase' => [
]
],
'name' => ''
]
],
'keepEmptyRows' => null,
'metricFilter' => [
],
'metrics' => [
[
'expression' => '',
'invisible' => null,
'name' => ''
]
],
'pivots' => [
[
'fieldNames' => [
],
'limit' => '',
'metricAggregations' => [
],
'offset' => '',
'orderBys' => [
[
'desc' => null,
'dimension' => [
'dimensionName' => '',
'orderType' => ''
],
'metric' => [
'metricName' => ''
],
'pivot' => [
'metricName' => '',
'pivotSelections' => [
[
'dimensionName' => '',
'dimensionValue' => ''
]
]
]
]
]
]
],
'property' => '',
'returnPropertyQuota' => null
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/v1beta/:property:runPivotReport', [
'body' => '{
"cohortSpec": {
"cohortReportSettings": {
"accumulate": false
},
"cohorts": [
{
"dateRange": {
"endDate": "",
"name": "",
"startDate": ""
},
"dimension": "",
"name": ""
}
],
"cohortsRange": {
"endOffset": 0,
"granularity": "",
"startOffset": 0
}
},
"currencyCode": "",
"dateRanges": [
{}
],
"dimensionFilter": {
"andGroup": {
"expressions": []
},
"filter": {
"betweenFilter": {
"fromValue": {
"doubleValue": "",
"int64Value": ""
},
"toValue": {}
},
"fieldName": "",
"inListFilter": {
"caseSensitive": false,
"values": []
},
"numericFilter": {
"operation": "",
"value": {}
},
"stringFilter": {
"caseSensitive": false,
"matchType": "",
"value": ""
}
},
"notExpression": "",
"orGroup": {}
},
"dimensions": [
{
"dimensionExpression": {
"concatenate": {
"delimiter": "",
"dimensionNames": []
},
"lowerCase": {
"dimensionName": ""
},
"upperCase": {}
},
"name": ""
}
],
"keepEmptyRows": false,
"metricFilter": {},
"metrics": [
{
"expression": "",
"invisible": false,
"name": ""
}
],
"pivots": [
{
"fieldNames": [],
"limit": "",
"metricAggregations": [],
"offset": "",
"orderBys": [
{
"desc": false,
"dimension": {
"dimensionName": "",
"orderType": ""
},
"metric": {
"metricName": ""
},
"pivot": {
"metricName": "",
"pivotSelections": [
{
"dimensionName": "",
"dimensionValue": ""
}
]
}
}
]
}
],
"property": "",
"returnPropertyQuota": false
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1beta/:property:runPivotReport');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'cohortSpec' => [
'cohortReportSettings' => [
'accumulate' => null
],
'cohorts' => [
[
'dateRange' => [
'endDate' => '',
'name' => '',
'startDate' => ''
],
'dimension' => '',
'name' => ''
]
],
'cohortsRange' => [
'endOffset' => 0,
'granularity' => '',
'startOffset' => 0
]
],
'currencyCode' => '',
'dateRanges' => [
[
]
],
'dimensionFilter' => [
'andGroup' => [
'expressions' => [
]
],
'filter' => [
'betweenFilter' => [
'fromValue' => [
'doubleValue' => '',
'int64Value' => ''
],
'toValue' => [
]
],
'fieldName' => '',
'inListFilter' => [
'caseSensitive' => null,
'values' => [
]
],
'numericFilter' => [
'operation' => '',
'value' => [
]
],
'stringFilter' => [
'caseSensitive' => null,
'matchType' => '',
'value' => ''
]
],
'notExpression' => '',
'orGroup' => [
]
],
'dimensions' => [
[
'dimensionExpression' => [
'concatenate' => [
'delimiter' => '',
'dimensionNames' => [
]
],
'lowerCase' => [
'dimensionName' => ''
],
'upperCase' => [
]
],
'name' => ''
]
],
'keepEmptyRows' => null,
'metricFilter' => [
],
'metrics' => [
[
'expression' => '',
'invisible' => null,
'name' => ''
]
],
'pivots' => [
[
'fieldNames' => [
],
'limit' => '',
'metricAggregations' => [
],
'offset' => '',
'orderBys' => [
[
'desc' => null,
'dimension' => [
'dimensionName' => '',
'orderType' => ''
],
'metric' => [
'metricName' => ''
],
'pivot' => [
'metricName' => '',
'pivotSelections' => [
[
'dimensionName' => '',
'dimensionValue' => ''
]
]
]
]
]
]
],
'property' => '',
'returnPropertyQuota' => null
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'cohortSpec' => [
'cohortReportSettings' => [
'accumulate' => null
],
'cohorts' => [
[
'dateRange' => [
'endDate' => '',
'name' => '',
'startDate' => ''
],
'dimension' => '',
'name' => ''
]
],
'cohortsRange' => [
'endOffset' => 0,
'granularity' => '',
'startOffset' => 0
]
],
'currencyCode' => '',
'dateRanges' => [
[
]
],
'dimensionFilter' => [
'andGroup' => [
'expressions' => [
]
],
'filter' => [
'betweenFilter' => [
'fromValue' => [
'doubleValue' => '',
'int64Value' => ''
],
'toValue' => [
]
],
'fieldName' => '',
'inListFilter' => [
'caseSensitive' => null,
'values' => [
]
],
'numericFilter' => [
'operation' => '',
'value' => [
]
],
'stringFilter' => [
'caseSensitive' => null,
'matchType' => '',
'value' => ''
]
],
'notExpression' => '',
'orGroup' => [
]
],
'dimensions' => [
[
'dimensionExpression' => [
'concatenate' => [
'delimiter' => '',
'dimensionNames' => [
]
],
'lowerCase' => [
'dimensionName' => ''
],
'upperCase' => [
]
],
'name' => ''
]
],
'keepEmptyRows' => null,
'metricFilter' => [
],
'metrics' => [
[
'expression' => '',
'invisible' => null,
'name' => ''
]
],
'pivots' => [
[
'fieldNames' => [
],
'limit' => '',
'metricAggregations' => [
],
'offset' => '',
'orderBys' => [
[
'desc' => null,
'dimension' => [
'dimensionName' => '',
'orderType' => ''
],
'metric' => [
'metricName' => ''
],
'pivot' => [
'metricName' => '',
'pivotSelections' => [
[
'dimensionName' => '',
'dimensionValue' => ''
]
]
]
]
]
]
],
'property' => '',
'returnPropertyQuota' => null
]));
$request->setRequestUrl('{{baseUrl}}/v1beta/:property:runPivotReport');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1beta/:property:runPivotReport' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"cohortSpec": {
"cohortReportSettings": {
"accumulate": false
},
"cohorts": [
{
"dateRange": {
"endDate": "",
"name": "",
"startDate": ""
},
"dimension": "",
"name": ""
}
],
"cohortsRange": {
"endOffset": 0,
"granularity": "",
"startOffset": 0
}
},
"currencyCode": "",
"dateRanges": [
{}
],
"dimensionFilter": {
"andGroup": {
"expressions": []
},
"filter": {
"betweenFilter": {
"fromValue": {
"doubleValue": "",
"int64Value": ""
},
"toValue": {}
},
"fieldName": "",
"inListFilter": {
"caseSensitive": false,
"values": []
},
"numericFilter": {
"operation": "",
"value": {}
},
"stringFilter": {
"caseSensitive": false,
"matchType": "",
"value": ""
}
},
"notExpression": "",
"orGroup": {}
},
"dimensions": [
{
"dimensionExpression": {
"concatenate": {
"delimiter": "",
"dimensionNames": []
},
"lowerCase": {
"dimensionName": ""
},
"upperCase": {}
},
"name": ""
}
],
"keepEmptyRows": false,
"metricFilter": {},
"metrics": [
{
"expression": "",
"invisible": false,
"name": ""
}
],
"pivots": [
{
"fieldNames": [],
"limit": "",
"metricAggregations": [],
"offset": "",
"orderBys": [
{
"desc": false,
"dimension": {
"dimensionName": "",
"orderType": ""
},
"metric": {
"metricName": ""
},
"pivot": {
"metricName": "",
"pivotSelections": [
{
"dimensionName": "",
"dimensionValue": ""
}
]
}
}
]
}
],
"property": "",
"returnPropertyQuota": false
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1beta/:property:runPivotReport' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"cohortSpec": {
"cohortReportSettings": {
"accumulate": false
},
"cohorts": [
{
"dateRange": {
"endDate": "",
"name": "",
"startDate": ""
},
"dimension": "",
"name": ""
}
],
"cohortsRange": {
"endOffset": 0,
"granularity": "",
"startOffset": 0
}
},
"currencyCode": "",
"dateRanges": [
{}
],
"dimensionFilter": {
"andGroup": {
"expressions": []
},
"filter": {
"betweenFilter": {
"fromValue": {
"doubleValue": "",
"int64Value": ""
},
"toValue": {}
},
"fieldName": "",
"inListFilter": {
"caseSensitive": false,
"values": []
},
"numericFilter": {
"operation": "",
"value": {}
},
"stringFilter": {
"caseSensitive": false,
"matchType": "",
"value": ""
}
},
"notExpression": "",
"orGroup": {}
},
"dimensions": [
{
"dimensionExpression": {
"concatenate": {
"delimiter": "",
"dimensionNames": []
},
"lowerCase": {
"dimensionName": ""
},
"upperCase": {}
},
"name": ""
}
],
"keepEmptyRows": false,
"metricFilter": {},
"metrics": [
{
"expression": "",
"invisible": false,
"name": ""
}
],
"pivots": [
{
"fieldNames": [],
"limit": "",
"metricAggregations": [],
"offset": "",
"orderBys": [
{
"desc": false,
"dimension": {
"dimensionName": "",
"orderType": ""
},
"metric": {
"metricName": ""
},
"pivot": {
"metricName": "",
"pivotSelections": [
{
"dimensionName": "",
"dimensionValue": ""
}
]
}
}
]
}
],
"property": "",
"returnPropertyQuota": false
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"cohortSpec\": {\n \"cohortReportSettings\": {\n \"accumulate\": false\n },\n \"cohorts\": [\n {\n \"dateRange\": {\n \"endDate\": \"\",\n \"name\": \"\",\n \"startDate\": \"\"\n },\n \"dimension\": \"\",\n \"name\": \"\"\n }\n ],\n \"cohortsRange\": {\n \"endOffset\": 0,\n \"granularity\": \"\",\n \"startOffset\": 0\n }\n },\n \"currencyCode\": \"\",\n \"dateRanges\": [\n {}\n ],\n \"dimensionFilter\": {\n \"andGroup\": {\n \"expressions\": []\n },\n \"filter\": {\n \"betweenFilter\": {\n \"fromValue\": {\n \"doubleValue\": \"\",\n \"int64Value\": \"\"\n },\n \"toValue\": {}\n },\n \"fieldName\": \"\",\n \"inListFilter\": {\n \"caseSensitive\": false,\n \"values\": []\n },\n \"numericFilter\": {\n \"operation\": \"\",\n \"value\": {}\n },\n \"stringFilter\": {\n \"caseSensitive\": false,\n \"matchType\": \"\",\n \"value\": \"\"\n }\n },\n \"notExpression\": \"\",\n \"orGroup\": {}\n },\n \"dimensions\": [\n {\n \"dimensionExpression\": {\n \"concatenate\": {\n \"delimiter\": \"\",\n \"dimensionNames\": []\n },\n \"lowerCase\": {\n \"dimensionName\": \"\"\n },\n \"upperCase\": {}\n },\n \"name\": \"\"\n }\n ],\n \"keepEmptyRows\": false,\n \"metricFilter\": {},\n \"metrics\": [\n {\n \"expression\": \"\",\n \"invisible\": false,\n \"name\": \"\"\n }\n ],\n \"pivots\": [\n {\n \"fieldNames\": [],\n \"limit\": \"\",\n \"metricAggregations\": [],\n \"offset\": \"\",\n \"orderBys\": [\n {\n \"desc\": false,\n \"dimension\": {\n \"dimensionName\": \"\",\n \"orderType\": \"\"\n },\n \"metric\": {\n \"metricName\": \"\"\n },\n \"pivot\": {\n \"metricName\": \"\",\n \"pivotSelections\": [\n {\n \"dimensionName\": \"\",\n \"dimensionValue\": \"\"\n }\n ]\n }\n }\n ]\n }\n ],\n \"property\": \"\",\n \"returnPropertyQuota\": false\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1beta/:property:runPivotReport", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1beta/:property:runPivotReport"
payload = {
"cohortSpec": {
"cohortReportSettings": { "accumulate": False },
"cohorts": [
{
"dateRange": {
"endDate": "",
"name": "",
"startDate": ""
},
"dimension": "",
"name": ""
}
],
"cohortsRange": {
"endOffset": 0,
"granularity": "",
"startOffset": 0
}
},
"currencyCode": "",
"dateRanges": [{}],
"dimensionFilter": {
"andGroup": { "expressions": [] },
"filter": {
"betweenFilter": {
"fromValue": {
"doubleValue": "",
"int64Value": ""
},
"toValue": {}
},
"fieldName": "",
"inListFilter": {
"caseSensitive": False,
"values": []
},
"numericFilter": {
"operation": "",
"value": {}
},
"stringFilter": {
"caseSensitive": False,
"matchType": "",
"value": ""
}
},
"notExpression": "",
"orGroup": {}
},
"dimensions": [
{
"dimensionExpression": {
"concatenate": {
"delimiter": "",
"dimensionNames": []
},
"lowerCase": { "dimensionName": "" },
"upperCase": {}
},
"name": ""
}
],
"keepEmptyRows": False,
"metricFilter": {},
"metrics": [
{
"expression": "",
"invisible": False,
"name": ""
}
],
"pivots": [
{
"fieldNames": [],
"limit": "",
"metricAggregations": [],
"offset": "",
"orderBys": [
{
"desc": False,
"dimension": {
"dimensionName": "",
"orderType": ""
},
"metric": { "metricName": "" },
"pivot": {
"metricName": "",
"pivotSelections": [
{
"dimensionName": "",
"dimensionValue": ""
}
]
}
}
]
}
],
"property": "",
"returnPropertyQuota": False
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1beta/:property:runPivotReport"
payload <- "{\n \"cohortSpec\": {\n \"cohortReportSettings\": {\n \"accumulate\": false\n },\n \"cohorts\": [\n {\n \"dateRange\": {\n \"endDate\": \"\",\n \"name\": \"\",\n \"startDate\": \"\"\n },\n \"dimension\": \"\",\n \"name\": \"\"\n }\n ],\n \"cohortsRange\": {\n \"endOffset\": 0,\n \"granularity\": \"\",\n \"startOffset\": 0\n }\n },\n \"currencyCode\": \"\",\n \"dateRanges\": [\n {}\n ],\n \"dimensionFilter\": {\n \"andGroup\": {\n \"expressions\": []\n },\n \"filter\": {\n \"betweenFilter\": {\n \"fromValue\": {\n \"doubleValue\": \"\",\n \"int64Value\": \"\"\n },\n \"toValue\": {}\n },\n \"fieldName\": \"\",\n \"inListFilter\": {\n \"caseSensitive\": false,\n \"values\": []\n },\n \"numericFilter\": {\n \"operation\": \"\",\n \"value\": {}\n },\n \"stringFilter\": {\n \"caseSensitive\": false,\n \"matchType\": \"\",\n \"value\": \"\"\n }\n },\n \"notExpression\": \"\",\n \"orGroup\": {}\n },\n \"dimensions\": [\n {\n \"dimensionExpression\": {\n \"concatenate\": {\n \"delimiter\": \"\",\n \"dimensionNames\": []\n },\n \"lowerCase\": {\n \"dimensionName\": \"\"\n },\n \"upperCase\": {}\n },\n \"name\": \"\"\n }\n ],\n \"keepEmptyRows\": false,\n \"metricFilter\": {},\n \"metrics\": [\n {\n \"expression\": \"\",\n \"invisible\": false,\n \"name\": \"\"\n }\n ],\n \"pivots\": [\n {\n \"fieldNames\": [],\n \"limit\": \"\",\n \"metricAggregations\": [],\n \"offset\": \"\",\n \"orderBys\": [\n {\n \"desc\": false,\n \"dimension\": {\n \"dimensionName\": \"\",\n \"orderType\": \"\"\n },\n \"metric\": {\n \"metricName\": \"\"\n },\n \"pivot\": {\n \"metricName\": \"\",\n \"pivotSelections\": [\n {\n \"dimensionName\": \"\",\n \"dimensionValue\": \"\"\n }\n ]\n }\n }\n ]\n }\n ],\n \"property\": \"\",\n \"returnPropertyQuota\": false\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1beta/:property:runPivotReport")
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 \"cohortSpec\": {\n \"cohortReportSettings\": {\n \"accumulate\": false\n },\n \"cohorts\": [\n {\n \"dateRange\": {\n \"endDate\": \"\",\n \"name\": \"\",\n \"startDate\": \"\"\n },\n \"dimension\": \"\",\n \"name\": \"\"\n }\n ],\n \"cohortsRange\": {\n \"endOffset\": 0,\n \"granularity\": \"\",\n \"startOffset\": 0\n }\n },\n \"currencyCode\": \"\",\n \"dateRanges\": [\n {}\n ],\n \"dimensionFilter\": {\n \"andGroup\": {\n \"expressions\": []\n },\n \"filter\": {\n \"betweenFilter\": {\n \"fromValue\": {\n \"doubleValue\": \"\",\n \"int64Value\": \"\"\n },\n \"toValue\": {}\n },\n \"fieldName\": \"\",\n \"inListFilter\": {\n \"caseSensitive\": false,\n \"values\": []\n },\n \"numericFilter\": {\n \"operation\": \"\",\n \"value\": {}\n },\n \"stringFilter\": {\n \"caseSensitive\": false,\n \"matchType\": \"\",\n \"value\": \"\"\n }\n },\n \"notExpression\": \"\",\n \"orGroup\": {}\n },\n \"dimensions\": [\n {\n \"dimensionExpression\": {\n \"concatenate\": {\n \"delimiter\": \"\",\n \"dimensionNames\": []\n },\n \"lowerCase\": {\n \"dimensionName\": \"\"\n },\n \"upperCase\": {}\n },\n \"name\": \"\"\n }\n ],\n \"keepEmptyRows\": false,\n \"metricFilter\": {},\n \"metrics\": [\n {\n \"expression\": \"\",\n \"invisible\": false,\n \"name\": \"\"\n }\n ],\n \"pivots\": [\n {\n \"fieldNames\": [],\n \"limit\": \"\",\n \"metricAggregations\": [],\n \"offset\": \"\",\n \"orderBys\": [\n {\n \"desc\": false,\n \"dimension\": {\n \"dimensionName\": \"\",\n \"orderType\": \"\"\n },\n \"metric\": {\n \"metricName\": \"\"\n },\n \"pivot\": {\n \"metricName\": \"\",\n \"pivotSelections\": [\n {\n \"dimensionName\": \"\",\n \"dimensionValue\": \"\"\n }\n ]\n }\n }\n ]\n }\n ],\n \"property\": \"\",\n \"returnPropertyQuota\": false\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/v1beta/:property:runPivotReport') do |req|
req.body = "{\n \"cohortSpec\": {\n \"cohortReportSettings\": {\n \"accumulate\": false\n },\n \"cohorts\": [\n {\n \"dateRange\": {\n \"endDate\": \"\",\n \"name\": \"\",\n \"startDate\": \"\"\n },\n \"dimension\": \"\",\n \"name\": \"\"\n }\n ],\n \"cohortsRange\": {\n \"endOffset\": 0,\n \"granularity\": \"\",\n \"startOffset\": 0\n }\n },\n \"currencyCode\": \"\",\n \"dateRanges\": [\n {}\n ],\n \"dimensionFilter\": {\n \"andGroup\": {\n \"expressions\": []\n },\n \"filter\": {\n \"betweenFilter\": {\n \"fromValue\": {\n \"doubleValue\": \"\",\n \"int64Value\": \"\"\n },\n \"toValue\": {}\n },\n \"fieldName\": \"\",\n \"inListFilter\": {\n \"caseSensitive\": false,\n \"values\": []\n },\n \"numericFilter\": {\n \"operation\": \"\",\n \"value\": {}\n },\n \"stringFilter\": {\n \"caseSensitive\": false,\n \"matchType\": \"\",\n \"value\": \"\"\n }\n },\n \"notExpression\": \"\",\n \"orGroup\": {}\n },\n \"dimensions\": [\n {\n \"dimensionExpression\": {\n \"concatenate\": {\n \"delimiter\": \"\",\n \"dimensionNames\": []\n },\n \"lowerCase\": {\n \"dimensionName\": \"\"\n },\n \"upperCase\": {}\n },\n \"name\": \"\"\n }\n ],\n \"keepEmptyRows\": false,\n \"metricFilter\": {},\n \"metrics\": [\n {\n \"expression\": \"\",\n \"invisible\": false,\n \"name\": \"\"\n }\n ],\n \"pivots\": [\n {\n \"fieldNames\": [],\n \"limit\": \"\",\n \"metricAggregations\": [],\n \"offset\": \"\",\n \"orderBys\": [\n {\n \"desc\": false,\n \"dimension\": {\n \"dimensionName\": \"\",\n \"orderType\": \"\"\n },\n \"metric\": {\n \"metricName\": \"\"\n },\n \"pivot\": {\n \"metricName\": \"\",\n \"pivotSelections\": [\n {\n \"dimensionName\": \"\",\n \"dimensionValue\": \"\"\n }\n ]\n }\n }\n ]\n }\n ],\n \"property\": \"\",\n \"returnPropertyQuota\": false\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1beta/:property:runPivotReport";
let payload = json!({
"cohortSpec": json!({
"cohortReportSettings": json!({"accumulate": false}),
"cohorts": (
json!({
"dateRange": json!({
"endDate": "",
"name": "",
"startDate": ""
}),
"dimension": "",
"name": ""
})
),
"cohortsRange": json!({
"endOffset": 0,
"granularity": "",
"startOffset": 0
})
}),
"currencyCode": "",
"dateRanges": (json!({})),
"dimensionFilter": json!({
"andGroup": json!({"expressions": ()}),
"filter": json!({
"betweenFilter": json!({
"fromValue": json!({
"doubleValue": "",
"int64Value": ""
}),
"toValue": json!({})
}),
"fieldName": "",
"inListFilter": json!({
"caseSensitive": false,
"values": ()
}),
"numericFilter": json!({
"operation": "",
"value": json!({})
}),
"stringFilter": json!({
"caseSensitive": false,
"matchType": "",
"value": ""
})
}),
"notExpression": "",
"orGroup": json!({})
}),
"dimensions": (
json!({
"dimensionExpression": json!({
"concatenate": json!({
"delimiter": "",
"dimensionNames": ()
}),
"lowerCase": json!({"dimensionName": ""}),
"upperCase": json!({})
}),
"name": ""
})
),
"keepEmptyRows": false,
"metricFilter": json!({}),
"metrics": (
json!({
"expression": "",
"invisible": false,
"name": ""
})
),
"pivots": (
json!({
"fieldNames": (),
"limit": "",
"metricAggregations": (),
"offset": "",
"orderBys": (
json!({
"desc": false,
"dimension": json!({
"dimensionName": "",
"orderType": ""
}),
"metric": json!({"metricName": ""}),
"pivot": json!({
"metricName": "",
"pivotSelections": (
json!({
"dimensionName": "",
"dimensionValue": ""
})
)
})
})
)
})
),
"property": "",
"returnPropertyQuota": false
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/v1beta/:property:runPivotReport \
--header 'content-type: application/json' \
--data '{
"cohortSpec": {
"cohortReportSettings": {
"accumulate": false
},
"cohorts": [
{
"dateRange": {
"endDate": "",
"name": "",
"startDate": ""
},
"dimension": "",
"name": ""
}
],
"cohortsRange": {
"endOffset": 0,
"granularity": "",
"startOffset": 0
}
},
"currencyCode": "",
"dateRanges": [
{}
],
"dimensionFilter": {
"andGroup": {
"expressions": []
},
"filter": {
"betweenFilter": {
"fromValue": {
"doubleValue": "",
"int64Value": ""
},
"toValue": {}
},
"fieldName": "",
"inListFilter": {
"caseSensitive": false,
"values": []
},
"numericFilter": {
"operation": "",
"value": {}
},
"stringFilter": {
"caseSensitive": false,
"matchType": "",
"value": ""
}
},
"notExpression": "",
"orGroup": {}
},
"dimensions": [
{
"dimensionExpression": {
"concatenate": {
"delimiter": "",
"dimensionNames": []
},
"lowerCase": {
"dimensionName": ""
},
"upperCase": {}
},
"name": ""
}
],
"keepEmptyRows": false,
"metricFilter": {},
"metrics": [
{
"expression": "",
"invisible": false,
"name": ""
}
],
"pivots": [
{
"fieldNames": [],
"limit": "",
"metricAggregations": [],
"offset": "",
"orderBys": [
{
"desc": false,
"dimension": {
"dimensionName": "",
"orderType": ""
},
"metric": {
"metricName": ""
},
"pivot": {
"metricName": "",
"pivotSelections": [
{
"dimensionName": "",
"dimensionValue": ""
}
]
}
}
]
}
],
"property": "",
"returnPropertyQuota": false
}'
echo '{
"cohortSpec": {
"cohortReportSettings": {
"accumulate": false
},
"cohorts": [
{
"dateRange": {
"endDate": "",
"name": "",
"startDate": ""
},
"dimension": "",
"name": ""
}
],
"cohortsRange": {
"endOffset": 0,
"granularity": "",
"startOffset": 0
}
},
"currencyCode": "",
"dateRanges": [
{}
],
"dimensionFilter": {
"andGroup": {
"expressions": []
},
"filter": {
"betweenFilter": {
"fromValue": {
"doubleValue": "",
"int64Value": ""
},
"toValue": {}
},
"fieldName": "",
"inListFilter": {
"caseSensitive": false,
"values": []
},
"numericFilter": {
"operation": "",
"value": {}
},
"stringFilter": {
"caseSensitive": false,
"matchType": "",
"value": ""
}
},
"notExpression": "",
"orGroup": {}
},
"dimensions": [
{
"dimensionExpression": {
"concatenate": {
"delimiter": "",
"dimensionNames": []
},
"lowerCase": {
"dimensionName": ""
},
"upperCase": {}
},
"name": ""
}
],
"keepEmptyRows": false,
"metricFilter": {},
"metrics": [
{
"expression": "",
"invisible": false,
"name": ""
}
],
"pivots": [
{
"fieldNames": [],
"limit": "",
"metricAggregations": [],
"offset": "",
"orderBys": [
{
"desc": false,
"dimension": {
"dimensionName": "",
"orderType": ""
},
"metric": {
"metricName": ""
},
"pivot": {
"metricName": "",
"pivotSelections": [
{
"dimensionName": "",
"dimensionValue": ""
}
]
}
}
]
}
],
"property": "",
"returnPropertyQuota": false
}' | \
http POST {{baseUrl}}/v1beta/:property:runPivotReport \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "cohortSpec": {\n "cohortReportSettings": {\n "accumulate": false\n },\n "cohorts": [\n {\n "dateRange": {\n "endDate": "",\n "name": "",\n "startDate": ""\n },\n "dimension": "",\n "name": ""\n }\n ],\n "cohortsRange": {\n "endOffset": 0,\n "granularity": "",\n "startOffset": 0\n }\n },\n "currencyCode": "",\n "dateRanges": [\n {}\n ],\n "dimensionFilter": {\n "andGroup": {\n "expressions": []\n },\n "filter": {\n "betweenFilter": {\n "fromValue": {\n "doubleValue": "",\n "int64Value": ""\n },\n "toValue": {}\n },\n "fieldName": "",\n "inListFilter": {\n "caseSensitive": false,\n "values": []\n },\n "numericFilter": {\n "operation": "",\n "value": {}\n },\n "stringFilter": {\n "caseSensitive": false,\n "matchType": "",\n "value": ""\n }\n },\n "notExpression": "",\n "orGroup": {}\n },\n "dimensions": [\n {\n "dimensionExpression": {\n "concatenate": {\n "delimiter": "",\n "dimensionNames": []\n },\n "lowerCase": {\n "dimensionName": ""\n },\n "upperCase": {}\n },\n "name": ""\n }\n ],\n "keepEmptyRows": false,\n "metricFilter": {},\n "metrics": [\n {\n "expression": "",\n "invisible": false,\n "name": ""\n }\n ],\n "pivots": [\n {\n "fieldNames": [],\n "limit": "",\n "metricAggregations": [],\n "offset": "",\n "orderBys": [\n {\n "desc": false,\n "dimension": {\n "dimensionName": "",\n "orderType": ""\n },\n "metric": {\n "metricName": ""\n },\n "pivot": {\n "metricName": "",\n "pivotSelections": [\n {\n "dimensionName": "",\n "dimensionValue": ""\n }\n ]\n }\n }\n ]\n }\n ],\n "property": "",\n "returnPropertyQuota": false\n}' \
--output-document \
- {{baseUrl}}/v1beta/:property:runPivotReport
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"cohortSpec": [
"cohortReportSettings": ["accumulate": false],
"cohorts": [
[
"dateRange": [
"endDate": "",
"name": "",
"startDate": ""
],
"dimension": "",
"name": ""
]
],
"cohortsRange": [
"endOffset": 0,
"granularity": "",
"startOffset": 0
]
],
"currencyCode": "",
"dateRanges": [[]],
"dimensionFilter": [
"andGroup": ["expressions": []],
"filter": [
"betweenFilter": [
"fromValue": [
"doubleValue": "",
"int64Value": ""
],
"toValue": []
],
"fieldName": "",
"inListFilter": [
"caseSensitive": false,
"values": []
],
"numericFilter": [
"operation": "",
"value": []
],
"stringFilter": [
"caseSensitive": false,
"matchType": "",
"value": ""
]
],
"notExpression": "",
"orGroup": []
],
"dimensions": [
[
"dimensionExpression": [
"concatenate": [
"delimiter": "",
"dimensionNames": []
],
"lowerCase": ["dimensionName": ""],
"upperCase": []
],
"name": ""
]
],
"keepEmptyRows": false,
"metricFilter": [],
"metrics": [
[
"expression": "",
"invisible": false,
"name": ""
]
],
"pivots": [
[
"fieldNames": [],
"limit": "",
"metricAggregations": [],
"offset": "",
"orderBys": [
[
"desc": false,
"dimension": [
"dimensionName": "",
"orderType": ""
],
"metric": ["metricName": ""],
"pivot": [
"metricName": "",
"pivotSelections": [
[
"dimensionName": "",
"dimensionValue": ""
]
]
]
]
]
]
],
"property": "",
"returnPropertyQuota": false
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1beta/:property:runPivotReport")! 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
analyticsdata.properties.runRealtimeReport
{{baseUrl}}/v1beta/:property:runRealtimeReport
QUERY PARAMS
property
BODY json
{
"dimensionFilter": {
"andGroup": {
"expressions": []
},
"filter": {
"betweenFilter": {
"fromValue": {
"doubleValue": "",
"int64Value": ""
},
"toValue": {}
},
"fieldName": "",
"inListFilter": {
"caseSensitive": false,
"values": []
},
"numericFilter": {
"operation": "",
"value": {}
},
"stringFilter": {
"caseSensitive": false,
"matchType": "",
"value": ""
}
},
"notExpression": "",
"orGroup": {}
},
"dimensions": [
{
"dimensionExpression": {
"concatenate": {
"delimiter": "",
"dimensionNames": []
},
"lowerCase": {
"dimensionName": ""
},
"upperCase": {}
},
"name": ""
}
],
"limit": "",
"metricAggregations": [],
"metricFilter": {},
"metrics": [
{
"expression": "",
"invisible": false,
"name": ""
}
],
"minuteRanges": [
{
"endMinutesAgo": 0,
"name": "",
"startMinutesAgo": 0
}
],
"orderBys": [
{
"desc": false,
"dimension": {
"dimensionName": "",
"orderType": ""
},
"metric": {
"metricName": ""
},
"pivot": {
"metricName": "",
"pivotSelections": [
{
"dimensionName": "",
"dimensionValue": ""
}
]
}
}
],
"returnPropertyQuota": false
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1beta/:property:runRealtimeReport");
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 \"dimensionFilter\": {\n \"andGroup\": {\n \"expressions\": []\n },\n \"filter\": {\n \"betweenFilter\": {\n \"fromValue\": {\n \"doubleValue\": \"\",\n \"int64Value\": \"\"\n },\n \"toValue\": {}\n },\n \"fieldName\": \"\",\n \"inListFilter\": {\n \"caseSensitive\": false,\n \"values\": []\n },\n \"numericFilter\": {\n \"operation\": \"\",\n \"value\": {}\n },\n \"stringFilter\": {\n \"caseSensitive\": false,\n \"matchType\": \"\",\n \"value\": \"\"\n }\n },\n \"notExpression\": \"\",\n \"orGroup\": {}\n },\n \"dimensions\": [\n {\n \"dimensionExpression\": {\n \"concatenate\": {\n \"delimiter\": \"\",\n \"dimensionNames\": []\n },\n \"lowerCase\": {\n \"dimensionName\": \"\"\n },\n \"upperCase\": {}\n },\n \"name\": \"\"\n }\n ],\n \"limit\": \"\",\n \"metricAggregations\": [],\n \"metricFilter\": {},\n \"metrics\": [\n {\n \"expression\": \"\",\n \"invisible\": false,\n \"name\": \"\"\n }\n ],\n \"minuteRanges\": [\n {\n \"endMinutesAgo\": 0,\n \"name\": \"\",\n \"startMinutesAgo\": 0\n }\n ],\n \"orderBys\": [\n {\n \"desc\": false,\n \"dimension\": {\n \"dimensionName\": \"\",\n \"orderType\": \"\"\n },\n \"metric\": {\n \"metricName\": \"\"\n },\n \"pivot\": {\n \"metricName\": \"\",\n \"pivotSelections\": [\n {\n \"dimensionName\": \"\",\n \"dimensionValue\": \"\"\n }\n ]\n }\n }\n ],\n \"returnPropertyQuota\": false\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1beta/:property:runRealtimeReport" {:content-type :json
:form-params {:dimensionFilter {:andGroup {:expressions []}
:filter {:betweenFilter {:fromValue {:doubleValue ""
:int64Value ""}
:toValue {}}
:fieldName ""
:inListFilter {:caseSensitive false
:values []}
:numericFilter {:operation ""
:value {}}
:stringFilter {:caseSensitive false
:matchType ""
:value ""}}
:notExpression ""
:orGroup {}}
:dimensions [{:dimensionExpression {:concatenate {:delimiter ""
:dimensionNames []}
:lowerCase {:dimensionName ""}
:upperCase {}}
:name ""}]
:limit ""
:metricAggregations []
:metricFilter {}
:metrics [{:expression ""
:invisible false
:name ""}]
:minuteRanges [{:endMinutesAgo 0
:name ""
:startMinutesAgo 0}]
:orderBys [{:desc false
:dimension {:dimensionName ""
:orderType ""}
:metric {:metricName ""}
:pivot {:metricName ""
:pivotSelections [{:dimensionName ""
:dimensionValue ""}]}}]
:returnPropertyQuota false}})
require "http/client"
url = "{{baseUrl}}/v1beta/:property:runRealtimeReport"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"dimensionFilter\": {\n \"andGroup\": {\n \"expressions\": []\n },\n \"filter\": {\n \"betweenFilter\": {\n \"fromValue\": {\n \"doubleValue\": \"\",\n \"int64Value\": \"\"\n },\n \"toValue\": {}\n },\n \"fieldName\": \"\",\n \"inListFilter\": {\n \"caseSensitive\": false,\n \"values\": []\n },\n \"numericFilter\": {\n \"operation\": \"\",\n \"value\": {}\n },\n \"stringFilter\": {\n \"caseSensitive\": false,\n \"matchType\": \"\",\n \"value\": \"\"\n }\n },\n \"notExpression\": \"\",\n \"orGroup\": {}\n },\n \"dimensions\": [\n {\n \"dimensionExpression\": {\n \"concatenate\": {\n \"delimiter\": \"\",\n \"dimensionNames\": []\n },\n \"lowerCase\": {\n \"dimensionName\": \"\"\n },\n \"upperCase\": {}\n },\n \"name\": \"\"\n }\n ],\n \"limit\": \"\",\n \"metricAggregations\": [],\n \"metricFilter\": {},\n \"metrics\": [\n {\n \"expression\": \"\",\n \"invisible\": false,\n \"name\": \"\"\n }\n ],\n \"minuteRanges\": [\n {\n \"endMinutesAgo\": 0,\n \"name\": \"\",\n \"startMinutesAgo\": 0\n }\n ],\n \"orderBys\": [\n {\n \"desc\": false,\n \"dimension\": {\n \"dimensionName\": \"\",\n \"orderType\": \"\"\n },\n \"metric\": {\n \"metricName\": \"\"\n },\n \"pivot\": {\n \"metricName\": \"\",\n \"pivotSelections\": [\n {\n \"dimensionName\": \"\",\n \"dimensionValue\": \"\"\n }\n ]\n }\n }\n ],\n \"returnPropertyQuota\": false\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/v1beta/:property:runRealtimeReport"),
Content = new StringContent("{\n \"dimensionFilter\": {\n \"andGroup\": {\n \"expressions\": []\n },\n \"filter\": {\n \"betweenFilter\": {\n \"fromValue\": {\n \"doubleValue\": \"\",\n \"int64Value\": \"\"\n },\n \"toValue\": {}\n },\n \"fieldName\": \"\",\n \"inListFilter\": {\n \"caseSensitive\": false,\n \"values\": []\n },\n \"numericFilter\": {\n \"operation\": \"\",\n \"value\": {}\n },\n \"stringFilter\": {\n \"caseSensitive\": false,\n \"matchType\": \"\",\n \"value\": \"\"\n }\n },\n \"notExpression\": \"\",\n \"orGroup\": {}\n },\n \"dimensions\": [\n {\n \"dimensionExpression\": {\n \"concatenate\": {\n \"delimiter\": \"\",\n \"dimensionNames\": []\n },\n \"lowerCase\": {\n \"dimensionName\": \"\"\n },\n \"upperCase\": {}\n },\n \"name\": \"\"\n }\n ],\n \"limit\": \"\",\n \"metricAggregations\": [],\n \"metricFilter\": {},\n \"metrics\": [\n {\n \"expression\": \"\",\n \"invisible\": false,\n \"name\": \"\"\n }\n ],\n \"minuteRanges\": [\n {\n \"endMinutesAgo\": 0,\n \"name\": \"\",\n \"startMinutesAgo\": 0\n }\n ],\n \"orderBys\": [\n {\n \"desc\": false,\n \"dimension\": {\n \"dimensionName\": \"\",\n \"orderType\": \"\"\n },\n \"metric\": {\n \"metricName\": \"\"\n },\n \"pivot\": {\n \"metricName\": \"\",\n \"pivotSelections\": [\n {\n \"dimensionName\": \"\",\n \"dimensionValue\": \"\"\n }\n ]\n }\n }\n ],\n \"returnPropertyQuota\": false\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1beta/:property:runRealtimeReport");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"dimensionFilter\": {\n \"andGroup\": {\n \"expressions\": []\n },\n \"filter\": {\n \"betweenFilter\": {\n \"fromValue\": {\n \"doubleValue\": \"\",\n \"int64Value\": \"\"\n },\n \"toValue\": {}\n },\n \"fieldName\": \"\",\n \"inListFilter\": {\n \"caseSensitive\": false,\n \"values\": []\n },\n \"numericFilter\": {\n \"operation\": \"\",\n \"value\": {}\n },\n \"stringFilter\": {\n \"caseSensitive\": false,\n \"matchType\": \"\",\n \"value\": \"\"\n }\n },\n \"notExpression\": \"\",\n \"orGroup\": {}\n },\n \"dimensions\": [\n {\n \"dimensionExpression\": {\n \"concatenate\": {\n \"delimiter\": \"\",\n \"dimensionNames\": []\n },\n \"lowerCase\": {\n \"dimensionName\": \"\"\n },\n \"upperCase\": {}\n },\n \"name\": \"\"\n }\n ],\n \"limit\": \"\",\n \"metricAggregations\": [],\n \"metricFilter\": {},\n \"metrics\": [\n {\n \"expression\": \"\",\n \"invisible\": false,\n \"name\": \"\"\n }\n ],\n \"minuteRanges\": [\n {\n \"endMinutesAgo\": 0,\n \"name\": \"\",\n \"startMinutesAgo\": 0\n }\n ],\n \"orderBys\": [\n {\n \"desc\": false,\n \"dimension\": {\n \"dimensionName\": \"\",\n \"orderType\": \"\"\n },\n \"metric\": {\n \"metricName\": \"\"\n },\n \"pivot\": {\n \"metricName\": \"\",\n \"pivotSelections\": [\n {\n \"dimensionName\": \"\",\n \"dimensionValue\": \"\"\n }\n ]\n }\n }\n ],\n \"returnPropertyQuota\": false\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1beta/:property:runRealtimeReport"
payload := strings.NewReader("{\n \"dimensionFilter\": {\n \"andGroup\": {\n \"expressions\": []\n },\n \"filter\": {\n \"betweenFilter\": {\n \"fromValue\": {\n \"doubleValue\": \"\",\n \"int64Value\": \"\"\n },\n \"toValue\": {}\n },\n \"fieldName\": \"\",\n \"inListFilter\": {\n \"caseSensitive\": false,\n \"values\": []\n },\n \"numericFilter\": {\n \"operation\": \"\",\n \"value\": {}\n },\n \"stringFilter\": {\n \"caseSensitive\": false,\n \"matchType\": \"\",\n \"value\": \"\"\n }\n },\n \"notExpression\": \"\",\n \"orGroup\": {}\n },\n \"dimensions\": [\n {\n \"dimensionExpression\": {\n \"concatenate\": {\n \"delimiter\": \"\",\n \"dimensionNames\": []\n },\n \"lowerCase\": {\n \"dimensionName\": \"\"\n },\n \"upperCase\": {}\n },\n \"name\": \"\"\n }\n ],\n \"limit\": \"\",\n \"metricAggregations\": [],\n \"metricFilter\": {},\n \"metrics\": [\n {\n \"expression\": \"\",\n \"invisible\": false,\n \"name\": \"\"\n }\n ],\n \"minuteRanges\": [\n {\n \"endMinutesAgo\": 0,\n \"name\": \"\",\n \"startMinutesAgo\": 0\n }\n ],\n \"orderBys\": [\n {\n \"desc\": false,\n \"dimension\": {\n \"dimensionName\": \"\",\n \"orderType\": \"\"\n },\n \"metric\": {\n \"metricName\": \"\"\n },\n \"pivot\": {\n \"metricName\": \"\",\n \"pivotSelections\": [\n {\n \"dimensionName\": \"\",\n \"dimensionValue\": \"\"\n }\n ]\n }\n }\n ],\n \"returnPropertyQuota\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/v1beta/:property:runRealtimeReport HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 1535
{
"dimensionFilter": {
"andGroup": {
"expressions": []
},
"filter": {
"betweenFilter": {
"fromValue": {
"doubleValue": "",
"int64Value": ""
},
"toValue": {}
},
"fieldName": "",
"inListFilter": {
"caseSensitive": false,
"values": []
},
"numericFilter": {
"operation": "",
"value": {}
},
"stringFilter": {
"caseSensitive": false,
"matchType": "",
"value": ""
}
},
"notExpression": "",
"orGroup": {}
},
"dimensions": [
{
"dimensionExpression": {
"concatenate": {
"delimiter": "",
"dimensionNames": []
},
"lowerCase": {
"dimensionName": ""
},
"upperCase": {}
},
"name": ""
}
],
"limit": "",
"metricAggregations": [],
"metricFilter": {},
"metrics": [
{
"expression": "",
"invisible": false,
"name": ""
}
],
"minuteRanges": [
{
"endMinutesAgo": 0,
"name": "",
"startMinutesAgo": 0
}
],
"orderBys": [
{
"desc": false,
"dimension": {
"dimensionName": "",
"orderType": ""
},
"metric": {
"metricName": ""
},
"pivot": {
"metricName": "",
"pivotSelections": [
{
"dimensionName": "",
"dimensionValue": ""
}
]
}
}
],
"returnPropertyQuota": false
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1beta/:property:runRealtimeReport")
.setHeader("content-type", "application/json")
.setBody("{\n \"dimensionFilter\": {\n \"andGroup\": {\n \"expressions\": []\n },\n \"filter\": {\n \"betweenFilter\": {\n \"fromValue\": {\n \"doubleValue\": \"\",\n \"int64Value\": \"\"\n },\n \"toValue\": {}\n },\n \"fieldName\": \"\",\n \"inListFilter\": {\n \"caseSensitive\": false,\n \"values\": []\n },\n \"numericFilter\": {\n \"operation\": \"\",\n \"value\": {}\n },\n \"stringFilter\": {\n \"caseSensitive\": false,\n \"matchType\": \"\",\n \"value\": \"\"\n }\n },\n \"notExpression\": \"\",\n \"orGroup\": {}\n },\n \"dimensions\": [\n {\n \"dimensionExpression\": {\n \"concatenate\": {\n \"delimiter\": \"\",\n \"dimensionNames\": []\n },\n \"lowerCase\": {\n \"dimensionName\": \"\"\n },\n \"upperCase\": {}\n },\n \"name\": \"\"\n }\n ],\n \"limit\": \"\",\n \"metricAggregations\": [],\n \"metricFilter\": {},\n \"metrics\": [\n {\n \"expression\": \"\",\n \"invisible\": false,\n \"name\": \"\"\n }\n ],\n \"minuteRanges\": [\n {\n \"endMinutesAgo\": 0,\n \"name\": \"\",\n \"startMinutesAgo\": 0\n }\n ],\n \"orderBys\": [\n {\n \"desc\": false,\n \"dimension\": {\n \"dimensionName\": \"\",\n \"orderType\": \"\"\n },\n \"metric\": {\n \"metricName\": \"\"\n },\n \"pivot\": {\n \"metricName\": \"\",\n \"pivotSelections\": [\n {\n \"dimensionName\": \"\",\n \"dimensionValue\": \"\"\n }\n ]\n }\n }\n ],\n \"returnPropertyQuota\": false\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1beta/:property:runRealtimeReport"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"dimensionFilter\": {\n \"andGroup\": {\n \"expressions\": []\n },\n \"filter\": {\n \"betweenFilter\": {\n \"fromValue\": {\n \"doubleValue\": \"\",\n \"int64Value\": \"\"\n },\n \"toValue\": {}\n },\n \"fieldName\": \"\",\n \"inListFilter\": {\n \"caseSensitive\": false,\n \"values\": []\n },\n \"numericFilter\": {\n \"operation\": \"\",\n \"value\": {}\n },\n \"stringFilter\": {\n \"caseSensitive\": false,\n \"matchType\": \"\",\n \"value\": \"\"\n }\n },\n \"notExpression\": \"\",\n \"orGroup\": {}\n },\n \"dimensions\": [\n {\n \"dimensionExpression\": {\n \"concatenate\": {\n \"delimiter\": \"\",\n \"dimensionNames\": []\n },\n \"lowerCase\": {\n \"dimensionName\": \"\"\n },\n \"upperCase\": {}\n },\n \"name\": \"\"\n }\n ],\n \"limit\": \"\",\n \"metricAggregations\": [],\n \"metricFilter\": {},\n \"metrics\": [\n {\n \"expression\": \"\",\n \"invisible\": false,\n \"name\": \"\"\n }\n ],\n \"minuteRanges\": [\n {\n \"endMinutesAgo\": 0,\n \"name\": \"\",\n \"startMinutesAgo\": 0\n }\n ],\n \"orderBys\": [\n {\n \"desc\": false,\n \"dimension\": {\n \"dimensionName\": \"\",\n \"orderType\": \"\"\n },\n \"metric\": {\n \"metricName\": \"\"\n },\n \"pivot\": {\n \"metricName\": \"\",\n \"pivotSelections\": [\n {\n \"dimensionName\": \"\",\n \"dimensionValue\": \"\"\n }\n ]\n }\n }\n ],\n \"returnPropertyQuota\": 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 \"dimensionFilter\": {\n \"andGroup\": {\n \"expressions\": []\n },\n \"filter\": {\n \"betweenFilter\": {\n \"fromValue\": {\n \"doubleValue\": \"\",\n \"int64Value\": \"\"\n },\n \"toValue\": {}\n },\n \"fieldName\": \"\",\n \"inListFilter\": {\n \"caseSensitive\": false,\n \"values\": []\n },\n \"numericFilter\": {\n \"operation\": \"\",\n \"value\": {}\n },\n \"stringFilter\": {\n \"caseSensitive\": false,\n \"matchType\": \"\",\n \"value\": \"\"\n }\n },\n \"notExpression\": \"\",\n \"orGroup\": {}\n },\n \"dimensions\": [\n {\n \"dimensionExpression\": {\n \"concatenate\": {\n \"delimiter\": \"\",\n \"dimensionNames\": []\n },\n \"lowerCase\": {\n \"dimensionName\": \"\"\n },\n \"upperCase\": {}\n },\n \"name\": \"\"\n }\n ],\n \"limit\": \"\",\n \"metricAggregations\": [],\n \"metricFilter\": {},\n \"metrics\": [\n {\n \"expression\": \"\",\n \"invisible\": false,\n \"name\": \"\"\n }\n ],\n \"minuteRanges\": [\n {\n \"endMinutesAgo\": 0,\n \"name\": \"\",\n \"startMinutesAgo\": 0\n }\n ],\n \"orderBys\": [\n {\n \"desc\": false,\n \"dimension\": {\n \"dimensionName\": \"\",\n \"orderType\": \"\"\n },\n \"metric\": {\n \"metricName\": \"\"\n },\n \"pivot\": {\n \"metricName\": \"\",\n \"pivotSelections\": [\n {\n \"dimensionName\": \"\",\n \"dimensionValue\": \"\"\n }\n ]\n }\n }\n ],\n \"returnPropertyQuota\": false\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1beta/:property:runRealtimeReport")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1beta/:property:runRealtimeReport")
.header("content-type", "application/json")
.body("{\n \"dimensionFilter\": {\n \"andGroup\": {\n \"expressions\": []\n },\n \"filter\": {\n \"betweenFilter\": {\n \"fromValue\": {\n \"doubleValue\": \"\",\n \"int64Value\": \"\"\n },\n \"toValue\": {}\n },\n \"fieldName\": \"\",\n \"inListFilter\": {\n \"caseSensitive\": false,\n \"values\": []\n },\n \"numericFilter\": {\n \"operation\": \"\",\n \"value\": {}\n },\n \"stringFilter\": {\n \"caseSensitive\": false,\n \"matchType\": \"\",\n \"value\": \"\"\n }\n },\n \"notExpression\": \"\",\n \"orGroup\": {}\n },\n \"dimensions\": [\n {\n \"dimensionExpression\": {\n \"concatenate\": {\n \"delimiter\": \"\",\n \"dimensionNames\": []\n },\n \"lowerCase\": {\n \"dimensionName\": \"\"\n },\n \"upperCase\": {}\n },\n \"name\": \"\"\n }\n ],\n \"limit\": \"\",\n \"metricAggregations\": [],\n \"metricFilter\": {},\n \"metrics\": [\n {\n \"expression\": \"\",\n \"invisible\": false,\n \"name\": \"\"\n }\n ],\n \"minuteRanges\": [\n {\n \"endMinutesAgo\": 0,\n \"name\": \"\",\n \"startMinutesAgo\": 0\n }\n ],\n \"orderBys\": [\n {\n \"desc\": false,\n \"dimension\": {\n \"dimensionName\": \"\",\n \"orderType\": \"\"\n },\n \"metric\": {\n \"metricName\": \"\"\n },\n \"pivot\": {\n \"metricName\": \"\",\n \"pivotSelections\": [\n {\n \"dimensionName\": \"\",\n \"dimensionValue\": \"\"\n }\n ]\n }\n }\n ],\n \"returnPropertyQuota\": false\n}")
.asString();
const data = JSON.stringify({
dimensionFilter: {
andGroup: {
expressions: []
},
filter: {
betweenFilter: {
fromValue: {
doubleValue: '',
int64Value: ''
},
toValue: {}
},
fieldName: '',
inListFilter: {
caseSensitive: false,
values: []
},
numericFilter: {
operation: '',
value: {}
},
stringFilter: {
caseSensitive: false,
matchType: '',
value: ''
}
},
notExpression: '',
orGroup: {}
},
dimensions: [
{
dimensionExpression: {
concatenate: {
delimiter: '',
dimensionNames: []
},
lowerCase: {
dimensionName: ''
},
upperCase: {}
},
name: ''
}
],
limit: '',
metricAggregations: [],
metricFilter: {},
metrics: [
{
expression: '',
invisible: false,
name: ''
}
],
minuteRanges: [
{
endMinutesAgo: 0,
name: '',
startMinutesAgo: 0
}
],
orderBys: [
{
desc: false,
dimension: {
dimensionName: '',
orderType: ''
},
metric: {
metricName: ''
},
pivot: {
metricName: '',
pivotSelections: [
{
dimensionName: '',
dimensionValue: ''
}
]
}
}
],
returnPropertyQuota: false
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v1beta/:property:runRealtimeReport');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1beta/:property:runRealtimeReport',
headers: {'content-type': 'application/json'},
data: {
dimensionFilter: {
andGroup: {expressions: []},
filter: {
betweenFilter: {fromValue: {doubleValue: '', int64Value: ''}, toValue: {}},
fieldName: '',
inListFilter: {caseSensitive: false, values: []},
numericFilter: {operation: '', value: {}},
stringFilter: {caseSensitive: false, matchType: '', value: ''}
},
notExpression: '',
orGroup: {}
},
dimensions: [
{
dimensionExpression: {
concatenate: {delimiter: '', dimensionNames: []},
lowerCase: {dimensionName: ''},
upperCase: {}
},
name: ''
}
],
limit: '',
metricAggregations: [],
metricFilter: {},
metrics: [{expression: '', invisible: false, name: ''}],
minuteRanges: [{endMinutesAgo: 0, name: '', startMinutesAgo: 0}],
orderBys: [
{
desc: false,
dimension: {dimensionName: '', orderType: ''},
metric: {metricName: ''},
pivot: {metricName: '', pivotSelections: [{dimensionName: '', dimensionValue: ''}]}
}
],
returnPropertyQuota: false
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1beta/:property:runRealtimeReport';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"dimensionFilter":{"andGroup":{"expressions":[]},"filter":{"betweenFilter":{"fromValue":{"doubleValue":"","int64Value":""},"toValue":{}},"fieldName":"","inListFilter":{"caseSensitive":false,"values":[]},"numericFilter":{"operation":"","value":{}},"stringFilter":{"caseSensitive":false,"matchType":"","value":""}},"notExpression":"","orGroup":{}},"dimensions":[{"dimensionExpression":{"concatenate":{"delimiter":"","dimensionNames":[]},"lowerCase":{"dimensionName":""},"upperCase":{}},"name":""}],"limit":"","metricAggregations":[],"metricFilter":{},"metrics":[{"expression":"","invisible":false,"name":""}],"minuteRanges":[{"endMinutesAgo":0,"name":"","startMinutesAgo":0}],"orderBys":[{"desc":false,"dimension":{"dimensionName":"","orderType":""},"metric":{"metricName":""},"pivot":{"metricName":"","pivotSelections":[{"dimensionName":"","dimensionValue":""}]}}],"returnPropertyQuota":false}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1beta/:property:runRealtimeReport',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "dimensionFilter": {\n "andGroup": {\n "expressions": []\n },\n "filter": {\n "betweenFilter": {\n "fromValue": {\n "doubleValue": "",\n "int64Value": ""\n },\n "toValue": {}\n },\n "fieldName": "",\n "inListFilter": {\n "caseSensitive": false,\n "values": []\n },\n "numericFilter": {\n "operation": "",\n "value": {}\n },\n "stringFilter": {\n "caseSensitive": false,\n "matchType": "",\n "value": ""\n }\n },\n "notExpression": "",\n "orGroup": {}\n },\n "dimensions": [\n {\n "dimensionExpression": {\n "concatenate": {\n "delimiter": "",\n "dimensionNames": []\n },\n "lowerCase": {\n "dimensionName": ""\n },\n "upperCase": {}\n },\n "name": ""\n }\n ],\n "limit": "",\n "metricAggregations": [],\n "metricFilter": {},\n "metrics": [\n {\n "expression": "",\n "invisible": false,\n "name": ""\n }\n ],\n "minuteRanges": [\n {\n "endMinutesAgo": 0,\n "name": "",\n "startMinutesAgo": 0\n }\n ],\n "orderBys": [\n {\n "desc": false,\n "dimension": {\n "dimensionName": "",\n "orderType": ""\n },\n "metric": {\n "metricName": ""\n },\n "pivot": {\n "metricName": "",\n "pivotSelections": [\n {\n "dimensionName": "",\n "dimensionValue": ""\n }\n ]\n }\n }\n ],\n "returnPropertyQuota": 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 \"dimensionFilter\": {\n \"andGroup\": {\n \"expressions\": []\n },\n \"filter\": {\n \"betweenFilter\": {\n \"fromValue\": {\n \"doubleValue\": \"\",\n \"int64Value\": \"\"\n },\n \"toValue\": {}\n },\n \"fieldName\": \"\",\n \"inListFilter\": {\n \"caseSensitive\": false,\n \"values\": []\n },\n \"numericFilter\": {\n \"operation\": \"\",\n \"value\": {}\n },\n \"stringFilter\": {\n \"caseSensitive\": false,\n \"matchType\": \"\",\n \"value\": \"\"\n }\n },\n \"notExpression\": \"\",\n \"orGroup\": {}\n },\n \"dimensions\": [\n {\n \"dimensionExpression\": {\n \"concatenate\": {\n \"delimiter\": \"\",\n \"dimensionNames\": []\n },\n \"lowerCase\": {\n \"dimensionName\": \"\"\n },\n \"upperCase\": {}\n },\n \"name\": \"\"\n }\n ],\n \"limit\": \"\",\n \"metricAggregations\": [],\n \"metricFilter\": {},\n \"metrics\": [\n {\n \"expression\": \"\",\n \"invisible\": false,\n \"name\": \"\"\n }\n ],\n \"minuteRanges\": [\n {\n \"endMinutesAgo\": 0,\n \"name\": \"\",\n \"startMinutesAgo\": 0\n }\n ],\n \"orderBys\": [\n {\n \"desc\": false,\n \"dimension\": {\n \"dimensionName\": \"\",\n \"orderType\": \"\"\n },\n \"metric\": {\n \"metricName\": \"\"\n },\n \"pivot\": {\n \"metricName\": \"\",\n \"pivotSelections\": [\n {\n \"dimensionName\": \"\",\n \"dimensionValue\": \"\"\n }\n ]\n }\n }\n ],\n \"returnPropertyQuota\": false\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1beta/:property:runRealtimeReport")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1beta/:property:runRealtimeReport',
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({
dimensionFilter: {
andGroup: {expressions: []},
filter: {
betweenFilter: {fromValue: {doubleValue: '', int64Value: ''}, toValue: {}},
fieldName: '',
inListFilter: {caseSensitive: false, values: []},
numericFilter: {operation: '', value: {}},
stringFilter: {caseSensitive: false, matchType: '', value: ''}
},
notExpression: '',
orGroup: {}
},
dimensions: [
{
dimensionExpression: {
concatenate: {delimiter: '', dimensionNames: []},
lowerCase: {dimensionName: ''},
upperCase: {}
},
name: ''
}
],
limit: '',
metricAggregations: [],
metricFilter: {},
metrics: [{expression: '', invisible: false, name: ''}],
minuteRanges: [{endMinutesAgo: 0, name: '', startMinutesAgo: 0}],
orderBys: [
{
desc: false,
dimension: {dimensionName: '', orderType: ''},
metric: {metricName: ''},
pivot: {metricName: '', pivotSelections: [{dimensionName: '', dimensionValue: ''}]}
}
],
returnPropertyQuota: false
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1beta/:property:runRealtimeReport',
headers: {'content-type': 'application/json'},
body: {
dimensionFilter: {
andGroup: {expressions: []},
filter: {
betweenFilter: {fromValue: {doubleValue: '', int64Value: ''}, toValue: {}},
fieldName: '',
inListFilter: {caseSensitive: false, values: []},
numericFilter: {operation: '', value: {}},
stringFilter: {caseSensitive: false, matchType: '', value: ''}
},
notExpression: '',
orGroup: {}
},
dimensions: [
{
dimensionExpression: {
concatenate: {delimiter: '', dimensionNames: []},
lowerCase: {dimensionName: ''},
upperCase: {}
},
name: ''
}
],
limit: '',
metricAggregations: [],
metricFilter: {},
metrics: [{expression: '', invisible: false, name: ''}],
minuteRanges: [{endMinutesAgo: 0, name: '', startMinutesAgo: 0}],
orderBys: [
{
desc: false,
dimension: {dimensionName: '', orderType: ''},
metric: {metricName: ''},
pivot: {metricName: '', pivotSelections: [{dimensionName: '', dimensionValue: ''}]}
}
],
returnPropertyQuota: false
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/v1beta/:property:runRealtimeReport');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
dimensionFilter: {
andGroup: {
expressions: []
},
filter: {
betweenFilter: {
fromValue: {
doubleValue: '',
int64Value: ''
},
toValue: {}
},
fieldName: '',
inListFilter: {
caseSensitive: false,
values: []
},
numericFilter: {
operation: '',
value: {}
},
stringFilter: {
caseSensitive: false,
matchType: '',
value: ''
}
},
notExpression: '',
orGroup: {}
},
dimensions: [
{
dimensionExpression: {
concatenate: {
delimiter: '',
dimensionNames: []
},
lowerCase: {
dimensionName: ''
},
upperCase: {}
},
name: ''
}
],
limit: '',
metricAggregations: [],
metricFilter: {},
metrics: [
{
expression: '',
invisible: false,
name: ''
}
],
minuteRanges: [
{
endMinutesAgo: 0,
name: '',
startMinutesAgo: 0
}
],
orderBys: [
{
desc: false,
dimension: {
dimensionName: '',
orderType: ''
},
metric: {
metricName: ''
},
pivot: {
metricName: '',
pivotSelections: [
{
dimensionName: '',
dimensionValue: ''
}
]
}
}
],
returnPropertyQuota: false
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/v1beta/:property:runRealtimeReport',
headers: {'content-type': 'application/json'},
data: {
dimensionFilter: {
andGroup: {expressions: []},
filter: {
betweenFilter: {fromValue: {doubleValue: '', int64Value: ''}, toValue: {}},
fieldName: '',
inListFilter: {caseSensitive: false, values: []},
numericFilter: {operation: '', value: {}},
stringFilter: {caseSensitive: false, matchType: '', value: ''}
},
notExpression: '',
orGroup: {}
},
dimensions: [
{
dimensionExpression: {
concatenate: {delimiter: '', dimensionNames: []},
lowerCase: {dimensionName: ''},
upperCase: {}
},
name: ''
}
],
limit: '',
metricAggregations: [],
metricFilter: {},
metrics: [{expression: '', invisible: false, name: ''}],
minuteRanges: [{endMinutesAgo: 0, name: '', startMinutesAgo: 0}],
orderBys: [
{
desc: false,
dimension: {dimensionName: '', orderType: ''},
metric: {metricName: ''},
pivot: {metricName: '', pivotSelections: [{dimensionName: '', dimensionValue: ''}]}
}
],
returnPropertyQuota: false
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1beta/:property:runRealtimeReport';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"dimensionFilter":{"andGroup":{"expressions":[]},"filter":{"betweenFilter":{"fromValue":{"doubleValue":"","int64Value":""},"toValue":{}},"fieldName":"","inListFilter":{"caseSensitive":false,"values":[]},"numericFilter":{"operation":"","value":{}},"stringFilter":{"caseSensitive":false,"matchType":"","value":""}},"notExpression":"","orGroup":{}},"dimensions":[{"dimensionExpression":{"concatenate":{"delimiter":"","dimensionNames":[]},"lowerCase":{"dimensionName":""},"upperCase":{}},"name":""}],"limit":"","metricAggregations":[],"metricFilter":{},"metrics":[{"expression":"","invisible":false,"name":""}],"minuteRanges":[{"endMinutesAgo":0,"name":"","startMinutesAgo":0}],"orderBys":[{"desc":false,"dimension":{"dimensionName":"","orderType":""},"metric":{"metricName":""},"pivot":{"metricName":"","pivotSelections":[{"dimensionName":"","dimensionValue":""}]}}],"returnPropertyQuota":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 = @{ @"dimensionFilter": @{ @"andGroup": @{ @"expressions": @[ ] }, @"filter": @{ @"betweenFilter": @{ @"fromValue": @{ @"doubleValue": @"", @"int64Value": @"" }, @"toValue": @{ } }, @"fieldName": @"", @"inListFilter": @{ @"caseSensitive": @NO, @"values": @[ ] }, @"numericFilter": @{ @"operation": @"", @"value": @{ } }, @"stringFilter": @{ @"caseSensitive": @NO, @"matchType": @"", @"value": @"" } }, @"notExpression": @"", @"orGroup": @{ } },
@"dimensions": @[ @{ @"dimensionExpression": @{ @"concatenate": @{ @"delimiter": @"", @"dimensionNames": @[ ] }, @"lowerCase": @{ @"dimensionName": @"" }, @"upperCase": @{ } }, @"name": @"" } ],
@"limit": @"",
@"metricAggregations": @[ ],
@"metricFilter": @{ },
@"metrics": @[ @{ @"expression": @"", @"invisible": @NO, @"name": @"" } ],
@"minuteRanges": @[ @{ @"endMinutesAgo": @0, @"name": @"", @"startMinutesAgo": @0 } ],
@"orderBys": @[ @{ @"desc": @NO, @"dimension": @{ @"dimensionName": @"", @"orderType": @"" }, @"metric": @{ @"metricName": @"" }, @"pivot": @{ @"metricName": @"", @"pivotSelections": @[ @{ @"dimensionName": @"", @"dimensionValue": @"" } ] } } ],
@"returnPropertyQuota": @NO };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1beta/:property:runRealtimeReport"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1beta/:property:runRealtimeReport" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"dimensionFilter\": {\n \"andGroup\": {\n \"expressions\": []\n },\n \"filter\": {\n \"betweenFilter\": {\n \"fromValue\": {\n \"doubleValue\": \"\",\n \"int64Value\": \"\"\n },\n \"toValue\": {}\n },\n \"fieldName\": \"\",\n \"inListFilter\": {\n \"caseSensitive\": false,\n \"values\": []\n },\n \"numericFilter\": {\n \"operation\": \"\",\n \"value\": {}\n },\n \"stringFilter\": {\n \"caseSensitive\": false,\n \"matchType\": \"\",\n \"value\": \"\"\n }\n },\n \"notExpression\": \"\",\n \"orGroup\": {}\n },\n \"dimensions\": [\n {\n \"dimensionExpression\": {\n \"concatenate\": {\n \"delimiter\": \"\",\n \"dimensionNames\": []\n },\n \"lowerCase\": {\n \"dimensionName\": \"\"\n },\n \"upperCase\": {}\n },\n \"name\": \"\"\n }\n ],\n \"limit\": \"\",\n \"metricAggregations\": [],\n \"metricFilter\": {},\n \"metrics\": [\n {\n \"expression\": \"\",\n \"invisible\": false,\n \"name\": \"\"\n }\n ],\n \"minuteRanges\": [\n {\n \"endMinutesAgo\": 0,\n \"name\": \"\",\n \"startMinutesAgo\": 0\n }\n ],\n \"orderBys\": [\n {\n \"desc\": false,\n \"dimension\": {\n \"dimensionName\": \"\",\n \"orderType\": \"\"\n },\n \"metric\": {\n \"metricName\": \"\"\n },\n \"pivot\": {\n \"metricName\": \"\",\n \"pivotSelections\": [\n {\n \"dimensionName\": \"\",\n \"dimensionValue\": \"\"\n }\n ]\n }\n }\n ],\n \"returnPropertyQuota\": false\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1beta/:property:runRealtimeReport",
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([
'dimensionFilter' => [
'andGroup' => [
'expressions' => [
]
],
'filter' => [
'betweenFilter' => [
'fromValue' => [
'doubleValue' => '',
'int64Value' => ''
],
'toValue' => [
]
],
'fieldName' => '',
'inListFilter' => [
'caseSensitive' => null,
'values' => [
]
],
'numericFilter' => [
'operation' => '',
'value' => [
]
],
'stringFilter' => [
'caseSensitive' => null,
'matchType' => '',
'value' => ''
]
],
'notExpression' => '',
'orGroup' => [
]
],
'dimensions' => [
[
'dimensionExpression' => [
'concatenate' => [
'delimiter' => '',
'dimensionNames' => [
]
],
'lowerCase' => [
'dimensionName' => ''
],
'upperCase' => [
]
],
'name' => ''
]
],
'limit' => '',
'metricAggregations' => [
],
'metricFilter' => [
],
'metrics' => [
[
'expression' => '',
'invisible' => null,
'name' => ''
]
],
'minuteRanges' => [
[
'endMinutesAgo' => 0,
'name' => '',
'startMinutesAgo' => 0
]
],
'orderBys' => [
[
'desc' => null,
'dimension' => [
'dimensionName' => '',
'orderType' => ''
],
'metric' => [
'metricName' => ''
],
'pivot' => [
'metricName' => '',
'pivotSelections' => [
[
'dimensionName' => '',
'dimensionValue' => ''
]
]
]
]
],
'returnPropertyQuota' => null
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/v1beta/:property:runRealtimeReport', [
'body' => '{
"dimensionFilter": {
"andGroup": {
"expressions": []
},
"filter": {
"betweenFilter": {
"fromValue": {
"doubleValue": "",
"int64Value": ""
},
"toValue": {}
},
"fieldName": "",
"inListFilter": {
"caseSensitive": false,
"values": []
},
"numericFilter": {
"operation": "",
"value": {}
},
"stringFilter": {
"caseSensitive": false,
"matchType": "",
"value": ""
}
},
"notExpression": "",
"orGroup": {}
},
"dimensions": [
{
"dimensionExpression": {
"concatenate": {
"delimiter": "",
"dimensionNames": []
},
"lowerCase": {
"dimensionName": ""
},
"upperCase": {}
},
"name": ""
}
],
"limit": "",
"metricAggregations": [],
"metricFilter": {},
"metrics": [
{
"expression": "",
"invisible": false,
"name": ""
}
],
"minuteRanges": [
{
"endMinutesAgo": 0,
"name": "",
"startMinutesAgo": 0
}
],
"orderBys": [
{
"desc": false,
"dimension": {
"dimensionName": "",
"orderType": ""
},
"metric": {
"metricName": ""
},
"pivot": {
"metricName": "",
"pivotSelections": [
{
"dimensionName": "",
"dimensionValue": ""
}
]
}
}
],
"returnPropertyQuota": false
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1beta/:property:runRealtimeReport');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'dimensionFilter' => [
'andGroup' => [
'expressions' => [
]
],
'filter' => [
'betweenFilter' => [
'fromValue' => [
'doubleValue' => '',
'int64Value' => ''
],
'toValue' => [
]
],
'fieldName' => '',
'inListFilter' => [
'caseSensitive' => null,
'values' => [
]
],
'numericFilter' => [
'operation' => '',
'value' => [
]
],
'stringFilter' => [
'caseSensitive' => null,
'matchType' => '',
'value' => ''
]
],
'notExpression' => '',
'orGroup' => [
]
],
'dimensions' => [
[
'dimensionExpression' => [
'concatenate' => [
'delimiter' => '',
'dimensionNames' => [
]
],
'lowerCase' => [
'dimensionName' => ''
],
'upperCase' => [
]
],
'name' => ''
]
],
'limit' => '',
'metricAggregations' => [
],
'metricFilter' => [
],
'metrics' => [
[
'expression' => '',
'invisible' => null,
'name' => ''
]
],
'minuteRanges' => [
[
'endMinutesAgo' => 0,
'name' => '',
'startMinutesAgo' => 0
]
],
'orderBys' => [
[
'desc' => null,
'dimension' => [
'dimensionName' => '',
'orderType' => ''
],
'metric' => [
'metricName' => ''
],
'pivot' => [
'metricName' => '',
'pivotSelections' => [
[
'dimensionName' => '',
'dimensionValue' => ''
]
]
]
]
],
'returnPropertyQuota' => null
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'dimensionFilter' => [
'andGroup' => [
'expressions' => [
]
],
'filter' => [
'betweenFilter' => [
'fromValue' => [
'doubleValue' => '',
'int64Value' => ''
],
'toValue' => [
]
],
'fieldName' => '',
'inListFilter' => [
'caseSensitive' => null,
'values' => [
]
],
'numericFilter' => [
'operation' => '',
'value' => [
]
],
'stringFilter' => [
'caseSensitive' => null,
'matchType' => '',
'value' => ''
]
],
'notExpression' => '',
'orGroup' => [
]
],
'dimensions' => [
[
'dimensionExpression' => [
'concatenate' => [
'delimiter' => '',
'dimensionNames' => [
]
],
'lowerCase' => [
'dimensionName' => ''
],
'upperCase' => [
]
],
'name' => ''
]
],
'limit' => '',
'metricAggregations' => [
],
'metricFilter' => [
],
'metrics' => [
[
'expression' => '',
'invisible' => null,
'name' => ''
]
],
'minuteRanges' => [
[
'endMinutesAgo' => 0,
'name' => '',
'startMinutesAgo' => 0
]
],
'orderBys' => [
[
'desc' => null,
'dimension' => [
'dimensionName' => '',
'orderType' => ''
],
'metric' => [
'metricName' => ''
],
'pivot' => [
'metricName' => '',
'pivotSelections' => [
[
'dimensionName' => '',
'dimensionValue' => ''
]
]
]
]
],
'returnPropertyQuota' => null
]));
$request->setRequestUrl('{{baseUrl}}/v1beta/:property:runRealtimeReport');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1beta/:property:runRealtimeReport' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"dimensionFilter": {
"andGroup": {
"expressions": []
},
"filter": {
"betweenFilter": {
"fromValue": {
"doubleValue": "",
"int64Value": ""
},
"toValue": {}
},
"fieldName": "",
"inListFilter": {
"caseSensitive": false,
"values": []
},
"numericFilter": {
"operation": "",
"value": {}
},
"stringFilter": {
"caseSensitive": false,
"matchType": "",
"value": ""
}
},
"notExpression": "",
"orGroup": {}
},
"dimensions": [
{
"dimensionExpression": {
"concatenate": {
"delimiter": "",
"dimensionNames": []
},
"lowerCase": {
"dimensionName": ""
},
"upperCase": {}
},
"name": ""
}
],
"limit": "",
"metricAggregations": [],
"metricFilter": {},
"metrics": [
{
"expression": "",
"invisible": false,
"name": ""
}
],
"minuteRanges": [
{
"endMinutesAgo": 0,
"name": "",
"startMinutesAgo": 0
}
],
"orderBys": [
{
"desc": false,
"dimension": {
"dimensionName": "",
"orderType": ""
},
"metric": {
"metricName": ""
},
"pivot": {
"metricName": "",
"pivotSelections": [
{
"dimensionName": "",
"dimensionValue": ""
}
]
}
}
],
"returnPropertyQuota": false
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1beta/:property:runRealtimeReport' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"dimensionFilter": {
"andGroup": {
"expressions": []
},
"filter": {
"betweenFilter": {
"fromValue": {
"doubleValue": "",
"int64Value": ""
},
"toValue": {}
},
"fieldName": "",
"inListFilter": {
"caseSensitive": false,
"values": []
},
"numericFilter": {
"operation": "",
"value": {}
},
"stringFilter": {
"caseSensitive": false,
"matchType": "",
"value": ""
}
},
"notExpression": "",
"orGroup": {}
},
"dimensions": [
{
"dimensionExpression": {
"concatenate": {
"delimiter": "",
"dimensionNames": []
},
"lowerCase": {
"dimensionName": ""
},
"upperCase": {}
},
"name": ""
}
],
"limit": "",
"metricAggregations": [],
"metricFilter": {},
"metrics": [
{
"expression": "",
"invisible": false,
"name": ""
}
],
"minuteRanges": [
{
"endMinutesAgo": 0,
"name": "",
"startMinutesAgo": 0
}
],
"orderBys": [
{
"desc": false,
"dimension": {
"dimensionName": "",
"orderType": ""
},
"metric": {
"metricName": ""
},
"pivot": {
"metricName": "",
"pivotSelections": [
{
"dimensionName": "",
"dimensionValue": ""
}
]
}
}
],
"returnPropertyQuota": false
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"dimensionFilter\": {\n \"andGroup\": {\n \"expressions\": []\n },\n \"filter\": {\n \"betweenFilter\": {\n \"fromValue\": {\n \"doubleValue\": \"\",\n \"int64Value\": \"\"\n },\n \"toValue\": {}\n },\n \"fieldName\": \"\",\n \"inListFilter\": {\n \"caseSensitive\": false,\n \"values\": []\n },\n \"numericFilter\": {\n \"operation\": \"\",\n \"value\": {}\n },\n \"stringFilter\": {\n \"caseSensitive\": false,\n \"matchType\": \"\",\n \"value\": \"\"\n }\n },\n \"notExpression\": \"\",\n \"orGroup\": {}\n },\n \"dimensions\": [\n {\n \"dimensionExpression\": {\n \"concatenate\": {\n \"delimiter\": \"\",\n \"dimensionNames\": []\n },\n \"lowerCase\": {\n \"dimensionName\": \"\"\n },\n \"upperCase\": {}\n },\n \"name\": \"\"\n }\n ],\n \"limit\": \"\",\n \"metricAggregations\": [],\n \"metricFilter\": {},\n \"metrics\": [\n {\n \"expression\": \"\",\n \"invisible\": false,\n \"name\": \"\"\n }\n ],\n \"minuteRanges\": [\n {\n \"endMinutesAgo\": 0,\n \"name\": \"\",\n \"startMinutesAgo\": 0\n }\n ],\n \"orderBys\": [\n {\n \"desc\": false,\n \"dimension\": {\n \"dimensionName\": \"\",\n \"orderType\": \"\"\n },\n \"metric\": {\n \"metricName\": \"\"\n },\n \"pivot\": {\n \"metricName\": \"\",\n \"pivotSelections\": [\n {\n \"dimensionName\": \"\",\n \"dimensionValue\": \"\"\n }\n ]\n }\n }\n ],\n \"returnPropertyQuota\": false\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1beta/:property:runRealtimeReport", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1beta/:property:runRealtimeReport"
payload = {
"dimensionFilter": {
"andGroup": { "expressions": [] },
"filter": {
"betweenFilter": {
"fromValue": {
"doubleValue": "",
"int64Value": ""
},
"toValue": {}
},
"fieldName": "",
"inListFilter": {
"caseSensitive": False,
"values": []
},
"numericFilter": {
"operation": "",
"value": {}
},
"stringFilter": {
"caseSensitive": False,
"matchType": "",
"value": ""
}
},
"notExpression": "",
"orGroup": {}
},
"dimensions": [
{
"dimensionExpression": {
"concatenate": {
"delimiter": "",
"dimensionNames": []
},
"lowerCase": { "dimensionName": "" },
"upperCase": {}
},
"name": ""
}
],
"limit": "",
"metricAggregations": [],
"metricFilter": {},
"metrics": [
{
"expression": "",
"invisible": False,
"name": ""
}
],
"minuteRanges": [
{
"endMinutesAgo": 0,
"name": "",
"startMinutesAgo": 0
}
],
"orderBys": [
{
"desc": False,
"dimension": {
"dimensionName": "",
"orderType": ""
},
"metric": { "metricName": "" },
"pivot": {
"metricName": "",
"pivotSelections": [
{
"dimensionName": "",
"dimensionValue": ""
}
]
}
}
],
"returnPropertyQuota": False
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1beta/:property:runRealtimeReport"
payload <- "{\n \"dimensionFilter\": {\n \"andGroup\": {\n \"expressions\": []\n },\n \"filter\": {\n \"betweenFilter\": {\n \"fromValue\": {\n \"doubleValue\": \"\",\n \"int64Value\": \"\"\n },\n \"toValue\": {}\n },\n \"fieldName\": \"\",\n \"inListFilter\": {\n \"caseSensitive\": false,\n \"values\": []\n },\n \"numericFilter\": {\n \"operation\": \"\",\n \"value\": {}\n },\n \"stringFilter\": {\n \"caseSensitive\": false,\n \"matchType\": \"\",\n \"value\": \"\"\n }\n },\n \"notExpression\": \"\",\n \"orGroup\": {}\n },\n \"dimensions\": [\n {\n \"dimensionExpression\": {\n \"concatenate\": {\n \"delimiter\": \"\",\n \"dimensionNames\": []\n },\n \"lowerCase\": {\n \"dimensionName\": \"\"\n },\n \"upperCase\": {}\n },\n \"name\": \"\"\n }\n ],\n \"limit\": \"\",\n \"metricAggregations\": [],\n \"metricFilter\": {},\n \"metrics\": [\n {\n \"expression\": \"\",\n \"invisible\": false,\n \"name\": \"\"\n }\n ],\n \"minuteRanges\": [\n {\n \"endMinutesAgo\": 0,\n \"name\": \"\",\n \"startMinutesAgo\": 0\n }\n ],\n \"orderBys\": [\n {\n \"desc\": false,\n \"dimension\": {\n \"dimensionName\": \"\",\n \"orderType\": \"\"\n },\n \"metric\": {\n \"metricName\": \"\"\n },\n \"pivot\": {\n \"metricName\": \"\",\n \"pivotSelections\": [\n {\n \"dimensionName\": \"\",\n \"dimensionValue\": \"\"\n }\n ]\n }\n }\n ],\n \"returnPropertyQuota\": false\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1beta/:property:runRealtimeReport")
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 \"dimensionFilter\": {\n \"andGroup\": {\n \"expressions\": []\n },\n \"filter\": {\n \"betweenFilter\": {\n \"fromValue\": {\n \"doubleValue\": \"\",\n \"int64Value\": \"\"\n },\n \"toValue\": {}\n },\n \"fieldName\": \"\",\n \"inListFilter\": {\n \"caseSensitive\": false,\n \"values\": []\n },\n \"numericFilter\": {\n \"operation\": \"\",\n \"value\": {}\n },\n \"stringFilter\": {\n \"caseSensitive\": false,\n \"matchType\": \"\",\n \"value\": \"\"\n }\n },\n \"notExpression\": \"\",\n \"orGroup\": {}\n },\n \"dimensions\": [\n {\n \"dimensionExpression\": {\n \"concatenate\": {\n \"delimiter\": \"\",\n \"dimensionNames\": []\n },\n \"lowerCase\": {\n \"dimensionName\": \"\"\n },\n \"upperCase\": {}\n },\n \"name\": \"\"\n }\n ],\n \"limit\": \"\",\n \"metricAggregations\": [],\n \"metricFilter\": {},\n \"metrics\": [\n {\n \"expression\": \"\",\n \"invisible\": false,\n \"name\": \"\"\n }\n ],\n \"minuteRanges\": [\n {\n \"endMinutesAgo\": 0,\n \"name\": \"\",\n \"startMinutesAgo\": 0\n }\n ],\n \"orderBys\": [\n {\n \"desc\": false,\n \"dimension\": {\n \"dimensionName\": \"\",\n \"orderType\": \"\"\n },\n \"metric\": {\n \"metricName\": \"\"\n },\n \"pivot\": {\n \"metricName\": \"\",\n \"pivotSelections\": [\n {\n \"dimensionName\": \"\",\n \"dimensionValue\": \"\"\n }\n ]\n }\n }\n ],\n \"returnPropertyQuota\": false\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/v1beta/:property:runRealtimeReport') do |req|
req.body = "{\n \"dimensionFilter\": {\n \"andGroup\": {\n \"expressions\": []\n },\n \"filter\": {\n \"betweenFilter\": {\n \"fromValue\": {\n \"doubleValue\": \"\",\n \"int64Value\": \"\"\n },\n \"toValue\": {}\n },\n \"fieldName\": \"\",\n \"inListFilter\": {\n \"caseSensitive\": false,\n \"values\": []\n },\n \"numericFilter\": {\n \"operation\": \"\",\n \"value\": {}\n },\n \"stringFilter\": {\n \"caseSensitive\": false,\n \"matchType\": \"\",\n \"value\": \"\"\n }\n },\n \"notExpression\": \"\",\n \"orGroup\": {}\n },\n \"dimensions\": [\n {\n \"dimensionExpression\": {\n \"concatenate\": {\n \"delimiter\": \"\",\n \"dimensionNames\": []\n },\n \"lowerCase\": {\n \"dimensionName\": \"\"\n },\n \"upperCase\": {}\n },\n \"name\": \"\"\n }\n ],\n \"limit\": \"\",\n \"metricAggregations\": [],\n \"metricFilter\": {},\n \"metrics\": [\n {\n \"expression\": \"\",\n \"invisible\": false,\n \"name\": \"\"\n }\n ],\n \"minuteRanges\": [\n {\n \"endMinutesAgo\": 0,\n \"name\": \"\",\n \"startMinutesAgo\": 0\n }\n ],\n \"orderBys\": [\n {\n \"desc\": false,\n \"dimension\": {\n \"dimensionName\": \"\",\n \"orderType\": \"\"\n },\n \"metric\": {\n \"metricName\": \"\"\n },\n \"pivot\": {\n \"metricName\": \"\",\n \"pivotSelections\": [\n {\n \"dimensionName\": \"\",\n \"dimensionValue\": \"\"\n }\n ]\n }\n }\n ],\n \"returnPropertyQuota\": false\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1beta/:property:runRealtimeReport";
let payload = json!({
"dimensionFilter": json!({
"andGroup": json!({"expressions": ()}),
"filter": json!({
"betweenFilter": json!({
"fromValue": json!({
"doubleValue": "",
"int64Value": ""
}),
"toValue": json!({})
}),
"fieldName": "",
"inListFilter": json!({
"caseSensitive": false,
"values": ()
}),
"numericFilter": json!({
"operation": "",
"value": json!({})
}),
"stringFilter": json!({
"caseSensitive": false,
"matchType": "",
"value": ""
})
}),
"notExpression": "",
"orGroup": json!({})
}),
"dimensions": (
json!({
"dimensionExpression": json!({
"concatenate": json!({
"delimiter": "",
"dimensionNames": ()
}),
"lowerCase": json!({"dimensionName": ""}),
"upperCase": json!({})
}),
"name": ""
})
),
"limit": "",
"metricAggregations": (),
"metricFilter": json!({}),
"metrics": (
json!({
"expression": "",
"invisible": false,
"name": ""
})
),
"minuteRanges": (
json!({
"endMinutesAgo": 0,
"name": "",
"startMinutesAgo": 0
})
),
"orderBys": (
json!({
"desc": false,
"dimension": json!({
"dimensionName": "",
"orderType": ""
}),
"metric": json!({"metricName": ""}),
"pivot": json!({
"metricName": "",
"pivotSelections": (
json!({
"dimensionName": "",
"dimensionValue": ""
})
)
})
})
),
"returnPropertyQuota": false
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/v1beta/:property:runRealtimeReport \
--header 'content-type: application/json' \
--data '{
"dimensionFilter": {
"andGroup": {
"expressions": []
},
"filter": {
"betweenFilter": {
"fromValue": {
"doubleValue": "",
"int64Value": ""
},
"toValue": {}
},
"fieldName": "",
"inListFilter": {
"caseSensitive": false,
"values": []
},
"numericFilter": {
"operation": "",
"value": {}
},
"stringFilter": {
"caseSensitive": false,
"matchType": "",
"value": ""
}
},
"notExpression": "",
"orGroup": {}
},
"dimensions": [
{
"dimensionExpression": {
"concatenate": {
"delimiter": "",
"dimensionNames": []
},
"lowerCase": {
"dimensionName": ""
},
"upperCase": {}
},
"name": ""
}
],
"limit": "",
"metricAggregations": [],
"metricFilter": {},
"metrics": [
{
"expression": "",
"invisible": false,
"name": ""
}
],
"minuteRanges": [
{
"endMinutesAgo": 0,
"name": "",
"startMinutesAgo": 0
}
],
"orderBys": [
{
"desc": false,
"dimension": {
"dimensionName": "",
"orderType": ""
},
"metric": {
"metricName": ""
},
"pivot": {
"metricName": "",
"pivotSelections": [
{
"dimensionName": "",
"dimensionValue": ""
}
]
}
}
],
"returnPropertyQuota": false
}'
echo '{
"dimensionFilter": {
"andGroup": {
"expressions": []
},
"filter": {
"betweenFilter": {
"fromValue": {
"doubleValue": "",
"int64Value": ""
},
"toValue": {}
},
"fieldName": "",
"inListFilter": {
"caseSensitive": false,
"values": []
},
"numericFilter": {
"operation": "",
"value": {}
},
"stringFilter": {
"caseSensitive": false,
"matchType": "",
"value": ""
}
},
"notExpression": "",
"orGroup": {}
},
"dimensions": [
{
"dimensionExpression": {
"concatenate": {
"delimiter": "",
"dimensionNames": []
},
"lowerCase": {
"dimensionName": ""
},
"upperCase": {}
},
"name": ""
}
],
"limit": "",
"metricAggregations": [],
"metricFilter": {},
"metrics": [
{
"expression": "",
"invisible": false,
"name": ""
}
],
"minuteRanges": [
{
"endMinutesAgo": 0,
"name": "",
"startMinutesAgo": 0
}
],
"orderBys": [
{
"desc": false,
"dimension": {
"dimensionName": "",
"orderType": ""
},
"metric": {
"metricName": ""
},
"pivot": {
"metricName": "",
"pivotSelections": [
{
"dimensionName": "",
"dimensionValue": ""
}
]
}
}
],
"returnPropertyQuota": false
}' | \
http POST {{baseUrl}}/v1beta/:property:runRealtimeReport \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "dimensionFilter": {\n "andGroup": {\n "expressions": []\n },\n "filter": {\n "betweenFilter": {\n "fromValue": {\n "doubleValue": "",\n "int64Value": ""\n },\n "toValue": {}\n },\n "fieldName": "",\n "inListFilter": {\n "caseSensitive": false,\n "values": []\n },\n "numericFilter": {\n "operation": "",\n "value": {}\n },\n "stringFilter": {\n "caseSensitive": false,\n "matchType": "",\n "value": ""\n }\n },\n "notExpression": "",\n "orGroup": {}\n },\n "dimensions": [\n {\n "dimensionExpression": {\n "concatenate": {\n "delimiter": "",\n "dimensionNames": []\n },\n "lowerCase": {\n "dimensionName": ""\n },\n "upperCase": {}\n },\n "name": ""\n }\n ],\n "limit": "",\n "metricAggregations": [],\n "metricFilter": {},\n "metrics": [\n {\n "expression": "",\n "invisible": false,\n "name": ""\n }\n ],\n "minuteRanges": [\n {\n "endMinutesAgo": 0,\n "name": "",\n "startMinutesAgo": 0\n }\n ],\n "orderBys": [\n {\n "desc": false,\n "dimension": {\n "dimensionName": "",\n "orderType": ""\n },\n "metric": {\n "metricName": ""\n },\n "pivot": {\n "metricName": "",\n "pivotSelections": [\n {\n "dimensionName": "",\n "dimensionValue": ""\n }\n ]\n }\n }\n ],\n "returnPropertyQuota": false\n}' \
--output-document \
- {{baseUrl}}/v1beta/:property:runRealtimeReport
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"dimensionFilter": [
"andGroup": ["expressions": []],
"filter": [
"betweenFilter": [
"fromValue": [
"doubleValue": "",
"int64Value": ""
],
"toValue": []
],
"fieldName": "",
"inListFilter": [
"caseSensitive": false,
"values": []
],
"numericFilter": [
"operation": "",
"value": []
],
"stringFilter": [
"caseSensitive": false,
"matchType": "",
"value": ""
]
],
"notExpression": "",
"orGroup": []
],
"dimensions": [
[
"dimensionExpression": [
"concatenate": [
"delimiter": "",
"dimensionNames": []
],
"lowerCase": ["dimensionName": ""],
"upperCase": []
],
"name": ""
]
],
"limit": "",
"metricAggregations": [],
"metricFilter": [],
"metrics": [
[
"expression": "",
"invisible": false,
"name": ""
]
],
"minuteRanges": [
[
"endMinutesAgo": 0,
"name": "",
"startMinutesAgo": 0
]
],
"orderBys": [
[
"desc": false,
"dimension": [
"dimensionName": "",
"orderType": ""
],
"metric": ["metricName": ""],
"pivot": [
"metricName": "",
"pivotSelections": [
[
"dimensionName": "",
"dimensionValue": ""
]
]
]
]
],
"returnPropertyQuota": false
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1beta/:property:runRealtimeReport")! 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
analyticsdata.properties.runReport
{{baseUrl}}/v1beta/:property:runReport
QUERY PARAMS
property
BODY json
{
"cohortSpec": {
"cohortReportSettings": {
"accumulate": false
},
"cohorts": [
{
"dateRange": {
"endDate": "",
"name": "",
"startDate": ""
},
"dimension": "",
"name": ""
}
],
"cohortsRange": {
"endOffset": 0,
"granularity": "",
"startOffset": 0
}
},
"currencyCode": "",
"dateRanges": [
{}
],
"dimensionFilter": {
"andGroup": {
"expressions": []
},
"filter": {
"betweenFilter": {
"fromValue": {
"doubleValue": "",
"int64Value": ""
},
"toValue": {}
},
"fieldName": "",
"inListFilter": {
"caseSensitive": false,
"values": []
},
"numericFilter": {
"operation": "",
"value": {}
},
"stringFilter": {
"caseSensitive": false,
"matchType": "",
"value": ""
}
},
"notExpression": "",
"orGroup": {}
},
"dimensions": [
{
"dimensionExpression": {
"concatenate": {
"delimiter": "",
"dimensionNames": []
},
"lowerCase": {
"dimensionName": ""
},
"upperCase": {}
},
"name": ""
}
],
"keepEmptyRows": false,
"limit": "",
"metricAggregations": [],
"metricFilter": {},
"metrics": [
{
"expression": "",
"invisible": false,
"name": ""
}
],
"offset": "",
"orderBys": [
{
"desc": false,
"dimension": {
"dimensionName": "",
"orderType": ""
},
"metric": {
"metricName": ""
},
"pivot": {
"metricName": "",
"pivotSelections": [
{
"dimensionName": "",
"dimensionValue": ""
}
]
}
}
],
"property": "",
"returnPropertyQuota": false
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1beta/:property:runReport");
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 \"cohortSpec\": {\n \"cohortReportSettings\": {\n \"accumulate\": false\n },\n \"cohorts\": [\n {\n \"dateRange\": {\n \"endDate\": \"\",\n \"name\": \"\",\n \"startDate\": \"\"\n },\n \"dimension\": \"\",\n \"name\": \"\"\n }\n ],\n \"cohortsRange\": {\n \"endOffset\": 0,\n \"granularity\": \"\",\n \"startOffset\": 0\n }\n },\n \"currencyCode\": \"\",\n \"dateRanges\": [\n {}\n ],\n \"dimensionFilter\": {\n \"andGroup\": {\n \"expressions\": []\n },\n \"filter\": {\n \"betweenFilter\": {\n \"fromValue\": {\n \"doubleValue\": \"\",\n \"int64Value\": \"\"\n },\n \"toValue\": {}\n },\n \"fieldName\": \"\",\n \"inListFilter\": {\n \"caseSensitive\": false,\n \"values\": []\n },\n \"numericFilter\": {\n \"operation\": \"\",\n \"value\": {}\n },\n \"stringFilter\": {\n \"caseSensitive\": false,\n \"matchType\": \"\",\n \"value\": \"\"\n }\n },\n \"notExpression\": \"\",\n \"orGroup\": {}\n },\n \"dimensions\": [\n {\n \"dimensionExpression\": {\n \"concatenate\": {\n \"delimiter\": \"\",\n \"dimensionNames\": []\n },\n \"lowerCase\": {\n \"dimensionName\": \"\"\n },\n \"upperCase\": {}\n },\n \"name\": \"\"\n }\n ],\n \"keepEmptyRows\": false,\n \"limit\": \"\",\n \"metricAggregations\": [],\n \"metricFilter\": {},\n \"metrics\": [\n {\n \"expression\": \"\",\n \"invisible\": false,\n \"name\": \"\"\n }\n ],\n \"offset\": \"\",\n \"orderBys\": [\n {\n \"desc\": false,\n \"dimension\": {\n \"dimensionName\": \"\",\n \"orderType\": \"\"\n },\n \"metric\": {\n \"metricName\": \"\"\n },\n \"pivot\": {\n \"metricName\": \"\",\n \"pivotSelections\": [\n {\n \"dimensionName\": \"\",\n \"dimensionValue\": \"\"\n }\n ]\n }\n }\n ],\n \"property\": \"\",\n \"returnPropertyQuota\": false\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1beta/:property:runReport" {:content-type :json
:form-params {:cohortSpec {:cohortReportSettings {:accumulate false}
:cohorts [{:dateRange {:endDate ""
:name ""
:startDate ""}
:dimension ""
:name ""}]
:cohortsRange {:endOffset 0
:granularity ""
:startOffset 0}}
:currencyCode ""
:dateRanges [{}]
:dimensionFilter {:andGroup {:expressions []}
:filter {:betweenFilter {:fromValue {:doubleValue ""
:int64Value ""}
:toValue {}}
:fieldName ""
:inListFilter {:caseSensitive false
:values []}
:numericFilter {:operation ""
:value {}}
:stringFilter {:caseSensitive false
:matchType ""
:value ""}}
:notExpression ""
:orGroup {}}
:dimensions [{:dimensionExpression {:concatenate {:delimiter ""
:dimensionNames []}
:lowerCase {:dimensionName ""}
:upperCase {}}
:name ""}]
:keepEmptyRows false
:limit ""
:metricAggregations []
:metricFilter {}
:metrics [{:expression ""
:invisible false
:name ""}]
:offset ""
:orderBys [{:desc false
:dimension {:dimensionName ""
:orderType ""}
:metric {:metricName ""}
:pivot {:metricName ""
:pivotSelections [{:dimensionName ""
:dimensionValue ""}]}}]
:property ""
:returnPropertyQuota false}})
require "http/client"
url = "{{baseUrl}}/v1beta/:property:runReport"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"cohortSpec\": {\n \"cohortReportSettings\": {\n \"accumulate\": false\n },\n \"cohorts\": [\n {\n \"dateRange\": {\n \"endDate\": \"\",\n \"name\": \"\",\n \"startDate\": \"\"\n },\n \"dimension\": \"\",\n \"name\": \"\"\n }\n ],\n \"cohortsRange\": {\n \"endOffset\": 0,\n \"granularity\": \"\",\n \"startOffset\": 0\n }\n },\n \"currencyCode\": \"\",\n \"dateRanges\": [\n {}\n ],\n \"dimensionFilter\": {\n \"andGroup\": {\n \"expressions\": []\n },\n \"filter\": {\n \"betweenFilter\": {\n \"fromValue\": {\n \"doubleValue\": \"\",\n \"int64Value\": \"\"\n },\n \"toValue\": {}\n },\n \"fieldName\": \"\",\n \"inListFilter\": {\n \"caseSensitive\": false,\n \"values\": []\n },\n \"numericFilter\": {\n \"operation\": \"\",\n \"value\": {}\n },\n \"stringFilter\": {\n \"caseSensitive\": false,\n \"matchType\": \"\",\n \"value\": \"\"\n }\n },\n \"notExpression\": \"\",\n \"orGroup\": {}\n },\n \"dimensions\": [\n {\n \"dimensionExpression\": {\n \"concatenate\": {\n \"delimiter\": \"\",\n \"dimensionNames\": []\n },\n \"lowerCase\": {\n \"dimensionName\": \"\"\n },\n \"upperCase\": {}\n },\n \"name\": \"\"\n }\n ],\n \"keepEmptyRows\": false,\n \"limit\": \"\",\n \"metricAggregations\": [],\n \"metricFilter\": {},\n \"metrics\": [\n {\n \"expression\": \"\",\n \"invisible\": false,\n \"name\": \"\"\n }\n ],\n \"offset\": \"\",\n \"orderBys\": [\n {\n \"desc\": false,\n \"dimension\": {\n \"dimensionName\": \"\",\n \"orderType\": \"\"\n },\n \"metric\": {\n \"metricName\": \"\"\n },\n \"pivot\": {\n \"metricName\": \"\",\n \"pivotSelections\": [\n {\n \"dimensionName\": \"\",\n \"dimensionValue\": \"\"\n }\n ]\n }\n }\n ],\n \"property\": \"\",\n \"returnPropertyQuota\": false\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/v1beta/:property:runReport"),
Content = new StringContent("{\n \"cohortSpec\": {\n \"cohortReportSettings\": {\n \"accumulate\": false\n },\n \"cohorts\": [\n {\n \"dateRange\": {\n \"endDate\": \"\",\n \"name\": \"\",\n \"startDate\": \"\"\n },\n \"dimension\": \"\",\n \"name\": \"\"\n }\n ],\n \"cohortsRange\": {\n \"endOffset\": 0,\n \"granularity\": \"\",\n \"startOffset\": 0\n }\n },\n \"currencyCode\": \"\",\n \"dateRanges\": [\n {}\n ],\n \"dimensionFilter\": {\n \"andGroup\": {\n \"expressions\": []\n },\n \"filter\": {\n \"betweenFilter\": {\n \"fromValue\": {\n \"doubleValue\": \"\",\n \"int64Value\": \"\"\n },\n \"toValue\": {}\n },\n \"fieldName\": \"\",\n \"inListFilter\": {\n \"caseSensitive\": false,\n \"values\": []\n },\n \"numericFilter\": {\n \"operation\": \"\",\n \"value\": {}\n },\n \"stringFilter\": {\n \"caseSensitive\": false,\n \"matchType\": \"\",\n \"value\": \"\"\n }\n },\n \"notExpression\": \"\",\n \"orGroup\": {}\n },\n \"dimensions\": [\n {\n \"dimensionExpression\": {\n \"concatenate\": {\n \"delimiter\": \"\",\n \"dimensionNames\": []\n },\n \"lowerCase\": {\n \"dimensionName\": \"\"\n },\n \"upperCase\": {}\n },\n \"name\": \"\"\n }\n ],\n \"keepEmptyRows\": false,\n \"limit\": \"\",\n \"metricAggregations\": [],\n \"metricFilter\": {},\n \"metrics\": [\n {\n \"expression\": \"\",\n \"invisible\": false,\n \"name\": \"\"\n }\n ],\n \"offset\": \"\",\n \"orderBys\": [\n {\n \"desc\": false,\n \"dimension\": {\n \"dimensionName\": \"\",\n \"orderType\": \"\"\n },\n \"metric\": {\n \"metricName\": \"\"\n },\n \"pivot\": {\n \"metricName\": \"\",\n \"pivotSelections\": [\n {\n \"dimensionName\": \"\",\n \"dimensionValue\": \"\"\n }\n ]\n }\n }\n ],\n \"property\": \"\",\n \"returnPropertyQuota\": false\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1beta/:property:runReport");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"cohortSpec\": {\n \"cohortReportSettings\": {\n \"accumulate\": false\n },\n \"cohorts\": [\n {\n \"dateRange\": {\n \"endDate\": \"\",\n \"name\": \"\",\n \"startDate\": \"\"\n },\n \"dimension\": \"\",\n \"name\": \"\"\n }\n ],\n \"cohortsRange\": {\n \"endOffset\": 0,\n \"granularity\": \"\",\n \"startOffset\": 0\n }\n },\n \"currencyCode\": \"\",\n \"dateRanges\": [\n {}\n ],\n \"dimensionFilter\": {\n \"andGroup\": {\n \"expressions\": []\n },\n \"filter\": {\n \"betweenFilter\": {\n \"fromValue\": {\n \"doubleValue\": \"\",\n \"int64Value\": \"\"\n },\n \"toValue\": {}\n },\n \"fieldName\": \"\",\n \"inListFilter\": {\n \"caseSensitive\": false,\n \"values\": []\n },\n \"numericFilter\": {\n \"operation\": \"\",\n \"value\": {}\n },\n \"stringFilter\": {\n \"caseSensitive\": false,\n \"matchType\": \"\",\n \"value\": \"\"\n }\n },\n \"notExpression\": \"\",\n \"orGroup\": {}\n },\n \"dimensions\": [\n {\n \"dimensionExpression\": {\n \"concatenate\": {\n \"delimiter\": \"\",\n \"dimensionNames\": []\n },\n \"lowerCase\": {\n \"dimensionName\": \"\"\n },\n \"upperCase\": {}\n },\n \"name\": \"\"\n }\n ],\n \"keepEmptyRows\": false,\n \"limit\": \"\",\n \"metricAggregations\": [],\n \"metricFilter\": {},\n \"metrics\": [\n {\n \"expression\": \"\",\n \"invisible\": false,\n \"name\": \"\"\n }\n ],\n \"offset\": \"\",\n \"orderBys\": [\n {\n \"desc\": false,\n \"dimension\": {\n \"dimensionName\": \"\",\n \"orderType\": \"\"\n },\n \"metric\": {\n \"metricName\": \"\"\n },\n \"pivot\": {\n \"metricName\": \"\",\n \"pivotSelections\": [\n {\n \"dimensionName\": \"\",\n \"dimensionValue\": \"\"\n }\n ]\n }\n }\n ],\n \"property\": \"\",\n \"returnPropertyQuota\": false\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1beta/:property:runReport"
payload := strings.NewReader("{\n \"cohortSpec\": {\n \"cohortReportSettings\": {\n \"accumulate\": false\n },\n \"cohorts\": [\n {\n \"dateRange\": {\n \"endDate\": \"\",\n \"name\": \"\",\n \"startDate\": \"\"\n },\n \"dimension\": \"\",\n \"name\": \"\"\n }\n ],\n \"cohortsRange\": {\n \"endOffset\": 0,\n \"granularity\": \"\",\n \"startOffset\": 0\n }\n },\n \"currencyCode\": \"\",\n \"dateRanges\": [\n {}\n ],\n \"dimensionFilter\": {\n \"andGroup\": {\n \"expressions\": []\n },\n \"filter\": {\n \"betweenFilter\": {\n \"fromValue\": {\n \"doubleValue\": \"\",\n \"int64Value\": \"\"\n },\n \"toValue\": {}\n },\n \"fieldName\": \"\",\n \"inListFilter\": {\n \"caseSensitive\": false,\n \"values\": []\n },\n \"numericFilter\": {\n \"operation\": \"\",\n \"value\": {}\n },\n \"stringFilter\": {\n \"caseSensitive\": false,\n \"matchType\": \"\",\n \"value\": \"\"\n }\n },\n \"notExpression\": \"\",\n \"orGroup\": {}\n },\n \"dimensions\": [\n {\n \"dimensionExpression\": {\n \"concatenate\": {\n \"delimiter\": \"\",\n \"dimensionNames\": []\n },\n \"lowerCase\": {\n \"dimensionName\": \"\"\n },\n \"upperCase\": {}\n },\n \"name\": \"\"\n }\n ],\n \"keepEmptyRows\": false,\n \"limit\": \"\",\n \"metricAggregations\": [],\n \"metricFilter\": {},\n \"metrics\": [\n {\n \"expression\": \"\",\n \"invisible\": false,\n \"name\": \"\"\n }\n ],\n \"offset\": \"\",\n \"orderBys\": [\n {\n \"desc\": false,\n \"dimension\": {\n \"dimensionName\": \"\",\n \"orderType\": \"\"\n },\n \"metric\": {\n \"metricName\": \"\"\n },\n \"pivot\": {\n \"metricName\": \"\",\n \"pivotSelections\": [\n {\n \"dimensionName\": \"\",\n \"dimensionValue\": \"\"\n }\n ]\n }\n }\n ],\n \"property\": \"\",\n \"returnPropertyQuota\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/v1beta/:property:runReport HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 1914
{
"cohortSpec": {
"cohortReportSettings": {
"accumulate": false
},
"cohorts": [
{
"dateRange": {
"endDate": "",
"name": "",
"startDate": ""
},
"dimension": "",
"name": ""
}
],
"cohortsRange": {
"endOffset": 0,
"granularity": "",
"startOffset": 0
}
},
"currencyCode": "",
"dateRanges": [
{}
],
"dimensionFilter": {
"andGroup": {
"expressions": []
},
"filter": {
"betweenFilter": {
"fromValue": {
"doubleValue": "",
"int64Value": ""
},
"toValue": {}
},
"fieldName": "",
"inListFilter": {
"caseSensitive": false,
"values": []
},
"numericFilter": {
"operation": "",
"value": {}
},
"stringFilter": {
"caseSensitive": false,
"matchType": "",
"value": ""
}
},
"notExpression": "",
"orGroup": {}
},
"dimensions": [
{
"dimensionExpression": {
"concatenate": {
"delimiter": "",
"dimensionNames": []
},
"lowerCase": {
"dimensionName": ""
},
"upperCase": {}
},
"name": ""
}
],
"keepEmptyRows": false,
"limit": "",
"metricAggregations": [],
"metricFilter": {},
"metrics": [
{
"expression": "",
"invisible": false,
"name": ""
}
],
"offset": "",
"orderBys": [
{
"desc": false,
"dimension": {
"dimensionName": "",
"orderType": ""
},
"metric": {
"metricName": ""
},
"pivot": {
"metricName": "",
"pivotSelections": [
{
"dimensionName": "",
"dimensionValue": ""
}
]
}
}
],
"property": "",
"returnPropertyQuota": false
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1beta/:property:runReport")
.setHeader("content-type", "application/json")
.setBody("{\n \"cohortSpec\": {\n \"cohortReportSettings\": {\n \"accumulate\": false\n },\n \"cohorts\": [\n {\n \"dateRange\": {\n \"endDate\": \"\",\n \"name\": \"\",\n \"startDate\": \"\"\n },\n \"dimension\": \"\",\n \"name\": \"\"\n }\n ],\n \"cohortsRange\": {\n \"endOffset\": 0,\n \"granularity\": \"\",\n \"startOffset\": 0\n }\n },\n \"currencyCode\": \"\",\n \"dateRanges\": [\n {}\n ],\n \"dimensionFilter\": {\n \"andGroup\": {\n \"expressions\": []\n },\n \"filter\": {\n \"betweenFilter\": {\n \"fromValue\": {\n \"doubleValue\": \"\",\n \"int64Value\": \"\"\n },\n \"toValue\": {}\n },\n \"fieldName\": \"\",\n \"inListFilter\": {\n \"caseSensitive\": false,\n \"values\": []\n },\n \"numericFilter\": {\n \"operation\": \"\",\n \"value\": {}\n },\n \"stringFilter\": {\n \"caseSensitive\": false,\n \"matchType\": \"\",\n \"value\": \"\"\n }\n },\n \"notExpression\": \"\",\n \"orGroup\": {}\n },\n \"dimensions\": [\n {\n \"dimensionExpression\": {\n \"concatenate\": {\n \"delimiter\": \"\",\n \"dimensionNames\": []\n },\n \"lowerCase\": {\n \"dimensionName\": \"\"\n },\n \"upperCase\": {}\n },\n \"name\": \"\"\n }\n ],\n \"keepEmptyRows\": false,\n \"limit\": \"\",\n \"metricAggregations\": [],\n \"metricFilter\": {},\n \"metrics\": [\n {\n \"expression\": \"\",\n \"invisible\": false,\n \"name\": \"\"\n }\n ],\n \"offset\": \"\",\n \"orderBys\": [\n {\n \"desc\": false,\n \"dimension\": {\n \"dimensionName\": \"\",\n \"orderType\": \"\"\n },\n \"metric\": {\n \"metricName\": \"\"\n },\n \"pivot\": {\n \"metricName\": \"\",\n \"pivotSelections\": [\n {\n \"dimensionName\": \"\",\n \"dimensionValue\": \"\"\n }\n ]\n }\n }\n ],\n \"property\": \"\",\n \"returnPropertyQuota\": false\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1beta/:property:runReport"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"cohortSpec\": {\n \"cohortReportSettings\": {\n \"accumulate\": false\n },\n \"cohorts\": [\n {\n \"dateRange\": {\n \"endDate\": \"\",\n \"name\": \"\",\n \"startDate\": \"\"\n },\n \"dimension\": \"\",\n \"name\": \"\"\n }\n ],\n \"cohortsRange\": {\n \"endOffset\": 0,\n \"granularity\": \"\",\n \"startOffset\": 0\n }\n },\n \"currencyCode\": \"\",\n \"dateRanges\": [\n {}\n ],\n \"dimensionFilter\": {\n \"andGroup\": {\n \"expressions\": []\n },\n \"filter\": {\n \"betweenFilter\": {\n \"fromValue\": {\n \"doubleValue\": \"\",\n \"int64Value\": \"\"\n },\n \"toValue\": {}\n },\n \"fieldName\": \"\",\n \"inListFilter\": {\n \"caseSensitive\": false,\n \"values\": []\n },\n \"numericFilter\": {\n \"operation\": \"\",\n \"value\": {}\n },\n \"stringFilter\": {\n \"caseSensitive\": false,\n \"matchType\": \"\",\n \"value\": \"\"\n }\n },\n \"notExpression\": \"\",\n \"orGroup\": {}\n },\n \"dimensions\": [\n {\n \"dimensionExpression\": {\n \"concatenate\": {\n \"delimiter\": \"\",\n \"dimensionNames\": []\n },\n \"lowerCase\": {\n \"dimensionName\": \"\"\n },\n \"upperCase\": {}\n },\n \"name\": \"\"\n }\n ],\n \"keepEmptyRows\": false,\n \"limit\": \"\",\n \"metricAggregations\": [],\n \"metricFilter\": {},\n \"metrics\": [\n {\n \"expression\": \"\",\n \"invisible\": false,\n \"name\": \"\"\n }\n ],\n \"offset\": \"\",\n \"orderBys\": [\n {\n \"desc\": false,\n \"dimension\": {\n \"dimensionName\": \"\",\n \"orderType\": \"\"\n },\n \"metric\": {\n \"metricName\": \"\"\n },\n \"pivot\": {\n \"metricName\": \"\",\n \"pivotSelections\": [\n {\n \"dimensionName\": \"\",\n \"dimensionValue\": \"\"\n }\n ]\n }\n }\n ],\n \"property\": \"\",\n \"returnPropertyQuota\": 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 \"cohortSpec\": {\n \"cohortReportSettings\": {\n \"accumulate\": false\n },\n \"cohorts\": [\n {\n \"dateRange\": {\n \"endDate\": \"\",\n \"name\": \"\",\n \"startDate\": \"\"\n },\n \"dimension\": \"\",\n \"name\": \"\"\n }\n ],\n \"cohortsRange\": {\n \"endOffset\": 0,\n \"granularity\": \"\",\n \"startOffset\": 0\n }\n },\n \"currencyCode\": \"\",\n \"dateRanges\": [\n {}\n ],\n \"dimensionFilter\": {\n \"andGroup\": {\n \"expressions\": []\n },\n \"filter\": {\n \"betweenFilter\": {\n \"fromValue\": {\n \"doubleValue\": \"\",\n \"int64Value\": \"\"\n },\n \"toValue\": {}\n },\n \"fieldName\": \"\",\n \"inListFilter\": {\n \"caseSensitive\": false,\n \"values\": []\n },\n \"numericFilter\": {\n \"operation\": \"\",\n \"value\": {}\n },\n \"stringFilter\": {\n \"caseSensitive\": false,\n \"matchType\": \"\",\n \"value\": \"\"\n }\n },\n \"notExpression\": \"\",\n \"orGroup\": {}\n },\n \"dimensions\": [\n {\n \"dimensionExpression\": {\n \"concatenate\": {\n \"delimiter\": \"\",\n \"dimensionNames\": []\n },\n \"lowerCase\": {\n \"dimensionName\": \"\"\n },\n \"upperCase\": {}\n },\n \"name\": \"\"\n }\n ],\n \"keepEmptyRows\": false,\n \"limit\": \"\",\n \"metricAggregations\": [],\n \"metricFilter\": {},\n \"metrics\": [\n {\n \"expression\": \"\",\n \"invisible\": false,\n \"name\": \"\"\n }\n ],\n \"offset\": \"\",\n \"orderBys\": [\n {\n \"desc\": false,\n \"dimension\": {\n \"dimensionName\": \"\",\n \"orderType\": \"\"\n },\n \"metric\": {\n \"metricName\": \"\"\n },\n \"pivot\": {\n \"metricName\": \"\",\n \"pivotSelections\": [\n {\n \"dimensionName\": \"\",\n \"dimensionValue\": \"\"\n }\n ]\n }\n }\n ],\n \"property\": \"\",\n \"returnPropertyQuota\": false\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1beta/:property:runReport")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1beta/:property:runReport")
.header("content-type", "application/json")
.body("{\n \"cohortSpec\": {\n \"cohortReportSettings\": {\n \"accumulate\": false\n },\n \"cohorts\": [\n {\n \"dateRange\": {\n \"endDate\": \"\",\n \"name\": \"\",\n \"startDate\": \"\"\n },\n \"dimension\": \"\",\n \"name\": \"\"\n }\n ],\n \"cohortsRange\": {\n \"endOffset\": 0,\n \"granularity\": \"\",\n \"startOffset\": 0\n }\n },\n \"currencyCode\": \"\",\n \"dateRanges\": [\n {}\n ],\n \"dimensionFilter\": {\n \"andGroup\": {\n \"expressions\": []\n },\n \"filter\": {\n \"betweenFilter\": {\n \"fromValue\": {\n \"doubleValue\": \"\",\n \"int64Value\": \"\"\n },\n \"toValue\": {}\n },\n \"fieldName\": \"\",\n \"inListFilter\": {\n \"caseSensitive\": false,\n \"values\": []\n },\n \"numericFilter\": {\n \"operation\": \"\",\n \"value\": {}\n },\n \"stringFilter\": {\n \"caseSensitive\": false,\n \"matchType\": \"\",\n \"value\": \"\"\n }\n },\n \"notExpression\": \"\",\n \"orGroup\": {}\n },\n \"dimensions\": [\n {\n \"dimensionExpression\": {\n \"concatenate\": {\n \"delimiter\": \"\",\n \"dimensionNames\": []\n },\n \"lowerCase\": {\n \"dimensionName\": \"\"\n },\n \"upperCase\": {}\n },\n \"name\": \"\"\n }\n ],\n \"keepEmptyRows\": false,\n \"limit\": \"\",\n \"metricAggregations\": [],\n \"metricFilter\": {},\n \"metrics\": [\n {\n \"expression\": \"\",\n \"invisible\": false,\n \"name\": \"\"\n }\n ],\n \"offset\": \"\",\n \"orderBys\": [\n {\n \"desc\": false,\n \"dimension\": {\n \"dimensionName\": \"\",\n \"orderType\": \"\"\n },\n \"metric\": {\n \"metricName\": \"\"\n },\n \"pivot\": {\n \"metricName\": \"\",\n \"pivotSelections\": [\n {\n \"dimensionName\": \"\",\n \"dimensionValue\": \"\"\n }\n ]\n }\n }\n ],\n \"property\": \"\",\n \"returnPropertyQuota\": false\n}")
.asString();
const data = JSON.stringify({
cohortSpec: {
cohortReportSettings: {
accumulate: false
},
cohorts: [
{
dateRange: {
endDate: '',
name: '',
startDate: ''
},
dimension: '',
name: ''
}
],
cohortsRange: {
endOffset: 0,
granularity: '',
startOffset: 0
}
},
currencyCode: '',
dateRanges: [
{}
],
dimensionFilter: {
andGroup: {
expressions: []
},
filter: {
betweenFilter: {
fromValue: {
doubleValue: '',
int64Value: ''
},
toValue: {}
},
fieldName: '',
inListFilter: {
caseSensitive: false,
values: []
},
numericFilter: {
operation: '',
value: {}
},
stringFilter: {
caseSensitive: false,
matchType: '',
value: ''
}
},
notExpression: '',
orGroup: {}
},
dimensions: [
{
dimensionExpression: {
concatenate: {
delimiter: '',
dimensionNames: []
},
lowerCase: {
dimensionName: ''
},
upperCase: {}
},
name: ''
}
],
keepEmptyRows: false,
limit: '',
metricAggregations: [],
metricFilter: {},
metrics: [
{
expression: '',
invisible: false,
name: ''
}
],
offset: '',
orderBys: [
{
desc: false,
dimension: {
dimensionName: '',
orderType: ''
},
metric: {
metricName: ''
},
pivot: {
metricName: '',
pivotSelections: [
{
dimensionName: '',
dimensionValue: ''
}
]
}
}
],
property: '',
returnPropertyQuota: false
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v1beta/:property:runReport');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1beta/:property:runReport',
headers: {'content-type': 'application/json'},
data: {
cohortSpec: {
cohortReportSettings: {accumulate: false},
cohorts: [{dateRange: {endDate: '', name: '', startDate: ''}, dimension: '', name: ''}],
cohortsRange: {endOffset: 0, granularity: '', startOffset: 0}
},
currencyCode: '',
dateRanges: [{}],
dimensionFilter: {
andGroup: {expressions: []},
filter: {
betweenFilter: {fromValue: {doubleValue: '', int64Value: ''}, toValue: {}},
fieldName: '',
inListFilter: {caseSensitive: false, values: []},
numericFilter: {operation: '', value: {}},
stringFilter: {caseSensitive: false, matchType: '', value: ''}
},
notExpression: '',
orGroup: {}
},
dimensions: [
{
dimensionExpression: {
concatenate: {delimiter: '', dimensionNames: []},
lowerCase: {dimensionName: ''},
upperCase: {}
},
name: ''
}
],
keepEmptyRows: false,
limit: '',
metricAggregations: [],
metricFilter: {},
metrics: [{expression: '', invisible: false, name: ''}],
offset: '',
orderBys: [
{
desc: false,
dimension: {dimensionName: '', orderType: ''},
metric: {metricName: ''},
pivot: {metricName: '', pivotSelections: [{dimensionName: '', dimensionValue: ''}]}
}
],
property: '',
returnPropertyQuota: false
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1beta/:property:runReport';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"cohortSpec":{"cohortReportSettings":{"accumulate":false},"cohorts":[{"dateRange":{"endDate":"","name":"","startDate":""},"dimension":"","name":""}],"cohortsRange":{"endOffset":0,"granularity":"","startOffset":0}},"currencyCode":"","dateRanges":[{}],"dimensionFilter":{"andGroup":{"expressions":[]},"filter":{"betweenFilter":{"fromValue":{"doubleValue":"","int64Value":""},"toValue":{}},"fieldName":"","inListFilter":{"caseSensitive":false,"values":[]},"numericFilter":{"operation":"","value":{}},"stringFilter":{"caseSensitive":false,"matchType":"","value":""}},"notExpression":"","orGroup":{}},"dimensions":[{"dimensionExpression":{"concatenate":{"delimiter":"","dimensionNames":[]},"lowerCase":{"dimensionName":""},"upperCase":{}},"name":""}],"keepEmptyRows":false,"limit":"","metricAggregations":[],"metricFilter":{},"metrics":[{"expression":"","invisible":false,"name":""}],"offset":"","orderBys":[{"desc":false,"dimension":{"dimensionName":"","orderType":""},"metric":{"metricName":""},"pivot":{"metricName":"","pivotSelections":[{"dimensionName":"","dimensionValue":""}]}}],"property":"","returnPropertyQuota":false}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1beta/:property:runReport',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "cohortSpec": {\n "cohortReportSettings": {\n "accumulate": false\n },\n "cohorts": [\n {\n "dateRange": {\n "endDate": "",\n "name": "",\n "startDate": ""\n },\n "dimension": "",\n "name": ""\n }\n ],\n "cohortsRange": {\n "endOffset": 0,\n "granularity": "",\n "startOffset": 0\n }\n },\n "currencyCode": "",\n "dateRanges": [\n {}\n ],\n "dimensionFilter": {\n "andGroup": {\n "expressions": []\n },\n "filter": {\n "betweenFilter": {\n "fromValue": {\n "doubleValue": "",\n "int64Value": ""\n },\n "toValue": {}\n },\n "fieldName": "",\n "inListFilter": {\n "caseSensitive": false,\n "values": []\n },\n "numericFilter": {\n "operation": "",\n "value": {}\n },\n "stringFilter": {\n "caseSensitive": false,\n "matchType": "",\n "value": ""\n }\n },\n "notExpression": "",\n "orGroup": {}\n },\n "dimensions": [\n {\n "dimensionExpression": {\n "concatenate": {\n "delimiter": "",\n "dimensionNames": []\n },\n "lowerCase": {\n "dimensionName": ""\n },\n "upperCase": {}\n },\n "name": ""\n }\n ],\n "keepEmptyRows": false,\n "limit": "",\n "metricAggregations": [],\n "metricFilter": {},\n "metrics": [\n {\n "expression": "",\n "invisible": false,\n "name": ""\n }\n ],\n "offset": "",\n "orderBys": [\n {\n "desc": false,\n "dimension": {\n "dimensionName": "",\n "orderType": ""\n },\n "metric": {\n "metricName": ""\n },\n "pivot": {\n "metricName": "",\n "pivotSelections": [\n {\n "dimensionName": "",\n "dimensionValue": ""\n }\n ]\n }\n }\n ],\n "property": "",\n "returnPropertyQuota": 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 \"cohortSpec\": {\n \"cohortReportSettings\": {\n \"accumulate\": false\n },\n \"cohorts\": [\n {\n \"dateRange\": {\n \"endDate\": \"\",\n \"name\": \"\",\n \"startDate\": \"\"\n },\n \"dimension\": \"\",\n \"name\": \"\"\n }\n ],\n \"cohortsRange\": {\n \"endOffset\": 0,\n \"granularity\": \"\",\n \"startOffset\": 0\n }\n },\n \"currencyCode\": \"\",\n \"dateRanges\": [\n {}\n ],\n \"dimensionFilter\": {\n \"andGroup\": {\n \"expressions\": []\n },\n \"filter\": {\n \"betweenFilter\": {\n \"fromValue\": {\n \"doubleValue\": \"\",\n \"int64Value\": \"\"\n },\n \"toValue\": {}\n },\n \"fieldName\": \"\",\n \"inListFilter\": {\n \"caseSensitive\": false,\n \"values\": []\n },\n \"numericFilter\": {\n \"operation\": \"\",\n \"value\": {}\n },\n \"stringFilter\": {\n \"caseSensitive\": false,\n \"matchType\": \"\",\n \"value\": \"\"\n }\n },\n \"notExpression\": \"\",\n \"orGroup\": {}\n },\n \"dimensions\": [\n {\n \"dimensionExpression\": {\n \"concatenate\": {\n \"delimiter\": \"\",\n \"dimensionNames\": []\n },\n \"lowerCase\": {\n \"dimensionName\": \"\"\n },\n \"upperCase\": {}\n },\n \"name\": \"\"\n }\n ],\n \"keepEmptyRows\": false,\n \"limit\": \"\",\n \"metricAggregations\": [],\n \"metricFilter\": {},\n \"metrics\": [\n {\n \"expression\": \"\",\n \"invisible\": false,\n \"name\": \"\"\n }\n ],\n \"offset\": \"\",\n \"orderBys\": [\n {\n \"desc\": false,\n \"dimension\": {\n \"dimensionName\": \"\",\n \"orderType\": \"\"\n },\n \"metric\": {\n \"metricName\": \"\"\n },\n \"pivot\": {\n \"metricName\": \"\",\n \"pivotSelections\": [\n {\n \"dimensionName\": \"\",\n \"dimensionValue\": \"\"\n }\n ]\n }\n }\n ],\n \"property\": \"\",\n \"returnPropertyQuota\": false\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1beta/:property:runReport")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1beta/:property:runReport',
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({
cohortSpec: {
cohortReportSettings: {accumulate: false},
cohorts: [{dateRange: {endDate: '', name: '', startDate: ''}, dimension: '', name: ''}],
cohortsRange: {endOffset: 0, granularity: '', startOffset: 0}
},
currencyCode: '',
dateRanges: [{}],
dimensionFilter: {
andGroup: {expressions: []},
filter: {
betweenFilter: {fromValue: {doubleValue: '', int64Value: ''}, toValue: {}},
fieldName: '',
inListFilter: {caseSensitive: false, values: []},
numericFilter: {operation: '', value: {}},
stringFilter: {caseSensitive: false, matchType: '', value: ''}
},
notExpression: '',
orGroup: {}
},
dimensions: [
{
dimensionExpression: {
concatenate: {delimiter: '', dimensionNames: []},
lowerCase: {dimensionName: ''},
upperCase: {}
},
name: ''
}
],
keepEmptyRows: false,
limit: '',
metricAggregations: [],
metricFilter: {},
metrics: [{expression: '', invisible: false, name: ''}],
offset: '',
orderBys: [
{
desc: false,
dimension: {dimensionName: '', orderType: ''},
metric: {metricName: ''},
pivot: {metricName: '', pivotSelections: [{dimensionName: '', dimensionValue: ''}]}
}
],
property: '',
returnPropertyQuota: false
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1beta/:property:runReport',
headers: {'content-type': 'application/json'},
body: {
cohortSpec: {
cohortReportSettings: {accumulate: false},
cohorts: [{dateRange: {endDate: '', name: '', startDate: ''}, dimension: '', name: ''}],
cohortsRange: {endOffset: 0, granularity: '', startOffset: 0}
},
currencyCode: '',
dateRanges: [{}],
dimensionFilter: {
andGroup: {expressions: []},
filter: {
betweenFilter: {fromValue: {doubleValue: '', int64Value: ''}, toValue: {}},
fieldName: '',
inListFilter: {caseSensitive: false, values: []},
numericFilter: {operation: '', value: {}},
stringFilter: {caseSensitive: false, matchType: '', value: ''}
},
notExpression: '',
orGroup: {}
},
dimensions: [
{
dimensionExpression: {
concatenate: {delimiter: '', dimensionNames: []},
lowerCase: {dimensionName: ''},
upperCase: {}
},
name: ''
}
],
keepEmptyRows: false,
limit: '',
metricAggregations: [],
metricFilter: {},
metrics: [{expression: '', invisible: false, name: ''}],
offset: '',
orderBys: [
{
desc: false,
dimension: {dimensionName: '', orderType: ''},
metric: {metricName: ''},
pivot: {metricName: '', pivotSelections: [{dimensionName: '', dimensionValue: ''}]}
}
],
property: '',
returnPropertyQuota: false
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/v1beta/:property:runReport');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
cohortSpec: {
cohortReportSettings: {
accumulate: false
},
cohorts: [
{
dateRange: {
endDate: '',
name: '',
startDate: ''
},
dimension: '',
name: ''
}
],
cohortsRange: {
endOffset: 0,
granularity: '',
startOffset: 0
}
},
currencyCode: '',
dateRanges: [
{}
],
dimensionFilter: {
andGroup: {
expressions: []
},
filter: {
betweenFilter: {
fromValue: {
doubleValue: '',
int64Value: ''
},
toValue: {}
},
fieldName: '',
inListFilter: {
caseSensitive: false,
values: []
},
numericFilter: {
operation: '',
value: {}
},
stringFilter: {
caseSensitive: false,
matchType: '',
value: ''
}
},
notExpression: '',
orGroup: {}
},
dimensions: [
{
dimensionExpression: {
concatenate: {
delimiter: '',
dimensionNames: []
},
lowerCase: {
dimensionName: ''
},
upperCase: {}
},
name: ''
}
],
keepEmptyRows: false,
limit: '',
metricAggregations: [],
metricFilter: {},
metrics: [
{
expression: '',
invisible: false,
name: ''
}
],
offset: '',
orderBys: [
{
desc: false,
dimension: {
dimensionName: '',
orderType: ''
},
metric: {
metricName: ''
},
pivot: {
metricName: '',
pivotSelections: [
{
dimensionName: '',
dimensionValue: ''
}
]
}
}
],
property: '',
returnPropertyQuota: false
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/v1beta/:property:runReport',
headers: {'content-type': 'application/json'},
data: {
cohortSpec: {
cohortReportSettings: {accumulate: false},
cohorts: [{dateRange: {endDate: '', name: '', startDate: ''}, dimension: '', name: ''}],
cohortsRange: {endOffset: 0, granularity: '', startOffset: 0}
},
currencyCode: '',
dateRanges: [{}],
dimensionFilter: {
andGroup: {expressions: []},
filter: {
betweenFilter: {fromValue: {doubleValue: '', int64Value: ''}, toValue: {}},
fieldName: '',
inListFilter: {caseSensitive: false, values: []},
numericFilter: {operation: '', value: {}},
stringFilter: {caseSensitive: false, matchType: '', value: ''}
},
notExpression: '',
orGroup: {}
},
dimensions: [
{
dimensionExpression: {
concatenate: {delimiter: '', dimensionNames: []},
lowerCase: {dimensionName: ''},
upperCase: {}
},
name: ''
}
],
keepEmptyRows: false,
limit: '',
metricAggregations: [],
metricFilter: {},
metrics: [{expression: '', invisible: false, name: ''}],
offset: '',
orderBys: [
{
desc: false,
dimension: {dimensionName: '', orderType: ''},
metric: {metricName: ''},
pivot: {metricName: '', pivotSelections: [{dimensionName: '', dimensionValue: ''}]}
}
],
property: '',
returnPropertyQuota: false
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1beta/:property:runReport';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"cohortSpec":{"cohortReportSettings":{"accumulate":false},"cohorts":[{"dateRange":{"endDate":"","name":"","startDate":""},"dimension":"","name":""}],"cohortsRange":{"endOffset":0,"granularity":"","startOffset":0}},"currencyCode":"","dateRanges":[{}],"dimensionFilter":{"andGroup":{"expressions":[]},"filter":{"betweenFilter":{"fromValue":{"doubleValue":"","int64Value":""},"toValue":{}},"fieldName":"","inListFilter":{"caseSensitive":false,"values":[]},"numericFilter":{"operation":"","value":{}},"stringFilter":{"caseSensitive":false,"matchType":"","value":""}},"notExpression":"","orGroup":{}},"dimensions":[{"dimensionExpression":{"concatenate":{"delimiter":"","dimensionNames":[]},"lowerCase":{"dimensionName":""},"upperCase":{}},"name":""}],"keepEmptyRows":false,"limit":"","metricAggregations":[],"metricFilter":{},"metrics":[{"expression":"","invisible":false,"name":""}],"offset":"","orderBys":[{"desc":false,"dimension":{"dimensionName":"","orderType":""},"metric":{"metricName":""},"pivot":{"metricName":"","pivotSelections":[{"dimensionName":"","dimensionValue":""}]}}],"property":"","returnPropertyQuota":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 = @{ @"cohortSpec": @{ @"cohortReportSettings": @{ @"accumulate": @NO }, @"cohorts": @[ @{ @"dateRange": @{ @"endDate": @"", @"name": @"", @"startDate": @"" }, @"dimension": @"", @"name": @"" } ], @"cohortsRange": @{ @"endOffset": @0, @"granularity": @"", @"startOffset": @0 } },
@"currencyCode": @"",
@"dateRanges": @[ @{ } ],
@"dimensionFilter": @{ @"andGroup": @{ @"expressions": @[ ] }, @"filter": @{ @"betweenFilter": @{ @"fromValue": @{ @"doubleValue": @"", @"int64Value": @"" }, @"toValue": @{ } }, @"fieldName": @"", @"inListFilter": @{ @"caseSensitive": @NO, @"values": @[ ] }, @"numericFilter": @{ @"operation": @"", @"value": @{ } }, @"stringFilter": @{ @"caseSensitive": @NO, @"matchType": @"", @"value": @"" } }, @"notExpression": @"", @"orGroup": @{ } },
@"dimensions": @[ @{ @"dimensionExpression": @{ @"concatenate": @{ @"delimiter": @"", @"dimensionNames": @[ ] }, @"lowerCase": @{ @"dimensionName": @"" }, @"upperCase": @{ } }, @"name": @"" } ],
@"keepEmptyRows": @NO,
@"limit": @"",
@"metricAggregations": @[ ],
@"metricFilter": @{ },
@"metrics": @[ @{ @"expression": @"", @"invisible": @NO, @"name": @"" } ],
@"offset": @"",
@"orderBys": @[ @{ @"desc": @NO, @"dimension": @{ @"dimensionName": @"", @"orderType": @"" }, @"metric": @{ @"metricName": @"" }, @"pivot": @{ @"metricName": @"", @"pivotSelections": @[ @{ @"dimensionName": @"", @"dimensionValue": @"" } ] } } ],
@"property": @"",
@"returnPropertyQuota": @NO };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1beta/:property:runReport"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1beta/:property:runReport" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"cohortSpec\": {\n \"cohortReportSettings\": {\n \"accumulate\": false\n },\n \"cohorts\": [\n {\n \"dateRange\": {\n \"endDate\": \"\",\n \"name\": \"\",\n \"startDate\": \"\"\n },\n \"dimension\": \"\",\n \"name\": \"\"\n }\n ],\n \"cohortsRange\": {\n \"endOffset\": 0,\n \"granularity\": \"\",\n \"startOffset\": 0\n }\n },\n \"currencyCode\": \"\",\n \"dateRanges\": [\n {}\n ],\n \"dimensionFilter\": {\n \"andGroup\": {\n \"expressions\": []\n },\n \"filter\": {\n \"betweenFilter\": {\n \"fromValue\": {\n \"doubleValue\": \"\",\n \"int64Value\": \"\"\n },\n \"toValue\": {}\n },\n \"fieldName\": \"\",\n \"inListFilter\": {\n \"caseSensitive\": false,\n \"values\": []\n },\n \"numericFilter\": {\n \"operation\": \"\",\n \"value\": {}\n },\n \"stringFilter\": {\n \"caseSensitive\": false,\n \"matchType\": \"\",\n \"value\": \"\"\n }\n },\n \"notExpression\": \"\",\n \"orGroup\": {}\n },\n \"dimensions\": [\n {\n \"dimensionExpression\": {\n \"concatenate\": {\n \"delimiter\": \"\",\n \"dimensionNames\": []\n },\n \"lowerCase\": {\n \"dimensionName\": \"\"\n },\n \"upperCase\": {}\n },\n \"name\": \"\"\n }\n ],\n \"keepEmptyRows\": false,\n \"limit\": \"\",\n \"metricAggregations\": [],\n \"metricFilter\": {},\n \"metrics\": [\n {\n \"expression\": \"\",\n \"invisible\": false,\n \"name\": \"\"\n }\n ],\n \"offset\": \"\",\n \"orderBys\": [\n {\n \"desc\": false,\n \"dimension\": {\n \"dimensionName\": \"\",\n \"orderType\": \"\"\n },\n \"metric\": {\n \"metricName\": \"\"\n },\n \"pivot\": {\n \"metricName\": \"\",\n \"pivotSelections\": [\n {\n \"dimensionName\": \"\",\n \"dimensionValue\": \"\"\n }\n ]\n }\n }\n ],\n \"property\": \"\",\n \"returnPropertyQuota\": false\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1beta/:property:runReport",
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([
'cohortSpec' => [
'cohortReportSettings' => [
'accumulate' => null
],
'cohorts' => [
[
'dateRange' => [
'endDate' => '',
'name' => '',
'startDate' => ''
],
'dimension' => '',
'name' => ''
]
],
'cohortsRange' => [
'endOffset' => 0,
'granularity' => '',
'startOffset' => 0
]
],
'currencyCode' => '',
'dateRanges' => [
[
]
],
'dimensionFilter' => [
'andGroup' => [
'expressions' => [
]
],
'filter' => [
'betweenFilter' => [
'fromValue' => [
'doubleValue' => '',
'int64Value' => ''
],
'toValue' => [
]
],
'fieldName' => '',
'inListFilter' => [
'caseSensitive' => null,
'values' => [
]
],
'numericFilter' => [
'operation' => '',
'value' => [
]
],
'stringFilter' => [
'caseSensitive' => null,
'matchType' => '',
'value' => ''
]
],
'notExpression' => '',
'orGroup' => [
]
],
'dimensions' => [
[
'dimensionExpression' => [
'concatenate' => [
'delimiter' => '',
'dimensionNames' => [
]
],
'lowerCase' => [
'dimensionName' => ''
],
'upperCase' => [
]
],
'name' => ''
]
],
'keepEmptyRows' => null,
'limit' => '',
'metricAggregations' => [
],
'metricFilter' => [
],
'metrics' => [
[
'expression' => '',
'invisible' => null,
'name' => ''
]
],
'offset' => '',
'orderBys' => [
[
'desc' => null,
'dimension' => [
'dimensionName' => '',
'orderType' => ''
],
'metric' => [
'metricName' => ''
],
'pivot' => [
'metricName' => '',
'pivotSelections' => [
[
'dimensionName' => '',
'dimensionValue' => ''
]
]
]
]
],
'property' => '',
'returnPropertyQuota' => null
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/v1beta/:property:runReport', [
'body' => '{
"cohortSpec": {
"cohortReportSettings": {
"accumulate": false
},
"cohorts": [
{
"dateRange": {
"endDate": "",
"name": "",
"startDate": ""
},
"dimension": "",
"name": ""
}
],
"cohortsRange": {
"endOffset": 0,
"granularity": "",
"startOffset": 0
}
},
"currencyCode": "",
"dateRanges": [
{}
],
"dimensionFilter": {
"andGroup": {
"expressions": []
},
"filter": {
"betweenFilter": {
"fromValue": {
"doubleValue": "",
"int64Value": ""
},
"toValue": {}
},
"fieldName": "",
"inListFilter": {
"caseSensitive": false,
"values": []
},
"numericFilter": {
"operation": "",
"value": {}
},
"stringFilter": {
"caseSensitive": false,
"matchType": "",
"value": ""
}
},
"notExpression": "",
"orGroup": {}
},
"dimensions": [
{
"dimensionExpression": {
"concatenate": {
"delimiter": "",
"dimensionNames": []
},
"lowerCase": {
"dimensionName": ""
},
"upperCase": {}
},
"name": ""
}
],
"keepEmptyRows": false,
"limit": "",
"metricAggregations": [],
"metricFilter": {},
"metrics": [
{
"expression": "",
"invisible": false,
"name": ""
}
],
"offset": "",
"orderBys": [
{
"desc": false,
"dimension": {
"dimensionName": "",
"orderType": ""
},
"metric": {
"metricName": ""
},
"pivot": {
"metricName": "",
"pivotSelections": [
{
"dimensionName": "",
"dimensionValue": ""
}
]
}
}
],
"property": "",
"returnPropertyQuota": false
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1beta/:property:runReport');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'cohortSpec' => [
'cohortReportSettings' => [
'accumulate' => null
],
'cohorts' => [
[
'dateRange' => [
'endDate' => '',
'name' => '',
'startDate' => ''
],
'dimension' => '',
'name' => ''
]
],
'cohortsRange' => [
'endOffset' => 0,
'granularity' => '',
'startOffset' => 0
]
],
'currencyCode' => '',
'dateRanges' => [
[
]
],
'dimensionFilter' => [
'andGroup' => [
'expressions' => [
]
],
'filter' => [
'betweenFilter' => [
'fromValue' => [
'doubleValue' => '',
'int64Value' => ''
],
'toValue' => [
]
],
'fieldName' => '',
'inListFilter' => [
'caseSensitive' => null,
'values' => [
]
],
'numericFilter' => [
'operation' => '',
'value' => [
]
],
'stringFilter' => [
'caseSensitive' => null,
'matchType' => '',
'value' => ''
]
],
'notExpression' => '',
'orGroup' => [
]
],
'dimensions' => [
[
'dimensionExpression' => [
'concatenate' => [
'delimiter' => '',
'dimensionNames' => [
]
],
'lowerCase' => [
'dimensionName' => ''
],
'upperCase' => [
]
],
'name' => ''
]
],
'keepEmptyRows' => null,
'limit' => '',
'metricAggregations' => [
],
'metricFilter' => [
],
'metrics' => [
[
'expression' => '',
'invisible' => null,
'name' => ''
]
],
'offset' => '',
'orderBys' => [
[
'desc' => null,
'dimension' => [
'dimensionName' => '',
'orderType' => ''
],
'metric' => [
'metricName' => ''
],
'pivot' => [
'metricName' => '',
'pivotSelections' => [
[
'dimensionName' => '',
'dimensionValue' => ''
]
]
]
]
],
'property' => '',
'returnPropertyQuota' => null
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'cohortSpec' => [
'cohortReportSettings' => [
'accumulate' => null
],
'cohorts' => [
[
'dateRange' => [
'endDate' => '',
'name' => '',
'startDate' => ''
],
'dimension' => '',
'name' => ''
]
],
'cohortsRange' => [
'endOffset' => 0,
'granularity' => '',
'startOffset' => 0
]
],
'currencyCode' => '',
'dateRanges' => [
[
]
],
'dimensionFilter' => [
'andGroup' => [
'expressions' => [
]
],
'filter' => [
'betweenFilter' => [
'fromValue' => [
'doubleValue' => '',
'int64Value' => ''
],
'toValue' => [
]
],
'fieldName' => '',
'inListFilter' => [
'caseSensitive' => null,
'values' => [
]
],
'numericFilter' => [
'operation' => '',
'value' => [
]
],
'stringFilter' => [
'caseSensitive' => null,
'matchType' => '',
'value' => ''
]
],
'notExpression' => '',
'orGroup' => [
]
],
'dimensions' => [
[
'dimensionExpression' => [
'concatenate' => [
'delimiter' => '',
'dimensionNames' => [
]
],
'lowerCase' => [
'dimensionName' => ''
],
'upperCase' => [
]
],
'name' => ''
]
],
'keepEmptyRows' => null,
'limit' => '',
'metricAggregations' => [
],
'metricFilter' => [
],
'metrics' => [
[
'expression' => '',
'invisible' => null,
'name' => ''
]
],
'offset' => '',
'orderBys' => [
[
'desc' => null,
'dimension' => [
'dimensionName' => '',
'orderType' => ''
],
'metric' => [
'metricName' => ''
],
'pivot' => [
'metricName' => '',
'pivotSelections' => [
[
'dimensionName' => '',
'dimensionValue' => ''
]
]
]
]
],
'property' => '',
'returnPropertyQuota' => null
]));
$request->setRequestUrl('{{baseUrl}}/v1beta/:property:runReport');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1beta/:property:runReport' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"cohortSpec": {
"cohortReportSettings": {
"accumulate": false
},
"cohorts": [
{
"dateRange": {
"endDate": "",
"name": "",
"startDate": ""
},
"dimension": "",
"name": ""
}
],
"cohortsRange": {
"endOffset": 0,
"granularity": "",
"startOffset": 0
}
},
"currencyCode": "",
"dateRanges": [
{}
],
"dimensionFilter": {
"andGroup": {
"expressions": []
},
"filter": {
"betweenFilter": {
"fromValue": {
"doubleValue": "",
"int64Value": ""
},
"toValue": {}
},
"fieldName": "",
"inListFilter": {
"caseSensitive": false,
"values": []
},
"numericFilter": {
"operation": "",
"value": {}
},
"stringFilter": {
"caseSensitive": false,
"matchType": "",
"value": ""
}
},
"notExpression": "",
"orGroup": {}
},
"dimensions": [
{
"dimensionExpression": {
"concatenate": {
"delimiter": "",
"dimensionNames": []
},
"lowerCase": {
"dimensionName": ""
},
"upperCase": {}
},
"name": ""
}
],
"keepEmptyRows": false,
"limit": "",
"metricAggregations": [],
"metricFilter": {},
"metrics": [
{
"expression": "",
"invisible": false,
"name": ""
}
],
"offset": "",
"orderBys": [
{
"desc": false,
"dimension": {
"dimensionName": "",
"orderType": ""
},
"metric": {
"metricName": ""
},
"pivot": {
"metricName": "",
"pivotSelections": [
{
"dimensionName": "",
"dimensionValue": ""
}
]
}
}
],
"property": "",
"returnPropertyQuota": false
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1beta/:property:runReport' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"cohortSpec": {
"cohortReportSettings": {
"accumulate": false
},
"cohorts": [
{
"dateRange": {
"endDate": "",
"name": "",
"startDate": ""
},
"dimension": "",
"name": ""
}
],
"cohortsRange": {
"endOffset": 0,
"granularity": "",
"startOffset": 0
}
},
"currencyCode": "",
"dateRanges": [
{}
],
"dimensionFilter": {
"andGroup": {
"expressions": []
},
"filter": {
"betweenFilter": {
"fromValue": {
"doubleValue": "",
"int64Value": ""
},
"toValue": {}
},
"fieldName": "",
"inListFilter": {
"caseSensitive": false,
"values": []
},
"numericFilter": {
"operation": "",
"value": {}
},
"stringFilter": {
"caseSensitive": false,
"matchType": "",
"value": ""
}
},
"notExpression": "",
"orGroup": {}
},
"dimensions": [
{
"dimensionExpression": {
"concatenate": {
"delimiter": "",
"dimensionNames": []
},
"lowerCase": {
"dimensionName": ""
},
"upperCase": {}
},
"name": ""
}
],
"keepEmptyRows": false,
"limit": "",
"metricAggregations": [],
"metricFilter": {},
"metrics": [
{
"expression": "",
"invisible": false,
"name": ""
}
],
"offset": "",
"orderBys": [
{
"desc": false,
"dimension": {
"dimensionName": "",
"orderType": ""
},
"metric": {
"metricName": ""
},
"pivot": {
"metricName": "",
"pivotSelections": [
{
"dimensionName": "",
"dimensionValue": ""
}
]
}
}
],
"property": "",
"returnPropertyQuota": false
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"cohortSpec\": {\n \"cohortReportSettings\": {\n \"accumulate\": false\n },\n \"cohorts\": [\n {\n \"dateRange\": {\n \"endDate\": \"\",\n \"name\": \"\",\n \"startDate\": \"\"\n },\n \"dimension\": \"\",\n \"name\": \"\"\n }\n ],\n \"cohortsRange\": {\n \"endOffset\": 0,\n \"granularity\": \"\",\n \"startOffset\": 0\n }\n },\n \"currencyCode\": \"\",\n \"dateRanges\": [\n {}\n ],\n \"dimensionFilter\": {\n \"andGroup\": {\n \"expressions\": []\n },\n \"filter\": {\n \"betweenFilter\": {\n \"fromValue\": {\n \"doubleValue\": \"\",\n \"int64Value\": \"\"\n },\n \"toValue\": {}\n },\n \"fieldName\": \"\",\n \"inListFilter\": {\n \"caseSensitive\": false,\n \"values\": []\n },\n \"numericFilter\": {\n \"operation\": \"\",\n \"value\": {}\n },\n \"stringFilter\": {\n \"caseSensitive\": false,\n \"matchType\": \"\",\n \"value\": \"\"\n }\n },\n \"notExpression\": \"\",\n \"orGroup\": {}\n },\n \"dimensions\": [\n {\n \"dimensionExpression\": {\n \"concatenate\": {\n \"delimiter\": \"\",\n \"dimensionNames\": []\n },\n \"lowerCase\": {\n \"dimensionName\": \"\"\n },\n \"upperCase\": {}\n },\n \"name\": \"\"\n }\n ],\n \"keepEmptyRows\": false,\n \"limit\": \"\",\n \"metricAggregations\": [],\n \"metricFilter\": {},\n \"metrics\": [\n {\n \"expression\": \"\",\n \"invisible\": false,\n \"name\": \"\"\n }\n ],\n \"offset\": \"\",\n \"orderBys\": [\n {\n \"desc\": false,\n \"dimension\": {\n \"dimensionName\": \"\",\n \"orderType\": \"\"\n },\n \"metric\": {\n \"metricName\": \"\"\n },\n \"pivot\": {\n \"metricName\": \"\",\n \"pivotSelections\": [\n {\n \"dimensionName\": \"\",\n \"dimensionValue\": \"\"\n }\n ]\n }\n }\n ],\n \"property\": \"\",\n \"returnPropertyQuota\": false\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1beta/:property:runReport", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1beta/:property:runReport"
payload = {
"cohortSpec": {
"cohortReportSettings": { "accumulate": False },
"cohorts": [
{
"dateRange": {
"endDate": "",
"name": "",
"startDate": ""
},
"dimension": "",
"name": ""
}
],
"cohortsRange": {
"endOffset": 0,
"granularity": "",
"startOffset": 0
}
},
"currencyCode": "",
"dateRanges": [{}],
"dimensionFilter": {
"andGroup": { "expressions": [] },
"filter": {
"betweenFilter": {
"fromValue": {
"doubleValue": "",
"int64Value": ""
},
"toValue": {}
},
"fieldName": "",
"inListFilter": {
"caseSensitive": False,
"values": []
},
"numericFilter": {
"operation": "",
"value": {}
},
"stringFilter": {
"caseSensitive": False,
"matchType": "",
"value": ""
}
},
"notExpression": "",
"orGroup": {}
},
"dimensions": [
{
"dimensionExpression": {
"concatenate": {
"delimiter": "",
"dimensionNames": []
},
"lowerCase": { "dimensionName": "" },
"upperCase": {}
},
"name": ""
}
],
"keepEmptyRows": False,
"limit": "",
"metricAggregations": [],
"metricFilter": {},
"metrics": [
{
"expression": "",
"invisible": False,
"name": ""
}
],
"offset": "",
"orderBys": [
{
"desc": False,
"dimension": {
"dimensionName": "",
"orderType": ""
},
"metric": { "metricName": "" },
"pivot": {
"metricName": "",
"pivotSelections": [
{
"dimensionName": "",
"dimensionValue": ""
}
]
}
}
],
"property": "",
"returnPropertyQuota": False
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1beta/:property:runReport"
payload <- "{\n \"cohortSpec\": {\n \"cohortReportSettings\": {\n \"accumulate\": false\n },\n \"cohorts\": [\n {\n \"dateRange\": {\n \"endDate\": \"\",\n \"name\": \"\",\n \"startDate\": \"\"\n },\n \"dimension\": \"\",\n \"name\": \"\"\n }\n ],\n \"cohortsRange\": {\n \"endOffset\": 0,\n \"granularity\": \"\",\n \"startOffset\": 0\n }\n },\n \"currencyCode\": \"\",\n \"dateRanges\": [\n {}\n ],\n \"dimensionFilter\": {\n \"andGroup\": {\n \"expressions\": []\n },\n \"filter\": {\n \"betweenFilter\": {\n \"fromValue\": {\n \"doubleValue\": \"\",\n \"int64Value\": \"\"\n },\n \"toValue\": {}\n },\n \"fieldName\": \"\",\n \"inListFilter\": {\n \"caseSensitive\": false,\n \"values\": []\n },\n \"numericFilter\": {\n \"operation\": \"\",\n \"value\": {}\n },\n \"stringFilter\": {\n \"caseSensitive\": false,\n \"matchType\": \"\",\n \"value\": \"\"\n }\n },\n \"notExpression\": \"\",\n \"orGroup\": {}\n },\n \"dimensions\": [\n {\n \"dimensionExpression\": {\n \"concatenate\": {\n \"delimiter\": \"\",\n \"dimensionNames\": []\n },\n \"lowerCase\": {\n \"dimensionName\": \"\"\n },\n \"upperCase\": {}\n },\n \"name\": \"\"\n }\n ],\n \"keepEmptyRows\": false,\n \"limit\": \"\",\n \"metricAggregations\": [],\n \"metricFilter\": {},\n \"metrics\": [\n {\n \"expression\": \"\",\n \"invisible\": false,\n \"name\": \"\"\n }\n ],\n \"offset\": \"\",\n \"orderBys\": [\n {\n \"desc\": false,\n \"dimension\": {\n \"dimensionName\": \"\",\n \"orderType\": \"\"\n },\n \"metric\": {\n \"metricName\": \"\"\n },\n \"pivot\": {\n \"metricName\": \"\",\n \"pivotSelections\": [\n {\n \"dimensionName\": \"\",\n \"dimensionValue\": \"\"\n }\n ]\n }\n }\n ],\n \"property\": \"\",\n \"returnPropertyQuota\": false\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1beta/:property:runReport")
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 \"cohortSpec\": {\n \"cohortReportSettings\": {\n \"accumulate\": false\n },\n \"cohorts\": [\n {\n \"dateRange\": {\n \"endDate\": \"\",\n \"name\": \"\",\n \"startDate\": \"\"\n },\n \"dimension\": \"\",\n \"name\": \"\"\n }\n ],\n \"cohortsRange\": {\n \"endOffset\": 0,\n \"granularity\": \"\",\n \"startOffset\": 0\n }\n },\n \"currencyCode\": \"\",\n \"dateRanges\": [\n {}\n ],\n \"dimensionFilter\": {\n \"andGroup\": {\n \"expressions\": []\n },\n \"filter\": {\n \"betweenFilter\": {\n \"fromValue\": {\n \"doubleValue\": \"\",\n \"int64Value\": \"\"\n },\n \"toValue\": {}\n },\n \"fieldName\": \"\",\n \"inListFilter\": {\n \"caseSensitive\": false,\n \"values\": []\n },\n \"numericFilter\": {\n \"operation\": \"\",\n \"value\": {}\n },\n \"stringFilter\": {\n \"caseSensitive\": false,\n \"matchType\": \"\",\n \"value\": \"\"\n }\n },\n \"notExpression\": \"\",\n \"orGroup\": {}\n },\n \"dimensions\": [\n {\n \"dimensionExpression\": {\n \"concatenate\": {\n \"delimiter\": \"\",\n \"dimensionNames\": []\n },\n \"lowerCase\": {\n \"dimensionName\": \"\"\n },\n \"upperCase\": {}\n },\n \"name\": \"\"\n }\n ],\n \"keepEmptyRows\": false,\n \"limit\": \"\",\n \"metricAggregations\": [],\n \"metricFilter\": {},\n \"metrics\": [\n {\n \"expression\": \"\",\n \"invisible\": false,\n \"name\": \"\"\n }\n ],\n \"offset\": \"\",\n \"orderBys\": [\n {\n \"desc\": false,\n \"dimension\": {\n \"dimensionName\": \"\",\n \"orderType\": \"\"\n },\n \"metric\": {\n \"metricName\": \"\"\n },\n \"pivot\": {\n \"metricName\": \"\",\n \"pivotSelections\": [\n {\n \"dimensionName\": \"\",\n \"dimensionValue\": \"\"\n }\n ]\n }\n }\n ],\n \"property\": \"\",\n \"returnPropertyQuota\": false\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/v1beta/:property:runReport') do |req|
req.body = "{\n \"cohortSpec\": {\n \"cohortReportSettings\": {\n \"accumulate\": false\n },\n \"cohorts\": [\n {\n \"dateRange\": {\n \"endDate\": \"\",\n \"name\": \"\",\n \"startDate\": \"\"\n },\n \"dimension\": \"\",\n \"name\": \"\"\n }\n ],\n \"cohortsRange\": {\n \"endOffset\": 0,\n \"granularity\": \"\",\n \"startOffset\": 0\n }\n },\n \"currencyCode\": \"\",\n \"dateRanges\": [\n {}\n ],\n \"dimensionFilter\": {\n \"andGroup\": {\n \"expressions\": []\n },\n \"filter\": {\n \"betweenFilter\": {\n \"fromValue\": {\n \"doubleValue\": \"\",\n \"int64Value\": \"\"\n },\n \"toValue\": {}\n },\n \"fieldName\": \"\",\n \"inListFilter\": {\n \"caseSensitive\": false,\n \"values\": []\n },\n \"numericFilter\": {\n \"operation\": \"\",\n \"value\": {}\n },\n \"stringFilter\": {\n \"caseSensitive\": false,\n \"matchType\": \"\",\n \"value\": \"\"\n }\n },\n \"notExpression\": \"\",\n \"orGroup\": {}\n },\n \"dimensions\": [\n {\n \"dimensionExpression\": {\n \"concatenate\": {\n \"delimiter\": \"\",\n \"dimensionNames\": []\n },\n \"lowerCase\": {\n \"dimensionName\": \"\"\n },\n \"upperCase\": {}\n },\n \"name\": \"\"\n }\n ],\n \"keepEmptyRows\": false,\n \"limit\": \"\",\n \"metricAggregations\": [],\n \"metricFilter\": {},\n \"metrics\": [\n {\n \"expression\": \"\",\n \"invisible\": false,\n \"name\": \"\"\n }\n ],\n \"offset\": \"\",\n \"orderBys\": [\n {\n \"desc\": false,\n \"dimension\": {\n \"dimensionName\": \"\",\n \"orderType\": \"\"\n },\n \"metric\": {\n \"metricName\": \"\"\n },\n \"pivot\": {\n \"metricName\": \"\",\n \"pivotSelections\": [\n {\n \"dimensionName\": \"\",\n \"dimensionValue\": \"\"\n }\n ]\n }\n }\n ],\n \"property\": \"\",\n \"returnPropertyQuota\": false\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1beta/:property:runReport";
let payload = json!({
"cohortSpec": json!({
"cohortReportSettings": json!({"accumulate": false}),
"cohorts": (
json!({
"dateRange": json!({
"endDate": "",
"name": "",
"startDate": ""
}),
"dimension": "",
"name": ""
})
),
"cohortsRange": json!({
"endOffset": 0,
"granularity": "",
"startOffset": 0
})
}),
"currencyCode": "",
"dateRanges": (json!({})),
"dimensionFilter": json!({
"andGroup": json!({"expressions": ()}),
"filter": json!({
"betweenFilter": json!({
"fromValue": json!({
"doubleValue": "",
"int64Value": ""
}),
"toValue": json!({})
}),
"fieldName": "",
"inListFilter": json!({
"caseSensitive": false,
"values": ()
}),
"numericFilter": json!({
"operation": "",
"value": json!({})
}),
"stringFilter": json!({
"caseSensitive": false,
"matchType": "",
"value": ""
})
}),
"notExpression": "",
"orGroup": json!({})
}),
"dimensions": (
json!({
"dimensionExpression": json!({
"concatenate": json!({
"delimiter": "",
"dimensionNames": ()
}),
"lowerCase": json!({"dimensionName": ""}),
"upperCase": json!({})
}),
"name": ""
})
),
"keepEmptyRows": false,
"limit": "",
"metricAggregations": (),
"metricFilter": json!({}),
"metrics": (
json!({
"expression": "",
"invisible": false,
"name": ""
})
),
"offset": "",
"orderBys": (
json!({
"desc": false,
"dimension": json!({
"dimensionName": "",
"orderType": ""
}),
"metric": json!({"metricName": ""}),
"pivot": json!({
"metricName": "",
"pivotSelections": (
json!({
"dimensionName": "",
"dimensionValue": ""
})
)
})
})
),
"property": "",
"returnPropertyQuota": false
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/v1beta/:property:runReport \
--header 'content-type: application/json' \
--data '{
"cohortSpec": {
"cohortReportSettings": {
"accumulate": false
},
"cohorts": [
{
"dateRange": {
"endDate": "",
"name": "",
"startDate": ""
},
"dimension": "",
"name": ""
}
],
"cohortsRange": {
"endOffset": 0,
"granularity": "",
"startOffset": 0
}
},
"currencyCode": "",
"dateRanges": [
{}
],
"dimensionFilter": {
"andGroup": {
"expressions": []
},
"filter": {
"betweenFilter": {
"fromValue": {
"doubleValue": "",
"int64Value": ""
},
"toValue": {}
},
"fieldName": "",
"inListFilter": {
"caseSensitive": false,
"values": []
},
"numericFilter": {
"operation": "",
"value": {}
},
"stringFilter": {
"caseSensitive": false,
"matchType": "",
"value": ""
}
},
"notExpression": "",
"orGroup": {}
},
"dimensions": [
{
"dimensionExpression": {
"concatenate": {
"delimiter": "",
"dimensionNames": []
},
"lowerCase": {
"dimensionName": ""
},
"upperCase": {}
},
"name": ""
}
],
"keepEmptyRows": false,
"limit": "",
"metricAggregations": [],
"metricFilter": {},
"metrics": [
{
"expression": "",
"invisible": false,
"name": ""
}
],
"offset": "",
"orderBys": [
{
"desc": false,
"dimension": {
"dimensionName": "",
"orderType": ""
},
"metric": {
"metricName": ""
},
"pivot": {
"metricName": "",
"pivotSelections": [
{
"dimensionName": "",
"dimensionValue": ""
}
]
}
}
],
"property": "",
"returnPropertyQuota": false
}'
echo '{
"cohortSpec": {
"cohortReportSettings": {
"accumulate": false
},
"cohorts": [
{
"dateRange": {
"endDate": "",
"name": "",
"startDate": ""
},
"dimension": "",
"name": ""
}
],
"cohortsRange": {
"endOffset": 0,
"granularity": "",
"startOffset": 0
}
},
"currencyCode": "",
"dateRanges": [
{}
],
"dimensionFilter": {
"andGroup": {
"expressions": []
},
"filter": {
"betweenFilter": {
"fromValue": {
"doubleValue": "",
"int64Value": ""
},
"toValue": {}
},
"fieldName": "",
"inListFilter": {
"caseSensitive": false,
"values": []
},
"numericFilter": {
"operation": "",
"value": {}
},
"stringFilter": {
"caseSensitive": false,
"matchType": "",
"value": ""
}
},
"notExpression": "",
"orGroup": {}
},
"dimensions": [
{
"dimensionExpression": {
"concatenate": {
"delimiter": "",
"dimensionNames": []
},
"lowerCase": {
"dimensionName": ""
},
"upperCase": {}
},
"name": ""
}
],
"keepEmptyRows": false,
"limit": "",
"metricAggregations": [],
"metricFilter": {},
"metrics": [
{
"expression": "",
"invisible": false,
"name": ""
}
],
"offset": "",
"orderBys": [
{
"desc": false,
"dimension": {
"dimensionName": "",
"orderType": ""
},
"metric": {
"metricName": ""
},
"pivot": {
"metricName": "",
"pivotSelections": [
{
"dimensionName": "",
"dimensionValue": ""
}
]
}
}
],
"property": "",
"returnPropertyQuota": false
}' | \
http POST {{baseUrl}}/v1beta/:property:runReport \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "cohortSpec": {\n "cohortReportSettings": {\n "accumulate": false\n },\n "cohorts": [\n {\n "dateRange": {\n "endDate": "",\n "name": "",\n "startDate": ""\n },\n "dimension": "",\n "name": ""\n }\n ],\n "cohortsRange": {\n "endOffset": 0,\n "granularity": "",\n "startOffset": 0\n }\n },\n "currencyCode": "",\n "dateRanges": [\n {}\n ],\n "dimensionFilter": {\n "andGroup": {\n "expressions": []\n },\n "filter": {\n "betweenFilter": {\n "fromValue": {\n "doubleValue": "",\n "int64Value": ""\n },\n "toValue": {}\n },\n "fieldName": "",\n "inListFilter": {\n "caseSensitive": false,\n "values": []\n },\n "numericFilter": {\n "operation": "",\n "value": {}\n },\n "stringFilter": {\n "caseSensitive": false,\n "matchType": "",\n "value": ""\n }\n },\n "notExpression": "",\n "orGroup": {}\n },\n "dimensions": [\n {\n "dimensionExpression": {\n "concatenate": {\n "delimiter": "",\n "dimensionNames": []\n },\n "lowerCase": {\n "dimensionName": ""\n },\n "upperCase": {}\n },\n "name": ""\n }\n ],\n "keepEmptyRows": false,\n "limit": "",\n "metricAggregations": [],\n "metricFilter": {},\n "metrics": [\n {\n "expression": "",\n "invisible": false,\n "name": ""\n }\n ],\n "offset": "",\n "orderBys": [\n {\n "desc": false,\n "dimension": {\n "dimensionName": "",\n "orderType": ""\n },\n "metric": {\n "metricName": ""\n },\n "pivot": {\n "metricName": "",\n "pivotSelections": [\n {\n "dimensionName": "",\n "dimensionValue": ""\n }\n ]\n }\n }\n ],\n "property": "",\n "returnPropertyQuota": false\n}' \
--output-document \
- {{baseUrl}}/v1beta/:property:runReport
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"cohortSpec": [
"cohortReportSettings": ["accumulate": false],
"cohorts": [
[
"dateRange": [
"endDate": "",
"name": "",
"startDate": ""
],
"dimension": "",
"name": ""
]
],
"cohortsRange": [
"endOffset": 0,
"granularity": "",
"startOffset": 0
]
],
"currencyCode": "",
"dateRanges": [[]],
"dimensionFilter": [
"andGroup": ["expressions": []],
"filter": [
"betweenFilter": [
"fromValue": [
"doubleValue": "",
"int64Value": ""
],
"toValue": []
],
"fieldName": "",
"inListFilter": [
"caseSensitive": false,
"values": []
],
"numericFilter": [
"operation": "",
"value": []
],
"stringFilter": [
"caseSensitive": false,
"matchType": "",
"value": ""
]
],
"notExpression": "",
"orGroup": []
],
"dimensions": [
[
"dimensionExpression": [
"concatenate": [
"delimiter": "",
"dimensionNames": []
],
"lowerCase": ["dimensionName": ""],
"upperCase": []
],
"name": ""
]
],
"keepEmptyRows": false,
"limit": "",
"metricAggregations": [],
"metricFilter": [],
"metrics": [
[
"expression": "",
"invisible": false,
"name": ""
]
],
"offset": "",
"orderBys": [
[
"desc": false,
"dimension": [
"dimensionName": "",
"orderType": ""
],
"metric": ["metricName": ""],
"pivot": [
"metricName": "",
"pivotSelections": [
[
"dimensionName": "",
"dimensionValue": ""
]
]
]
]
],
"property": "",
"returnPropertyQuota": false
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1beta/:property:runReport")! 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()