1. List registered plugins on the server

1.1. CURL sample

$ curl 'https://minerva-service.lcsb.uni.lu/minerva/api/plugins/' -X GET

1.2. Response Fields

Path Type Description

[]

string

list of plugins

[].hash

string

md5 checksum of the source file

[].isDefault

boolean

should be opened automatically when map is browsed

[].isPublic

boolean

should be visible on plugin list to all users

[].name

string

name

[].urls

string

list of urls where source can be found

[].version

string

plugin version

1.3. Sample Response

[ {
  "hash" : "b7a875a0536949d4d8a2f834dc54489e",
  "name" : "starter-kit",
  "version" : "0.0.1",
  "isPublic" : false,
  "isDefault" : false,
  "urls" : [ "https://minerva-dev.lcsb.uni.lu/plugins/starter-kit/plugin.js" ]
} ]

2. Register new plugin on the server

2.1. CURL sample

$ curl 'https://minerva-service.lcsb.uni.lu/minerva/api/plugins/' -X POST \
    -d 'hash=b7a875a0536949d4d8a2f834dc54489e&name=x&version=x&isPublic=true&url=https%3A%2F%2Fminerva-dev.lcsb.uni.lu%2Fplugins%2Fstarter-kit%2Fplugin.js' \
    --cookie "MINERVA_AUTH_TOKEN=xxxxxxxx" \
    -H 'Content-Type: application/x-www-form-urlencoded'

2.2. Request Parameters

Parameter Description

hash

md5 sum of javascript file

name

name

version

version

isDefault

should be opened automatically when map is browsed

isPublic

should the plugin be visible by all users

url

url to the javascript file with plugin source code

2.3. Response Fields

Path Type Description

hash

string

md5 checksum of the source file

isDefault

boolean

should be opened automatically when map is browsed

isPublic

boolean

should be visible on plugin list to all users

name

string

name

urls

string

list of urls where source can be found

version

string

plugin version

2.4. Sample Response

{
  "hash" : "b7a875a0536949d4d8a2f834dc54489e",
  "name" : "x",
  "version" : "x",
  "isPublic" : true,
  "isDefault" : false,
  "urls" : [ "https://minerva-dev.lcsb.uni.lu/plugins/starter-kit/plugin.js" ]
}

3. Access information about plugin

3.1. CURL sample

$ curl 'https://minerva-service.lcsb.uni.lu/minerva/api/plugins/b7a875a0536949d4d8a2f834dc54489e' -X GET

3.2. Path Parameters

Table 1. /minerva/api/plugins/{hash}
Parameter Description

hash

plugin md5 checksum

3.3. Response Fields

Path Type Description

hash

string

md5 checksum of the source file

isDefault

boolean

should be opened automatically when map is browsed

isPublic

boolean

should be visible on plugin list to all users

name

string

name

urls

string

list of urls where source can be found

version

string

plugin version

3.4. Sample Response

{
  "hash" : "b7a875a0536949d4d8a2f834dc54489e",
  "name" : "starter-kit",
  "version" : "0.0.1",
  "isPublic" : false,
  "isDefault" : false,
  "urls" : [ "https://minerva-dev.lcsb.uni.lu/plugins/starter-kit/plugin.js" ]
}

4. Set global plugin parameter

4.1. CURL sample

$ curl 'https://minerva-service.lcsb.uni.lu/minerva/api/plugins/b7a875a0536949d4d8a2f834dc54489e/data/global/my_key/' -X POST \
    -d 'value=xxx' \
    -H 'Content-Type: application/x-www-form-urlencoded'

4.2. Path Parameters

Table 2. /minerva/api/plugins/{hash}/data/global/{key}/
Parameter Description

hash

plugin md5 checksum

key

id of the entry

4.3. Request Parameters

Parameter Description

value

value of the entry

4.4. Response Fields

Path Type Description

key

String

id

value

String

value of the entry

4.5. Sample Response

{
  "key" : "my_key",
  "value" : "xxx"
}

5. Get global plugin parameter

5.1. Path Parameters

Table 3. /minerva/api/plugins/{hash}/data/global/{key}/
Parameter Description

hash

plugin md5 checksum

key

id of the entry

5.2. Response Fields

Path Type Description

key

String

id

value

String

value of the entry

5.3. CURL sample

$ curl 'https://minerva-service.lcsb.uni.lu/minerva/api/plugins/b7a875a0536949d4d8a2f834dc54489e/data/global/my_key/' -X GET

5.4. Sample Response

{
  "key" : "my_key",
  "value" : "xxx"
}

6. Set user plugin parameter

6.1. CURL sample

$ curl 'https://minerva-service.lcsb.uni.lu/minerva/api/plugins/b7a875a0536949d4d8a2f834dc54489e/data/users/my_key/' -X POST \
    -d 'value=xxx' \
    --cookie "MINERVA_AUTH_TOKEN=xxxxxxxx" \
    -H 'Content-Type: application/x-www-form-urlencoded'

6.2. Path Parameters

Table 4. /minerva/api/plugins/{hash}/data/users/{key}/
Parameter Description

hash

plugin md5 checksum

key

id of the entry

6.3. Request Parameters

Parameter Description

value

value of the entry

6.4. Response Fields

Path Type Description

key

String

id

value

String

value of the entry

user

String

owner of the entry

6.5. Sample Response

{
  "key" : "my_key",
  "value" : "xxx",
  "user" : "admin"
}

7. Get user plugin parameter

7.1. Path Parameters

Table 5. /minerva/api/plugins/{hash}/data/users/{key}/
Parameter Description

hash

plugin md5 checksum

key

id of the entry

7.2. Response Fields

Path Type Description

key

String

id

value

String

value of the entry

user

String

owner of the entry

7.3. CURL sample

$ curl 'https://minerva-service.lcsb.uni.lu/minerva/api/plugins/b7a875a0536949d4d8a2f834dc54489e/data/users/my_key/' -X GET \
    --cookie "MINERVA_AUTH_TOKEN=xxxxxxxx"

7.4. Sample Response

{
  "key" : "my_key",
  "value" : "xxx",
  "user" : "admin"
}