Fetch available dimensions and measures for Analytics API querying for a tenant
Ternary's Analytics API puts you in control of your data and lets you make queries against the billing dataset you have ingested to Ternary. This endpoint supports the Query endpoint by helping you understand what dimensions and measures are available to you, and specifically, what cloud integrations those dimensions and measures are populated in.
Dimensions and measures that you can use in queries always follow a structure, NAMESPACE/name
. Namespaces include:
- FOCUS_SPEC_FIELD: Multi-cloud billing columns that are part of the FOCUS 1.0 or 1.1 specification.
- TERNARY_MULTI_CLOUD_FIELD: Multi-cloud billing columns that are created by Ternary for use in multiple clouds.
- GCP_LABEL: A label specified on a resource, project or folder within Google Cloud.
- AWS_USER_DEFINED_TAG, AWS_GENERATED_TAG: A tag specified on a resource or account within Amazon Web Services. User-defined tags are created by AWS users; generated tags occur naturally when using particular resources, such as EKS.
- AZURE_TAG: A tag specified on a resource within Microsoft Azure
An example output is as follows showing examples for each of the namespaces that you will commonly see when using multiple cloud providers with Ternary. In each case, when you want to use a measure or dimension inside a Query, use the schemaName
in the Query request payload.
{
"schemas": [
{
"schemaName": "FOCUS_BILLING",
"measures": [
{ // Probably the most frequent measure to be used by any Ternary user
"displayName": "BilledCost",
"dataType": "FLOAT",
"unitType": "CURRENCY",
"namespace": "FOCUS_SPEC_FIELD",
"providerName": "FOCUS",
"schemaFieldName": "FOCUS_SPEC_FIELD/BilledCost"
},
{ // Example of a measure made available only for particular integrations (OCI in this case)
"displayName": "cost_myCost",
"dataType": "FLOAT",
"unitType": "CURRENCY",
"namespace": "OCI_BILLING_EXPORT_FIELD",
"providerName": "OCI",
"schemaFieldName": "OCI_BILLING_EXPORT_FIELD/cost_myCost"
},
],
"dimensions": [
{
"displayName": "SubAccountId",
"dataType": "STRING",
"namespace": "FOCUS_SPEC_FIELD",
"providerName": "FOCUS",
"schemaFieldName": "FOCUS_SPEC_FIELD/SubAccountId"
},
{
"displayName": "invoice_month",
"dataType": "STRING",
"namespace": "TERNARY_MULTI_CLOUD_FIELD",
"providerName": "TERNARY",
"schemaFieldName": "TERNARY_MULTI_CLOUD_FIELD/invoice_month"
},
{
"displayName": "goog-fleet-project",
"dataType": "STRING",
"namespace": "GCP_LABEL",
"providerName": "GCP",
"schemaFieldName": "GCP_LABEL/goog-fleet-project"
},
{
"displayName": "eks_cluster_name",
"dataType": "STRING",
"namespace": "AWS_USER_DEFINED_TAG",
"providerName": "AWS",
"schemaFieldName": "AWS_USER_DEFINED_TAG/eks_cluster_name"
}
]
}
]
}