Pull Notification
1 min
events
If the partner wants to query events through polling, use this endpoint.
GET
https://api-sandbox.klavi.ai/data/analysis/v1/events
Header Parameters
- secretKeystringrequiredDescription
Response
- partnerAppIdstringDescription
- eventIdstringDescription
- eventTypestringDescription
- eventNamestringDescription
- eventTimestringDescription
- payloadobjectDescription
- batchIdstringDescription
- presignedUrlstringDescription
curl
curl --location 'https://api-sandbox.klavi.ai/data/analysis/v1/events' \
--header 'secretKey: string'nodejs
var request = require('request');
var options = {
'method': 'GET',
'url': 'https://api-sandbox.klavi.ai/data/analysis/v1/events',
'headers': {
'secretKey': 'string'
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
javascript
var myHeaders = new Headers();
myHeaders.append("secretKey", "string");
var requestOptions = {
method: 'GET',
headers: myHeaders,
redirect: 'follow'
};
fetch("https://api-sandbox.klavi.ai/data/analysis/v1/events", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));python
import requests
url = "https://api-sandbox.klavi.ai/data/analysis/v1/events"
payload = {}
headers = {
'secretKey': 'string'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
ruby
require "uri"
require "net/http"
url = URI("https://api-sandbox.klavi.ai/data/analysis/v1/events")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Get.new(url)
request["secretKey"] = "string"
response = http.request(request)
puts response.read_body
200
{
"partnerAppId":"12345678",
"eventId":"1495468585434-0e73d1719173766fe4dfe1a8",
"eventType":"analysis",
"eventName":"analysis_finished",
"eventTime":"2025-02-26T20:08:17.848Z",
"payload":{
"batchId":"25872252137",
"presignedUrl":"https://amzn-s3-demo-bucket.s3.us-west-2.amazonaws.com/key?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAEXAMPLE123456789%2F20210621%2Fus-west-2%2Fs3%2Faws4_request&X-Amz-Date=20210621T041609Z&X-Amz-Expires=3600&X-Amz-SignedHeaders=host&X-Amz-Signature=EXAMBLE1234494d5fba3fed607f98018e1dfc62e2529ae96d844123456"
}
}201
{
"statusCode": 201,
"message": "No new event"
}401
{
"statusCode": 401,
"error": "Unauthorized",
"message": "Invalid accessKey or secretKey"
}