Is there any tool available to check the API proxy difference which includes policies b/w environments.

Hi,

we have two environments 1)ppe,2)production. The API proxies deployed in both environments and we need to make sure the deployed proxies in these two environments have all policy configurations are the same.

Regards
Nandeesha

1 6 193
6 REPLIES 6

Hi @Nandeesha Kariyappa

There is no way to do a diff within the tool, but I usually recommend that using your Source code. What you could do is set the commit id (SHA) to the proxy description with some other info as well - like the branch. For example,

Description: commit c92a87b6348fbb335e39e670d05bde8ce383c76e from prod branch. Deployed by jenkins

So if you use CI/CD to push then you can use these commit IDs to check the code diff using git commands as well (assuming you are using Git)

Thanks for coming back and for the information. As a platform admin I need to see the difference in each API proxies and need to publish report. Git repository is owned by each individual API proxy owners so platform team don't have access.

Regards

Nandeesha

Is there any way or scripts to achieve by setting up automation and publish the report.?

Thanks

You might be able to make the Management API call to see the revision details but that will only give the list of files but not the file content difference between them

I would still push to check this in your source code. Probably have them include your team members to approve the Pull request so that you can check the code? My point is shouldn't this be checked, validated by Platform team before pushing it to the actual environment?

You can make various management calls to extract (export) API Proxy information.

So, you could write a script that:

  1. exports the 2 revisions of the API Proxy
  2. extracts the resulting ZIP files
  3. compares the extracted information.

This is an example of the API call for the first step:

curl -i -H 'Authorization: Basic ...' \
 -X GET \
 "https://api.enterprise.apigee.com/v1/o/$ORG/apis/$API/revisions/1?format=bundle"

Thanks Dino, let me take a look at it.