# \[Rest Client\] Aerospike Rest Client

**URL:** <https://discuss.aerospike.com/t/rest-client-aerospike-rest-client/6304>\
**Category:** Rest Client\
**Created:** [June 4, 2019, 5:50pm UTC](https://discuss.aerospike.com/t/rest-client-aerospike-rest-client/6304 "2019-06-04T17:50:48Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shikhil\_Gupta](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.aerospike.com/shikhil_gupta/32/1082_2.png) [@Shikhil\_Gupta](https://discuss.aerospike.com/u/Shikhil_Gupta)\
**Post date:** [June 4, 2019, 5:50pm UTC](https://discuss.aerospike.com/t/rest-client-aerospike-rest-client/6304/1 "2019-06-04T17:50:49Z")

</div>

Hi, I was exploring rest client API documentations to check my one of user case is to

1. Delete the records using secondary index
2. Fetch the records using Secondary index.

But I did not find clear documentation to achieve this.

[https://www.aerospike.com/apidocs/rest](https://www.aerospike.com/apidocs/rest)

Can somebody help here?

---

<div class="post-metadata">

**Author:** ![rmarks](https://avatars.discourse-cdn.com/v4/letter/r/9f8e36/32.png) [@rmarks](https://discuss.aerospike.com/u/rmarks)\
**Post date:** [June 5, 2019, 6:39am UTC](https://discuss.aerospike.com/t/rest-client-aerospike-rest-client/6304/3 "2019-06-05T06:39:48Z")

</div>

If I understand that you are trying to do something like: select all records where record[bin] == age,

the REST Client does not currently have support for the Query and Scan methods, so that operation is not currently possible.

---

<div class="post-metadata">

**Author:** ![Shikhil\_Gupta](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.aerospike.com/shikhil_gupta/32/1082_2.png) [@Shikhil\_Gupta](https://discuss.aerospike.com/u/Shikhil_Gupta)\
**Post date:** [June 5, 2019, 7:08am UTC](https://discuss.aerospike.com/t/rest-client-aerospike-rest-client/6304/4 "2019-06-05T07:08:53Z")

</div>

Yes, I would like to know whether it is possible to delete the records using column which is secondary index in Aerospike.

Using primary key, I can do this where key is primary key.

- [`DELETE /v1/kvs/{namespace}/{set}/{key}`](https://www.aerospike.com/apidocs/rest#deleteRecordNamespaceSetKey)

I have use case where i have set secondary key also one of columns and I would like to delete the records using that Key. Same as like above

@Albot @rmarks @kporter^^

---

<div class="post-metadata">

**Author:** ![rmarks](https://avatars.discourse-cdn.com/v4/letter/r/9f8e36/32.png) [@rmarks](https://discuss.aerospike.com/u/rmarks)\
**Post date:** [June 5, 2019, 8:26pm UTC](https://discuss.aerospike.com/t/rest-client-aerospike-rest-client/6304/5 "2019-06-05T20:26:07Z")

</div>

That is not currently possible with the REST client.

---

<div class="post-metadata">

**Author:** ![kporter](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.aerospike.com/kporter/32/515_2.png) [@kporter](https://discuss.aerospike.com/u/kporter)\
**Post date:** [June 5, 2019, 8:41pm UTC](https://discuss.aerospike.com/t/rest-client-aerospike-rest-client/6304/6 "2019-06-05T20:41:00Z")

</div>

I believe the only way to achieve this, currently from any client, is to use a [Background UDF](https://www.aerospike.com/docs/udf/developing_record_udfs.html).

---

<div class="post-metadata">

**Author:** ![qingtiaz](https://avatars.discourse-cdn.com/v4/letter/q/f07891/32.png) [@qingtiaz](https://discuss.aerospike.com/u/qingtiaz)\
**Post date:** [October 9, 2020, 2:45am UTC](https://discuss.aerospike.com/t/rest-client-aerospike-rest-client/6304/7 "2020-10-09T02:45:08Z")

</div>

Hello, I see there is scan API in newest REST client API reference. But there is still no query API. Is there any plan to support query in REST client?

Thanks!

---

<div class="post-metadata">

**Author:** ![meher](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.aerospike.com/meher/32/1644_2.png) [@meher](https://discuss.aerospike.com/u/meher)\
**Post date:** [October 13, 2020, 2:31am UTC](https://discuss.aerospike.com/t/rest-client-aerospike-rest-client/6304/8 "2020-10-13T02:31:03Z")

</div>

The REST client seems to indeed be lacking that feature at this point (confirmed by [this matrix](https://www.aerospike.com/docs/guide/client_matrix.html)).

I believe this will be added in the future… Probably after the whole secondary index sub-system is refreshed on the server side, sometimes in the first part of next year. This is just a guess from my side, but I will update here if I find out further details.

---

<div class="post-metadata">

**Author:** ![qingtiaz](https://avatars.discourse-cdn.com/v4/letter/q/f07891/32.png) [@qingtiaz](https://discuss.aerospike.com/u/qingtiaz)\
**Post date:** [October 13, 2020, 2:43am UTC](https://discuss.aerospike.com/t/rest-client-aerospike-rest-client/6304/9 "2020-10-13T02:43:09Z")

</div>

Get it, Thanks for update!

---

<div class="post-metadata">

**Author:** ![JSchmidt](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.aerospike.com/jschmidt/32/1477_2.png) [@JSchmidt](https://discuss.aerospike.com/u/JSchmidt)\
**Post date:** [October 26, 2022, 12:44am UTC](https://discuss.aerospike.com/t/rest-client-aerospike-rest-client/6304/10 "2022-10-26T00:44:51Z")

</div>

@qingtiaz, the query API is now added with the release of Rest Gateway 2.0. We renamed the Rest Client. The new API supports PI queries, SI queries via an optional filter, pagination, and query by partition. I hope this helps!
