# 400: request does not support \[pit\]

**URL:** <https://discuss.elastic.co/t/400-request-does-not-support-pit/317141>\
**Category:** Elasticsearch\
**Created:** [October 20, 2022, 4:25pm UTC](https://discuss.elastic.co/t/400-request-does-not-support-pit/317141 "2022-10-20T16:25:20Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mworzala](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mworzala/32/112341_2.png) [@mworzala](https://discuss.elastic.co/u/mworzala)\
**Post date:** [October 20, 2022, 4:25pm UTC](https://discuss.elastic.co/t/400-request-does-not-support-pit/317141/1 "2022-10-20T16:25:20Z")

</div>

Hi: I am executing the following query against the search api, but it is returning a 400, and an error that the request does not support the pit parameter.

This is from the Go client, however, from the python client the request goes through.

```auto
{
  "pit": {
    "id": "PIT here, looks totally valid",
    "keep_alive": "10m"
  },
  "size": 2,
  "query": {
    "match_all": {}
  },
  "sort": [
    {"_shard_doc": "asc"}
  ]
}

```

Any help is appreciated, thanks.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [October 23, 2022, 11:15pm UTC](https://discuss.elastic.co/t/400-request-does-not-support-pit/317141/2 "2022-10-23T23:15:50Z")

</div>

Welcome to our community! 😃

It'd be useful if you could share the code that this request is being executed in, as someone may be able to provide further assistance based on it.

---

<div class="post-metadata">

**Author:** ![mworzala](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mworzala/32/112341_2.png) [@mworzala](https://discuss.elastic.co/u/mworzala)\
**Post date:** [October 25, 2022, 2:50pm UTC](https://discuss.elastic.co/t/400-request-does-not-support-pit/317141/3 "2022-10-25T14:50:59Z")

</div>

Hi, I have solved the problem, it was actually a different request than I thought, and simply caused by a difference between the python and go client (the python client removes invalid entries from the request body, the go client does not).

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:** [November 22, 2022, 2:51pm UTC](https://discuss.elastic.co/t/400-request-does-not-support-pit/317141/4 "2022-11-22T14:51:03Z")

</div>

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