Skip to main content

Delete an optimizer

DELETE 

/v1/triggers/:id

Deletes an optimizer and returns it. The data it already wrote stays in the timeless account: to remove it, run Delete data from a timeless account with the optimizer's ID first.

Must be run with an API token that has the User or Admin role. API tokens created before token roles were introduced have the same permissions as Admin.

Please ensure to change the region in the URL to match your account's region.

Request​

Path Parameters

Responses​

successful operation. Returns the deleted optimizer.

Schema
    id int32

    The ID of the optimizer. Leave it out when you create an optimizer. When you update one, leave it out or set it to the ID in the URL.

    name stringrequired

    The name of the optimizer

    description string

    A description of the optimizer

    enabled boolean

    Whether the optimizer runs. Defaults to true.

    search objectrequired

    The search the optimizer runs. Without groupBy and metricsAggregations, each run copies the matching documents into the timeless account. With them, each run writes the aggregated results instead.

    queryString stringrequired

    The search query, in Lucene syntax. Use * to match every document.

    filter string

    Optional extra filters, as a JSON-encoded Elasticsearch query DSL bool query.

    groupBy string[]

    Fields to group the results by

    metricsAggregations object[]

    Aggregations to compute for each group. With groupBy, every aggregation needs an aggregationType other than NONE.

  • Array [
  • aggregationType string

    Possible values: [SUM, MIN, MAX, AVG, COUNT, UNIQUE_COUNT, PERCENTAGE, PERCENTILE, NONE]

    fieldToAggregateOn string

    The field to aggregate. Leave it empty only for COUNT.

    valueToAggregateOn string

    The value the aggregation needs, for aggregations that take one, such as PERCENTILE

  • ]
  • periodInMinutes int32

    How far back each run searches, in minutes. Leave it out to search back as far as the schedule's interval, so consecutive runs cover all the data once.

    source object

    The accounts the optimizer searches. It must search at least one account.

    allSubAccounts boolean

    Search the account that owns the API token in the request and all the accounts it can search. Defaults to true. To search specific accounts, set it to false and list them in subAccountsIds.

    subAccountsIds int32[]

    The IDs of the accounts to search, when allSubAccounts is false

    allTimelessIndices boolean

    Also search all your timeless accounts. Defaults to false.

    timelessIndices int32[]

    The IDs of timeless accounts to search, when allTimelessIndices is false

    triggerOn objectrequired

    When the optimizer runs

    type stringrequired

    Possible values: [SCHEDULE]

    Always SCHEDULE for an optimizer

    frequency stringrequired

    Possible values: [EVERY_10_MINUTES, EVERY_30_MINUTES, EVERY_1_HOUR, EVERY_4_HOURS, EVERY_6_HOURS, EVERY_8_HOURS, EVERY_1_DAY]

    How often the optimizer runs

    output objectrequired
    target objectrequired
    timelessIndex objectrequired

    The timeless account the optimizer writes into

    id int32required

    The id of the timeless account, from List the timeless accounts of an account

    logType stringrequired

    The log type to write with. Use the timeless account's logType: data written with any other log type can't be removed with Delete data from a timeless account.

    name string

    The name of the timeless account

    createdOn number

    The time at which the optimizer was created, in epoch seconds

    createdBy string

    Who created the optimizer

    lastUpdatedOn number

    The time at which the optimizer was last updated, in epoch seconds

    lastUpdateBy string

    Who last updated the optimizer

Loading...