code: public JSONObject getRule(String objectID, RequestOptions requestOptions) throws AlgoliaException {
      if (objectID == null || objectID.length() == 0) {
        throw new AlgoliaException("Invalid objectID");
      }
      try {
        return client.getRequest("/1/indexes/" + encodedIndexName + "/rules/" + URLEncoder.encode(objectID, "UTF-8"), true, requestOptions);
      } catch (UnsupportedEncodingException e) {
        throw new RuntimeException(e);
      }
    }
docs: Get a query rule
  
  @param objectID       the objectID of the query rule to get
  @param requestOptions Options to pass to this request