0
votes

I am trying to create API using Azure API Management service. For this I have a service which is deployed to Azure web server and returns XML response as shown below: XML Response

I am trying to integrate this endpoint on Azure API management service instance, but getting error as shown below: Error on adding endpoint

I am fairly new to this, and need help about the cause of the issue and what other things that I have missed. Also, what kind of end point can we give the API field when creating API

1
Are you trying to import REST based API ? - Baskar Rao
The URL that you specify on second screenshot, does it return WADL document or data this XML Response? - Vitaliy Kurokhtin

1 Answers

0
votes

When importing your API, you need to provide the URL which could return the specification of your API(not the URL of your API). As you choose WADL format, please provide a URL which could return specification of your API as following format.

<resources base="http://xx.domain.com/api/">
  <resource path="newsSearch">
    <method name="GET" id="search">
      <request>
        <param name="p1" style="query" type="xsd:int" default="1"/>
        <param name="p2" style="query" type="xsd:string" default="abc"/>
      </request>
      <response status="200">
        <representation mediaType="application/xml" element="yn:ResultSet"/>
      </response>
      <response status="400">
        <representation mediaType="application/xml" element="ya:Error"/>
      </response>
    </method>
  </resource>
</resources>

If your API is created by ASP.NET Web API, you could generate swagger format specification using Swashbuckle. Then you could import your API specification by choosing Swagger format.