Related queries and mutations in Performance and cost. Each has its own section.
Queries
getAccountEntitlements (query)
getAccountEntitlements is a query in the Monte Carlo GraphQL API, in Performance and cost. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.
Arguments
| Argument | Type | Description |
|---|---|---|
refresh | Boolean | Default: false. |
Returns
AccountEntitlementsInfo
Example
query GetAccountEntitlements {
getAccountEntitlements {
entitlements
}
}Types used only by getAccountEntitlements
getAccountEntitlementsAccountEntitlementsInfo
AccountEntitlementsInfoObject type.
| Field | Type | Description |
|---|---|---|
entitlements | [EntitlementTypes] |
Related types
getBillingContractInvoices (query)
getBillingContractInvoices is a query in the Monte Carlo GraphQL API, in Performance and cost. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.
Status: General availability
Get a list of invoices for the account.
Arguments
| Argument | Type | Description |
|---|---|---|
limit | Int | Limit the number of results returned. Values 1-100 accepted. Default: 12. |
sort | BillingInvoicesSort | Sort invoices by issued date. Default: "date_desc". |
startTime | DateTime | Filter invoices by billing periods that start at or after this time. |
endTime | DateTime | Filter invoices by billing periods that end before this time. |
status | BillingInvoiceStatus |
Returns
BillingContractInvoiceResults
Example
query GetBillingContractInvoices {
getBillingContractInvoices {
invoices {
id
startTime
endTime
tierName
total
status
commitConsumed
}
}
}Types used only by getBillingContractInvoices
getBillingContractInvoicesBillingContractInvoice
BillingContractInvoiceObject type.
| Field | Type | Description |
|---|---|---|
id | String | The id of the invoice |
startTime | DateTime | The start of the invoice period |
endTime | DateTime | The end of the invoice period |
tierName | String | The name of the current tier |
total | Int | The total cost minus credits |
status | BillingInvoiceStatus | The status of the invoice |
commitConsumed | Int | Money subtracted from commits |
items | [BillingContractInvoiceItem] | Products charged in the invoice |
BillingContractInvoiceItem
BillingContractInvoiceItemObject type.
| Field | Type | Description |
|---|---|---|
credits | Int | The number of credits used. |
rate | Float | The rate at which credits were used. |
addOn | String | Label for an add-on product; empty string if not an add-on. |
BillingContractInvoiceResults
BillingContractInvoiceResultsObject type.
| Field | Type | Description |
|---|---|---|
invoices | [BillingContractInvoice] | List of contract invoices for the account |
Related types
BillingInvoiceStatus, BillingInvoicesSort, DateTime
getBillingCreditGrants (query)
getBillingCreditGrants is a query in the Monte Carlo GraphQL API, in Performance and cost. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.
Status: Deprecated: Plan-based grants are deprecated
Get a list of credit grants for the account. Expect the currency for monetary values to be in USD (cents).
Arguments
| Argument | Type | Description |
|---|---|---|
endCursor | String | Cursor used to get results from the next page |
Returns
BillingCreditGrantResults
Example
query GetBillingCreditGrants {
getBillingCreditGrants {
creditGrants {
id
name
startTime
endTime
amountPaid
amountRemaining
quantityRemaining
currency
}
}
}Types used only by getBillingCreditGrants
getBillingCreditGrantsBillingCreditGrant
BillingCreditGrantObject type.
| Field | Type | Description |
|---|---|---|
id | String | The id of the credit grant |
name | String | Description of the credit |
startTime | DateTime | The starting time when the credit is valid for use |
endTime | DateTime | The time that the credit expires |
amountPaid | Int | The amount paid |
amountRemaining | Int | The amount of credit remaining |
quantityRemaining | Int | Quantity remaining calculated from amount_remaining. |
currency | String | The unit of the credit. Currently only USD (cents) is supported. |
BillingCreditGrantResults
BillingCreditGrantResultsObject type.
| Field | Type | Description |
|---|---|---|
creditGrants | [BillingCreditGrant] | List of credit grants for the account |
pageInfo | NextPageInfo | Data necessary to paginate the list of credit grants |
Related types
getBillingInvoices (query)
getBillingInvoices is a query in the Monte Carlo GraphQL API, in Performance and cost. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.
Status: Deprecated: Plan-based invoices are deprecated
Get a list of invoices for the account. Expect the currency for monetary values to be in USD (cents).
Arguments
| Argument | Type | Description |
|---|---|---|
endCursor | String | Cursor used to get results from the next page |
limit | Int | Limit the number of results returned. Values 1-100 accepted. Default: 12. |
sort | BillingInvoicesSort | Sort invoices by issued date. Default: "date_desc". |
startTime | DateTime | Filter invoices by billing periods that start at or after this time. |
endTime | DateTime | Filter invoices by billing periods that end before this time. |
status | BillingInvoiceStatus |
Returns
BillingInvoiceResults
Example
query GetBillingInvoices {
getBillingInvoices {
invoices {
id
startTime
endTime
planName
total
currency
status
}
}
}Types used only by getBillingInvoices
getBillingInvoicesBillingInvoice
BillingInvoiceObject type.
| Field | Type | Description |
|---|---|---|
id | String | The id of the invoice |
startTime | DateTime | The start of the invoice period |
endTime | DateTime | The end of the invoice period |
planName | String | The name of the plan |
total | Int | The total cost minus credits |
currency | String | The currency of the total. Currently only USD (cents) is supported. |
status | BillingInvoiceStatus | The status of the invoice |
products | [BillingInvoiceProduct] | Products charged in the invoice |
BillingInvoiceProduct
BillingInvoiceProductObject type.
| Field | Type | Description |
|---|---|---|
name | String | The name of the product |
charges | [BillingInvoiceProductCharge] | Charges for the product |
BillingInvoiceProductCharge
BillingInvoiceProductChargeObject type.
| Field | Type | Description |
|---|---|---|
quantity | Int | The quantity of product charged |
commitRate | Int | Value only exists for commit plans. |
onDemandRate | Int | Value exists for both commit and on-demand plans. |
BillingInvoiceResults
BillingInvoiceResultsObject type.
| Field | Type | Description |
|---|---|---|
invoices | [BillingInvoice] | List of invoices for the account |
pageInfo | NextPageInfo | Data necessary to paginate the list of invoices |
Related types
BillingInvoiceStatus, BillingInvoicesSort, DateTime, NextPageInfo
getBillingMonitorUsage (query)
getBillingMonitorUsage is a query in the Monte Carlo GraphQL API, in Performance and cost. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.
Status: General availability
Get monitor usage data.
Arguments
Returns
BillingMonitorUsageResults
Example
query GetBillingMonitorUsage($startOn: DateTime!, $endBefore: DateTime!) {
getBillingMonitorUsage(startOn: $startOn, endBefore: $endBefore) {
usages {
date
tableMonitorCredits
metricMonitorCredits
validationMonitorCredits
comparisonMonitorCredits
customSqlMonitorCredits
performanceMonitorCredits
jsonSchemaMonitorCredits
metricLegacyMonitorCredits
freshnessRuleMonitorCredits
volumeRuleMonitorCredits
metricComparisonMonitorCredits
troubleshootingAgentMonitorCredits
agentObservabilityMonitorCredits
prAgentMonitorCredits
triageMonitorCredits
costAgentMonitorCredits
piiAgentMonitorCredits
}
}
}Types used only by getBillingMonitorUsage
getBillingMonitorUsageBillingMonitorUsage
BillingMonitorUsageObject type.
| Field | Type | Description |
|---|---|---|
date | Date | The date for this data point |
tableMonitorCredits | Float | Credits used by table monitors |
metricMonitorCredits | Float | Credits used by metric monitors |
validationMonitorCredits | Float | Credits used by validation monitors |
comparisonMonitorCredits | Float | Credits used by comparison monitors |
customSqlMonitorCredits | Float | Credits used by custom SQL monitors |
performanceMonitorCredits | Float | Credits used by performance monitors |
jsonSchemaMonitorCredits | Float | Credits used by JSON schema monitors |
metricLegacyMonitorCredits | Float | Credits used by metric_legacy monitors |
freshnessRuleMonitorCredits | Float | Credits used by freshness rule monitors |
volumeRuleMonitorCredits | Float | Credits used by volume rule monitors |
metricComparisonMonitorCredits | Float | Credits used by metric comparison monitors |
troubleshootingAgentMonitorCredits | Float | Credits used by troubleshooting agent monitors |
agentObservabilityMonitorCredits | Float | Credits used by agent observability |
prAgentMonitorCredits | Float | Credits used by the PR Agent |
triageMonitorCredits | Float | Credits used by automated alert triage |
costAgentMonitorCredits | Float | Credits used by the Cost & Performance Agent |
piiAgentMonitorCredits | Float | Credits used by the PII Agent |
BillingMonitorUsageResults
BillingMonitorUsageResultsObject type.
| Field | Type | Description |
|---|---|---|
usages | [BillingMonitorUsage] | List of daily monitor usage data points. |
Related types
getContractCommits (query)
getContractCommits is a query in the Monte Carlo GraphQL API, in Performance and cost. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.
Status: General availability
Get a list of commits for all contracts.
Returns
ContractCommitResults
Example
query GetContractCommits {
getContractCommits {
contractCommits {
id
name
start
expiration
amountPaid
amountRemaining
}
}
}Types used only by getContractCommits
getContractCommitsContractCommit
ContractCommitObject type.
ContractCommitResults
ContractCommitResultsObject type.
| Field | Type | Description |
|---|---|---|
contractCommits | [ContractCommit] | List of commits for all contracts |
Related types
getTsaInvestigations (query)
getTsaInvestigations is a query in the Monte Carlo GraphQL API, in Performance and cost. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.
Status: Experimental
Get Troubleshooting Agent investigations and the credits each one charged (0 for free runs).
Arguments
Returns
TsaInvestigationResults
Example
query GetTsaInvestigations($startOn: DateTime!, $endBefore: DateTime!) {
getTsaInvestigations(startOn: $startOn, endBefore: $endBefore) {
investigations {
createdTime
alertId
triggeredBy
billingStatus
units
credits
}
}
}Types used only by getTsaInvestigations
getTsaInvestigationsTsaInvestigation
TsaInvestigationObject type.
| Field | Type | Description |
|---|---|---|
createdTime | DateTime! | When the investigation completed and was billed |
alertId | UUID! | The investigated alert |
triggeredBy | String! | Display label for the user who started the investigation. Returns the user's email for human users; for agent users, returns a derived display label (e.g. Bayes on <domain>) — never the agent's internal address. |
billingStatus | TsaInvestigationBillingStatus! | FREE: within the monthly free investigations, or a free run, such as a teammate run while the account's teammate runs are free. NEW_BATCH: opened a new batch of paid investigations and was charged for it. INCLUDED_IN_BATCH: covered by a batch already charged this month. |
units | Int! | Units charged for this investigation. CBP v1 accounts are billed on these. |
credits | Float! | Credits charged for this investigation. CBP v2 accounts are billed on these. |
TsaInvestigationBillingStatus
TsaInvestigationBillingStatusEnum type.
| Value | Description |
|---|---|
FREE | |
NEW_BATCH | |
INCLUDED_IN_BATCH |
TsaInvestigationResults
TsaInvestigationResultsObject type.
| Field | Type | Description |
|---|---|---|
investigations | [TsaInvestigation!] | Investigations with what each one charged, oldest first. Free runs, such as teammate runs while the account's teammate runs are free, are FREE with 0 credits. |
Related types
Mutations
refreshEntitlements (mutation)
refreshEntitlements is a mutation in the Monte Carlo GraphQL API, in Performance and cost. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.
Status: Deprecated: Refreshing now handled internally.
Returns
RefreshEntitlements
Example
mutation RefreshEntitlements {
refreshEntitlements {
success
}
}Types used only by refreshEntitlements
refreshEntitlementsRefreshEntitlements
RefreshEntitlementsObject type.
| Field | Type | Description |
|---|---|---|
success | Boolean | True if the entitlements refresh was successful |
Source: The GraphQL API reference
This page is generated from the GraphQL schema on each release. Changes made in ReadMe are overwritten.
