Sending reports to Ushahidi from another app via Ushahidi API


#1

Hi there,

I am working on automating the synchronization of incidents between an Aggie instance (http://getAggie.org) an an Ushahidi (v3) instance for a coming election. While I think that the Ushahidi to Aggie should be easy using the Ushahidi webhooks, I am struggling a bit with the Aggie to Ushahidi flow.

At the moment I am trying to use the Ushahidi API as if Aggie was the Ushahidi web, which can get the job done, but it is not very pretty. Does anyone have any suggestions on how to post reports to Ushahidi not using the officially supported sources (SMS, web, email,…)?

There is a API_KEY in the settings, am I supposed to use that in some kind of OAUTH process?

The webhook implemented for the Yodie project only allows for updating reports, should the creation of reports be a feature request at github?

Best,
Andrés


#2

Hi Andrés,

just to clarify, in your use case, where the posts are originally sent to by users, Aggie or Ushahidi?


#3

Hi David,

Thanks for coming back to me this fast!

Incidents would be coming from both places:
Aggie -> Ushahidi: Users will comb facebook and twitter “reports” in Aggie to create “incidents” in Aggie. These incidents should become Ushahidi “posts” of a specific survey. (via API (POST api/v3/posts)?) You can see a crude attempt to implement this here.

Ushahidi -> Aggie: Newly created “posts” in Ushahidi from any survey should be sent to Aggie, where they will become a “report” (via webhook (https://aggie.domain.com:3333/ushahidi)?)

At some point I’d need to make sure we don’t send the same “posts” back and forth!
Thanks again!


#4

Since it’s a bidirectional sync, my take would be that it’s better to use the Platform API : http://preview.ushahidi.com/platform/develop/api/index.html . Both for pulling and pushing new posts.


#5

Thanks! I will look into the official “preview” of the documentation.

When will that link be more visible? It is hard to find it with google and co, if possible at all. Now all searches take to wiki.ushahidi.com