aboutsummaryrefslogtreecommitdiff
path: root/API.md
diff options
context:
space:
mode:
authorrr-2016-10-21 21:48:08 +0200
committerrr-2016-10-21 21:48:38 +0200
commit9d6a0e0173831a6284be89cf71c1e627b4d8c0c9 (patch)
treeccd1c651370c974d1a50e6d605bdd54acda6f860 /API.md
parent85d6934ae9fcc0b660433d9094b6cd63824d2409 (diff)
server/posts: add post merging
Diffstat (limited to 'API.md')
-rw-r--r--API.md35
1 files changed, 35 insertions, 0 deletions
diff --git a/API.md b/API.md
index 27d4de7..53fec51 100644
--- a/API.md
+++ b/API.md
@@ -36,6 +36,7 @@
- [Updating post](#updating-post)
- [Getting post](#getting-post)
- [Deleting post](#deleting-post)
+ - [Merging posts](#merging-posts)
- [Rating post](#rating-post)
- [Adding post to favorites](#adding-post-to-favorites)
- [Removing post from favorites](#removing-post-from-favorites)
@@ -910,6 +911,40 @@ data.
Deletes existing post. Related posts and tags are kept.
+## Merging posts
+- **Request**
+
+ `POST /post-merge/`
+
+- **Input**
+
+ ```json5
+ {
+ "removeVersion": <source-post-version>,
+ "remove": <source-post-id>,
+ "mergeToVersion": <target-post-version>,
+ "mergeTo": <target-post-id>
+ }
+ ```
+
+- **Output**
+
+ A [post resource](#post) containing the merged post.
+
+- **Errors**
+
+ - the version of either post is outdated
+ - the source or target post does not exist
+ - the source post is the same as the target post
+ - privileges are too low
+
+- **Description**
+
+ Removes source post and merges all of its tags, relations, scores,
+ favorites and comments to the target post. Source post properties such as
+ its content, safety, source, whether to loop the video and other scalar
+ values do not get transferred and are discarded.
+
## Rating post
- **Request**

© 2015 - 2026 Jakob L. Kreuze