Selective Sync

Warehouse Selective Sync allows you to manage the data that you send to your Warehouses. You can use this feature to stop syncing specific events (also known as collections) or properties that aren’t relevant, and may slow down your Warehouse syncs.

Get Advanced Sync Schedule from Warehouse

Returns the advanced sync schedule for a Warehouse.

The rate limit for this endpoint is 2 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.

Securitytoken
Request
path Parameters
warehouseId
required
string [ 1 .. 255 ]
Example: kjU72LCJexvrqL7G4TMHHN
Responses
200

OK

404

Resource not found

422

Validation failure

429

Too many requests

get/warehouses/{warehouseId}/advanced-sync-schedule
Request samples
import { configureApis, unwrap } from '@segment/public-api-sdk-typescript'

const api = configureApis('/* Insert your Public API token here */')

try {
  const result = await unwrap(api.selectiveSync.getAdvancedSyncScheduleFromWarehouse('kjU72LCJexvrqL7G4TMHHN'))
  console.log(JSON.stringify(result))
} catch (e) {
  console.log('ERROR:', e)
}
Response samples
{
  • "data": {
    }
}

Replace Advanced Sync Schedule for Warehouse

Updates the advanced sync schedule for a Warehouse, replacing the sync schedule with a new schedule.

The rate limit for this endpoint is 2 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.

Securitytoken
Request
path Parameters
warehouseId
required
string [ 1 .. 255 ]
Example: kjU72LCJexvrqL7G4TMHHN
Request Body schema:
required
enabled
required
boolean (enabled)

Enable to turn on an advanced sync schedule for the Warehouse.

object (schedule)

The full sync schedule for the Warehouse.

Responses
200

OK

404

Resource not found

422

Validation failure

429

Too many requests

put/warehouses/{warehouseId}/advanced-sync-schedule
Request samples
{
  • "enabled": true,
  • "schedule": {
    }
}
Response samples
{
  • "data": {
    }
}

List Selective Syncs from Warehouse And Source

Returns the schema for a Warehouse, including Sources, Collections, and Properties.

The rate limit for this endpoint is 2 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.

Securitytoken
Request
path Parameters
warehouseId
required
string [ 1 .. 255 ]
Example: kjU72LCJexvrqL7G4TMHHN
sourceId
required
string [ 1 .. 255 ]
Example: rh5BDZp6QDHvXFCkibm1pR
query Parameters
object (PaginationInput)

Defines the pagination parameters.

This parameter exists in v1.

Example: pagination=pagination.count=2
Responses
200

OK

404

Resource not found

422

Validation failure

429

Too many requests

get/warehouses/{warehouseId}/connected-sources/{sourceId}/selective-syncs
Request samples
import { configureApis, unwrap } from '@segment/public-api-sdk-typescript'

const api = configureApis('/* Insert your Public API token here */')

try {
  const result = await unwrap(
    api.selectiveSync.listSelectiveSyncsFromWarehouseAndSource('kjU72LCJexvrqL7G4TMHHN', 'rh5BDZp6QDHvXFCkibm1pR')
  )
  console.log(JSON.stringify(result))
} catch (e) {
  console.log('ERROR:', e)
}
Response samples
{
  • "data": {
    }
}

List Syncs from Warehouse

Returns the overview of syncs for every Source connected to a Warehouse.

The rate limit for this endpoint is 2 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.

Securitytoken
Request
path Parameters
warehouseId
required
string [ 1 .. 255 ]
Example: kjU72LCJexvrqL7G4TMHHN
query Parameters
object (PaginationInput)

Defines the pagination parameters.

This parameter exists in v1.

Example: pagination=pagination.count=5
Responses
200

OK

404

Resource not found

422

Validation failure

429

Too many requests

get/warehouses/{warehouseId}/syncs
Request samples
import { configureApis, unwrap } from '@segment/public-api-sdk-typescript'

const api = configureApis('/* Insert your Public API token here */')

try {
  const result = await unwrap(api.selectiveSync.listSyncsFromWarehouse('kjU72LCJexvrqL7G4TMHHN'))
  console.log(JSON.stringify(result))
} catch (e) {
  console.log('ERROR:', e)
}
Response samples
{
  • "data": {
    }
}

List Syncs from Warehouse And Source

Returns the overview of syncs for a Source connected to a Warehouse.

The rate limit for this endpoint is 2 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.

Securitytoken
Request
path Parameters
warehouseId
required
string [ 1 .. 255 ]
Example: kjU72LCJexvrqL7G4TMHHN
sourceId
required
string [ 1 .. 255 ]
Example: rh5BDZp6QDHvXFCkibm1pR
query Parameters
object (PaginationInput)

Defines the pagination parameters.

This parameter exists in v1.

Example: pagination=pagination.count=2
Responses
200

OK

404

Resource not found

422

Validation failure

429

Too many requests

get/warehouses/{warehouseId}/connected-sources/{sourceId}/syncs
Request samples
import { configureApis, unwrap } from '@segment/public-api-sdk-typescript'

const api = configureApis('/* Insert your Public API token here */')

try {
  const result = await unwrap(api.selectiveSync.listSyncsFromWarehouseAndSource('kjU72LCJexvrqL7G4TMHHN', 'rh5BDZp6QDHvXFCkibm1pR'))
  console.log(JSON.stringify(result))
} catch (e) {
  console.log('ERROR:', e)
}
Response samples
{
  • "data": {
    }
}

Update Selective Sync for Warehouse

Configures the schema for a Warehouse, including Sources, Collections, and Properties.

• When called, this endpoint may generate the Storage Destination Modified event in the audit trail.

The rate limit for this endpoint is 2 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.

Securitytoken
Request
path Parameters
warehouseId
required
string [ 1 .. 255 ]
Example: kjU72LCJexvrqL7G4TMHHN
Request Body schema:
required
required
Array of objects (syncOverrides)

A list of sync schema overrides to apply to this Warehouse.

Responses
200

OK

404

Resource not found

422

Validation failure

429

Too many requests

patch/warehouses/{warehouseId}/selective-sync
Request samples
{
  • "syncOverrides": [
    ]
}
Response samples
{
  • "data": {
    }
}