1

I'm trying to create a new API Management Service (AMS) on Azure. I'm facing an issue I have never had before. I have my OpenAPI file in a public URL. If I paste this URL to create a new APIs in AMS, I always receive an error

Unable to download specified file. Please ensure the URL is valid and the file is publicly accessible.

enter image description here

Then, I tried to download this OpenAPI definition from the Azure Console and it can reach the file and download it. This issue happens from yesterday before I could use the same OpenAPI file without problem.

Also, I checked the configuration of the Virtual Machine where the APIs are hosted. It seems correct and I can reach the file from a browser.

9
  • I assume the error you met comes from the url. When I call http://51.137.177.245:8000/openapi.json, I got the json response but not started to download so that it said unable to download .... By the way, I copied the response and save it as a json file locally, but when I uploaded the file, I met the error of unable to parse specified file, then I checked and found that you missed servers.url. After adding a value, it could be uploaded successfully.i.sstatic.net/IJ0v4.png i.sstatic.net/iPJrO.png Commented Apr 15, 2021 at 9:27
  • Here's a doc describes restrictions on api import. It refers users to go to azure apim to choose an existing api to see the format for openapi. i.sstatic.net/CQsKq.png Commented Apr 15, 2021 at 9:30
  • Thank you so much for this help. I missed the server url parameter. I don't know the unable to download... error. What kind of configuration is required to avoid that? Commented Apr 15, 2021 at 9:53
  • Maybe related to the ip address. Can you use a domain instead? I upload my json file into azure storage blob. And I can use the file url into apim. i.sstatic.net/uwmuu.png Commented Apr 15, 2021 at 9:59
  • 1
    I use the same url as yours. Put http://51.137.177.245:8000/openapi.json into field OpenAPIspecification, then got the error Unable to down specified file. Please ensure the url is valid ..., Didn't use any tools here. Commented Apr 15, 2021 at 13:39

2 Answers 2

1

The error of unable to download ... perhaps comes from the ip address url, because when I fill the field with an azure storage blob url, I received no error.

enter image description here

And I saved your request response into a json file locally and upload it to apim, I got the error of unable to parse specified file, I found it resulted from missing servers.url.

I think you can try to add api instance by uploading json file from localhost.

Sign up to request clarification or add additional context in comments.

Comments

1

After a long call with Microsoft support, I found the issue. In the Network Security Groups, I added a new Inbound Security Rule.

First, Source. I saw there is an option for Service Tag. If I select Service Tag, the following dropdown change the label in Source service tag. From this dropdown, you there is an option for ApiManagement.

Wrong choice. You have to allow select IP from the dropdown list and type the IP of the API Management Service.

I have create a post on my blog to explain step by step what you have to do. Hopefully, it could be useful.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.