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.
| 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
|
Review the parameter definitions and examples of how to use the GetSubItemsList endpoint in JavaScript and C# calls.
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.
| 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);
}
}
Related Concepts
Related Tasks