I'm looking for a way to access the value stored in the ApiProxy tag called 'spec'. Below a part of it.
<APIProxy revision="1" name="TestApi"> ........ <Resources> <Resource>openapi://association.json</Resource> </Resources> <Spec>https://some-backendservice.com/docs/v1/swagger.json</Spec> ........ </APIProxy>
Is there a variable available for this?
I like to use this value to return the OpenApi or Swagger definition to the client and I don't want to define it more than once.
You should be able to get that info using the Get API Proxy Management API
curl -X GET https://api.enterprise.apigee.com/v1/organizations/{org}/apis/{api}/revisions/{revNumber} -H 'authorization: Basic {auth}' -H 'content-type: application/json'
The response json should contain the resourceFiles, resources and spec attribute. Not sure if that is exposed as a variable you can use. With the above, you can make a call, extract the response and store as a flow variable
User | Count |
---|---|
2 | |
1 | |
1 | |
1 | |
1 |