Network access control (GraphQL)

Related queries and mutations in Agents and deployments. Each has its own section.

Queries

getCurrentClientIp (query)

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

Status: General availability

Get the IP address of the caller as observed by Monte Carlo, or null if it cannot be determined. The value is derived from request headers, so it is advisory only and not suitable for enforcement decisions - use it to check whether the caller would be covered by an IP allow list before saving network access controls.

Returns

String

Example

query GetCurrentClientIp {
  getCurrentClientIp
}

getMonteCarloSupportIps (query)

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

Status: General availability

Get the egress IP addresses used by Monte Carlo Support when accessing customer accounts. Include these in IP allow lists (especially the UI and Global scopes) so Monte Carlo Support keeps access when network access controls are enabled.

Returns

[String!]!

Example

query GetMonteCarloSupportIps {
  getMonteCarloSupportIps
}

getNetworkAccessControlLists (query)

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

Status: General availability

List all network access control (IP allow list) entries for the account

Returns

[AccessControlItemOutput!]

Example

query GetNetworkAccessControlLists {
  getNetworkAccessControlLists {
    scope
  }
}

Types used only by getNetworkAccessControlLists

AccessControlItemOutput

Object type. A network access control item for a given scope.

FieldTypeDescription
scopeAccessControlScopeThe access control scope
allowedIps[AllowedIPEntryOutput!]!List of allowed IP entries
AllowedIPEntryOutput

Object type. An IP allow list entry with value and optional description.

FieldTypeDescription
valueString!IP address or CIDR range
descriptionStringOptional description for this entry

Related types

AccessControlScope

Mutations

deleteNetworkAccessControl (mutation)

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

Status: General availability

Delete an IP allow list for a given scope

Arguments

ArgumentTypeDescription
scopeAccessControlScope!The access control scope

Returns

DeleteNetworkAccessControl

Example

mutation DeleteNetworkAccessControl($scope: AccessControlScope!) {
  deleteNetworkAccessControl(scope: $scope) {
    deleted
  }
}

Types used only by deleteNetworkAccessControl

DeleteNetworkAccessControl

Object type. Delete an IP allow list for a given scope.

FieldTypeDescription
deletedBooleanWhether the IP allow list was deleted successfully

Related types

AccessControlScope

saveNetworkAccessControl (mutation)

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

Status: General availability

Save (create or overwrite) an IP allow list for a given scope. Each entry must be a valid IP address or a CIDR range in network-address form (e.g. 198.51.100.0/24 — host bits are rejected). Duplicate entries, /0 ranges, and empty lists are rejected; at most 1000 entries per scope

Arguments

ArgumentTypeDescription
allowedIps[AllowedIPEntryInput!]!List of allowed IP entries
scopeAccessControlScope!The access control scope

Returns

SaveNetworkAccessControl

Example

mutation SaveNetworkAccessControl($allowedIps: [AllowedIPEntryInput!]!, $scope: AccessControlScope!) {
  saveNetworkAccessControl(allowedIps: $allowedIps, scope: $scope) {
    saved
  }
}

Types used only by saveNetworkAccessControl

AllowedIPEntryInput

Input object type. Input type for an IP allow list entry.

FieldTypeDescription
valueString!IP address or CIDR range. CIDR ranges must use the network address (e.g. 198.51.100.0/24, not 198.51.100.7/24)
descriptionStringOptional description for this entry
SaveNetworkAccessControl

Object type. Save (create or overwrite) an IP allow list for a given scope.

FieldTypeDescription
savedBooleanWhether the IP allow list was saved successfully

Related types

AccessControlScope

Source: The GraphQL API reference

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