cURL
curl -X POST "https://api.joinformal.com/core.v1.SessionsService/ListSessionAggregations" \
-H "X-API-KEY: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"example": "value"
}'fetch("https://api.joinformal.com/core.v1.SessionsService/ListSessionAggregations", {
method: "POST",
headers: {
"X-API-KEY": "YOUR_API_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
example: "value"
})
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error(error));import requests
url = "https://api.joinformal.com/core.v1.SessionsService/ListSessionAggregations"
headers = {
"X-API-KEY": "YOUR_API_KEY",
"Content-Type": "application/json"
}
data = {
"example": "value"
}
response = requests.post(url, headers=headers, json=data)
print(response.json())package main
import (
"bytes"
"encoding/json"
"fmt"
"io"
"net/http"
)
func main() {
url := "https://api.joinformal.com/core.v1.SessionsService/ListSessionAggregations"
body := map[string]string{
"example": "value",
}
jsonData, _ := json.Marshal(body)
req, _ := http.NewRequest("POST", url, bytes.NewBuffer(jsonData))
req.Header.Set("X-API-KEY", "YOUR_API_KEY")
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
responseBody, _ := io.ReadAll(resp.Body)
fmt.Println(string(responseBody))
}<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.joinformal.com/core.v1.SessionsService/ListSessionAggregations",
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([
'query' => '<string>',
'startTimestamp' => '<string>',
'endTimestamp' => '<string>',
'histogramInterval' => '<string>',
'histogramGroupByFields' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-KEY: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.post("https://api.joinformal.com/core.v1.SessionsService/ListSessionAggregations")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"query\": \"<string>\",\n \"startTimestamp\": \"<string>\",\n \"endTimestamp\": \"<string>\",\n \"histogramInterval\": \"<string>\",\n \"histogramGroupByFields\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.joinformal.com/core.v1.SessionsService/ListSessionAggregations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"query\": \"<string>\",\n \"startTimestamp\": \"<string>\",\n \"endTimestamp\": \"<string>\",\n \"histogramInterval\": \"<string>\",\n \"histogramGroupByFields\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"aggregations": {
"logsOverTime": [
{
"datetime": "<string>",
"count": 123,
"buckets": [
{
"key": "<string>",
"count": 123,
"buckets": "<array>"
}
]
}
],
"sessionTypes": [
{
"key": "<string>",
"count": 123
}
],
"sessionIds": [
{
"key": "<string>",
"count": 123
}
],
"sessionClientIpAddresses": [
{
"key": "<string>",
"count": 123
}
],
"sessionServerIpAddresses": [
{
"key": "<string>",
"count": 123
}
],
"queryFingerprints": [
{
"key": "<string>",
"count": 123
}
],
"queryReceived": [
{
"key": "<string>",
"count": 123
}
],
"querySent": [
{
"key": "<string>",
"count": 123
}
],
"resourceIds": [
{
"key": "<string>",
"count": 123
}
],
"resourceNames": [
{
"key": "<string>",
"count": 123
}
],
"resourceTypes": [
{
"key": "<string>",
"count": 123
}
],
"resourceHostnames": [
{
"key": "<string>",
"count": 123
}
],
"resourceTechnologies": [
{
"key": "<string>",
"count": 123
}
],
"connectorNames": [
{
"key": "<string>",
"count": 123
}
],
"connectorIds": [
{
"key": "<string>",
"count": 123
}
],
"spaceNames": [
{
"key": "<string>",
"count": 123
}
],
"spaceIds": [
{
"key": "<string>",
"count": 123
}
],
"userTypes": [
{
"key": "<string>",
"count": 123
}
],
"userSubTypes": [
{
"key": "<string>",
"count": 123
}
],
"userEmails": [
{
"key": "<string>",
"count": 123
}
],
"userUsernames": [
{
"key": "<string>",
"count": 123
}
],
"userIds": [
{
"key": "<string>",
"count": 123
}
],
"endUserTypes": [
{
"key": "<string>",
"count": 123
}
],
"endUserNames": [
{
"key": "<string>",
"count": 123
}
],
"endUserEmails": [
{
"key": "<string>",
"count": 123
}
],
"triggeredPolicyIds": [
{
"key": "<string>",
"count": 123
}
],
"triggeredPolicyNames": [
{
"key": "<string>",
"count": 123
}
],
"triggeredPolicyStatuses": [
{
"key": "<string>",
"count": 123
}
],
"triggeredPolicyTypes": [
{
"key": "<string>",
"count": 123
}
],
"responseDataVolumes": [
{
"key": "<string>",
"count": 123
}
],
"responseReturnedColumnNames": [
{
"key": "<string>",
"count": 123
}
],
"responseReturnedColumnDataLabels": [
{
"key": "<string>",
"count": 123
}
],
"responseRowsSent": [
{
"key": "<string>",
"count": 123
}
],
"responseRowsReceived": [
{
"key": "<string>",
"count": 123
}
]
},
"numHits": 123
}{
"code": "invalid_request",
"message": "Invalid request parameters",
"details": {}
}{
"code": "unauthorized",
"message": "Authentication required"
}{
"code": "forbidden",
"message": "Insufficient permissions to perform this action"
}{
"code": "not_found",
"message": "Resource not found"
}{
"code": "internal_error",
"message": "An internal error occurred"
}core.v1.SessionsService
ListSessionAggregations
POST
/
core.v1.SessionsService
/
ListSessionAggregations
cURL
curl -X POST "https://api.joinformal.com/core.v1.SessionsService/ListSessionAggregations" \
-H "X-API-KEY: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"example": "value"
}'fetch("https://api.joinformal.com/core.v1.SessionsService/ListSessionAggregations", {
method: "POST",
headers: {
"X-API-KEY": "YOUR_API_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
example: "value"
})
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error(error));import requests
url = "https://api.joinformal.com/core.v1.SessionsService/ListSessionAggregations"
headers = {
"X-API-KEY": "YOUR_API_KEY",
"Content-Type": "application/json"
}
data = {
"example": "value"
}
response = requests.post(url, headers=headers, json=data)
print(response.json())package main
import (
"bytes"
"encoding/json"
"fmt"
"io"
"net/http"
)
func main() {
url := "https://api.joinformal.com/core.v1.SessionsService/ListSessionAggregations"
body := map[string]string{
"example": "value",
}
jsonData, _ := json.Marshal(body)
req, _ := http.NewRequest("POST", url, bytes.NewBuffer(jsonData))
req.Header.Set("X-API-KEY", "YOUR_API_KEY")
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
responseBody, _ := io.ReadAll(resp.Body)
fmt.Println(string(responseBody))
}<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.joinformal.com/core.v1.SessionsService/ListSessionAggregations",
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([
'query' => '<string>',
'startTimestamp' => '<string>',
'endTimestamp' => '<string>',
'histogramInterval' => '<string>',
'histogramGroupByFields' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-KEY: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.post("https://api.joinformal.com/core.v1.SessionsService/ListSessionAggregations")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"query\": \"<string>\",\n \"startTimestamp\": \"<string>\",\n \"endTimestamp\": \"<string>\",\n \"histogramInterval\": \"<string>\",\n \"histogramGroupByFields\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.joinformal.com/core.v1.SessionsService/ListSessionAggregations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"query\": \"<string>\",\n \"startTimestamp\": \"<string>\",\n \"endTimestamp\": \"<string>\",\n \"histogramInterval\": \"<string>\",\n \"histogramGroupByFields\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"aggregations": {
"logsOverTime": [
{
"datetime": "<string>",
"count": 123,
"buckets": [
{
"key": "<string>",
"count": 123,
"buckets": "<array>"
}
]
}
],
"sessionTypes": [
{
"key": "<string>",
"count": 123
}
],
"sessionIds": [
{
"key": "<string>",
"count": 123
}
],
"sessionClientIpAddresses": [
{
"key": "<string>",
"count": 123
}
],
"sessionServerIpAddresses": [
{
"key": "<string>",
"count": 123
}
],
"queryFingerprints": [
{
"key": "<string>",
"count": 123
}
],
"queryReceived": [
{
"key": "<string>",
"count": 123
}
],
"querySent": [
{
"key": "<string>",
"count": 123
}
],
"resourceIds": [
{
"key": "<string>",
"count": 123
}
],
"resourceNames": [
{
"key": "<string>",
"count": 123
}
],
"resourceTypes": [
{
"key": "<string>",
"count": 123
}
],
"resourceHostnames": [
{
"key": "<string>",
"count": 123
}
],
"resourceTechnologies": [
{
"key": "<string>",
"count": 123
}
],
"connectorNames": [
{
"key": "<string>",
"count": 123
}
],
"connectorIds": [
{
"key": "<string>",
"count": 123
}
],
"spaceNames": [
{
"key": "<string>",
"count": 123
}
],
"spaceIds": [
{
"key": "<string>",
"count": 123
}
],
"userTypes": [
{
"key": "<string>",
"count": 123
}
],
"userSubTypes": [
{
"key": "<string>",
"count": 123
}
],
"userEmails": [
{
"key": "<string>",
"count": 123
}
],
"userUsernames": [
{
"key": "<string>",
"count": 123
}
],
"userIds": [
{
"key": "<string>",
"count": 123
}
],
"endUserTypes": [
{
"key": "<string>",
"count": 123
}
],
"endUserNames": [
{
"key": "<string>",
"count": 123
}
],
"endUserEmails": [
{
"key": "<string>",
"count": 123
}
],
"triggeredPolicyIds": [
{
"key": "<string>",
"count": 123
}
],
"triggeredPolicyNames": [
{
"key": "<string>",
"count": 123
}
],
"triggeredPolicyStatuses": [
{
"key": "<string>",
"count": 123
}
],
"triggeredPolicyTypes": [
{
"key": "<string>",
"count": 123
}
],
"responseDataVolumes": [
{
"key": "<string>",
"count": 123
}
],
"responseReturnedColumnNames": [
{
"key": "<string>",
"count": 123
}
],
"responseReturnedColumnDataLabels": [
{
"key": "<string>",
"count": 123
}
],
"responseRowsSent": [
{
"key": "<string>",
"count": 123
}
],
"responseRowsReceived": [
{
"key": "<string>",
"count": 123
}
]
},
"numHits": 123
}{
"code": "invalid_request",
"message": "Invalid request parameters",
"details": {}
}{
"code": "unauthorized",
"message": "Authentication required"
}{
"code": "forbidden",
"message": "Insufficient permissions to perform this action"
}{
"code": "not_found",
"message": "Resource not found"
}{
"code": "internal_error",
"message": "An internal error occurred"
}Authorizations
API key authentication. Get your API key from the Formal console.
Body
application/json
Was this page helpful?
⌘I