# Rollup API won't create when using 1M interval

**URL:** <https://discuss.elastic.co/t/rollup-api-wont-create-when-using-1m-interval/145744>\
**Category:** Elasticsearch\
**Created:** [August 23, 2018, 1:58pm UTC](https://discuss.elastic.co/t/rollup-api-wont-create-when-using-1m-interval/145744 "2018-08-23T13:58:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Steven\_Liu](https://avatars.discourse-cdn.com/v4/letter/s/a6a055/32.png) [@Steven\_Liu](https://discuss.elastic.co/u/Steven_Liu)\
**Post date:** [August 23, 2018, 1:58pm UTC](https://discuss.elastic.co/t/rollup-api-wont-create-when-using-1m-interval/145744/1 "2018-08-23T13:58:00Z")

</div>

Hi,

I am trying to create a Rollup index using below query. However, it kept returning errors. Any ideas??

```auto
{
    "index_pattern": "test_index",
    "rollup_index": "test_rollup_index",
    "cron": "0 0/1 * 1/1 * ? *",
    "page_size" :1000,
    "groups" : {
      "date_histogram": {
        "field": "datetime",
        "interval": "1M"
      },
      "terms": {
        "fields": ["cust_id", "type", "status"]
      }
    },
    "metrics": [
        {
            "field": "amount",
            "metrics": ["min", "max", "sum","avg"]
        }
    ]
}

```

## Errors

```auto
{
    "error": {
        "root_cause": [
            {
                "type": "illegal_argument_exception",
                "reason": "failed to parse setting [date_histogram.interval] with value [1M] as a time value: unit is missing or unrecognized"
            }
        ],
        "type": "illegal_argument_exception",
        "reason": "failed to parse setting [date_histogram.interval] with value [1M] as a time value: unit is missing or unrecognized"
    },
    "status": 400
}

```

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [September 20, 2018, 1:58pm UTC](https://discuss.elastic.co/t/rollup-api-wont-create-when-using-1m-interval/145744/2 "2018-09-20T13:58:01Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
