2
votes

I'm trying to seach for an artifact using "File List" API http://server:port/api/storage/folder1/folder2?list&deep=1&depth=3&listFolders=1

The actual artifact is inside the sub-folder(lets say, folder3) of folder2. But the response for this api call is like,

{
 "uri": "some uri"
 "created": "some time stamp"
  "files": [ ]
}

file list is empty in the response, but there are many files inside folder 3.

1
Is folder1 the repository key? doe the user you are using for the request has read permissions for the content of the repositoryDror Bereznitsky
yes. the repo key and path is correct, coz request for server:port/api/storage/folder1/folder2/folder3/filename gives proper details about the file; and user has read permissions.user3366706
try adding a new debug level logger to logback.xml for org.artifactory.storage.fs.tree.FolderNode and see if anything is being logged for the requestDror Bereznitsky
@drob sorry, I dont have permissions to do what you said.user3366706

1 Answers

1
votes

One reason for this can be lack of permissions. The file list API will only returns items which the requesting user have read permission for.
In your case, since the same user is able to get the artifact info for /folder1/folder2/folder3/filename but not the file list for /folder1, there might be a permission target which prevents the user from reading the content of folder1 of folder2. This can happen if a permission target has an exclude pattern, for example folder1/*.
If you have Artifactory admin rights, you can check this from the UI by looking at the effective permissions tab for folder1, folder2, folder3.