Getting Events

K
Last updated 4 months ago

get
Get Event by ID from Stream

https://api.sentenai.com/streams
/<stream-name>/events/<event-id>
Request
Response
Path Parameters
stream-name
required
string
event-id
required
string
Headers
Auth-Key
required
string
Your Sentenai API key
200: OK
Content-Type: application/json
{ <event-body> }

get
Get Event Data in Time Range

https://api.sentenai.com
/streams/<stream-name>/start/<start-timestamp>/end/<end-timestamp>
Request
Response
Path Parameters
stream-name
required
string
Stream to get event data from
start-timestamp
required
string
ISO8601 formatted start time
end-timestamp
required
string
ISO8601 formatted end time
Headers
Auth-Key
required
string
Your Sentenai API key
200: OK
The response consists of one JSON event per line (newline delimited), ordered ascending by time.
{
"id": "001",
"ts":"2012-10-10T00:00:01z",
"event": {
"foo": true,
"bar":50
}
}

get
Get Newest Event From Stream

https://api.sentenai.com
/<stream-name>/newest
Request
Response
Path Parameters
stream-name
required
string
Stream to get newest event from
Headers
Auth-Key
required
string
Your Sentenai API key
200: OK

get
Get Oldest Event From Stream

https://api.sentenai.com
/<stream-name>/oldest
Request
Response
Path Parameters
stream-name
required
string
Stream to get oldest event from
Headers
Auth-Key
required
string
Your Sentenai API key
200: OK