# Importing data (json) from API

**URL:** <https://discuss.elastic.co/t/importing-data-json-from-api/232979>\
**Category:** Beats\
**Tags:** metricbeat\
**Created:** [May 17, 2020, 9:50am UTC](https://discuss.elastic.co/t/importing-data-json-from-api/232979 "2020-05-17T09:50:17Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![josete242](https://avatars.discourse-cdn.com/v4/letter/j/c4cdca/32.png) [@josete242](https://discuss.elastic.co/u/josete242)\
**Post date:** [May 17, 2020, 9:50am UTC](https://discuss.elastic.co/t/importing-data-json-from-api/232979/1 "2020-05-17T09:50:17Z")

</div>

Hi all.  
I need to import data via API to to analyze and create reports in elasticsearch. These data are collected in JSON format.  
I have seen that with metricbeat using the http module I could do it, but I have some doubts:

1- I need to run several different urls, can this be done with the module?  
i think in somethong like this (it´s correct?):

```
      - module: http
                    metricsets:
              - json
                    period: 10s
                   hosts: ["https://host-remote/api/v1/data1"]
                   hosts: ["https://host-remote/api/v2/data2"]
                   hosts: ["https://host-remote/api/v3/data1"]
                   namespace: "json_namespace"
                  path: "/"
                  #body: ""
                  method: "GET"
                 #username: "user"
                 #password: "secret"
                 request.enabled: false
                 response.enabled: false
                 json.is_array: false
                #dedot.enabled: false

```

2-If not possible with metricbeat, how could I do it?  
3- is there another beat intended for request API?

Thanks in advanced.  
Jose A

---

<div class="post-metadata">

**Author:** ![mtojek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mtojek/32/63863_2.png) [@mtojek](https://discuss.elastic.co/u/mtojek)\
**Post date:** [May 18, 2020, 7:18am UTC](https://discuss.elastic.co/t/importing-data-json-from-api/232979/2 "2020-05-18T07:18:47Z")

</div>

Hi,

could you please format the post using "code" tags? It's much easier to read and analyze it. Thanks!

---

<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:** [June 15, 2020, 7:18am UTC](https://discuss.elastic.co/t/importing-data-json-from-api/232979/3 "2020-06-15T07:18:52Z")

</div>

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