PII monitors (GraphQL)

Related queries and mutations in Monitors. Each has its own section.

Queries

getPiiScanBulkMonitors (query)

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

Status: Experimental

Return every part of the PII setup that the given bulk monitor belongs to, ordered by start time. Returns an empty list for a monitor with no piiScanUuid. Errors if the user cannot read every part.

Arguments

ArgumentTypeDescription
bulkMonitorUuidUUID!

Returns

[BulkMonitor!]!

Example

query GetPiiScanBulkMonitors($bulkMonitorUuid: UUID!) {
  getPiiScanBulkMonitors(bulkMonitorUuid: $bulkMonitorUuid) {
    createdTime
    updatedTime
    uuid
    accountUuid
    isDeleted
    deletedAt
    description
    notes
    priority
    isPaused
    isDraft
    warehouseUuid
    monitorName
    domainRestrictions
    timeAxisFieldName
    timeAxisFieldType
    collectionLagHours
    autoPruneEnabled
    lineageNarrowingEnabled
    piiScanUuid
  }
}

Related types

BulkMonitor, UUID

getPiiScanFindings (query)

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

Status: Experimental

Return latest nonzero table/field findings for a PII scan bulk monitor.

Arguments

ArgumentTypeDescription
bulkMonitorUuidUUID!
limitIntDefault: 500.

Returns

PiiScanFindingsSummary!

Example

query GetPiiScanFindings($bulkMonitorUuid: UUID!) {
  getPiiScanFindings(bulkMonitorUuid: $bulkMonitorUuid) {
    latestScanTime
    hasMore
    columnsHasMore
    columnsTotalCount
    columnsOffset
    columnsLimit
  }
}

Related types

PiiScanFindingsSummary, UUID

getPiiScanFindingSampleRows (query)

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

Status: Experimental

Live-load a small sample of values matching a PII scan finding. Sample values are returned to the caller and are not stored.

Arguments

ArgumentTypeDescription
warehouseUuidUUID!
fullTableIdString!
fieldKeyString!
piiTypeString!
limitIntDefault: 5.

Returns

PiiScanFindingSampleRows!

Example

query GetPiiScanFindingSampleRows($warehouseUuid: UUID!, $fullTableId: String!, $fieldKey: String!, $piiType: String!) {
  getPiiScanFindingSampleRows(warehouseUuid: $warehouseUuid, fullTableId: $fullTableId, fieldKey: $fieldKey, piiType: $piiType) {
    columns
    rows
    query
    hasError
    error
    samplingDisabled
    samplingDisabledReason
    samplingDisabledMessage
    samplingRestricted
  }
}

Types used only by getPiiScanFindingSampleRows

PiiScanFindingSampleRows

Object type. Live sample rows matching a PII scan finding. Values are not stored.

FieldTypeDescription
columns[String!]!
rows[[String]!]!
queryStringThe executed SQL query.
hasErrorBoolean!Whether the warehouse sampling query returned an error.
errorStringWarehouse sampling error, when available.
samplingDisabledBoolean!Whether sample rows are unavailable because data sampling is disabled.
samplingDisabledReasonStringMachine-readable reason sample rows are unavailable, when known.
samplingDisabledMessageStringUser-facing reason sample rows are unavailable, when known.
samplingRestrictedBoolean!Whether warehouse data sampling restrictions are configured.

Related types

UUID

getPiiScanInventory (query)

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

Status: Experimental

Return PII findings inventory totals and latest nonzero findings across accessible PII bulk monitors, optionally scoped to one bulk monitor.

Arguments

ArgumentTypeDescription
bulkMonitorUuidUUID
warehouseUuidUUIDLimit inventory to one warehouse. Null means all accessible warehouses.
projectNames[String!]Limit inventory to database/project names. Null or an empty list means no database/project filter.
datasets[String!]Limit inventory to schema/dataset names. Null or an empty list means no schema/dataset filter.
piiTypes[String!]Limit inventory to these PII types, including custom regex names. Applied before column paging. Totals follow it, except hasWarehouseTags, totalWarehouseTaggedColumns, hasSnowflakeTags and totalSnowflakeTaggedColumns. Columns found only by warehouse tags are excluded while it is set. Null or an empty list means no PII type filter.
matchStrengths[PiiMatchStrength!]Limit inventory to findings with these pattern match strengths. Applied per finding before column paging, so a column keeps only its matching findings. Totals follow it, except hasWarehouseTags, totalWarehouseTaggedColumns, hasSnowflakeTags and totalSnowflakeTaggedColumns. Columns found only by warehouse tags are excluded while it is set. Null or an empty list means no match strength filter.
reviewStatePiiScanReviewStateACTIVE returns current inventory and excludes false positives. FALSE_POSITIVE returns the suppressed audit view. Default: "ACTIVE".
limitIntDefault: 500.
columnsLimitIntMaximum grouped inventory rows to return. Default: 500.
columnsOffsetIntGrouped inventory row offset for pagination. Default: 0.

Returns

PiiScanFindingsSummary!

Example

query GetPiiScanInventory {
  getPiiScanInventory {
    latestScanTime
    hasMore
    columnsHasMore
    columnsTotalCount
    columnsOffset
    columnsLimit
  }
}

Types used only by getPiiScanInventory

PiiScanReviewState

Enum type.

ValueDescription
ACTIVE
FALSE_POSITIVE

Related types

PiiMatchStrength, PiiScanFindingsSummary, UUID

getPiiScanInventoryExportCsv (query)

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

Status: Experimental

Return CSV for grouped PII scan inventory rows of active findings. Takes the warehouse, database, schema, piiTypes and matchStrengths filters of getPiiScanInventory. Columns are ordered as table, database, schema, column, piiTypes, metrics, maxMatchRate, confidence, rowsScanned, findings, monitors, alertUuids, firstDetectedAt, lastScannedAt; multi-value fields are pipe-delimited.

Arguments

ArgumentTypeDescription
bulkMonitorUuidUUID
warehouseUuidUUIDLimit export rows to one warehouse. Null means all accessible warehouses.
projectNames[String!]Limit export rows to database/project names. Null or an empty list means no database/project filter.
datasets[String!]Limit export rows to schema/dataset names. Null or an empty list means no schema/dataset filter.
piiTypes[String!]Limit export rows to these PII types, including custom regex names. Columns found only by warehouse tags are left out while it is set. Null or an empty list means no PII type filter.
matchStrengths[PiiMatchStrength!]Limit export rows to findings with these pattern match strengths. Columns found only by warehouse tags are left out while it is set. Null or an empty list means no match strength filter.

Returns

String!

Example

query GetPiiScanInventoryExportCsv {
  getPiiScanInventoryExportCsv
}

Related types

PiiMatchStrength, UUID

getPiiTypes (query)

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

Status: Experimental

List all supported PII types with their metrics

Returns

[PiiTypeInfo!]!

Example

query GetPiiTypes {
  getPiiTypes {
    name
    metric
    description
    category
  }
}

Types used only by getPiiTypes

PiiTypeInfo

Object type. Metadata for a supported PII type

FieldTypeDescription
nameString!PII type identifier (e.g. SSN)
metricString!Underlying metric name (e.g. TEXT_SSN_RATE)
descriptionString!Human-readable description
categoryString!Grouping category (e.g. PII, Location)

getPiiWarehouseTagSummary (query)

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

Status: Experimental

Return a bounded existence summary for system classification and user-defined warehouse tags on fields.

Arguments

ArgumentTypeDescription
warehouseUuidUUID!
assetSelectionAssetSelectionInputOptional monitor asset selection. When provided, tag existence is checked only on fields belonging to matching tables.

Returns

PiiWarehouseTagSummary!

Example

query GetPiiWarehouseTagSummary($warehouseUuid: UUID!) {
  getPiiWarehouseTagSummary(warehouseUuid: $warehouseUuid) {
    isSnowflakeWarehouse
    hasSystemClassificationTags
    hasUserDefinedTags
  }
}

Types used only by getPiiWarehouseTagSummary

PiiWarehouseTagSummary

Object type. Bounded summary of warehouse tags available for PII setup.

FieldTypeDescription
isSnowflakeWarehouseBoolean!
hasSystemClassificationTagsBoolean!
hasUserDefinedTagsBoolean!
sampleSystemTags[PiiScanWarehouseTag!]!At most two system classification tag examples.
sampleUserDefinedTags[PiiScanWarehouseTag!]!At most two user-defined warehouse tag examples.

Related types

AssetSelectionInput, PiiScanWarehouseTag, UUID

Mutations

batchUpdatePiiBulkMonitors (mutation)

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

Status: Experimental

Apply the same editable PII monitor settings to selected PII bulk monitors.

Arguments

ArgumentTypeDescription
audienceConditions[AudienceConditionInput!]Narrows individual audiences to the triage priorities that reach them. Always a full replace: omitting the argument (or passing null) makes every audience unconditional, the same as passing an empty list; a non-empty list replaces the conditions wholesale. Every audience named here must also appear in this mutation's audience list (audiences, or labels on the mutations that spell it that way), which stays the monitor's full audience set — a condition narrows when one of them is notified, it does not add one.
audiences[String]Notification audiences to apply to every selected PII bulk monitor.
bulkMonitorUuids[UUID!]!PII bulk monitor UUIDs to update.
failureAudiences[String]Failure-only notification audiences to apply to every selected PII bulk monitor.
fieldPatternStringGlob pattern to match TEXT column names.
matchThresholdFloatAlert threshold as a proportion (0-1).
modePiiMonitorModeSwitch every selected PII bulk monitor to ALERT or SCAN. ALERT requires matchThreshold. SCAN does not accept matchThreshold.
piiTypes[PiiType!]Built-in PII types to apply to every selected PII bulk monitor. Deprecated types are ignored.
samplingConfigMonitorSamplingConfigInputRow sampling for child metric monitors.
scheduleConfigScheduleConfigInputCollection interval to apply to every selected PII bulk monitor. Each monitor keeps its own start time. startTime and cron schedules are rejected. Split PII setups accept only scheduleType FIXED.

Returns

BatchUpdatePiiBulkMonitors

Example

mutation BatchUpdatePiiBulkMonitors($bulkMonitorUuids: [UUID!]!) {
  batchUpdatePiiBulkMonitors(bulkMonitorUuids: $bulkMonitorUuids) {
    updatedCount
  }
}

Types used only by batchUpdatePiiBulkMonitors

BatchUpdatePiiBulkMonitors

Object type.

FieldTypeDescription
bulkMonitors[BulkMonitor!]!PII bulk monitors updated by this mutation.
updatedCountInt!Number of PII bulk monitors updated.

Related types

AudienceConditionInput, BulkMonitor, MonitorSamplingConfigInput, PiiMonitorMode, PiiType, ScheduleConfigInput, UUID

createJiraTicketForPiiScanFindings (mutation)

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

Status: Experimental

Create a Jira ticket for selected PII scan findings.

Arguments

ArgumentTypeDescription
detailsCreateJiraPiiScanFindingTicketInput!
findings[PiiScanFindingTicketInput!]!PII findings the Jira ticket should cover.

Returns

CreateJiraTicketForPiiScanFindings

Example

mutation CreateJiraTicketForPiiScanFindings($details: CreateJiraPiiScanFindingTicketInput!, $findings: [PiiScanFindingTicketInput!]!) {
  createJiraTicketForPiiScanFindings(details: $details, findings: $findings) {
    ticket {
      ticketId
      ticketUrl
      ticketKey
      alertId
      integrationId
      createdBy
      createdAt
    }
  }
}

Types used only by createJiraTicketForPiiScanFindings

CreateJiraPiiScanFindingTicketInput

Input object type. Jira ticket details for selected PII scan findings.

FieldTypeDescription
integrationIdUUID!UUID of the Jira integration to create the ticket under.
projectInt!Jira project id.
issuetypeInt!Jira issue-type id.
summaryString!Ticket summary (must be non-empty).
descriptionStringTicket description (Markdown).
fieldsJSONStringAdditional Jira fields keyed by field id (e.g. required custom fields).
CreateJiraTicketForPiiScanFindings

Object type.

FieldTypeDescription
ticketJiraTicketOutput
PiiScanFindingTicketInput

Input object type.

FieldTypeDescription
warehouseUuidUUID!Warehouse UUID for the PII finding to include in the ticket.
fullTableIdString!Fully qualified table identifier for the PII finding.
fieldKeyString!Column key for the PII finding. Matching is case-insensitive.
piiTypePiiType!PII type for the finding.

Related types

JSONString, JiraTicketOutput, PiiType, UUID

createPiiMonitor (mutation)

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

Status: Experimental

Create a PII monitor that tracks TEXT column metrics (SSN, email, phone, etc.) across all tables matching the asset selection.

Arguments

ArgumentTypeDescription
assetSelectionAssetSelectionInput!Tables to monitor
audienceConditions[AudienceConditionInput!]Narrows individual audiences to the triage priorities that reach them. Always a full replace: omitting the argument (or passing null) makes every audience unconditional, the same as passing an empty list; a non-empty list replaces the conditions wholesale. Every audience named here must also appear in this mutation's audience list (audiences, or labels on the mutations that spell it that way), which stays the monitor's full audience set — a condition narrows when one of them is notified, it does not add one.
audiences[String]Notification audiences
autoEnableTableMonitoringBooleanDeprecated legacy option. PII monitors no longer create table monitors; CBPV1 PII scans can run on unmonitored tables directly. Default: false.
autoPruneEnabledBooleanWhen true, automatically remove the child monitor after each table's first scan completes with no PII detected. Tables are re-scanned if new TEXT columns are added. Default: false.
customRegexes[PiiCustomRegexInput!]Custom regex patterns to include in the PII scan.
descriptionStringHuman-readable description for the monitor. Default: "PII Monitor".
domainRestrictions[String]Domain UUIDs restricting alert delivery
dryRunBooleanReturn MaC YAML without persisting the monitor. Default: false.
failureAudiences[String]Failure-only notification audiences
fieldPatternStringGlob pattern to match TEXT column names. Defaults to all TEXT columns. Default: "*".
lineageNarrowingEnabledBooleanWhen true, only create child monitors for root tables — those with no upstream lineage within the selected assets. Downstream tables inherit PII from their sources and do not need independent scanning. Defaults false to run a full scan across every selected table. Default: false.
matchThresholdFloatAlert threshold as a proportion (0–1). Defaults to 0.01 (1%). Default: 0.01.
modePiiMonitorModeALERT creates threshold comparisons; SCAN collects data without alerting Default: "ALERT".
notesStringNotes for the monitor
piiTypes[PiiType!]PII types to monitor. Defaults to every supported type. Deprecated types are ignored and reported in warnings.
priorityStringMonitor priority (P1–P5)
samplingConfigMonitorSamplingConfigInputRow sampling for child metric monitors.
scheduleConfigScheduleConfigInput!Collection schedule. Weekly FIXED/10080 minutes is recommended.
skipClassifiedColumnsBooleanExclude columns already tagged by supported warehouse classification tags. Defaults to true for ALERT mode, false for SCAN mode.
skipUserDefinedWarehouseTagsBooleanExclude columns with supported user-defined warehouse tags. Defaults to false. Default: false.
splitLargeSelectionBooleanWhen true, create multiple PII monitors if the selected scope is larger than the per-monitor table limit. Default: false.
warehouseUuidUUID!Warehouse UUID

Returns

CreatePiiMonitor

Example

mutation CreatePiiMonitor($assetSelection: AssetSelectionInput!, $scheduleConfig: ScheduleConfigInput!, $warehouseUuid: UUID!) {
  createPiiMonitor(assetSelection: $assetSelection, scheduleConfig: $scheduleConfig, warehouseUuid: $warehouseUuid) {
    yaml
    warnings
    requiresSplit
    matchedTableCount
    tableLimit
    splitMonitorCount
  }
}

Types used only by createPiiMonitor

CreatePiiMonitor

Object type.

FieldTypeDescription
bulkMonitorBulkMonitor
bulkMonitors[BulkMonitor!]!
yamlStringMaC YAML representation (dry_run only)
warnings[String!]!Advisory messages about the monitor configuration
requiresSplitBoolean!
matchedTableCountInt
tableLimitInt
splitMonitorCountInt
splitParts[PiiMonitorSplitPart!]!
PiiCustomRegexInput

Input object type.

FieldTypeDescription
uuidUUIDStable custom regex UUID. Generated by the backend when omitted.
nameString!Display name for the custom PII pattern.
patternString!Regex pattern used to detect the PII.
caseInsensitiveBooleanWhether regex matching should be case-insensitive. Defaults to true. Default: true.
PiiMonitorSplitPart

Object type. One monitor-sized part of a large PII monitor scope

FieldTypeDescription
descriptionString!
tableCountInt!

Related types

AssetSelectionInput, AudienceConditionInput, BulkMonitor, MonitorSamplingConfigInput, PiiMonitorMode, PiiType, ScheduleConfigInput, UUID

markPiiScanFindingFalsePositive (mutation)

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

Status: Experimental

Mark a PII scan finding as not PII.

Arguments

ArgumentTypeDescription
fieldKeyString!Column key to mark as not PII. Matching is case-insensitive.
fullTableIdString!Fully qualified table identifier for the finding to mark as not PII.
piiIdentifierStringPII identifier to mark as not PII. Accepts built-in PII type names or custom PII metric keys. Prefer this field for custom PII findings.
piiTypePiiTypeBuilt-in PII type to mark as not PII.
reasonStringOptional free-text reason for marking the finding as not PII.
warehouseUuidUUID!Warehouse UUID for the finding to mark as not PII.

Returns

MarkPiiScanFindingFalsePositive

Example

mutation MarkPiiScanFindingFalsePositive($fieldKey: String!, $fullTableId: String!, $warehouseUuid: UUID!) {
  markPiiScanFindingFalsePositive(fieldKey: $fieldKey, fullTableId: $fullTableId, warehouseUuid: $warehouseUuid) {
    ok
  }
}

Types used only by markPiiScanFindingFalsePositive

MarkPiiScanFindingFalsePositive

Object type.

FieldTypeDescription
okBoolean!
reviewPiiScanFindingReview!Review state created or reactivated by this mutation.

Related types

PiiScanFindingReview, PiiType, UUID

restorePiiScanFindingFalsePositive (mutation)

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

Status: Experimental

Restore a PII scan finding previously marked as not PII.

Arguments

ArgumentTypeDescription
fieldKeyString!Column key to restore. Matching is case-insensitive.
fullTableIdString!Fully qualified table identifier for the finding to restore.
piiIdentifierStringPII identifier to restore. Accepts built-in PII type names or custom PII metric keys. Prefer this field for custom PII findings.
piiTypePiiTypeBuilt-in PII type to restore.
warehouseUuidUUID!Warehouse UUID for the finding to restore.

Returns

RestorePiiScanFindingFalsePositive

Example

mutation RestorePiiScanFindingFalsePositive($fieldKey: String!, $fullTableId: String!, $warehouseUuid: UUID!) {
  restorePiiScanFindingFalsePositive(fieldKey: $fieldKey, fullTableId: $fullTableId, warehouseUuid: $warehouseUuid) {
    ok
  }
}

Types used only by restorePiiScanFindingFalsePositive

RestorePiiScanFindingFalsePositive

Object type.

FieldTypeDescription
okBoolean!
reviewPiiScanFindingReview!Review state deactivated by this mutation.

Related types

PiiScanFindingReview, PiiType, UUID

Source: The GraphQL API reference

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