Add a List

Add a new list to WebEOC Nexus using the AddList endpoint.

AddList endpoint description
Description Adds a new list to WebEOC Nexus
URL /lists
Method POST
Parameters

listname

Review the examples of how to use the AddList endpoint in JavaScript and C# calls.

Parameter

Add a List parameter
Variable Name Type Description Required
listname String Name of the list you want added to WebEOC Nexus False

Examples

JavaScript Call

Copy Code
var date = new Date(); 
var newList = {
list: {
name: "New List"
}
};
await fetch(`${baseUrl}/lists`, { 
method: 'POST',
headers: { 'Content-Type': 'application/json' }, 
body: JSON.stringify(newList)
})

C# Call

Copy Code
public async Task AddList()
{
using (var httpClient = new HttpClient(httpClientHandler))
{
var newList = new
{
name = "New List"
};
var serializedInformation = JsonConvert.SerializeObject(newList);
await httpClient.PostAsync($"{baseUrl}/lists",
new StringContent(serializedInformation, Encoding.UTF8, "application/json"));
}
}