---
title: "Create or update dataset impact estimation configuration"
method: PUT
path: "/v1/datasets/{id}/estimation-config"
tags: ["Datasets"]
---

# Create or update dataset impact estimation configuration

`PUT /v1/datasets/{id}/estimation-config`

## Request

- Base URL: `https://docs.grepr.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://docs.grepr.ai/v1/datasets/{id}/estimation-config`
- Auth: one of:
  - API key in header `GREPR-API-KEY`
  - OpenID Connect (`https://grepr-prod.us.auth0.com/.well-known/openid-configuration`)

Creates or replaces the impact-estimation configuration for the dataset. Replacing the configuration takes effect on the next estimation cycle.

## Path parameters

- `id` string, required

## Request body

- DatasetEstimationConfig
  - `createdAt` string, date-time
  - `datasetId` string
  - `logLimit` integer, required: Maximum number of log messages to scan per estimation run.
  - `lookbackDuration` string, ISO-8601, required: Time window of data to scan per estimation run. ISO-8601 duration format.
  - `organizationId` string
  - `query` union: Predicate applied to rows before analytical aggregation.
    - object
      - `queries` EventPredicate[], required: List of predicates that must all match for this predicate to match.
      - `type` 'and-predicate', required: A predicate that matches when every child predicate matches.
      - `query` string
    - object
      - `query` string, required: The datadog query used by the predicate. See https://docs.datadoghq.com/tracing/trace_explorer/query_syntax
      - `type` 'datadog-query', required: A predicate that checks if an event matches a datadog query.
    - object
      - `filterTags` object: The set of tags to query for. If unspecified, all tags are queried.
      - `metricNames` string[], required: The names of the metrics to query. Must not be empty.
      - `query` string, required
      - `type` 'metric-predicate', required: A predicate that checks if an event matches a metrics query.
    - object
      - `query` string, required: The New Relic query used by the predicate. See https://docs.newrelic.com/docs/logs/ui-data/query-syntax-logs/
      - `type` 'newrelic-query', required: A predicate that checks if an event matches a New Relic query.
    - object
      - `query` string, required: The Nrql query used by the predicate. See https://docs.newrelic.com/docs/nrql
      - `strict` boolean: Whether the query should be parsed in strict mode.
      - `type` 'nrql-query', required: A predicate that checks if an event matches an NRQL query.
  - `refreshPeriod` string, ISO-8601, required: How often to recalculate impact percentages. ISO-8601 duration format.
  - `updatedAt` string, date-time

## Response `200`

Configuration created or updated successfully

- DatasetEstimationConfig
  - `createdAt` string, date-time
  - `datasetId` string
  - `logLimit` integer, required: Maximum number of log messages to scan per estimation run.
  - `lookbackDuration` string, ISO-8601, required: Time window of data to scan per estimation run. ISO-8601 duration format.
  - `organizationId` string
  - `query` union: Predicate applied to rows before analytical aggregation.
    - object
      - `queries` EventPredicate[], required: List of predicates that must all match for this predicate to match.
      - `type` 'and-predicate', required: A predicate that matches when every child predicate matches.
      - `query` string
    - object
      - `query` string, required: The datadog query used by the predicate. See https://docs.datadoghq.com/tracing/trace_explorer/query_syntax
      - `type` 'datadog-query', required: A predicate that checks if an event matches a datadog query.
    - object
      - `filterTags` object: The set of tags to query for. If unspecified, all tags are queried.
      - `metricNames` string[], required: The names of the metrics to query. Must not be empty.
      - `query` string, required
      - `type` 'metric-predicate', required: A predicate that checks if an event matches a metrics query.
    - object
      - `query` string, required: The New Relic query used by the predicate. See https://docs.newrelic.com/docs/logs/ui-data/query-syntax-logs/
      - `type` 'newrelic-query', required: A predicate that checks if an event matches a New Relic query.
    - object
      - `query` string, required: The Nrql query used by the predicate. See https://docs.newrelic.com/docs/nrql
      - `strict` boolean: Whether the query should be parsed in strict mode.
      - `type` 'nrql-query', required: A predicate that checks if an event matches an NRQL query.
  - `refreshPeriod` string, ISO-8601, required: How often to recalculate impact percentages. ISO-8601 duration format.
  - `updatedAt` string, date-time

## Other responses

- `400`: Invalid configuration data.
- `404`: Dataset not found.

---

[API](https://skmtc.dev/grepr/apis/grepr-api.md) - [All operations](https://skmtc.dev/grepr/apis/grepr-api/llms.txt) - [OpenAPI document](https://skmtc.dev/grepr/apis/grepr-api/revisions/2a5ce03a0bf0?raw)
