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
: an array of files to be processed with this query (see Files)commands
: an array of command to be run on the server (see Commands)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:
CellML
: force CellML comparison (do not try to detect file types)SBML
: force SBML comparison (do not try to detect file types)regular
: force simple XML comparison (do not try to detect file types)reactionsDot
: get the highlighted reaction network encoded in DOT language (see ReactionNetwork and DOT description)reactionsGraphml
: get the highlighted reaction network encoded in GraphML (see ReactionNetwork and GraphML description)reactionsJson
: get the highlighted reaction network encoded in JSON (see ReactionNetwork and JSON description)compHierarchyDot
: get the highlighted component hierarchy encoded in DOT language (see Component Hierarchy and DOT description)compHierarchyGraphml
: get the highlighted component hierarchy encoded in GraphML (see Component Hierarchy and GraphML description)compHierarchyJson
: get the highlighted component hierarchy encoded in JSON (see Component Hierarchy and JSON description)reportHtml
: get the difference report encoded in HTML (see HTML description)reportMd
: get the difference report encoded in !MarkDown (see MarkDown description)reportRST
: get the difference report encoded in !re/StructuredText (see report/ReStructuredText description)xmlDiff
: returns the delta encoded in XML (see Delta description)documentType
: get the document type of a model file, simple way to classify an XML document (see classification)meta
: get some meta data of a model (see meta data description)singleFlatten
: get the flattened document (write imported modules directly into the model)singleReactionsDot
: get the reaction network corresponding to the provided model encoded in DOT language (see ReactionNetwork and DOT description)singleReactionsGraphml
: get the reaction network corresponding to the provided model encoded in GraphML (see ReactionNetwork and GraphML description)singleReactionsJson
: get the reaction network corresponding to the provided model encoded in JSON (see ReactionNetwork and JSON description)singleCompHierarchyDot
: get the component hierarchy encoded in DOT language (see Component Hierarchy and DOT description)singleCompHierarchyGraphml
: get the component hierarchy encoded in GraphML (see Component Hierarchy and GraphML description)singleCompHierarchyJson
:get the component hierarchy encoded in JSON (see Component Hierarchy and JSON description)(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
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).
python -mjson.tool
to prettify the JSON result. feel free to drop that.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"
]
}' https://bives.bio.informatik.uni-rostock.de/ | python -mjson.tool
curl -d '{
"files":
[
"http://models.cellml.org/exposure/385475ef63ff3f2d42e3dcb52f3982d2/MainDVad.cellml"
],
"commands":
[
"CellML",
"singleFlatten"
]
}' https://bives.bio.informatik.uni-rostock.de/ | python -mjson.tool
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"
]
}' https://bives.bio.informatik.uni-rostock.de/ | python -mjson.tool
{
"error": [
"Error: cellml document does not define a model"
]
}