cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Announcements
668
Views
5
Helpful
2
Replies
salim.guerid
Contributor

CMS API > Get Users Owned coSpaces

Hi,

Reading the API guide v2.2, I do not see any robust way to query the list of coSpaces associated with a particular user. I can use: /users/<userJid>/usercoSpaces to retrieve the personal space of the user but I miss an API command such as: /users/<userrJid>/userOwnedcoSpaces which will return a list including all coSpaces where <owerJid> = <userJid>. 

I can obviously use: /coSpaces?filter=<SearchPattern> but it will not be really robust.

Am I am missing something or is it something to consider for future release of the API?

Any clue @Zoltan Kelemen or @Jaime Valencia?

2 REPLIES 2
Zoltan Kelemen
Cisco Employee

Hi Salim,

GET method performed on a “/users/<user ID>/usercoSpaces” node retrieves the coSpaces
that the user is a member of.

If you need the spaces the user owns, I suggest writing a script to loop through the above (or all coSpaces) to see where the user you are looking for is owner.

Filtering is unlikely to be useful at all in a generic situation.

Cheers,
Zoltan

Thanks for your answer.

Don't you think that it should be proposed to the API team as a feature request? Too me, it seems fairly logical that an instructions allows you to retrieve all owned space from a specific user.

You are right regarding the use of "/users/<user ID>/usercoSpaces". Do you know if there is a way to get the personal CoSpace associated with a user?

Create
Recognize Your Peers
Content for Community-Ad