9 Replies Latest reply on Aug 5, 2013 5:51 AM by roguen

    Does statusLevelDesc work for V3 REST API calls?

    roguen

      I'm trying to get a result of top participants.

      At this point I'm just trying to return the top members in the community (top 10)

      But while I get results, I can't seem get this sort to have an effect on my results

       

      Where $COMMUNITY is my community url:

      Trying

      $COMMUNITY/api/core/v3/people?sortKey=all~statusLevelAsc

      and

      $COMMUNITY/api/core/v3/people?statusLevelAsc

      Have I phrased these improperly?

       

      Looking at these docs:

      Jive REST API v3.0 → Person service

        • Re: Does statusLevelDesc work for V3 REST API calls?
          roguen

          Added info.

          This is the same on a cloud and 6.0 instance of the community.  Both native and bunchball/gamification score systems.

          • Re: Does statusLevelDesc work for V3 REST API calls?
            jketola

            The name of the parameter for this service is 'sort'.  So, it would be something like:

            $COMMUNITY/api/core/v3/people?sort=statusLevelDesc

            Unfortunately, although it is mentioned by the service as a supported sort, it doesn't appear to change the order.  The other sort orders do change the returned results:

            $COMMUNITY/api/core/v3/people?sort=firstNameAsc

            $COMMUNITY/api/core/v3/people?sort=lastNameAsc

            $COMMUNITY/api/core/v3/people?sort=dateJoinedDesc

            $COMMUNITY/api/core/v3/people?sort=dateJoinedAsc

            Note that for firstName and lastName, you can pass in Desc versions (e.g. "firstNameDesc" or "lastNameDesc"), but it still returns them in the ascending order.

              • Re: Does statusLevelDesc work for V3 REST API calls?
                roguen

                Thanks, close on this one, but does appear I'm still out of luck.  That's too bad.

                  • Re: Does statusLevelDesc work for V3 REST API calls?
                    roguen

                    Actually...looks like it's working....just not in THIS community.  There is something screwed up in the reputation/points system here. 

                    From what I can tell, the issue is bunchball gamification.

                     

                    In our cloud enviroment, which does not have gamification, the sorting works as expected. But try sorting in an enviroment that has a gamification module and you're out of luck.  This further appears to be why they've taken a sort by reputation out of the /people dropdown.

                     

                    The problem for the JC though is that the gamification reputation list also doesn't work.  This does not appear to be the case with other bunchball/gamification environments I've seen.

                     

                    That's really unfortunate because I was actually looking to build something pretty cool for the upcoming Jiveworld: a challenge for our users to contribute in the JC which would leverage an app and tile to render a leaderboard in our cloud instance.

                      • Re: Does statusLevelDesc work for V3 REST API calls?
                        jrlarson

                        The cloud also has a more recent version of the API.

                        On Aug 3, 2013 9:58 PM, "Roguen Keller" <

                          • Re: Does statusLevelDesc work for V3 REST API calls?
                            roguen

                            Do you have a link to more recent documentation that coincides with that "release"?  Does it even exist?

                             

                            More info on the bunchball calls that would need to take place for this to happen.  The nitro platform has been set up in a more secure manner and doesn't give out directory info as easily as out of the box jive.

                            The call for a leaderboard, as I might desire here, doesn't need to be "whitelisted" as they call it (whitelisted means that the calling server would need to be registered with the service, and some calls are set up in this way).  But it does require that I know

                            1. The server to call for these, for which info is hidden on the back end
                            2. A session key which it looks like I would procure by going through the admin console.

                             

                            That being said, I do have both of these things for our sandbox enviroment (where the gamification module is installed) and did make a test call though the admin console, but the return set was empty if I specified anything other than ALLTIME for duration.  This was a 6.0 enviroment, so appears it needs more work there.

                             

                            As for cloud version, the admin console is more simplified and does not offer direct login details which give me an expanded control menu (API call generation and testing which would also give me session key).

                             

                            So basically at this point it looks like a lot of roadblocks, even more if I'm looking to get data off of a community which I do not own/have admin access to.

                              • Re: Does statusLevelDesc work for V3 REST API calls?
                                roguen

                                Another side note:

                                Should I be able to get past these roadblocks, the api has been set up in such a way that I have very little to do past that point.

                                It allows for me to specify a start date for points (and accumulation from that point) as well as specify a list of usernames to include (not sure if this would need to be names which I can access or IDs, which I cannot).

                                Pretty cool to see that.

                                  • Re: Does statusLevelDesc work for V3 REST API calls?
                                    roguen

                                    The call I would need to make would look something like this:

                                    $COMMUNITY_BUNCHBALL_URL//nitro/xml?method=site%2EgetPointsLeaders&returnCount=10&tagsOperator=OR&withSurroundingUsers=false&pointCategory=Points&withRank=false&userIds=$USER_ID_1%2C%20$USER_ID_2&duration=ALLTIME&criteria=BALANCE&sessionKey=$SESSION_KEY&start=1375592400&preferences=&groupName=&asyncToken=JiveCommunityLeaderboard

                                    Where the source community supplied:

                                    • COMMUNITY_BUNCHBALL_URL
                                    • SESSION_KEY
                                    • USER_ID for each user in the filtered leaderboard (tags are also an option)