General
The following examples are general queries related to users, insights, assets and more.
Please note that the sample queries below only show a subset of the fields available for brevity. You can use introspection to see all available fields.
User Information
Get a user and their account information:
query getUser {
getUser {
email
firstName
lastName
createdOn
role
account {
uuid
}
}
}
{
"data": {
"getUser": {
"email": "[email protected]",
"firstName": "Katie",
"lastName": "Noonan",
"createdOn": "2021-05-10T00:00:00Z",
"role": "OWNER"
"account": {
"uuid": "<my_account_uuid>"
}
}
}
}
Search for Assets
Assets (tables, views, reports, fields, etc.) can be searched for using search
.
These results can be paginated through and filtered by type too.
query search {
search(query: "foo", limit: 2) {
totalHits
offset
results {
mcon
displayName
objectType
}
}
}
{
"data": {
"search": {
"totalHits": 10,
"offset": 2,
"results": [
{
"mcon": "dummy_table_id_1",
"displayName": "foo:bar.baz",
"objectType": "table"
},
{
"mcon": "dummy_table_id_2",
"displayName": "foo:bar.qux",
"objectType": "table"
}
]
}
}
}
Download Insights Reports
Insights reports can be exported using the getReportUrl function and querying the resulting URL endpoint. The parameters correspond to reports as follows:
Key Assets
insightName: key_assets
reportName: key_assets.csv
Custom Monitors
insightName: monitors
reportName: monitors.csv
Cleanup Suggestions
insightName: cleanup_suggestions
reportName: cleanup_suggestions.csv
Events
insightName: events
reportName: events.csv
Table Read/Write Activity
insightName: table_read_write_stats
reportName: table_read_write_stats.csv
query{
getReportUrl(
insightName: insight_name_here
reportName: report_name_here
){
url
}
}
Updated 9 days ago