Edit a Group
Edit values for a particular group in WebEOC Nexus using the EditGroup endpoint.
| Description | Edit information for an existing group in WebEOC Nexus |
|---|---|
| URL | /groups/{groupname} |
| Method | POST |
| Parameters |
|
Review the parameter definitions and examples of how to use the EditGroup endpoint in JavaScript and C# calls.
Parameters
| Variable Name | Type | Description | Required |
|---|---|---|---|
| groupname | String | Name of the WebEOC Nexus group to be edited | True (URL) |
| name | String | New, edited name of the WebEOC Nexus group | False |
| comment | String | Description of the group | False |
| organizational | Boolean |
|
False |
| assignedPositions | String array | WebEOC Nexus positions associated with the group | False |
| assignedIncidents | String array | WebEOC Nexus incidents associated with the group | False |
Unassigned parameters will not be edited or changed.
Examples
JavaScript Call
Copy Code
var newGroup = {
groupName: 'Old Group Name',
name: 'New Group Name',
comments: 'Different comments.',
organizational: false,
assignedPositions: ['CMD EOC Director', 'CMD Incident Commander'],
assignedIncidents: ['Incident A', 'Incident B']
};
await fetch(`${baseUrl}/groups/Group B`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify(data)
})
C# Call
Copy Code
public async Task EditGroup()
{
using (var httpClient = new HttpClient(httpClientHandler))
{
var newGroup = new
{
groupName = "Old Group Name",
name = "New Group Name",
comments = "Different comments.",
organizational = false,
assignedPositions = new String[] {"CMD EOC Director", "CMD Incident Commander"},
assignedIncidents = new String[] { "Incident A", "Incident B"
}
};
var serializedInformation = JsonConvert.SerializeObject(newGroup);
await httpClient.PostAsync($"{baseUrl}/groups/Group A",
new StringContent(serializedInformation, Encoding.UTF8, "application/json"));
}
}