Info List Items
This chapter focuses on info list items.
Get info list item
A GET
to /info-list-items/{id}
returns the info list item with the given id.
HTTP request
GET /api/rest/latest/info-list-items/3 HTTP/1.1
Accept: application/json
Host: localhost:8080
Path parameters
Parameter | Description |
---|---|
|
the id of the info list item |
HTTP response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 535
{
"_type" : "info-list-item",
"id" : 3,
"label" : "item3",
"code" : "codeItem3",
"icon_name" : "cross",
"colour" : "#ff0000",
"default" : true,
"info_list" : {
"_type" : "info-list",
"id" : 4,
"label" : "list4",
"description" : "description4",
"code" : "code4",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/info-lists/4"
}
}
},
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/info-list-items/3"
}
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the type of the entity |
|
|
the id of the entity |
|
|
the label of the info list item |
|
|
the code of the info list item |
|
|
the name of the icon of the info list item |
|
|
the colour of the info list item (hexadecimal) |
|
|
boolean which indicates if the info list item is the default one |
|
|
the info list this item is part of |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to this info list item |
Create info list item
A POST
to /info-lists/{id}/items
creates a new info list item.
HTTP request
POST /api/rest/latest/info-lists/4/items HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 126
Host: localhost:8080
{
"_type" : "info-list-item",
"label" : "item4",
"code" : "codeItem4",
"icon_name" : "cross",
"colour" : "#ff0000"
}
Path parameters
Parameter | Description |
---|---|
|
the id of the info list |
Request fields
Path | Type | Description |
---|---|---|
|
|
the type of the entity |
|
|
the label of the info list item |
|
|
the code of the info list item |
|
|
the name of the icon of the info list item |
|
|
the colour of the info list item (hexadecimal) |
HTTP response
HTTP/1.1 201 Created
Content-Type: application/json
Content-Length: 537
{
"_type" : "info-list-item",
"id" : 4,
"label" : "item4",
"code" : "codeItem4",
"icon_name" : "cross",
"colour" : "#ff0000",
"default" : true,
"info_list" : {
"_type" : "info-list",
"id" : 5,
"label" : "create5",
"description" : "description5",
"code" : "code5",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/info-lists/5"
}
}
},
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/info-list-items/4"
}
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the type of the entity |
|
|
the id of the info list item |
|
|
the label of the info list item |
|
|
the code of the info list item |
|
|
the name of the icon of the info list item |
|
|
the colour of the info list item (hexadecimal) |
|
|
boolean which indicates if the info list item is the default one |
|
|
the info list this item is part of |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to this info list item |
Modify info list item
A PATCH
to /info-list-items/{id}
modifies the info list item with the given id.
HTTP request
PATCH /api/rest/latest/info-list-items/4 HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 146
Host: localhost:8080
{
"_type" : "info-list-item",
"label" : "item4",
"code" : "codeItem4",
"icon_name" : "cross",
"colour" : "#0000ff",
"default" : true
}
Path parameters
Parameter | Description |
---|---|
|
the id of the info list item |
Request fields
Path | Type | Description |
---|---|---|
|
|
the type of the entity |
|
|
the label of the info list item |
|
|
the code of the info list item |
|
|
the name of the icon of the info list item |
|
|
the colour of the info list item (hexadecimal) |
|
|
boolean which indicates if the info list item is the default one |
HTTP response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 535
{
"_type" : "info-list-item",
"id" : 4,
"label" : "item4",
"code" : "codeItem4",
"icon_name" : "cross",
"colour" : "#0000ff",
"default" : true,
"info_list" : {
"_type" : "info-list",
"id" : 5,
"label" : "list5",
"description" : "description5",
"code" : "code5",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/info-lists/5"
}
}
},
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/info-list-items/4"
}
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the type of the entity |
|
|
the id of the info list item |
|
|
the label of the info list item |
|
|
the code of the info list item |
|
|
the name of the icon of the info list item |
|
|
the colour of the info list item (hexadecimal) |
|
|
boolean which indicates if the info list item is the default one |
|
|
the info list this item is part of |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to this info list item |
Delete info list item
A DELETE
to /info-list-items/{id}
deletes the info list item with the given id.
If the info list item to delete is the default one, then it cannot be deleted.
HTTP request
DELETE /api/rest/latest/info-list-items/2 HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080
Path parameters
Parameter | Description |
---|---|
|
the id of the info list item |
HTTP response
HTTP/1.1 204 No Content