code: protected <T extends Dto> List<T> getList(Class<T[]> classOfT, Class<T> classOfTItem, String methodKey, Pagination pagination, String entityId, String secondEntityId, Map<String, String> filter, Sorting sorting) throws Exception {
  
          String urlMethod = "";
  
          if (entityId != null && entityId.length() > 0 && secondEntityId != null && secondEntityId.length() > 0)
              urlMethod = String.format(this.getRequestUrl(methodKey), entityId, secondEntityId);
          else if (entityId != null && entityId.length() > 0)
              urlMethod = String.format(this.getRequestUrl(methodKey), entityId);
          else
              urlMethod = this.getRequestUrl(methodKey);
  
          if (pagination == null) {
              pagination = new Pagination();
          }
  
          Map<String, String> additionalUrlParams = new HashMap<>();
  
          if (filter != null) {
              additionalUrlParams.putAll(filter);
          }
  
          if (sorting != null) {
              additionalUrlParams.putAll(sorting.getSortParameter());
          }
  
          RestTool rest = new RestTool(this.root, true);
  
          return rest.requestList(classOfT, classOfTItem, urlMethod, this.getRequestType(methodKey), null, pagination, additionalUrlParams);
  
      }
docs: Gets the array of Dto instances from API.
  @param <T>                   Type on behalf of which the request is being called.
  @param classOfT              Type on behalf of which the request is being called.
  @param methodKey             Relevant method key.
  @param pagination            Pagination object.
  @param entityId              Entity identifier.
  @param filter                Collection of key-value pairs of filter parameters.
  @param sorting               Sorting instance.
  @return                      The array of Dto instances returned from API.
  @throws Exception