Import table group

Prev Next
Post
/table/group/import

Create a new table group from a data model

Security
HTTP
Type bearer

Bearer token authentication. Include the token in the Authorization header: Authorization: Bearer <your-token>

Body parameters
Expand All
object
version
integer Required

Data model version for the received data

group
object (TableGroupImport) Required
group_name
string Required

Table group name

ds_id
string Required

Data source ID

table_prefix
string

Prefix to table names. Enforced into upper snake case. Maximum length is 15 characters. Appended with an underscore.

tables
Array of object (TableDefinition) Required

List of table objects

object
table_name
string Required

Table name. Enforced into upper snake case.

table_partition
string

Table partition. Either date or none.

Valid values[ "date", "none" ]
Default"date"
report_type
string | null

Data source report type. Required for some data sources.

fields
Array of string Required

List of field IDs for the table

string
fields
Array of object (FieldDefinition)

List of field objects

object
field_id
string Required

Field ID that appears in one of the table objects

target_name
string

Field name in target table. Defaults to field ID in lower snake case.

Responses
201

Table group imported successfully

Expand All
object
meta
object
request_id
string

API request ID

data
object (TableGroup)
@type
string
Valid values[ "table_group" ]
group_id
string

Supermetrics table group ID

name
string

Table group name

links
object
enclosure
object (ResourceURL)
href
string

Full URL to the resource

400

Import validation errors

object
error
string
Valid values[ "IMPORT_FIELD_ITEM_TYPE_INVALID", "IMPORT_PROPERTY_TYPE_INVALID", "IMPORT_TABLE_FIELD_TYPE_INVALID", "IMPORT_TABLE_ITEM_TYPE_INVALID", "IMPORT_VERSION_INVALID", "SCHEMA_DATA_SOURCE_FIELD_NOT_FOUND", "SCHEMA_DATA_SOURCE_ID_INVALID", "SCHEMA_NAME_REQUIRED", "SCHEMA_TABLE_FIELDS_REQUIRED", "SCHEMA_TABLE_NAME_REQUIRED", "SCHEMA_TABLE_ORDER_OUT_OF_RANGE", "SCHEMA_TABLE_PARTITION_INVALID", "SCHEMA_TABLE_REPORT_TYPE_NOT_FOUND", "SCHEMA_TABLE_TARGET_NAME_DUPLICATES", "SCHEMA_TABLES_REQUIRED", "SCHEMA_UNEXPECTED_FAILURE" ]
message
string
404

Requested table group was not found

object
error
string
Valid values[ "TABLE_GROUP_NOT_FOUND" ]
message
string
409

A table group with the same name already exists

object
error
string
Valid values[ "SCHEMA_NAME_DUPLICATE" ]
message
string
500

Failed to create a new table group

object
error
string
Valid values[ "TABLE_GROUP_CREATE_FAILED" ]
message
string