Forum Discussion
Chause1
Cirrus
Jan 30, 2023POSTMAN multiple pool creation
Good day, We are looking at using POSTMAN to "script" pool creations. I am able to submit one pool at a time to the device but when I attempt multiple pools it fails with a 400 error. "code": 400...
mihaic
MVP
Feb 01, 2023I've managed to create pools via Postman. You will need to a collection and under it the post request.
Then you need a file containing your configuration of the pools, under your user ~/Postman/files/ folder.
here is an example of a file:
[
{
"name": "pool1",
"loadBalancingMode": "least-connections-node",
"monitor": "/Common/tcp",
"members": [
{
"name": "8.8.8.8:10779"
} ,
{
"name": "1.1.1.1:80"
}
]
},
{
"name": "pool2",
"loadBalancingMode": "round-robin",
"monitor": "/Common/tcp",
"members": [
{
"name": "9.9.9.9:10779"
},
{
"name": "2.2.2.2:443"
}
]
}
]
You also need to put this under the Pre-request Script:
pm.variables.set(`requestBody`, JSON.stringify(pm.iterationData.toObject()))
Under the body, select raw and JSON type and put this:
{{requestBody}}
Then you have to run the Collection and select the above file.
And that's it.
I've also created a collection for creating a VIP.
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects