code: function(callback){
      var self = this;      
      this.apiclient.put(
        this.replaceId('/api/1/diagrams/:diagram/nodes'),
        'action=arrange',
        {},
        function(err, body){
          if(err)
            return callback(new Error('failed to rearrange diagram: ' + err.message));
          var api_nodes = [];
          body.forEach(function(node_resource){
            api_nodes.push(new CoggleApiNode(self, node_resource));
          });
          return callback(false, api_nodes);
        }
      );
    }
docs: !jsjsdoc
  
  doc.CoggleApiDiagram.arrange = {
  $brief: "Rearrange the nodes in this diagram. Use with care!",
  $detail:
  "This function performs a server-side re-arrangement of all of the "+
  "items in the diagram. It will attempt to make sure no items overlap, "+
  "and to space things out evenly, it is **not** guaranteed to produce "+
  "the same result when called with the same parameters. "+
  "\n\n"+
  "Use of this function is generally discouraged, for the same reason that "+
  "an auto-arrange function isn't provided in the web interface to "+
  "Coggle: the placement of items can convey meaning, and if your program "+
  "understands relationships in the data (such as a natural ordering, or "+
  "that some sibling branches are more closely associated than others), "+
  "then you should make use of that information to perform a custom "+
  "layout.",
  $parameters: {
  callback: {
  $type: "Function",
  $brief: "Callback accepting (Error, [Array of CoggleApiNode])",
  }
  }
  };