none
Create API products based on a grouping of API Methods or Verbs?

    Question

  • I have a single swagger definition defining a bunch of GET, POST, PUT, and DELETEs for dozens of resources. I would like to use Azure's APIM to create various products based on groupings of API endpoints. But, when I import the swagger definition and create a product there is no option to select endpoints. The product is simply all the API endpoints in the swagger document. Is there a way that I can accomplish this without creating multiple swagger definitions? 
    Tuesday, May 21, 2019 9:03 PM

All replies

  • Well, here is what I did that moves me forward a bit, but I do not know if this is the preferred way, or just a hack. 

    1) Create a new API based on my existing swagger definitions. Call it API1

    2) Remove the API methods I don't want in API1

    3) Create another API based on my existing swagger definitions. Call it API2 and give it a URL Suffix

    4) Remove the API methods I don't want in API2

    Now I have two distinct APIs and can create distinct products - one product for API1, another for API2, and another product that allows access to both API1 and API2.

    Is this the correct approach to deal with my scenario?

    Tuesday, May 21, 2019 9:32 PM