SDK Client Methods
Complete reference for all TitanRDMClient methods. These methods allow you to browse TitanRDM metadata — branches, domains, deployed table definitions, and import mappings — without hard-coding IDs.
Branches
Branches in TitanRDM represent isolated environments for managing data (e.g. prod, dev, feature branches).
List All Branches
from titan_rdm_sdk import TitanRDMClient
client = TitanRDMClient(url=URL, client_id=ID, client_secret=SECRET)
branches = client.get_branches()
print(f"Found {len(branches)} branch(es)")
for b in branches:
print(f" [{b.id}] {b.name} (type={b.branch_type}, status={b.status})")
Returns: list[Branch]
Get Branch by ID
branch = client.get_branch(branch_id=5)
print(f"Branch: {branch.name}, status={branch.status}")
Parameters:
| Parameter | Type | Required | Description |
branch_id | int | Yes | The branch ID |
Returns: Branch
Get Branch by Name
branch = client.get_branch_by_name("prod")
print(f"Branch: id={branch.id}, name={branch.name}")
For dev (private) branches, specify the owner_id to disambiguate:
branch = client.get_branch_by_name("dev", owner_id=1)
Parameters:
| Parameter | Type | Required | Description |
name | str | Yes | Exact branch name |
owner_id | int | No | Owner user ID (for private branches) |
Returns: Branch
Branch Object Properties
| Property | Type | Description |
id | int | Branch ID |
name | str | Branch name |
description | str | Branch description |
branch_type | str | 'shared' or 'private' |
status | str | 'open' or 'closed' |
database_suffix | str | Database suffix for this branch |
is_default_dev_branch | bool | Whether this is the default dev branch |
is_integration_branch | bool | Whether this is an integration branch |
parent_branch_id | int | Parent branch ID (if any) |
parent_branch_name | str | Parent branch name (if any) |
owner_id | int | Owner user ID (if private) |
owner_email | str | Owner email (if private) |
created_at | str | ISO 8601 creation timestamp |
updated_at | str | ISO 8601 last-updated timestamp |
Domains
Domains are logical groupings of tables in TitanRDM (e.g. "Customer Data", "Clinics").
List All Domains
domains = client.get_domains()
print(f"Found {len(domains)} domain(s)")
for d in domains:
print(f" [{d.id}] {d.name} (abbrev={d.abbreviation})")
Returns: list[Domain]
Get Domain by ID
domain = client.get_domain(domain_id=1)
print(f"Domain: {domain.name}")
Parameters:
| Parameter | Type | Required | Description |
domain_id | int | Yes | The domain ID |
Returns: Domain
Get Domain by Name
domain = client.get_domain_by_name("Customer Data")
print(f"Domain: id={domain.id}, abbreviation={domain.abbreviation}")
Parameters:
| Parameter | Type | Required | Description |
name | str | Yes | Exact domain name |
Returns: Domain
Domain Object Properties
| Property | Type | Description |
id | int | Domain ID |
name | str | Domain name |
abbreviation | str | Short abbreviation (used in table naming conventions) |
description | str | Domain description |
created_at | str | ISO 8601 creation timestamp |
updated_at | str | ISO 8601 last-updated timestamp |
Deployed Table Definitions
Deployed table definitions represent tables that have been deployed to a branch and are available for data operations.
List Deployed Tables (by Branch + Domain)
tables = client.get_deployed_table_definitions(
branch_id=5,
domain_id=1,
)
print(f"Found {len(tables)} deployed table(s)")
for t in tables:
print(f" [{t.id}] {t.name} → {t.database_table_name} ({len(t.column_definitions)} columns)")
Parameters:
| Parameter | Type | Required | Description |
branch_id | int | Yes | The branch ID |
domain_id | int | No | Filter by domain ID |
Returns: list[DeployedTableDefinition]
Get Deployed Table by Key
table = client.get_deployed_table_definition(
key="uuid-key-here",
branch_id=5,
)
print(f"Table: {table.name} → {table.database_table_name}")
print(f"Domain: {table.domain_name}")
for col in table.column_definitions:
pk = " [PK]" if col.is_primary_key else ""
req = " NOT NULL" if col.is_required else ""
print(f" {col.name}: {col.data_type}{pk}{req}")
Parameters:
| Parameter | Type | Required | Description |
key | str | Yes | Table definition UUID key |
branch_id | int | Yes | The branch ID |
Returns: DeployedTableDefinition
DeployedTableDefinition Properties
| Property | Type | Description |
id | int | Deployed table definition ID |
key | str | UUID key |
name | str | Table name (display name in TitanRDM) |
database_table_name | str | Physical table name (e.g. t_cust_customers) |
domain_id | int | Domain ID |
domain_name | str | Domain name |
domain_abbreviation | str | Domain abbreviation |
branch_id | int | Branch ID |
branch_name | str | Branch name |
column_definitions | list[DeployedColumnDefinition] | Column definitions |
created_at | str | ISO 8601 creation timestamp |
updated_at | str | ISO 8601 last-updated timestamp |
DeployedColumnDefinition Properties
| Property | Type | Description |
id | int | Column ID |
key | str | Column UUID key |
name | str | Column name |
data_type | str | Data type (e.g. 'integer', 'varchar') |
length | int | Length constraint (for varchar) |
is_primary_key | bool | Part of the primary key |
is_required | bool | NOT NULL constraint |
display_order | int | Display ordering |
is_deleted | bool | Soft-deleted flag |
description | str | Column description |
Import Mappings
Import mappings define how source data columns map to target table columns during uploads.
Get Default Import Mapping
import_mapping = client.get_default_import_mapping(table_definition_id=42)
print(f"Mapping: {import_mapping.name} (key={import_mapping.key})")
Parameters:
| Parameter | Type | Required | Description |
table_definition_id | int | Yes | The table definition ID |
Returns: ImportMapping
Get Import Mapping by Key
import_mapping = client.get_import_mapping_by_key(
table_definition_id=42,
key="uuid-mapping-key",
)
Parameters:
| Parameter | Type | Required | Description |
table_definition_id | int | Yes | The table definition ID |
key | str | Yes | Import mapping UUID key |
Returns: ImportMapping
ImportMapping Properties
| Property | Type | Description |
id | int | Import mapping ID |
key | str | UUID key |
table_definition_id | int | Parent table definition ID |
table_definition_name | str | Parent table name |
name | str | Mapping name |
is_default | bool | Whether this is the default mapping |
branch_id | int | Associated branch ID |
branch_name | str | Associated branch name |
mapping_config | dict | Column mapping configuration |
created_at | str | ISO 8601 creation timestamp |
updated_at | str | ISO 8601 last-updated timestamp |
Complete Discovery Example
A typical workflow to discover the metadata you need:
from titan_rdm_sdk import TitanRDMClient
client = TitanRDMClient(url=URL, client_id=ID, client_secret=SECRET)
# 1. Find your branch
branch = client.get_branch_by_name("prod")
# 2. List domains
domains = client.get_domains()
# 3. Get deployed tables for each domain
for domain in domains:
tables = client.get_deployed_table_definitions(
branch_id=branch.id,
domain_id=domain.id,
)
print(f"[{domain.abbreviation}] {domain.name}: {len(tables)} table(s)")
for t in tables:
print(f" → {t.database_table_name} (key={t.key})")
Next Steps
- Uploading Data — Use table definitions and mappings to upload data
- Downloading Data — Export data using table definition keys
- Convention Sync — Automate sync without hard-coding table lists