Related queries and mutations in Monitors as Code. Each has its own section.
Queries
exportDimensionTrackingMonitorMigrationTemplates (query)
exportDimensionTrackingMonitorMigrationTemplates is a query in the Monte Carlo GraphQL API, in Monitors as Code. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.
Status: Experimental
Export Monte Carlo config templates for migrated Dimension Tracking monitors.
Arguments
| Argument | Type | Description |
|---|---|---|
namespace | String | Filter results to the given namespace only. |
validate | Boolean | Whether to validate the exported config template Default: true. |
Returns
MonteCarloConfigTemplateExportResponse
Example
query ExportDimensionTrackingMonitorMigrationTemplates {
exportDimensionTrackingMonitorMigrationTemplates {
configTemplateAsYaml
errors
}
}Related types
MonteCarloConfigTemplateExportResponse
exportLatestVersionMonitorReplacementTemplates (query)
exportLatestVersionMonitorReplacementTemplates is a query in the Monte Carlo GraphQL API, in Monitors as Code. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.
Status: Experimental
Export Monte Carlo config templates for the latest-version replacements of the specified monitors. Currently only converts Dimension Tracking to Metric Monitor.
Arguments
| Argument | Type | Description |
|---|---|---|
monitorUuids | [UUID!]! | List of UUIDs for monitors to convert |
namespace | String | Namespace to export monitors from. If neither namespace nor monitor UUID list is provided, all monitors will be exported |
collectionLagHoursForDayGrouping | Int | Collection lag hours to use for monitors that group by day Default: 24. |
collectionLagHoursForHourGrouping | Int | Collection lag hours to use for monitors that group by hour Default: 2. |
validate | Boolean | Whether to validate the exported config template Default: true. |
Returns
MonteCarloConfigTemplateExportResponse
Example
query ExportLatestVersionMonitorReplacementTemplates($monitorUuids: [UUID!]!) {
exportLatestVersionMonitorReplacementTemplates(monitorUuids: $monitorUuids) {
configTemplateAsYaml
errors
}
}Related types
MonteCarloConfigTemplateExportResponse, UUID
exportMonteCarloConfigTemplates (query)
exportMonteCarloConfigTemplates is a query in the Monte Carlo GraphQL API, in Monitors as Code. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.
Export Monte Carlo config templates from existing custom monitors
Arguments
Returns
MonteCarloConfigTemplateExportResponse
Example
query ExportMonteCarloConfigTemplates {
exportMonteCarloConfigTemplates {
configTemplateAsYaml
errors
}
}Related types
MonteCarloConfigTemplateExportResponse, UUID
getMonteCarloConfigTemplates (query)
getMonteCarloConfigTemplates is a query in the Monte Carlo GraphQL API, in Monitors as Code. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.
Get existing Monte Carlo config templates
Arguments
| Argument | Type | Description |
|---|---|---|
offset | Int | |
before | String | |
after | String | |
first | Int | |
last | Int | |
namespace | String |
Returns
MonteCarloConfigTemplateConnection
Example
query GetMonteCarloConfigTemplates {
getMonteCarloConfigTemplates {
pageInfo {
hasNextPage
hasPreviousPage
startCursor
endCursor
}
}
}Related types
MonteCarloConfigTemplateConnection
getMonteCarloConfigTemplateUpdateState (query)
getMonteCarloConfigTemplateUpdateState is a query in the Monte Carlo GraphQL API, in Monitors as Code. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.
Get result of async Monte Carlo config template update
Arguments
| Argument | Type | Description |
|---|---|---|
updateUuid | UUID! | UUID of update to fetch result for |
Returns
MonteCarloConfigTemplateUpdateAsyncState
Example
query GetMonteCarloConfigTemplateUpdateState($updateUuid: UUID!) {
getMonteCarloConfigTemplateUpdateState(updateUuid: $updateUuid) {
changesApplied
errorsAsJson
warningsAsJson
infoAsJson
state
}
}Types used only by getMonteCarloConfigTemplateUpdateState
getMonteCarloConfigTemplateUpdateStateMonteCarloConfigTemplateUpdateAsyncState
MonteCarloConfigTemplateUpdateAsyncStateObject type. Monte Carlo Config Template Update Async State
| Field | Type | Description |
|---|---|---|
resourceModifications | [ResourceModification] | List of resource modifications |
changesApplied | Boolean | Changes applied? |
errorsAsJson | String | Errors encountered |
warningsAsJson | String | Warnings encountered |
infoAsJson | String | Informational messages |
state | State! | State of the async update |
State
StateEnum type.
| Value | Description |
|---|---|
PENDING | |
SKIPPED | |
APPLIED | |
FAILED |
Related types
Mutations
convertConfigTemplateToUiMonitors (mutation)
convertConfigTemplateToUiMonitors is a mutation in the Monte Carlo GraphQL API, in Monitors as Code. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.
Convert a config template to UI Monitors
Arguments
| Argument | Type | Description |
|---|---|---|
dryRun | Boolean | Dry run? Default: false. |
namespace | String! | Namespace of config template |
Returns
ConvertConfigTemplateToUiMonitors
Example
mutation ConvertConfigTemplateToUiMonitors($namespace: String!) {
convertConfigTemplateToUiMonitors(namespace: $namespace) {
response {
monitors {
uuid
creatorId
monitorType
name
accountUuid
udmType
resourceId
updaterId
entities
projects
datasets
ruleDescription
ruleVariables
monitorFields
monitorTimeAxisFieldName
monitorTimeAxisFieldType
monitorTimeAxisTimezone
createdTime
lastUpdateTime
scheduleType
}
}
}
}Types used only by convertConfigTemplateToUiMonitors
convertConfigTemplateToUiMonitorsConvertConfigTemplateToUiMonitors
ConvertConfigTemplateToUiMonitorsObject type. Convert a config template to UI Monitors
| Field | Type | Description |
|---|---|---|
response | ConvertConfigTemplateToUiMonitorsOutput | Exported template |
ConvertConfigTemplateToUiMonitorsOutput
ConvertConfigTemplateToUiMonitorsOutputObject type. Convert config template to UI monitors response
| Field | Type | Description |
|---|---|---|
monitors | [UserDefinedMonitorV2] | Converted monitors |
Related types
convertUiMonitorsToConfigTemplate (mutation)
convertUiMonitorsToConfigTemplate is a mutation in the Monte Carlo GraphQL API, in Monitors as Code. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.
Convert a set of monitors to a config template
Arguments
| Argument | Type | Description |
|---|---|---|
allMonitors | Boolean | Convert all UI monitors Default: false. |
dryRun | Boolean | Dry run? Default: false. |
monitorUuids | [UUID] | Monitor IDs to convert |
namespace | String! | Namespace of config template |
Returns
ConvertUiMonitorsToConfigTemplate
Example
mutation ConvertUiMonitorsToConfigTemplate($namespace: String!) {
convertUiMonitorsToConfigTemplate(namespace: $namespace) {
response {
configTemplateAsYaml
configTemplateAsDict
errors
warnings
}
}
}Types used only by convertUiMonitorsToConfigTemplate
convertUiMonitorsToConfigTemplateConvertUiMonitorsToConfigTemplate
ConvertUiMonitorsToConfigTemplateObject type. Convert a set of monitors to a config template
| Field | Type | Description |
|---|---|---|
response | ConvertUiMonitorsToConfigTemplateOutput | Exported template |
ConvertUiMonitorsToConfigTemplateOutput
ConvertUiMonitorsToConfigTemplateOutputObject type. Convert monitors to config template response
| Field | Type | Description |
|---|---|---|
monitors | [UserDefinedMonitor] | Converted monitors |
configTemplateAsYaml | String | Config Template as YAML |
configTemplateAsDict | JSONString | Config Template as a dictionary |
errors | [String] | Errors encountered |
warnings | [String] | Warnings encountered |
Related types
JSONString, UUID, UserDefinedMonitor
createOrUpdateMonteCarloConfigTemplate (mutation)
createOrUpdateMonteCarloConfigTemplate is a mutation in the Monte Carlo GraphQL API, in Monitors as Code. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.
Create or update a Monte Carlo Config Template
Arguments
| Argument | Type | Description |
|---|---|---|
configTemplateJson | String! | Monte Carlo Template in JSON format |
createNonIngestedTables | Boolean | Create non-existent tables |
domain | String | Default domain name or ID for monitors that omit a domain. |
dryRun | Boolean | Dry run? |
misconfiguredAsWarning | Boolean | Misconfigured errors as warnings |
namespace | String! | Namespace of config template |
resource | String | Default resource (warehouse) ID or name. DEPRECATED: use warehouse instead. |
sqlValidation | Boolean | Enable SQL syntax validation and pre-save warehouse checks, including the cost availability check (default: true) |
warehouse | String | Default warehouse ID or name |
Returns
CreateOrUpdateMonteCarloConfigTemplate
Example
mutation CreateOrUpdateMonteCarloConfigTemplate($configTemplateJson: String!, $namespace: String!) {
createOrUpdateMonteCarloConfigTemplate(configTemplateJson: $configTemplateJson, namespace: $namespace) {
response {
changesApplied
errorsAsJson
warningsAsJson
infoAsJson
}
}
}Types used only by createOrUpdateMonteCarloConfigTemplate
createOrUpdateMonteCarloConfigTemplateCreateOrUpdateMonteCarloConfigTemplate
CreateOrUpdateMonteCarloConfigTemplateObject type. Create or update a Monte Carlo Config Template
| Field | Type | Description |
|---|---|---|
response | MonteCarloConfigTemplateUpdateResponse | Response |
MonteCarloConfigTemplateUpdateResponse
MonteCarloConfigTemplateUpdateResponseObject type. Monte Carlo Config Template Update Response
| Field | Type | Description |
|---|---|---|
resourceModifications | [ResourceModification] | List of resource modifications |
changesApplied | Boolean | Changes applied? |
errorsAsJson | String | Errors encountered |
warningsAsJson | String | Warnings encountered |
infoAsJson | String | Informational messages |
Related types
createOrUpdateMonteCarloConfigTemplateAsync (mutation)
createOrUpdateMonteCarloConfigTemplateAsync is a mutation in the Monte Carlo GraphQL API, in Monitors as Code. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.
Create or update a Monte Carlo Config Template asynchronously
Arguments
| Argument | Type | Description |
|---|---|---|
configTemplateJson | String! | Monte Carlo Template in JSON format |
createNonIngestedTables | Boolean | Create non-existent tables |
domain | String | Default domain name or ID for monitors that omit a domain. |
dryRun | Boolean | Dry run? |
misconfiguredAsWarning | Boolean | Misconfigured errors as warnings |
namespace | String! | Namespace of config template |
resource | String | Default resource (warehouse) ID or name. DEPRECATED: use warehouse instead. |
sqlValidation | Boolean | Enable SQL syntax validation and pre-save warehouse checks, including the cost availability check (default: true) |
warehouse | String | Default warehouse ID or name |
Returns
CreateOrUpdateMonteCarloConfigTemplateAsync
Example
mutation CreateOrUpdateMonteCarloConfigTemplateAsync($configTemplateJson: String!, $namespace: String!) {
createOrUpdateMonteCarloConfigTemplateAsync(configTemplateJson: $configTemplateJson, namespace: $namespace) {
response {
updateUuid
errorsAsJson
warningsAsJson
}
}
}Types used only by createOrUpdateMonteCarloConfigTemplateAsync
createOrUpdateMonteCarloConfigTemplateAsyncCreateOrUpdateMonteCarloConfigTemplateAsync
CreateOrUpdateMonteCarloConfigTemplateAsyncObject type. Create or update a Monte Carlo Config Template asynchronously
| Field | Type | Description |
|---|---|---|
response | MonteCarloConfigTemplateUpdateAsyncResponse | Response |
MonteCarloConfigTemplateUpdateAsyncResponse
MonteCarloConfigTemplateUpdateAsyncResponseObject type. Monte Carlo Config Template Update Async Response
| Field | Type | Description |
|---|---|---|
updateUuid | UUID | The UUID of the requested update. Used to poll for the status of the update. Null if the update request is invalid. |
errorsAsJson | String | Errors encountered |
warningsAsJson | String | Warnings encountered |
Related types
deleteMonteCarloConfigTemplate (mutation)
deleteMonteCarloConfigTemplate is a mutation in the Monte Carlo GraphQL API, in Monitors as Code. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.
Delete a Monte Carlo Config Template
Arguments
| Argument | Type | Description |
|---|---|---|
dryRun | Boolean | Dry run? |
namespace | String! | Namespace of config template |
Returns
DeleteMonteCarloConfigTemplate
Example
mutation DeleteMonteCarloConfigTemplate($namespace: String!) {
deleteMonteCarloConfigTemplate(namespace: $namespace) {
response {
numDeleted
changesApplied
}
}
}Types used only by deleteMonteCarloConfigTemplate
deleteMonteCarloConfigTemplateDeleteMonteCarloConfigTemplate
DeleteMonteCarloConfigTemplateObject type. Delete a Monte Carlo Config Template
| Field | Type | Description |
|---|---|---|
response | MonteCarloConfigTemplateDeleteResponse | Response |
MonteCarloConfigTemplateDeleteResponse
MonteCarloConfigTemplateDeleteResponseObject type. Monte Carlo Config Template Delete Response
| Field | Type | Description |
|---|---|---|
numDeleted | Int | Number of resources deleted |
changesApplied | Boolean | Changes applied? |
Source: The GraphQL API reference
This page is generated from the GraphQL schema on each release. Changes made in ReadMe are overwritten.
