Photo detail endpoint for API

Platform(s): API

URLs (aka web addresses) of any pages, if relevant:

Description of need: I’m building a Lightroom plugin that synchronizes between Lightroom and iNaturalist. I’d like the ability to match photos that I’ve already (ie, prior to the plugin) uploaded to iNaturalist with photos in my Lightroom catalog. That requires some information, like the timestamp of the photo (the time of the observation may not match, especially if there are multiple photos attached to it), filename, etc, to find matches in the catalog.

It looks like there’s been some prior discussion on this topic:

In the issue on Github @kueda says “I’m not opposed to a photo detail endpoint in principle, or including the sourcing information we have in our database, so if someone else wants to build that, cool.”

I’d be happy to build this functionality if it is allowed.

Feature request details:

GET should return something like

  "results": [
    "id": 12345,
    "user_id": 67890,
    ... all other fields returned by POST /photos except to_observation ...
    "associated_observation_ids": [1, 2, 3],  # Or fully related objects
    "metadata": {
       "filename": "_DSC12345.jpg",
       "width": 1000,
       "height": 1000,
       ... whatever would be returned by (just without the key being transformed to title-case), and with the same visibility/logged-in restrictions ...

I’ve created an incomplete implementation

As far as I can tell I’d only need to add tests and API documentation to the INaturalistAPI commit for this to be ready for a pull request, but I hope it demonstrates concretely what I’m requesting here. I’m happy to complete the work (and implement any other requested changes) if this feature is approved.

Yes, please! I need this as well for my iNaturalist to BOLD script.

@kueda - What do you think of this? @rcloran is willing to do the development work (much of which is already done). Would someone be willing to merge this if he completes it?