public ExternalFolder list(String accountId, String userId, String serviceId, String folderId, CloudStorageApi.ListOptions options) throws ApiException {
    Object localVarPostBody = "{}";
    
      // verify the required parameter 'accountId' is set
      if (accountId == null) {
      throw new ApiException(400, "Missing the required parameter 'accountId' when calling list");
      }
    
      // verify the required parameter 'userId' is set
      if (userId == null) {
      throw new ApiException(400, "Missing the required parameter 'userId' when calling list");
      }
    
      // verify the required parameter 'serviceId' is set
      if (serviceId == null) {
      throw new ApiException(400, "Missing the required parameter 'serviceId' when calling list");
      }
    
      // verify the required parameter 'folderId' is set
      if (folderId == null) {
      throw new ApiException(400, "Missing the required parameter 'folderId' when calling list");
      }
    
    // create path and map variables
    String localVarPath = "/v2/accounts/{accountId}/users/{userId}/cloud_storage/{serviceId}/folders/{folderId}".replaceAll("\\{format\\}","json")
      .replaceAll("\\{" + "accountId" + "\\}", apiClient.escapeString(accountId.toString()))
      .replaceAll("\\{" + "userId" + "\\}", apiClient.escapeString(userId.toString()))
      .replaceAll("\\{" + "serviceId" + "\\}", apiClient.escapeString(serviceId.toString()))
      .replaceAll("\\{" + "folderId" + "\\}", apiClient.escapeString(folderId.toString()));

    // query params
    java.util.List<Pair> localVarQueryParams = new java.util.ArrayList<Pair>();
    java.util.Map<String, String> localVarHeaderParams = new java.util.HashMap<String, String>();
    java.util.Map<String, Object> localVarFormParams = new java.util.HashMap<String, Object>();

    if (options != null) {
       localVarQueryParams.addAll(apiClient.parameterToPairs("", "cloud_storage_folder_path", options.cloudStorageFolderPath));
       localVarQueryParams.addAll(apiClient.parameterToPairs("", "count", options.count));
       localVarQueryParams.addAll(apiClient.parameterToPairs("", "order", options.order));
       localVarQueryParams.addAll(apiClient.parameterToPairs("", "order_by", options.orderBy));
       localVarQueryParams.addAll(apiClient.parameterToPairs("", "search_text", options.searchText));
       localVarQueryParams.addAll(apiClient.parameterToPairs("", "start_position", options.startPosition));
    }
    
    
      final String[] localVarAccepts = {
    "application/json"
      };
      final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);

      final String[] localVarContentTypes = {
    
      };
      final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);

      String[] localVarAuthNames = new String[] { "docusignAccessCode" }; //{  };

        GenericType<ExternalFolder> localVarReturnType = new GenericType<ExternalFolder>() {};
        return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
          }
public ExternalFolder list ( String accountId , String userId , String serviceId , String folderId , CloudStorageApi . ListOptions options ) throws ApiException { Object localVarPostBody = "{}" ; if ( accountId == null ) { throw new ApiException ( 400 , "Missing the required parameter 'accountId' when calling list" ) ; } if ( userId == null ) { throw new ApiException ( 400 , "Missing the required parameter 'userId' when calling list" ) ; } if ( serviceId == null ) { throw new ApiException ( 400 , "Missing the required parameter 'serviceId' when calling list" ) ; } if ( folderId == null ) { throw new ApiException ( 400 , "Missing the required parameter 'folderId' when calling list" ) ; } String localVarPath = "/v2/accounts/{accountId}/users/{userId}/cloud_storage/{serviceId}/folders/{folderId}" . replaceAll ( "\\{format\\}" , "json" ) . replaceAll ( "\\{" + "accountId" + "\\}" , apiClient . escapeString ( accountId . toString ( ) ) ) . replaceAll ( "\\{" + "userId" + "\\}" , apiClient . escapeString ( userId . toString ( ) ) ) . replaceAll ( "\\{" + "serviceId" + "\\}" , apiClient . escapeString ( serviceId . toString ( ) ) ) . replaceAll ( "\\{" + "folderId" + "\\}" , apiClient . escapeString ( folderId . toString ( ) ) ) ; java . util . List < Pair > localVarQueryParams = new java . util . ArrayList < Pair > ( ) ; java . util . Map < String , String > localVarHeaderParams = new java . util . HashMap < String , String > ( ) ; java . util . Map < String , Object > localVarFormParams = new java . util . HashMap < String , Object > ( ) ; if ( options != null ) { localVarQueryParams . addAll ( apiClient . parameterToPairs ( "" , "cloud_storage_folder_path" , options . cloudStorageFolderPath ) ) ; localVarQueryParams . addAll ( apiClient . parameterToPairs ( "" , "count" , options . count ) ) ; localVarQueryParams . addAll ( apiClient . parameterToPairs ( "" , "order" , options . order ) ) ; localVarQueryParams . addAll ( apiClient . parameterToPairs ( "" , "order_by" , options . orderBy ) ) ; localVarQueryParams . addAll ( apiClient . parameterToPairs ( "" , "search_text" , options . searchText ) ) ; localVarQueryParams . addAll ( apiClient . parameterToPairs ( "" , "start_position" , options . startPosition ) ) ; } final String [ ] localVarAccepts = { "application/json" } ; final String localVarAccept = apiClient . selectHeaderAccept ( localVarAccepts ) ; final String [ ] localVarContentTypes = { } ; final String localVarContentType = apiClient . selectHeaderContentType ( localVarContentTypes ) ; String [ ] localVarAuthNames = new String [ ] { "docusignAccessCode" } ; GenericType < ExternalFolder > localVarReturnType = new GenericType < ExternalFolder > ( ) { } ; return apiClient . invokeAPI ( localVarPath , "GET" , localVarQueryParams , localVarPostBody , localVarHeaderParams , localVarFormParams , localVarAccept , localVarContentType , localVarAuthNames , localVarReturnType ) ; }
Gets a list of all the items from the specified cloud storage provider.
Retrieves a list of all the items in all  the folders associated with the user from the specified cloud storage provider. You can limit the scope of the returned items by providing a comma separated list of folder IDs in the request.
@param accountId The external account number (int) or account ID Guid. (required)
@param userId The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required)
@param serviceId The ID of the service to access.   Valid values are the service name (\&quot;Box\&quot;) or the numerical serviceId (\&quot;4136\&quot;). (required)
@param folderId The ID of the folder being accessed. (required)
@param options for modifying the method behavior.
@return ExternalFolder
@throws ApiException if fails to make API call