Jump to content

API vs Webhooks


Ocean West

Recommended Posts

I was playing with the RestAPI, it seems to me that the put of data seems fine as you are adding a single item like a topic or post. 

However the GETs are kind of limited and each GET doesn't include parameters for other ID's other than their own.

Case in point I wanted to GET all the recent topics from all the forums either all within a particular category or by providing some array. - no joy there.

Will the RESTAPI be getting more endpoints or will we convert to some kind of web hooks with publish and subscribe abilities?

 

 

Link to comment
Share on other sites

36 minutes ago, Ocean West said:

Case in point I wanted to GET all the recent topics from all the forums either all within a particular category or by providing some array. - no joy there.

Which endpoint did you use? You could either use the forums/topics or core/search endpoint for this.


 

36 minutes ago, Ocean West said:

Will the RESTAPI be getting more endpoints or will we convert to some kind of web hooks with publish and subscribe abilities?

Webhooks support this already, BUT I don’t think that they would make you happy in regards to your previous question, bedusle webhooks are used to notify other apps/services about a specific event which happened just now. So an example:

you’ll want to use the REST API to retrieve the recent X topics, files or members by either sending a manual request or polling the data frequently,  but you’ll want to use webhooks to get an instant notification which is triggered by your community. 
This also means, that the webhook request also contains ONLY the one object (*) which triggered the event, like the topic and not the last x topics! 

* there are of course also some cases where’s more then only the item in a hooks payload.

For example the calendarEvent_rsvp webhook will contain the event, the attendee member object and the new state as payload.

 

Link to comment
Share on other sites

On 1/16/2022 at 1:30 PM, Ocean West said:

I was playing with the RestAPI, it seems to me that the put of data seems fine as you are adding a single item like a topic or post. 

However the GETs are kind of limited and each GET doesn't include parameters for other ID's other than their own.

Case in point I wanted to GET all the recent topics from all the forums either all within a particular category or by providing some array. - no joy there.

Will the RESTAPI be getting more endpoints or will we convert to some kind of web hooks with publish and subscribe abilities?

 

 

At some point we will be making the GraphQL API available for general-purpose use, and that would likely suit your usecase better. Keep an eye out for news of that in due course.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...