Size of Proxy or Shared Flow

Is there a way to get the size of ZIP of Proxy or Shared Flow without downloading it via Management API?

0 2 76
2 REPLIES 2

no, I don't know of one.  
You must export the bundle and examine the zip. If you know the revision number, it's a single API call that looks like this: 

curl -i -H "Authorization:Bearer $TOKEN" https://apigee.googleapis.com/v1/organizations/$ORG/apis/$APIPROXY/revisions/$REVISION?format=bundle

The output will tell you the size of the zip: 

HTTP/2 200 
content-type: application/octet-stream
vary: Origin
vary: X-Origin
vary: Referer
date: Mon, 14 Feb 2022 22:52:46 GMT
server: ESF
content-length: 1989144
x-xss-protection: 0
x-frame-options: SAMEORIGIN
...

From the content-length header in the response, I can see that proxy is 1989144 bytes, including all embedded resources.

You might think, can i use HEAD? Will it tell me the size of the bundle without forcing me to download it?,  Nice idea, but that's not possible. The Apigee API does not support  the HTTP HEAD verb.

 

@dchiesa1  thank you for your answer!