Get event
curl --request GET \
--url https://enterprise.tavrn.ai/v2/events/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://enterprise.tavrn.ai/v2/events/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://enterprise.tavrn.ai/v2/events/{id}', 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://enterprise.tavrn.ai/v2/events/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://enterprise.tavrn.ai/v2/events/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://enterprise.tavrn.ai/v2/events/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://enterprise.tavrn.ai/v2/events/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "rr-06a28fdc7a8abfa2a1c98dd0562020ebb41ca740377930a736854d23a6c9881a",
"object": "event",
"type": "retrieval_request.status_changed",
"created_at": "2023-11-07T05:31:56Z",
"data": {},
"api_version": "v2",
"request_id": "<string>"
}{
"error": {
"code": "insufficient_scope",
"message": "Required scope: retrievals:read"
}
}{
"error": {
"code": "not_found",
"message": "Event not found"
}
}{
"error": {
"code": "internal_error",
"message": "Internal server error",
"request_id": "req_0c1f1f1cd1c84e2f8d4b6a2e9f3b7a11",
"doc_url": "https://docs.tavrn.ai/guides/v2/errors#internal_error"
}
}Events
Get event
One event by ID. Requires webhooks:read plus the event family read scope.
GET
/
v2
/
events
/
{id}
Get event
curl --request GET \
--url https://enterprise.tavrn.ai/v2/events/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://enterprise.tavrn.ai/v2/events/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://enterprise.tavrn.ai/v2/events/{id}', 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://enterprise.tavrn.ai/v2/events/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://enterprise.tavrn.ai/v2/events/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://enterprise.tavrn.ai/v2/events/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://enterprise.tavrn.ai/v2/events/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "rr-06a28fdc7a8abfa2a1c98dd0562020ebb41ca740377930a736854d23a6c9881a",
"object": "event",
"type": "retrieval_request.status_changed",
"created_at": "2023-11-07T05:31:56Z",
"data": {},
"api_version": "v2",
"request_id": "<string>"
}{
"error": {
"code": "insufficient_scope",
"message": "Required scope: retrievals:read"
}
}{
"error": {
"code": "not_found",
"message": "Event not found"
}
}{
"error": {
"code": "internal_error",
"message": "Internal server error",
"request_id": "req_0c1f1f1cd1c84e2f8d4b6a2e9f3b7a11",
"doc_url": "https://docs.tavrn.ai/guides/v2/errors#internal_error"
}
}Authorizations
API key authentication. Use format: Authorization: Bearer tavrn_sk_live_...
Path Parameters
Event ID
Response
The event
A persisted event: the same body a webhook delivers, readable for 30 days.
Deterministic event ID; equals the webhook body id and the X-Webhook-Event-Id header
Example:
"rr-06a28fdc7a8abfa2a1c98dd0562020ebb41ca740377930a736854d23a6c9881a"
Available options:
event Event type
Example:
"retrieval_request.status_changed"
Event-specific payload; identical to the webhook body data for the same id
API version the event was rendered with
Example:
"v2"
Request ID of the API call that caused the event, when it was caused by one