Domains (GraphQL)

Related queries and mutations in Catalog and lineage. Each has its own section.

Queries

getAllDomains (query)

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

Get all metadata domains (excludes domains only used for data sampling restrictions)

Returns

[DomainOutput]

Example

query GetAllDomains {
  getAllDomains {
    uuid
    name
    type
    description
    createdByEmail
    domainTag
    teammateOnboarding
    assignments
    excludedAssignments
    objAssignmentUpdateTime
  }
}

Related types

DomainOutput

getDomain (query)

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

Get domain by id

Arguments

ArgumentTypeDescription
uuidUUID!Domain UUID

Returns

DomainOutput

Example

query GetDomain($uuid: UUID!) {
  getDomain(uuid: $uuid) {
    uuid
    name
    type
    description
    createdByEmail
    domainTag
    teammateOnboarding
    assignments
    excludedAssignments
    objAssignmentUpdateTime
  }
}

Related types

DomainOutput, UUID

getDomainMembershipsForMcons (query)

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

Status: Experimental

Get the full list of domains each mcon belongs to, including direct assignments and those inherited via schema/database or tag-based rules. Returns one entry per input mcon. Agent MCONs use the domains granted through their live identity, including its trace table and any linked registration. An agent with no live identity returns an empty list.

Arguments

ArgumentTypeDescription
mcons[String!]!

Returns

[MconDomainMembershipsOutput!]!

Example

query GetDomainMembershipsForMcons($mcons: [String!]!) {
  getDomainMembershipsForMcons(mcons: $mcons) {
    mcon
  }
}

Types used only by getDomainMembershipsForMcons

DomainMembershipOutput

Object type. A single domain an mcon belongs to.

FieldTypeDescription
uuidUUID!Domain UUID
nameString!Domain name
tagString!Domain tag
MconDomainMembershipsOutput

Object type. Domains an mcon belongs to, including inherited and tag-based.

FieldTypeDescription
mconString!The mcon
domains[DomainMembershipOutput!]!Domains the mcon belongs to

Related types

UUID

getDomainsByTags (query)

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

Status: Experimental

Find domains that contain at least one table marked with any of the given tags. When multiple tags are passed, results are grouped per input tag (a single domain may appear under several tags). Tags that match no domains are surfaced under tagsWithNoMatches.

Arguments

ArgumentTypeDescription
tags[TagKeyValuePairInput!]!Tags to look up. Each tag may be name-only or name+value. Duplicate tags are collapsed.
limitIntMax (tag, domain) matches per page (default 100, capped at 500).
offsetIntOffset into the match list. Default 0.
domainTypes[DomainType!]Domain types to include. Defaults to metadata-only.
domainUuidUUIDRestrict the search to a single domain. The caller must have access to this domain; passing an inaccessible UUID returns an authorization error. When omitted, the search is scoped to the caller's accessible domains.

Returns

DomainsByTagsOutput!

Example

query GetDomainsByTags($tags: [TagKeyValuePairInput!]!) {
  getDomainsByTags(tags: $tags) {
    totalCount
  }
}

Types used only by getDomainsByTags

DomainsByTagMatchOutput

Object type. A single (tag, domain) match: a domain that contains at least one table marked with the given tag

FieldTypeDescription
tagTagKeyValuePairOutput!The input tag that matched this domain
domainDomainSummaryOutput!Domain that contains at least one table marked with the associated tag
DomainsByTagsOutput

Object type. Paginated result of domains grouped by their matching input tag

FieldTypeDescription
matches[DomainsByTagMatchOutput!]!Current page of (tag, domain) matches, ordered by input tag order then domain name. Use limit and offset to page through.
totalCountInt!Total number of (tag, domain) matches across all pages
tagsWithNoMatches[TagKeyValuePairOutput!]!Input tags that did not match any domain. Always returned in full regardless of pagination; empty when every input tag has at least one match.

Related types

DomainSummaryOutput, DomainType, TagKeyValuePairInput, TagKeyValuePairOutput, UUID

getDomainsV2 (query)

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

Status: Experimental

Get domains with pagination and aggregated statistics (v2 API)

Arguments

ArgumentTypeDescription
searchStringSearch domains by name
domainUuidUUIDFilter to a specific domain by UUID.
agentAssistedBooleanFilter domains by whether they are agent-assisted. A domain is agent-assisted when an agent user is provisioned to it via an internal authorization group. When true, returns only agent-assisted domains. When false, returns only domains without a provisioned agent user. When null or omitted, no agent-assistance filter is applied.
triageEnabledBoolean(experimental) Filter domains by whether alerts in them are effectively triaged automatically — the account-level automated-triage default combined with the domain's override, matching the automated-triage settings page. A domain with a Bayes teammate counts as triaged: the teammate decides it, so the account default and the domain's override don't apply. When true, returns only domains where triage is effectively on. When false, returns only domains where it is effectively off. When null or omitted, no triage filter is applied.
troubleshootingEnabledBoolean(experimental) Filter domains by whether the troubleshooting agent runs on their alerts automatically — the account-level threshold combined with the domain's override, matching effectiveTsaThreshold: on when that threshold is not OFF, and always off where automated triage is off. A domain with a Bayes teammate counts as on: the teammate decides it, so the account threshold and the domain's override don't apply. Like effectiveTsaThreshold, this is AI-agents settings: a caller without AI-agents settings access gets no domains from it, and a caller whose access is restricted to some domains matches only within them. When true, returns only domains where it is effectively on. When false, returns only domains where it is effectively off. When null or omitted, no troubleshooting filter is applied.
hasTeammateBoolean(experimental) Filter domains by whether they have an active Bayes teammate, the same rule that sets teammatePolicy. That is not agentAssisted, which reads the agent user provisioned to the domain. When true, returns only domains with an active teammate. When false, returns only domains without one. When null or omitted, no teammate filter is applied.
guardrailStatus[SpendGuardrailStatus!](experimental) Filter domains by how close their spend today is to their daily spend guardrail, as getSpendSummary reports it. Returns the domains in any of the given statuses. A domain with no guardrail in force is NONE, and so is a domain with a Bayes teammate, which can't have one. Only domains whose spend the caller may see match, whatever the status. Applied before pagination, so the count and cursors are of the filtered list. When null, empty or omitted, no guardrail filter is applied.
offsetInt
beforeString
afterString
firstInt
lastInt
orderByStringOrder results by name (prefix with '-' for descending)

Returns

DomainOutputV2Connection

Example

query GetDomainsV2 {
  getDomainsV2 {
    totalCount
  }
}

Types used only by getDomainsV2

DomainOutputV2Connection

Object type.

FieldTypeDescription
pageInfoPageInfo!Pagination data for this connection.
edges[DomainOutputV2Edge]!Contains the nodes in this connection.
totalCountInt
DomainOutputV2Edge

Object type. A Relay edge containing a DomainOutputV2 and its cursor.

FieldTypeDescription
nodeDomainOutputV2The item at the end of the edge
cursorString!A cursor for use in pagination
SpendGuardrailStatus

Enum type. How close a domain's spend today is to its daily guardrail. Spend at or above the
guardrail has reached it, and at or above 80% of it is near.

ValueDescription
NONE
UNDER
NEAR
REACHED

Related types

DomainOutputV2, PageInfo, UUID

getDomainTableCounts (query)

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

Status: Experimental

Get monitored/non-monitored/total table counts for a single domain. Returns zero counts when the UUID is not in the caller's account. Selecting total on its own resolves it from the domain's assignments, which is far cheaper on large domains but can read slightly high; select monitored or notMonitored to get all three from the exact per-table breakdown. Domains holding more than 100,000 tables are too large to break down within the request budget: they return total with monitored and notMonitored null. A null breakdown is therefore a deterministic answer, not a failure — a failed count yields a GraphQL error and no data at all.

Arguments

ArgumentTypeDescription
domainUuidUUID!Domain UUID

Returns

DomainTableCounts!

Example

query GetDomainTableCounts($domainUuid: UUID!) {
  getDomainTableCounts(domainUuid: $domainUuid) {
    monitored
    notMonitored
    total
  }
}

Related types

DomainTableCounts, UUID

Mutations

addDomainAssignments (mutation)

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

Status: Experimental

Incrementally add MCON assignments to a domain

Arguments

ArgumentTypeDescription
domainUuidUUID!UUID of the domain to add assignments to
mcons[String!]!MCONs to assign to the domain (max 250)

Returns

AddDomainAssignments

Example

mutation AddDomainAssignments($domainUuid: UUID!, $mcons: [String!]!) {
  addDomainAssignments(domainUuid: $domainUuid, mcons: $mcons) {
    domain {
      uuid
      name
      type
      description
      createdByEmail
      domainTag
      teammateOnboarding
      assignments
      excludedAssignments
      objAssignmentUpdateTime
    }
  }
}

Types used only by addDomainAssignments

AddDomainAssignments

Object type. Incrementally add MCON assignments to a domain

FieldTypeDescription
domainDomainOutputUpdated domain

Related types

DomainOutput, UUID

createOrUpdateDomain (mutation)

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

Create or update a domain

Arguments

ArgumentTypeDescription
assignments[String]Objects assigned to domain (as MCONs)
criteria[DomainCriterionInput!]Criteria scoping the domain to a location, a tag filter, or a location narrowed by tags. Criteria belong to the same replaceable set as assignments, excludedAssignments, tags and excludedTags: an update that sends any one of them replaces all five, so send the domain's full selection together. An update that sends none of them leaves the selection untouched.
defaultAudienceUuids[UUID!]UUIDs of the audiences that new monitors in this domain start with. On update, leaving it out keeps the current audiences, a list replaces them, and an empty list clears them. Every uuid must be an audience in the same account. Ignored on a dry run.
descriptionStringDescription of the domain
dryRunBooleanWhen true, do not persist anything. Instead, resolve the given selection rules and return how many warehouse tables the domain would include via resourceCounts. domain is null on a dry run. Default: false.
excludedAssignments[String]Objects excluded from domain (as MCONs)
excludedTags[TagKeyValuePairInput]Filter out by tag key/value pairs for tables.
nameString!Domain name
referenceDomainUuids[UUID!]UUIDs of domains whose owned assets this domain's monitors may read. On update, omitted fields are preserved: sending referenceDomainUuids alone changes only references. Replaces the current reference domains when provided; an empty list clears them. Every uuid must be a domain in the same account, and the domain cannot reference itself.
tags[TagKeyValuePairInput]Filter by tag key/value pairs for tables.
uuidUUIDUUID of domain to update

Returns

CreateOrUpdateDomain

Example

mutation CreateOrUpdateDomain($name: String!) {
  createOrUpdateDomain(name: $name) {
    domain {
      uuid
      name
      type
      description
      createdByEmail
      domainTag
      teammateOnboarding
      assignments
      excludedAssignments
      objAssignmentUpdateTime
    }
  }
}

Types used only by createOrUpdateDomain

CreateOrUpdateDomain

Object type. Create or update a domain

FieldTypeDescription
domainDomainOutputCreated or updated domain (null on dry run)
resourceCountsDomainTableCountsWarehouse-table counts the domain would include for its selection rules. Only populated when dryRun is true.
DomainCriterionInput

Input object type. A domain criterion: a tag filter with a match operator, intersected with a location when one is given and applied account-wide when omitted. Omitting the location with operator: ALL selects the intersection of the tags.

FieldTypeDescription
locationStringWhat the criterion is scoped to: an integration (warehouse or ETL) as a uuid or an MCON, or the MCON of any other catalog object of the account (a database, schema, table, job). Omit it for a tag-only criterion.
tags[TagKeyValuePairInput!]Tags an asset must carry to match this criterion.
operatorDomainTagOperatorHow tags combine. ANY matches an asset carrying at least one of them, ALL an asset carrying every one. Defaults to ANY when omitted.
excludedBooleanWhen true, assets matching this criterion are excluded.

Related types

DomainOutput, DomainTableCounts, DomainTagOperator, TagKeyValuePairInput, UUID

deleteDomain (mutation)

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

Delete a domain

Arguments

ArgumentTypeDescription
uuidUUID!UUID of domain to delete

Returns

DeleteDomain

Example

mutation DeleteDomain($uuid: UUID!) {
  deleteDomain(uuid: $uuid) {
    deleted
  }
}

Types used only by deleteDomain

DeleteDomain

Object type. Delete a domain

FieldTypeDescription
deletedIntNumber of domains deleted

Related types

UUID

removeDomainAssignments (mutation)

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

Status: Experimental

Incrementally remove MCON assignments from a domain

Arguments

ArgumentTypeDescription
domainUuidUUID!UUID of the domain to remove assignments from
mcons[String!]!MCONs to remove from the domain (max 250)

Returns

RemoveDomainAssignments

Example

mutation RemoveDomainAssignments($domainUuid: UUID!, $mcons: [String!]!) {
  removeDomainAssignments(domainUuid: $domainUuid, mcons: $mcons) {
    domain {
      uuid
      name
      type
      description
      createdByEmail
      domainTag
      teammateOnboarding
      assignments
      excludedAssignments
      objAssignmentUpdateTime
    }
  }
}

Types used only by removeDomainAssignments

RemoveDomainAssignments

Object type. Incrementally remove MCON assignments from a domain

FieldTypeDescription
domainDomainOutputUpdated domain

Related types

DomainOutput, UUID

Source: The GraphQL API reference

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