问题描述
我有一个名为'services'的容器。在Container内,有一个名为'Test'的目录。如何获取test目录中的blob列表。我很少在测试中保留几个CSV。需要其余的api来获取文件列表。 但是我可以使用下面的Rest API轻松获得容器内的项目列表 https://myaccount.blob.core.windows.net/services?restype=container&comp=list
我尝试过 https://myaccount.blob.core.windows.net/services/Test?restype=directory&comp=list 但它不起作用。 请帮助获取coorect参数值或rest API以查找目录中的项目列表
解决方法
https://myaccount.blob.core.windows.net/services/Test?restype=directory&comp=list&prefix=Test/
文档:
https://docs.microsoft.com/en-us/rest/api/storageservices/list-blobs#uri-parameters
只需添加一个参数prefix
即可。