Search code examples
c#apiasp.net-web-apiwso2-api-managerrestful-architecture

Wso2 asp net web api management


Morning Guys

I've been trying to manage an API created in asp.net WebApi, with the WSO2 Api Manager.

I've used the following doc with no sucess: https://docs.wso2.com/display/AM200/Create+and+Publish+an+API.

The sample shows the use of ".asmx" endpoint, and in my case I have a simple http url (http://sample.enterprise.com/api/TestService), I want to http get a jsont result by WSO2 using an url like this.

Any clues ? Thanks


Solution

  • WSO2 documentation is not great. The link you provided guides you through Designing and Publishing an API, but nowhere do I see any explanation for publishing an existing API. You essentially have two choices:

    1. Choose Design New API and define the resources exactly as they are defined in your existing API (name, action, and required parameters much match exactly). Once you reach the Implement tab, choose Managed API and provide the production endpoint for your API. If this sounds overly complicated, you also have...
    2. Choose I have an existing API and import your API's swagger definition from file or API endpoint. Keep in mind that importing swagger directly from your API requires connections between your Publisher node and the API endpoint if you have a distributed API Manager deployment strategy.

    You can find tools to help you generate a swagger definition for your APIs here. For Web API projects like ours, you might want to consider using swashbuckle from the nuGet repository.