I'm guessing the question is more about how to connect to your local machine from the OutSystems server (either on-premise or in the cloud).
For creating the rest service integration, you could generate a swagger file of the service and use that to generate the integration. The problem is with actually using the service. If you tell the server to go to localhost, it's going to try and find your service on the server itself. You'll need to use a url either with your computer name, or ip-adres instead of the localhost for that to work. And off course, a fysical connection between the OutSystems server and your machine.