Tracing endpoints
List incident error counts
POST
/
api
/
v2
/
tracing
/
errors
List incident error counts
curl --request POST \
--url https://appsignal.com/api/v2/tracing/errors \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"site_id": "<string>",
"from": "2023-11-07T05:31:56Z",
"to": "2023-11-07T05:31:56Z",
"namespaces": [
"<string>"
],
"revision": "<string>"
}
'import requests
url = "https://appsignal.com/api/v2/tracing/errors"
payload = {
"site_id": "<string>",
"from": "2023-11-07T05:31:56Z",
"to": "2023-11-07T05:31:56Z",
"namespaces": ["<string>"],
"revision": "<string>"
}
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: '<string>',
from: '2023-11-07T05:31:56Z',
to: '2023-11-07T05:31:56Z',
namespaces: ['<string>'],
revision: '<string>'
})
};
fetch('https://appsignal.com/api/v2/tracing/errors', 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/tracing/errors",
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' => '<string>',
'from' => '2023-11-07T05:31:56Z',
'to' => '2023-11-07T05:31:56Z',
'namespaces' => [
'<string>'
],
'revision' => '<string>'
]),
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/tracing/errors"
payload := strings.NewReader("{\n \"site_id\": \"<string>\",\n \"from\": \"2023-11-07T05:31:56Z\",\n \"to\": \"2023-11-07T05:31:56Z\",\n \"namespaces\": [\n \"<string>\"\n ],\n \"revision\": \"<string>\"\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/tracing/errors")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"site_id\": \"<string>\",\n \"from\": \"2023-11-07T05:31:56Z\",\n \"to\": \"2023-11-07T05:31:56Z\",\n \"namespaces\": [\n \"<string>\"\n ],\n \"revision\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://appsignal.com/api/v2/tracing/errors")
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\": \"<string>\",\n \"from\": \"2023-11-07T05:31:56Z\",\n \"to\": \"2023-11-07T05:31:56Z\",\n \"namespaces\": [\n \"<string>\"\n ],\n \"revision\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body[
{
"incident_digest": "<string>",
"namespace": "<string>",
"revision": "<string>",
"error_count": 1
}
]{
"error": "<string>",
"message": "<string>",
"details": "<unknown>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>",
"suggestion": "<string>"
}{
"error": "<string>"
}For how to investigate error incidents with this endpoint, see Querying traces.
Authorizations
bearer_authtoken_query
Authorization: Bearer <token>
Body
application/json
Query for the incident error list.
Site to fetch incident error counts for.
Start of the time range (inclusive).
End of the time range (inclusive).
Namespaces to filter by. When empty, all namespaces are included.
Deployment revision to filter by. When absent, all revisions are included.
Response
Incident digests matching the filter, with their error counts.
The incident digest.
Application namespace the incident occurred in.
Most recent deployment revision the incident occurred in within the queried time range.
Total error occurrences for this digest across the queried time range, summed across every matching revision.
Required range:
x >= 0Was this page helpful?
⌘I
List incident error counts
curl --request POST \
--url https://appsignal.com/api/v2/tracing/errors \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"site_id": "<string>",
"from": "2023-11-07T05:31:56Z",
"to": "2023-11-07T05:31:56Z",
"namespaces": [
"<string>"
],
"revision": "<string>"
}
'import requests
url = "https://appsignal.com/api/v2/tracing/errors"
payload = {
"site_id": "<string>",
"from": "2023-11-07T05:31:56Z",
"to": "2023-11-07T05:31:56Z",
"namespaces": ["<string>"],
"revision": "<string>"
}
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: '<string>',
from: '2023-11-07T05:31:56Z',
to: '2023-11-07T05:31:56Z',
namespaces: ['<string>'],
revision: '<string>'
})
};
fetch('https://appsignal.com/api/v2/tracing/errors', 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/tracing/errors",
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' => '<string>',
'from' => '2023-11-07T05:31:56Z',
'to' => '2023-11-07T05:31:56Z',
'namespaces' => [
'<string>'
],
'revision' => '<string>'
]),
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/tracing/errors"
payload := strings.NewReader("{\n \"site_id\": \"<string>\",\n \"from\": \"2023-11-07T05:31:56Z\",\n \"to\": \"2023-11-07T05:31:56Z\",\n \"namespaces\": [\n \"<string>\"\n ],\n \"revision\": \"<string>\"\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/tracing/errors")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"site_id\": \"<string>\",\n \"from\": \"2023-11-07T05:31:56Z\",\n \"to\": \"2023-11-07T05:31:56Z\",\n \"namespaces\": [\n \"<string>\"\n ],\n \"revision\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://appsignal.com/api/v2/tracing/errors")
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\": \"<string>\",\n \"from\": \"2023-11-07T05:31:56Z\",\n \"to\": \"2023-11-07T05:31:56Z\",\n \"namespaces\": [\n \"<string>\"\n ],\n \"revision\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body[
{
"incident_digest": "<string>",
"namespace": "<string>",
"revision": "<string>",
"error_count": 1
}
]{
"error": "<string>",
"message": "<string>",
"details": "<unknown>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>",
"suggestion": "<string>"
}{
"error": "<string>"
}