I am using a method in my controller which imports data from an API. This method I am wanted to be called from two locations. First the view (currently working) and secondly a javascript function.

Start of controller method:

```
[ActionName("ImportRosters")]
    [HttpPost]
    public ActionResult PerformImportRosterData(int id, int? actualLength, int? rosterLength)
    {
        var authenticator = Authenticator(id);
        var rosters = authenticator.Api().RosterData().ToDictionary(x => x.Id);

        var databaseRosterDatas = SiteDatabase.DeputyRosterData.Where(x => x.SiteID == id)
            .ToDictionary(x => x.Id);

```

Javascript Function:

```
$("#btnDeputyRunNowUpdate").click(function() {
    $("#btnRunDeputyNow").modal("hide");
    ActualLength = $("#actualRunLength").val();
    RosterLength = $("#rosterRunLength").val();
    $.ajax({
        type: "POST",
        url: "/deputy/PerformImportRosterData",
        data: { SiteIDRoster, ActualLength, RosterLength }
    });
    SiteIDRoster = null;
    location.reload();
    $("#btnRunDeputyNow").modal("hide");
    toast.show("Import Successful", 3000);
});

```

All values are being set but i am getting a 404 error on the url line
*POST <https://example.org/deputy/PerformImportRosterData> 404 ()*

I need a way to be able to call this c# method from both html and JS