Ocean West Posted January 16, 2022 Share Posted January 16, 2022 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 More sharing options...
Daniel F Posted January 16, 2022 Share Posted January 16, 2022 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 More sharing options...
Ocean West Posted January 17, 2022 Author Share Posted January 17, 2022 hmm. ok where is the tutorial for creating web hooks? Link to comment Share on other sites More sharing options...
Daniel F Posted January 18, 2022 Share Posted January 18, 2022 21 hours ago, Ocean West said: hmm. ok where is the tutorial for creating web hooks? Right now you're only able to create programatically ( see applications/core/api/webhooks.php for an example ), but starting with 4.6.10 there's now also an UI to manage webhooks. SeNioR- 1 Link to comment Share on other sites More sharing options...
Rikki Posted January 18, 2022 Share Posted January 18, 2022 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. Daniel F and SeNioR- 1 1 Link to comment Share on other sites More sharing options...
Ocean West Posted January 18, 2022 Author Share Posted January 18, 2022 so I guess, the answer to my next question is: When it's ready™ 🤣 Link to comment Share on other sites More sharing options...
Daniel F Posted January 18, 2022 Share Posted January 18, 2022 4 minutes ago, Ocean West said: so I guess, the answer to my next question is: When it's ready™ 🤣 Link to comment Share on other sites More sharing options...
Recommended Posts