Products of a reaction, served from /new_api/projects/{projectId}/maps/{mapId}/bio_entities/reactions/{reactionId}/products.
Every product points at an element of the map; the element it points at can be read and
replaced through its element sub-resource.
1. Product element
The map element that the product points at.
See full documentation.
2. List products
Returns a page of products of the reaction.
|
Note
|
The result is paged - use the page and size query parameters to
walk through it.
|
2.1. HTTP request
GET /minerva/new_api/projects/test_project/maps/342/bio_entities/reactions/155/products/ HTTP/1.1
2.2. Path Parameters
| Parameter | Description |
|---|---|
|
project identifier |
|
map identifier |
|
reaction identifier |
2.3. Query Parameters
| Parameter | Description |
|---|---|
|
index of the page to fetch, counted from 0; 0 by default |
|
number of entries on a page; 20 by default, 10000 at most |
2.4. CURL sample
$ curl 'https://minerva-dev.lcsb.uni.lu/minerva/new_api/projects/test_project/maps/342/bio_entities/reactions/155/products/' -X GET \
-H 'Authorization: Bearer xxxxxxxx'
2.5. HTTP response
HTTP/1.1 200 OK
2.6. Sample Response
{
"content" : [ {
"id" : 1079,
"line" : {
"id" : 1389,
"width" : 1.0,
"color" : "#000000ff",
"z" : 0,
"segments" : [ {
"x1" : 15.0,
"y1" : 0.0,
"x2" : 30.0,
"y2" : 0.0
} ],
"startArrow" : {
"arrowType" : "NONE",
"angle" : 2.748893571891069,
"lineType" : "SOLID",
"length" : 15.0
},
"endArrow" : {
"arrowType" : "NONE",
"angle" : 2.748893571891069,
"lineType" : "SOLID",
"length" : 15.0
},
"lineType" : "SOLID"
},
"stoichiometry" : null,
"element" : 958
}, {
"id" : 1080,
"line" : {
"id" : 1387,
"width" : 1.0,
"color" : "#000000ff",
"z" : 0,
"segments" : [ {
"x1" : 15.0,
"y1" : 0.0,
"x2" : 20.0,
"y2" : 0.0
} ],
"startArrow" : {
"arrowType" : "NONE",
"angle" : 2.748893571891069,
"lineType" : "SOLID",
"length" : 15.0
},
"endArrow" : {
"arrowType" : "NONE",
"angle" : 2.748893571891069,
"lineType" : "SOLID",
"length" : 15.0
},
"lineType" : "SOLID"
},
"stoichiometry" : null,
"element" : 956
} ],
"totalPages" : 1,
"totalElements" : 2,
"numberOfElements" : 2,
"size" : 20,
"number" : 0
}
3. Get product
Returns a single product of the reaction.
3.1. HTTP request
GET /minerva/new_api/projects/test_project/maps/338/bio_entities/reactions/153/products/1066 HTTP/1.1
3.2. Path Parameters
| Parameter | Description |
|---|---|
|
project identifier |
|
map identifier |
|
reaction identifier |
|
product identifier |
3.3. CURL sample
$ curl 'https://minerva-dev.lcsb.uni.lu/minerva/new_api/projects/test_project/maps/338/bio_entities/reactions/153/products/1066' -X GET \
-H 'Authorization: Bearer xxxxxxxx'
3.4. HTTP response
HTTP/1.1 200 OK
3.5. Sample Response
{
"id" : 1066,
"line" : {
"id" : 1369,
"width" : 1.0,
"color" : "#000000ff",
"z" : 0,
"segments" : [ {
"x1" : 15.0,
"y1" : 0.0,
"x2" : 20.0,
"y2" : 0.0
} ],
"startArrow" : {
"arrowType" : "NONE",
"angle" : 2.748893571891069,
"lineType" : "SOLID",
"length" : 15.0
},
"endArrow" : {
"arrowType" : "NONE",
"angle" : 2.748893571891069,
"lineType" : "SOLID",
"length" : 15.0
},
"lineType" : "SOLID"
},
"stoichiometry" : null,
"element" : 945
}
4. Add product
Adds a product to the reaction.
4.1. HTTP request
POST /minerva/new_api/projects/test_project/maps/334/bio_entities/reactions/151/products/ HTTP/1.1
4.2. Path Parameters
| Parameter | Description |
|---|---|
|
project identifier |
|
map identifier |
|
reaction identifier |
4.3. CURL sample
$ curl 'https://minerva-dev.lcsb.uni.lu/minerva/new_api/projects/test_project/maps/334/bio_entities/reactions/151/products/' -X POST \
-H 'Authorization: Bearer xxxxxxxx' \
-d '{"stoichiometry":3.0,"element":{"id":933}}' \
-H 'Content-Type: application/json'
4.4. HTTP response
HTTP/1.1 201 Created
4.5. Sample Response
{
"id" : 1053,
"line" : {
"id" : 1354,
"width" : 1.0,
"color" : "#000000ff",
"z" : 0,
"segments" : [ ],
"startArrow" : {
"arrowType" : "NONE",
"angle" : 2.748893571891069,
"lineType" : "SOLID",
"length" : 15.0
},
"endArrow" : {
"arrowType" : "NONE",
"angle" : 2.748893571891069,
"lineType" : "SOLID",
"length" : 15.0
},
"lineType" : "SOLID"
},
"stoichiometry" : 3.0,
"element" : 933
}
5. Update product
Updates a product of the reaction.
|
Note
|
Supports optimistic locking via the If-Match header.
|
5.1. HTTP request
PUT /minerva/new_api/projects/test_project/maps/336/bio_entities/reactions/152/products/1059 HTTP/1.1
5.2. Path Parameters
| Parameter | Description |
|---|---|
|
project identifier |
|
map identifier |
|
reaction identifier |
|
product identifier |
5.3. CURL sample
$ curl 'https://minerva-dev.lcsb.uni.lu/minerva/new_api/projects/test_project/maps/336/bio_entities/reactions/152/products/1059' -X PUT \
-H 'Authorization: Bearer xxxxxxxx' \
-d '{"stoichiometry":3.0,"element":{"id":937}}' \
-H 'Content-Type: application/json'
5.4. HTTP response
HTTP/1.1 200 OK
5.5. Sample Response
{
"id" : 1059,
"line" : {
"id" : 1360,
"width" : 1.0,
"color" : "#000000ff",
"z" : 0,
"segments" : [ {
"x1" : 15.0,
"y1" : 0.0,
"x2" : 20.0,
"y2" : 0.0
} ],
"startArrow" : {
"arrowType" : "NONE",
"angle" : 2.748893571891069,
"lineType" : "SOLID",
"length" : 15.0
},
"endArrow" : {
"arrowType" : "NONE",
"angle" : 2.748893571891069,
"lineType" : "SOLID",
"length" : 15.0
},
"lineType" : "SOLID"
},
"stoichiometry" : 3.0,
"element" : 937
}
6. Delete product
Removes a product from the reaction.
|
Note
|
Supports optimistic locking via the If-Match header.
|
6.1. HTTP request
DELETE /minerva/new_api/projects/test_project/maps/340/bio_entities/reactions/154/products/1073 HTTP/1.1
6.2. Path Parameters
| Parameter | Description |
|---|---|
|
project identifier |
|
map identifier |
|
reaction identifier |
|
product identifier |
6.3. CURL sample
$ curl 'https://minerva-dev.lcsb.uni.lu/minerva/new_api/projects/test_project/maps/340/bio_entities/reactions/154/products/1073' -X DELETE \
-H 'Authorization: Bearer xxxxxxxx'
6.4. HTTP response
HTTP/1.1 200 OK