Forum Discussion
Not able to create transaction - iControl REST
I am not able to get the transaction ID while trying to create one:
.\curl.exe -u XX:XX -kv -H "Content-Type: application/json" -X POST https://bigip/mgmt/tm/transaction
Getting the following response back:
{"code":400,"message":"request.body","referer":"172.23.126.248","restOperationId":23376297,"errorStack":["java.lang.IllegalArgumentException: request.body","at com.f5.rest.common.RestRequestSender.validateAndCloneRequest(RestRequestSender.java:118)","at com.f5.rest.common.RestRequestSender.sendRequest(RestRequestSender.java:477)","at com.f5.rest.workers.ForwarderPassThroughWorker.cloneAndForwardRequest(ForwarderPassThroughWorker.java:389)","at com.f5.rest.workers.ForwarderPassThroughWorker.onForward(ForwarderPassThroughWorker.java:220)","at com.f5.rest.workers.ForwarderPassThroughWorker.onPost(ForwarderPassThroughWorker.java:428)","at com.f5.rest.common.RestWorker.callDerivedRestMethod(RestWorker.java:1049)","at com.f5.rest.common.RestWorker.callRestMethodHandler(RestWorker.java:1009)","at com.f5.rest.common.RestServer.processQueuedRequests(RestServer.java:1002)","at com.f5.rest.common.RestServer.access$000(RestServer.java:45)","at com.f5.rest.common.RestServer$1.run(RestServer.java:248)","at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)","at java.util.concurrent.FutureTask.run(FutureTask.java:262)","at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)","at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)","at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)","at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)","at java.lang.Thread.run(Thread.java:744)\n"]}
Running BIG-IP: 11.5.1
2 Replies
Hello,
Where is the json body that is supposed to be sent ?
Here is a sample of what I use with Python's requests module. I send an empty payload which seems to work.
uri = "https://IP/mgmt/tm/transaction" response = bigip.post(uri, data=json.dumps({}))This will return a JSON response with a transId value, which must be passed into every other request that should be part of the transaction. The transId value should be passed as the value to the header "X-F5-REST-Coordination-Id".
headers = {'X-F5-REST-Coordination-Id': transId}
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* 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