How to pass a list of values to an Umbraco API plugin controller action?
I have the following action in my controller:
namespace web.site.Controllers
{
[PluginController("MyObject")]
public class MyObjectApiController : UmbracoAuthorizedJsonController
{
public MyObjectApiController()
{ }
public void Delete(List<int> ids) {
foreach (var id in ids)
{
// ....
}
}
}
}
I cannot find the right "wire format" for the ids parameter. I've tried the following:
ids[0]=123&ids[1]=456;ids[]=123&ids[]=456;ids=123&ids=456.
Every time the action is called but ids is null. What is the right way to serialize a list of values for the action parameter?