With Delivery Overview Public API, customers can query their data directly instead of going through the Segment app. They can inspect their data with more granularity by specifying custom time periods, and grouping or filtering their data by discard reasons, event names, event types, app versions, and other fields specific to Streaming Destinations, Actions Destinations, or Linked Audiences.
Public API support for Storage Destinations and RETL is currently in development.
Get events that failed to be delivered to Destination.
OK
Resource not found
Validation failure
Too many requests
import { configureApis, unwrap } from '@segment/public-api-sdk-typescript' const api = configureApis('/* Insert your Public API token here */') try { const result = await unwrap( api.deliveryOverview.getEgressFailedMetricsFromDeliveryOverview( 'rh5BDZp6QDHvXFCkibm1pR', 'fP7qoQw2HTWt9WdMr718gn', '2024-01-01T00:00:00Z', '2024-01-03T00:00:00Z', 'DAY' ) ) console.log(JSON.stringify(result)) } catch (e) { console.log('ERROR:', e) }
{- "data": {
- "total": 32504644,
- "dataset": [
- {
- "eventName": "event-name",
- "total": 32504644,
- "series": [
- {
- "time": "2024-01-01T00:00:00Z",
- "count": 15637145
}, - {
- "time": "2024-01-02T00:00:00Z",
- "count": 16867499
}
]
}
], - "pagination": {
- "current": "MA==",
- "totalEntries": 1
}
}
}
Get events successfully delivered to Destination.
OK
Resource not found
Validation failure
Too many requests
import { configureApis, unwrap } from '@segment/public-api-sdk-typescript' const api = configureApis('/* Insert your Public API token here */') try { const result = await unwrap( api.deliveryOverview.getEgressSuccessMetricsFromDeliveryOverview( 'rh5BDZp6QDHvXFCkibm1pR', 'fP7qoQw2HTWt9WdMr718gn', '2024-01-01T00:00:00Z', '2024-01-03T00:00:00Z', 'DAY' ) ) console.log(JSON.stringify(result)) } catch (e) { console.log('ERROR:', e) }
{- "data": {
- "total": 32504644,
- "dataset": [
- {
- "eventName": "event-name",
- "total": 32504644,
- "series": [
- {
- "time": "2024-01-01T00:00:00Z",
- "count": 15637145
}, - {
- "time": "2024-01-02T00:00:00Z",
- "count": 16867499
}
]
}
], - "pagination": {
- "current": "MA==",
- "totalEntries": 1
}
}
}
Get events that were filtered at Destination.
OK
Resource not found
Validation failure
Too many requests
import { configureApis, unwrap } from '@segment/public-api-sdk-typescript' const api = configureApis('/* Insert your Public API token here */') try { const result = await unwrap( api.deliveryOverview.getFilteredAtDestinationMetricsFromDeliveryOverview( 'rh5BDZp6QDHvXFCkibm1pR', 'fP7qoQw2HTWt9WdMr718gn', '2024-01-01T00:00:00Z', '2024-01-03T00:00:00Z', 'DAY' ) ) console.log(JSON.stringify(result)) } catch (e) { console.log('ERROR:', e) }
{- "data": {
- "total": 32504644,
- "dataset": [
- {
- "eventName": "event-name",
- "spaceId": "spa_123",
- "subscriptionId": "sub-id",
- "total": 32504644,
- "series": [
- {
- "time": "2024-01-01T00:00:00Z",
- "count": 15637145
}, - {
- "time": "2024-01-02T00:00:00Z",
- "count": 16867499
}
]
}
], - "pagination": {
- "current": "MA==",
- "totalEntries": 1
}
}
}
Get events that were filtered at Source.
OK
Resource not found
Validation failure
Too many requests
import { configureApis, unwrap } from '@segment/public-api-sdk-typescript' const api = configureApis('/* Insert your Public API token here */') try { const result = await unwrap( api.deliveryOverview.getFilteredAtSourceMetricsFromDeliveryOverview( 'rh5BDZp6QDHvXFCkibm1pR', '2024-01-01T00:00:00Z', '2024-01-03T00:00:00Z', 'DAY' ) ) console.log(JSON.stringify(result)) } catch (e) { console.log('ERROR:', e) }
{- "data": {
- "total": 32504644,
- "dataset": [
- {
- "eventName": "event-name",
- "spaceId": "spa_123",
- "subscriptionId": "sub-id",
- "total": 32504644,
- "series": [
- {
- "time": "2024-01-01T00:00:00Z",
- "count": 15637145
}, - {
- "time": "2024-01-02T00:00:00Z",
- "count": 16867499
}
]
}
], - "pagination": {
- "current": "MA==",
- "totalEntries": 1
}
}
}
Get events that failed on ingest.
OK
Resource not found
Validation failure
Too many requests
import { configureApis, unwrap } from '@segment/public-api-sdk-typescript' const api = configureApis('/* Insert your Public API token here */') try { const result = await unwrap( api.deliveryOverview.getIngressFailedMetricsFromDeliveryOverview( 'rh5BDZp6QDHvXFCkibm1pR', '2024-01-01T00:00:00Z', '2024-01-03T00:00:00Z', 'DAY' ) ) console.log(JSON.stringify(result)) } catch (e) { console.log('ERROR:', e) }
{- "data": {
- "total": 32504644,
- "dataset": [
- {
- "eventName": "event-name",
- "total": 32504644,
- "series": [
- {
- "time": "2024-01-01T00:00:00Z",
- "count": 15637145
}, - {
- "time": "2024-01-02T00:00:00Z",
- "count": 16867499
}
]
}
], - "pagination": {
- "current": "MA==",
- "totalEntries": 1
}
}
}
Get events that were successfully received by Segment.
OK
Resource not found
Validation failure
Too many requests
import { configureApis, unwrap } from '@segment/public-api-sdk-typescript' const api = configureApis('/* Insert your Public API token here */') try { const result = await unwrap( api.deliveryOverview.getIngressSuccessMetricsFromDeliveryOverview( 'rh5BDZp6QDHvXFCkibm1pR', '2024-01-01T00:00:00Z', '2024-01-03T00:00:00Z', 'DAY' ) ) console.log(JSON.stringify(result)) } catch (e) { console.log('ERROR:', e) }
{- "data": {
- "total": 32504644,
- "dataset": [
- {
- "eventName": "event-name",
- "total": 32504644,
- "series": [
- {
- "time": "2024-01-01T00:00:00Z",
- "count": 15637145
}, - {
- "time": "2024-01-02T00:00:00Z",
- "count": 16867499
}
]
}
], - "pagination": {
- "current": "MA==",
- "totalEntries": 1
}
}
}