curl --request POST \
--url https://api.example.com/sentry-check \
--header 'x-hub-signature: <api-key>'import requests
url = "https://api.example.com/sentry-check"
headers = {"x-hub-signature": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'x-hub-signature': '<api-key>'}};
fetch('https://api.example.com/sentry-check', 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.example.com/sentry-check",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"x-hub-signature: <api-key>"
],
]);
$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.example.com/sentry-check"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("x-hub-signature", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/sentry-check")
.header("x-hub-signature", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/sentry-check")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-hub-signature"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"eventId": "9f2c4e61b8a04d7d9e3f5a0c1b2d3e4f"
}{
"message": "<string>"
}Report a check error to Sentry
Reports an error created on its own source line to Sentry at level info with the tag check=sourcemaps, and returns the event id. After a deploy, the event shows whether Sentry resolves the stack frame to that source line and whether it carries the deployed release and environment.
curl --request POST \
--url https://api.example.com/sentry-check \
--header 'x-hub-signature: <api-key>'import requests
url = "https://api.example.com/sentry-check"
headers = {"x-hub-signature": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'x-hub-signature': '<api-key>'}};
fetch('https://api.example.com/sentry-check', 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.example.com/sentry-check",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"x-hub-signature: <api-key>"
],
]);
$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.example.com/sentry-check"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("x-hub-signature", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/sentry-check")
.header("x-hub-signature", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/sentry-check")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-hub-signature"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"eventId": "9f2c4e61b8a04d7d9e3f5a0c1b2d3e4f"
}{
"message": "<string>"
}Authorizations
HMAC-SHA256 hex digest keyed with the shared secret: over the raw request body for POST requests, or over the query string (the characters after "?") for GET requests. The signed query string is the one the WHATWG URL parser serializes, so a query built with URLSearchParams and appended unchanged verifies, while a hand-assembled query must be percent-encoded the same way.
Response
The event reported to Sentry
Identifier of the event reported to Sentry
"9f2c4e61b8a04d7d9e3f5a0c1b2d3e4f"