Skip to main content
Version: 4.2.5

Executing and hosting a Web API

To execute and host a Web API in iCore, you need to:

  • Create a Workflow that uses the Execute WebAPI definition activity.
  • Create a Component configuration and execute it in iCore runtime like you would any other Component. Typically you create an Event configuration and trigger it with an Event, such as the system Event __iCore_SystemStarted.
  • Once running, the Execute WebApi Definition activity starts a separate process called WebApiHost.exe which is the actual Kestrel server hosting the Web API. The activity will keep running and monitor this process, and will close the process when the Workflow is stopped (for example when the system is shut down or restarted). If the process terminates prematurely, the activity will report an error.
    note

    For security considerations on how to publish the Web API beyond the local machine or internal network, refer to Security guidelines.

See Also

Activities

Execute Web API definition

Web APIs

Security guidelines