Forum Discussion
aignn
6 years agoHelper II
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...
- 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
Jimmy801
6 years agoCommunity Champion
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