Getting public groups only



  • We are currently setting up a system that allows a user to browse groups. However, we only want to list public groups, so there isn't a need to retrieve private groups to display.

    We are using the ListGroupsPage call and trying to pass in searchCriteria as the following

    {
      "context": {
        "pagination": {
          "rowsPerPage": 50,
          "pageNumber": 1
        },
        "searchCriteria": {
          "groupType": "groupType",
          "isOpenGroup": true
        },
        "sortCriteria": {
          "createdAt": 1,
          "updatedAt": -1
        }
      }
    }
    

    However, this throws the error

    {
      "status_message": "Processing exception (message): Search field name isOpenGroup is invalid or cannot be accessed. Use data.property to access custom fields.",
      "reason_code": 40349,
      "status": 202
    }
    

    Are we just missing a way to get the public groups only? Thanks!


  • brainCloud

    Hi Chris,

    I have bad news and good news.

    The bad news is that in brainCloud 4.0, the "isOpenGroup" isn't whitelisted for searching purposes (which is why you are getting that error).

    The good news is that it is in brainCloud 4.1 - which is due to be released in about a week - so hold tight, it's coming soon!

    Paul.



  • Thanks @Paul-Winterhalder ,

    We'll program a work around for now until brainCloud 4.1 is released.


  • brainCloud

    D'oh - bit late on the update, but 4.1 has been released, and you can now search on isOpenGroup (as well as the new groupSummaryData).

    4.1 Release notes here - https://getbraincloud.com/apidocs/release-4-1/

    Cheers!

    Paul.


Log in to reply