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.
Creates a new Profiles Warehouse.
• When called, this endpoint may generate the Profiles Sync Warehouse Created
event in the audit trail.
Created
Resource not found
Validation failure
Too many requests
{- "metadataId": "CCIl4HLQPz",
- "settings": {
- "username": "CONNECTOR_UNIT_TEST_USER",
- "password": "test_password",
- "auth_type": "password_auth",
- "account": "segment",
- "warehouse": "ENGINEERING",
- "database": "TEST_DB"
}, - "enabled": true
}
{- "data": {
- "profilesWarehouse": {
- "id": "qABd3NVTPfTLQ3kXWoBhgi",
- "spaceId": "9aQ1Lj62S4bomZKLF4DPqW",
- "workspaceId": "9aQ1Lj62S4bomZKLF4DPqW",
- "enabled": true,
- "metadata": {
- "id": "CCIl4HLQPz",
- "slug": "snowflake",
- "name": "Snowflake",
- "description": "Data warehouse built for the cloud",
- "logos": {
- "alt": ""
}, - "options": [ ]
}, - "settings": {
- "name": "Snowflake"
}
}
}
}
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.
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.profilesSync.listProfilesWarehouseInSpace('9aQ1Lj62S4bomZKLF4DPqW')) console.log(JSON.stringify(result)) } catch (e) { console.log('ERROR:', e) }
{- "data": {
- "profilesWarehouses": [
- {
- "id": "qABd3NVTPfTLQ3kXWoBhgi",
- "spaceId": "9aQ1Lj62S4bomZKLF4DPqW",
- "workspaceId": "9aQ1Lj62S4bomZKLF4DPqW",
- "enabled": true,
- "metadata": {
- "id": "CCIl4HLQPz",
- "slug": "snowflake",
- "name": "Snowflake",
- "description": "Data warehouse built for the cloud",
- "logos": {
- "alt": ""
}, - "options": [ ]
}, - "settings": {
- "name": "Snowflake"
}
}
]
}
}
Returns the schema for a Space Warehouse connection, including Collections and Properties.
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.profilesSync.listSelectiveSyncsFromWarehouseAndSpace('9aQ1Lj62S4bomZKLF4DPqW', 'fQyLbqjfwaqg9mr3hDQ7We')) console.log(JSON.stringify(result)) } catch (e) { console.log('ERROR:', e) }
{- "data": {
- "pagination": {
- "current": "MA==",
- "next": "MTAw",
- "totalEntries": 10
}, - "enableEventTables": true,
- "items": [
- {
- "warehouseId": "kYap2dzbkZMoBzBWfTvYcU",
- "collection": "tracks",
- "enabled": "true",
- "properties": {
- "amount": {
- "enabled": true,
- "type": "integer",
- "lastSeenAt": "2006-01-02T15:04:05.000Z",
- "createdAt": "2006-01-02T15:04:05.000Z"
}, - "context_library_name": {
- "enabled": true,
- "type": "string",
- "lastSeenAt": "2006-01-02T15:04:05.000Z",
- "createdAt": "2006-01-02T15:04:05.000Z"
}
}
}
]
}
}
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.
OK
Resource not found
Validation failure
Too many requests
{- "syncOverrides": [
- {
- "enabled": true,
- "collection": "tracks",
- "property": "context_ip"
}
]
}
{- "data": {
- "status": "UPDATED"
}
}
Deletes an existing Profiles Warehouse.
• When called, this endpoint may generate the Profiles Sync Warehouse Deleted
event in the audit trail.
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.profilesSync.removeProfilesWarehouseFromSpace('9aQ1Lj62S4bomZKLF4DPqW', 'qABd3NVTPfTLQ3kXWoBhgi')) console.log(JSON.stringify(result)) } catch (e) { console.log('ERROR:', e) }
{- "data": {
- "status": "SUCCESS"
}
}
Updates an existing Profiles Warehouse.
• When called, this endpoint may generate the Profiles Sync Warehouse Updated
event in the audit trail.
OK
Resource not found
Validation failure
Too many requests
{- "settings": { },
- "enabled": false,
- "name": "testing"
}
{- "data": {
- "profilesWarehouse": {
- "id": "3eadBBqVMQD2DEtaWXSkqA",
- "spaceId": "9aQ1Lj62S4bomZKLF4DPqW",
- "workspaceId": "9aQ1Lj62S4bomZKLF4DPqW",
- "enabled": false,
- "metadata": {
- "id": "CCIl4HLQPz",
- "slug": "snowflake",
- "name": "Snowflake",
- "description": "Data warehouse built for the cloud",
- "logos": {
- "alt": ""
}, - "options": [ ]
}, - "settings": {
- "name": "testing"
}
}
}
}