The top (main) map of a project, served from /new_api/projects/{projectId}/top_map.

1. Get top map

Returns the map that is currently the top (main) map of the project.

1.1. HTTP request

GET /minerva/new_api/projects/empty/top_map HTTP/1.1

1.2. Path Parameters

Table 1. /minerva/new_api/projects/{projectId}/top_map
Parameter Description

projectId

project identifier

1.3. CURL sample

$ curl 'https://minerva-dev.lcsb.uni.lu/minerva/new_api/projects/empty/top_map' -X GET

1.4. HTTP response

HTTP/1.1 200 OK

1.5. Response Fields

Path Type Description

id

Number

unique map identifier

name

String

map name

description

String

map description

width

Number

map width

height

Number

map height

defaultCenterX

Number

default x coordinate of the map center

defaultCenterY

Number

default y coordinate of the map center

defaultZoomLevel

Number

zoom level at which the map is opened

minZoom

Number

minimum allowed zoom level

maxZoom

Number

maximum allowed zoom level

references

Array

list of map annotations

authors

Array

list of map authors

creationDate

String

map creation date

modificationDates

Array

list of map modification dates

1.6. Sample Response

{
  "id" : 3,
  "width" : 25195.0,
  "height" : 14285.0,
  "defaultCenterX" : null,
  "defaultCenterY" : null,
  "defaultZoomLevel" : null,
  "description" : "",
  "name" : "",
  "references" : [ ],
  "authors" : [ ],
  "creationDate" : null,
  "modificationDates" : [ ],
  "minZoom" : 2,
  "maxZoom" : 9
}

2. Update top map

Changes which map (submap) of the project is the top (main) map.

Note
Supports optimistic locking via the If-Match header.

2.1. HTTP request

PUT /minerva/new_api/projects/test_project/top_map HTTP/1.1

2.2. Path Parameters

Table 2. /minerva/new_api/projects/{projectId}/top_map
Parameter Description

projectId

project identifier

2.3. Request Fields

Path Type Description

id

Number

identifier of an existing map (submap) that should become the top map of the project

2.4. CURL sample

$ curl 'https://minerva-dev.lcsb.uni.lu/minerva/new_api/projects/test_project/top_map' -X PUT \
    -H 'Authorization: Bearer xxxxxxxx' \
    -d '{"id":117}' \
    -H 'Content-Type: application/json'

2.5. HTTP response

HTTP/1.1 200 OK

2.6. Response Fields

Path Type Description

id

Number

unique map identifier

name

String

map name

description

String

map description

width

Number

map width

height

Number

map height

defaultCenterX

Number

default x coordinate of the map center

defaultCenterY

Number

default y coordinate of the map center

defaultZoomLevel

Number

zoom level at which the map is opened

minZoom

Number

minimum allowed zoom level

maxZoom

Number

maximum allowed zoom level

references

Array

list of map annotations

authors

Array

list of map authors

creationDate

String

map creation date

modificationDates

Array

list of map modification dates

2.7. Sample Response

{
  "id" : 117,
  "width" : 300.0,
  "height" : 350.0,
  "defaultCenterX" : null,
  "defaultCenterY" : null,
  "defaultZoomLevel" : null,
  "description" : "",
  "name" : "Unknown",
  "references" : [ ],
  "authors" : [ ],
  "creationDate" : null,
  "modificationDates" : [ ],
  "minZoom" : 2,
  "maxZoom" : 2
}