Hello all,
We have a few APIs that have WSDLs and XSDs that are zipped together and published along with the API product file and the API yaml.
We need to wrangle some data out of APIC using the apic CLI tool. Currently we can get everything we need with `apic products:get --scope catalog -s $SERVER -c $CATALOG -o $ORG --format json --output - $PRODUCT` and then parse the output.
This works great until we run into one of our API products that includes a zip file. In that case, `apic products:get` returns the zip file as a binary blob before the API's swagger definition.
Does anyone have an idea how we can strip off the binary blob so we can parse the remaining json? This is all on the CLI, so jq, sed, cut, and other *nix built-ins are all fair game to use.
The data we are mining is the API product and version and all the contained APIs and their respective versions. `apic products:get` makes this very easy to parse out so we can track this data through all our environments, but other approaches and ideas are most welcome.
To give you an idea of what we are dealing with, here is a image of this output opened in a text editor. I've cut it off just after the output changes from binary to json:
Thanks in advance!
Kind regards,
Tyler C. Hayward