Class AssetListParams

  • All Implemented Interfaces:
    io.imagekit.core.Params

    
    public final class AssetListParams
     implements Params
                        

    This API can list all the uploaded files and folders in your ImageKit.io media library. In addition, you can fine-tune your query by specifying various filters by generating a query string in a Lucene-like syntax and provide this generated string as the value of the searchQuery.

    • Constructor Detail

    • Method Detail

      • fileType

         final Optional<AssetListParams.FileType> fileType()

        Filter results by file type.

        • all — include all file types

        • image — include only image files

        • non-image — include only non-image files (e.g., JS, CSS, video)

      • limit

         final Optional<Long> limit()

        The maximum number of results to return in response.

      • path

         final Optional<String> path()

        Folder path if you want to limit the search within a specific folder. For example, /sales-banner/ will only search in folder sales-banner.

        Note : If your use case involves searching within a folder as well as its subfolders, you can use path parameter in searchQuery with appropriate operator. Checkout /docs/api-reference/digital-asset-management-dam/list-and-search-assets#supported-parameters for more information.

      • searchQuery

         final Optional<String> searchQuery()

        Query string in a Lucene-like query language e.g. createdAt > "7d".

        Note : When the searchQuery parameter is present, the following query parameters will have no effect on the result:

        • tags

        • type

        • name

        /docs/api-reference/digital-asset-management-dam/list-and-search-assets#advanced-search-queries from examples.

      • skip

         final Optional<Long> skip()

        The number of results to skip before returning results.

      • type

         final Optional<AssetListParams.Type> type()

        Filter results by asset type.

        • file — returns only files

        • file-version — returns specific file versions

        • folder — returns only folders

        • all — returns both files and folders (excludes file-version)

      • _headers

         Headers _headers()

        The full set of headers in the parameters, including both fixed and additional headers.

      • _queryParams

         QueryParams _queryParams()

        The full set of query params in the parameters, including both fixed and additional query params.