Skip to main content

Get a granted table or view with its columns and keys.

GET/api/v1/query-sources/{query_source_id}analytics:read

The columns of one source (name, database type, position, primary key, nullability, default, unique, indexed, foreign-key target) and the table's row estimate and size in megabytes: what the query builder's source picker shows. Needs View Query Builder Schema, and 403 when the caller holds no query-builder grant on the source. Use the column names in execute_query_sources.

Scopeanalytics:read
AsynchronousNo
MCP toolget_query_source
Portal permissionsview_query_builder_schema

Parameters​

NameInTypeRequiredDescription
query_source_idpathstringRequired
Docwize-Versionheaderstring (date)Optional
If-None-MatchheaderstringOptionalAnswers 304 when the representation is unchanged (resources that publish an ETag).

Responses​

StatusDescriptionBody
200Success.application/json QuerySource
304Not modified (If-None-Match matched the ETag).
400invalid_versionapplication/problem+json Problem
401token_expired, unauthenticatedapplication/problem+json Problem
403forbidden, insufficient_scope, token_owner_inactiveapplication/problem+json Problem
404not_foundapplication/problem+json Problem
405method_not_allowedapplication/problem+json Problem
406not_acceptableapplication/problem+json Problem
421wrong_regionapplication/problem+json Problem
422validation_failedapplication/problem+json Problem
500internal_errorapplication/problem+json Problem
503tenant_unavailable, unavailableapplication/problem+json Problem
504timeoutapplication/problem+json Problem

Errors​

The problem codes this operation can answer with. Each code links to its page.

Schemas​

QuerySource​

FieldTypeRequiredDescription
columnsarray of QuerySourceColumnRequiredEvery column with its keys; null in list items (get_query_source reads them).
kindstringRequiredtable or view.
namestringRequired
query_source_idstringRequiredbase64url (no padding) of the granted table or view name.
row_countstring or nullRequiredThe database's row estimate, as the query builder shows it; null in list items.
size_mbnumber or nullRequiredThe table's size on disk in megabytes (0 for a view, which has no storage of its own); null in list items.

QuerySourceColumn​

FieldTypeRequiredDescription
default_valuestring or nullRequiredThe column's default as the database states it; null when it has none.
foreign_columnstring or nullRequired
foreign_tablestring or nullRequiredThe table a foreign key points at; null when the column is no foreign key.
is_foreign_keybooleanRequired
is_indexedbooleanRequired
is_nullablebooleanRequired
is_primary_keybooleanRequired
is_uniquebooleanRequired
keystringRequired
namestringRequired
ordinal_positioninteger or nullRequiredThe column's place in the table, starting at 1.
typestringRequired