Flowdock

Expand all | Collapse all

Is there a REST API for updating custom groups?

Jump to Best Answer
  • 1.  Is there a REST API for updating custom groups?

    Posted 10-15-2018 04:15 AM

    First of all, I love the idea of custom groups. We are currently not using them actively, because it is effortful to keep them up to date.

     

    I am trying to explore options of automating custom group membership (e.g. to allow pinging only people who are in two specific channels, or only people who are currently in the office). 

     

    The REST API documentation on Flows does not mention custom groups. Am I missing something, or is this currently not possible?



  • 2.  Re: Is there a REST API for updating custom groups?

    Posted 10-15-2018 05:15 AM

    Sebastian,

     

    Custom groups are a relatively new feature.  I am checking with the Engineering Team to find out if an API Endpoint was included in the work when this feature was created.  I will let you know when I hear back from the Engineering Team.

     

    Michael



  • 3.  Re: Is there a REST API for updating custom groups?
    Best Answer

    Posted 10-15-2018 08:07 AM

    Sebastian,

     

    Good news!  I heard from the Engineering Team and here are the endpoints:

     

    To get all flow groups:
    GET /flows/{{org_name}}/{{flow_name}}/flow_groups

    To create a group:
    POST /flows/{{org_name}}/{{flow_name}}/flow_groups
    {"handle":"{{group_name}}"}

    To add members to the group - comma separated user ids as payload:
    POST /flows/{{org_name}}/{{flow_name}}/flow_groups/{{group_id}}/add_members
    {"members":"10"}

    To remove members from the group - comma separated user ids as payload:
    POST /flows/{{org_name}}/{{flow_name}}/flow_groups/{{group_id}}/remove_members
    {"members":"10"}

    To delete a group:
    DELETE /flows/{{org_name}}/{{flow_name}}/flow_groups/{{group_id}}

     

    I'll ask them to update the Help Documents with this information as well.

     

    Michael



  • 4.  Re: Is there a REST API for updating custom groups?

    Posted 10-15-2018 08:13 AM

    Really cool stuff! Thank you for the quick reply. That was exactly what I was looking for

     

    Is there also a way to delete groups or remove users?



  • 5.  Re: Is there a REST API for updating custom groups?

    Posted 10-15-2018 08:20 AM

    I updated with the remove users piece.  Let me check on Deleting an entire group.

     

    Michael



  • 6.  Re: Is there a REST API for updating custom groups?

    Posted 10-15-2018 08:23 AM

    Sebastian,

     

    OK, updated with the whole cycle.

     

    Michael