-
Notifications
You must be signed in to change notification settings - Fork 1
Posts
Endpoint for handling posts.
| Command | Method | Route | Description |
|---|---|---|---|
| Create | POST | /{culture}/api/Posts | Adds a new post. |
Call to this API method will result in the creation of a new post according to the arguments passed in the request body. The format of the arguments in the request body is JSON.
Request body will be in the following format:
{
"id": <guid>,
"discussionId": <guid>,
"body": <string>
}
The response to this call will return id of newly created post:
{
<guid>
}
| Update | Method | Route | Description |
|---|---|---|---|
| Details | PUT | /{culture}/api/Posts/{id} | Updates an existing post selected by id. |
Call to this API method will result in the updating a post with selected id. Arguments are passed in the request body. The format of the arguments in the request body is JSON.
Request body will be in the following format:
{
"id": <guid>,
"body": <string>,
}
The response to this call will return status code 204 if a post was edited correctly.
| Command | Method | Route | Description |
|---|---|---|---|
| Delete | DELETE | /{culture}/api/Posts/{id} | Deletes a post with selected id. |
Call to this API method will result in deleting a post with selected id. The response to this call will return status code 204 if a post was deleted correctly.
| Command | Method | Route | Description |
|---|---|---|---|
| Pin | PUT | /{culture}/api/Posts/{id}/pin | Pins an existing post selected by id. |
Call to this API method will result in pinning a post with selected id. The response to this call will return status code 204 if a post was pinned correctly.
| Command | Method | Route | Description |
|---|---|---|---|
| Unpin | PUT | /{culture}/api/Posts/{id}/unpin | Unpins an existing post selected by id. |
Call to this API method will result in unpinning a post with selected id. The response to this call will return status code 204 if a post was unpinned correctly.