Is it possible to use the API to attach an existing photo record to an observation?

hmmm… ok. i see what you’re looking at. so the idea is basically that if you PUT without setting ignore_photos=1, then maybe setting local_photos with specific photo record IDs will associate those photo records with the observation?..

when i start with 2 photos on an observation and uncheck one of the photos in the edit screen to delete it, i see that it sets local_photos with filename=“” and also local_photos = the remaining photo ID. so i wonder if that’s clearing out all the photos and then reattaching the photo that should remain?

UPDATE: i tested various commands, and i can’t seem to get the PUT to attach a photo using local_photo, though i am able to update other parts of the observation… so good lead, but no success on my end either.

UPDATE: after trying several variations of commands, i was able to execute a cURL command from the Windows command prompt that attached an existing photo onto a blank observation. so it is possible to do this via the API.
curl "https://api.inaturalist.org/v1/observations/107163770" -X "PUT" -H "Content-Type: application/json" -H "Accept: application/json" -H "Authorization: JWT" -d "{\"local_photos\":{\"107163770\":[179447766]}}"

thanks for the lead @jcook!