Togai Metrics API allows you to fetch different metrics from Events, Usage Meters and PricePlans with multiple queryable options.
A single request can query up to five metrics.
Single response can contain a maximum of 300 data points.
The *_FOR_CYCLE metrics in Togai are stored against the pricing cycle start date of accounts based on their pricing schedules.For instance, metrics of an account having a MONTHLY pricing cycle configued to invoice on 5th of every month, metrics are stored as follows.
PricingCycleStartDate
Usage/RevenueForCycle
2020-01-05T00:00:00Z
1000
2020-02-05T00:00:00Z
1200
2020-03-05T00:00:00Z
1200
In case of changes to the plan, e.g, a different monthly plan which is configured to invoice on 1st of every month is associated to account from 2020-03-15, metrics are stored as follows.
Now, in order to query the *_FOR_CYCLE metrics for any pricing cycle, make sure that the PricingCycleStartDate lies within startTime (inclusive) and endTime (exclusive).Example, for metrics query with startTime as 2020-02-15T00:00:00Z and endTime as 2020-04-01T00:00:00Z results contain the data from below records.
PricingCycleStartDate
Usage/RevenueForCycle
2020-03-05T00:00:00Z
1250
2020-03-15T00:00:00Z
600
and not data from 2020-02-15T00:00:00Z or from 2020-04-01T00:00:00Z
{"docsConfig":{"$schema":"https://mintlify.com/docs.json","theme":"mint","name":"Togai documentation","colors":{"primary":"#2853C2","light":"#2563EB","dark":"#2563EB"},"favicon":"/images/togai-logo-light.svg","logo":{"light":"https://mintcdn.com/zuora-togai/gpDI_SmUijp8C7vA/images/togai-light.png?fit=max\u0026auto=format\u0026n=gpDI_SmUijp8C7vA\u0026q=85\u0026s=f564a808b1f89a7be82bef2effbcbeea","dark":"https://mintcdn.com/zuora-togai/gpDI_SmUijp8C7vA/images/togai-dark.svg?fit=max\u0026auto=format\u0026n=gpDI_SmUijp8C7vA\u0026q=85\u0026s=32fc4951a4bf9381284ec120bc163c72"},"api":{"openapi":["openapi.yaml"],"playground":{"display":"simple"},"mdx":{"server":["https://sandbox-api.togai.com","https://api.togai.com"],"auth":{"method":"bearer","name":null}}},"background":{"image":"https://mintlify.s3.us-west-1.amazonaws.com/zuora-togai/images/background-documentation-min.png","decoration":null,"color":{"light":"#F8FAFC","dark":"#0D101F"}},"navbar":{"links":[{"label":"Demo app","href":"https://demo.togai.com"},{"label":"Login","href":"https://app.togai.com/login"}],"primary":{"type":"button","label":"Try for free","href":"https://app.togai.com/onboarding"}},"footer":{"socials":{"website":"https://togai.com","twitter":"https://twitter.com/togaiHQ","github":"https://github.com/TogaiHQ/","linkedin":"https://www.linkedin.com/company/togai"}},"integrations":{"ga4":{"measurementId":"G-Q0BLXR7WX5"},"gtm":{"tagId":"GTM-TS4BK7Z"}},"navigation":{"global":{"anchors":[{"anchor":"Postman collection","href":"https://www.postman.com/togai-workspace/workspace/togai-public","icon":"folder-open"},{"anchor":"Open API spec","href":"https://github.com/TogaiHQ/togai-mintlify-docs/blob/main/openapi.yaml","icon":{"name":"brackets-curly","style":"solid"}}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"zuora-togai","hasAudioNarration":false,"actualSubdomain":"zuora-togai","customDomains":["docs.togai.com"],"gitSource":{"type":"github","owner":"zuora","repo":"togai-mintlify-docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6a21e64ff325d2bf1006031a","collectionId":"4133aab6-8f92-457d-b1b7-2c069657b8f2","schemaVersion":"v2"},"feedback":{"edits":true,"issues":true},"entitlements":{},"buildId":"6ae921c7e1a78f25d5e046b4:success","clientVersion":"0.0.4054","searchFilterCounts":[{"language":"default","tag":"API Reference","count":147},{"language":"default","tag":"APIs","count":144},{"language":"default","tag":"Documentation","count":73},{"language":"default","tag":"Integrations","count":36},{"language":"default","tag":"Accounts","count":27},{"language":"default","tag":"How-To's","count":18},{"language":"default","tag":"Price Plan V2","count":13},{"language":"default","tag":"Manage customers","count":12},{"language":"default","tag":"Alerts","count":9},{"language":"default","tag":"Invoices","count":9}]},"assistantConfig":{},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"api-reference/metrics/get-togai-metrics","slug":"/api-reference/metrics/get-togai-metrics","pageMetadata":{"openapi":"post /metrics","title":"Get Togai Metrics","description":"Togai Metrics API allows you to fetch different metrics from Events, Usage Meters and PricePlans with multiple queryable options.\nA single request can query up to five metrics. \nSingle response can contain a maximum of 300 data points.\n","href":"/api-reference/metrics/get-togai-metrics"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Togai Metrics API allows you to fetch different metrics from Events, Usage Meters and PricePlans with multiple queryable options.\\nA single request can query up to five metrics.\\nSingle response can contain a maximum of 300 data points.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={code:`code`,hr:`hr`,p:`p`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,..._provideComponents(),...props.components},{Accordion,AccordionGroup,Heading,Table}=_components;if(!Accordion)_missingMdxReference(`Accordion`,true);if(!AccordionGroup)_missingMdxReference(`AccordionGroup`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Table)_missingMdxReference(`Table`,true);return _jsxs(_Fragment,{children:[_jsx(Heading,{level:`2`,id:`metricquery-allowed-field-combinations`,children:`MetricQuery: Allowed field combinations`}),`\n`,_jsxs(AccordionGroup,{children:[_jsx(Accordion,{title:`MetricQuery.configs`,id:`metricquery-configs`,children:_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Metric Name`}),_jsx(_components.th,{children:`Config Key`}),_jsx(_components.th,{children:`Allowed Values`}),_jsx(_components.th,{children:`Default value`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`REVENUE`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`CURRENCY`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`BASE`}),` or `,_jsx(_components.code,{children:`INVOICE`})]}),_jsx(_components.td,{children:_jsx(_components.code,{children:`BASE`})}),_jsx(_components.td,{children:`currency to return the revenue in`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`REVENUE_FOR_CYCLE`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`CURRENCY`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`BASE`}),` or `,_jsx(_components.code,{children:`INVOICE`})]}),_jsx(_components.td,{children:_jsx(_components.code,{children:`BASE`})}),_jsx(_components.td,{children:`currency to return the revenue in`})]})]})]})}),_jsx(Accordion,{title:`MetricQuery.filters`,id:`metricquery-filters`,children:_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Metric Name`}),_jsx(_components.th,{children:`FilterEntry Name`}),_jsx(_components.th,{children:`Allowed groupBy fields`}),_jsx(_components.th,{children:`Default Values`}),_jsx(_components.th,{children:`Allowed Values`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`EVENTS`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`ACCOUNT_ID`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`ACCOUNT_ID`}),`, `,_jsx(_components.code,{children:`EVENT_STATUS`}),`, `,_jsx(_components.code,{children:`SCHEMA_NAME`}),`,`]}),_jsx(_components.td,{children:`None`}),_jsx(_components.td,{children:`*\u003cone or more valid account IDs>`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`EVENTS`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`CUSTOMER_ID`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`ACCOUNT_ID`}),`, `,_jsx(_components.code,{children:`EVENT_STATUS`}),`, `,_jsx(_components.code,{children:`SCHEMA_NAME`}),`,`]}),_jsx(_components.td,{children:`None`}),_jsx(_components.td,{children:`*\u003cone or more valid customer IDs>`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`EVENTS`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`SCHEMA_NAME`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`ACCOUNT_ID`}),`, `,_jsx(_components.code,{children:`EVENT_STATUS`}),`, `,_jsx(_components.code,{children:`SCHEMA_NAME`}),`,`]}),_jsx(_components.td,{children:`None`}),_jsx(_components.td,{children:`*\u003cat most one valid schema names>`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`EVENTS`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`EVENT_STATUS`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`ACCOUNT_ID`}),`, `,_jsx(_components.code,{children:`EVENT_STATUS`}),`, `,_jsx(_components.code,{children:`SCHEMA_NAME`}),`,`]}),_jsxs(_components.td,{children:[`[`,_jsx(_components.code,{children:`PROCESSED`}),`, `,_jsx(_components.code,{children:`UNPROCESSED`}),`]`]}),_jsxs(_components.td,{children:[`oneOrMoreOf `,_jsx(_components.code,{children:`PROCESSED`}),`, `,_jsx(_components.code,{children:`UNPROCESSED`}),`, `,_jsx(_components.code,{children:`IN_PROGRESS`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`USAGE`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`ACCOUNT_ID`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`ACCOUNT_ID`}),`, `,_jsx(_components.code,{children:`USAGE_METER_ID`}),`, `,_jsx(_components.code,{children:`CUSTOMER_ID`})]}),_jsx(_components.td,{children:`None`}),_jsx(_components.td,{children:`*\u003cone or more valid account IDs>`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`USAGE`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`CUSTOMER_ID`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`ACCOUNT_ID`}),`, `,_jsx(_components.code,{children:`USAGE_METER_ID`}),`, `,_jsx(_components.code,{children:`CUSTOMER_ID`})]}),_jsx(_components.td,{children:`None`}),_jsx(_components.td,{children:`*\u003cone or more valid customer IDs>`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`USAGE`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`USAGE_METER_ID`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`ACCOUNT_ID`}),`, `,_jsx(_components.code,{children:`USAGE_METER_ID`}),`, `,_jsx(_components.code,{children:`CUSTOMER_ID`})]}),_jsx(_components.td,{children:`None`}),_jsx(_components.td,{children:`*\u003cone or more valid usage meter name>`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`REVENUE`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`ACCOUNT_ID`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`ACCOUNT_ID`}),`, `,_jsx(_components.code,{children:`USAGE_METER_ID`}),`, `,_jsx(_components.code,{children:`CUSTOMER_ID`})]}),_jsx(_components.td,{children:`None`}),_jsx(_components.td,{children:`*\u003cone or more valid account IDs>`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`REVENUE`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`CUSTOMER_ID`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`ACCOUNT_ID`}),`, `,_jsx(_components.code,{children:`USAGE_METER_ID`}),`, `,_jsx(_components.code,{children:`CUSTOMER_ID`})]}),_jsx(_components.td,{children:`None`}),_jsx(_components.td,{children:`*\u003cone or more valid customer IDs>`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`REVENUE`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`USAGE_METER_ID`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`ACCOUNT_ID`}),`, `,_jsx(_components.code,{children:`USAGE_METER_ID`}),`, `,_jsx(_components.code,{children:`CUSTOMER_ID`})]}),_jsx(_components.td,{children:`None`}),_jsx(_components.td,{children:`*\u003cone or more valid usage meter name>`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`USAGE_FOR_CYCLE`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`ACCOUNT_ID`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`ACCOUNT_ID`}),`, `,_jsx(_components.code,{children:`USAGE_METER_ID`}),`, `,_jsx(_components.code,{children:`CUSTOMER_ID`})]}),_jsx(_components.td,{children:`None`}),_jsx(_components.td,{children:`*\u003cone or more valid account IDs>`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`USAGE_FOR_CYCLE`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`CUSTOMER_ID`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`ACCOUNT_ID`}),`, `,_jsx(_components.code,{children:`USAGE_METER_ID`}),`, `,_jsx(_components.code,{children:`CUSTOMER_ID`})]}),_jsx(_components.td,{children:`None`}),_jsx(_components.td,{children:`*\u003cone or more valid customer IDs>`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`USAGE_FOR_CYCLE`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`USAGE_METER_ID`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`ACCOUNT_ID`}),`, `,_jsx(_components.code,{children:`USAGE_METER_ID`}),`, `,_jsx(_components.code,{children:`CUSTOMER_ID`})]}),_jsx(_components.td,{children:`None`}),_jsx(_components.td,{children:`*\u003cone or more valid usage meter name>`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`REVENUE_FOR_CYCLE`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`ACCOUNT_ID`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`ACCOUNT_ID`}),`, `,_jsx(_components.code,{children:`USAGE_METER_ID`}),`, `,_jsx(_components.code,{children:`CUSTOMER_ID`})]}),_jsx(_components.td,{children:`None`}),_jsx(_components.td,{children:`*\u003cone or more valid account IDs>`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`REVENUE_FOR_CYCLE`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`CUSTOMER_ID`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`ACCOUNT_ID`}),`, `,_jsx(_components.code,{children:`USAGE_METER_ID`}),`, `,_jsx(_components.code,{children:`CUSTOMER_ID`})]}),_jsx(_components.td,{children:`None`}),_jsx(_components.td,{children:`*\u003cone or more valid customer IDs>`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`REVENUE_FOR_CYCLE`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`USAGE_METER_ID`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`ACCOUNT_ID`}),`, `,_jsx(_components.code,{children:`USAGE_METER_ID`}),`, `,_jsx(_components.code,{children:`CUSTOMER_ID`})]}),_jsx(_components.td,{children:`None`}),_jsx(_components.td,{children:`*\u003cone or more valid usage meter name>`})]})]})]})})]}),`\n`,_jsx(_components.hr,{}),`\n`,_jsxs(Accordion,{title:_jsxs(_Fragment,{children:[`Notes on `,_jsx(_components.code,{children:`USAGE_FOR_CYCLE`}),` and `,_jsx(_components.code,{children:`REVENUE_FOR_CYCLE`})]}),id:`notes-on-usage-for-cycle-and-revenue-for-cycle`,children:[_jsx(Heading,{level:`4`,id:`storage`,children:`Storage`}),_jsxs(_components.p,{children:[`The `,_jsx(_components.code,{children:`*_FOR_CYCLE`}),` metrics in Togai are stored against the pricing cycle start date of accounts based on their pricing schedules.`]}),_jsxs(_components.p,{children:[`For instance, metrics of an account having a `,_jsx(_components.code,{children:`MONTHLY`}),` pricing cycle configued to invoice on 5th of every month, metrics are stored as follows.`]}),_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`PricingCycleStartDate`}),_jsx(_components.th,{children:`Usage/RevenueForCycle`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`2020-01-05T00:00:00Z`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:`1000`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`2020-02-05T00:00:00Z`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:`1200`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`2020-03-05T00:00:00Z`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:`1200`})]})]})]}),_jsxs(_components.p,{children:[`In case of changes to the plan, e.g, a different monthly plan which is configured to invoice on 1st of every month is associated to account from `,_jsx(_components.code,{children:`2020-03-15`}),`, metrics are stored as follows.`]}),_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`PricingCycleStartDate`}),_jsx(_components.th,{children:`Usage/RevenueForCycle`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`2020-01-05T00:00:00Z`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:`1000`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`2020-02-05T00:00:00Z`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:`1200`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`2020-03-05T00:00:00Z`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:`1250`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`2020-03-15T00:00:00Z`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:`600`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`2020-04-01T00:00:00Z`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:`1300`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`2020-05-01T00:00:00Z`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:`1300`})]})]})]}),_jsx(Heading,{level:`4`,id:`querying`,children:`Querying`}),_jsxs(_components.p,{children:[`Now, in order to query the `,_jsx(_components.code,{children:`*_FOR_CYCLE`}),` metrics for any pricing cycle, make sure that the `,_jsx(_components.code,{children:`PricingCycleStartDate`}),` lies within `,_jsx(_components.code,{children:`startTime`}),` (inclusive) and `,_jsx(_components.code,{children:`endTime`}),` (exclusive).`]}),_jsxs(_components.p,{children:[`Example, for metrics query with startTime as `,_jsx(_components.code,{children:`2020-02-15T00:00:00Z`}),` and endTime as `,_jsx(_components.code,{children:`2020-04-01T00:00:00Z`}),` results contain the data from below records.`]}),_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`PricingCycleStartDate`}),_jsx(_components.th,{children:`Usage/RevenueForCycle`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`2020-03-05T00:00:00Z`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:`1250`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`2020-03-15T00:00:00Z`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:`600`})]})]})]}),_jsxs(_components.p,{children:[`and not data from `,_jsx(_components.code,{children:`2020-02-15T00:00:00Z`}),` or from `,_jsx(_components.code,{children:`2020-04-01T00:00:00Z`})]})]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"openapi":"post /metrics","title":"Get Togai Metrics","description":"Togai Metrics API allows you to fetch different metrics from Events, Usage Meters and PricePlans with multiple queryable options.\nA single request can query up to five metrics. \nSingle response can contain a maximum of 300 data points.\n","href":"/api-reference/metrics/get-togai-metrics"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"MetricQuery: Allowed field combinations","slug":"metricquery-allowed-field-combinations","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"tags":["Metrics"],"summary":"Get Togai Metrics","description":"Togai Metrics API allows you to fetch different metrics from Events, Usage Meters and PricePlans with multiple queryable options.\nA single request can query up to five metrics. \nSingle response can contain a maximum of 300 data points.\n","operationId":"getMetrics","requestBody":"e19ebcf2-4e19-499b-ad3e-6195f439a106","responses":{"200":"7aa965d7-e054-4ad2-89bf-c4df50ecbcdd","400":"f3ac835c-a068-4404-af0e-e484cc7f729d","401":"6dab879b-b4ee-4771-a3b7-5a4118c19ec1","403":"2c36097f-5915-45ec-b59e-0298c83ac23e","429":"94dd01b9-d853-44b9-b7c0-7e71c101e11a","default":"9b02a65d-5e6c-4533-a082-e290d0b18458"},"method":"post","type":"path","servers":["b517a395-a163-43f7-af0b-3e4ebe6efe76","9589ebc2-f0a7-4d5f-9437-c1f8f01bd941"],"security":["899f1d41-fe4e-43f8-88d3-8402ebff54f4"],"path":"/metrics","baseUrlOptions":["https://api.togai.com/","https://sandbox-api.togai.com/"],"title":"Get Togai Metrics","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{},"requestBody":{"content":{"application/json":{"schema":{"type":"object","description":"Request to get metrics from togai","additionalProperties":false,"required":["startTime","endTime","metricQueries"],"properties":{"startTime":{"type":"string","format":"date-time","description":"Start date time of the query (inclusive)","example":"2017-07-21T00:00:00Z","isRequired":true,"uniqueKey":"startTime","typeLabel":"string\u003cdate-time>"},"endTime":{"type":"string","format":"date-time","description":"End date time of the query (exclusive)","example":"2017-07-21T00:00:00Z","isRequired":true,"uniqueKey":"endTime","typeLabel":"string\u003cdate-time>"},"metricQueries":{"type":"array","items":{"type":"object","description":"Object representing a single metrics query","additionalProperties":false,"required":["id","name","aggregationPeriod"],"properties":{"id":{"type":"string","description":"Mandatory for all request. \nUser defined ID for identifying the request for your internal reference\n","isRequired":true,"uniqueKey":"metricQueries.items.[INDEX].id","typeLabel":"string"},"name":{"type":"string","description":"Define the metric you would like to get - allowed options are\nEVENTS - Aggregation of raw events,\nUSAGE - Default to METER_USAGE. To be deprecated soon,\nMETER_USAGE - Aggregated usage value from Usage meters,\nNAMED_LICENSE_USAGE - Aggregated usage value from Named Licenses,\nREVENUE - Aggregated revenue value from Pricing Plans\nUSAGE_FOR_CYCLE - Usage in pricing cycle\nREVENUE_FOR_CYCLE - Revenue in pricing cycle\n","enum":["EVENTS","USAGE","METER_USAGE","NAMED_LICENSE_USAGE","REVENUE","USAGE_FOR_CYCLE","REVENUE_FOR_CYCLE"],"default":"EVENTS","isRequired":true,"uniqueKey":"metricQueries.items.[INDEX].name","typeLabel":"enum\u003cstring>"},"aggregationPeriod":{"type":"string","description":"Set the aggregation period. Allowed periods are HOUR, DAY, WEEK, MONTH","enum":["HOUR","DAY","WEEK","MONTH"],"default":"DAY","isRequired":true,"uniqueKey":"metricQueries.items.[INDEX].aggregationPeriod","typeLabel":"enum\u003cstring>"},"groupBy":{"type":"string","description":"Group your metric with a groupBy field. \nAllowed fields are \nACCOUNT_ID\nEVENT_STATUS \nSCHEMA_NAME \nUSAGE_METER_ID [Use BILLABLE_ID as this will be deprecated soon...]\nBILLABLE_ID\nRAW_EVENT_STATUS\nPlease refer the table above for the list of combinations allowed in the groupBy\n","uniqueKey":"metricQueries.items.[INDEX].groupBy","typeLabel":"string"},"configs":{"description":"Configurations.\n| Metric Name | Config Key | Allowed Values | Default value | Description |\n|-------------------|------------|-----------------|---------------|-----------------------------------|\n| REVENUE | CURRENCY | BASE or INVOICE | BASE | currency to return the revenue in |\n| REVENUE_FOR_CYCLE | CURRENCY | BASE or INVOICE | BASE | currency to return the revenue in |\n","additionalProperties":{"type":"string","uniqueKey":"metricQueries.items.[INDEX].configs.additionalProperties","typeLabel":"string"},"type":"object","uniqueKey":"metricQueries.items.[INDEX].configs","typeLabel":"object"},"filters":{"type":"array","description":"Filter on specific fields. \nRefer possible fieldNames and fieldValues from the table above.\n","minItems":1,"maxItems":5,"items":{"type":"object","title":"MetricQueryFilterEntry","description":"\n| Metric Name | FilterEntry Name | Allowed groupBy fields | Default Values | Allowed Values |\n|-------------------|------------------|---------------------------------------------------------------------|--------------------------|-----------------------------------------------------------------|\n| EVENTS | ACCOUNT_ID | ACCOUNT_ID, EVENT_STATUS, SCHEMA_NAME, RAW_EVENT_STATUS | None | *\\\u003cone or more valid account IDs> |\n| EVENTS | CUSTOMER_ID | ACCOUNT_ID, EVENT_STATUS, SCHEMA_NAME, RAW_EVENT_STATUS | None | *\\\u003cone or more valid customer IDs> |\n| EVENTS | SCHEMA_NAME | ACCOUNT_ID, EVENT_STATUS, SCHEMA_NAME, RAW_EVENT_STATUS | None | *\\\u003cat most one valid schema names> |\n| EVENTS | EVENT_STATUS | ACCOUNT_ID, EVENT_STATUS, SCHEMA_NAME, RAW_EVENT_STATUS | [PROCESSED, UNPROCESSED] | oneOrMoreOf PROCESSED, UNPROCESSED, IN_PROGRESS, IngestionStatus| \n| USAGE | ACCOUNT_ID | ACCOUNT_ID, USAGE_METER_ID, BILLABLE_ID CUSTOMER_ID | None | *\\\u003cone or more valid account IDs> |\n| USAGE | CUSTOMER_ID | ACCOUNT_ID, USAGE_METER_ID, BILLABLE_ID CUSTOMER_ID | None | *\\\u003cone or more valid customer IDs> |\n| USAGE | USAGE_METER_ID | ACCOUNT_ID, USAGE_METER_ID, BILLABLE_ID CUSTOMER_ID | None | *\\\u003cone or more valid usage meter name> |\n| USAGE | BILLABLE_ID | ACCOUNT_ID, USAGE_METER_ID, BILLABLE_ID CUSTOMER_ID | None | *\\\u003cone or more valid usage meter name> |\n| REVENUE | ACCOUNT_ID | ACCOUNT_ID, USAGE_METER_ID, BILLABLE_ID CUSTOMER_ID | None | *\\\u003cone or more valid account IDs> |\n| REVENUE | CUSTOMER_ID | ACCOUNT_ID, USAGE_METER_ID, BILLABLE_ID CUSTOMER_ID | None | *\\\u003cone or more valid customer IDs> |\n| REVENUE | USAGE_METER_ID | ACCOUNT_ID, USAGE_METER_ID, BILLABLE_ID CUSTOMER_ID | None | *\\\u003cone or more valid usage meter name> |\n| REVENUE | BILLABLE_ID | ACCOUNT_ID, USAGE_METER_ID, BILLABLE_ID CUSTOMER_ID | None | *\\\u003cone or more valid usage meter name> |\n| EVENTS | ORGANIZATION_ID | ACCOUNT_ID, USAGE_METER_ID, BILLABLE_ID CUSTOMER_ID | \u003cFrom auth token> | |\n| USAGE | ORGANIZATION_ID | ACCOUNT_ID, USAGE_METER_ID, BILLABLE_ID CUSTOMER_ID | \u003cFrom auth token> | |\n| REVENUE | ORGANIZATION_ID | ACCOUNT_ID, USAGE_METER_ID, BILLABLE_ID CUSTOMER_ID | \u003cFrom auth token> | |\n| USAGE_FOR_CYCLE | ACCOUNT_ID | ACCOUNT_ID, USAGE_METER_ID, BILLABLE_ID CUSTOMER_ID | None | *\\\u003cone or more valid account IDs> |\n| USAGE_FOR_CYCLE | CUSTOMER_ID | ACCOUNT_ID, USAGE_METER_ID, BILLABLE_ID CUSTOMER_ID | None | *\\\u003cone or more valid customer IDs> |\n| USAGE_FOR_CYCLE | USAGE_METER_ID | ACCOUNT_ID, USAGE_METER_ID, BILLABLE_ID CUSTOMER_ID | None | *\\\u003cone or more valid usage meter name> |\n| USAGE_FOR_CYCLE | BILLABLE_ID | ACCOUNT_ID, USAGE_METER_ID, BILLABLE_ID CUSTOMER_ID | None | *\\\u003cone or more valid usage meter name> |\n| REVENUE_FOR_CYCLE | ACCOUNT_ID | ACCOUNT_ID, USAGE_METER_ID, BILLABLE_ID CUSTOMER_ID | None | *\\\u003cone or more valid account IDs> |\n| REVENUE_FOR_CYCLE | CUSTOMER_ID | ACCOUNT_ID, USAGE_METER_ID, BILLABLE_ID CUSTOMER_ID | None | *\\\u003cone or more valid customer IDs> |\n| REVENUE_FOR_CYCLE | USAGE_METER_ID | ACCOUNT_ID, USAGE_METER_ID, BILLABLE_ID CUSTOMER_ID | None | *\\\u003cone or more valid usage meter name> |\n| REVENUE_FOR_CYCLE | BILLABLE_ID | ACCOUNT_ID, USAGE_METER_ID, BILLABLE_ID CUSTOMER_ID | None | *\\\u003cone or more valid usage meter name> |\n","additionalProperties":false,"required":["fieldName","fieldValues"],"properties":{"fieldName":{"type":"string","example":"ACCOUNT_ID","isRequired":true,"uniqueKey":"metricQueries.items.[INDEX].filters.items.[INDEX].fieldName","typeLabel":"string"},"fieldValues":{"type":"array","items":{"type":"string","example":"account#1","uniqueKey":"metricQueries.items.[INDEX].filters.items.[INDEX].fieldValues.items.[INDEX]","typeLabel":"string"},"isRequired":true,"uniqueKey":"metricQueries.items.[INDEX].filters.items.[INDEX].fieldValues","typeLabel":"string[]"}},"uniqueKey":"metricQueries.items.[INDEX].filters.items.[INDEX]","typeLabel":"MetricQueryFilterEntry ยท object"},"uniqueKey":"metricQueries.items.[INDEX].filters","typeLabel":"MetricQueryFilterEntry ยท object[]"}},"uniqueKey":"metricQueries.items.[INDEX]","typeLabel":"object"},"uniqueItems":true,"isRequired":true,"uniqueKey":"metricQueries","typeLabel":"object[]"}},"uniqueKey":"","typeLabel":"object"},"examples":{"GetMetricsRequest":{"title":"GetMetricsRequest","value":{"startTime":"2017-07-21T00:00:00Z","endTime":"2017-07-22T00:00:00Z","metricQueries":[{"id":"m1","name":"EVENTS","aggregationPeriod":"DAY","filters":[{"fieldName":"ACCOUNT_ID","fieldValues":["account#1"]},{"fieldName":"CUSTOMER_ID","fieldValues":["customer#1"]},{"fieldName":"EVENT_STATUS","fieldValues":["PROCESSED"]}]},{"id":"m2","name":"USAGE","aggregationPeriod":"MONTH","filters":[{"fieldName":"CUSTOMER_ID","fieldValues":["customer#1"]}]}]}}},"exampleType":"examples"}},"exampleType":"examples"},"responses":{"7aa965d7-e054-4ad2-89bf-c4df50ecbcdd":{"description":"Success response","content":{"application/json":{"schema":{"type":"object","description":"Response to GetMetrics Request","additionalProperties":false,"required":["results"],"properties":{"results":{"type":"array","items":{"type":"object","description":"Response to GetMetrics Request","additionalProperties":false,"required":["id","name","data"],"properties":{"id":{"type":"string","isRequired":true,"uniqueKey":"results.items.[INDEX].id","typeLabel":"string"},"name":{"type":"string","description":"Define the metric you would like to get - allowed options are\nEVENTS - Aggregation of raw events,\nUSAGE - Default to METER_USAGE. To be deprecated soon,\nMETER_USAGE - Aggregated usage value from Usage meters,\nNAMED_LICENSE_USAGE - Aggregated usage value from Named Licenses,\nREVENUE - Aggregated revenue value from Pricing Plans\nUSAGE_FOR_CYCLE - Usage in pricing cycle\nREVENUE_FOR_CYCLE - Revenue in pricing cycle\n","enum":["EVENTS","USAGE","METER_USAGE","NAMED_LICENSE_USAGE","REVENUE","USAGE_FOR_CYCLE","REVENUE_FOR_CYCLE"],"default":"EVENTS","isRequired":true,"uniqueKey":"results.items.[INDEX].name","typeLabel":"enum\u003cstring>"},"data":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["timestamps","metricValues"],"properties":{"timestamps":{"type":"array","items":{"type":"string","format":"date-time","uniqueKey":"results.items.[INDEX].data.items.[INDEX].timestamps.items.[INDEX]","typeLabel":"string\u003cdate-time>"},"maxItems":300,"isRequired":true,"uniqueKey":"results.items.[INDEX].data.items.[INDEX].timestamps","typeLabel":"string\u003cdate-time>[]"},"metricValues":{"type":"array","items":{"type":"number","uniqueKey":"results.items.[INDEX].data.items.[INDEX].metricValues.items.[INDEX]","typeLabel":"number"},"maxItems":300,"isRequired":true,"uniqueKey":"results.items.[INDEX].data.items.[INDEX].metricValues","typeLabel":"number[]"},"groupedBy":{"title":"MetricDataPointsGroupedBy","type":"object","required":["fieldName","fieldValue"],"properties":{"fieldName":{"type":"string","isRequired":true,"uniqueKey":"results.items.[INDEX].data.items.[INDEX].groupedBy.fieldName","typeLabel":"string"},"fieldValue":{"type":"string","isRequired":true,"uniqueKey":"results.items.[INDEX].data.items.[INDEX].groupedBy.fieldValue","typeLabel":"string"}},"uniqueKey":"results.items.[INDEX].data.items.[INDEX].groupedBy","typeLabel":"MetricDataPointsGroupedBy ยท object"}},"uniqueKey":"results.items.[INDEX].data.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"results.items.[INDEX].data","typeLabel":"object[]"}},"uniqueKey":"results.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"results","typeLabel":"object[]"}},"uniqueKey":"","typeLabel":"object"},"examples":{"GetMetricsResponse":{"title":"GetMetricsResponse","value":{"results":[{"id":"m1","name":"EVENTS","data":[{"timestamps":["2017-07-21T00:00:00Z","2017-07-22T00:00:00Z"],"metricValues":[53,32]}]},{"id":"m2","name":"USAGE","data":[{"timestamps":["2017-07-01T00:00:00Z"],"metricValues":[123.45]}]}]}}},"exampleType":"examples"}},"exampleType":"examples"},"f3ac835c-a068-4404-af0e-e484cc7f729d":{"description":"Bad request. Please check the response message for failure details.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["message"],"properties":{"message":{"type":"string","description":"error description","maxLength":500,"isRequired":true,"uniqueKey":"message","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"message":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"},"6dab879b-b4ee-4771-a3b7-5a4118c19ec1":{"description":"Credential is not valid. Please check the response message for failure details.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["message"],"properties":{"message":{"type":"string","description":"error description","maxLength":500,"isRequired":true,"uniqueKey":"message","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"message":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"},"2c36097f-5915-45ec-b59e-0298c83ac23e":{"description":"Credential does not have access to get metrics.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["message"],"properties":{"message":{"type":"string","description":"error description","maxLength":500,"isRequired":true,"uniqueKey":"message","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"message":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"},"94dd01b9-d853-44b9-b7c0-7e71c101e11a":{"description":"Request throttled. Please check the response message on the failure details.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["message"],"properties":{"message":{"type":"string","description":"error description","maxLength":500,"isRequired":true,"uniqueKey":"message","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"message":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"},"9b02a65d-5e6c-4533-a082-e290d0b18458":{"description":"Error response","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["message"],"properties":{"message":{"type":"string","description":"error description","maxLength":500,"isRequired":true,"uniqueKey":"message","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"examples":{"ErrorResponse":{"title":"ErrorResponse","value":{"message":"\u003cReason message>"}}},"exampleType":"examples"}},"exampleType":"examples"}},"security":{"899f1d41-fe4e-43f8-88d3-8402ebff54f4":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"Bearer \u003ccredential>","scopes":[]}}},"servers":{"b517a395-a163-43f7-af0b-3e4ebe6efe76":{"description":"Api endpoint","url":"https://api.togai.com/"},"9589ebc2-f0a7-4d5f-9437-c1f8f01bd941":{"description":"Sandbox api endpoint","url":"https://sandbox-api.togai.com/"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"http","scheme":"bearer","bearerFormat":"Bearer \u003ccredential>","scopes":[]},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"Bearer authentication header of the form `Bearer \u003ctoken>`, where `\u003ctoken>` is your auth token.","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"bearerAuth","name":"Authorization"}],"title":"bearerAuth"}]},"originalFileLocation":"openapi.yaml"},"subdomain":"zuora-togai","siteName":"Togai documentation","title":"Get Togai Metrics - Togai documentation","navMaps":{"firstHrefInVersion":{"v1":{"href":"/api-reference/metrics/get-togai-metrics","matchLevel":0}},"firstHrefInLanguage":{}},"lastModified":"2026-01-07T03:50:04.289Z","originalFileLocation":"api-reference/metrics/get-togai-metrics.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Togai Metrics API allows you to fetch different metrics from Events, Usage Meters and PricePlans with multiple queryable options. A single request can query up to five metrics. Single response can contain a maximum of 300 data points.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Togai documentation\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/zuora-togai/-3_qRbhWsDYhfzjO/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/zuora-togai/-3_qRbhWsDYhfzjO/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/zuora-togai/-3_qRbhWsDYhfzjO/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/zuora-togai/-3_qRbhWsDYhfzjO/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/zuora-togai/-3_qRbhWsDYhfzjO/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/zuora-togai/-3_qRbhWsDYhfzjO/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/zuora-togai/-3_qRbhWsDYhfzjO/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/zuora-togai/-3_qRbhWsDYhfzjO/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/zuora-togai/-3_qRbhWsDYhfzjO/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Get Togai Metrics - Togai documentation\">\u003cmeta data-mint-head property=\"og:description\" content=\"Togai Metrics API allows you to fetch different metrics from Events, Usage Meters and PricePlans with multiple queryable options. A single request can query up to five metrics. Single response can contain a maximum of 300 data points.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Togai documentation\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.togai.com/api-reference/metrics/get-togai-metrics\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://zuora-togai.mintlify.app/_mintlify/api/og/v2?division=Metrics\u0026amp;title=Get+Togai+Metrics\u0026amp;description=Togai+Metrics+API+allows+you+to+fetch+different+metrics+from+Events%2C+Usage+Meters+and+PricePlans+with+multiple+queryable+options.%0AA+single+request+can+query+up+\u0026amp;theme=c6fa32643e3d775f05465dbc\u0026amp;signature=5a32490cf64d1a3fb2bef6746876bea8d0bc43261e8896dfd705a99a480b0109\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Get Togai Metrics - Togai documentation\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Togai Metrics API allows you to fetch different metrics from Events, Usage Meters and PricePlans with multiple queryable options. A single request can query up to five metrics. Single response can contain a maximum of 300 data points.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://zuora-togai.mintlify.app/_mintlify/api/og/v2?division=Metrics\u0026amp;title=Get+Togai+Metrics\u0026amp;description=Togai+Metrics+API+allows+you+to+fetch+different+metrics+from+Events%2C+Usage+Meters+and+PricePlans+with+multiple+queryable+options.%0AA+single+request+can+query+up+\u0026amp;theme=c6fa32643e3d775f05465dbc\u0026amp;signature=5a32490cf64d1a3fb2bef6746876bea8d0bc43261e8896dfd705a99a480b0109\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/zuora-togai/-3_qRbhWsDYhfzjO/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Togai documentation\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#2853C2\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.togai.com/api-reference/metrics/get-togai-metrics\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/metrics/get-togai-metrics.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.togai.com/#organization\",\"name\":\"Togai documentation\",\"url\":\"https://docs.togai.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/zuora-togai/gpDI_SmUijp8C7vA/images/togai-light.png?fit=max\u0026auto=format\u0026n=gpDI_SmUijp8C7vA\u0026q=85\u0026s=f564a808b1f89a7be82bef2effbcbeea\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.togai.com#website\",\"name\":\"Togai documentation\",\"url\":\"https://docs.togai.com\",\"publisher\":{\"@id\":\"https://docs.togai.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.togai.com/api-reference/metrics/get-togai-metrics#webpage\",\"url\":\"https://docs.togai.com/api-reference/metrics/get-togai-metrics\",\"name\":\"Get Togai Metrics\",\"description\":\"Togai Metrics API allows you to fetch different metrics from Events, Usage Meters and PricePlans with multiple queryable options. A single request can query up to five metrics. Single response can contain a maximum of 300 data points.\",\"dateModified\":\"2026-01-07T03:50:04.289Z\",\"isPartOf\":{\"@id\":\"https://docs.togai.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.togai.com/api-reference/metrics/get-togai-metrics#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.togai.com/api-reference/metrics/get-togai-metrics#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"APIs\",\"item\":\"https://docs.togai.com/api-reference/authentication/get-bearer-token\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Get Togai Metrics\",\"item\":\"https://docs.togai.com/api-reference/metrics/get-togai-metrics\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.togai.com/api-reference/metrics/get-togai-metrics#apireference\",\"headline\":\"Get Togai Metrics\",\"name\":\"Get Togai Metrics\",\"description\":\"Togai Metrics API allows you to fetch different metrics from Events, Usage Meters and PricePlans with multiple queryable options. A single request can query up to five metrics. Single response can contain a maximum of 300 data points.\",\"url\":\"https://docs.togai.com/api-reference/metrics/get-togai-metrics\",\"mainEntityOfPage\":{\"@id\":\"https://docs.togai.com/api-reference/metrics/get-togai-metrics#webpage\"},\"dateModified\":\"2026-01-07T03:50:04.289Z\",\"publisher\":{\"@id\":\"https://docs.togai.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.togai.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Togai documentation\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Togai documentation","nav":{"global":{"anchors":[{"anchor":"Postman collection","href":"https://www.postman.com/togai-workspace/workspace/togai-public","icon":"folder-open"},{"anchor":"Open API spec","href":"https://github.com/TogaiHQ/togai-mintlify-docs/blob/main/openapi.yaml","icon":{"name":"brackets-curly","style":"solid"}}]},"versions":[{"version":"v1","tabs":[{"tab":"Documentation","pages":[{"title":"Documentation","href":"/docs/introduction"}]},{"tab":"API Reference","groups":[{"group":"Introduction","pages":[{"title":"Getting Started","href":"/api-reference/getting-started"},{"title":"Authentication ๐","href":"/api-reference/authentication"},{"title":"Pagination ๐","href":"/api-reference/pagination"}]},{"group":"APIs","pages":[{"group":"Authentication","pages":[{"openapi":"post /authenticate","title":"Generate short lived bearer token","href":"/api-reference/authentication/get-bearer-token"},{"title":"Generate portal token","api":"post /organizations/{organization_id}/token","href":"/api-reference/authentication/customer-portal-auth"},{"openapi":"post /portal/token","title":"Get delegate token for customer portal","href":"/api-reference/authentication/get-delegate-token-for-customer-portal"}]},{"group":"Customers","pages":[{"openapi":"get /customers","title":"List customers","href":"/api-reference/customers/list-customers"},{"openapi":"post /customers","title":"Create a customer","href":"/api-reference/customers/create-a-customer"},{"openapi":"get /customers/{customer_id}","title":"Get a customer","href":"/api-reference/customers/get-a-customer"},{"openapi":"delete /customers/{customer_id}","title":"Delete a customer","href":"/api-reference/customers/delete-a-customer"},{"openapi":"patch /customers/{customer_id}","title":"Update a customer","href":"/api-reference/customers/update-a-customer"}]},{"group":"Accounts","pages":[{"openapi":"get /accounts","title":"List accounts of customer","href":"/api-reference/accounts/list-accounts-of-customer"},{"openapi":"post /accounts","title":"Create an account","href":"/api-reference/accounts/create-an-account"},{"openapi":"get /accounts/{account_id}","title":"Get an account","href":"/api-reference/accounts/get-an-account"},{"openapi":"delete /accounts/{account_id}","title":"Delete an account","href":"/api-reference/accounts/delete-an-account"},{"openapi":"patch /accounts/{account_id}","title":"Update an account","href":"/api-reference/accounts/update-an-account"},{"group":"Account Aliases","pages":[{"openapi":"get /accounts/{account_id}/account_aliases","title":"Get all aliases of an account","href":"/api-reference/accounts/account-aliases/get-all-aliases-of-an-account"},{"openapi":"post /accounts/{account_id}/add_aliases","title":"Add Aliases to account","href":"/api-reference/accounts/account-aliases/add-aliases-to-account"},{"openapi":"post /accounts/{account_id}/remove_aliases","title":"Remove Aliases to account","href":"/api-reference/accounts/account-aliases/remove-aliases-to-account"}]},{"group":"(Deprecated) Plan Associations","pages":[{"openapi":"get /accounts/{account_id}/pricing_schedules","title":"(DEPRECATED) List pricing schedules of an account","href":"/api-reference/accounts/plan-association/list-pricing-schedules-of-an-account"},{"openapi":"post /accounts/{account_id}/edit_schedules","title":"(DEPRECATED) Edit schedules of an account.","href":"/api-reference/accounts/plan-association/edit-schedules-of-an-account"},{"openapi":"post /accounts/{account_id}/price_plans","title":"(DEPRECATED) Dissociate or associate a price plan with an account","href":"/api-reference/accounts/plan-association/disassociate-a-plan-fromto-an-account"}]},{"group":"(Deprecated) Purchases","pages":[{"openapi":"get /accounts/{account_id}/purchases","title":"(DEPRECATED) Get all purchases for an account","href":"/api-reference/accounts/purchases/get-all-purchases-for-an-account"},{"openapi":"post /accounts/{account_id}/purchases","title":"(DEPRECATED) Initiate a purchase","href":"/api-reference/accounts/purchases/initiate-a-purchase"},{"openapi":"get /purchases/{purchase_id}","title":"(DEPRECATED) Get a specific purchase of an account","href":"/api-reference/accounts/purchases/get-a-specific-purchase-of-an-account"}]},{"group":"(Deprecated) Proposals","pages":[{"openapi":"get /accounts/{account_id}/purchase_proposals","title":"(DEPRECATED) List all proposals of an account","href":"/api-reference/accounts/proposals/list-all-proposals-of-an-account"},{"openapi":"post /accounts/{account_id}/purchase_proposals","title":"(DEPRECATED) Propose a purchase of a plan","href":"/api-reference/accounts/proposals/propose-a-purchase-of-a-plan"},{"openapi":"get /purchase_proposals/{purchase_proposal_id}","title":"(DEPRECATED) Get proposal information","href":"/api-reference/accounts/proposals/get-proposal-information"},{"openapi":"post /purchase_proposals/{purchase_proposal_id}/update_status","title":"(DEPRECATED) Approve or decline a purchase of a billing plan","href":"/api-reference/accounts/proposals/approve-or-decline-a-purchase-of-a-billing-plan"}]},{"group":"Schedules","pages":[{"openapi":"get /v2/schedules/{schedule_id}/rate_cards","title":"List rate cards","href":"/api-reference/schedules/list-rate-cards"},{"openapi":"post /v2/schedules/{schedule_id}/rate_cards","title":"Bulk rate card operations on a schedule","href":"/api-reference/schedules/bulk-rate-card-operations-on-a-schedule"},{"openapi":"post /v2/accounts/{account_id}/edit_schedules","title":"Bulk edit schedules of an account","href":"/api-reference/schedules/bulk-edit-schedules-of-an-account"},{"openapi":"get /v2/accounts/{account_id}/schedules","title":"List pricing schedules of an account","href":"/api-reference/schedules/list-pricing-schedules-of-an-account"},{"openapi":"get /v2/schedules/{schedule_id}/errors","title":"Get list of errors of a acc schedule","href":"/api-reference/schedules/get-list-of-errors-of-a-acc-schedule"},{"openapi":"delete /v2/accounts/{account_id}/discard_schedules","title":"Discard schedules of an account","href":"/api-reference/schedules/discard-schedules-of-an-account"},{"openapi":"post /v2/accounts/{account_id}/finalize_schedules","title":"Finalize schedules of an account","href":"/api-reference/schedules/finalize-schedules-of-an-account"},{"openapi":"get /v2/schedules/{schedule_id}/pricing_rules","title":"List pricing rules of a account schedule","href":"/api-reference/schedules/list-pricing-rules-of-a-account-schedule"},{"openapi":"put /v2/schedules/{schedule_id}/pricing_rules","title":"Update pricing rules of a account schedule","href":"/api-reference/schedules/update-pricing-rules-of-a-account-schedule"}]}]},{"group":"Aliases","pages":[{"openapi":"get /aliases","title":"List all aliases","href":"/api-reference/aliases/list-all-aliases"},{"openapi":"post /aliases","title":"Create an alias","href":"/api-reference/aliases/create-an-alias"},{"openapi":"get /aliases/{alias}","title":"Get an alias","href":"/api-reference/aliases/get-an-alias"},{"openapi":"delete /aliases/{alias}","title":"Delete an alias","href":"/api-reference/aliases/delete-an-alias"}]},{"group":"Event Schemas","pages":[{"openapi":"get /event_schema","title":"List event schemas","href":"/api-reference/event-schemas/list-event-schemas"},{"openapi":"post /event_schema","title":"Create an event schema","href":"/api-reference/event-schemas/create-an-event-schema"},{"openapi":"get /event_schema/{event_schema_name}","title":"Get an event schema","href":"/api-reference/event-schemas/get-an-event-schema"},{"openapi":"delete /event_schema/{event_schema_name}","title":"Delete an event schema","href":"/api-reference/event-schemas/delete-an-event-schema"},{"openapi":"patch /event_schema/{event_schema_name}","title":"Update an event schema","href":"/api-reference/event-schemas/update-an-event-schema"},{"openapi":"get /event_schema/{event_schema_name}/versions","title":"List all event schema versions","href":"/api-reference/event-schemas/list-all-event-schema-versions"},{"openapi":"post /event_schema/{event_schema_name}/activate","title":"Activate an event schema","href":"/api-reference/event-schemas/activate-an-event-schema"},{"openapi":"post /event_schema/{event_schema_name}/deactivate","title":"Deactivate an event schema","href":"/api-reference/event-schemas/deactivate-an-event-schema"}]},{"group":"Usage Meters","pages":[{"openapi":"get /usage_meters","title":"List usage meters for event schema","href":"/api-reference/usage-meters/list-usage-meters-for-event-schema"},{"openapi":"post /usage_meters","title":"Create an usage meter","href":"/api-reference/usage-meters/create-an-usage-meter"},{"openapi":"get /usage_meters/{usage_meter_id}","title":"Get usage meter","href":"/api-reference/usage-meters/get-usage-meter"},{"openapi":"delete /usage_meters/{usage_meter_id}","title":"Delete an Usage Meter","href":"/api-reference/usage-meters/delete-an-usage-meter"},{"openapi":"patch /usage_meters/{usage_meter_id}","title":"Update an usage meter","href":"/api-reference/usage-meters/update-an-usage-meter"},{"openapi":"post /usage_meters/{usage_meter_id}/activate","title":"Activate usage meter","href":"/api-reference/usage-meters/activate-usage-meter"},{"openapi":"post /usage_meters/{usage_meter_id}/deactivate","title":"Deactivate usage meter","href":"/api-reference/usage-meters/deactivate-usage-meter"}]},{"group":"AddOns","pages":[{"openapi":"get /addons","title":"List addOns","href":"/api-reference/addons/list-addons"},{"openapi":"post /addons","title":"Create an AddOn","href":"/api-reference/addons/create-an-addon"},{"openapi":"get /addons/{addon_id}","title":"Get an addon","href":"/api-reference/addons/get-an-addon"},{"openapi":"delete /addons/{addon_id}","title":"Delete an addon","href":"/api-reference/addons/delete-an-addon"},{"openapi":"patch /addons/{addon_id}","title":"Update an addon","href":"/api-reference/addons/update-an-addon"}]},{"group":"Licenses","pages":[{"openapi":"get /license_updates","title":"Get a list of licenses updates","href":"/api-reference/licenses/get-a-list-of-licenses-updates"},{"openapi":"post /license_updates","title":"Update a license entry","href":"/api-reference/licenses/update-a-license-entry"},{"openapi":"get /named_license_updates","title":"Get a list of named licenses updates","href":"/api-reference/licenses/get-a-list-of-named-licenses-updates"}]},{"group":"Feature","pages":[{"openapi":"get /features","title":"List Feature","href":"/api-reference/feature/list-feature"},{"openapi":"post /features","title":"Create a Feature and optionally associate with one or more event_schemas","href":"/api-reference/feature/create-a-feature-and-optionally-associate-with-one-or-more-event_schemas"},{"openapi":"get /features/{feature_id}","title":"Get a Feature","href":"/api-reference/feature/get-a-feature"},{"openapi":"patch /features/{feature_id}","title":"Update a Feature","href":"/api-reference/feature/update-a-feature"}]},{"group":"(Deprecated) Price Plans","pages":[{"openapi":"get /price_plans","title":"(DEPRECATED) List price plans","href":"/api-reference/price-plans/list-price-plans"},{"openapi":"post /price_plans","title":"(DEPRECATED) Create a price plan","href":"/api-reference/price-plans/create-a-price-plan"},{"openapi":"get /price_plans/{price_plan_id}","title":"(DEPRECATED) Get a price plan","href":"/api-reference/price-plans/get-a-price-plan"},{"openapi":"patch /price_plans/{price_plan_id}","title":"(DEPRECATED) Update a price plan","href":"/api-reference/price-plans/update-a-price-plan"},{"openapi":"post /price_plans/{price_plan_id}/activate","title":"(DEPRECATED) Activate a price plan","href":"/api-reference/price-plans/activate-a-price-plan"},{"openapi":"post /price_plans/migration","title":"(DEPRECATED) Create a price plan migration","href":"/api-reference/price-plans/create-a-price-plan-migration"},{"openapi":"delete /price_plans/{price_plan_id}","title":"(DEPRECATED) Archive a price plan","href":"/api-reference/price-plans/archive-a-price-plan"}]},{"group":"Price Plan V2","pages":[{"openapi":"get /v2/price_plans","title":"List price plans","href":"/api-reference/priceplanv2/list-price-plans"},{"openapi":"post /v2/price_plans","title":"Create a price plan","href":"/api-reference/priceplanv2/create-a-price-plan"},{"openapi":"get /v2/price_plans/{price_plan_id}","title":"Get a price plan","href":"/api-reference/priceplanv2/get-a-price-plan"},{"openapi":"patch /v2/price_plans/{price_plan_id}","title":"Update a price plan","href":"/api-reference/priceplanv2/update-a-price-plan"},{"openapi":"delete /v2/price_plans/{price_plan_id}/discard","title":"Discard a price plan","href":"/api-reference/priceplanv2/discard-a-price-plan"},{"openapi":"post /v2/price_plans/{price_plan_id}/finalize","title":"Finalize a price plan","href":"/api-reference/priceplanv2/finalize-a-price-plan"},{"openapi":"get /v2/price_plans/{price_plan_id}/rate_cards","title":"List rate cards of a price plan","href":"/api-reference/priceplanv2/list-rate-cards-of-a-price-plan"},{"openapi":"post /v2/price_plans/{price_plan_id}/rate_cards","title":"Bulk rate card operations of a price plan","href":"/api-reference/priceplanv2/bulk-rate-card-operations-of-a-price-plan"},{"openapi":"get /v2/price_plans/{price_plan_id}/pricing_rules","title":"List pricing rules of a price plan","href":"/api-reference/priceplanv2/list-pricing-rules-of-a-price-plan"},{"openapi":"put /v2/price_plans/{price_plan_id}/pricing_rules","title":"Update pricing rules of a price plan","href":"/api-reference/priceplanv2/update-pricing-rules-of-a-price-plan"},{"openapi":"get /v2/price_plans/{price_plan_id}/errors","title":"Get list of errors of a price plan","href":"/api-reference/priceplanv2/get-list-of-errors-of-a-price-plan"},{"openapi":"get /v2/price_plans/{price_plan_id}/versions","title":"List price plan versions","href":"/api-reference/priceplanv2/list-price-plan-versions"},{"openapi":"post /v2/price_plans/migration","title":"Create a price plan v2 migration","href":"/api-reference/priceplanv2/create-a-price-plan-v2-migration"}]},{"group":"Settings","pages":[{"openapi":"get /settings","title":"Lists settings","href":"/api-reference/settings/lists-settings"},{"openapi":"post /settings","title":"Create a setting","href":"/api-reference/settings/create-a-setting"},{"openapi":"get /settings/{setting_id_str}","title":"Get a setting","href":"/api-reference/settings/get-a-setting"},{"openapi":"patch /settings/{setting_id_str}","title":"Update a setting","href":"/api-reference/settings/update-a-setting"}]},{"group":"Price Experimentation","pages":[{"openapi":"post /revenue_calculator","title":"(DEPRECATED) Calculate and return the revenue for a existing or new price plan","href":"/api-reference/price-experimentation/calculate-and-return-the-revenue-for-a-existing-or-new-price-plan"}]},{"group":"Jobs","pages":[{"openapi":"get /jobs/{job_id}","title":"Get the status of a job","href":"/api-reference/jobs/get-the-status-of-a-job"},{"openapi":"get /jobs","title":"List jobs","href":"/api-reference/jobs/list-jobs"},{"openapi":"post /jobs/{job_id}/confirm","title":"Confirm a job","href":"/api-reference/jobs/confirm-a-job"},{"openapi":"post /jobs/{job_id}/reject","title":"Reject a job","href":"/api-reference/jobs/reject-a-job"},{"openapi":"get /jobs/{job_id}/entries","title":"List job entries","href":"/api-reference/jobs/list-job-entries"}]},{"group":"Event Ingestion","pages":[{"openapi":"post /ingest","title":"Ingest events to Togai","href":"/api-reference/event-ingestion/ingest-events-to-togai"},{"openapi":"post /ingestBatch","title":"Ingest events to Togai in batch","href":"/api-reference/event-ingestion/ingest-events-to-togai-in-batch"}]},{"group":"Entitlements","pages":[{"openapi":"post /entitled","title":"Ingest event if a user is entitled to a feature","href":"/api-reference/entitlements/ingest-event-if-a-user-is-entitled-to-a-feature"},{"openapi":"get /accounts/{account_id}/features/{feature_id}","title":"Get Feature credits balance","href":"/api-reference/entitlements/get-feature-credits-balance"},{"openapi":"get /accounts/{account_id}/features/{feature_id}/entries","title":"List feature credits entries of a feature for an account","href":"/api-reference/entitlements/list-feature-credits-entries-of-a-feature-for-an-account"},{"openapi":"patch /accounts/{account_id}/features/{feature_id}/entries/{entry_id}","title":"Update a feature credits entry","href":"/api-reference/entitlements/update-a-feature-credits-entry-of-a-feature-for-an-account"},{"openapi":"post /accounts/{account_id}/features/{feature_id}/entries/{entry_id}/void","title":"Void a feature credits entry of a feature for an account","href":"/api-reference/entitlements/void-a-feature-credits-entry-of-a-feature-for-an-account"},{"openapi":"get /accounts/{account_id}/entitlements","title":"Get entitlements for a account","href":"/api-reference/entitlements/get-entitlements-for-a-account"},{"openapi":"post /accounts/{account_id}/entitlements/{feature_id}","title":"Check entitlement value for a account","href":"/api-reference/entitlements/check-entitlement-value-for-a-account"},{"openapi":"get /accounts/{account_id}/entitlements/{feature_id}","title":"Get entitlement value for a account","href":"/api-reference/entitlements/get-entitlement-value-for-a-account"}]},{"group":"Event Management","pages":[{"openapi":"get /events","title":"Get a list of usage events with multiple query options","href":"/api-reference/event-management/get-a-list-of-usage-events-with-multiple-query-options"},{"openapi":"get /events/{event_id}","title":"Get an event using event id","href":"/api-reference/event-management/get-an-usage-event-using-event-id"},{"openapi":"post /events/correction","title":"Correct an ingested event","description":"#### This API lets you to correct events. Available in both synchronous and asynchronous mode\n- **Usages**: Reduction of all usages associated with this event\n- **Revenue**: Reduction of all revenues associated with this event\n- **Entitlements**: Entitlements(Feature Credits) consumed by this event are granted back to the account.\n\n### Possible Actions:\n- UNDO: Undo all usages, revenue and entitlements associated with an event\n- REDO: Performs UNDO and re-ingests the same event\n- REDO_EVENT: Performs UNDO and re-ingests the correction payload of the event\n","href":"/api-reference/event-management/correct-an-ingested-event"}]},{"group":"Metrics","pages":[{"openapi":"post /metrics","title":"Get Togai Metrics","href":"/api-reference/metrics/get-togai-metrics"}]},{"group":"Credits","pages":[{"openapi":"get /credits","title":"List credits","description":"Get all credits","href":"/api-reference/credits/list-credits"},{"openapi":"post /credits","title":"Grant credit","href":"/api-reference/credits/grant-credit"},{"openapi":"get /credits/{credit_id}","title":"Get credit details","href":"/api-reference/credits/get-credit-details"},{"openapi":"post /credits/{credit_id}/void","title":"Void credit","href":"/api-reference/credits/void-credit"},{"openapi":"get /accounts/{account_id}/credit_balance","title":"Credit balance for Account","href":"/api-reference/credits/credit-balance-for-account"}]},{"group":"Invoices","pages":[{"openapi":"get /invoices","title":"List invoices","href":"/api-reference/invoices/list-invoices"},{"openapi":"get /invoices/{invoice_id}","title":"Get an invoice","href":"/api-reference/invoices/get-an-invoice"},{"openapi":"get /invoice/{invoice_id}/pricing_rules_logs","title":"List pricing rule logs","href":"/api-reference/invoices/list-pricing-rule-logs"},{"openapi":"put /invoices/{invoice_id}/miscellaneous_charges","title":"Add or update miscellaneous charges in Invoice","href":"/api-reference/invoices/add-or-update-miscellaneous-charges-in-invoice"},{"openapi":"put /accounts/{account_id}/miscellaneous_charges","title":"Add or update miscellaneous charges in upcoming Invoice for a account","href":"/api-reference/invoices/add-or-update-miscellaneous-charges-in-upcoming-invoice-for-a-account"},{"openapi":"post /invoices","title":"Create a custom invoice for an account","href":"/api-reference/invoices/create-a-custom-invoice-for-an-account"},{"openapi":"delete /invoices/{invoice_id}","title":"Delete a custom invoice in DRAFT state","href":"/api-reference/invoices/delete-a-custom-invoice-in-draft-state"},{"openapi":"get /invoices/bill_runs","title":"List invoices eligible for bill run","href":"/api-reference/invoices/list-invoices-eligible-for-bill-run"},{"openapi":"post /invoices/bill_runs","title":"Create a bill run job request","href":"/api-reference/invoices/create-a-bill-run-job-request"}]},{"group":"Payments","pages":[{"openapi":"get /payments","title":"List all payments","href":"/api-reference/payments/list-all-payments"},{"openapi":"get /payments/{payment_id}","title":"Get a payment","href":"/api-reference/payments/get-a-payment"},{"openapi":"post /payments","title":"create payments","href":"/api-reference/payments/create-payments"}]},{"group":"Wallet","pages":[{"openapi":"get /accounts/{account_id}/wallet","title":"Wallet balance for Account","href":"/api-reference/wallet/wallet-balance-for-account"},{"openapi":"get /accounts/{account_id}/wallet/entries","title":"Wallet entries for Account","href":"/api-reference/wallet/wallet-entries-for-account"}]},{"group":"InvoiceGroups","pages":[{"openapi":"get /invoice_groups","title":"List Invoice Groups","href":"/api-reference/invoicegroups/list-invoice-groups"},{"openapi":"post /invoice_groups","title":"Create an invoice group","href":"/api-reference/invoicegroups/create-an-invoice-group"},{"openapi":"get /invoice_groups/{invoice_group_id}","title":"Get information of an invoice group","href":"/api-reference/invoicegroups/get-information-of-an-invoice-group"},{"openapi":"post /invoice_groups/{invoice_group_id}/add_accounts","title":"Add accounts to an invoice group","href":"/api-reference/invoicegroups/add-accounts-to-an-invoice-group"},{"openapi":"post /invoice_groups/{invoice_group_id}/remove_accounts","title":"Remove accounts from an invoice group. Removing all accounts will also delete the invoice group","href":"/api-reference/invoicegroups/remove-accounts-from-an-invoice-group-removing-all-accounts-will-also-delete-the-invoice-group"}]},{"group":"Alerts","pages":[{"title":"Introduction","href":"/api-reference/alerts/introduction"},{"openapi":"get /alert_templates","title":"List alert templates","href":"/api-reference/alerts/list-alert-templates"},{"openapi":"get /alert_templates/{alert_template_id}","title":"Get an alert template","href":"/api-reference/alerts/get-an-alert-template"},{"openapi":"post /alerts","title":"Create an alert","href":"/api-reference/alerts/create-an-alert"},{"openapi":"get /alerts","title":"List alerts","href":"/api-reference/alerts/list-alerts"},{"openapi":"patch /alerts/{alert_id}","title":"Update an alert","href":"/api-reference/alerts/update-an-alert"},{"openapi":"get /incidents","title":"List incidents","href":"/api-reference/alerts/list-incidents"},{"openapi":"get /incidents/{incident_id}","title":"Get an incident","href":"/api-reference/alerts/get-an-incident"},{"openapi":"put /incidents/{incident_id}/status","title":"Update an incident status","href":"/api-reference/alerts/update-an-incident-status"}]},{"group":"Reports","pages":[{"openapi":"get /reports","title":"List reports","href":"/api-reference/reports/list-reports"}]}]}]},{"tab":"Change log","pages":[{"title":"Change log","href":"/changelog/change-log"}]},{"tab":"How-To's","pages":[{"title":"How-To's","href":"/how-tos/overview"}]}]}]},"basePath":"","title":"Get Togai Metrics - Togai documentation","buildId":"dpl_345ReqzYaAjzS9QpeJemsKdb7KDj","deploymentId":"dpl_345ReqzYaAjzS9QpeJemsKdb7KDj","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-C8RPHPxo.js","utils-0BK-9q6z.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-DfjzsUJT.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-B4v9psJ4.js","snippetPresets-CpTQv-Ez.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","ApiExamples-BNP-Fvr0.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-BSgu6h1D.js","shallow-Biv1i9Gs.js","getApiPlaygroundDisplay-BoGOXhtF.js","CodeSnippet-DvQoT18_.js","CodeSnippets-Dnpa15xT.js","Page-Buji1S4J.js","getPastedJson-xAIyhUFE.js","icon-S6FBih11.js","MethodPill-SaYeUZyk.js","DuplicateIcon-Cs-p3v2Q.js","createIcon-DjCFEoHq.js","DynamicMarkdown-BcnBltEQ.js","SectionHeading-BUBl0eEF.js","axios-vUo_bRtp.js","Markdown-h4cOoD8d.js","clsx-B2v50t8t.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-DJnKvr0g.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-BHrrjR1K.js"]}