You can get the fileIds of the files in the folder with folderId using the Get Files in Folder
Please provide the fileIds of the files which are present in the folder with folderId, if you provide any invalid id or fileIds which are not present in the folder then as shown in the Error it will return 404 NotFound.
User must be an Organization Administrator for the Organization that owns a given Project or have storage_write permission assigned at the Project level.
An Organization Administrator must have at least one of the following roles assigned in User Management: Account Administrator, Co-Administrator, or CONNECT Services Administrator. For more information about User Management please visit our Bentley Communities Licensing, Cloud, and Web Services wiki page.
This response indicates that request lacks valid authentication credentials. Access token might not been provided, issued by the wrong issuer, does not have required scopes or request headers were malformed.
json
HeaderNotFound
{"error":{"code":"HeaderNotFound","message":"Header Authorization was not found in the request. Access denied."}}
{"error":{"code":"FileNotFound","message":"Requested fileIds are not available.","details":[{"code":"FileNotFound","message":"Requested file TYJsPN0xtkWId0yUrXkS5pN5AQzuullIkxz5aDnDJSI is not available.","target":"fileIds"}]}}
{"error":{"code":"FileInUse","message":"Requested fileIds are already locked by another user.","details":[{"code":"FileInUse","message":"Requested file TYJsPN0xtkWId0yUrXkS5pN5AQzuullIkxz5aDnDJSI is locked by another user.","target":"fileIds"}]}}
Gives details for an error that occurred while handling the request. Note that clients MUST NOT assume that every failed request will produce an object of this schema, or that all of the properties in the response will be non-null, as the error may have prevented this response from being constructed.