Using Postman for Creating F5 Virtual Servers and Pools

Postman is a powerful API development tool that can be used for creating and testing REST APIs. This tutorial will guide you through the process of using Postman to create F5 virtual servers and pools.
If you want to create just one object, let’s say a pool, you only need one request so you could put your config in a JSON format in the body of the POST request. But if you want to create more objects at once you will need to use JSON files.

Prerequisites

Creating a Pool

  1. Create a new collection
  2. Create a new request in Postman and select the “POST” method.
  3. Enter the URL for the pool endpoint, which is usually in the following format:
    https://<BIG-IP IP address>/mgmt/tm/ltm/pool.
  4. In the “Authorization” tab, enter your BIG-IP credentials using basic authentication.
  5. In the “Body” tab, select “raw” and enter the following JSON payload:
    {{requestBody}}
  6. In the Pre-request Script tab, you will need to put this:
    pm.variables.set(`requestBody`, JSON.stringify(pm.iterationData.toObject()))
  7. Run the collection, choose the pool JSON config file, and verify that the pools were created successfully by checking the response status code and body.

Creating a Virtual Server

  1. Create a new collection
  2. Open Postman and create a new request.
  3. Select the “POST” method and enter the URL for the virtual server endpoint, which is usually in the following format: https://<BIG-IP IP address>/mgmt/tm/ltm/virtual.
  4. In the “Authorization” tab, select “Basic Auth” and enter your BIG-IP credentials.
  5. In the “Body” tab, select “raw” and enter the following JSON payload:
    {{requestBody}}
  6. In the Pre-request Script tab, you will need to put this:
    pm.variables.set(`requestBody`, JSON.stringify(pm.iterationData.toObject()))
  7. Run the collection, choose the virtual server JSON config file, and verify that the virtual servers were created successfully by checking the response status code and body.

Besides creating objects, the API permits you to modify, list and delete objects. It uses standard HTTP methods (such as GET, POST, PUT, and DELETE) to perform the following CRUD operations (Create, Read, Update, Delete).

Conclusion

By following these steps, you should be able to successfully create F5 virtual servers and pools using Postman. This is just a basic example and the JSON payload can be modified to include additional configurations and options as needed. Happy API testing!

About the author

Mihai is a Senior Network Engineer with more than 15 years of experience