Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Azure API Management Import API always says: API with specified name already exists

I am trying to import an API I have into Azure API Management using swagger, should be fairly simple but I always get the same error:

One or more fields contain incorrect values: API with specified name already exists

I do not have ANYTHING setup in Azure API management yet, very frustrating.

UPDATE

I am using Swashbuckle (https://github.com/domaindrivendev/Swashbuckle) to add Swagger to my WebAPI project.

It is generating Swagger 2.0 docs.

Here is the info element of the Swagger Doc:

swagger: "2.0",
info: {
version: "v3",
title: "ShopZioAPIv3"
},

It does not matter what I change that to, I still always get:

One or more fields contain incorrect values: API with specified name already exists

like image 742
Slee Avatar asked Oct 27 '15 19:10

Slee


People also ask

How do I purge API Management Azure?

Purge a soft-deleted instanceApiManagement/locations/deletedservices/delete, Microsoft. ApiManagement/deletedservices/read. This will permanently delete your API Management instance from Azure.

What is named values in Apim?

Named values are a global collection of name/value pairs in each API Management instance. There is no imposed limit on the number of items in the collection. Named values can be used to manage constant string values and secrets across all API configurations and policies.

How can we expose APIs deployed in Azure to the external world?

This external exposure could be achieved using Azure Application Gateway forwarding requests to the internal API Management service, which in turn consumes the APIs deployed in the ASE.


1 Answers

I my case the title {"info":{"title": "API-NAME",... in the Swagger file did not match the name of the selected API (because we had created several test APIs).

Simply changing the string value fixed it.

like image 107
Christoph Petschnig Avatar answered Sep 26 '22 15:09

Christoph Petschnig