Conversion between systems biology network formats, export of a network to a graphical format, and merging
of several maps into one. These endpoints operate on uploaded files only - they never touch projects stored
on the server.
The endpoints are served from /new_api/converter.
All of them are POST requests with a multipart/form-data body: the file itself plus the parameters
describing the formats. Conversion is synchronous, so the result is returned in the response rather than
through a job. The upload is limited to 5MB.
The uploaded file can also be a .zip archive. For conversion of a single map the archive must contain
exactly one file; files added by the operating system when the archive was created (__MACOSX entries,
.DS_Store) are ignored. Merging always expects an archive, see Merge maps.
The available format names are listed in References.
Conversion of maps that are already stored in a project is done through Project Maps Download instead.
1. Convert a map to another format
Converts an uploaded map from one model format into another. The response is the converted file, named after the output format.
1.1. HTTP request
POST /minerva/new_api/converter:convert_map HTTP/1.1
1.2. Request Parts
| Part | Description |
|---|---|
|
content of the map that should be converted |
|
format of the uploaded file (one of: CELL_DESIGNER, SBGN_ML, SBML, GPML) |
|
format of the result (one of: CELL_DESIGNER, SBGN_ML, SBML, GPML) |
1.3. CURL sample
$ curl 'https://minerva-dev.lcsb.uni.lu/minerva/new_api/converter:convert_map' -X POST \
-F 'inputFormat=CELL_DESIGNER' \
-F 'outputFormat=SBML' \
-F 'file=@sample-cd.xml;type=application/xml'
1.4. Request Parts with a zip archive
| Part | Description |
|---|---|
|
zip archive containing the map that should be converted |
|
format of the map inside the archive (one of: CELL_DESIGNER, SBGN_ML, SBML, GPML) |
|
format of the result (one of: CELL_DESIGNER, SBGN_ML, SBML, GPML) |
1.5. CURL sample with a zip archive
$ curl 'https://minerva-dev.lcsb.uni.lu/minerva/new_api/converter:convert_map' -X POST \
-F 'inputFormat=CELL_DESIGNER' \
-F 'outputFormat=SBML' \
-F 'file=@sample-cd.zip;type=application/zip'
1.6. HTTP response
HTTP/1.1 200 OK
2. Convert a map to an image
Renders an uploaded map into a graphical format. The image is generated for the whole map; there are no scaling or region parameters.
2.1. HTTP request
POST /minerva/new_api/converter:convert_map_to_image HTTP/1.1
2.2. Request Parts
| Part | Description |
|---|---|
|
content of the map that should be converted |
|
format of the uploaded file (one of: CELL_DESIGNER, SBGN_ML, SBML, GPML) |
|
format of the generated image (one of: PDF_GENERATOR, PNG_GENERATOR, SVG_GENERATOR) |
2.3. CURL sample
$ curl 'https://minerva-dev.lcsb.uni.lu/minerva/new_api/converter:convert_map_to_image' -X POST \
-F 'inputFormat=CELL_DESIGNER' \
-F 'imageFormat=SVG_GENERATOR' \
-F 'file=@sample-cd.xml;type=application/xml'
2.4. HTTP response
HTTP/1.1 200 OK
3. Merge maps
Merges all maps found in the maps/ directory of an uploaded zip archive into a single map. The maps are
merged in alphabetical order of their file names, and all of them must be in the same input format.
3.1. HTTP request
POST /minerva/new_api/converter:merge_maps HTTP/1.1
3.2. Request Parts
| Part | Description |
|---|---|
|
zip archive with the maps to merge in the |
|
format of the maps in the archive (one of: CELL_DESIGNER, SBGN_ML, SBML, GPML) |
|
format of the result (one of: CELL_DESIGNER, SBGN_ML, SBML, GPML) |
|
when true, notes of the merged elements are preserved (false by default) |
|
when true, the result is returned as a zip archive (false by default) |
3.3. CURL sample
$ curl 'https://minerva-dev.lcsb.uni.lu/minerva/new_api/converter:merge_maps' -X POST \
-F 'inputFormat=CELL_DESIGNER' \
-F 'outputFormat=CELL_DESIGNER' \
-F 'file=@cd-maps.zip;type=application/zip'
3.4. HTTP response
HTTP/1.1 200 OK