Missing apis and repeated urls in Lern Discussion API documentation? #22
Replies: 2 comments
-
I guess the multiple APIs that have the same URL will have a different http method (POST, PUT, DELETE)... that is enough to differentiate the APIs. Adding @reshmi-nair and @vinukumar-vs for sharing the complete details and on all questions. |
Beta Was this translation helpful? Give feedback.
-
@joffinjoy All the endpoints of Post, Category & Topic will follow the same approach. To make it consistent & easy integration with NodeBB library(Discussion forum core library used at backend) we followed this approach. So for Create, Update & Delete will use the same end-point with different HTTP methods. This is good enough to identify to call the upstream API(NodeBB at present). Discussion-Middleware routes: https://github.com/Sunbird-Lern/discussions-middleware/blob/main/routes/nodebb.js |
Beta Was this translation helpful? Give feedback.
-
@maheshkumargangula @vrayulu @pramodkvarma
With reference to https://lern.sunbird.org/learn/product-and-developer-guide/discussion-forum/api-documentation/post-apis,
It seems like the "post creation api" is missing and, "Edits a post by post ID" and "Delete a post by postID" APIs seems to have the same endpoint URLs.
And what is the difference between "Delete a post by postID" and "Deletes a post" APIs? The latter seems to be sharing the same endpoint URL as "Restores a post" with nothing to differentiate between them in the parameters. Are they differentiated purely by which HTTP method is used?
And where is the "reply to post" APIs documented?
cc: @aks30, @vijiurs, @kiranharidas187 @aishwaryashikshalokam, @priyanka-TL, @VISHNUDAS-tunerlabs, @Shakthieshwari, @Prateek-slokam, @MeghnaSL, @joffinjoy, @githubpiyush
Beta Was this translation helpful? Give feedback.
All reactions