QM queries schema
service.qm.graphqls
To authenticate API requests, you’ll need an API token. Learn how to generate an access token.
See usage examples in the cloudbeaver-graphql-examples repository.
You can try queries in the built-in GraphQL console, available on your server at https://your-server-address/api/gql/console. This tool lets you test requests directly from your browser.
For a live example, see the demo GraphQL console.
API Endpoints
https://your-server-address/api/gql
Queries
qmAccessibleUsers
Description
Returns a list of QM user IDs that has access to all QM queries.
Response
Returns [String!]!
Example
Query
query qmAccessibleUsers {
qmAccessibleUsers
}
Response
{
"data": {
"qmAccessibleUsers": ["<string>"]
}
}
qmQueriesSearchAdmin
Description
Returns a filtered list of QM queries used by the administrator.
Response
Returns an QMMFilterResponse!
Arguments
| Name | Description |
|---|---|
filter - QMAdminSearchFilter!
|
Example
Query
query qmQueriesSearchAdmin($filter: QMAdminSearchFilter!) {
qmQueriesSearchAdmin(filter: $filter) {
hasMore
objects {
...QMMObjectFragment
}
}
}
Variables
{"filter": QMAdminSearchFilter}
Response
{
"data": {
"qmQueriesSearchAdmin": {
"hasMore": "<boolean>",
"objects": [QMMObject]
}
}
}
qmQueriesSearchSupervisor
Description
Returns a filtered list of QM queries used by the supervisor (has access to all QM queries).
Response
Returns an QMMFilterResponse!
Arguments
| Name | Description |
|---|---|
filter - QMSupervisorSearchFilter!
|
Example
Query
query qmQueriesSearchSupervisor($filter: QMSupervisorSearchFilter!) {
qmQueriesSearchSupervisor(filter: $filter) {
hasMore
objects {
...QMMObjectFragment
}
}
}
Variables
{"filter": QMSupervisorSearchFilter}
Response
{
"data": {
"qmQueriesSearchSupervisor": {
"hasMore": "<boolean>",
"objects": [QMMObject]
}
}
}
qmQueriesSearchUser
Description
Returns a filtered list of QM queries used by the current user.
Response
Returns an QMMFilterResponse!
Arguments
| Name | Description |
|---|---|
filter - QMSearchFilter!
|
Example
Query
query qmQueriesSearchUser($filter: QMSearchFilter!) {
qmQueriesSearchUser(filter: $filter) {
hasMore
objects {
...QMMObjectFragment
}
}
}
Variables
{"filter": QMSearchFilter}
Response
{
"data": {
"qmQueriesSearchUser": {
"hasMore": "<boolean>",
"objects": [QMMObject]
}
}
}
Mutations
fakeFunctionQM
Response
Returns an Object
Example
Query
mutation fakeFunctionQM {
fakeFunctionQM
}
Response
{"data": {"fakeFunctionQM": "<object>"}}
Types
Boolean
Description
The Boolean scalar type represents true or false.
Example
"<boolean>"
Float
Description
The Float scalar type represents signed double-precision fractional values as specified by IEEE 754.
Example
"<float>"
ID
Description
The ID scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as "4") or integer (such as 4) input value will be accepted as an ID.
Example
"<id>"
Int
Description
The Int scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.
Example
"<int>"
Object
Description
Any object (JSON)
Example
"<object>"
QMAdminSearchFilter
Fields
| Input Field | Description |
|---|---|
searchString - String
|
|
page - Int!
|
|
pageSize - Int!
|
|
users - [String!]
|
|
projectIds - [String!]
|
|
catalogs - [String!]
|
|
schemas - [String!]
|
|
objectTypes - [QMObjectType!]
|
|
queryTypes - [QMQueryType!]
|
|
driverIds - [String!]
|
|
eventStatuses - [QMEventStatus!]
|
|
lastEventId - ID
|
|
startDateRange - QMDateRange
|
|
sort - QMSort
|
|
ipAddress - [String!]
|
Example
{
"searchString": "<string>",
"page": "<int>",
"pageSize": "<int>",
"users": ["<string>"],
"projectIds": ["<string>"],
"catalogs": ["<string>"],
"schemas": ["<string>"],
"objectTypes": ["session"],
"queryTypes": ["USER"],
"driverIds": ["<string>"],
"eventStatuses": ["FAILED"],
"lastEventId": "<id>",
"startDateRange": QMDateRange,
"sort": QMSort,
"ipAddress": ["<string>"]
}
QMDateRange
QMEventStatus
Description
Enum representing the status of a QM event.
Values
| Enum Value | Description |
|---|---|
|
|
|
|
|
Example
"FAILED"
QMMFilterResponse
Fields
| Field Name | Description |
|---|---|
hasMore - Boolean!
|
Indicates if there are more objects available in the filter response. |
objects - [QMMObject!]!
|
Returns the list of QM objects in the filter response. |
Example
{"hasMore": "<boolean>", "objects": [QMMObject]}
QMMObject
Description
Information about a QM meta object, such as a session, transaction, or query.
Fields
| Field Name | Description |
|---|---|
eventId - ID!
|
Unique identifier of the QM object. |
queryText - String!
|
Text of the query executed in the QM object. |
startTime - Float!
|
Start time of the QM object in milliseconds since epoch. |
objectType - String!
|
Object type of the QM object (query). |
queryType - String
|
Query type of the QM object, such as USER, USER_FILTERED, USER_SCRIPT, UTIL, META, or META_DDL. |
duration - Float
|
Duration of the QM object in milliseconds. |
rows - Float
|
Number of rows returned by the QM object. |
errorMessage - String
|
The error message if the QM object failed. |
projectName - String!
|
Name of the project associated with the QM object. |
dataSource - String!
|
ID of the connection associated with the QM object. |
connection - String!
|
Name of the context associated with the QM object. |
driverId - String!
|
ID of the driver used for the QM object. |
userIp - String
|
User IP address that executed the QM object. |
schemaName - String
|
The schema name associated with the QM object. |
catalog - String
|
The catalog name associated with the QM object. |
user - QMUser
|
The user who executed the QM object. |
Example
{
"eventId": "<id>",
"queryText": "<string>",
"startTime": "<float>",
"objectType": "<string>",
"queryType": "<string>",
"duration": "<float>",
"rows": "<float>",
"errorMessage": "<string>",
"projectName": "<string>",
"dataSource": "<string>",
"connection": "<string>",
"driverId": "<string>",
"userIp": "<string>",
"schemaName": "<string>",
"catalog": "<string>",
"user": QMUser
}
QMObjectType
Description
Enum representing the different types of QM objects.
Values
| Enum Value | Description |
|---|---|
|
|
|
|
|
|
|
|
Example
"session"
QMQueryType
Values
| Enum Value | Description |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Example
"USER"
QMSearchFilter
Description
Input for filtering QM queries.
Fields
| Input Field | Description |
|---|---|
searchString - String
|
Search string to filter QM queries. |
page - Int!
|
Pagination parameters for the search results. |
pageSize - Int!
|
Number of items per page for the search results. |
projectIds - [String!]
|
IDs of projects. |
catalogs - [String!]
|
Catalogs names. |
schemas - [String!]
|
Schemas names. |
objectTypes - [QMObjectType!]
|
Object types. |
queryTypes - [QMQueryType!]
|
Query types. |
driverIds - [String!]
|
IDs of drivers. |
eventStatuses - [QMEventStatus!]
|
Statuses of events. |
lastEventId - ID
|
ID of the last event to filter by. |
startDateRange - QMDateRange
|
Start date range for filtering QM queries. |
sort - QMSort
|
Sorting parameters for the search results. |
Example
{
"searchString": "<string>",
"page": "<int>",
"pageSize": "<int>",
"projectIds": ["<string>"],
"catalogs": ["<string>"],
"schemas": ["<string>"],
"objectTypes": ["session"],
"queryTypes": ["USER"],
"driverIds": ["<string>"],
"eventStatuses": ["FAILED"],
"lastEventId": "<id>",
"startDateRange": QMDateRange,
"sort": QMSort
}
QMSort
Description
Input for sorting QM objects.
Fields
| Input Field | Description |
|---|---|
desc - Boolean!
|
Sorting descending or ascending. |
sortBy - QMSortField!
|
Parameter by which to sort the QM objects. |
Example
{"desc": "<boolean>", "sortBy": "DATE"}
QMSortField
Description
Enum representing the different fields by which QM objects can be sorted.
Values
| Enum Value | Description |
|---|---|
|
|
The start time of the QM object. |
|
|
The user who executed the QM object. |
|
|
The driver used for the QM object. |
|
|
The query text of the QM object. |
Example
"DATE"
QMSupervisorSearchFilter
Fields
| Input Field | Description |
|---|---|
searchString - String
|
|
page - Int!
|
|
pageSize - Int!
|
|
users - [String!]
|
|
teams - [String!]
|
|
projectIds - [String!]
|
|
catalogs - [String!]
|
|
schemas - [String!]
|
|
objectTypes - [QMObjectType!]
|
|
queryTypes - [QMQueryType!]
|
|
driverIds - [String!]
|
|
eventStatuses - [QMEventStatus!]
|
|
lastEventId - ID
|
|
startDateRange - QMDateRange
|
|
sort - QMSort
|
|
ipAddress - [String!]
|
Example
{
"searchString": "<string>",
"page": "<int>",
"pageSize": "<int>",
"users": ["<string>"],
"teams": ["<string>"],
"projectIds": ["<string>"],
"catalogs": ["<string>"],
"schemas": ["<string>"],
"objectTypes": ["session"],
"queryTypes": ["USER"],
"driverIds": ["<string>"],
"eventStatuses": ["FAILED"],
"lastEventId": "<id>",
"startDateRange": QMDateRange,
"sort": QMSort,
"ipAddress": ["<string>"]
}
QMUser
String
Description
The String scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.
Example
"<string>"