Edit a Sub Sub Item

Use the EditSubSubItem call to revise the name or associated color of a sub sub list item in any WebEOC Nexus list.

EditSubSubItem endpoint description
Description Renames or revises the color of a sub sub item
URL /lists/[listname]/[listItemName]/[subItemName]/[subsubItemName]
Method POST
Parameters
  • listName
  • listItemName
  • subItemName
  • subsubItemName
  • name
  • color
Return Type WebEOC ListItem
Sample JSON Response
Copy Code

{
    "color": null,
    "name": "List01",
    "subitems": [
        {
            "color": null,
            "name": "ListItem01",
            "subitems": [
                {
                    "color": null,
                    "name": "SubItem01_Added",
                    "subitems": [
                        {
                            "color": null,
                            "name": "SubsubItem01_Updated"    
                        }
                    ]
                }
            ]
        }
    ]
}
                        

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

Parameters

EditSubSubItem endpoint parameters
Variable Name Type Description Required
listName String Name of the list in WebEOC Nexus that contains the sub sub item you want to edit True (URL)
listItemName String Name of the list item in WebEOC Nexus that contains the sub sub item you want to edit True (URL)
subItemName String Name of the sub item that contains the sub sub item you want to edit True (URL)
subsubItemName String Name of the sub sub item to edit True
name String New name for the sub sub item  
color Strings New color to associate with the sub sub item  

If you do not select or specify a color attribute, a color is not associated with the list item; any existing values in WebEOC Nexus are not affected.

WebEOCListItem: Custom Objects

The WebEOCListItem, returned when using the EditSubSubItem endpoint, contains several unique, custom objects.

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

Examples

JavaScript Call

Copy Code
var list = {
name: "SubItem01_Updated"
};
await fetch(`${baseUrl}/lists/list01/listitem01/subitem01/subsubitem01`, { 
method: 'POST',
headers: { 'Content-Type': 'application/json' }, 
body: JSON.stringify(list)
})
.then((response) => response.json())

C# Call

Copy Code
public async Task<WebEOCListItem> EditSubSubItem()
{
using (var httpClient = new HttpClient(httpClientHandler))
{
var list = new
{
name = "SubItem01_Updated"
};
var serializedInformation = JsonConvert.SerializeObject(list); 
var response = await
httpClient.PostAsync($"{baseUrl}/lists/list01/listitem01/subitem01/subsubi tem01",
new StringContent(serializedInformation, Encoding.UTF8, "application/json"));
var data = await response.Content.ReadAsStringAsync(); 
return JsonConvert.DeserializeObject<WebEOCListItem>(data);
}
}