Retrieve event
curl --request GET \
--url https://api.neuronsearchlab.com/v1/events/{event_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.neuronsearchlab.com/v1/events/{event_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.neuronsearchlab.com/v1/events/{event_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://api.neuronsearchlab.com/v1/events/{event_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://api.neuronsearchlab.com/v1/events/{event_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://api.neuronsearchlab.com/v1/events/{event_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.neuronsearchlab.com/v1/events/{event_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": 12345,
"object": "event",
"user_id": "user-abc123",
"item_id": 3187,
"event_id": 42,
"session_id": "4a93",
"request_id": "c7f0d2bb-56b1-4ca7-8f09-84d8e4ed02b4",
"context_id": 101,
"placement": "home_feed",
"metadata": {
"context_id": 101,
"purchase": {
"amount": 4999,
"currency": "usd"
}
},
"occurred_at": 1777478400,
"created": 1777478405
}{
"error": {
"type": "invalid_request_error",
"code": "validation_error",
"message": "Validation error",
"details": {
"fieldErrors": {
"name": [
"Required"
]
}
}
}
}{
"error": {
"type": "authentication_error",
"code": "unauthorized_no_client_id_in_jwt",
"message": "Unauthorized: No client ID in JWT"
}
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"details": "<unknown>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"type": "not_found_error",
"code": "item_not_found",
"message": "Item not found"
}
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"details": "<unknown>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}Events
Retrieve event
Retrieve a single ingested event.
GET
/
v1
/
events
/
{event_id}
Retrieve event
curl --request GET \
--url https://api.neuronsearchlab.com/v1/events/{event_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.neuronsearchlab.com/v1/events/{event_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.neuronsearchlab.com/v1/events/{event_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://api.neuronsearchlab.com/v1/events/{event_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://api.neuronsearchlab.com/v1/events/{event_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://api.neuronsearchlab.com/v1/events/{event_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.neuronsearchlab.com/v1/events/{event_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": 12345,
"object": "event",
"user_id": "user-abc123",
"item_id": 3187,
"event_id": 42,
"session_id": "4a93",
"request_id": "c7f0d2bb-56b1-4ca7-8f09-84d8e4ed02b4",
"context_id": 101,
"placement": "home_feed",
"metadata": {
"context_id": 101,
"purchase": {
"amount": 4999,
"currency": "usd"
}
},
"occurred_at": 1777478400,
"created": 1777478405
}{
"error": {
"type": "invalid_request_error",
"code": "validation_error",
"message": "Validation error",
"details": {
"fieldErrors": {
"name": [
"Required"
]
}
}
}
}{
"error": {
"type": "authentication_error",
"code": "unauthorized_no_client_id_in_jwt",
"message": "Unauthorized: No client ID in JWT"
}
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"details": "<unknown>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"type": "not_found_error",
"code": "item_not_found",
"message": "Item not found"
}
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"details": "<unknown>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}Retrieve one recorded event occurrence by its event-record ID. This is different from
event_id in an ingestion payload, which identifies the configured event type.
Inspect its user, item, context and request attribution when debugging tracking. See Events and Explainability.Authorizations
The access token received from the authorization server in the OAuth 2.0 flow.
Path Parameters
Public event ID.
Required range:
x >= 1Response
Event
Required range:
x >= 1Example:
12345
Available options:
event Example:
"user-abc123"
Required range:
x >= 1Example:
3187
Example:
42
Arbitrary JSON object used for filtering, ranking, and debugging.
Example:
{
"category": "electronics",
"brand": "Acme",
"price": 10999,
"currency": "usd"
}
Example:
1777478400
Example:
1777478405
Required range:
x >= 1Example:
101
Example:
"home_feed"
Was this page helpful?

