Info Lists
This chapter focuses on info lists.
Get all info lists
A GET
to /info-lists
returns all the info lists.
HTTP request
GET /api/rest/latest/info-lists?page=0&size=20 HTTP/1.1
Accept: application/json
Host: localhost:8080
Request parameters
Parameter | Description |
---|---|
|
number of the page to retrieve (optional) |
|
size of the page to retrieve (optional) |
|
which attributes of the returned entities should be sorted on (optional) |
|
which fields of the elements should be returned (optional) |
|
which type of the element should be returned (optional) |
HTTP response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1914
{
"_embedded" : {
"info-lists" : [ {
"_type" : "info-list",
"id" : 1,
"label" : "list1",
"description" : "description1",
"code" : "code1",
"items" : [ {
"_type" : "info-list-item",
"id" : 21,
"label" : "item1",
"code" : "codeItem1",
"icon_name" : "cross",
"colour" : "#ff0000",
"default" : true,
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/info-list-items/21"
}
}
} ],
"created_by" : "admin",
"created_on" : "2020-04-06T10:00:00.000+00:00",
"last_modified_by" : "admin",
"last_modified_on" : "2020-04-06T10:00:00.000+00:00",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/info-lists/1"
}
}
}, {
"_type" : "info-list",
"id" : 2,
"label" : "list2",
"description" : "description2",
"code" : "code2",
"items" : [ {
"_type" : "info-list-item",
"id" : 22,
"label" : "item2",
"code" : "codeItem2",
"icon_name" : "cross",
"colour" : "#ff0000",
"default" : true,
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/info-list-items/22"
}
}
} ],
"created_by" : "admin",
"created_on" : "2020-04-06T10:00:00.000+00:00",
"last_modified_by" : "admin",
"last_modified_on" : "2020-04-06T10:00:00.000+00:00",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/info-lists/2"
}
}
} ]
},
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/info-lists?page=0&size=20"
}
},
"page" : {
"size" : 20,
"totalElements" : 2,
"totalPages" : 1,
"number" : 0
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the list of elements for that page |
|
|
the page size for that query |
|
|
total number of elements |
|
|
how many pages can be browsed |
|
|
the page number |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to the first page (optional) |
|
link to the previous page (optional) |
|
link to this page |
|
link to the next page (optional) |
|
link to the last page (optional) |
Get info list
A GET
to /info-lists/{id}
returns the info list with the given id.
HTTP request
GET /api/rest/latest/info-lists/3 HTTP/1.1
Accept: application/json
Host: localhost:8080
Path parameters
Parameter | Description |
---|---|
|
the id of the info list |
HTTP response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 705
{
"_type" : "info-list",
"id" : 3,
"label" : "list3",
"description" : "description3",
"code" : "code3",
"items" : [ {
"_type" : "info-list-item",
"id" : 23,
"label" : "item3",
"code" : "codeItem3",
"icon_name" : "cross",
"colour" : "#ff0000",
"default" : true,
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/info-list-items/23"
}
}
} ],
"created_by" : "admin",
"created_on" : "2020-04-06T10:00:00.000+00:00",
"last_modified_by" : "admin",
"last_modified_on" : "2020-04-06T10:00:00.000+00:00",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/info-lists/3"
}
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the id of the entity |
|
|
the type of the entity |
|
|
the label of the info list |
|
|
the description of the info list |
|
|
the code of the info list |
|
|
the items of the info list |
|
|
the user who created the info list |
|
|
the creation date of the info list |
|
|
the last user who modified the info list |
|
|
the last modification date of the info list |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to this info list |
Create info list
A POST
to /info-lists
creates a new info list.
HTTP request
POST /api/rest/latest/info-lists HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 282
Host: localhost:8080
{
"_type" : "info-list",
"label" : "create4",
"code" : "code4",
"description" : "description4",
"items" : [ {
"_type" : "info-list-item",
"label" : "item4",
"code" : "codeItem4",
"icon_name" : "cross",
"colour" : "#ff0000",
"default" : true
} ]
}
Request fields
Path | Type | Description |
---|---|---|
|
|
the type of the entity |
|
|
the label of the info list |
|
|
the status of the info list |
|
|
the description of the info list |
|
|
the info list’s items |
HTTP response
HTTP/1.1 201 Created
Content-Type: application/json
Content-Length: 619
{
"_type" : "info-list",
"id" : 4,
"label" : "create4",
"description" : "description4",
"code" : "code4",
"items" : [ {
"_type" : "info-list-item",
"id" : 24,
"label" : "item4",
"code" : "codeItem4",
"icon_name" : "cross",
"colour" : "#ff0000",
"default" : true,
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/info-list-items/24"
}
}
} ],
"created_by" : "admin",
"created_on" : "2020-04-06T10:00:00.000+00:00",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/info-lists/4"
}
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the type of the entity |
|
|
the id of the info list |
|
|
the label of the info list |
|
|
the status of the info list |
|
|
the description of the info list |
|
|
an array of info list items |
|
|
user who created the entity |
|
|
timestamp of the creation (ISO 8601) |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to this info list |
Modify info list
A PATCH
to /info-lists/{id}
modifies the info list with the given id.
HTTP request
PATCH /api/rest/latest/info-lists/4 HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 280
Host: localhost:8080
{
"_type" : "info-list",
"label" : "list4",
"code" : "code4",
"description" : "description4",
"items" : [ {
"_type" : "info-list-item",
"label" : "item4",
"code" : "codeItem4",
"icon_name" : "cross",
"colour" : "#ff0000",
"default" : true
} ]
}
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 |
|
|
the status of the info list |
|
|
the description of the info list |
|
|
an array of info list items |
HTTP response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 705
{
"_type" : "info-list",
"id" : 4,
"label" : "list4",
"description" : "description4",
"code" : "code4",
"items" : [ {
"_type" : "info-list-item",
"id" : 24,
"label" : "item4",
"code" : "codeItem4",
"icon_name" : "cross",
"colour" : "#ff0000",
"default" : true,
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/info-list-items/24"
}
}
} ],
"created_by" : "admin",
"created_on" : "2020-04-06T10:00:00.000+00:00",
"last_modified_by" : "admin",
"last_modified_on" : "2020-04-06T10:00:00.000+00:00",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/info-lists/4"
}
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the type of the entity |
|
|
the id of the info list |
|
|
the label of the info list |
|
|
the status of the info list |
|
|
the description of the info list |
|
|
an array of info list items |
|
|
user who created the entity |
|
|
timestamp of the creation (ISO 8601) |
|
|
user who modified the entity the most recently |
|
|
timestamp of last modification (ISO 8601) |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to this info list |
Delete info list
A DELETE
to /info-lists/{ids}
deletes the info list(s) with the given id(s).
If associated with at least one project, the objects will permanently be disassociated with the info list(s). The default list will be activated and the values associated to the objects will be reset to the default 'Undefined' value.
HTTP request
DELETE /api/rest/latest/info-lists/2,3 HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080
Path parameters
Parameter | Description |
---|---|
|
the ids of the info list to delete |
HTTP response
HTTP/1.1 204 No Content