Hi community, I would like to know if it is possible to modify data in a report using rapidpro.
If it is possible, which API is used? How do I proceed?
Hi @Justinho
The only way to update a report is by using the default CouchDb endpoints.
So your RapidPro settings will have to GET that report, make the required changes and then PUT the updates to the server.
In shell with curl this would be like:
> doc=$(curl -X GET "http://admin:pass@localhost:6984/medic/doc_uuid" | jq '.updated=true')
> curl -X PUT "http://admin:pass@localhost:6984/medic/doc_uuid"
-H "Content-Type: application/json" --data "$doc"
1 Like