Reactants of a reaction, served from /new_api/projects/{projectId}/maps/{mapId}/bio_entities/reactions/{reactionId}/reactants. Every reactant points at an element of the map; the element it points at can be read and replaced through its element sub-resource.

1. Reactant element

The map element that the reactant points at.
See full documentation.

2. List reactants

Returns a page of reactants 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/364/bio_entities/reactions/166/reactants/ HTTP/1.1

2.2. Path Parameters

Table 1. /minerva/new_api/projects/{projectId}/maps/{mapId}/bio_entities/reactions/{reactionId}/reactants/
Parameter Description

projectId

project identifier

mapId

map identifier

reactionId

reaction identifier

2.3. Query Parameters

Parameter Description

page

index of the page to fetch, counted from 0; 0 by default

size

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/364/bio_entities/reactions/166/reactants/' -X GET \
    -H 'Authorization: Bearer xxxxxxxx'

2.5. HTTP response

HTTP/1.1 200 OK

2.6. Sample Response

{
  "content" : [ {
    "id" : 1154,
    "line" : {
      "id" : 1486,
      "width" : 1.0,
      "color" : "#000000ff",
      "z" : 0,
      "segments" : [ {
        "x1" : 15.0,
        "y1" : 0.0,
        "x2" : 0.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" : 1024
  }, {
    "id" : 1155,
    "line" : {
      "id" : 1484,
      "width" : 1.0,
      "color" : "#000000ff",
      "z" : 0,
      "segments" : [ {
        "x1" : 10.0,
        "y1" : 0.0,
        "x2" : 0.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" : 1023
  } ],
  "totalPages" : 1,
  "totalElements" : 2,
  "numberOfElements" : 2,
  "size" : 20,
  "number" : 0
}

3. Get reactant

Returns a single reactant of the reaction.

3.1. HTTP request

GET /minerva/new_api/projects/test_project/maps/368/bio_entities/reactions/168/reactants/1169 HTTP/1.1

3.2. Path Parameters

Table 2. /minerva/new_api/projects/{projectId}/maps/{mapId}/bio_entities/reactions/{reactionId}/reactants/{reactantId}
Parameter Description

projectId

project identifier

mapId

map identifier

reactionId

reaction identifier

reactantId

reactant identifier

3.3. CURL sample

$ curl 'https://minerva-dev.lcsb.uni.lu/minerva/new_api/projects/test_project/maps/368/bio_entities/reactions/168/reactants/1169' -X GET \
    -H 'Authorization: Bearer xxxxxxxx'

3.4. HTTP response

HTTP/1.1 200 OK

3.5. Sample Response

{
  "id" : 1169,
  "line" : {
    "id" : 1502,
    "width" : 1.0,
    "color" : "#000000ff",
    "z" : 0,
    "segments" : [ {
      "x1" : 10.0,
      "y1" : 0.0,
      "x2" : 0.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" : 1034
}

4. Add reactant

The request body references an element that already exists on the map (element) and states the stoichiometry with which the reaction consumes it; the reactant is a link to that element rather than a copy, so the same element can be a reactant of many reactions. It is created with an empty connector line, which can be shaped afterwards through the reactant line resource.

4.1. HTTP request

POST /minerva/new_api/projects/test_project/maps/362/bio_entities/reactions/165/reactants/ HTTP/1.1

4.2. Path Parameters

Table 3. /minerva/new_api/projects/{projectId}/maps/{mapId}/bio_entities/reactions/{reactionId}/reactants/
Parameter Description

projectId

project identifier

mapId

map identifier

reactionId

reaction identifier

4.3. CURL sample

$ curl 'https://minerva-dev.lcsb.uni.lu/minerva/new_api/projects/test_project/maps/362/bio_entities/reactions/165/reactants/' -X POST \
    -H 'Authorization: Bearer xxxxxxxx' \
    -d '{"stoichiometry":3.0,"element":{"id":1018}}' \
    -H 'Content-Type: application/json'

4.4. HTTP response

HTTP/1.1 201 Created

4.5. Sample Response

{
  "id" : 1152,
  "line" : {
    "id" : 1481,
    "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" : 1018
}

5. Update reactant

Updates a reactant of the reaction.

Note
Supports optimistic locking via the If-Match header.

5.1. HTTP request

PUT /minerva/new_api/projects/test_project/maps/360/bio_entities/reactions/164/reactants/1140 HTTP/1.1

5.2. Path Parameters

Table 4. /minerva/new_api/projects/{projectId}/maps/{mapId}/bio_entities/reactions/{reactionId}/reactants/{reactantId}
Parameter Description

projectId

project identifier

mapId

map identifier

reactionId

reaction identifier

reactantId

reactant identifier

5.3. CURL sample

$ curl 'https://minerva-dev.lcsb.uni.lu/minerva/new_api/projects/test_project/maps/360/bio_entities/reactions/164/reactants/1140' -X PUT \
    -H 'Authorization: Bearer xxxxxxxx' \
    -d '{"stoichiometry":3.0,"element":{"id":1008}}' \
    -H 'Content-Type: application/json'

5.4. HTTP response

HTTP/1.1 200 OK

5.5. Sample Response

{
  "id" : 1140,
  "line" : {
    "id" : 1465,
    "width" : 1.0,
    "color" : "#000000ff",
    "z" : 0,
    "segments" : [ {
      "x1" : 10.0,
      "y1" : 0.0,
      "x2" : 0.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" : 1008
}

6. Delete reactant

Removes a reactant from the reaction.

Note
Supports optimistic locking via the If-Match header.

6.1. HTTP request

DELETE /minerva/new_api/projects/test_project/maps/366/bio_entities/reactions/167/reactants/1162 HTTP/1.1

6.2. Path Parameters

Table 5. /minerva/new_api/projects/{projectId}/maps/{mapId}/bio_entities/reactions/{reactionId}/reactants/{reactantId}
Parameter Description

projectId

project identifier

mapId

map identifier

reactionId

reaction identifier

reactantId

reactant identifier

6.3. CURL sample

$ curl 'https://minerva-dev.lcsb.uni.lu/minerva/new_api/projects/test_project/maps/366/bio_entities/reactions/167/reactants/1162' -X DELETE \
    -H 'Authorization: Bearer xxxxxxxx'

6.4. HTTP response

HTTP/1.1 200 OK