diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/js-new/openbis.js b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/js-new/openbis.js
index 71775249221b3e442cd644e20a950f9b7f60acbd..39d57abfa9782901d3cf9bdf039593dc5ce72332 100644
--- a/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/js-new/openbis.js
+++ b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/js-new/openbis.js
@@ -1522,6 +1522,46 @@ openbis.prototype.getValidationScriptForDataStore = function(dataSetTypeOrNull,
 	});
 }
 
+/**
+ * Get a url that will produce a graph with the given configuration.
+ *
+ * @method
+ */
+openbis.prototype.getGraphUrl = function(graphconfig, dataStoreCodeOrNull, action) {
+	function dssUrlAction = function(dssUrl) {
+		var graphUrl = dssUrl + "/graphservice/";
+		graphUrl += "?sessionID=" + context.getSessionId();
+		for (prop in graphconfig) {
+			graphUrl += "&" + prop + "=" + encodeURIComponent(graphconfig[prop]);
+		}
+		action(graphUrl);
+	}
+	this._internal.getDataStoreUrlForDataStoreCode(dataStoreCodeOrNull, dssUrlAction);
+}
+
+/**
+ * =====================
+ * OpenBIS graph config
+ * =====================
+ * 
+ * Defines the configuration for a graph generated by the server's graphservice.
+ * 
+ * To use, set properties on the object with keys that match the name of the servlet
+ * parameters of the graphservice and then call the method getGraphUrl on the openbis
+ * object. Do *not* set the sessionID paramter -- this will be filled in by the openbis 
+ * object.
+ *
+ * The graphservice is documented here: https://wiki-bsse.ethz.ch/display/openBISDoc/Configuring+Graphs+and+Plots
+ * 
+ * @class
+ * 
+ */
+function openbisGraphConfig(filename, graphtype, title) {
+	this.file = filename;
+	this["graph-type"] =  graphtype;
+	this.title = title;
+}
+
 
 /**
  * =====================================================