Add a New Record

Use the AddData endpoint to input a new record into a board.

AddData endpoint description
Description Adds a record into a board
URL /board/[boardname]/input/[inputviewname]
Method POST
Parameters
  • boardname

  • inputviewname

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

Parameters

AddData endpoint parameters
Variable Name Type Description Required
boardname String Name of the board to which the new record will be added True (URL)
inputviewname String Name of the view that contains the input fields for the record type True (URL)

Examples

JavaScript Call

Copy Code
//dataObject will be different for every board. It represents a record. 
var dataObject = {
title: 'newtitle'
published_date: DateTime.Now,
approval_status: 'Pending Approval'
originating_position: 'CMD EOC Director'
originating_user: 'WebEOC Administrator'
};
var newData = {
data: JSON.stringify(dataObject)
};
await fetch(`${baseUrl}/board/Press Release/input/Input`, { 
method: 'POST',
headers: { 'Content-Type': 'application/json' }, 
body: JSON.stringify(newData)
})

C# Call

Copy Code
public async Task AddData()
{
using (var httpClient = new HttpClient(httpClientHandler))
{
var dataObject = new
{
title = "newtitle"
published_date = DateTime.Now,
approval_status = "Pending Approval"
originating_position = "CMD EOC Director"
originating_user = "WebEOC Administrator"
};
string serializedData = JsonConvert.SerializeObject(dataObject); 
var newData = new
{
data = serializedData
};
var serializedInformation = JsonConvert.SerializeObject(newData); 
await httpClient.PostAsync($"{baseUrl}/board/Press Release/input/Input",
new StringContent(serializedInformation, Encoding.UTF8, 
"application/json"));
}
}