1. List backgrounds

1.1. Path Parameters

Table 1. /api/projects/{projectId}/backgrounds/
Parameter Description

projectId

project identifier

1.2. Response Fields

Path Type Description

[].id

Number

identifier

[].name

String

name

[].description

String

description

[].project.projectId

String

project id where this background belongs to

[].creator.login

String

who created background

[].status

String

is the background ready. Available statuses are: FAILURE, GENERATING, NA, OK, UNKNOWN

[].progress

Number

generating images progress information (in %)

[].order

Number

order used when listing all backgrounds

[].images[].path

String

directory where background tiles are located

[].images[].model.id

Number

(sub)map for which images are described

[].defaultOverlay

Boolean

should the background be used as default (at most one per project should be marked with true)

1.3. CURL sample

$ curl 'https://minerva-service.lcsb.uni.lu/minerva/api/projects/test_project/backgrounds/' -i -X GET

1.4. Sample Response

[ {
  "id" : 360,
  "name" : "Normal",
  "defaultOverlay" : true,
  "project" : {
    "projectId" : "test_project"
  },
  "creator" : {
    "login" : "admin"
  },
  "status" : "OK",
  "progress" : 100.0,
  "description" : null,
  "order" : 0,
  "images" : [ {
    "id" : 688,
    "model" : {
      "id" : 660
    },
    "projectBackground" : {
      "id" : 360
    },
    "path" : "dir_1"
  }, {
    "id" : 689,
    "model" : {
      "id" : 661
    },
    "projectBackground" : {
      "id" : 360
    },
    "path" : "dir_0"
  } ]
} ]

2. Get background by id

2.1. Path Parameters

Table 2. /api/projects/{projectId}/backgrounds/{backgroundId}
Parameter Description

projectId

project identifier

backgroundId

background identifier

2.2. Response Fields

Path Type Description

id

Number

identifier

name

String

name

description

String

description

project.projectId

String

project id where this background belongs to

creator.login

String

who created background

status

String

is the background ready. Available statuses are: FAILURE, GENERATING, NA, OK, UNKNOWN

progress

Number

generating images progress information (in %)

order

Number

order used when listing all backgrounds

images[].path

String

directory where background tiles are located

images[].model.id

Number

(sub)map for which images are described

defaultOverlay

Boolean

should the background be used as default (at most one per project should be marked with true)

2.3. CURL sample

$ curl 'https://minerva-service.lcsb.uni.lu/minerva/api/projects/test_project/backgrounds/343' -i -X GET

2.4. Sample Response

{
  "id" : 343,
  "name" : "Normal",
  "defaultOverlay" : true,
  "project" : {
    "projectId" : "test_project"
  },
  "creator" : {
    "login" : "admin"
  },
  "status" : "OK",
  "progress" : 100.0,
  "description" : null,
  "order" : 0,
  "images" : [ {
    "id" : 655,
    "model" : {
      "id" : 643
    },
    "projectBackground" : {
      "id" : 343
    },
    "path" : "dir_0"
  }, {
    "id" : 654,
    "model" : {
      "id" : 642
    },
    "projectBackground" : {
      "id" : 343
    },
    "path" : "dir_1"
  } ]
}

3. Update Background

3.1. Path Parameters

Table 3. /api/projects/{projectId}/backgrounds/{backgroundId}
Parameter Description

projectId

project identifier

backgroundId

background identifier

3.2. Request Fields

Unresolved directive in project_backgrounds.adoc - include::../../../target/generated-snippets/projects/project_backgrounds/update_background/request-fields.adoc[]

3.3. Response Fields

Path Type Description

id

Number

identifier

name

String

name

description

String

description

project.projectId

String

project id where this background belongs to

creator.login

String

who created background

status

String

is the background ready. Available statuses are: FAILURE, GENERATING, NA, OK, UNKNOWN

progress

Number

generating images progress information (in %)

order

Number

order used when listing all backgrounds

images[].path

String

directory where background tiles are located

images[].model.id

Number

(sub)map for which images are described

defaultOverlay

Boolean

should the background be used as default (at most one per project should be marked with true)

3.4. CURL sample

$ curl 'https://minerva-service.lcsb.uni.lu/minerva/api/projects/test_project/backgrounds/338' -i -X PATCH \
    -H 'Content-Type: application/json' \
    -d '{"id":338,"name":"weird_title","defaultOverlay":false,"creator":null,"description":null,"order":0}' \
    --cookie "MINERVA_AUTH_TOKEN=xxxxxxxx"

3.5. Sample Response

{
  "id" : 338,
  "name" : "weird_title",
  "defaultOverlay" : false,
  "project" : {
    "projectId" : "test_project"
  },
  "creator" : {
    "login" : "admin"
  },
  "status" : "OK",
  "progress" : 100.0,
  "description" : null,
  "order" : 0,
  "images" : [ {
    "id" : 647,
    "model" : {
      "id" : 637
    },
    "projectBackground" : {
      "id" : 338
    },
    "path" : "dir_1"
  }, {
    "id" : 648,
    "model" : {
      "id" : 638
    },
    "projectBackground" : {
      "id" : 338
    },
    "path" : "dir_0"
  } ]
}

4. Delete overlay

4.1. CURL sample

$ curl 'https://minerva-service.lcsb.uni.lu/minerva/api/projects/test_project/backgrounds/373' -i -X DELETE

4.2. Path Parameters

Table 4. /api/projects/{projectId}/backgrounds/{backgroundId}
Parameter Description

projectId

project identifier

backgroundId

background identifier