# High Level Rest Snapshot Creation Error

**URL:** <https://discuss.elastic.co/t/high-level-rest-snapshot-creation-error/146902>\
**Category:** Elasticsearch\
**Created:** [August 31, 2018, 6:02pm UTC](https://discuss.elastic.co/t/high-level-rest-snapshot-creation-error/146902 "2018-08-31T18:02:07Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![questar](https://avatars.discourse-cdn.com/v4/letter/q/9fc29f/32.png) [@questar](https://discuss.elastic.co/u/questar)\
**Post date:** [August 31, 2018, 6:02pm UTC](https://discuss.elastic.co/t/high-level-rest-snapshot-creation-error/146902/1 "2018-08-31T18:02:07Z")

</div>

CreateSnapshotRequest request = new CreateSnapshotRequest();  
request.repository(repositoryName);  
request.snapshot(snapshotName);  
request.partial(false);  
request.waitForCompletion(true);  
CreateSnapshotResponse response = client.snapshot().create(request, RequestOptions.DEFAULT);

ElasticsearchStatusException[Elasticsearch exception [type=illegal\_argument\_exception, reason=request [/\_snapshot/abc] contains unrecognized parameter: [wait\_for\_completion]]]

Current 6.4 doc lists this as an option.

[https://www.elastic.co/guide/en/elasticsearch/client/java-rest/6.4/java-rest-high-snapshot-create-snapshot.html](https://www.elastic.co/guide/en/elasticsearch/client/java-rest/6.4/java-rest-high-snapshot-create-snapshot.html)

request.waitForCompletion(true);  
Waits for the snapshot to be completed before a response is returned.

---

<div class="post-metadata">

**Author:** ![questar](https://avatars.discourse-cdn.com/v4/letter/q/9fc29f/32.png) [@questar](https://discuss.elastic.co/u/questar)\
**Post date:** [August 31, 2018, 6:27pm UTC](https://discuss.elastic.co/t/high-level-rest-snapshot-creation-error/146902/2 "2018-08-31T18:27:57Z")

</div>

ElasticsearchStatusException[Elasticsearch exception [type=action\_request\_validation\_exception, reason=Validation Failed: 1: type is missing;]]

Also receiving a 'type missing' exception. Don't see this referenced in the doc, and was not a parameter in the Transport Client. The repository create does require a type param, request.type(FsRepository.TYPE);

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:** [September 28, 2018, 6:28pm UTC](https://discuss.elastic.co/t/high-level-rest-snapshot-creation-error/146902/3 "2018-09-28T18:28:03Z")

</div>

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