Home > Storage > PowerMax and VMAX > Storage Admin > Dell PowerMax: Ansible Modules Best Practices > Making REST API calls with the Ansible URI module
Ansible modules for PowerMax are written to be idempotent, supporting the most common use cases and configurations in the published modules. Some user operations might not be supported in the modules. However, you can use the Ansible URI module to make direct calls to any API, including the PowerMax REST API, which will ensure that even your corner case can be supported in an Ansible playbook.
To work out the call, you need the PowerMax API documentation (available here). You can take the call from the documentation and translate into an Ansible task. The API documentation is also available for download from the overview page here.
The downloaded OpenAPI.json file can be imported into an API development tool such as Postman. Official documentation for the URI module from Ansible is here.
Figure 48 shows a simple GET call to the PowerMax API. The code can be downloaded from the example on GitHub here.
The method in this example is for a GET call. With REST, you can also do POST, PUT, and DELETE calls with the API. When doing a POST or PUT call, you must provide a payload body, using the body key in the Ansible task along with the payload in JSON, as shown in the example in Figure 42.