3 Replies Latest reply on Mar 19, 2014 11:32 AM by chrisbrown

    Using REST API to Move Content


      Is there a way to move content that is visible to all (i.e. does not have a parentPlace) to a parent place using REST?

        • Re: Using REST API to Move Content

          I haven't tried it via the REST API yet but you could try doing a PUT to update the content item and simply changing the visibility attribute as well as adding the parent place attribute (URL).

          • Re: Using REST API to Move Content

            I did this using Javascript and the '/content' REST API. I worked out what to do by using Firebug to inspect what network calls were being made when I used the Jive UI to move a document.


            var _documentTypeId="102";
              var _url = _jive_base_absolute_url + "/__services/v2/rest/content/" + _documentTypeId + "/" + id;
              // Convert object type and Build JSON data stream - e.g. [{"objectType":14,"objectID":2009}]
              var objectType = ''; // destination is a community space or group
              if(_toSpaceType == _COMMUNITY) {
              objectType = '14';
              else if(_toSpaceType == _GROUP) {
              objectType = '700';
              else {
              alert("unrecognised target space type : " + _toSpaceType);
              var _data = '{"objectType":' + objectType + ',"objectID":' + _toSpaceId + '}';
              var _success = true;
                type: "PUT",
                url: _url,
                data: _data,
                dataType: "json",
                contentType: "application/json",
                success: function(data) {
              // If the process fails, get the error, parse into JSON and then display the message
              error: function (jqxhr) {
              _success = false;


            You need to know the document and target space ids (they are not the same as the ids in the db tables - e.g. internalDocId !) - I used REST API calls to get these before I did the document move.

            1 person found this helpful