Query Language API

The MegaBill filter API allows users to query and retrieve metadata for building filters on a huge dataset. This API provides endpoints to fetch MegaBill keys, values, virtual tags, and specific metadata for individual keys. This API is used to understand the different building blocks of Finout’s MegaFilter, and the information needed to build Virtual Tags and views.

GET/Keys

Retrieves all MegaBill keys.

Prerequisites

Request https://app.finout.io/v1/megabill/query-language/keys

Response

{

    "keys": [
        {
            "costCenter": "Kubernetes",
            "key": "deployment",
            "displayName": "deployment"
        },
        {
            "costCenter": "AWS",
            "key": "f_usage_type",
            "displayName": "Usage Type"
        },
        {
            "costCenter": "databricks",
            "key": "run_name",
            "displayName": "run_name"
        },
      
        {
            "costCenter": "Custom Cost",
            "key": "customCost_QmFtYmEbabababoi",
            "displayName": "Bamba"
        }
    ],
    "requestId": "d4e8c06b-9fd3-4a80-87bd-d13878fa9bd9",
    "accountId": "e6ad4c08-9ecd-4592-be61-7a13ad456259"
}

Returns a JSON object with the following properties:

Name
Type
Description

keys

array

An array of key metadata objects.

requestId

number

The ID of the request in the Finout system.

accountId

number

The ID of the account that made the request.

The key_metadata array has the following fields:

Field
Type
Description
Examples

costCenter

string

The cost center associated with the key (display name).

"databricks"

key

string

The unique identifier in Finout.

"a3ViZXJuZXRlczpsYWJlbF9zcGFya19zcGFya19leGVjX2lk"

displayName

string

The external name identifier in Finout, is only used in Finout’s app.

"job-id"

GET/KeyValues

Retrieve all values associated with a specific key. A successful response allows you to construct a virtual tag condition based on the key values and operators.

Prerequisites

Request http://app.finout.io/v1/megabill/query-language/values/{costcenter}/{key}

Path Parameters

Name
Type
Description

cost_center

string

The ID of the cost center.

key

string

The ID of the key.

Response

{
    "values": [
        "us-east-1",
        "global",
        "eu-central-1",
        "eu-west-2",
        "ap-southeast-2",
        "ca-central-1",
        "ap-northeast-1",
        "eu-west-1",
        "us-east-2",
        "ap-northeast-2",
        "sa-east-1",
        "us-west-2",
        "us-west-1",
        "ap-south-1",
        "eu-west-3",
        "ap-southeast-1",
        "eu-north-1",
        "ap-northeast-3",
        "me-south-1",
        "af-south-1"
    ],
    "request": {
        "costCenter": "AWS",
        "key": "Region"
    },
    "requestId": "2e473bda-b96e-40a6-929c-2f5c445bf393",
    "accountId": "e6ad4c08-9ecd-4592-be61-7a13ad456259"
}

Last updated

Still need help? Please feel free to reach out to our team at support@finout.io.