private Page<String> listAllValidDatasets() throws RestServiceException {
      String accountName = null;
      String containerName = null;
      String pageToken = null;
      try {
        accountName = RestUtils.getHeader(restRequest.getArgs(), RestUtils.Headers.TARGET_ACCOUNT_NAME, true);
        containerName = RestUtils.getHeader(restRequest.getArgs(), RestUtils.Headers.TARGET_CONTAINER_NAME, true);
        pageToken = RestUtils.getHeader(restRequest.getArgs(), RestUtils.Headers.TARGET_PAGE_PARAM, false);
        return accountService.listAllValidDatasets(accountName, containerName, pageToken);
      } catch (AccountServiceException ex) {
        LOGGER.error(
            "Dataset get failed for accountName " + accountName + " containerName " + containerName + " pageToken "
                + pageToken, ex);
        throw new RestServiceException(ex.getMessage(),
            RestServiceErrorCode.getRestServiceErrorCode(ex.getErrorCode()));
      }
    }
List all valid datasets under the specfic container.
@return the page of the dataset name.
@throws RestServiceException
ambry-frontend/src/main/java/com/github/ambry/frontend/ListDatasetsHandler.java