Query Interface
For each location in each channel calculate whichtables are captured and integrated, their schema and basenames, and latency SLA.
GET/api/v6.1/hubs/{hub}/query/channels
| Query parameters | Prototype:
'channel' ?: ( <ident>+ )
'loc' ?: ( <ident>+ )
'fetch' ?: ( 'tables' | 'latency_sla'+ )
'table' ?: ( <ident>+ )
|
| Request headers | None |
| Request body | None |
| Response headers | None |
| Response body (JSON) | Prototype:
chn<ident> *: {
'locs' : {
loc<ident> *: {
'capture' : <bool>
'integrate' : <bool>
'capture_tables' ?: <int>
'integrate_tables' ?: <int>
'cap_integ_tables' ?: <int>
'latency_sla_current' ?: secs<int>
'tables' ?: {
tablename<ident> *: {
'schema' ?: <str>
'base_name' ?: <str>
'capture' ?: <bool>
'integrate' ?: <bool>
}
}
}
}
}
|
| Status codes | ✅ 200 OK ❌ 400 Bad Request ❌ 404 Not Found: Hub does not exist |
| Required permissions | ReadOnly access level on hub |
For each location calculate which tables are capturedand integrated, their schema and basenames, and latency SLA.
GET/api/v6.1/hubs/{hub}/query/channels/{channel}/locs
| Query parameters | Prototype:
'loc' ?: ( <ident>+ )
'fetch' ?: ( 'tables' | 'latency_sla'+ )
'table' ?: ( <ident>+ )
|
| Request headers | None |
| Request body | None |
| Response headers | None |
| Response body (JSON) | Prototype:
loc<ident> *: {
'capture' : <bool>
'integrate' : <bool>
'capture_tables' ?: <int>
'integrate_tables' ?: <int>
'cap_integ_tables' ?: <int>
'latency_sla_current' ?: secs<int>
'tables' ?: {
tablename<ident> *: {
'schema' ?: <str>
'base_name' ?: <str>
'capture' ?: <bool>
'integrate' ?: <bool>
}
}
}
|
| Status codes | ✅ 200 OK ❌ 400 Bad Request ❌ 404 Not Found: Channel does not exist |
| Required permissions | ReadOnly access level on hub |
Calculate how table is defined for a location, including effect of actions
GET/api/v6.1/hubs/{hub}/query/channels/{channel}/locs/{loc}/tables/{table}
| Query parameters | Prototype:
'context' ?: ( <ident>* )
|
| Request headers | None |
| Request body | None |
| Response headers | None |
| Response body (JSON) | Prototype:
'schema' ?: <str>
'schema_type' ?: 'configured' | 'discovered'
'base_name' : <str>
'capture' : <bool>
'integrate' : <bool>
'key_mode' : 'explicit' | 'implicit' | 'duplicate_rows'
'cols' : (
{
'hvrcolname' : <str>
'basecolname' ?: <str>
'core' ?: {
'sequence' : <int>
'key' ?: <int>
'distrib_key' ?: <int>
'data_type' : <str>
'attributes' ?: {
'encoding' ?: <str>
'nullable' ?: <bool>
'charlen' ?: <int64_ascii>
'bytelen' ?: <int64_ascii>
'prec' ?: <int>
'scale' ?: <int>
'timeprec' ?: <int>
'dayprec' ?: <int>
'yearprec' ?: <int>
'bitlen' ?: <int>
}
}
'with_col_props' ?: {
'sequence' : <int>
'key' ?: <int>
'distrib_key' ?: <int>
'data_type' : <str>
'attributes' ?: {
'encoding' ?: <str>
'nullable' ?: <bool>
'charlen' ?: <int64_ascii>
'bytelen' ?: <int64_ascii>
'prec' ?: <int>
'scale' ?: <int>
'timeprec' ?: <int>
'dayprec' ?: <int>
'yearprec' ?: <int>
'bitlen' ?: <int>
}
'localize_type_change' : <bool>
'sql_data_type' ?: <str>
'other_props' : {
'BaseName' ?: <str>
'SoftDelete' ?: <true>
'Extra' ?: <true>
'CaptureExpression' ?: <str>
'IntegrateExpression' ?: <str>
'TimeKey' ?: <true>
'CaptureFromRowId' ?: <true>
'DistributionKey' ?: <true>
'SurrogateKey' ?: <true>
}
}
}*
)
|
| Status codes | ✅ 200 OK ❌ 400 Bad Request |
| Required permissions | ReadOnly access level on hub |
For each table calculate its schema, basename, and the lists of locations where the table is captured or integrated
GET/api/v6.1/hubs/{hub}/query/channels/{channel}/tables
| Query parameters | Prototype:
|
| Request headers | None |
| Request body | None |
| Response headers | None |
| Response body (JSON) | Prototype:
table<ident> *: {
'schema_bases' ?: (
{
'schema' ?: <str>
'schema_type' ?: 'configured' | 'discovered'
'base_name' : <str>
'cap_locs' ?: ( <ident>* )
'integ_locs' ?: ( <ident>* )
}*
)
'packed_inside' ?: <ident>
}
|
| Status codes | ✅ 200 OK ❌ 400 Bad Request ❌ 404 Not Found: Channel does not exist |
| Required permissions | ReadOnly access level on hub |
Gets general status and health of a hub
GET/api/v6.1/hubs/{hub}/query/status
| Query parameters | None |
| Request headers | None |
| Request body | None |
| Response headers | None |
| Response body (JSON) | Prototype:
'hub_state' : <str LIVE FROZEN RESTARTING>
'freeze_time' ?: <date_str_z>
'log_hvr_err_tstamp' ?: <date_str_z>
'log_hvr_schederr_tstamp' ?: <date_str_z>
'jobs_over_latency_sla' : ( jobname<str>* )
'license' : 'NONE'
| 'VALID'
| 'EXPIRED'
| 'HOST_MISMATCH'
| 'EXCEEDED'
| 'INVALID'
'licensing_expiry_warning' ?: <str>
'perl_needed' ?: <bool>
|
| Status codes | ✅ 200 OK ❌ 400 Bad Request ❌ 404 Not Found: The requested hub does not exist |
| Required permissions | ReadOnly access level on hub |