Free Support Forum -

Search for document in GroupsDocs Windows azure blob storage(using the metadata of a file)

Hi @GroupDocs team,

I have files in my Azure Storage, I have given them metadata key->value pair for each document. See the image for details (102.7 KB)
So, I need to do the processing of the files based on the metadata specified in the key value.
I don’t have the document name and extension instead I have the metadata value for the file.

Another approach could be the metadata value of the file is also happen to be the first part of the file name. For example, the file name is
and metadata value is WRTSC-1768280635-10438
If I can search for a file using the first part of the file name, that is WRTSC-1768280635-10438
Is there any possibility for achieving this. Appreciate a quick response from anyone.

Thank you,


I think you can get a list of files/folders from the specified folder(root) using GetFilesList API method, parse the response JSON output and proceed according to your workflow.

GET ​/viewer​/storage​/folder​/{path} Get all files and folders within a folder

1 Like

Thank you so much @tilal.ahmad
I will try this and let you know, if this works or not.

can you please provide a sample code for listing all files in root using PHP SDK?

Thank you

It’s a little urgent for me to test this scenario. Can you please share the sample code with me?

 // Getting the Viewer FolderAPI API Instance
public static function GetFolderApiInstance() {
    // intializing the configuration
    $configuration = new GroupDocs\Viewer\Configuration();
    // Seting the configurations
    // Retrun the new FolderApi instance
    return new GroupDocs\Viewer\FolderApi($configuration);
public static function GetList() {
    $folderApi = self::GetFolderApiInstance();
    $storage = 'storagename';
		$request = new  GroupDocs\Viewer\Model\RequestsRequests\getFilesListRequest("/", $storage);
		$response = $folderApi->getFilesList($request);
Following code worked for me.
        public static function GetList() {
            $folderApi = self::GetFolderApiInstance();
            $request = new GroupDocs\Viewer\Model\Requests\GetFilesListRequest("/", Utils::$MyStorage);
            $response = $folderApi->getFilesList($request);
            echo "<pre>",print_r($response,1),"</pre>";


Yes, your shared code is correct. Please check the following sample code as well for reference.

// Create instance of the API
$configuration = new GroupDocs\Viewer\Configuration();
$infoApi = new GroupDocs\Viewer\InfoApi($configuration); 
$folderApi = new GroupDocs\Viewer\FolderApi($configuration); 

try {
    $request = new GroupDocs\Viewer\Model\Requests\getFilesListRequest("/");
    $response = $folderApi->getFilesList($request);

    foreach ($response->getValue() as $key => $name) {
        echo $name->getName() .'<br>' ."\r\n";

} catch (Exception $e) {
    echo  "Something went wrong: ",  $e->getMessage(), "\n";
1 Like

Thank you so much … @tilal.ahmad. You are a saviour.

1 Like