I’d like to propose extending the API to return the original filename for photos and sounds when the requester is authenticated as the user who uploaded the asset.
This has been discussed in the past with @tiwane:
- Forum: https://forum.inaturalist.org/t/display-original-photo-filename/23346
- Github: https://github.com/inaturalist/inaturalist/issues/3062
My use case is a tool that automatically syncs my eBird observations to iNaturalist: github.com/Sajmani/birdsync . At least one other person is also using this tool, and I expect more eBirders will over time. I would like to extend the tool to accurately detect when the set of media assets on eBird has changed relative to those on iNaturalist so that can properly update the set on iNaturalist. To do this I need a mapping between each media asset and the Macauley Library Asset ID (ML ID) in eBird. I have arranged that mapping by using the ML ID as the original filename when uploading the asset, for example in https://www.inaturalist.org/observations/308307110 , the first photo is https://www.inaturalist.org/photos/556216628 and has original filename “ML640650792.jpe”. This corresponds to the original asset ID https://macaulaylibrary.org/asset/640650792. In order to sync the assets on future runs, I need to be able to read the original filename back via the API, which is currently unsupported.
I have prepared an initial PR here, but it doesn’t do the auth check yet: https://github.com/inaturalist/iNaturalistAPI/pull/534. I could use guidance from someone familiar with the codebase on this, for example, a pointer to similar logic in other API calls. CC @pleary who has been very helpful in the past
Thanks all,
S