Annotations (references to external databases) of a map, served from /new_api/projects/{projectId}/maps/{mapId}/annotations.

1. Get annotation

Returns info about a single map annotation.

1.1. HTTP request

GET /minerva/new_api/projects/test_project/maps/184/annotations/613 HTTP/1.1

1.2. Path Parameters

Table 1. /minerva/new_api/projects/{projectId}/maps/{mapId}/annotations/{annotationId}
Parameter Description

projectId

project identifier

mapId

map identifier

annotationId

annotation identifier

1.3. CURL sample

$ curl 'https://minerva-dev.lcsb.uni.lu/minerva/new_api/projects/test_project/maps/184/annotations/613' -X GET \
    -H 'Authorization: Bearer xxxxxxxx'

1.4. HTTP response

HTTP/1.1 200 OK

1.5. Response Fields

Path Type Description

id

Number

unique annotation identifier

type

String

type of the annotation (miriam data type, e.g. TAXONOMY, MESH_2012, PUBMED)

resource

String

resource identifier within the given type

link

String

URL computed from type and resource (identifiers.org link)

article

Object

publication details; present only when type is PUBMED

annotator

String

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" : "MESH_2012",
  "resource" : "D010300",
  "id" : 613,
  "annotator" : null
}

2. List annotations

Returns a page of annotations of a map.

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/180/annotations/ HTTP/1.1

2.2. Path Parameters

Table 2. /minerva/new_api/projects/{projectId}/maps/{mapId}/annotations/
Parameter Description

projectId

project identifier

mapId

map 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/180/annotations/' -X GET \
    -H 'Authorization: Bearer xxxxxxxx'

2.5. HTTP response

HTTP/1.1 200 OK

2.6. Response Fields

Path Type Description

content

Array

list of annotations on the page

content[].id

Number

unique annotation identifier

content[].type

String

type of the annotation (miriam data type, e.g. TAXONOMY, MESH_2012, PUBMED)

content[].resource

String

resource identifier within the given type

content[].link

String

URL computed from type and resource (identifiers.org link)

content[].article

Object

publication details; present only when type is PUBMED

content[].annotator

String

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

totalPages

Number

total number of pages

totalElements

Number

total number of elements

numberOfElements

Number

number of elements on this page

size

Number

page size

number

Number

page number

2.7. Sample Response

{
  "content" : [ {
    "link" : null,
    "type" : "MESH_2012",
    "resource" : "D010300",
    "id" : 596,
    "annotator" : null
  } ],
  "totalPages" : 1,
  "totalElements" : 1,
  "numberOfElements" : 1,
  "size" : 20,
  "number" : 0
}

3. Add annotation

Attaches a type/resource pair to the map itself, for example type TAXONOMY with the identifier of the organism it describes. 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/182/annotations/ HTTP/1.1

3.2. Path Parameters

Table 3. /minerva/new_api/projects/{projectId}/maps/{mapId}/annotations/
Parameter Description

projectId

project identifier

mapId

map identifier

3.3. Request Fields

Path Type Description

type

String

type of the annotation (miriam data type, e.g. TAXONOMY, MESH_2012, PUBMED)

resource

String

resource identifier within the given type

3.4. CURL sample

$ curl 'https://minerva-dev.lcsb.uni.lu/minerva/new_api/projects/test_project/maps/182/annotations/' -X POST \
    -H 'Authorization: Bearer xxxxxxxx' \
    -d '{"type":"TAXONOMY","resource":"9606"}' \
    -H 'Content-Type: application/json'

3.5. HTTP response

HTTP/1.1 201 Created

3.6. Response Fields

Path Type Description

id

Number

unique annotation identifier

type

String

type of the annotation (miriam data type, e.g. TAXONOMY, MESH_2012, PUBMED)

resource

String

resource identifier within the given type

link

String

URL computed from type and resource (identifiers.org link)

article

Object

publication details; present only when type is PUBMED

annotator

String

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,
  "type" : "TAXONOMY",
  "resource" : "9606",
  "id" : 607,
  "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. The link returned in the response is derived from the new pair where minerva can build one, and is null otherwise.

Note
Supports optimistic locking via the If-Match header.

4.1. HTTP request

PUT /minerva/new_api/projects/test_project/maps/178/annotations/588 HTTP/1.1

4.2. Path Parameters

Table 4. /minerva/new_api/projects/{projectId}/maps/{mapId}/annotations/{annotationId}
Parameter Description

projectId

project identifier

mapId

map identifier

annotationId

annotation identifier

4.3. Request Fields

Path Type Description

type

String

type of the annotation (miriam data type, e.g. TAXONOMY, MESH_2012, PUBMED)

resource

String

resource identifier within the given type

4.4. CURL sample

$ curl 'https://minerva-dev.lcsb.uni.lu/minerva/new_api/projects/test_project/maps/178/annotations/588' -X PUT \
    -H 'Authorization: Bearer xxxxxxxx' \
    -d '{"type":"TAXONOMY","resource":"9606"}' \
    -H 'Content-Type: application/json'

4.5. HTTP response

HTTP/1.1 200 OK

4.6. Response Fields

Path Type Description

id

Number

unique annotation identifier

type

String

type of the annotation (miriam data type, e.g. TAXONOMY, MESH_2012, PUBMED)

resource

String

resource identifier within the given type

link

String

URL computed from type and resource (identifiers.org link)

article

Object

publication details; present only when type is PUBMED

annotator

String

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,
  "type" : "TAXONOMY",
  "resource" : "9606",
  "id" : 588,
  "annotator" : null
}

5. Delete annotation

Drops a single type/resource pair from the annotations of the map itself; annotations of the elements and reactions drawn on that map are separate resources and are left untouched.

Note
Supports optimistic locking via the If-Match header.

5.1. HTTP request

DELETE /minerva/new_api/projects/test_project/maps/186/annotations/621 HTTP/1.1

5.2. Path Parameters

Table 5. /minerva/new_api/projects/{projectId}/maps/{mapId}/annotations/{annotationId}
Parameter Description

projectId

project identifier

mapId

map identifier

annotationId

annotation identifier

5.3. CURL sample

$ curl 'https://minerva-dev.lcsb.uni.lu/minerva/new_api/projects/test_project/maps/186/annotations/621' -X DELETE \
    -H 'Authorization: Bearer xxxxxxxx'

5.4. HTTP response

HTTP/1.1 200 OK