Audit
Reference for the audit events of billing in your workspace: the myAuditEvents and myEntityHistory queries, with the filter and the order they take.
The audit events of Billing in the caller's workspace or organization: changes to subscriptions, invoices, and balance, with the queries that read them.
Queries
myAuditEvents
The audit events of billing in the caller's own workspace or in its organization, as scope asks, newest first by default: who wrote what to the workspace's subscriptions, invoices, balance and other billing entities, and when.
WORKSPACE, the default, reads the events of the workspace the caller's token names.ORGANIZATIONreads the events of the caller's organization: its own events, those of no workspace, and the events of its workspaces recorded with the organization, those a member of staff or billing's own jobs, such as the invoicing pass, record in a workspace Console confirmed to billing as the organization's included. It needs the token to name the organization of a workspace Console synced, and a role whose billing access covers every workspace of the organization; otherwise the call fails withPERMISSION_DENIED. Events that carry no organization appear in theWORKSPACEscope alone: those of a workspace Console has not confirmed to billing, and those recorded before events carried the organization, which are not filled in later.
The workspace and the organization are not arguments. They are the ones the caller's token names; a token carrying no workspace claim is refused. Another organization's events are never read.
Only billing's events are read: filter.products absent or empty reads them, and naming any other product fails with VALIDATION_ERROR, since this field does not serve it. The types are the ones BdrQuery.myAuditEvents returns too.
myAuditEvents(
scope: BillingAuditScope = WORKSPACE
filter: AuditEventFilter
first: Int
after: String
last: Int
before: String
orderBy: AuditEventOrder = { field: OCCURRED_AT, direction: DESC }
): AuditEventConnection!Arguments
filter
AuditEventFilter
Filtering options for the returned events.
orderBy
AuditEventOrder
The ordering options for the returned events.
Input types:
Output types:
myEntityHistory
The audit events of billing about one entity, such as a subscription or an invoice, in the caller's own workspace or in its organization, as scope asks, newest first by default. The scopes, the access and the products are as for myAuditEvents.
Arguments
entityId
ID!
The ID of the entity whose events to return.
filter
AuditEventFilter
Filtering options for the returned events.
orderBy
AuditEventOrder
The ordering options for the returned events.
Input types:
Output types:
Enums
BillingAuditScope
Whose audit events myAuditEvents and myEntityHistory read.
WORKSPACE
The events of the workspace the caller's token names.
ORGANIZATION
The events of the caller's organization: its own events, those of no workspace, and the events of its workspaces recorded with the organization, those a member of staff or billing's own jobs record in a workspace Console confirmed to billing as the organization's included. Needs billing access that covers every workspace of the organization. Events that carry no organization, those of a workspace Console has not confirmed to billing and those recorded before events carried it, are read in WORKSPACE alone; they are not filled in later.
See also
Last updated
Was this helpful?