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 Data Exports
To download Data Exports, use the getDataExportUrl GraphQL query. The query will return a signed URL that you can use to download the export.
The dataExportName
parameter selects the type of export:
Export Type | dataExportName Value |
---|---|
Monitors | "MONITORS" |
Alerts | "ALERTS" |
Events | "EVENTS" |
Assets | "ASSETS" |
query GetDataExportUrl($dataExportName: DataExportNames!) {
getDataExportUrl(dataExportName: $dataExportName) {
createdAt
url
}
}
{"dataExportName": "MONITORS"}
Updated 5 days ago