List Existing Files with CLI

Print a list of files that exist in the deepset Cloud workspace you specify. The list includes the file name and ID, URL, size, creation timestamp, and metadata.

Prerequisites

  1. Install the SDK
  2. Generate an API Key to connect to a deepset Cloud workspace.

List Files

  1. Pass your API key and the name of the deepset Cloud workspace whose files you want to list. (You can also skip this step and just pass your API key and workspace in the list-files command.)
    # This command prompts you to pass the deepset Cloud API key and workspace name
    deepset-cloud login
    
    # This command prompts you to pass the deepset Cloud API key and workspace name
    python3 -m deepset_cloud_sdk.cli login
    
  2. Run the following command to get a list of the files in the workspace you specified:
     deepset-cloud list-files
    
    python3 -m deepset_cloud_sdk.cli list-files
    

A table with file details is displayed in the console.

Examples

  • This command lists all files whose names contain the string hilton_hotel that exist in the "hotels" workspace. The list is broken up into batches of 20 files. It also includes the API key to connect to deepset Cloud:

    deepset-cloud list-files --api-key <API_KEY> --workspace-name hotels --name "hilton-hotel" --batch-size 20
    
    python3 -m deepset_cloud_sdk.cli list-files --api-key <API_KEY> --workspace-name hotels --name "hilton_hotel" --batch-size 20
    

Related Links