---
title: /operations/trackers/file_search
slug: amberflo-api/operationstrackersfilesearch
docTags: 
createdAt: 2024-11-07T15:10:16.971Z
---

{
  "id": "91sCTRRQP2gSUb3AQ2UDy",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "https://app.amberflo.io/operations/trackers/file_search",
    "servers": [
      {
        "url": "https://app.amberflo.io/operations/trackers/file_search"
      }
    ],
    "name": "",
    "description": "",
    "contentType": "application/json",
    "request": {
      "pathParameters": [],
      "headerParameters": [],
      "queryParameters": [],
      "bodyDataParameters": [
        {
          "kind": "optional",
          "name": "body",
          "type": "object",
          "description": "",
          "customType": "operations.query_tool.file_search_verification.FileSearchParams.in",
          "schema": [
            {
              "name": "type",
              "kind": "required",
              "type": "string",
              "description": "The type of query to run",
              "example": "",
              "default": "file_search"
            },
            {
              "name": "timeRange",
              "kind": "required",
              "type": "object",
              "description": "Time period for which to compute the usage.",
              "modelRef": "#/components/schemas/common.TimeRange.in",
              "customType": "common.TimeRange.in",
              "schema": [
                {
                  "name": "startTimeInSeconds",
                  "kind": "required",
                  "type": "integer<int64>",
                  "description": "Start time, in [Unix time](https://en.wikipedia.org/wiki/Unix_time) (seconds).",
                  "example": 0
                },
                {
                  "name": "endTimeInSeconds",
                  "kind": "optional",
                  "type": "integer<int64>",
                  "description": "End time, in [Unix time](https://en.wikipedia.org/wiki/Unix_time) (seconds). Defaults to \"now\".",
                  "example": 0
                }
              ]
            },
            {
              "name": "accountId",
              "kind": "optional",
              "type": "string",
              "description": "`accountId` specific for jobs.",
              "example": ""
            },
            {
              "name": "meterApiName",
              "kind": "required",
              "type": "string",
              "description": "`meterApiName` as defined in [Meter API](ref:post_meters).",
              "example": ""
            },
            {
              "name": "timeGroupingInterval",
              "kind": "optional",
              "type": "string",
              "description": "A usage query returns a time series of statistics. This field specifies the granularity of the time buckets in this series.\n\nNotice that for aggregation types: `MIN`, `MAX`, `AVG` this field has a more delicate meaning.\n\nFor example, for `AVG` if this field value is an `HOUR`, then you get the hourly average usage value for each group and a breakdown of each hour usage.\n\nOn the other hand if this field is a `DAY` then you get the average of the total daily usage, with a breakdown of the total usage per day.\n",
              "modelRef": "#/components/schemas/com.amberflo.service.common.aggregation.AggregationInterval.in",
              "customType": "com.amberflo.service.common.aggregation.AggregationInterval.in",
              "schema": []
            },
            {
              "name": "dimensions",
              "kind": "optional",
              "type": "map",
              "description": "Applicable dimensions for the meter. Used to speed up search",
              "example": "",
              "customType": "map<string, string>",
              "schema": []
            },
            {
              "name": "searchType",
              "kind": "required",
              "type": "string",
              "description": "Used to determine which files to search. Use 'aggregate', 'raw' or 'ingest'",
              "modelRef": "#/components/schemas/operations.query_tool.file_search_verification.SearchType.in",
              "customType": "operations.query_tool.file_search_verification.SearchType.in",
              "schema": []
            },
            {
              "name": "timeNormalized",
              "kind": "optional",
              "type": "boolean",
              "description": "Optional param; if set, is used to determine which timeNormalized files to search. Applicable only to 'raw' valueType",
              "example": ""
            },
            {
              "name": "value",
              "kind": "required",
              "type": "number",
              "description": "The value to search for",
              "example": ""
            },
            {
              "name": "range",
              "kind": "optional",
              "type": "number",
              "description": "A range to search for the value. For example, if looking for a value of '80' and a range of '5' will search for occurrences of values in [75,85].If not set, will only look for the specific value '80'.",
              "example": ""
            }
          ],
          "modelRef": "#/components/schemas/operations.query_tool.file_search_verification.FileSearchParams.in",
          "isExpanded": true
        }
      ],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "apiKey",
          "name": "X-API-KEY",
          "kind": "optional",
          "type": "apiKey",
          "in": "header"
        }
      ]
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "Successful request",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "operations.tracker.TrackerInfo.out",
            "schema": [
              {
                "name": "trackerId",
                "kind": "optional",
                "type": "string",
                "example": ""
              },
              {
                "name": "accountId",
                "kind": "optional",
                "type": "string",
                "example": ""
              },
              {
                "name": "queryToolPayload",
                "kind": "optional",
                "type": "string",
                "example": ""
              },
              {
                "name": "lastUpdated",
                "kind": "optional",
                "type": "integer<int64>",
                "example": 0
              },
              {
                "name": "type",
                "kind": "optional",
                "type": "string",
                "example": ""
              },
              {
                "name": "timeWindow",
                "kind": "optional",
                "type": "integer<int64>",
                "example": 0
              },
              {
                "name": "timeLag",
                "kind": "optional",
                "type": "integer<int64>",
                "example": 0
              },
              {
                "name": "status",
                "kind": "optional",
                "type": "string",
                "description": "",
                "modelRef": "#/components/schemas/operations.tracker.TrackerStatus.out",
                "customType": "operations.tracker.TrackerStatus.out",
                "schema": []
              }
            ],
            "modelRef": "#/components/schemas/operations.tracker.TrackerInfo.out",
            "isExpanded": true
          }
        ]
      }
    ],
    "examples": {
      "languages": [
        {
          "id": "5HNoBfp9jHk2-hVl0XF8C",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url https://app.amberflo.io/operations/trackers/file_search \\\n     --header 'accept: application/json' \\\n     --header 'content-type: application/json' \\\n     --data '{\n     \"type\": \"file_search\",\n     \"timeRange\": {\n     \"startTimeInSeconds\": 0\n     },\n     \"meterApiName\": \"\",\n     \"searchType\": \"\",\n     \"value\": \"\"\n     }'"
        },
        {
          "id": "DIiKVgiZeg2jhx6mnSp_n",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\n\nvar raw = JSON.stringify({\n   \"type\": \"file_search\",\n   \"timeRange\": {\n      \"startTimeInSeconds\": 0\n   },\n   \"meterApiName\": \"\",\n   \"searchType\": \"\",\n   \"value\": \"\"\n});\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   body: raw,\n   redirect: 'follow'\n};\n\nfetch(\"https://app.amberflo.io/operations/trackers/file_search\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "M32QMTDI-yt6PWDUAwljt",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://app.amberflo.io/operations/trackers/file_search\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\nrequest.body = JSON.dump({\n   \"type\": \"file_search\",\n   \"timeRange\": {\n      \"startTimeInSeconds\": 0\n   },\n   \"meterApiName\": \"\",\n   \"searchType\": \"\",\n   \"value\": \"\"\n})\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "HZaMwI_OO__ruhPjRRapu",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://app.amberflo.io/operations/trackers/file_search\"\n\npayload = json.dumps({\n   \"type\": \"file_search\",\n   \"timeRange\": {\n      \"startTimeInSeconds\": 0\n   },\n   \"meterApiName\": \"\",\n   \"searchType\": \"\",\n   \"value\": \"\"\n})\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "5HNoBfp9jHk2-hVl0XF8C"
    },
    "results": {
      "languages": [
        {
          "id": "esX737QKiq8n4VgfojOEY",
          "language": "200",
          "code": "// Successful request\n{\n  \"trackerId\": \"\",\n  \"accountId\": \"\",\n  \"queryToolPayload\": \"\",\n  \"lastUpdated\": \"\",\n  \"type\": \"\",\n  \"timeWindow\": \"\",\n  \"timeLag\": \"\",\n  \"status\": \"\"\n}"
        }
      ],
      "selectedLanguageId": "esX737QKiq8n4VgfojOEY"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}