Annotations (references to external databases) of a reaction, served from /new_api/projects/{projectId}/maps/{mapId}/bio_entities/reactions/{reactionId}/annotations.
1. List annotations
Returns a page of annotations of the reaction.
|
Note
|
The result is paged - use the page and size query parameters to
walk through it.
|
1.1. HTTP request
GET /minerva/new_api/projects/test_project/maps/260/bio_entities/reactions/113/annotations/ HTTP/1.1
1.2. Path Parameters
| Parameter | Description |
|---|---|
|
project identifier |
|
map identifier |
|
reaction identifier |
1.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 |
1.4. CURL sample
$ curl 'https://minerva-dev.lcsb.uni.lu/minerva/new_api/projects/test_project/maps/260/bio_entities/reactions/113/annotations/' -X GET \
-H 'Authorization: Bearer xxxxxxxx'
1.5. HTTP response
HTTP/1.1 200 OK
1.6. Sample Response
{
"content" : [ {
"link" : null,
"article" : null,
"type" : "PUBMED",
"resource" : "28725475",
"id" : 912,
"annotator" : null
}, {
"link" : null,
"article" : null,
"type" : "PUBMED",
"resource" : "invalid123",
"id" : 913,
"annotator" : null
} ],
"totalPages" : 1,
"totalElements" : 2,
"numberOfElements" : 2,
"size" : 20,
"number" : 0
}
2. Get annotation
Returns a single annotation of the reaction.
2.1. HTTP request
GET /minerva/new_api/projects/test_project/maps/266/bio_entities/reactions/116/annotations/937 HTTP/1.1
2.2. Path Parameters
| Parameter | Description |
|---|---|
|
project identifier |
|
map identifier |
|
reaction identifier |
|
annotation identifier |
2.3. CURL sample
$ curl 'https://minerva-dev.lcsb.uni.lu/minerva/new_api/projects/test_project/maps/266/bio_entities/reactions/116/annotations/937' -X GET \
-H 'Authorization: Bearer xxxxxxxx'
2.4. HTTP response
HTTP/1.1 200 OK
2.5. Response Fields
| Path | Type | Description |
|---|---|---|
|
|
unique annotation identifier |
|
|
type of the annotation (miriam data type, e.g. TAXONOMY, MESH_2012, PUBMED) |
|
|
resource identifier within the given type |
|
|
URL computed from type and resource (identifiers.org link) |
|
|
publication details; present only when type is PUBMED |
|
|
annotator that created this annotation, null when it was added manually; one of: BRENDA, CAZY, CHEBI, COPY_CELL_DESIGNER_ANNOTATIONS, ENSEMBL, ENTREZ, GO, HGNC, KEGG, PDB, TAIR, UNIPROT |
2.6. Sample Response
{
"link" : null,
"article" : null,
"type" : "PUBMED",
"resource" : "28725475",
"id" : 937,
"annotator" : null
}
3. Add annotation
An annotation is a type/resource pair, for example type PUBMED with resource 11.
type is an enum whose accepted values are the identifier types supported by the instance - see List identifiers.org types for the full list.
The resource identifier itself is not checked against the external database; the response adds the assigned id and the link derived from the pair.
3.1. HTTP request
POST /minerva/new_api/projects/test_project/maps/264/bio_entities/reactions/115/annotations/ HTTP/1.1
3.2. Path Parameters
| Parameter | Description |
|---|---|
|
project identifier |
|
map identifier |
|
reaction identifier |
3.3. Request Fields
| Path | Type | Description |
|---|---|---|
|
|
type of the annotation (miriam data type, e.g. TAXONOMY, MESH_2012, PUBMED) |
|
|
resource identifier within the given type |
3.4. CURL sample
$ curl 'https://minerva-dev.lcsb.uni.lu/minerva/new_api/projects/test_project/maps/264/bio_entities/reactions/115/annotations/' -X POST \
-H 'Authorization: Bearer xxxxxxxx' \
-d '{"type":"PUBMED","resource":"11"}' \
-H 'Content-Type: application/json'
3.5. HTTP response
HTTP/1.1 201 Created
3.6. Sample Response
{
"link" : null,
"article" : null,
"type" : "PUBMED",
"resource" : "11",
"id" : 930,
"annotator" : null
}
4. Update annotation
Replaces both the type and the resource of the annotation, so the request has to carry the complete pair even when only one of them changes.
type accepts the same enum values as when creating one, listed by List identifiers.org types.
|
Note
|
Supports optimistic locking via the If-Match header.
|
4.1. HTTP request
PUT /minerva/new_api/projects/test_project/maps/258/bio_entities/reactions/112/annotations/904 HTTP/1.1
4.2. Path Parameters
| Parameter | Description |
|---|---|
|
project identifier |
|
map identifier |
|
reaction identifier |
|
annotation identifier |
4.3. Request Fields
| Path | Type | Description |
|---|---|---|
|
|
type of the annotation (miriam data type, e.g. TAXONOMY, MESH_2012, PUBMED) |
|
|
resource identifier within the given type |
4.4. CURL sample
$ curl 'https://minerva-dev.lcsb.uni.lu/minerva/new_api/projects/test_project/maps/258/bio_entities/reactions/112/annotations/904' -X PUT \
-H 'Authorization: Bearer xxxxxxxx' \
-d '{"type":"PUBMED","resource":"11"}' \
-H 'Content-Type: application/json'
4.5. HTTP response
HTTP/1.1 200 OK
4.6. Sample Response
{
"link" : null,
"article" : null,
"type" : "PUBMED",
"resource" : "11",
"id" : 904,
"annotator" : null
}
5. Delete annotation
Removes an annotation from the reaction.
|
Note
|
Supports optimistic locking via the If-Match header.
|
5.1. HTTP request
DELETE /minerva/new_api/projects/test_project/maps/268/bio_entities/reactions/117/annotations/945 HTTP/1.1
5.2. Path Parameters
| Parameter | Description |
|---|---|
|
project identifier |
|
map identifier |
|
reaction identifier |
|
annotation identifier |
5.3. CURL sample
$ curl 'https://minerva-dev.lcsb.uni.lu/minerva/new_api/projects/test_project/maps/268/bio_entities/reactions/117/annotations/945' -X DELETE \
-H 'Authorization: Bearer xxxxxxxx'
5.4. HTTP response
HTTP/1.1 200 OK
6. Redirect to source
Redirects (HTTP 302) to the external page the annotation points at.
6.1. HTTP request
GET /minerva/new_api/projects/test_project/maps/262/bio_entities/reactions/114/annotations/920:redirect_to_source HTTP/1.1
6.2. Path Parameters
| Parameter | Description |
|---|---|
|
project identifier |
|
map identifier |
|
reaction identifier |
|
annotation identifier |
6.3. CURL sample
$ curl 'https://minerva-dev.lcsb.uni.lu/minerva/new_api/projects/test_project/maps/262/bio_entities/reactions/114/annotations/920:redirect_to_source' -X GET \
-H 'Authorization: Bearer xxxxxxxx'
6.4. HTTP response
HTTP/1.1 302 Found