Closed irons closed 2 years ago
Hi there!
Looks like the solution to this is not currently documented, so thank you for bringing this issue to our attention. To get data on files (including the file ids) for an item you will need to use the get_files
method.
For example the following:
client.get_files(<some_item_id>, <some_vault_id>)
Will return an object of the following format:
{
'id': 'str',
'name': 'str',
'size': 'int',
'content_path': 'str',
}
I'll update the README to reflect this information. Please let me know if this resolves your issue.
Thank you, yes.
Your environment
Built from main, commit 678d60 from November 9th (because the document support committed in October hasn't been released yet)
Connect Server Version: 1.5.0
OS: macOS 11.6.3
Python Version: 3.9.10
What happened?
The API for download_file, consistent with the library's other file APIs, expects a file ID, an item ID, and a vault ID.
Starting from a vault name and an item name, I can determine the vault ID and the item ID, but the output of get_item doesn't include a file ID. It is included in the CLI output of
get item
, under a different name:The same
documentId
is shown via the Copy JSON command in the Mac app, and when I feed that identifier to thedownload_file
API, it succeeds. But it isn't useful if I can't programmatically determine the ID, and I am not seeing any way to do that.What did you expect to happen?
I should be able to use the python library, vault access, and knowledge of a file's name to access the file.
Notes & Logs
Here's the output of
get_item
:Thanks for your time.