code: public Collection<String> getShardNames() {
          List<String> shardNames = new ArrayList<>();
          try {
              // Send a GET request to "/{application}/_shards"
              StringBuilder uri = new StringBuilder(Utils.isEmpty(m_restClient.getApiPrefix()) ? "" : "/" + m_restClient.getApiPrefix());          			            
              uri.append("/");
              uri.append(Utils.urlEncode(m_appDef.getAppName()));
              uri.append("/_shards");
              RESTResponse response = m_restClient.sendRequest(HttpMethod.GET, uri.toString());
              m_logger.debug("mergeShard() response: {}", response.toString());
              throwIfErrorResponse(response);
              
              // Response should be UNode tree in the form /Results/{application}/shards
              // where "shards" is an array of shard names.
              UNode rootNode = getUNodeResult(response);
              UNode appNode = rootNode.getMember(m_appDef.getAppName());
              UNode shardsNode = appNode.getMember("shards");
              for (UNode shardNode : shardsNode.getMemberList()) {
                  shardNames.add(shardNode.getValue());
              }
              return shardNames;
          } catch (Exception e) {
              throw new RuntimeException(e);
          }
      }
docs: Get a list of all shard names owned by this application. If there are no shards
  with data yet, an empty collection is returned.
  
  @return  Collection of shard names, possibly empty.