Download the RestServer Package via the Plugin Manager in Unity by selecting Packages: My Assets in the Package Manager. If you don’t have the Package Manager tool window, you can enable it via the Menu Window -> Package Manager.
Select the Rest Server Package click on Download on the right side window pane.
After a short download you can Import the package into the project. Make sure that all files are selected (by clicking All) and click Import.
Create a new GameObject
Add the RestServer as a component to the created GameObject
Make sure AutoStart is set to true (or provide your custom start method) and the GameObject is enabled. Everything is now setup and new endpoints can be registered.