List the top events of event groups
curl --request POST \
--url https://appsignal.com/api/v2/events/group_list \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"site_id": "6591f2705fa150d75339e232",
"from": "2024-01-01T00:00:00Z",
"to": "2024-01-01T01:00:00Z",
"resolution": "HOURLY",
"groups": [
"active_record",
"moped"
],
"order": "IMPACT"
}
'import requests
url = "https://appsignal.com/api/v2/events/group_list"
payload = {
"site_id": "6591f2705fa150d75339e232",
"from": "2024-01-01T00:00:00Z",
"to": "2024-01-01T01:00:00Z",
"resolution": "HOURLY",
"groups": ["active_record", "moped"],
"order": "IMPACT"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
site_id: '6591f2705fa150d75339e232',
from: '2024-01-01T00:00:00Z',
to: '2024-01-01T01:00:00Z',
resolution: 'HOURLY',
groups: ['active_record', 'moped'],
order: 'IMPACT'
})
};
fetch('https://appsignal.com/api/v2/events/group_list', 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://appsignal.com/api/v2/events/group_list",
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([
'site_id' => '6591f2705fa150d75339e232',
'from' => '2024-01-01T00:00:00Z',
'to' => '2024-01-01T01:00:00Z',
'resolution' => 'HOURLY',
'groups' => [
'active_record',
'moped'
],
'order' => 'IMPACT'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://appsignal.com/api/v2/events/group_list"
payload := strings.NewReader("{\n \"site_id\": \"6591f2705fa150d75339e232\",\n \"from\": \"2024-01-01T00:00:00Z\",\n \"to\": \"2024-01-01T01:00:00Z\",\n \"resolution\": \"HOURLY\",\n \"groups\": [\n \"active_record\",\n \"moped\"\n ],\n \"order\": \"IMPACT\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://appsignal.com/api/v2/events/group_list")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"site_id\": \"6591f2705fa150d75339e232\",\n \"from\": \"2024-01-01T00:00:00Z\",\n \"to\": \"2024-01-01T01:00:00Z\",\n \"resolution\": \"HOURLY\",\n \"groups\": [\n \"active_record\",\n \"moped\"\n ],\n \"order\": \"IMPACT\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://appsignal.com/api/v2/events/group_list")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"site_id\": \"6591f2705fa150d75339e232\",\n \"from\": \"2024-01-01T00:00:00Z\",\n \"to\": \"2024-01-01T01:00:00Z\",\n \"resolution\": \"HOURLY\",\n \"groups\": [\n \"active_record\",\n \"moped\"\n ],\n \"order\": \"IMPACT\"\n}"
response = http.request(request)
puts response.read_body[
{
"digest": "<string>",
"group": "<string>",
"name": "<string>",
"count": 1,
"mean": 123,
"impact": 123,
"title": "<string>",
"body": "<string>"
}
]{
"error": "<string>",
"message": "<string>",
"details": "<unknown>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>",
"suggestion": "<string>"
}{
"error": "<string>"
}Authorizations
Authorization: Bearer <token>
Body
Query for the event group list.
Site to fetch events for, as a BSON ObjectId.
Start of the time range, rounded down to the start of its resolution bucket.
End of the time range (inclusive). Capped at now, then rounded up to the end of its
resolution bucket; MINUTELY stops at the end of the minute 2 minutes ago.
Event groups to include (e.g. ["active_record", "moped"]). At least one.
Sets how from and to are rounded. MINUTELY fits ranges of up to 12 hours within the
last 2 days; when absent or unfit, MINUTELY is used if it fits, otherwise HOURLY.
HOURLY, MINUTELY, DAILY Field to rank and truncate by.
IMPACT, MEAN, THROUGHPUT Maximum number of rows to return. Clamped to 1–1000.
Response
Up to limit events across all requested groups, ranked by order descending. Some events are left out after ranking (transaction boundaries, and events without metadata or a group), so fewer rows than limit can come back.
Digest identifying the event.
Group the event belongs to (e.g. active_record), derived from name.
Event name (e.g. sql.active_record).
Number of occurrences in the time range.
x >= 0Weighted mean duration in milliseconds.
Total time spent in milliseconds (count * mean).
Human-readable title.
Event body (e.g. the query text).
Was this page helpful?
curl --request POST \
--url https://appsignal.com/api/v2/events/group_list \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"site_id": "6591f2705fa150d75339e232",
"from": "2024-01-01T00:00:00Z",
"to": "2024-01-01T01:00:00Z",
"resolution": "HOURLY",
"groups": [
"active_record",
"moped"
],
"order": "IMPACT"
}
'import requests
url = "https://appsignal.com/api/v2/events/group_list"
payload = {
"site_id": "6591f2705fa150d75339e232",
"from": "2024-01-01T00:00:00Z",
"to": "2024-01-01T01:00:00Z",
"resolution": "HOURLY",
"groups": ["active_record", "moped"],
"order": "IMPACT"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
site_id: '6591f2705fa150d75339e232',
from: '2024-01-01T00:00:00Z',
to: '2024-01-01T01:00:00Z',
resolution: 'HOURLY',
groups: ['active_record', 'moped'],
order: 'IMPACT'
})
};
fetch('https://appsignal.com/api/v2/events/group_list', 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://appsignal.com/api/v2/events/group_list",
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([
'site_id' => '6591f2705fa150d75339e232',
'from' => '2024-01-01T00:00:00Z',
'to' => '2024-01-01T01:00:00Z',
'resolution' => 'HOURLY',
'groups' => [
'active_record',
'moped'
],
'order' => 'IMPACT'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://appsignal.com/api/v2/events/group_list"
payload := strings.NewReader("{\n \"site_id\": \"6591f2705fa150d75339e232\",\n \"from\": \"2024-01-01T00:00:00Z\",\n \"to\": \"2024-01-01T01:00:00Z\",\n \"resolution\": \"HOURLY\",\n \"groups\": [\n \"active_record\",\n \"moped\"\n ],\n \"order\": \"IMPACT\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://appsignal.com/api/v2/events/group_list")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"site_id\": \"6591f2705fa150d75339e232\",\n \"from\": \"2024-01-01T00:00:00Z\",\n \"to\": \"2024-01-01T01:00:00Z\",\n \"resolution\": \"HOURLY\",\n \"groups\": [\n \"active_record\",\n \"moped\"\n ],\n \"order\": \"IMPACT\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://appsignal.com/api/v2/events/group_list")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"site_id\": \"6591f2705fa150d75339e232\",\n \"from\": \"2024-01-01T00:00:00Z\",\n \"to\": \"2024-01-01T01:00:00Z\",\n \"resolution\": \"HOURLY\",\n \"groups\": [\n \"active_record\",\n \"moped\"\n ],\n \"order\": \"IMPACT\"\n}"
response = http.request(request)
puts response.read_body[
{
"digest": "<string>",
"group": "<string>",
"name": "<string>",
"count": 1,
"mean": 123,
"impact": 123,
"title": "<string>",
"body": "<string>"
}
]{
"error": "<string>",
"message": "<string>",
"details": "<unknown>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>",
"suggestion": "<string>"
}{
"error": "<string>"
}