1 answer
- 10-1
Ken Cline Thank you for your question. I believe you are correct that you would need to isolate your pictures by animal and not mix animals within one call to the addPictureUrl API. I don't believe there is a better way to handle this issue at this time - and I don't believe it's something we can improve on with this version of the API.
However, we expect with the v5 API which should have authenticated/private endpoints available soon, you will have several options, but it may still be advisable to make separate calls by animal.
I also wanted to mention that you might consider posting questions and comments to our Google Group for the API developers here: https://groups.google.com/a/rescuegroups.org/g/apidev
Add your comment...
When I call v2 API with the action addPictureUrl with three images, I get three recordMessages in the result set. There is nothing to differentiate between the three IDs that are returned. JSON does not guarantee order, so I can't simply rely on the order of the images in the recordMessages array.
In my example, all of the pictures are associated with a single animal; however, since I'm providing the animalID for each pictureUrl, this could be three different animals - which would further complicate the mapping of returned images to animals (and the picture order on the animal).
It seems that, if I care about this mapping, I need to limit the addition of pictures to one per API call.
Here's the API call:
and the result: