cURL
curl --request POST \
--url https://us.api.flexprice.io/v1/events/query \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"end_time": "2024-12-09T00:00:00Z",
"event_id": "<string>",
"event_name": "<string>",
"external_customer_id": "<string>",
"iter_first_key": "<string>",
"iter_last_key": "<string>",
"offset": 123,
"order": "desc",
"page_size": 123,
"property_filters": {},
"sort": "timestamp",
"source": "<string>",
"start_time": "2024-11-09T00:00:00Z"
}
'from flexprice import Flexprice
from flexprice.utils import parse_datetime
with Flexprice(
api_key_auth="<YOUR_API_KEY_HERE>",
) as f_client:
res = f_client.events.list_raw_events(end_time=parse_datetime("2024-12-09T00:00:00Z"), order="desc", sort="timestamp", start_time=parse_datetime("2024-11-09T00:00:00Z"))
# Handle response
print(res)import { Flexprice } from "@flexprice/sdk";
const flexprice = new Flexprice({
apiKeyAuth: "<YOUR_API_KEY_HERE>",
});
async function run() {
const result = await flexprice.events.listRawEvents({
endTime: new Date("2024-12-09T00:00:00Z"),
order: "desc",
sort: "timestamp",
startTime: new Date("2024-11-09T00:00:00Z"),
});
console.log(result);
}
run();package main
import(
"context"
flexprice "github.com/flexprice/go-sdk/v2"
"github.com/flexprice/go-sdk/v2/types"
"github.com/flexprice/go-sdk/v2/models/types"
"log"
)
func main() {
ctx := context.Background()
s := flexprice.New(
flexprice.WithSecurity("<YOUR_API_KEY_HERE>"),
)
res, err := s.Events.ListRawEvents(ctx, types.GetEventsRequest{
EndTime: types.MustNewTimeFromString("2024-12-09T00:00:00Z"),
Order: flexprice.Pointer("desc"),
Sort: flexprice.Pointer("timestamp"),
StartTime: types.MustNewTimeFromString("2024-11-09T00:00:00Z"),
})
if err != nil {
log.Fatal(err)
}
if res.GetEventsResponse != nil {
// handle response
}
}{
"events": [
{
"customer_id": "<string>",
"environment_id": "<string>",
"event_name": "<string>",
"external_customer_id": "<string>",
"id": "<string>",
"ingested_at": "2023-11-07T05:31:56Z",
"properties": {},
"source": "<string>",
"timestamp": "<string>"
}
],
"has_more": true,
"iter_first_key": "<string>",
"iter_last_key": "<string>",
"offset": 123,
"total_count": 123
}{
"code": "http_client_error",
"http_status_code": 123,
"message": "<string>"
}{
"code": "http_client_error",
"http_status_code": 123,
"message": "<string>"
}Events
List raw events
Use when debugging ingestion or exporting raw event data (e.g. support or audit). Returns a paginated list; supports time range and sorting.
POST
/
events
/
query
cURL
curl --request POST \
--url https://us.api.flexprice.io/v1/events/query \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"end_time": "2024-12-09T00:00:00Z",
"event_id": "<string>",
"event_name": "<string>",
"external_customer_id": "<string>",
"iter_first_key": "<string>",
"iter_last_key": "<string>",
"offset": 123,
"order": "desc",
"page_size": 123,
"property_filters": {},
"sort": "timestamp",
"source": "<string>",
"start_time": "2024-11-09T00:00:00Z"
}
'from flexprice import Flexprice
from flexprice.utils import parse_datetime
with Flexprice(
api_key_auth="<YOUR_API_KEY_HERE>",
) as f_client:
res = f_client.events.list_raw_events(end_time=parse_datetime("2024-12-09T00:00:00Z"), order="desc", sort="timestamp", start_time=parse_datetime("2024-11-09T00:00:00Z"))
# Handle response
print(res)import { Flexprice } from "@flexprice/sdk";
const flexprice = new Flexprice({
apiKeyAuth: "<YOUR_API_KEY_HERE>",
});
async function run() {
const result = await flexprice.events.listRawEvents({
endTime: new Date("2024-12-09T00:00:00Z"),
order: "desc",
sort: "timestamp",
startTime: new Date("2024-11-09T00:00:00Z"),
});
console.log(result);
}
run();package main
import(
"context"
flexprice "github.com/flexprice/go-sdk/v2"
"github.com/flexprice/go-sdk/v2/types"
"github.com/flexprice/go-sdk/v2/models/types"
"log"
)
func main() {
ctx := context.Background()
s := flexprice.New(
flexprice.WithSecurity("<YOUR_API_KEY_HERE>"),
)
res, err := s.Events.ListRawEvents(ctx, types.GetEventsRequest{
EndTime: types.MustNewTimeFromString("2024-12-09T00:00:00Z"),
Order: flexprice.Pointer("desc"),
Sort: flexprice.Pointer("timestamp"),
StartTime: types.MustNewTimeFromString("2024-11-09T00:00:00Z"),
})
if err != nil {
log.Fatal(err)
}
if res.GetEventsResponse != nil {
// handle response
}
}{
"events": [
{
"customer_id": "<string>",
"environment_id": "<string>",
"event_name": "<string>",
"external_customer_id": "<string>",
"id": "<string>",
"ingested_at": "2023-11-07T05:31:56Z",
"properties": {},
"source": "<string>",
"timestamp": "<string>"
}
],
"has_more": true,
"iter_first_key": "<string>",
"iter_last_key": "<string>",
"offset": 123,
"total_count": 123
}{
"code": "http_client_error",
"http_status_code": 123,
"message": "<string>"
}{
"code": "http_client_error",
"http_status_code": 123,
"message": "<string>"
}Body
application/json
Request body

