Bundle is invalid. Unable to read/find APIProxy contents

Not applicable

I am trying to import an API Bundle and it failed to import with the below error.

API proxy import failed. Time elapsed: 0:00

Server Error.

Bundle is invalid. Unable to read/find APIProxy contents

This is simple weather API and I trying to understand the API import process.

I created the folder structure per API tutorial

http://apigee.com/docs/api-services/tutorials/part-1-create-your-api-xml

I noticed when I unzip the bundle, my mac add .DS_Store file to every folder. I tried to force delete it but it gets created immediately again. Is API failed due to DS_Store file? Any insight would be really appreciated.

Solved Solved
0 9 3,640
2 ACCEPTED SOLUTIONS

akoo
Participant V

In the ZIP you uploaded, weatherxml is your first directory-- that is causing the error you see. When you ZIP your directories, the first folder you should see is apiproxy. So if you are performing the typical 'compress' on OSX, your file name will most likely be apiproxy.zip.

View solution in original post

Hi @Grand,

Looks like the your zip file is not in the right structure -

Pls refer here - http://apigee.com/docs/api-services/reference/api-proxy-configuration-reference

When you unzip the weatherxml.zip -> it should give you the apiproxy folder, In your case it shows me weatherxml -> apiproxy, thats the reason for the error

attached the right version, your zip also should look like that

View solution in original post

9 REPLIES 9

Not applicable

Hi @Grand. your error might be related to the structure of you API proxy rather than the .DS_Store folders. You can leverage Apigeetool to import the bundle from the command line. Also, please attach it to your posting to troubleshoot it further.

I attached the screenshot with error, folder structure and zip folder that I am trying to attached. Please have a look and advise further

akoo
Participant V

In the ZIP you uploaded, weatherxml is your first directory-- that is causing the error you see. When you ZIP your directories, the first folder you should see is apiproxy. So if you are performing the typical 'compress' on OSX, your file name will most likely be apiproxy.zip.

Hi @Grand,

Looks like the your zip file is not in the right structure -

Pls refer here - http://apigee.com/docs/api-services/reference/api-proxy-configuration-reference

When you unzip the weatherxml.zip -> it should give you the apiproxy folder, In your case it shows me weatherxml -> apiproxy, thats the reason for the error

attached the right version, your zip also should look like that

Thanks Everyone. That's fixed the issue.

@Mukundha Madhavan I am also having the same issue. Can you take a look at my zip to see what is wrong with it.apiproxy.zip

@daniel.biales , As @Alex Koo said in below answer, All the folders should be inside apiproxy directory.

Your current structure of folder, when extracted, is,

  • proxy-name
    • policies
    • proxies
    • proxy-name.xml
    • targets

It should be,

  • apiproxy
    • policies
    • proxies
    • proxy-name.xml
    • targets

See the same proxy zip below, which is working as expected,

apiproxy.zip

@Anil Sagar This is what I see when I unizip. Is there something I'm missing? it looks like it matches your description. I'll reupload my zip to my comment just in case I uploaded the wrong one. Also when I download the zip that I uploaded it looks like it changes the name so then when I unzip the root folder is the different name (3765-apiproxy).

3766-screen-shot-2016-10-18-at-14622-pm.png

I don't know what the issue was but I was able to solve it