Returns a list of Entity Paths for a Space.
• This endpoint is in Alpha testing. Please submit any feedback by sending an email to friends@segment.com.
The rate limit for this endpoint is 25 requests per minute, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See Rate Limiting for more information.
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.spaceSchema.listEntityPaths('spaceId')) console.log(JSON.stringify(result)) } catch (e) { console.log('ERROR:', e) }
{- "data": {
- "entityPaths": [
- {
- "id": "path-1",
- "entityName": "My Entity",
- "pathName": "Root > My Entity",
- "entitySlug": "my-entity",
- "relationshipSlugs": [
- "rel-a",
- "rel-b"
], - "childRelationshipSlugs": [
- "rel-c"
], - "parentRelationshipSlugPath": "rel-a:rel-b"
}
], - "pagination": {
- "current": "MA=="
}
}
}Returns a list of Events for a Space.
• This endpoint is in Alpha testing. Please submit any feedback by sending an email to friends@segment.com.
The rate limit for this endpoint is 25 requests per minute, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See Rate Limiting for more information.
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.spaceSchema.listEvents('spaceId')) console.log(JSON.stringify(result)) } catch (e) { console.log('ERROR:', e) }
{- "data": {
- "events": [
- {
- "name": "Order Completed",
- "type": "TRACK",
- "lastSeenAt": "2006-01-02T15:04:05.000Z"
}
], - "pagination": {
- "current": "MA=="
}
}
}Returns a list of Properties for an Entity in a Space.
• This endpoint is in Alpha testing. Please submit any feedback by sending an email to friends@segment.com.
pagination.previous field is always absent; use pagination.next to advance through pages.The rate limit for this endpoint is 25 requests per minute, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See Rate Limiting for more information.
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.spaceSchema.listPropertiesFromEntity('spaceId', 'my-entity')) console.log(JSON.stringify(result)) } catch (e) { console.log('ERROR:', e) }
{- "data": {
- "entityProperties": [
- {
- "name": "email",
- "primaryKey": false,
- "dataType": "string"
}
], - "pagination": {
- "current": "MA=="
}
}
}Returns a list of Properties for an Event in a Space.
• This endpoint is in Alpha testing. Please submit any feedback by sending an email to friends@segment.com.
The rate limit for this endpoint is 25 requests per minute, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See Rate Limiting for more information.
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.spaceSchema.listPropertiesFromEvent('spaceId', 'Order Completed')) console.log(JSON.stringify(result)) } catch (e) { console.log('ERROR:', e) }
{- "data": {
- "eventProperties": [
- {
- "name": "revenue",
- "type": "PROPERTY",
- "eventName": "Order Completed",
- "lastSeenAt": "2006-01-02T15:04:05.000Z"
}
], - "pagination": {
- "current": "MA=="
}
}
}Returns sample values for an Entity Property in a Space.
• This endpoint is in Alpha testing. Please submit any feedback by sending an email to friends@segment.com.
The rate limit for this endpoint is 25 requests per minute, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See Rate Limiting for more information.
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.spaceSchema.listSampleValuesFromEntityProperty('spaceId', 'my-entity', 'email')) console.log(JSON.stringify(result)) } catch (e) { console.log('ERROR:', e) }
{- "data": {
- "sampleValues": [
- "a@example.com",
- "b@example.com",
- "c@example.com"
]
}
}Returns sample values for an Event Property in a Space.
• This endpoint is in Alpha testing. Please submit any feedback by sending an email to friends@segment.com.
The rate limit for this endpoint is 25 requests per minute, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See Rate Limiting for more information.
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.spaceSchema.listSampleValuesFromEventProperty('spaceId', 'Order Completed', 'revenue', 'property')) console.log(JSON.stringify(result)) } catch (e) { console.log('ERROR:', e) }
{- "data": {
- "sampleValues": [
- "99.99",
- "49.99",
- "19.99",
- "9.99"
]
}
}Returns sample values for a Trait in a Space.
• This endpoint is in Alpha testing. Please submit any feedback by sending an email to friends@segment.com.
The rate limit for this endpoint is 25 requests per minute, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See Rate Limiting for more information.
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.spaceSchema.listSampleValuesFromTrait('spaceId', 'email')) console.log(JSON.stringify(result)) } catch (e) { console.log('ERROR:', e) }
{- "data": {
- "sampleValues": [
- "a@example.com",
- "b@example.com",
- "c@example.com"
]
}
}Returns a list of Traits for a Space.
• This endpoint is in Alpha testing. Please submit any feedback by sending an email to friends@segment.com.
pagination.previous field is always absent; use pagination.next to advance through pages.lastSeenAt, results are fully deduplicated for Spaces with up to 2,500 traits. For Spaces with more than 2,500 traits, duplicate trait entries may appear across pages due to an internal pagination tradeoff. Sorting by trait is not affected.The rate limit for this endpoint is 25 requests per minute, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See Rate Limiting for more information.
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.spaceSchema.listTraits('spaceId')) console.log(JSON.stringify(result)) } catch (e) { console.log('ERROR:', e) }
{- "data": {
- "traits": [
- {
- "trait": "email",
- "type": "CUSTOM",
- "lastSeenAt": "2006-01-02T15:04:05.000Z"
}
], - "pagination": {
- "current": "MA=="
}
}
}