It’s possible to group commands together and then have the F5 process them, if one fails, then the config is rolled back the the transaction in voided. Here’s an example from the documentation:
Create a transaction that will group commands together: POST https://192.168.25.42/mgmt/tm/transaction Then the POST with the transaction ID: POST https://192.168.25.42/mgmt/tm/ltm/poolX-F5-REST-Coordination-Id:1389812351{ "name":"tcb-xact-pool", "members": [ {"name":"192.168.25.32:80","description":"First pool for transactions"} ]} Commit transaction: PATCH https://localhost/mgmt/tm/transaction/1389812351{ "state":"VALIDATING” }