Retrieve a record

Retrieves one record by its object ID.

To retrieve more than one record, use the objects operation.

Usage

Required ACL: search
1
2
3
4
5
6
import com.algolia.api.SearchClient;
import com.algolia.model.search.*;

SearchClient client = new SearchClient("ALGOLIA_APPLICATION_ID", "ALGOLIA_API_KEY");

client.getObject("ALGOLIA_INDEX_NAME", "uniqueID", Arrays.asList("attr1", "attr2"));
Did you find this page helpful?
Java API clients v4