3 Replies Latest reply on Nov 24, 2014 12:11 AM by samarth.shekhar02

    Getting Project Owned by user using Rest Api

    samarth.shekhar02

      Hi,

       

      I am running into an issue where I want to retrieve all the projects owned by user in Jive 7.

      I am using the following approach:

      Using the following URL" places?filter=type(project)&count=100&startIndex=0" i am finding all the project in the instance and then try to find who is the owner of the project.

      By this approach i have to iterate through 4600+ project to find owned Project and this is taking time of around 5 minutes which is not ideal.

      Also we is there any way we can retrieve more than 100 Records at a time using rest API? I found that we can only fetch 100 record max for any call.

      Is there any other API/Approach using which i can find out the projects of which a user is owner of?

       

      CC: Lea Reznik

       

      Thanks,

      Samarth Shekhar

        • Re: Getting Project Owned by user using Rest Api
          Ryan Rutan

          Samarth,

           

          You may be able to try this,

          /api/core/v3/places?filter=type(group)&filter=relationship(owner)

          but I cant confirm if this will work.  This may in fact be a gap in the API, as I cannot find anything in the docs that explicitly state it, so I'll raise this internally.

           

          Hope this helps, but I'll try to escalate internally to see if I can find something out on this one.

           

          Wish I had a more solid answer for you at the moment.

            • Re: Getting Project Owned by user using Rest Api
              xsingy

              actually the same gap exists in the UI: there is no way to list all the projects that you own. Only places you own or places your follow. It is probably due to the fact that you cannot be a member of the project - only a follower. For a group you are a member with a specific role (Administrator). For a project, the owner seems to be an attribute of the project itself.

              • Re: Getting Project Owned by user using Rest Api
                samarth.shekhar02

                Hi Ryan Rutan,

                 

                The URL /api/core/v3/places?filter=type(group)&filter=relationship(owner) gives me the groups of which i am owner of but does not hold good for Project.

                I think this should be one of the thing that should be exposed by jive because we don't have any way otherwise to get all the project i am an owner of.

                It would be really nice to see this API in future releases.


                Thanks,

                Samarth Shekhar