---
title: "Gets estimated usage details."
method: POST
path: "/v1/logSearches/estimatedUsage"
tags: ["logSearchesEstimatedUsage"]
---

# Gets estimated usage details.

`POST /v1/logSearches/estimatedUsage`

Gets the estimated volume of data that would be scanned for a given log search in the Infrequent data tier.

## Request body

- LogSearchEstimatedUsageRequest — Definition of log search parsing mode
  - `queryString` string, required — Query to perform.
  - `timeRange` ResolvableTimeRange, required
    - `type` string, required — Type of the time range. Value must be either `CompleteLiteralTimeRange` or `BeginBoundedTimeRange`.
  - `runByReceiptTime` boolean — This has the value `true` if the search is to be run by receipt time and `false` if it is to be run by message time.
  - `queryParameters` LogSearchQueryParameterSyncDefinitionBase[] — Values for search template used in the search query. Learn more about the search templates here : https://help.sumologic.com/docs/search/get-started-with-search/build-search/search-templates/
    - `autoComplete` AutoCompleteDefinition
      - `type` string, required — The autocomplete parameter type.
      - `autoCompleteKey` string — The autocomplete key to be used to fetch autocomplete values.
      - `autoCompleteValues` AutoCompleteValueSyncDefinition[] — The array of label-value pairs for autocomplete.
        - `label` string, required — The label of the autocomplete value.
        - `value` string, required — The value of the autocomplete value.
      - `lookupMetaData` AutoCompleteLookupMetaData
        - `fileName` string — The lookup file name to use as a source for autocomplete values.
        - `valueColumn` string — The column from the lookup file to use as the value.
        - `labelColumn` string — The column from the lookup file to use as the label.
    - `name` string, required — The name of the parameter.
    - `description` string — A description of the parameter.
    - `dataType` string, required — The data type of the parameter. Supported values are: 1. `NUMBER` 2. `STRING` 3. `ANY` 4. `KEYWORD`
    - `value` string, required — A value for the parameter. Should be compatible with the type set in dataType field.
  - `intervalTimeType` string — This parameter defines whether you want to run the search by messageTime, receiptTime, or searchableTime. By default, the search will run by messageTime. If both runByReceiptTime and intervalTimeType parameters are present then the preference will be given to the intervalTimeType.
  - `parsingMode` string — Define the parsing mode to scan the JSON format log messages. Possible values are: 1. `AutoParse` 2. `Manual` In AutoParse mode, the system automatically figures out fields to parse based on the search query. While in the Manual mode, no fields are parsed out automatically. For more information see [Dynamic Parsing](https://help.sumologic.com/?cid=0011).
  - `timezone` string, required — Time zone to get the estimated usage details. Follow the format in the [IANA Time Zone Database](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List).

## Response `200`

Log search information along with its estimated usage details.

- LogSearchEstimatedUsageDefinition — Definition of log search parsing mode
  - `queryString` string, required — Query to perform.
  - `timeRange` ResolvableTimeRange, required
    - `type` string, required — Type of the time range. Value must be either `CompleteLiteralTimeRange` or `BeginBoundedTimeRange`.
  - `runByReceiptTime` boolean — This has the value `true` if the search is to be run by receipt time and `false` if it is to be run by message time.
  - `queryParameters` LogSearchQueryParameterSyncDefinitionBase[] — Values for search template used in the search query. Learn more about the search templates here : https://help.sumologic.com/docs/search/get-started-with-search/build-search/search-templates/
    - `autoComplete` AutoCompleteDefinition
      - `type` string, required — The autocomplete parameter type.
      - `autoCompleteKey` string — The autocomplete key to be used to fetch autocomplete values.
      - `autoCompleteValues` AutoCompleteValueSyncDefinition[] — The array of label-value pairs for autocomplete.
        - `label` string, required — The label of the autocomplete value.
        - `value` string, required — The value of the autocomplete value.
      - `lookupMetaData` AutoCompleteLookupMetaData
        - `fileName` string — The lookup file name to use as a source for autocomplete values.
        - `valueColumn` string — The column from the lookup file to use as the value.
        - `labelColumn` string — The column from the lookup file to use as the label.
    - `name` string, required — The name of the parameter.
    - `description` string — A description of the parameter.
    - `dataType` string, required — The data type of the parameter. Supported values are: 1. `NUMBER` 2. `STRING` 3. `ANY` 4. `KEYWORD`
    - `value` string, required — A value for the parameter. Should be compatible with the type set in dataType field.
  - `intervalTimeType` string — This parameter defines whether you want to run the search by messageTime, receiptTime, or searchableTime. By default, the search will run by messageTime. If both runByReceiptTime and intervalTimeType parameters are present then the preference will be given to the intervalTimeType.
  - `parsingMode` string — Define the parsing mode to scan the JSON format log messages. Possible values are: 1. `AutoParse` 2. `Manual` In AutoParse mode, the system automatically figures out fields to parse based on the search query. While in the Manual mode, no fields are parsed out automatically. For more information see [Dynamic Parsing](https://help.sumologic.com/?cid=0011).
  - `timezone` string, required — Time zone to get the estimated usage details. Follow the format in the [IANA Time Zone Database](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List).
  - `estimatedUsageDetails` EstimatedUsageDetails, required
    - `dataScannedInBytes` integer — Amount of data scanned in bytes, to run the query.

## Other responses

- `default` — Operation failed with an error.

---

[API](https://skmtc.net/sumologic/apis/sumo-logic-api.md) · [All operations](https://skmtc.net/sumologic/apis/sumo-logic-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/sumologic/sumo-logic-api/revisions/e4e4c7554890/schema)
