Enate Forum Home

Swagger API Explanations

How can I access swagger?
How do I get WebAPI key on swagger?

You access the API documentation (produced by Swagger as you say) at https://Your.Platform.Name/YourInstance/WebAPI

To test the calls in the Swagger interface you need to be authenticated. There are 2 ways you can do this:

  1. Make a call to the Authentication/Login method with useCookie = true. You then don’t need a WebAPI key as subsequent calls in Swagger from the same browser session will be authenticated with the Cookie.
  2. Make a call to the Authentication/Login method with useCookie = false. You can then use the response to this call as the api_key in the top-right of the Swagger interface for all subsequent calls in Swagger.

In a production scenario which method you use will likely depend on your client.

  • For applications which can securely hold local variables and which don’t natively deal with cookies you will likely find it easier to authenticate with useCookie=false and to then supply the token in either the HTTP header of your subsequent requests (header name is “apikey”) or in the Query String (parameter name is “authToken”).
  • For browser based applications which cannot securely store the token then authenticating with useCookie = true would be the recomended approach.