Version control, part 1 of 2 (GraphQL)

Related queries and mutations in Integrations and connections. Each has its own section.

Queries

getAzureDevopsInstallation (query)

getAzureDevopsInstallation is a query in the Monte Carlo GraphQL API, in Integrations and connections. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.

Status: Experimental

Azure DevOps installations

Arguments

ArgumentTypeDescription
installationUuidUUID!

Returns

AzureDevopsInstallation

Example

query GetAzureDevopsInstallation($installationUuid: UUID!) {
  getAzureDevopsInstallation(installationUuid: $installationUuid) {
    uuid
    organizationName
    installedBy
    displayName
  }
}

Related types

AzureDevopsInstallation, UUID

getAzureDevopsInstallations (query)

getAzureDevopsInstallations is a query in the Monte Carlo GraphQL API, in Integrations and connections. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.

Status: Experimental

Azure DevOps installations

Returns

AzureDevopsInstallations

Example

query GetAzureDevopsInstallations {
  getAzureDevopsInstallations {
    installations {
      uuid
      organizationName
      installedBy
      displayName
    }
  }
}

Types used only by getAzureDevopsInstallations

AzureDevopsInstallationListItem

Object type.

FieldTypeDescription
uuidUUID!Internal Github installation uuid
organizationNameString!Azure DevOps organization name
installedByString!Installed by user email
displayNameString
AzureDevopsInstallations

Object type.

FieldTypeDescription
installations[AzureDevopsInstallationListItem]

Related types

UUID

getAzureDevopsOrganization (query)

getAzureDevopsOrganization is a query in the Monte Carlo GraphQL API, in Integrations and connections. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.

Status: Experimental

Azure DevOps organization

Arguments

ArgumentTypeDescription
installationUuidUUID!Installation UUID to get Azure DevOps Organization for

Returns

AzureDevopsOrganization

Example

query GetAzureDevopsOrganization($installationUuid: UUID!) {
  getAzureDevopsOrganization(installationUuid: $installationUuid) {
    name
  }
}

Types used only by getAzureDevopsOrganization

AzureDevopsOrganization

Object type.

FieldTypeDescription
nameString!
projects[AzureDevopsProject]
repositories[AzureDevopsRepository]
selections[AzureDevopsSourceSelection]
AzureDevopsProject

Object type.

FieldTypeDescription
idString!
nameString!
repositories[AzureDevopsRepository]!
AzureDevopsRepository

Object type.

FieldTypeDescription
idString!
nameString!
projectAzureDevopsProject!
AzureDevopsSourceSelection

Object type.

FieldTypeDescription
projectIdString!
repositoryIdString

Related types

UUID

getBitbucketIntegration (query)

getBitbucketIntegration is a query in the Monte Carlo GraphQL API, in Integrations and connections. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.

Status: Experimental

A single BitBucket integration

Arguments

ArgumentTypeDescription
installationUuidUUID!Internal UUID of the BitBucket installation

Returns

BitbucketInstallation

Example

query GetBitbucketIntegration($installationUuid: UUID!) {
  getBitbucketIntegration(installationUuid: $installationUuid) {
    uuid
    host
    displayName
  }
}

Related types

BitbucketInstallation, UUID

getBitbucketIntegrations (query)

getBitbucketIntegrations is a query in the Monte Carlo GraphQL API, in Integrations and connections. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.

Status: Experimental

BitBucket integrations configured for the account

Returns

BitbucketInstallations

Example

query GetBitbucketIntegrations {
  getBitbucketIntegrations {
    installations {
      uuid
      host
      displayName
    }
  }
}

Types used only by getBitbucketIntegrations

BitbucketInstallations

Object type. BitBucket integrations configured for the account.

FieldTypeDescription
installations[BitbucketInstallation]!BitBucket installations for the account

Related types

BitbucketInstallation

getBitbucketRepos (query)

getBitbucketRepos is a query in the Monte Carlo GraphQL API, in Integrations and connections. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.

Status: Experimental

List repos in a BitBucket workspace for the installation

Arguments

ArgumentTypeDescription
installationUuidUUID!Internal UUID of the BitBucket installation
workspaceString!BitBucket workspace slug

Returns

[BitbucketRepo]

Example

query GetBitbucketRepos($installationUuid: UUID!, $workspace: String!) {
  getBitbucketRepos(installationUuid: $installationUuid, workspace: $workspace) {
    workspace
    repoSlug
    repoUuid
    name
    selected
  }
}

Types used only by getBitbucketRepos

BitbucketRepo

Object type.

FieldTypeDescription
workspaceString!BitBucket workspace slug
repoSlugString!Repository slug within the workspace
repoUuidString!BitBucket repository UUID
nameString!Repository display name
selectedBoolean!True if the repository is selected

Related types

UUID

getCiGateConfig (query)

getCiGateConfig is a query in the Monte Carlo GraphQL API, in Integrations and connections. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.

Status: Experimental

Get CI gate policy configuration for a GitHub installation

Arguments

ArgumentTypeDescription
installationUuidUUID!UUID of the GitHub installation

Returns

CiGateConfig

Example

query GetCiGateConfig($installationUuid: UUID!) {
  getCiGateConfig(installationUuid: $installationUuid) {
    blockOn
  }
}

Types used only by getCiGateConfig

CiGateConfig

Object type. CI gate policy configuration for a GitHub app installation.

FieldTypeDescription
blockOnString!Which risk tiers cause the CI step to fail: low+, medium+, high+, or none
failOnStringDeprecated alias for blockOn Deprecated: Use blockOn instead.
repoOverrides[CiGateRepoOverride!]!Per-repo block_on overrides. Empty when no overrides are configured.
CiGateRepoOverride

Object type. Per-repo CI gate block_on override.

FieldTypeDescription
repoString!Repository name
blockOnString!Which risk tiers cause the CI step to fail for this repo

Related types

UUID

getGithubActionTriggerDispatches (query)

getGithubActionTriggerDispatches is a query in the Monte Carlo GraphQL API, in Integrations and connections. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.

Status: Experimental

Draft-PR workflow dispatch executions for a finding, newest first — each with its run status and, once found, the draft PR link. History stays available even when new dispatches are not.

Arguments

ArgumentTypeDescription
findingUuidUUID!UUID of the finding whose dispatch executions to list

Returns

[GithubActionTriggerDispatch!]

Example

query GetGithubActionTriggerDispatches($findingUuid: UUID!) {
  getGithubActionTriggerDispatches(findingUuid: $findingUuid) {
    uuid
    status
    source
    ghOrg
    repo
    workflowFile
    ref
    ghRunUrl
    prUrl
    prNumber
    error
    createdTime
    completedTime
    dispatchedBy
  }
}

Related types

GithubActionTriggerDispatch, UUID

getGithubActionTriggerDispatchTarget (query)

getGithubActionTriggerDispatchTarget is a query in the Monte Carlo GraphQL API, in Integrations and connections. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.

Status: Experimental

Where triggerGithubActionDraftPrWorkflow would dispatch the finding — non-null exactly when the finding is dispatchable (its agent has a dispatch target configured, the finding carries action context to dispatch, and draft-PR workflow dispatch is enabled for your account); null otherwise, so it can drive the visibility of a dispatch action in the UI

Arguments

ArgumentTypeDescription
findingUuidUUID!UUID of the finding to resolve the dispatch target for

Returns

GithubActionTriggerDispatchTarget

Example

query GetGithubActionTriggerDispatchTarget($findingUuid: UUID!) {
  getGithubActionTriggerDispatchTarget(findingUuid: $findingUuid) {
    installationUuid
    ghOrg
    agentTraceTableMcon
  }
}

Types used only by getGithubActionTriggerDispatchTarget

GithubActionTriggerDispatchTarget

Object type. Resolved draft-PR dispatch route for a finding: which installation and
per-agent config triggerGithubActionDraftPrWorkflow would dispatch through.

FieldTypeDescription
installationUuidUUID!Internal UUID of the installation the dispatch goes through
ghOrgString!GitHub organization of that installation
agentTraceTableMconString!Trace-table MCON of the finding's agent
dispatchConfigGithubActionTriggerDispatchConfig!The agent's configured dispatch target

Related types

GithubActionTriggerDispatchConfig, UUID

getGithubActionTriggerIntegrations (query)

getGithubActionTriggerIntegrations is a query in the Monte Carlo GraphQL API, in Integrations and connections. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.

Status: Experimental

Monte Carlo Action Trigger GitHub App integration info

Returns

GithubActionTriggerAppInfo

Example

query GetGithubActionTriggerIntegrations {
  getGithubActionTriggerIntegrations {
    installLink
  }
}

Types used only by getGithubActionTriggerIntegrations

GithubActionTriggerAgentDispatchConfig

Object type. One agent's draft-PR dispatch target on an installation.

Agents sharing a trace table share a dispatch target; combine with
getAgentMetadataV2 (which supplies each agent's traceTableMcon) to render
per-agent configuration.

FieldTypeDescription
agentTraceTableMconString!Trace-table MCON of the agent this dispatch target applies to
dispatchConfigGithubActionTriggerDispatchConfig!The agent's configured dispatch target
GithubActionTriggerAppInfo

Object type.

FieldTypeDescription
installLinkStringLink to click in order to install the Monte Carlo Action Trigger GitHub App. Null when draft-PR workflow dispatch is not enabled for your account.
installations[GithubActionTriggerAppInstallation!]Linked Monte Carlo Action Trigger App installations. Null when the caller lacks permission to view alerts.
GithubActionTriggerAppInstallation

Object type. An installation of the Monte Carlo Action Trigger GitHub App.

The app can only dispatch GitHub Actions workflows (and read repository
metadata) — it has no access to code, and draft PRs are opened by the
customer's own workflow with its own credentials.

FieldTypeDescription
uuidUUID!Internal UUID of the installation
ghOrgString!GitHub organization the app is installed in
displayNameStringCustom display name; null when unset — display the organization name (ghOrg) instead
settingsLinkString!GitHub settings page where the customer manages this installation
dispatchConfigGithubActionTriggerDispatchConfigAlways null — dispatch targets are per agent; use agentDispatchConfigs Deprecated: Dispatch config is per agent; use agentDispatchConfigs..
agentDispatchConfigs[GithubActionTriggerAgentDispatchConfig!]!Per-agent draft-PR dispatch targets configured on this installation, keyed by the agent's trace-table MCON; empty until configured
permissionsGithubActionTriggerInstallationPermissionsLive permission and repository-scope info from GitHub; null when GitHub cannot be reached
GithubActionTriggerInstallationPermissions

Object type. Live permission info for an action-trigger app installation, fetched from GitHub.

FieldTypeDescription
actionsStringGranted Actions permission level, e.g. "write". Workflow dispatch requires write.
metadataStringGranted Metadata permission level, e.g. "read"
repositorySelectionStringWhich repositories the installation covers: "all" or "selected"

Related types

GithubActionTriggerDispatchConfig, UUID

getGithubIntegrations (query)

getGithubIntegrations is a query in the Monte Carlo GraphQL API, in Integrations and connections. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.

Github integration info

Returns

GithubAppInfo

Example

query GetGithubIntegrations {
  getGithubIntegrations {
    installLink
  }
}

Types used only by getGithubIntegrations

GithubAppInfo

Object type.

FieldTypeDescription
installLinkStringLink to click in order to install new Github integration
installations[GithubAppInstallation]Metadata about Github App installation

Related types

GithubAppInstallation

getGithubPullRequests (query)

getGithubPullRequests is a query in the Monte Carlo GraphQL API, in Integrations and connections. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.

Get the list of pull requests related to a given incident

Arguments

ArgumentTypeDescription
incidentUuidUUID!Incident UUID to get PRs for
mconStringmcon of the table to get the PRs for
includeZeroScoreBooleanInclude PRs with 0 relevance score Default: false.
limitIntLimit the number of PRs returned Default: 10.

Returns

GithubPullRequestsList

Example

query GetGithubPullRequests($incidentUuid: UUID!) {
  getGithubPullRequests(incidentUuid: $incidentUuid) {
    pullRequests {
      id
      url
      title
      issueNumber
      repositoryName
      repositoryOwner
      repositoryUrl
      mergedAt
      numberOfFilesChanged
      score
      provider
    }
  }
}

Related types

GithubPullRequestsList, UUID

getGithubPullRequestsForTable (query)

getGithubPullRequestsForTable is a query in the Monte Carlo GraphQL API, in Integrations and connections. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.

Get the list of pull requests related to a given incident. DEPRECATED: Use getGithubPullRequestsForTableV2

Arguments

ArgumentTypeDescription
mconString!mcon of the table to get the PRs for
includeZeroScoreBooleanInclude PRs with 0 relevance score Default: false.
limitIntLimit the number of PRs returned Default: 10.

Returns

GithubPullRequestsList

Example

query GetGithubPullRequestsForTable($mcon: String!) {
  getGithubPullRequestsForTable(mcon: $mcon) {
    pullRequests {
      id
      url
      title
      issueNumber
      repositoryName
      repositoryOwner
      repositoryUrl
      mergedAt
      numberOfFilesChanged
      score
      provider
    }
  }
}

Related types

GithubPullRequestsList

getGithubPullRequestsForTableV2 (query)

getGithubPullRequestsForTableV2 is a query in the Monte Carlo GraphQL API, in Integrations and connections. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.

Get the list of pull requests related to a given incident

Arguments

ArgumentTypeDescription
mconString!mcon of the table to get the PRs for
startTimeDateTimeGet PRs merged after this time
endTimeDateTimeGet PRs merged at or before this time
offsetInt
beforeString
afterString
firstInt
lastInt

Returns

GithubPullRequestConnection

Example

query GetGithubPullRequestsForTableV2($mcon: String!) {
  getGithubPullRequestsForTableV2(mcon: $mcon) {
    pageInfo {
      hasNextPage
      hasPreviousPage
      startCursor
      endCursor
    }
  }
}

Related types

DateTime, GithubPullRequestConnection

getGitlabIntegration (query)

getGitlabIntegration is a query in the Monte Carlo GraphQL API, in Integrations and connections. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.

Status: Experimental

Gitlab integration info

Arguments

ArgumentTypeDescription
installationUuidUUID

Returns

GitlabAppInstallation

Example

query GetGitlabIntegration {
  getGitlabIntegration {
    uuid
    showImpactAnalysis
    host
    displayName
    prAgentEnabled
  }
}

Related types

GitlabAppInstallation, UUID

getGitlabIntegrations (query)

getGitlabIntegrations is a query in the Monte Carlo GraphQL API, in Integrations and connections. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.

Status: Experimental

Gitlab integration info

Returns

GitlabAppInfo

Example

query GetGitlabIntegrations {
  getGitlabIntegrations {
    installLink
  }
}

Types used only by getGitlabIntegrations

GitlabAppInfo

Object type.

FieldTypeDescription
installLinkStringLink to click in order to install new Gitlab integration
installations[GitlabAppInstallation]Metadata about Gitlab App installation

Related types

GitlabAppInstallation

getGitlabProjects (query)

getGitlabProjects is a query in the Monte Carlo GraphQL API, in Integrations and connections. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.

Status: Experimental

Get GitLab projects for the current user

Arguments

ArgumentTypeDescription
installationUuidUUID!Internal UUID of the GitLab installation

Returns

[GitlabNamespace]

Example

query GetGitlabProjects($installationUuid: UUID!) {
  getGitlabProjects(installationUuid: $installationUuid) {
    namespace
    namespaceId
    selectAll
    webhookErr
  }
}

Types used only by getGitlabProjects

GitlabNamespace

Object type.

FieldTypeDescription
namespaceString!Name of the GitLab group
namespaceIdInt!ID of the GitLab group
selectAllBoolean!True if all the projects in the namespace are selected
projects[GitlabProject]List of projects in the namespace
webhookErrStringError message if webhook creation failed
GitlabProject

Object type.

FieldTypeDescription
idInt!ID of the project
nameString!Name of the project
selectedBoolean!True if the project is selected

Related types

UUID

getPrAgentConfig (query)

getPrAgentConfig is a query in the Monte Carlo GraphQL API, in Integrations and connections. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.

Status: Experimental

Get PR Agent configuration for a VCS installation

Arguments

ArgumentTypeDescription
installationUuidUUID!UUID of the VCS installation

Returns

PrAgentConfig

Example

query GetPrAgentConfig($installationUuid: UUID!) {
  getPrAgentConfig(installationUuid: $installationUuid) {
    isEnabled
    availableRepos
    agentEnabledRepos
    autoReviewEnabled
  }
}

Types used only by getPrAgentConfig

PrAgentConfig

Object type. PR Agent configuration for a VCS installation.

FieldTypeDescription
isEnabledBoolean!Whether PR Agent is enabled for this account
availableRepos[String!]!All repositories/projects available to PR Agent for this installation
agentEnabledRepos[String!]!Repos that PR Agent is allowed to review for this installation
autoReviewEnabledBoolean!Whether the agent reviews newly opened pull requests in enabled repos. When false, it only runs when a user comments "mc review" on a pull request. Defaults to true. Only takes effect while the account has unrestricted usage: an account limited to free usage cannot use "mc review", so turning this off leaves it with no way to run the agent.
riskFactorWeightsPrAgentRiskFactorWeights!Effective PR Risk Rubric category weights for this installation. Returns the configured override when one exists, otherwise the system defaults — never null.
PrAgentRiskFactorWeights

Object type. Customer-configured weights for the PR Risk Rubric categories.

Values are integer percentages (0-100) summing to 100.

FieldTypeDescription
lineageBlastRadiusInt!
assetCriticalityInt!
schemaContractInt!
codeReviewInt!
monitoringInt!
historicalSignalInt!

Related types

UUID

getVcsPullRequests (query)

getVcsPullRequests is a query in the Monte Carlo GraphQL API, in Integrations and connections. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.

Status: Experimental

Get the list of pull requests

Arguments

ArgumentTypeDescription
startTimeDateTime!Get PRs merged after this time
endTimeDateTime!Get PRs merged at or before this time
filters[PullRequestFilterInput]Filters to apply to the list
offsetInt
beforeString
afterString
firstInt
lastInt
orderByStringOrder results by mergedAt

Returns

GithubPullRequestConnection

Example

query GetVcsPullRequests($startTime: DateTime!, $endTime: DateTime!) {
  getVcsPullRequests(startTime: $startTime, endTime: $endTime) {
    pageInfo {
      hasNextPage
      hasPreviousPage
      startCursor
      endCursor
    }
  }
}

Related types

DateTime, GithubPullRequestConnection, PullRequestFilterInput

getVcsSummary (query)

getVcsSummary is a query in the Monte Carlo GraphQL API, in Integrations and connections. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.

Status: Experimental

Returns summary of pull requests available

Arguments

ArgumentTypeDescription
startTimeDateTime!Get PRs merged after this time
endTimeDateTime!Get PRs merged at or before this time
filters[PullRequestFilterInput]Filters to apply to the list

Returns

VCSSummary

Example

query GetVcsSummary($startTime: DateTime!, $endTime: DateTime!) {
  getVcsSummary(startTime: $startTime, endTime: $endTime) {
    totalCount
  }
}

Types used only by getVcsSummary

AvailableFilter

Object type.

FieldTypeDescription
filterNamePullRequestFilterNameName of the filter
values[AvailableFilterAggregatedValue]Values and counts of the filter
AvailableFilterAggregatedValue

Object type.

FieldTypeDescription
valueString!Value of the filter
countIntCount of the filter value
VCSSummary

Object type.

FieldTypeDescription
totalCountIntTotal count of pull requests found
availableFilters[AvailableFilter]Filters available in the result

Related types

DateTime, PullRequestFilterInput, PullRequestFilterName

traverseGitlabProjects (query)

traverseGitlabProjects is a query in the Monte Carlo GraphQL API, in Integrations and connections. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.

Status: Experimental

List groups and projects in Gitlab integration

Arguments

ArgumentTypeDescription
installationUuidUUID!Internal UUID of the installation
parentIdIntGitlab ID of the parent group

Returns

GitlabTraversalResult

Example

query TraverseGitlabProjects($installationUuid: UUID!) {
  traverseGitlabProjects(installationUuid: $installationUuid) {
    groups {
      id
      name
      path
    }
  }
}

Types used only by traverseGitlabProjects

GitlabEntityRef

Object type.

FieldTypeDescription
idInt
nameString
pathString
GitlabTraversalResult

Object type.

FieldTypeDescription
groups[GitlabEntityRef]!
projects[GitlabEntityRef]

Related types

UUID

Mutations

createAzureDevopsInstallation (mutation)

createAzureDevopsInstallation is a mutation in the Monte Carlo GraphQL API, in Integrations and connections. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.

Status: Experimental

Creates an Azure DevOps installation

Arguments

ArgumentTypeDescription
basicAuthCredentialsAzureDevopsBasicAuthCredentialsInput
oauthCredentialsAzureDevopsOauthCredentialsInput
organizationNameString!Azure DevOps organization name

Returns

CreateAzureDevopsInstallation

Example

mutation CreateAzureDevopsInstallation($organizationName: String!) {
  createAzureDevopsInstallation(organizationName: $organizationName) {
    oauthRedirectUrl
  }
}

Types used only by createAzureDevopsInstallation

CreateAzureDevopsInstallation

Object type.

FieldTypeDescription
installationAzureDevopsInstallationIf using basic auth, the Azure DevOps installation that was created
oauthRedirectUrlString

Related types

AzureDevopsBasicAuthCredentialsInput, AzureDevopsInstallation, AzureDevopsOauthCredentialsInput

deleteAzureDevopsInstallation (mutation)

deleteAzureDevopsInstallation is a mutation in the Monte Carlo GraphQL API, in Integrations and connections. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.

Status: Experimental

Deletes an Azure DevOps installation

Arguments

ArgumentTypeDescription
installationUuidUUID!Internal UUID of the Azure DevOps installation to delete

Returns

DeleteAzureDevopsInstallation

Example

mutation DeleteAzureDevopsInstallation($installationUuid: UUID!) {
  deleteAzureDevopsInstallation(installationUuid: $installationUuid) {
    success
  }
}

Types used only by deleteAzureDevopsInstallation

DeleteAzureDevopsInstallation

Object type.

FieldTypeDescription
successBooleanTrue if deleting the installation was successful

Related types

UUID

deleteBitbucketInstallation (mutation)

deleteBitbucketInstallation is a mutation in the Monte Carlo GraphQL API, in Integrations and connections. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.

Status: Experimental

Delete a BitBucket installation

Arguments

ArgumentTypeDescription
installationUuidUUID!Internal UUID of the BitBucket installation to delete

Returns

DeleteBitbucketInstallation

Example

mutation DeleteBitbucketInstallation($installationUuid: UUID!) {
  deleteBitbucketInstallation(installationUuid: $installationUuid) {
    deleted
  }
}

Types used only by deleteBitbucketInstallation

DeleteBitbucketInstallation

Object type.

FieldTypeDescription
deletedBoolean

Related types

UUID

deleteCiGateRepoOverride (mutation)

deleteCiGateRepoOverride is a mutation in the Monte Carlo GraphQL API, in Integrations and connections. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.

Status: Experimental

Delete a per-repo CI gate block_on override

Arguments

ArgumentTypeDescription
installationUuidUUID!UUID of the installation
repoString!Repository name to remove the override for

Returns

DeleteCiGateRepoOverride

Example

mutation DeleteCiGateRepoOverride($installationUuid: UUID!, $repo: String!) {
  deleteCiGateRepoOverride(installationUuid: $installationUuid, repo: $repo) {
    success
  }
}

Types used only by deleteCiGateRepoOverride

DeleteCiGateRepoOverride

Object type. Delete a per-repo CI gate block_on override, reverting to the installation default.

FieldTypeDescription
successBoolean!

Related types

UUID

deleteGithubActionTriggerAppInstallation (mutation)

deleteGithubActionTriggerAppInstallation is a mutation in the Monte Carlo GraphQL API, in Integrations and connections. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.

Status: Experimental

Deletes a Monte Carlo Action Trigger GitHub App installation

Arguments

ArgumentTypeDescription
installationUuidUUID!Internal UUID of the installation to delete

Returns

DeleteGithubActionTriggerAppInstallation

Example

mutation DeleteGithubActionTriggerAppInstallation($installationUuid: UUID!) {
  deleteGithubActionTriggerAppInstallation(installationUuid: $installationUuid) {
    deleted
  }
}

Types used only by deleteGithubActionTriggerAppInstallation

DeleteGithubActionTriggerAppInstallation

Object type. Disconnect a Monte Carlo Action Trigger App installation.

Best-effort uninstalls the app on the GitHub side, then removes the local
record and cached credentials.

FieldTypeDescription
deletedBoolean!True if deleting the installation was successful

Related types

UUID

deleteGithubActionTriggerDispatchConfig (mutation)

deleteGithubActionTriggerDispatchConfig is a mutation in the Monte Carlo GraphQL API, in Integrations and connections. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.

Status: Experimental

Removes an agent's draft-PR dispatch target from an action-trigger app installation

Arguments

ArgumentTypeDescription
agentTraceTableMconString!Trace-table MCON of the agent whose dispatch target is removed
installationUuidUUID!UUID of the installation to remove the entry from

Returns

DeleteGithubActionTriggerDispatchConfig

Example

mutation DeleteGithubActionTriggerDispatchConfig($agentTraceTableMcon: String!, $installationUuid: UUID!) {
  deleteGithubActionTriggerDispatchConfig(agentTraceTableMcon: $agentTraceTableMcon, installationUuid: $installationUuid) {
    deleted
  }
}

Types used only by deleteGithubActionTriggerDispatchConfig

DeleteGithubActionTriggerDispatchConfig

Object type. Remove an agent's draft-PR dispatch target from an installation.

Other agents' dispatch targets are unaffected. Without an entry the
agent's findings can no longer be dispatched.

FieldTypeDescription
deletedBoolean!True if an entry existed and was removed

Related types

UUID

deleteGithubInstallation (mutation)

deleteGithubInstallation is a mutation in the Monte Carlo GraphQL API, in Integrations and connections. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.

Arguments

ArgumentTypeDescription
installationUuidUUID!Internal UUID of the installation to delete

Returns

DeleteGithubInstallation

Example

mutation DeleteGithubInstallation($installationUuid: UUID!) {
  deleteGithubInstallation(installationUuid: $installationUuid) {
    deleted
  }
}

Types used only by deleteGithubInstallation

DeleteGithubInstallation

Object type.

FieldTypeDescription
deletedBooleanTrue if deleting the installation was successful

Related types

UUID

deleteGitlabInstallation (mutation)

deleteGitlabInstallation is a mutation in the Monte Carlo GraphQL API, in Integrations and connections. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.

Status: Experimental

Deletes a Gitlab app

Arguments

ArgumentTypeDescription
installationUuidUUID!Internal UUID of the GitLab installation to delete

Returns

DeleteGitlabInstallation

Example

mutation DeleteGitlabInstallation($installationUuid: UUID!) {
  deleteGitlabInstallation(installationUuid: $installationUuid) {
    deleted
  }
}

Types used only by deleteGitlabInstallation

DeleteGitlabInstallation

Object type.

FieldTypeDescription
deletedBooleanTrue if deleting the installation was successful

Related types

UUID

linkAzureDevopsInstallation (mutation)

linkAzureDevopsInstallation is a mutation in the Monte Carlo GraphQL API, in Integrations and connections. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.

Status: Experimental

Completes the Azure DevOps OAuth authorization flow

Arguments

ArgumentTypeDescription
codeString!OAuth code from callback URL
stateString!OAuth state from callback URL

Returns

LinkAzureDevopsInstallation

Example

mutation LinkAzureDevopsInstallation($code: String!, $state: String!) {
  linkAzureDevopsInstallation(code: $code, state: $state) {
    success
  }
}

Types used only by linkAzureDevopsInstallation

LinkAzureDevopsInstallation

Object type. Called from the FE when an OAuth callback is received.

FieldTypeDescription
successBooleanTrue if exchanging code for tokens was successful
installationAzureDevopsInstallationUpdated Azure DevOps installation

Related types

AzureDevopsInstallation

linkBitbucketConnection (mutation)

linkBitbucketConnection is a mutation in the Monte Carlo GraphQL API, in Integrations and connections. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.

Status: Experimental

Complete MC BitBucket Cloud OAuth connection

Arguments

ArgumentTypeDescription
codeString!Authorization code from BitBucket
stateString!Installation UUID passed as OAuth state

Returns

LinkBitbucketConnection

Example

mutation LinkBitbucketConnection($code: String!, $state: String!) {
  linkBitbucketConnection(code: $code, state: $state) {
    success
    installationId
  }
}

Types used only by linkBitbucketConnection

LinkBitbucketConnection

Object type.

FieldTypeDescription
successBoolean
installationIdStringInternal UUID of the installation

linkGithubActionTriggerAppInstallation (mutation)

linkGithubActionTriggerAppInstallation is a mutation in the Monte Carlo GraphQL API, in Integrations and connections. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.

Status: Experimental

Links a Monte Carlo Action Trigger GitHub App installation

Arguments

ArgumentTypeDescription
codeString!OAuth authorization code passed from GitHub
installationIdString!GitHub App installation id from the Setup URL callback

Returns

LinkGithubActionTriggerAppInstallation

Example

mutation LinkGithubActionTriggerAppInstallation($code: String!, $installationId: String!) {
  linkGithubActionTriggerAppInstallation(code: $code, installationId: $installationId) {
    success
  }
}

Types used only by linkGithubActionTriggerAppInstallation

LinkGithubActionTriggerAppInstallation

Object type. Called from the FE post-install callback (Setup URL redirect) for the
Monte Carlo Action Trigger GitHub App.

GitHub appends installation_id and an OAuth code to the Setup URL;
the backend exchanges the code and verifies the user controls the
installation before linking it to the account.

FieldTypeDescription
successBoolean!True if linking the installation was successful

linkGithubAppInstallation (mutation)

linkGithubAppInstallation is a mutation in the Monte Carlo GraphQL API, in Integrations and connections. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.

Called from the FE as part of the post-installation callback.
The "code" parameter is used to validate that the request is
an authentic Github callback and authenticates the user on the
Github side.

For GitHub Enterprise Server (GHES, BYO-app) installations the FE passes
installation_uuid (the pending GHInstallationModel.uuid round-tripped
through GitHub as the OAuth state) so the backend can derive the host
and load the per-installation credentials. github.com callers omit
installation_uuid.

Arguments

ArgumentTypeDescription
codeString!Security code passed from Github
installationIdString!Github App installation id
installationUuidUUIDUUID of the pending GHES installation row (round-tripped through OAuth as state). Required for GHES; omit for github.com.

Returns

LinkGithubAppInstallation

Example

mutation LinkGithubAppInstallation($code: String!, $installationId: String!) {
  linkGithubAppInstallation(code: $code, installationId: $installationId) {
    success
  }
}

Types used only by linkGithubAppInstallation

LinkGithubAppInstallation

Object type. Called from the FE as part of the post-installation callback.
The "code" parameter is used to validate that the request is
an authentic Github callback and authenticates the user on the
Github side.

For GitHub Enterprise Server (GHES, BYO-app) installations the FE passes
installation_uuid (the pending GHInstallationModel.uuid round-tripped
through GitHub as the OAuth state) so the backend can derive the host
and load the per-installation credentials. github.com callers omit
installation_uuid.

FieldTypeDescription
successBooleanTrue if linking the installation was successful

Related types

UUID

linkGitlabApp (mutation)

linkGitlabApp is a mutation in the Monte Carlo GraphQL API, in Integrations and connections. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.

Status: Experimental

Links a Gitlab app

Arguments

ArgumentTypeDescription
codeString!Security code passed from Gitlab
stateString!Client account_uuid

Returns

LinkGitlabApp

Example

mutation LinkGitlabApp($code: String!, $state: String!) {
  linkGitlabApp(code: $code, state: $state) {
    success
    installationId
  }
}

Types used only by linkGitlabApp

LinkGitlabApp

Object type.

FieldTypeDescription
successBooleanTrue if linking the installation was successful
installationIdStringInternal UUID of the installation

registerBitbucketConnection (mutation)

registerBitbucketConnection is a mutation in the Monte Carlo GraphQL API, in Integrations and connections. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.

Status: Experimental

Start MC BitBucket Cloud OAuth connection

Returns

RegisterBitbucketConnection

Example

mutation RegisterBitbucketConnection {
  registerBitbucketConnection {
    authUrl
  }
}

Types used only by registerBitbucketConnection

RegisterBitbucketConnection

Object type.

FieldTypeDescription
authUrlStringBitBucket URL to request authorization code

registerGithubActionTriggerAppInstallationRequest (mutation)

registerGithubActionTriggerAppInstallationRequest is a mutation in the Monte Carlo GraphQL API, in Integrations and connections. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.

Status: Experimental

Records a pending Monte Carlo Action Trigger GitHub App install request so the integration links automatically once a GitHub organization admin approves it

Arguments

ArgumentTypeDescription
codeString!OAuth authorization code passed from GitHub

Returns

RegisterGithubActionTriggerAppInstallationRequest

Example

mutation RegisterGithubActionTriggerAppInstallationRequest($code: String!) {
  registerGithubActionTriggerAppInstallationRequest(code: $code) {
    success
  }
}

Types used only by registerGithubActionTriggerAppInstallationRequest

RegisterGithubActionTriggerAppInstallationRequest

Object type. Record a pending Monte Carlo Action Trigger GitHub App install request.

Called from the FE post-install callback when the user isn't a GitHub org
admin and could only request the installation (GitHub redirects with
setup_action=request and an OAuth code, but no installation_id).
Once a GitHub organization admin approves the request, the installation is
linked to this account automatically — the approving admin does not need a
Monte Carlo account.

FieldTypeDescription
successBoolean!True if the pending install request was recorded. False when a pending request for the same GitHub identity is held by another user and was left unchanged.

registerGithubAppInstallationRequest (mutation)

registerGithubAppInstallationRequest is a mutation in the Monte Carlo GraphQL API, in Integrations and connections. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.

Called from the FE as part of the post-installation callback
in case the user requested approval from her Github admin,
instead of approving directly.
The "code" parameter is used to identify the Github user of the
requester.

For GitHub Enterprise Server (GHES, BYO-app) requests, the FE passes the
pending installation_uuid (round-tripped through OAuth as state) so
the backend can derive the host, target the customer's GHES instance for
the OAuth + GET /user calls, and ensure the later
installation.created webhook correlates the right pending request to
the right GHES installation.

Arguments

ArgumentTypeDescription
codeString!Security code passed from Github
installationUuidUUIDUUID of the pending GHES installation row (round-tripped through OAuth as state). Required for GHES; omit for github.com.

Returns

RegisterGithubAppInstallationRequest

Example

mutation RegisterGithubAppInstallationRequest($code: String!) {
  registerGithubAppInstallationRequest(code: $code) {
    success
  }
}

Types used only by registerGithubAppInstallationRequest

RegisterGithubAppInstallationRequest

Object type. Called from the FE as part of the post-installation callback
in case the user requested approval from her Github admin,
instead of approving directly.
The "code" parameter is used to identify the Github user of the
requester.

For GitHub Enterprise Server (GHES, BYO-app) requests, the FE passes the
pending installation_uuid (round-tripped through OAuth as state) so
the backend can derive the host, target the customer's GHES instance for
the OAuth + GET /user calls, and ensure the later
installation.created webhook correlates the right pending request to
the right GHES installation.

FieldTypeDescription
successBooleanTrue if the registration was successful

Related types

UUID

registerGithubAppOnGhes (mutation)

registerGithubAppOnGhes is a mutation in the Monte Carlo GraphQL API, in Integrations and connections. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.

Status: Experimental

Registers a customer-supplied GitHub App on GHES

Arguments

ArgumentTypeDescription
appIdString!GitHub App ID
appSlugString!GitHub App slug
clientIdString!GitHub App client ID
clientSecretString!GitHub App client secret
hostString!GHES hostname (e.g. ghes.acme.com)
privateKeyString!GitHub App private key (PEM)
webhookSecretString!GitHub App webhook secret

Returns

RegisterGithubAppOnGhes

Example

mutation RegisterGithubAppOnGhes($appId: String!, $appSlug: String!, $clientId: String!, $clientSecret: String!, $host: String!, $privateKey: String!, $webhookSecret: String!) {
  registerGithubAppOnGhes(appId: $appId, appSlug: $appSlug, clientId: $clientId, clientSecret: $clientSecret, host: $host, privateKey: $privateKey, webhookSecret: $webhookSecret) {
    authUrl
  }
}

Types used only by registerGithubAppOnGhes

RegisterGithubAppOnGhes

Object type. Register a customer-supplied GitHub App for a GHES (GitHub Enterprise
Server) installation under the BYO-app model (DOL-8651).

GHES does not allow MC's github.com-registered App to be installed on the
customer's GHES server, so each GHES customer registers their own App and
sends the credentials back via this mutation. We persist a host-only
GHInstallationModel row and upload the BYO-app credentials to vault,
then return the GHES app-install URL the customer is redirected to —
that URL carries the GHInstallationModel.uuid as OAuth state so
the post-install callback can correlate back to the pending row.

Idempotent: a retry for the same (account, host) reuses the existing
pending row and credentials_key rather than creating a duplicate.

FieldTypeDescription
authUrlStringGHES URL to install the GitHub App

registerGitlabApp (mutation)

registerGitlabApp is a mutation in the Monte Carlo GraphQL API, in Integrations and connections. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.

Status: Experimental

Registers a Gitlab app

Arguments

ArgumentTypeDescription
appIdString!Application ID generated by GitLab
appSecretString!Application secret generated by GitLab
hostStringCustom GitLab host

Returns

RegisterGitlabApp

Example

mutation RegisterGitlabApp($appId: String!, $appSecret: String!) {
  registerGitlabApp(appId: $appId, appSecret: $appSecret) {
    authUrl
  }
}

Types used only by registerGitlabApp

RegisterGitlabApp

Object type.

FieldTypeDescription
authUrlStringGitLab URL to request authorization code

selectBitbucketRepos (mutation)

selectBitbucketRepos is a mutation in the Monte Carlo GraphQL API, in Integrations and connections. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.

Status: Experimental

Select BitBucket repos to monitor

Arguments

ArgumentTypeDescription
installationUuidUUID!Internal UUID of the BitBucket installation
repos[BitbucketRepoSelectionInput]!

Returns

SelectBitbucketRepos

Example

mutation SelectBitbucketRepos($installationUuid: UUID!, $repos: [BitbucketRepoSelectionInput]!) {
  selectBitbucketRepos(installationUuid: $installationUuid, repos: $repos) {
    success
  }
}

Types used only by selectBitbucketRepos

BitbucketRepoSelectionInput

Input object type.

FieldTypeDescription
workspaceString!BitBucket workspace slug
repoSlugString!Repository slug within the workspace
repoUuidString!BitBucket repository UUID
SelectBitbucketRepos

Object type.

FieldTypeDescription
successBoolean

Related types

UUID

selectGitlabProjects (mutation)

selectGitlabProjects is a mutation in the Monte Carlo GraphQL API, in Integrations and connections. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.

Status: Experimental

Select GitLab projects for monitoring

Arguments

ArgumentTypeDescription
installationUuidUUID!Internal UUID of the GitLab installation
repositories[GitlabNamespaceSelection]

Returns

SelectGitlabProjects

Example

mutation SelectGitlabProjects($installationUuid: UUID!) {
  selectGitlabProjects(installationUuid: $installationUuid) {
    success
  }
}

Types used only by selectGitlabProjects

GitlabNamespaceSelection

Input object type.

FieldTypeDescription
namespaceIdInt!GitLab ID of the group or subgroup
selectAllBoolean!True if all projects in the namespace are selected
projects[Int]Optional: List of GitLab projects IDs or NULL (=all projects)
parents[Int]Optional: List of all parent namespace IDs
SelectGitlabProjects

Object type.

FieldTypeDescription
successBoolean

Related types

UUID

setAzureDevopsSourceSelections (mutation)

setAzureDevopsSourceSelections is a mutation in the Monte Carlo GraphQL API, in Integrations and connections. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.

Status: Experimental

Set which Azure Devops projects/repositories are selected for monitoring

Arguments

ArgumentTypeDescription
installationUuidUUID!Internal UUID of the Azure DevOps installation
selections[AzureDevopsSourceSelectionInput]

Returns

SetAzureDevopsSourceSelections

Example

mutation SetAzureDevopsSourceSelections($installationUuid: UUID!) {
  setAzureDevopsSourceSelections(installationUuid: $installationUuid) {
    success
  }
}

Types used only by setAzureDevopsSourceSelections

AzureDevopsSourceSelectionInput

Input object type.

FieldTypeDescription
projectIdString!ID of Azure DevOps project
repositoryIdStringID of Azure DevOps repository
SetAzureDevopsSourceSelections

Object type.

FieldTypeDescription
successBooleanAlways true. Response will contain errors on failure.

Related types

UUID

Source: The GraphQL API reference

This page is generated from the GraphQL schema on each release. Changes made in ReadMe are overwritten.