legacy-api-documentation
legacy-api-documentation copied to clipboard
Collections API doesn't return photos that are still being rendered
Both PUT collections/:id and GET collections return a list of photos in the collection however it seems to not include photos that have just been uploaded and are still being rendered (show the throbber on the 500px website).
This breaks certain operations in the official Lightroom plugin where attempting to remove photos from a collection at the same time as uploading new photos will not work correctly. The following steps happen:
GET collections returns the current photos in the collection New photos are uploaded and then PUT collections/:id is called to add each one to the collection GET collections is called again to remove photos from the collection but the result doesn't yet include the new photos added so when PUT collection/:id is called those photos end up being dropped from the collection.
Ideally the API should include even the still rendering photos in the lists however an alternative way to fix this problem which I think would be a nice addition to the API is an API call to add photos to a collection and an API call to remove photos from a collection. This would save the need to get the list of photos in the collection first reducing API traffic.