Skip to content

Backend API Post

alexbali edited this page Mar 2, 2021 · 9 revisions

Post

GET Requests: URL: ://service/author/{AUTHOR_ID}/posts/{POST_ID} will get you the post of that author with the 5 most recent comments

POST Requests: URL: ://service/author/{AUTHOR_ID}/posts/{POST_ID=null} will create the post for that author. POST Body: { "title": "second post", "description": "description of the second post -> caruso is the goat", "categories": "fitness, travel, compsci", "content": "long detailed content of the post", "origin": "local host:9900" }

PUT Requests: URL: ://service/author/{AUTHOR_ID}/posts/{POST_ID} PUT Body: { { "title": "goat post", "description": "Caruso is the goat", "categories": "fitness, travel, compsci", "content": "first post with new API", "origin": "local host:9900", "visibility": PUBLIC "shared_with": "" } } DELETE Requests: URL: ://service/author/{AUTHOR_ID}/posts/{POST_ID} -> this will delete the post with the id you provided.


Clone this wiki locally