Instantly starting 12 imaging sessions using Web API

Imagine you have 12 TaskForce ports switched to Source mode and source drives plugged into them. Now you can instantly launch 12 imaging sessions simply starting the script.

Python script utilizes /start-image API request and prints task keys of all launched imaging sessions.

import sys

if sys.version_info[0] < 3:
    raise Exception("Please use Python 3 to run this script")

import urllib.request

ports = ["SATA1", "SATA2", "SATA3", "SATA4", "SATA5", "SATA6", "SAS1", "SAS2", "SAS3", "SAS4", "SAS5", "SAS6"]
tasks = []
errors = {}

for port in ports:
        res = urllib.request.urlopen("" % (port))
    except urllib.error.HTTPError as e:
        errors[port] =

print("IDs of started imaging tasks:")

The script works in any operating system. To run, perform the following actions:

  1. Save the script into file.
  2. Replace with IP address of your TaskForce.
  3. Replace //Vitaliy/Share with your shared network folder path.
  4. Execute the script in the console: python

For more information about these and other commands, please look up the API documentation that we made available to public.

Back to Manual start page