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.
OK
Resource not found
Validation failure
Too many requests
{- "metadataId": "CCIl4HLQPz",
- "settings": {
- "host": "redshift.aws.compute",
- "password": "banana",
- "token": "phone"
}, - "enabled": true,
- "name": "123"
}
{- "data": {
- "profilesWarehouse": {
- "id": "w_123",
- "spaceId": "9aQ1Lj62S4bomZKLF4DPqW",
- "workspaceId": "wk_123",
- "enabled": true,
- "metadata": {
- "id": "CCIl4HLQPz",
- "slug": "snowflake",
- "name": "Snowflake",
- "description": "Data warehouse built for the cloud",
- "logos": {
- "alt": ""
}, - "options": [ ]
}, - "settings": {
- "host": "redshift.aws.compute",
- "password": "<redacted>",
- "token": "<redacted>"
}
}
}
}
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": "w_123",
- "spaceId": "9aQ1Lj62S4bomZKLF4DPqW",
- "workspaceId": "wk_123",
- "enabled": true,
- "metadata": {
- "id": "CCIl4HLQPz",
- "slug": "snowflake",
- "name": "Snowflake",
- "description": "Data warehouse built for the cloud",
- "logos": {
- "alt": ""
}, - "options": [ ]
}, - "settings": {
- "host": "redshift.aws.compute",
- "password": "<redacted>",
- "token": "<redacted>"
}
}
]
}
}
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', 'kjU72LCJexvrqL7G4TMHHN')) 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": {
- "host": "redshift.aws.compute",
- "password": "banana",
- "token": "phone"
}, - "enabled": true,
- "name": "123"
}
{- "data": {
- "profilesWarehouse": {
- "id": "w_123",
- "spaceId": "9aQ1Lj62S4bomZKLF4DPqW",
- "workspaceId": "wk_123",
- "enabled": true,
- "metadata": {
- "id": "CCIl4HLQPz",
- "slug": "snowflake",
- "name": "Snowflake",
- "description": "Data warehouse built for the cloud",
- "logos": {
- "alt": ""
}, - "options": [ ]
}, - "settings": {
- "host": "redshift.aws.compute",
- "password": "<redacted>",
- "token": "<redacted>"
}
}
}
}