List records
List records in a collection with optional search, filtering, and cursor pagination.
GET
/collections/{id}/records
List records in a collection with optional search, filtering, and cursor pagination.
Authentication
API Key (header: X-API-Key) API Key (cookie: better-auth.session_token)
Path Parameters
id
string
required
path
Resource ID (32-char hex)
Example:
"a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6"Query Parameters
search
string
optional
query
Search records by key or data
cursor
string
optional
query
Pagination cursor
limit
string
optional
query
Max results (default 50, max 100)
Example:
"50"event_type
string
optional
query
Filter by event type
Responses
200
Records list
application/jsonrecords
object[]
REQUIRED
Array of:
id
string
REQUIRED
collection_id
string
REQUIRED
org_id
string
REQUIRED
env_id
string
REQUIRED
record_key
string
REQUIRED
data
string
REQUIRED
event_type
string | null
REQUIRED
source_event_id
string
REQUIRED
source_event_at
string
REQUIRED
created_at
string
REQUIRED
updated_at
string
REQUIRED
has_more
boolean
REQUIRED
next_cursor
string | null
REQUIRED
401
Unauthorized
curl -X GET 'https://hookstream.io/v1/collections/a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6/records' \
-H 'Authorization: Bearer YOUR_API_TOKEN'
const response = await fetch('https://hookstream.io/v1/collections/a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6/records', {
method: 'GET',
headers: {
"Authorization": "Bearer YOUR_API_TOKEN"
}
});
const data = await response.json();
console.log(data);
import requests
headers = {
'Authorization': 'Bearer YOUR_API_TOKEN'
}
response = requests.get('https://hookstream.io/v1/collections/a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6/records', headers=headers)
print(response.json())
package main
import (
"fmt"
"io"
"net/http"
)
func main() {
req, _ := http.NewRequest("GET", "https://hookstream.io/v1/collections/a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6/records", nil)
req.Header.Set("Authorization", "Bearer YOUR_API_TOKEN")
resp, _ := http.DefaultClient.Do(req)
defer resp.Body.Close()
result, _ := io.ReadAll(resp.Body)
fmt.Println(string(result))
}
200
Response
{
"records": [
{
"id": "<string>",
"collection_id": "<string>",
"org_id": "<string>",
"env_id": "<string>",
"record_key": "<string>",
"data": "<string>",
"event_type": "<string>",
"source_event_id": "<string>",
"source_event_at": "<string>",
"created_at": "<string>",
"updated_at": "<string>"
}
],
"has_more": true,
"next_cursor": "<string>"
}
GET
/collections/{id}/records