Hi,
We are using Jenkins pipeline to make Apigee API calls for creating the apipoxy. Here is code for jenkins pipeline:
Solved! Go to Solution.
Invalid bundle can mean ... lots of things. One possibility is that your bundle is referencing a policy that is not included in the bundle. Or maybe your bundle is missing a target endpoint. Another possibility is that one of your XML files is malformed.
May I suggest that you run apigeelint on the bundle before uploading the bundle to the management server? Apigeelint gives you clear error messages and warnings about such things, as well as many other style or usage problems.
If you cannot do that, then, I suggest that you examine the full error message returned from the management server with the 400 status code. Usually there is an error message that specifies exactly what the problem is. If you cannot do that, ,then.... perhaps consult the system.log for the management server. I am guessing that you are using OPDK, from the http:// scheme on the management server URL. If you are using OPDK then you have access to the system.log of the management server and it may have a message there that describes the problem with the invalid bundle.
@deepak-1 wrote:
It is sating messaging.config.beans.InvalidBundle error. It shows zip has some issues.
Can you be SPECIFIC about "some issues"? When you download the apiproxy.zip and try to upload it (==import it into Apigee, I guess) via a curl command, WHAT IS THE COMPLETE ERROR MESSAGE? If you run curl with the -i option, you will see the response payload with the error message.
Or you can run apigeelint on that zip file.
good luck
GREAT. I'm glad to hear you resolved the problem. The correct structure for an API proxy zip bundle is, the folder apiproxy must be the containing directory for all assets. An example is here:
Length Date Time Name
--------- ---------- ----- ----
0 10-17-2023 11:30 apiproxy/
338 10-12-2023 13:52 apiproxy/name-of-api-proxy-here.xml
0 10-17-2023 11:33 apiproxy/targets/
1530 10-17-2023 11:33 apiproxy/targets/target-endpoint-here.xml
0 10-17-2023 11:32 apiproxy/policies/
373 10-09-2023 12:58 apiproxy/policies/policies-here.xml
396 10-12-2023 15:00 apiproxy/policies/...
0 10-17-2023 11:33 apiproxy/proxies/
2759 10-17-2023 11:33 apiproxy/proxies/proxy-endpoint-here.xml
The documentation for this is here.