Create a flow and trigger API endpoints

80 views
Skip to first unread message

Greg Lee

unread,
Mar 21, 2017, 4:23:50 PM3/21/17
to rapidpro-dev
Hi there RapidPro devs!  Nic recommended that I send enquires here so the community can benefit.  I'm looking at using RapidPro in conjunction with IST Research's current survey system and hoping I can get some advice.

We're taking a look at different approaches to integrate with RapidPro.  One of the ways that seems most attractive is to have IST's system create flows, configure the trigger, run the campaign in RapidPro and then extract the data from RapidPro into IST's visualization system.

We're looking at the RP API and it looks like there are no interfaces to create flows, create triggers or to extract data from the system.  I'm not too worried about the data extract since it looks like plenty of you are extracting data directly from the RP DB, but the lack of a create flow and trigger API has me a little worried.  Is this something that is hard to do, perhaps because they are tightly bound to the UI, or is the lack of APIs really because there has been no motive to do this before?  Before we take off on this approach I want to be sure we're not doing something that really isn't a good idea!  :-)

What do you think, should it be possible to build create flow and create trigger endpoints in a reasonable amount of time?

Thanks,
Greg


This e-mail and any files transmitted with it may be proprietary and are intended solely for the use of the individual or entity to whom they are addressed. If you have received this e-mail in error please notify the sender. Please note that any views or opinions presented in this e-mail are solely those of the author and do not necessarily represent those of IST Research. The recipient should check this e-mail and any attachments for the presence of viruses. IST Research accepts no liability for any damage caused by any virus transmitted by this e-mail.

Rowan Seymour

unread,
Mar 22, 2017, 2:53:16 AM3/22/17
to Greg Lee, rapidpro-dev
Hi Greg

Creating and listing triggers over the API seems like it would be fairly simple to add and would likely exist if anyone had needed it before. 

You can extract your raw flow runs using the runs endpoint in API v2, and then perform whatever aggregation/visualisation you need. We don't provide API access to aggregate data because requirements for this tend to be very implementation specific, e.g. an org will want to disaggregate everything over a particular contact field over a particular reporting period. 

Creating flows over the API briefly existed as an undocumented endpoint in API v1 but wasn't carried over to API v2. The main concern is that the flow definition spec changes a lot faster than API versions, but I think we'd be open to adding that again if there's a clear usecase.

-Rowan

--
You received this message because you are subscribed to the Google Groups "rapidpro-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rapidpro-dev+unsubscribe@googlegroups.com.
To post to this group, send email to rapidp...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rapidpro-dev/3d8cda91-5754-413a-ba7c-8c25d91a7060%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Rowan Seymour | +260 964153686 | @rowanseymour

Greg Lee

unread,
Mar 22, 2017, 9:58:57 AM3/22/17
to rapidpro-dev, greg...@istresearch.com, Pasha Paterson
Rowan, thanks for pointing out the runs endpoint, I had missed it!

The usecase that I have for a create flow endpoint is that I have a system that already supports some other communication modes and I want to connect it to RapidPro so that my system can convert what we call surveys into RP flows, load it into RP, configure a trigger and then wait for results from RP on the runs endpoint.

Let me know if that is not clear and I can fill in the details.

Thanks,
Greg


On Wednesday, March 22, 2017 at 2:53:16 AM UTC-4, Rowan Seymour wrote:
Hi Greg

Creating and listing triggers over the API seems like it would be fairly simple to add and would likely exist if anyone had needed it before. 

You can extract your raw flow runs using the runs endpoint in API v2, and then perform whatever aggregation/visualisation you need. We don't provide API access to aggregate data because requirements for this tend to be very implementation specific, e.g. an org will want to disaggregate everything over a particular contact field over a particular reporting period. 

Creating flows over the API briefly existed as an undocumented endpoint in API v1 but wasn't carried over to API v2. The main concern is that the flow definition spec changes a lot faster than API versions, but I think we'd be open to adding that again if there's a clear usecase.

-Rowan
On 21 March 2017 at 22:21, Greg Lee <greg...@istresearch.com> wrote:
Hi there RapidPro devs!  Nic recommended that I send enquires here so the community can benefit.  I'm looking at using RapidPro in conjunction with IST Research's current survey system and hoping I can get some advice.

We're taking a look at different approaches to integrate with RapidPro.  One of the ways that seems most attractive is to have IST's system create flows, configure the trigger, run the campaign in RapidPro and then extract the data from RapidPro into IST's visualization system.

We're looking at the RP API and it looks like there are no interfaces to create flows, create triggers or to extract data from the system.  I'm not too worried about the data extract since it looks like plenty of you are extracting data directly from the RP DB, but the lack of a create flow and trigger API has me a little worried.  Is this something that is hard to do, perhaps because they are tightly bound to the UI, or is the lack of APIs really because there has been no motive to do this before?  Before we take off on this approach I want to be sure we're not doing something that really isn't a good idea!  :-)

What do you think, should it be possible to build create flow and create trigger endpoints in a reasonable amount of time?

Thanks,
Greg


This e-mail and any files transmitted with it may be proprietary and are intended solely for the use of the individual or entity to whom they are addressed. If you have received this e-mail in error please notify the sender. Please note that any views or opinions presented in this e-mail are solely those of the author and do not necessarily represent those of IST Research. The recipient should check this e-mail and any attachments for the presence of viruses. IST Research accepts no liability for any damage caused by any virus transmitted by this e-mail.

--
You received this message because you are subscribed to the Google Groups "rapidpro-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rapidpro-dev...@googlegroups.com.

To post to this group, send email to rapidp...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rapidpro-dev/3d8cda91-5754-413a-ba7c-8c25d91a7060%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Rowan Seymour | +260 964153686 | @rowanseymour
Reply all
Reply to author
Forward
0 new messages