Skip to main content

Running the REST API as a Windows service

Run the REST API as a Windows service. This enables Incentives to run on start-up so you don't have to start the REST API again whenever you turn on the computer.

  1. Open the Command Prompt as an administrator.

  2. Run this command:

    sc create "Incentives REST API" binpath= "C:\Program Files (x86)\Incentives\RestAPI\RESTAPI.exe"

    Note

    C:\Program Files (x86)\Incentives\RestAPI is the default installation directory. If it is installed elsewhere, you must replace the binpath with the directory where you installed the REST API.

  3. Optional: If you want the REST API service to restart upon failure, run this command:

    sc failure "Incentives REST API" reset= 0 actions= restart/1000
  4. Run this command to start the REST API:

    sc start "Incentives REST API"