Skip to content

Can't get data cvs. #40

Open
Open
@sergii-rolskii

Description

@sergii-rolskii

Hi,
If I do:
curl -o /tmp/data.txt - XGET 'http://localhost:9200/my-index/_search' -d '{"size":0,"query":{"bool":{"must":[{"query_string":{"analyze_wildcard":true,"query":"*"}},{"range":{"@timestamp":{"gte":1497538800000,"lte":1500213705347,"format":"epoch_millis"}}}],"must_not":[]}},"_source":{"excludes":[]},"aggs":{"2":{"date_histogram":{"field":"@timestamp","interval":"1h","time_zone":"Europe","min_doc_count":1}}}}'

I get /tmp/data.txt (data has json format) but if I do:

curl -o /tmp/data.csv -XGET "http://localhost:9200/my-index/_data?format=csv&source={"size":0,"query":{"bool":{"must":[{"query_string":{"analyze_wildcard":true,"query":"*"}},{"range":{"@timestamp":{"gte":1497538800000,"lte":1500213705347,"format":"epoch_millis"}}}],"must_not":[]}},"_source":{"excludes":[]},"aggs":{"2":{"date_histogram":{"field":"@timestamp","interval":"1h","time_zone":"Europe","min_doc_count":1}}}}"

I have error:
curl: (3) [globbing] nested braces not supported at pos 67

Where am I wrong? This query successfully working on kibana(dev-tools): GET my-index/_search {query...}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions