Index
The index action (same as in global) could be used to get a list's items.
URL : /api/v1/list-values/
URL Parameters :
- per-page=[integer] : number of records in page (set to -1 to get all records)
- sort=[string] : the name of the field used to sort result (set to
sort
) - filter=[array] : field values to use for filter e.g.
filter[expedition_id]=1&filter[site_id]=4
(set tofilter[listname]=<list name>
)
Method : GET
Auth required : YES
Permissions required : None
Data constraints : None
Data example : None
Success Response
GET /api/v1/list-values?per-page=-1&filter[listname]=ANALYST
Code : 200 OK
Content example
{
"items": [
{
"id": 92,
"listname": "ANALYST",
"display": "BL",
"remark": "Bennie Liebenberg",
"sort": 40
},
{
"id": 94,
"listname": "ANALYST",
"display": "GH",
"remark": "Gerhard Hofmann",
"sort": 23
},
{
"id": 95,
"listname": "ANALYST",
"display": "GVA",
"remark": "Gerrie van Aswegen",
"sort": 72
},
{
"id": 96,
"listname": "ANALYST",
"display": "HO",
"remark": "Hiroshi Ogasawara",
"sort": 59
},
{
"id": 97,
"listname": "ANALYST",
"display": "JH",
"remark": "John Hunt",
"sort": 25
},
{
"id": 99,
"listname": "ANALYST",
"display": "MM",
"remark": "Musa Manzi",
"sort": 43
},
{
"id": 93,
"listname": "ANALYST",
"display": "NB",
"remark": "Nicolas Berset",
"sort": 2
},
{
"id": 101,
"listname": "ANALYST",
"display": "NW",
"remark": "Neta Wechsler",
"sort": 75
},
{
"id": 106,
"listname": "ANALYST",
"display": "RD",
"remark": "Raymond Durrheim",
"sort": 16
},
{
"id": 98,
"listname": "ANALYST",
"display": "SB",
"remark": "Sifiso Bucibo",
"sort": 7
},
{
"id": 102,
"listname": "ANALYST",
"display": "SM",
"remark": "Sylvester Morema",
"sort": 48
},
{
"id": 103,
"listname": "ANALYST",
"display": "TO",
"remark": "Tullis Onstott",
"sort": 62
},
{
"id": 104,
"listname": "ANALYST",
"display": "TW",
"remark": "Tony Ward",
"sort": 74
},
{
"id": 105,
"listname": "ANALYST",
"display": "YY",
"remark": "Yasuo Yabe",
"sort": 77
}
],
"_links": {
"self": {
"href": "http://localhost:8000/api/v1/list-values?per-page=-1&filter%5Blistname%5D=ANALYST&page=1"
}
},
"_meta": {
"totalCount": 14,
"pageCount": 1,
"currentPage": 1,
"perPage": -1
}
}