Audit logs (GraphQL)

Related queries and mutations in Users, accounts and access. Each has its own section.

Queries

getAccountAuditLogEntries (query)

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

Status: Experimental

The account audit log, newest first. Requires the audit logging entitlement. Entries older than the last 15 days are listed once your account's history is available.

Arguments

ArgumentTypeDescription
startTimeDateTime!Start of the time range
endTimeDateTimeEnd of the time range. Defaults to now.
actorEmails[String!]Only entries by these emails. [email protected] matches every agent identity. When omitted or empty, every actor. At most 100 values.
actorTypes[AccountAuditLogActorType!]Only entries by these kinds of identity. When omitted or empty, every kind.
eventTypes[AuditLogEventType!]Only entries of these event types. When omitted or empty, every type.
outcomes[AccountAuditLogOutcome!]Only entries with these outcomes. When omitted or empty, every outcome.
objectRefs[ApiCallReference!]Only entries for calls that received these IDs: any of a reference's values, for every reference. A reference without values matches any value. At most 100 references with 1000 values each.
includeReadOnlyCallsBooleanWhen true, read-only API calls are included. When false or null, they are left out. Default: false.
firstIntNumber of entries to return, from 1 to 1000 Default: 100.
afterStringReturn entries after this cursor

Returns

AccountAuditLogEntryConnection!

Example

query GetAccountAuditLogEntries($startTime: DateTime!) {
  getAccountAuditLogEntries(startTime: $startTime) {
    edges {
      cursor
    }
  }
}

Types used only by getAccountAuditLogEntries

AccountAuditLogActorType

Enum type. Kind of identity that acted.

MC_STAFF is a Monte Carlo employee acting in the account, such as support.
AGENT is a Monte Carlo agent identity. SERVICE_API_KEY is a call made with
a service API key. PERSON is everyone else.

ValueDescription
PERSON
SERVICE_API_KEY
MC_STAFF
AGENT
AccountAuditLogApiProtocol

Enum type.

ValueDescription
GRAPHQL
REST
MCP
AccountAuditLogEntry

Object type. One account audit log entry.

FieldTypeDescription
eventIdUUID!ID of the event
eventTimeDateTime!When the call started
eventTypeAuditLogEventType!Event type
actorAccountAuditLogEntryActor!Identity that acted
outcomeAccountAuditLogOutcome!Result of the call
statusCodeIntHTTP status code of the response, when recorded
clientIpStringIP address the call came from
requestIdStringID of the request
requestSourceStringWhere the call came from, such as Web, MCP or Programmatic
apiProtocolAccountAuditLogApiProtocolProtocol of the call. Null for sign-ins and sign-outs.
apiNameStringGraphQL field, REST operation ID or MCP tool name
apiIsQueryBooleanTrue for a read-only call
urlStringREST path, or the page a GraphQL call was made from
objectRefs[AccountAuditLogObjectRef!]!IDs the call received. Empty when it received none.
agentActivityAccountAuditLogAgentActivityDetails of an agent tool call. Null for other events.
isLegacyBoolean!True for entries recorded before server-side audit logging, copied from the earlier audit log.
AccountAuditLogEntryActor

Object type. The identity that acted, as it was when the event happened.

FieldTypeDescription
typeAccountAuditLogActorType!Kind of identity
emailString!Email of the identity. Agent identities are reported as [email protected].
firstNameStringFirst name at the time of the event
lastNameStringLast name at the time of the event
AccountAuditLogEntryConnection

Object type. A page of audit log entries, newest first.

FieldTypeDescription
edges[AccountAuditLogEntryEdge!]!
pageInfoAccountAuditLogEntryPageInfo!
AccountAuditLogEntryEdge

Object type.

FieldTypeDescription
nodeAccountAuditLogEntry!The entry
cursorString!Cursor of this entry
AccountAuditLogEntryPageInfo

Object type.

FieldTypeDescription
hasNextPageBoolean!Whether older entries follow this page
endCursorStringCursor of the last entry. Pass it as after to get the next page.
AccountAuditLogObjectRef

Object type. An ID the call received.

FieldTypeDescription
parameterNameString!Name of the argument that carried the ID
idString!The ID
AccountAuditLogOutcome

Enum type. Result of the call. UNKNOWN means no result was recorded, as after a crash or timeout.

ValueDescription
SUCCEEDED
FAILED
DENIED
UNKNOWN

Related types

AccountAuditLogAgentActivity, ApiCallReference, AuditLogEventType, DateTime, UUID

getAccountAuditLogs (query)

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

Get audit logs for an account.

Arguments

ArgumentTypeDescription
firstIntWhen paging forward: the number of items to return (page size)
afterStringWhen paging forward: the cursor of the last item on the previous page of results
lastIntWhen paging backward: the number of items to return (page size)
beforeStringWhen paging backward: the cursor of the first item on the next page of results
startTimeDateTime!Start time of the time range to query
endTimeDateTimeEnd time of the time range to query. Defaults to current time
includeApiQueriesBooleanIf set to true, GraphQL API calls that are queries (not mutations) will be included in the response. By default, queries are not included. Default: false.
apiCallReferences[ApiCallReference]References (For instance UUIDs) that were passed as input to GraphQL API calls
userEmailStringFilter activity of a specific user
actorRoleAuditLogActorRoleFilter activity by the role of the identity that acted. When AGENT, returns only entries whose actor is a Monte Carlo agent identity, such as an automated agent run. When USER, returns all other entries, including agent chats, which act on behalf of the user. When omitted, no actor-role filter is applied.
eventTypes[AuditLogEventType!]Only return entries of these event types. When omitted or empty, entries of every event type are returned, including agent MCP tool calls.

Returns

GetAccountAuditLogsResponse

Example

query GetAccountAuditLogs($startTime: DateTime!) {
  getAccountAuditLogs(startTime: $startTime) {
    records {
      timestamp
      accountUuid
      accountName
      email
      firstName
      lastName
      url
      eventType
      apiName
      apiIsQuery
      apiCallReferences
      apiCallSource
      clientIp
    }
  }
}

Types used only by getAccountAuditLogs

AccountAuditLog

Object type.

FieldTypeDescription
timestampDateTime!Timestamp of the event
accountUuidString!Account ID
accountNameString!Account name
emailString!Email of the user
firstNameStringFirst name of the user
lastNameStringLast name of the user
urlStringURL on which the event occurred
eventTypeString!Event type, one of the AuditLogEventType values
apiNameStringAPI name in case of GraphQL API calls
apiIsQueryBooleanWhether a GraphQL API call is a query
apiCallReferencesStringReferences (For instance UUIDs) passed as input parameters in GraphQL API calls
apiCallSourceStringIndicates the source of the GraphQL API call.For instance, Web or Programmatic
clientIpStringClient IP address
agentActivityAccountAuditLogAgentActivityDetails of the agent activity. Set for agent activity events, null for other events.
GetAccountAuditLogsResponse

Object type.

FieldTypeDescription
records[AccountAuditLog]List of audit log records
pageInfoPageInfoPagination info

Related types

AccountAuditLogAgentActivity, ApiCallReference, AuditLogActorRole, AuditLogEventType, DateTime, PageInfo

getAccountAuditLogSummary (query)

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

Status: Experimental

The account audit log aggregated server-side: one row per (user, page) with its activity count, over the whole window. Unlike the paged row-level log — which is served oldest-first, so a capped read holds the start of the window — this answers over the entire range in one call.

Arguments

ArgumentTypeDescription
startTimeDateTime!Start time of the time range to query
endTimeDateTimeEnd time of the time range to query. Defaults to current time
includeApiQueriesBooleanIf set to true, GraphQL API calls that are queries (not mutations) will be included in the response. By default, queries are not included. Default: false.
actorRoleAuditLogActorRoleFilter activity by the role of the identity that acted. When AGENT, returns only entries whose actor is a Monte Carlo agent identity, such as an automated agent run. When USER, returns all other entries, including agent chats, which act on behalf of the user. When omitted, no actor-role filter is applied.
limitIntMax (user, page) groups to return, most active first. Bounded server-side; truncated reports when the bound cut the result.

Returns

GetAccountAuditLogSummaryResponse

Example

query GetAccountAuditLogSummary($startTime: DateTime!) {
  getAccountAuditLogSummary(startTime: $startTime) {
    truncated
  }
}

Types used only by getAccountAuditLogSummary

AccountAuditLogSummaryGroup

Object type. One (user, page) activity count in an account audit-log summary.

FieldTypeDescription
emailString!Email of the user
urlStringPage URL, with query string and fragment stripped
countInt!Activity rows recorded for this (user, page) in the window
GetAccountAuditLogSummaryResponse

Object type.

FieldTypeDescription
groups[AccountAuditLogSummaryGroup]Per-(user, page) activity counts, most active first
truncatedBoolean!Whether the group limit cut the result. When true, counts and ranking near the limit may be incomplete.

Related types

AuditLogActorRole, DateTime

getAccountConfigAuditLogs (query)

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

Status: Experimental

Audit log for changes to the account's configuration, newest first. Each entry's changes carries one dotted field per changed configuration key, in the form config.<key>. Entries that did not touch the configuration, such as an account rename, are not returned.

Arguments

ArgumentTypeDescription
configKeyStringNarrow to entries where this configuration key was added, removed, or changed value.
timestamp_LtDateTimeFilter logs with timestamp less than this value
beforeString
afterString
firstInt
lastInt

Returns

AuditLogJsonChangeConnection

Example

query GetAccountConfigAuditLogs {
  getAccountConfigAuditLogs {
    pageInfo {
      hasNextPage
      hasPreviousPage
      startCursor
      endCursor
    }
  }
}

Types used only by getAccountConfigAuditLogs

AuditLogJsonChangeConnection

Object type. Cursor-paginated connection over AuditLogJsonChangeEntry.

The resolver returns fully-rendered entries and graphene-relay slices them by
first / after / last / before.

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

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

FieldTypeDescription
nodeAuditLogJsonChangeEntryThe item at the end of the edge
cursorString!A cursor for use in pagination
AuditLogJsonChangeEntry

Object type. Audit log entry that renders JSON-field changes key by key.

Differs from AuditLogEntry in one guarantee: a change to a JSON-mapped field
that format_changes emits as one whole-value pair — a first write or a
removal — is expanded into one dotted field per changed key, and *_updated_by
/ *_updated_at bookkeeping keys are dropped.

FieldTypeDescription
timestampDateTime!When the change occurred
actionString!create/update/delete
objectTypeNameString!Friendly name of object type
objectUuidUUIDObject UUID (if available)
changes[FieldChange]!List of changes
actorDisplayNameStringResolved display name of the user who made the change.
actorFirstNameStringFirst name of the person who made the change. Null for an agent, whose label is in actorDisplayName.
actorLastNameStringLast name of the person who made the change. Null for an agent, whose label is in actorDisplayName.

Related types

DateTime, FieldChange, PageInfo, UUID

getAgentSettingsAuditLogs (query)

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

Status: Experimental

Changes to the account's AI agent settings, newest first: turning agents on or off, usage caps, the troubleshooting auto-run threshold, and per-domain overrides.

Arguments

ArgumentTypeDescription
agents[AgentSettingsAgent!]Only return changes to these agents' settings. When omitted or empty, changes for every agent are returned.
startTimeDateTimeStart of the time range. Defaults to 90 days before endTime.
endTimeDateTimeEnd of the time range. Defaults to the current time.
beforeString
afterString
firstInt
lastInt

Returns

AgentSettingsAuditLogConnection

Example

query GetAgentSettingsAuditLogs {
  getAgentSettingsAuditLogs {
    pageInfo {
      hasNextPage
      hasPreviousPage
      startCursor
      endCursor
    }
  }
}

Types used only by getAgentSettingsAuditLogs

AgentSettingsActorType

Enum type. Who made an agent settings change: a USER (or the account's API key), an AGENT, MONTE_CARLO staff, or Monte Carlo AUTOMATICally.

ValueDescription
USER
AGENT
MONTE_CARLO
AUTOMATIC
AgentSettingsAgent

Enum type. An agent whose settings history can be read: TRIAGE, TROUBLESHOOTING, MONITOR_TUNING, PR or COST (the Cost & Performance agent).

ValueDescription
TRIAGE
TROUBLESHOOTING
MONITOR_TUNING
PR
COST
AgentSettingsAuditLogConnection

Object type. Cursor-paginated connection over AgentSettingsAuditLogEntry, newest first.

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

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

FieldTypeDescription
nodeAgentSettingsAuditLogEntryThe item at the end of the edge
cursorString!A cursor for use in pagination
AgentSettingsAuditLogEntry

Object type. One change to an agent's settings.

FieldTypeDescription
timestampDateTime!When the change was made.
actionString!create, update or delete.
agents[AgentSettingsAgent!]!The agents whose settings changed. The master AI features switch belongs to every agent.
changes[FieldChange!]!The agent settings that changed, with before and after values.
domainUuidUUIDDomain the change applies to, for a per-domain override. Null for account-wide settings, and when the domain was deleted.
domainNameStringName of the domain in domainUuid.
actorTypeAgentSettingsActorType!Who made the change.
actorDisplayNameString!Name to show for whoever made the change. Monte Carlo (automatic) for automatic changes, Monte Carlo for Monte Carlo staff, and the agent's label for an agent.
actorEmailStringEmail of the person who made the change. Null unless actorType is USER.

Related types

DateTime, FieldChange, PageInfo, UUID

getAssetMetricAuditLogs (query)

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

Status: Experimental

Audit log for a specific (asset, metric) pair. Returns one stream covering the asset-level override rule (when present) and the table-monitor coverage events that actually moved the asset's effective sensitivity. Sorted newest-first. Paginate with first / after / last / before.

Arguments

ArgumentTypeDescription
mconString!MC unique identifier of the asset
metricOotbTableMonitorTypeEnum!Which OOTB monitor metric's audit log to fetch. Must be a sensitivity-bearing metric (FRESHNESS, VOLUME_SIZE_DIFF, or VOLUME_UNCHANGED_SIZE); SCHEMA is rejected because schema changes have no sensitivity concept.
timestamp_LtDateTimeOnly return entries strictly before this timestamp.
beforeString
afterString
firstInt
lastInt

Returns

AssetMetricAuditLogConnection

Example

query GetAssetMetricAuditLogs($mcon: String!, $metric: OotbTableMonitorTypeEnum!) {
  getAssetMetricAuditLogs(mcon: $mcon, metric: $metric) {
    pageInfo {
      hasNextPage
      hasPreviousPage
      startCursor
      endCursor
    }
  }
}

Types used only by getAssetMetricAuditLogs

AssetMetricAuditLogConnection

Object type. Cursor-paginated connection over AssetMetricAuditLogEntry — keeps the
asset-metric audit log API surface aligned with getMonitorAuditLogs.

The underlying data mixes real LogEntry rows with in-memory synthesized
attach/detach entries, so the resolver returns the fully-built list and
graphene-relay slices it by first / after / last / before.

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

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

FieldTypeDescription
nodeAssetMetricAuditLogEntryThe item at the end of the edge
cursorString!A cursor for use in pagination
AssetMetricAuditLogEntry

Object type. Audit log entry for getAssetMetricAuditLogs.

Each entry is fully resolved at the service layer: rule CRUD entries are
rebranded as "asset-level override" and synthesise a sensitivity change
whose before/after reflect the asset's resolved effective sensitivity;
table-monitor-coverage events (sensitivity, is_deleted, is_paused changes,
plus monitor_tables attach/detach moments) are surfaced only when the asset's
resolved sensitivity actually shifted, each rendered with that same synthesised
sensitivity FieldChange instead of the raw underlying field change.

FieldTypeDescription
timestampDateTime!When the change occurred
actionString!create/update/delete
objectTypeNameString!Friendly description of the entry's source: asset-level override for rule entries, table monitor coverage for TM-driven entries.
objectUuidUUIDObject UUID (if available)
changes[FieldChange!]!Resolved changes — exactly one synthesized sensitivity FieldChange when the underlying event touched the asset's effective sensitivity.
actorDisplayNameStringResolved display name of the user who made the change. Null for monitor_tables attach/detach moments since that model does not record an actor.
actorFirstNameStringFirst name of the person who made the change. Null for an agent, whose label is in actorDisplayName.
actorLastNameStringLast name of the person who made the change. Null for an agent, whose label is in actorDisplayName.

Related types

DateTime, FieldChange, OotbTableMonitorTypeEnum, PageInfo, UUID

getMonitorAuditLogs (query)

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

Get audit logs for specified monitor

Arguments

ArgumentTypeDescription
monitorUuidUUID!UUID of monitor
changeFieldStringFilter logs by specific field that was changed
timestamp_LtDateTimeFilter logs with timestamp less than this value
offsetInt
beforeString
afterString
firstInt
lastInt

Returns

AuditLogEntryConnection

Example

query GetMonitorAuditLogs($monitorUuid: UUID!) {
  getMonitorAuditLogs(monitorUuid: $monitorUuid) {
    pageInfo {
      hasNextPage
      hasPreviousPage
      startCursor
      endCursor
    }
  }
}

Related types

AuditLogEntryConnection, DateTime, UUID

getMonitoredRulesAuditLogs (query)

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

Status: Deprecated: Monitoring rules were removed; returns historical entries only.

Historical audit logs for monitored table rules. Monitoring rules were removed, so no new entries are written.

Arguments

ArgumentTypeDescription
startTimeDateTimeStart time to fetch audit logs. Defaults to current time - 30 days
endTimeDateTimeEnd time for fetching audit logs. Defaults to current time.
offsetInt
beforeString
afterString
firstInt
lastInt

Returns

AuditLogEntryConnection

Example

query GetMonitoredRulesAuditLogs {
  getMonitoredRulesAuditLogs {
    pageInfo {
      hasNextPage
      hasPreviousPage
      startCursor
      endCursor
    }
  }
}

Related types

AuditLogEntryConnection, DateTime

getSizeCollectionAuditLogs (query)

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

Status: Experimental

Get audit logs for a table's size collection.

Arguments

ArgumentTypeDescription
mconString!MC unique identifier of the table
changeFieldStringFilter logs by specific field that was changed
timestamp_LtDateTimeFilter logs with timestamp less than this value
offsetInt
beforeString
afterString
firstInt
lastInt

Returns

AuditLogEntryConnection

Example

query GetSizeCollectionAuditLogs($mcon: String!) {
  getSizeCollectionAuditLogs(mcon: $mcon) {
    pageInfo {
      hasNextPage
      hasPreviousPage
      startCursor
      endCursor
    }
  }
}

Related types

AuditLogEntryConnection, DateTime

Source: The GraphQL API reference

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