Load a saved config file, run traffic and get stats
Note:You must enter your IxLoad version in the data in Step 1
Step 1: Create a session POST: http://192.168.70.10:8080/api/v0/sessions data={"ixLoadVersion":"8.00.0.140"} application/JSON # Step 2: Get the session ID and the Object ID GET: http://192.168.70.10:8080/api/v0/sessions # Step 3: Activate the session POST: http://192.168.70.10:8080/api/v0/sessions/<session Id>/operations/start application/JSON # Verify that the session ID is activated GET: http://192.168.70.10:8080/api/v0/sessions/<session Id> # Step 4: Load a saved config file POST: http://192.168.70.10:8080/api/v0/sessions/<session Id>/ixload/test/operations/loadTest data={"fullPath":"C:\\Results\\tcp_8.0.rxf"} application/JSON # Step 5: Get the Operations ID number from Step 4 returned *headers* # Verify the load config POST action # status="In Progress|successful", state="executing|finished" GET: http://192.168.70.10:8080/api/v0/sessions/<session Id>/ixload/test/operations/loadTest/<operations Id> # Step 6: Run test POST: http://192.168.70.10:8080/api/v0/sessions/<session Id>/ixload/test/operations/runTest application/JSON # Step 7: Get the Operations ID number from Step 6 returned *headers* # Verify the POST action # status="In Progress|successful", state="executing|finished" GET: http://192.168.70.10:8080/api/v0/sessions/<session Id>/ixload/test/operations/runTest/<operations Id> # Step 8: Get Stats GET: http://192.168.70.10:8080/api/v0/sessions/<session Id>/ixload/stats GET: http://192.168.70.10:8080/api/v0/sessions/<session Id>/ixload/stats/FTPClient GET: http://192.168.70.10:8080/api/v0/sessions/<session Id>/ixload/stats/FTPServer # Verify session ID status # GET currentState="Running|Stopping Run|Cleaning|Unconfigured" GET: http://192.168.70.10:8080/api/v0/sessions/<session Id>/ixload/test/activeTest # Step 9: Delete the session ID DELETE: http://192.168.70.10:8080/api/v0/sessions/<session Id> data={} application/JSON # Two Steps to abort a running test. Step 1: Abort the running test. response = requests.post('http://192.168.70.10:8080/api/v0/sessions/<session Id>/ixLoad/test/operations/abortAndReleaseConfigWaitFinish') application/JSON Step 2: Verify the abortion is complete before continuing objectId = response.headers['Location'] objectId = objectId.split('/')[-1] requests.get('http://192.168.70.10:8080/api/v0/sessions/<session Id>/ixLoad/test/operations/abortAndReleaseConfigWaitFinish'+"/"+str(objectId)) # Apply a configuration requests.post(sessionIdUrl+'/ixLoad/test/operations/applyconfiguration') # Get active test current state: response = requests.get(sessionIdUrl+'/ixLoad/test/activeTest') response.json()['currentState']