# How to get all datas from postman API to elastic search using PHP

**URL:** <https://discuss.elastic.co/t/how-to-get-all-datas-from-postman-api-to-elastic-search-using-php/219139>\
**Category:** Elasticsearch\
**Tags:** language-clients\
**Created:** [February 13, 2020, 7:23am UTC](https://discuss.elastic.co/t/how-to-get-all-datas-from-postman-api-to-elastic-search-using-php/219139 "2020-02-13T07:23:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![venkat2280](https://avatars.discourse-cdn.com/v4/letter/v/ad7895/32.png) [@venkat2280](https://discuss.elastic.co/u/venkat2280)\
**Post date:** [February 13, 2020, 7:23am UTC](https://discuss.elastic.co/t/how-to-get-all-datas-from-postman-api-to-elastic-search-using-php/219139/1 "2020-02-13T07:23:36Z")

</div>

I got the json values in elasticsearch by using the below code:  
use Elasticsearch\ClientBuilder;  
require 'vendor/autoload.php';  
$client = ClientBuilder::create()-\>build();

```
$params = [
'index' => 'my_index',
'id' => 'my_id',
'body' => [
'testField' => 'abc'
]

```

];

$response = $client-\>index($params);  
print\_r($response);

I tried to get all the json values from postman api to elasticsearch using PHP, can you all please guide me to achieve the same.

---

<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:** [March 12, 2020, 7:23am UTC](https://discuss.elastic.co/t/how-to-get-all-datas-from-postman-api-to-elastic-search-using-php/219139/2 "2020-03-12T07:23:39Z")

</div>

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