Skip to content

API: Post management

Implement a set of API endpoints to manage posts, including the ability to create, edit, delete, and retrieve posts.

Create Posts Endpoint:

  • Develop an API endpoint to allow users to create new posts.
  • Include parameters for post content
    • location name
    • trip duration
    • budget
    • actual spending
    • travel party
    • caption
    • daily plans

Edit Posts Endpoint:

  • Create an API endpoint for users to edit their existing posts.
  • Include parameters for post content
    • location name
    • trip duration
    • budget
    • actual spending
    • travel party
    • caption
    • daily plans
  • Implement authorization checks to ensure only the post owner can edit the content.

Delete Posts Endpoint:

  • Implement an API endpoint to allow users to delete their posts.
  • Ensure all data associated to post is deleted (comments, saves)
  • Delete by post ID

Retrieve Posts Endpoint:

  • Develop API endpoints for retrieving individual posts or a collection of posts.
  • Implement options for filtering, sorting, and paginating posts.
Edited by Bonnie Peng