Create new API endpoint for index of all media
The route should be:
The returned payload should be a list of documents with a resident_id, message_id, and content_type fields. These three fields are what is required to call the recently created route to get media.
To get this information, use the email in the email header to search for all residents with a contact that has that email address. Then use the “media_messages_by_resident_id” view to get the resident_id, message_id, and content_type information for each media message. Finally, return the list of documents retrieved from the view. Make sure that the final format of the payload looks like this:
Here is an example of the view request in QA. The authorization is just the olympusqa credentials using basic auth.
curl -X GET \
'[login to view URL][%2202d2db5a-1a4d-2245-2018-be18d4614891%22,%22008de87b-dd86-0737-93ec-96db1e2e2127%22]' \
-H 'Authorization: Basic b2x5bXB1c3FhOiR6Kko3UVpXQDM4NkJxOEJrY3I3'
The SyncGatewayService in Connect-API already has a getView function that you can use. [login to view URL] is an example of calling a view. You will need to pass the “keys” (plural) query
parameter instead of “key” as this example uses. Set the “keys” parameter to the list of resident IDs.
Hello Sir . i am web developer. I can develop this api. I can show you my previous api that i developed for payment gateway. Thanks.
Bu iş için 7 freelancer ortalamada $24 teklif veriyor
Hi, I am expert in API and MySQL with more than 9 years of experience. I can complete your task perfectly Kindly check some of my recent work - [login to view URL] [login to view URL] http://v Daha Fazla