Creating posts
Create a new post with caption and media links.Post structure
A post consists of:postID(long) - Auto-generated unique identifierinitiatorID(long) - User who created the postcaption(string, max 800 chars) - Post caption textcreatedAt(DateTime) - Creation timestamplikeCount(int) - Number of likesisDeleted(bool) - Soft delete flagPostMediasLinks(array) - Array of media objects
Media types
Each media item has:mediaType- Either “Image” or “Video”mediaURL- Full URL to the media resource
404 Not Found- User does not exist409 Conflict- Cannot post on behalf of another user
Getting posts
Retrieve a specific post by ID with all associated data.404 Not Found- Post does not exist, is deleted, or blocked
Deleting posts
Soft delete a post. The post is marked as deleted but not removed from the database.isDeletedflag is set totrueDeletedAttimestamp is recorded- Post becomes invisible in feeds and queries
404 Not Found- Post does not exist409 Conflict- User does not own the post403 Forbidden- Post already deleted
Restoring deleted posts
Restore a soft-deleted post.isDeletedflag is set tofalseDeletedAtis set tonull- Post becomes visible again
Liking posts
Add a like to a post.- A
PostLikerecord is created with composite key(LikerID, PostID) - Post’s
likeCountis incremented - A like notification is sent to the post owner
404 Not Found- Post does not exist or blocked409 Conflict- Already liked this post
Unliking posts
Remove a like from a post. This operation uses a transactional delete to ensure atomicity.404 Not Found- Post does not exist or blocked409 Conflict- Post not currently liked
Commenting on posts
Add a comment to a post.- A
Commententity is created - Comment text is limited to 1000 characters
- A comment notification is sent to the post owner
commentID(long) - Unique identifierpostID(long) - Associated postcommenterID(long) - User who commentedcommentText(string, max 1000 chars) - Comment contentlikeCount(int) - Number of likes on the commentcreatedAt(DateTime) - Creation timestampisDeleted(bool) - Soft delete flag
404 Not Found- Post or user does not exist, or blocked
Deleting comments
Soft delete a comment.- Comment is marked as deleted
DeletedAttimestamp is set
404 Not Found- User does not exist or blocked409 Conflict- Comment does not exist
Saving posts
Save a post to your saved collection.- A
SavedPostrecord is created with composite key(SaverID, PostID) - Post is added to user’s saved collection
404 Not Found- Post does not exist or blocked409 Conflict- Post already saved
Unsaving posts
Remove a post from your saved collection.404 Not Found- Post does not exist or blocked409 Conflict- Post was not saved