Load a saved config file, run traffic and get stats

Full sample script.

Note:You must enter your IxLoad version in the data in Step 1

Step 1: Create a session
POST: data={"ixLoadVersion":""} application/JSON

# Step 2: Get the session ID and the Object ID

# Step 3: Activate the session
POST:<session Id>/operations/start application/JSON

# Verify that the session ID is activated
GET:<session Id>

# Step 4: Load a saved config file
POST:<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:<session Id>/ixload/test/operations/loadTest/<operations Id>

# Step 6: Run test
POST:<session Id>/ixload/test/operations/runTest

# Step 7: Get the Operations ID number from Step 6 returned *headers*

# Verify the POST action
# status="In Progress|successful", state="executing|finished"
GET:<session Id>/ixload/test/operations/runTest/<operations Id>

# Step 8: Get Stats
GET:<session Id>/ixload/stats
GET:<session Id>/ixload/stats/FTPClient
GET:<session Id>/ixload/stats/FTPServer

# Verify session ID status
# GET currentState="Running|Stopping Run|Cleaning|Unconfigured"
GET:<session Id>/ixload/test/activeTest

# Step 9: Delete the session ID
DELETE:<session Id> data={} application/JSON

# Two Steps to abort a running test.
Step 1: Abort the running test. 
response = requests.post('<session Id>/ixLoad/test/operations/abortAndReleaseConfigWaitFinish')

Step 2: Verify the abortion is complete before continuing
objectId = response.headers['Location']
objectId = objectId.split('/')[-1]
requests.get('<session Id>/ixLoad/test/operations/abortAndReleaseConfigWaitFinish'+"/"+str(objectId))

# Apply a configuration

# Get active test current state:
response = requests.get(sessionIdUrl+'/ixLoad/test/activeTest')