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

Table group import data including version, group configuration, and table definitions

{
  "version": 1,
  "group": {
    "group_name": "Marketing Analytics",
    "ds_id": "GAWA",
    "table_prefix": "MKT"
  },
  "tables": [
    {
      "table_name": "SESSIONS",
      "table_partition": "date",
      "fields": [
        "session_id",
        "date",
        "users"
      ]
    }
  ],
  "fields": [
    {
      "field_id": "session_id",
      "target_name": "session_id"
    },
    {
      "field_id": "date",
      "target_name": "session_date"
    },
    {
      "field_id": "users",
      "target_name": "user_count"
    }
  ]
}
Expand All
object
version
integer (int32) Required

Data model version for the received data

Minimum1
Maximum100
group
object (TableGroupImport) Required
group_name
string Required

Table group name

Max length255
ds_id
string Required

Data source ID

Max length50
table_prefix
string

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

Max length15
tables
Array of object (TableDefinition) Required

List of table objects

Max items1000
object
table_name
string Required

Table name. Enforced into upper snake case.

Max length255
table_partition
string

Table partition. Either date or none.

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

Data source report type. Required for some data sources.

Max length255
fields
Array of string Required

List of field IDs for the table

Max items1000
string
Max length100
fields
Array of object (FieldDefinition)

List of field objects

Max items10000
object
field_id
string Required

Field ID that appears in one of the table objects

Max length100
target_name
string

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

Max length255
Responses
201

Table group imported successfully

Headers
Content-Type
string
HTTP response content type
Valid values[ "application/json" ]
Max length255
Exampleapplication/json
X-RateLimit-Limit
integer
Request limit per hour
Minimum1
Maximum10000
Example100
X-RateLimit-Remaining
integer
Remaining requests in current window
Minimum0
Maximum10000
Example49
Access-Control-Allow-Origin
string
CORS header
Valid values[ "*" ]
Max length255
Example*
Location
string
API URL of the created item
Max length255
Exampleitems/{id}
Expand All
object
meta
object (ResponseMeta)
request_id
string

API request ID

Max length50
Pattern^[A-Za-z0-9_-]+$
data
object (TableGroup)
@type
string
Valid values[ "table_group" ]
group_id
string

Supermetrics table group ID

Max length50
name
string

Table group name

Max length255
links
object
enclosure
object (ResourceURL)
href
string

Full URL to the resource

Max length500
400

Table Group Import Error

Headers
Content-Type
string
HTTP response content type
Valid values[ "application/json" ]
Max length255
Exampleapplication/json
X-RateLimit-Limit
integer
Request limit per hour
Minimum1
Maximum10000
Example100
X-RateLimit-Remaining
integer
Remaining requests in current window
Minimum0
Maximum10000
Example49
Access-Control-Allow-Origin
string
CORS header
Valid values[ "*" ]
Max length255
Example*
object
error
string
Valid values[ "TABLE_GROUP_IMPORT_ERROR" ]
Max length100
message
string
Max length255
401

Unauthorized - invalid or missing authentication

Headers
Content-Type
string
HTTP response content type
Valid values[ "application/json" ]
Max length255
Exampleapplication/json
X-RateLimit-Limit
integer
Request limit per hour
Minimum1
Maximum10000
Example100
X-RateLimit-Remaining
integer
Remaining requests in current window
Minimum0
Maximum10000
Example49
Access-Control-Allow-Origin
string
CORS header
Valid values[ "*" ]
Max length255
Example*
Expand All
object
meta
object (ResponseMeta)
request_id
string

API request ID

Max length50
Pattern^[A-Za-z0-9_-]+$
error
object (Error)
code
string

Error code

Max length100
ExampleACCESS_TOKEN_INVALID
message
string

Error message

Max length255
ExampleInvalid Access Token
description
string

Error description

Max length255
ExampleProvided access token is either missing, invalid or expired.
404

Table Group Not Found

Headers
Content-Type
string
HTTP response content type
Valid values[ "application/json" ]
Max length255
Exampleapplication/json
X-RateLimit-Limit
integer
Request limit per hour
Minimum1
Maximum10000
Example100
X-RateLimit-Remaining
integer
Remaining requests in current window
Minimum0
Maximum10000
Example49
Access-Control-Allow-Origin
string
CORS header
Valid values[ "*" ]
Max length255
Example*
object
error
string
Valid values[ "TABLE_GROUP_NOT_FOUND" ]
Max length100
message
string
Max length255
409

Table Group Name Conflict

Headers
Content-Type
string
HTTP response content type
Valid values[ "application/json" ]
Max length255
Exampleapplication/json
X-RateLimit-Limit
integer
Request limit per hour
Minimum1
Maximum10000
Example100
X-RateLimit-Remaining
integer
Remaining requests in current window
Minimum0
Maximum10000
Example49
Access-Control-Allow-Origin
string
CORS header
Valid values[ "*" ]
Max length255
Example*
object
error
string
Valid values[ "TABLE_GROUP_NAME_CONFLICT" ]
Max length100
message
string
Max length255
422

Unprocessable Entity - request validation failed

Headers
Content-Type
string
HTTP response content type
Valid values[ "application/json" ]
Max length255
Exampleapplication/json
X-RateLimit-Limit
integer
Request limit per hour
Minimum1
Maximum10000
Example100
X-RateLimit-Remaining
integer
Remaining requests in current window
Minimum0
Maximum10000
Example49
Access-Control-Allow-Origin
string
CORS header
Valid values[ "*" ]
Max length255
Example*
Expand All
object
meta
object (ResponseMeta)
request_id
string

API request ID

Max length50
Pattern^[A-Za-z0-9_-]+$
error
object (Error)
code
string

Error code

Max length100
ExampleACCESS_TOKEN_INVALID
message
string

Error message

Max length255
ExampleInvalid Access Token
description
string

Error description

Max length255
ExampleProvided access token is either missing, invalid or expired.
429

Too Many Requests - rate limit exceeded

Headers
Content-Type
string
HTTP response content type
Valid values[ "application/json" ]
Max length255
Exampleapplication/json
X-RateLimit-Limit
integer
Request limit per hour
Minimum1
Maximum10000
Example100
X-RateLimit-Remaining
integer
Remaining requests in current window
Minimum0
Maximum10000
Example49
Retry-After
integer
Number of seconds to wait before making another request
Minimum1
Maximum3600
Access-Control-Allow-Origin
string
CORS header
Valid values[ "*" ]
Max length255
Example*
Expand All
object
meta
object (ResponseMeta)
request_id
string

API request ID

Max length50
Pattern^[A-Za-z0-9_-]+$
error
object (Error)
code
string

Error code

Max length100
ExampleACCESS_TOKEN_INVALID
message
string

Error message

Max length255
ExampleInvalid Access Token
description
string

Error description

Max length255
ExampleProvided access token is either missing, invalid or expired.
500

Table Group Create Failed

Headers
Content-Type
string
HTTP response content type
Valid values[ "application/json" ]
Max length255
Exampleapplication/json
X-RateLimit-Limit
integer
Request limit per hour
Minimum1
Maximum10000
Example100
X-RateLimit-Remaining
integer
Remaining requests in current window
Minimum0
Maximum10000
Example49
Access-Control-Allow-Origin
string
CORS header
Valid values[ "*" ]
Max length255
Example*
object
error
string
Valid values[ "TABLE_GROUP_CREATE_FAILED" ]
Max length100
message
string
Max length255