# Update api missing \_parent in response

**URL:** https://discuss.elastic.co/t/update-api-missing-parent-in-response/122555
**Category:** Elasticsearch
**Created:** [March 5, 2018, 3:30pm UTC](https://discuss.elastic.co/t/update-api-missing-parent-in-response/122555 "2018-03-05T15:30:06Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Gleb\_Kozyryatskyy](https://avatars.discourse-cdn.com/v4/letter/g/ecd19e/32.png) [@Gleb\_Kozyryatskyy](https://discuss.elastic.co/u/Gleb_Kozyryatskyy)
#### Post date: [March 5, 2018, 3:30pm UTC](https://discuss.elastic.co/t/update-api-missing-parent-in-response/122555/1 "2018-03-05T15:30:06Z")

</div>

Dear group,

Im using the update api and seems like there is no "\_parent" field in response.

Steps to reproduce:

```auto
#create index
curl -XPUT localhost:9200/testindex -d '{ "mappings": { "perenttype": {}, "childtype": { "_parent": { "type": "perenttype" } } } }'
#create parent
curl localhost:9200/testindex/perenttype/1 -d '{"name" : "parentTest"}'
#create child
curl localhost:9200/testindex/childtype/2?parent=1 -d '{"name" : "childTest"}'
#execute get
curl 'localhost:9200/testindex/childtype/2?parent=1&pretty'

```

response:

```auto
#there is _parent field in response
{
  "_index" : "testindex",
  "_type" : "childtype",
  "_id" : "2",
  "_version" : 1,
  "_routing" : "1",
  "_parent" : "1",
  "found" : true,
  "_source" : {
    "name" : "childTest"
  }
}

```

```auto
#execute update
curl -XPOST 'localhost:9200/testindex/childtype/2/_update?parent=1&pretty' -d '{ "doc" : {"name" : "childTest1"} }'

```

response:

```auto
#there is no _parent field in response, just _id
{
  "_index" : "testindex",
  "_type" : "childtype",
  "_id" : "2",
  "_version" : 2,
  "result" : "updated",
  "_shards" : {
    "total" : 2,
    "successful" : 1,
    "failed" : 0
  }
}

```

So the question is: **How can i get parent field in update api response?**

Im using elasticsearch 5.6.8

---

<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: [April 2, 2018, 3:30pm UTC](https://discuss.elastic.co/t/update-api-missing-parent-in-response/122555/2 "2018-04-02T15:30:10Z")

</div>

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