0 Replies Latest reply on Sep 27, 2015 5:47 AM by nemesis03

    Merge two discussions through REST API

    nemesis03

      I already figured out how to move an answer from one discussion to another discussion (with all the child replies). Now I want to move the primary message of a discussion (the question) and append it to another discussion.

       

      For example:

      Message I want to move: https://host/api/core/v3/messages/496221

      This is the primary message in this discussion: https://host/api/core/v3/contents/383324

       

      I want to append the message to this discussion: https://host/api/core/v3/contents/383330

       

      Now I created a PUT request to https://host/api/core/v3/messages/496221

      with the following content:

      "content" : {

          "text" : "<body><!-- [DocumentBodyStart:cd3d9b88-4402-4596-829b-e1aa5d8e6eb1] --><div class=\"jive-rendered-content\"><p>Dies ist ein Testthread</p></div><!-- [DocumentBodyEnd:cd3d9b88-4402-4596-829b-e1aa5d8e6eb1] --></body>",

          "editable" : false,

          "type" : "text/html"

        },

      "parent" : "https://host/api/core/v3/contents/383330",

        "subject" : "Testthread"

      }

      There is no error message, but the message is not moved. In the returned object there is no parent parameter. But there is a discussion parameter which is unchanged.

       

      Edit:

      When I send the same PUT request to https://host/api/core/v3/contents/383324

      I receive an error 400 Bad Request

      {

        "error" : {

          "code" : "placeInvalidURI",

          "message" : "Illegal place URI https://host/api/core/v3/contents/383330",

          "status" : 400

        }

      }