Related queries and mutations in AI features. Each has its own section.
Queries
getRemediationResult (query)
getRemediationResult is a query in the Monte Carlo GraphQL API, in AI features. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.
Status: Experimental
Get the remediation plan derived from an alert's troubleshooting analysis. Read-only: it never starts one — use startRemediation for that. Returns a plan of the alert's served version, or its v1 plan when it has none. Returns NOT_FOUND when no plan is available to read — including when one cannot be retrieved, so treat it as "nothing to show" rather than proof that none exists.
Arguments
| Argument | Type | Description |
|---|---|---|
alertId | UUID! | UUID of the alert to get the remediation result for |
tsaRunId | String | The analysis run whose plan to return. Omit it for the newest plan, of any analysis, of the version served for the alert (see getRemediationServedVersion). |
Returns
Example
query GetRemediationResult($alertId: UUID!) {
getRemediationResult(alertId: $alertId) {
status
tsaRunId
title
summary
instructions
recommendedActions
responseTypes
referenceUuid
graphVersion
drafted
confidence
cause
provenance
tuningMonitorUuid
tuningRunUuid
plan
}
}Related types
getRemediationResults (query)
getRemediationResults is a query in the Monte Carlo GraphQL API, in AI features. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.
Status: Experimental
For Monte Carlo agents only. Get the newest stored remediation plan of one graph version for each alert, in the order the alerts were sent. Read-only, and only plans the agent already reported: never RUNNING or FAILED.
Arguments
| Argument | Type | Description |
|---|---|---|
alertIds | [UUID!]! | UUIDs of the alerts, at most 20 distinct. A repeated UUID is returned once. |
graphVersion | String! | The remediation graph version whose plans to read: v1 or v2. Plans of this version are read whatever version each alert is served. |
Returns
[StoredRemediationResult!]!
Example
query GetRemediationResults($alertIds: [UUID!]!, $graphVersion: String!) {
getRemediationResults(alertIds: $alertIds, graphVersion: $graphVersion) {
alertId
status
classification
planSummary
exitReason
completedTime
}
}Types used only by getRemediationResults
getRemediationResultsStoredRemediationResult
StoredRemediationResultObject type. The newest stored remediation plan of one graph version for one alert.
| Field | Type | Description |
|---|---|---|
alertId | UUID! | UUID of the alert. |
status | RemediationStatus! | COMPLETED when the alert has a stored plan of the requested version that this request may read, else NOT_FOUND. |
classification | String | The plan's primary response type, such as fix_the_code, rerun_pipeline, tune_monitor, hand_off or close_with_explanation. Null unless status is COMPLETED. |
planSummary | String | The plan summary, as plain text. The remediation agent wrote it from customer content, so never render it as HTML. Null unless status is COMPLETED, or when the plan has no summary. |
exitReason | String | Which path of the remediation graph produced the plan, as the agent reported it, such as investigated. A run that ended early, such as investigate_failed, stores a fallback plan. Null unless status is COMPLETED, or when the agent did not report it. |
completedTime | DateTime | When the agent reported the plan. Null unless status is COMPLETED. |
Related types
DateTime, RemediationStatus, UUID
getRemediationServedVersion (query)
getRemediationServedVersion is a query in the Monte Carlo GraphQL API, in AI features. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.
Status: Experimental
The remediation plan version served for an alert. A dispatcher starts the graph that builds this version. Readers serve the alert's plan of this version, or its v1 plan when it has no v2 plan.
Arguments
| Argument | Type | Description |
|---|---|---|
alertId | UUID! | UUID of the alert |
Returns
String!
Example
query GetRemediationServedVersion($alertId: UUID!) {
getRemediationServedVersion(alertId: $alertId)
}Related types
Mutations
openRemediationPullRequest (mutation)
openRemediationPullRequest is a mutation in the Monte Carlo GraphQL API, in AI features. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.
Status: Experimental
Start the draft pull request an alert's remediation plan offers
Arguments
Returns
OpenRemediationPullRequest
Example
mutation OpenRemediationPullRequest($alertId: UUID!, $referenceUuid: UUID!) {
openRemediationPullRequest(alertId: $alertId, referenceUuid: $referenceUuid) {
outcome
message
}
}Types used only by openRemediationPullRequest
openRemediationPullRequestOpenRemediationPullRequest
OpenRemediationPullRequestObject type. Start the run that opens a draft pull request from the alert's remediation plan, in the repository the plan's pull request offer names, as the calling user. One pull request run per alert issue: a second call, or a call for another alert of the issue, starts nothing and returns the existing one. Not idempotent on GitHub, so never retry it automatically.
| Field | Type | Description |
|---|---|---|
outcome | RemediationPullRequestOutcome! | |
message | String | Fixed text for the person when the call has no pull request to show. |
pullRequest | RemediationPullRequest | The pull request run of the alert, or else of another alert of its issue: the one this call started, or the one it already had. Null when there is none, or while another call is opening it. |
RemediationPullRequestOutcome
RemediationPullRequestOutcomeEnum type. What one click on Open pull request did. OPENED: this call started the run that opens
the draft pull request. ALREADY_EXISTS: the alert, or another alert of its issue, already
has a pull request run, or one is being opened. NO_PERMISSION: the caller may not open a
pull request for this alert.
NOT_AVAILABLE: Monte Carlo cannot open a pull request in the repository. PLAN_NOT_READY:
the plan changed or has no pull request draft. FAILED: the run could not be started.
| Value | Description |
|---|---|
OPENED | |
ALREADY_EXISTS | |
NO_PERMISSION | |
NOT_AVAILABLE | |
PLAN_NOT_READY | |
FAILED |
Related types
openRemediationTicket (mutation)
openRemediationTicket is a mutation in the Monte Carlo GraphQL API, in AI features. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.
Status: Experimental
Open a Linear or Jira ticket from an alert's remediation plan, or comment on its issue's ticket
Arguments
Returns
OpenRemediationTicket
Example
mutation OpenRemediationTicket($alertId: UUID!, $referenceUuid: UUID!) {
openRemediationTicket(alertId: $alertId, referenceUuid: $referenceUuid) {
outcome
message
}
}Types used only by openRemediationTicket
openRemediationTicketOpenRemediationTicket
OpenRemediationTicketObject type. Open a ticket from the alert's remediation plan through the account's Linear or Jira integration, or add a comment to the ticket the alert's issue already has. One ticket action per alert: a second call returns the existing ticket. Not idempotent on the ticket tool, so never retry it automatically.
| Field | Type | Description |
|---|---|---|
outcome | TicketOutcome! | |
message | String | Fixed text for the person when it didn't open one. |
ticket | RemediationTicket |
OpenRemediationTicketInput
OpenRemediationTicketInputInput object type. What a person chose in the drawer when one click can't open the ticket.
| Field | Type | Description |
|---|---|---|
ticketTitle | String | The ticket title; the plan's draft title if unset. |
ticketDescription | String | The ticket description in Markdown; the plan's draft if unset. |
linearTeamId | String | The Linear team to open the ticket in. |
jiraProject | Int | The Jira project id to open the ticket in. |
jiraIssueType | Int | The Jira issue type id. |
TicketOutcome
TicketOutcomeEnum type. What one click on Open ticket or Add comment did.
| Value | Description |
|---|---|
OPENED | |
COMMENTED | |
ALREADY_EXISTS | |
DEFAULTS_MISSING | |
NO_PERMISSION | |
NOT_CONNECTED | |
UPGRADE_REQUIRED | |
PLAN_NOT_READY | |
FAILED |
Related types
rerunRemediationJob (mutation)
rerunRemediationJob is a mutation in the Monte Carlo GraphQL API, in AI features. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.
Status: Experimental
Re-run the failed job run an alert's remediation plan offers to re-run
Arguments
Returns
RerunRemediationJob
Example
mutation RerunRemediationJob($alertId: UUID!, $referenceUuid: UUID!) {
rerunRemediationJob(alertId: $alertId, referenceUuid: $referenceUuid) {
outcome
message
}
}Types used only by rerunRemediationJob
rerunRemediationJobRemediationRerunOutcome
RemediationRerunOutcomeEnum type. What one click on Re-run failed job did. STARTED: this call re-ran the failed run, or asked
for it. ALREADY_EXISTS: the failed run already has a re-run, or one is being requested.
SUPERSEDED: the failed run has since succeeded, or a newer run of the job started, see
message. NO_PERMISSION: the caller may not re-run this job. NOT_AVAILABLE: Monte Carlo cannot
re-run the job for this alert, see message. PLAN_NOT_READY: the plan changed or has no re-run
marker. MAYBE_STARTED: the call may have reached the job's system, so the re-run may have
started: check the job's runs and do not retry. FAILED: nothing was started.
| Value | Description |
|---|---|
STARTED | |
ALREADY_EXISTS | |
SUPERSEDED | |
NO_PERMISSION | |
NOT_AVAILABLE | |
PLAN_NOT_READY | |
MAYBE_STARTED | |
FAILED |
RerunRemediationJob
RerunRemediationJobObject type. Re-run the failed run of the job the alert's remediation plan offers to re-run, in the job's own system, as the calling user. One re-run per failed run: a second call, or a call for another alert on that run, starts nothing and returns the existing one. Never retry it automatically: MAYBE_STARTED means it may have started.
| Field | Type | Description |
|---|---|---|
outcome | RemediationRerunOutcome! | |
message | String | Fixed text for the person when the call has no re-run to show. |
rerun | RemediationRerun | The recorded re-run of the failed run: the one this call started, or the one it already had. Null when there is none, or while another call is requesting it. |
Related types
startRemediation (mutation)
startRemediation is a mutation in the Monte Carlo GraphQL API, in AI features. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.
Status: Experimental
Build a remediation plan from an alert's current troubleshooting analysis
Arguments
| Argument | Type | Description |
|---|---|---|
alertId | UUID! | UUID of the alert to build the remediation plan for |
Returns
Example
mutation StartRemediation($alertId: UUID!) {
startRemediation(alertId: $alertId) {
status
tsaRunId
title
summary
instructions
recommendedActions
responseTypes
referenceUuid
graphVersion
drafted
confidence
cause
provenance
tuningMonitorUuid
tuningRunUuid
plan
}
}Related types
Source: The GraphQL API reference
This page is generated from the GraphQL schema on each release. Changes made in ReadMe are overwritten.
