Profiles Sync

A Profiles Sync Warehouse is a central repository of data collected from your workspace. It is what commonly comes to mind when you think about a relational database: structured data that fits into rows and columns.

Using Segment’s Public API, you can create, delete, update, and list Spaces Warehouses connections.

Create Profiles Warehouse

Creates a new Profiles Warehouse.

• When called, this endpoint may generate the Profiles Sync Warehouse Created event in the audit trail.

Securitytoken
Request
path Parameters
spaceId
required
string [ 1 .. 255 ]
Example: 9aQ1Lj62S4bomZKLF4DPqW
Request Body schema: application/vnd.segment.v1alpha+json
required
metadataId
required
string (metadataId)

The Warehouse metadata to use.

name
string (name)

An optional human-readable name for this Warehouse.

enabled
boolean (enabled)

Enable to allow this Warehouse to receive data. Defaults to true.

required
object (settings)

A key-value object that contains instance-specific settings for a Warehouse.

Different kinds of Warehouses require different settings. The required and optional settings for a Warehouse are described in the options object of the associated Warehouse metadata.

You can find the full list of Warehouse metadata and related settings information in the /catalog/warehouses endpoint.

schemaName
string (schemaName)

The custom schema name that Segment uses on the Warehouse side. The space slug value is default otherwise. The schema name cannot be an existing schema name in the Warehouse. To use an existing schema name, please create a profiles Warehouse through the Segment app UI.

Responses
201

Created

404

Resource not found

422

Validation failure

429

Too many requests

post/spaces/{spaceId}/profiles-warehouses
Request samples
application/vnd.segment.v1alpha+json
{
  • "metadataId": "CCIl4HLQPz",
  • "settings": {
    },
  • "enabled": true
}
Response samples
application/vnd.segment.v1alpha+json
{}

List Profiles Warehouse in Space

Lists all Profile Warehouses for a given space id.

• When called, this endpoint may generate the Profiles Sync Warehouse Retrieved event in the audit trail.

Securitytoken
Request
path Parameters
spaceId
required
string [ 1 .. 255 ]
Example: 9aQ1Lj62S4bomZKLF4DPqW
query Parameters
object (PaginationInput)

Defines the pagination parameters.

This parameter exists in alpha.

Responses
200

OK

404

Resource not found

422

Validation failure

429

Too many requests

get/spaces/{spaceId}/profiles-warehouses
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.profilesSync.listProfilesWarehouseInSpace('9aQ1Lj62S4bomZKLF4DPqW'))
  console.log(JSON.stringify(result))
} catch (e) {
  console.log('ERROR:', e)
}
Response samples
application/vnd.segment.v1alpha+json
{}

List Selective Syncs from Warehouse And Space

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

Securitytoken
Request
path Parameters
spaceId
required
string [ 1 .. 255 ]
Example: 9aQ1Lj62S4bomZKLF4DPqW
warehouseId
required
string [ 1 .. 255 ]
Example: fQyLbqjfwaqg9mr3hDQ7We
query Parameters
object (PaginationInput)

Defines the pagination parameters.

This parameter exists in alpha.

Example: pagination=pagination.count=10
Responses
200

OK

404

Resource not found

422

Validation failure

429

Too many requests

get/spaces/{spaceId}/profiles-warehouses/{warehouseId}/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.profilesSync.listSelectiveSyncsFromWarehouseAndSpace('9aQ1Lj62S4bomZKLF4DPqW', 'fQyLbqjfwaqg9mr3hDQ7We'))
  console.log(JSON.stringify(result))
} catch (e) {
  console.log('ERROR:', e)
}
Response samples
application/vnd.segment.v1alpha+json
{
  • "data": {
    }
}

Update Selective Sync for Warehouse And Space

Updates the schema for a Space Warehouse connection, including Collections and Properties.

• When called, this endpoint may generate the Profiles Sync Warehouse Modified event in the audit trail.

Securitytoken
Request
path Parameters
spaceId
required
string [ 1 .. 255 ]
Example: 9aQ1Lj62S4bomZKLF4DPqW
warehouseId
required
string [ 1 .. 255 ]
Example: qABd3NVTPfTLQ3kXWoBhgi
Request Body schema: application/vnd.segment.v1alpha+json
required
Array of objects (syncOverrides)

A list of sync Schema overrides to apply to this Space Warehouse. Note: Selective Sync is not supported if the enableEventTables flag is false.

enableEventTables
boolean (enableEventTables)

A flag to enable or disable all event Tables. This field is optional.

Responses
200

OK

404

Resource not found

422

Validation failure

429

Too many requests

patch/spaces/{spaceId}/profiles-warehouses/{warehouseId}/selective-syncs
Request samples
application/vnd.segment.v1alpha+json
{
  • "syncOverrides": [
    ]
}
Response samples
application/vnd.segment.v1alpha+json
{
  • "data": {
    }
}

Remove Profiles Warehouse from Space

Deletes an existing Profiles Warehouse.

• When called, this endpoint may generate the Profiles Sync Warehouse Deleted event in the audit trail.

Securitytoken
Request
path Parameters
spaceId
required
string [ 1 .. 255 ]
Example: 9aQ1Lj62S4bomZKLF4DPqW
warehouseId
required
string [ 1 .. 255 ]
Example: qABd3NVTPfTLQ3kXWoBhgi
Responses
200

OK

404

Resource not found

422

Validation failure

429

Too many requests

delete/spaces/{spaceId}/profiles-warehouses/{warehouseId}
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.profilesSync.removeProfilesWarehouseFromSpace('9aQ1Lj62S4bomZKLF4DPqW', 'qABd3NVTPfTLQ3kXWoBhgi'))
  console.log(JSON.stringify(result))
} catch (e) {
  console.log('ERROR:', e)
}
Response samples
application/vnd.segment.v1alpha+json
{
  • "data": {
    }
}

Update Profiles Warehouse for Space Warehouse

Updates an existing Profiles Warehouse.

• When called, this endpoint may generate the Profiles Sync Warehouse Updated event in the audit trail.

Securitytoken
Request
path Parameters
spaceId
required
string [ 1 .. 255 ]
Example: 9aQ1Lj62S4bomZKLF4DPqW
warehouseId
required
string [ 1 .. 255 ]
Example: 3eadBBqVMQD2DEtaWXSkqA
Request Body schema: application/vnd.segment.v1alpha+json
required
name
string (name)

An optional human-readable name for this Warehouse.

enabled
boolean (enabled)

Enable to allow this Warehouse to receive data. Defaults to true.

required
object (settings)

A key-value object that contains instance-specific settings for a Warehouse.

Different kinds of Warehouses require different settings. The required and optional settings for a Warehouse are described in the options object of the associated Warehouse metadata.

You can find the full list of Warehouse metadata and related settings information in the /catalog/warehouses endpoint.

schemaName
string (schemaName)

The custom schema name that Segment uses on the Warehouse side. The space slug value is default otherwise.

Responses
200

OK

404

Resource not found

422

Validation failure

429

Too many requests

patch/spaces/{spaceId}/profiles-warehouses/{warehouseId}
Request samples
application/vnd.segment.v1alpha+json
{
  • "settings": { },
  • "enabled": false,
  • "name": "testing"
}
Response samples
application/vnd.segment.v1alpha+json
{}