Aggregate objects of a type
Counts objects, or computes declared measures, grouped by one dimension or by time. GET /types/{type_name} lists the measures and dimensions of a type. This endpoint does not take a privacy parameter. Rate limit: 120 requests per minute for each workspace.
curl --request GET \
--url https://server.meetdoris.com/api/v1/ontology/{type_name}/aggregate \
--header 'Authorization: Bearer <token>'import requests
url = "https://server.meetdoris.com/api/v1/ontology/{type_name}/aggregate"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://server.meetdoris.com/api/v1/ontology/{type_name}/aggregate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://server.meetdoris.com/api/v1/ontology/{type_name}/aggregate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://server.meetdoris.com/api/v1/ontology/{type_name}/aggregate"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://server.meetdoris.com/api/v1/ontology/{type_name}/aggregate")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://server.meetdoris.com/api/v1/ontology/{type_name}/aggregate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"ok": true,
"groups": [
{
"stage": "Negotiation",
"deal_count": 12
}
],
"totals": {
"deal_count": 12
}
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}Authorizations
A Doris API key that starts with sk-live-. A workspace admin creates keys in Settings > Workspace > Developer. A key works only on /api/v1/ontology/ routes.
Path Parameters
The object type, for example deal, account, person, meeting or commitment. Call GET /types to see the types in your workspace.
"deal"
Query Parameters
A declared dimension to group by, for example stage on deal.
A declared measure name, for example deal_count or pipeline_amount on deal. Repeat the parameter for more than one. Leave empty to use the count measure of the type.
A JSON object of field filters, URL-encoded. Example: {"stage":"Negotiation"}. The server ignores a value that is not a JSON object.
Group results by this time period. You must also set time_field.
week, month, quarter The declared date property to group by time, for example close_date.
Response
Groups or time buckets, with totals.
The response is of type object.
curl --request GET \
--url https://server.meetdoris.com/api/v1/ontology/{type_name}/aggregate \
--header 'Authorization: Bearer <token>'import requests
url = "https://server.meetdoris.com/api/v1/ontology/{type_name}/aggregate"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://server.meetdoris.com/api/v1/ontology/{type_name}/aggregate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://server.meetdoris.com/api/v1/ontology/{type_name}/aggregate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://server.meetdoris.com/api/v1/ontology/{type_name}/aggregate"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://server.meetdoris.com/api/v1/ontology/{type_name}/aggregate")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://server.meetdoris.com/api/v1/ontology/{type_name}/aggregate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"ok": true,
"groups": [
{
"stage": "Negotiation",
"deal_count": 12
}
],
"totals": {
"deal_count": 12
}
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}