Annotations (references to external databases) of an element, served from
/new_api/projects/{projectId}/maps/{mapId}/bio_entities/elements/{id}/annotations.
1. Get annotation
Returns info about a single element annotation.
1.1. HTTP request
GET /minerva/new_api/projects/test_project/maps/202/bio_entities/elements/536/annotations/684 HTTP/1.1
1.2. Path Parameters
| Parameter | Description |
|---|---|
|
project identifier |
|
map identifier |
|
unique element identifier (the numeric "id" field of the element, not the "elementId" taken from the source file) |
|
annotation identifier |
1.3. CURL sample
$ curl 'https://minerva-dev.lcsb.uni.lu/minerva/new_api/projects/test_project/maps/202/bio_entities/elements/536/annotations/684' -X GET \
-H 'Authorization: Bearer xxxxxxxx'
1.4. HTTP response
HTTP/1.1 200 OK
1.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 |
1.6. Sample Response
{
"link" : null,
"type" : "HGNC_SYMBOL",
"resource" : "SNCA",
"id" : 684,
"annotator" : null
}
2. List annotations
Returns a page of annotations of an element.
|
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/196/bio_entities/elements/519/annotations/ HTTP/1.1
2.2. Path Parameters
| Parameter | Description |
|---|---|
|
project identifier |
|
map identifier |
|
unique element identifier (the numeric "id" field of the element, not the "elementId" taken from the source file) |
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/196/bio_entities/elements/519/annotations/' -X GET \
-H 'Authorization: Bearer xxxxxxxx'
2.5. HTTP response
HTTP/1.1 200 OK
2.6. Response Fields
| Path | Type | Description |
|---|---|---|
|
|
list of annotations on the page |
|
|
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 |
|
|
total number of pages |
|
|
total number of elements |
|
|
number of elements on this page |
|
|
page size |
|
|
page number |
2.7. Sample Response
{
"content" : [ {
"link" : null,
"type" : "HGNC_SYMBOL",
"resource" : "SNCA",
"id" : 660,
"annotator" : null
} ],
"totalPages" : 1,
"totalElements" : 1,
"numberOfElements" : 1,
"size" : 20,
"number" : 0
}
3. Add annotation
Attaches a type/resource pair to the element, for example type UNIPROT with the accession of the protein it represents.
type is an enum whose accepted values are the identifier types supported by the instance - see List identifiers.org types for the full list.
3.1. HTTP request
POST /minerva/new_api/projects/test_project/maps/200/bio_entities/elements/526/annotations/ HTTP/1.1
3.2. Path Parameters
| Parameter | Description |
|---|---|
|
project identifier |
|
map identifier |
|
unique element identifier (the numeric "id" field of the element, not the "elementId" taken from the source file) |
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/200/bio_entities/elements/526/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. 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 |
3.7. Sample Response
{
"link" : null,
"article" : null,
"type" : "PUBMED",
"resource" : "11",
"id" : 680,
"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/194/bio_entities/elements/509/annotations/651 HTTP/1.1
4.2. Path Parameters
| Parameter | Description |
|---|---|
|
project identifier |
|
map identifier |
|
unique element identifier (the numeric "id" field of the element, not the "elementId" taken from the source file) |
|
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/194/bio_entities/elements/509/annotations/651' -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. 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 |
4.7. Sample Response
{
"link" : null,
"article" : null,
"type" : "PUBMED",
"resource" : "11",
"id" : 651,
"annotator" : null
}
5. Delete annotation
Deletes an annotation from the element.
|
Note
|
Supports optimistic locking via the If-Match header.
|
5.1. HTTP request
DELETE /minerva/new_api/projects/test_project/maps/204/bio_entities/elements/541/annotations/697 HTTP/1.1
5.2. Path Parameters
| Parameter | Description |
|---|---|
|
project identifier |
|
map identifier |
|
unique element identifier (the numeric "id" field of the element, not the "elementId" taken from the source file) |
|
annotation identifier |
5.3. CURL sample
$ curl 'https://minerva-dev.lcsb.uni.lu/minerva/new_api/projects/test_project/maps/204/bio_entities/elements/541/annotations/697' -X DELETE \
-H 'Authorization: Bearer xxxxxxxx'
5.4. HTTP response
HTTP/1.1 200 OK
6. Redirect to source
Redirects to the external resource identified by the annotation (e.g. identifiers.org).
6.1. HTTP request
GET /minerva/new_api/projects/test_project/maps/198/bio_entities/elements/520/annotations/666:redirect_to_source HTTP/1.1
6.2. Path Parameters
| Parameter | Description |
|---|---|
|
project identifier |
|
map identifier |
|
unique element identifier (the numeric "id" field of the element, not the "elementId" taken from the source file) |
|
annotation identifier |
6.3. CURL sample
$ curl 'https://minerva-dev.lcsb.uni.lu/minerva/new_api/projects/test_project/maps/198/bio_entities/elements/520/annotations/666:redirect_to_source' -X GET \
-H 'Authorization: Bearer xxxxxxxx'
6.4. HTTP response
HTTP/1.1 302 Found