Question

API joins

  • 6 March 2018
  • 3 replies
  • 81 views

Userlevel 4
Badge +2
  • Ready to inSpire others
  • 19 replies
Page 13 of the api documentation shows some examples of joins... is there a list anywhere of what joins we can use? For example, I want a threads started by people with a specific role... what do I join threads to?

3 replies

Userlevel 3
Hey Lorna,

Unfortunately we do not have a list of all the possible joints. And there is no joint supported for the use case you are mentioning either: " threads started by people with a specific role".

What you can do is:
  • First join User object with Roles (with[0]=roles), and then filter the users in your own script with a specific role
  • Once you have a list of users with a that role, you can retrieve the topics for those users by GET /threads call combined with filters.
I am mentioning @christophrooms here, since he is working on the new API and this might be an interesting point for him to consider.
Userlevel 4
Badge +2
Hey @Maryam
Thanks for that. I'm getting all sorts of confused here 🙄 What I basically want to know is how many posts we have from super users per month.

I retrieved all the users with roles joined and when I look through it for our super user role I don't find anything...

I also thought maybe I could bypass that part altogether and just show how many 'private' posts we have - so posts in our special access boards. Can I filter posts by multiple board IDs?
Userlevel 3
It is possible to filter topics based on forumid but not posts.
If you need to filter posts then first you need to get topic id's of all the topic in that specific forum and then filter posts based on the those topic id's.

Concerning the user role, I am not sure what call you are using. Can you email the complete call and the response you are getting to support@insided.com? Since this is more debugging, I think this thread is not the best place.

Reply