Forum Discussion

aignn's avatar
aignn
Helper II
6 years ago
Solved

How can i get data from web API with my json data?

Hello!   I have api, https://site.com/api I have json data that I need to run the query: { "aggs": { "round_aggs": { "terms": { "field": "host.hostname.keyword", "siz...
  • Jimmy801's avatar
    6 years ago

    Hello aignn 

     

    use this syntax for your Json-step

    Json = Json.Document("{#(cr)#(lf)  ""aggs"": {#(cr)#(lf)    ""round_aggs"": {#(cr)#(lf)      ""terms"": {#(cr)#(lf)        ""field"": ""host.hostname.keyword"",#(cr)#(lf)        ""size"": 2000#(cr)#(lf)      }#(cr)#(lf)    }#(cr)#(lf)  },#(cr)#(lf)  ""size"": 0#(cr)#(lf)}")

     

    If this post helps or solves your problem, please mark it as solution (to help other users find useful content and to acknowledge the work of users that helped you)
    Kudoes are nice too

    Have fun

    Jimmy