It’s no secret that the shift to DevOps deployments has taken center stage at organizations small and large. The ability to quickly configure, manage and update via APIs is critical to a company’s ability to push out small iterative changes, without human intervention. And Swagger has become the defacto standard of documenting API integration. Delivered via JSON or YAML, Swagger in its basic form is documentation for how to use APIs to integrate with another system. It defines the range of environmental variables that can be configured to interconnect systems.
Furthermore, properly implemented Swagger can offer you the ability not only to see available parameters and understand how they can be used, but also enables you to get hands-on experience by actually testing the API integration – sending calls and seeing responses, allowing further fine tuning.
In our quest to provide cutting edge products that offer easy configuration and integration, Imperva is excited to announce a growing list of Swagger support for our products. Furthermore, together with our partners at Zoomin Software, which helped us evolve our new documentation portal at docs.imperva.com, Imperva now provides our users dynamic support for Swagger. This post illustrates how to navigate and use the Swagger content.
Based on industry standard packages found at swagger.io, we implemented a dynamic Swagger environment that lets us easily deliver our Swagger documentation to you, so you can then test out our integration with the array of Imperva cloud products. Currently Swagger is available for our SaaS-based Cloud Application Security products, but will also be expanding into our on-premises WAF Gateway offering as well.
The following for example, illustrates our Policy Management Swagger documentation.
Authorizing and Testing Swagger
After conducting authorization with your API ID and Key, you can run calls to your environment and see the values returned, saving time and helping build a better, more effective API integration with the wide array of our cloud products.
Example of an API Call
The following is an example of the Retrieve all Policies in Account call. Note the Try it Out functionality, which after authorizing with your API ID and Key, allows you to send requests and see responses, to see how they’re handled. This helps you to better understand how to integrate with Imperva’s API environment.
Downloading API Definitions
You can also download the API definition from the documentation window, enabling you to import it into tools such as Postman for easier testing and integration, and also use it for auto generating client libraries in pretty much every programming language for easier consumption and integration.
Finding API Definitions on the Documentation Portal
You can easily list all Swagger Definitions files by clicking on the API Definitions link on the landing page.
Alternatively you can run an empty search, then under the filters select Document Type > API Definitions.
At Imperva, this is just one more way we’re leading the pack in providing our users cutting edge products with turnkey deployment and usage.
Try Imperva for Free
Protect your business for 30 days on Imperva.