curl --request GET \
--url https://api.trench.dev/eventsimport requests
url = "https://api.trench.dev/events"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.trench.dev/events', 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://api.trench.dev/events",
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;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.trench.dev/events"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.trench.dev/events")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.trench.dev/events")
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{
"limit": 123,
"offset": 123,
"total": 123,
"results": [
{
"uuid": "123",
"type": "track",
"event": "user_signed_up",
"userId": "user-123",
"groupId": "group-456",
"anonymousId": "anon-789",
"instanceId": "instance-101112",
"properties": {
"key": "value"
}
}
]
}Get Events
Get events based on a query
curl --request GET \
--url https://api.trench.dev/eventsimport requests
url = "https://api.trench.dev/events"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.trench.dev/events', 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://api.trench.dev/events",
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;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.trench.dev/events"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.trench.dev/events")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.trench.dev/events")
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{
"limit": 123,
"offset": 123,
"total": 123,
"results": [
{
"uuid": "123",
"type": "track",
"event": "user_signed_up",
"userId": "user-123",
"groupId": "group-456",
"anonymousId": "anon-789",
"instanceId": "instance-101112",
"properties": {
"key": "value"
}
}
]
}Query Parameters
The event name to filter by.
"Created Account"
The UUID to filter by.
"123e4567-e89b-12d3-a456-426614174000"
The user ID to filter by.
"user-123"
The group ID to filter by.
"group-456"
The anonymous ID to filter by.
"anon-789"
The instance ID to filter by.
"instance-101112"
The start date to filter by.
"2022-01-01T00:00:00Z"
The end date to filter by.
"2022-12-31T23:59:59Z"
The limit of records to return.
100
The offset of records to return.
0
The field to order by.
"timestamp"
The direction to order by.
ASC, DESC "ASC"
Response
The events have been successfully retrieved.
The limit of the pagination.
The offset of the pagination.
The total number of results. If null, the total is unknown.
The events found based on the query.
Show child attributes
Show child attributes
[ { "uuid": "123", "type": "track", "event": "user_signed_up", "userId": "user-123", "groupId": "group-456", "anonymousId": "anon-789", "instanceId": "instance-101112", "properties": { "key": "value" } } ]
Was this page helpful?