Get Sub Items

To review all sub items associated with a list item, use the GetSubItemsList call.

Sub items are not returned by this method.

GetSubItemsList endpoint description
Description Gets a list of sub items associated with a list item
URL /lists/[listName]/listitems
Method GET
Parameter

listName

Return Type WebEOCListItem array
Sample JSON Response
Copy Code
{
    "status": "success",
    "data": [
        {
            "color": "#FF9900",
            "name": "SubItem01",
            "subitems": null
        },
        {
            "color": "000000",
            "name": "SubItem02",
            "subitems": null
        }
    ],
        "meta": {
        "count": 2
    }
}
                        

Review the parameter definitions and examples of how to use the GetSubItemsList endpoint in JavaScript and C# calls.

Parameter

GetSubItemsList endpoint parameter
Variable Name Type Description Required
listName String Name of the WebEOC Nexus list you want to retrieve information on True (URL)

WebEOCList: Custom Objects

The WebEOCList, returned when using the GetSubItemsList endpoint, contains several unique, custom objects.

Custom objects members
Member Name Type Description
name String Name of the list item
color Hex color code string Color associated with the list item
subitems List of WebEOCListItems Recursive list of itself

Examples

JavaScript Call

Copy Code
await fetch(`${baseUrl}/lists/list01/listitem01/listitems`)
.then((response) => response.json())

C# Call

Copy Code
public async Task<WebEOCListItem[]> GetSubItemsList()
{
using (var httpClient = new HttpClient(httpClientHandler))
{
var response = await 
httpClient.GetAsync($"{baseUrl}/lists/list01/listitem01/listitems");
var data = await response.Content.ReadAsStringAsync();
return JsonConvert.DeserializeObject<WebEOCListItem[]>(data);
}
}