BiVeS-WS

the BiVeS web service

View the Project on GitHub

Usage of the BiVeS Web Service

The BiVeS Web Service expects JSON object sent as a HTTP Post query. This JSON object needs to have the following entries:

files

Models to be processed using BiVeS are supplied in the files array of the JSON object. Each element my be a link to the model accessible for the web service or plain XML code (in that case the model must not contain imports).

There are two operation modes:

see also sample queries

commands

The commands array contains commands to be executed on the web server. These commands can be divided into the two operation modes of BiVeS:

(list as of version 1.2.3, to get a more up-to-date list of available commands send a GET request to the web service, i.e. access the web service using your web browser)

see also sample queries

Result

As a result the web service returns a JSON object which contains an entry for each command holding the result of it. The key of this entry equals the command you sent to the web service. That means if you send a request such as

#!js
{
	"files": [...],
	"commands":
	[
		...
		"compHierarchyJson",
		...
	]
}

you will receive an object like:

#!js
{
    ...
    "compHierarchyJson": "...",
    ...
}

There is a special key error that contains errors which occurred during processing of your request (see for example Send an invalid request).

Sample Queries

Get the HTML report and the reaction network after comparing two files

curl -d '{
	"files":
	[
		"http://budhat.sems.uni-rostock.de/download?downloadModel=24",
		"http://budhat.sems.uni-rostock.de/download?downloadModel=25"
	],
	"commands":
	[
		"SBML",
		"reactionsDot",
		"reportHtml"
	]
}' http://bives.sems.uni-rostock.de/bives/ | python -mjson.tool

Flatten a CellML model

curl -d '{
	"files":
	[
		"http://models.cellml.org/exposure/385475ef63ff3f2d42e3dcb52f3982d2/MainDVad.cellml"
	],
	"commands":
	[
		"CellML",
		"singleFlatten"
	]
}' http://bives.sems.uni-rostock.de/bives/ | python -mjson.tool

Send an invalid request

curl -d '{
	"files":
	[
		"http://budhat.sems.uni-rostock.de/download?downloadModel=24",
		"http://budhat.sems.uni-rostock.de/download?downloadModel=25"
	],
	"commands":
	[
		"CellML",
		"compHierarchyJson",
		"reportHtml"
	]
}' http://bives.sems.uni-rostock.de/bives/ | python -mjson.tool
{
    "error": [
        "Error: cellml document does not define a model"
    ]
}