Running a Python Script is a method to execute a sequence of custom operations within FTK Central
Steps to use this feature with Python and FTK Central
- Step 1: Install Python on the FTK machine
- Step 2: Install the "Requests" library for Python in order to simplify working with HTTP requests.
- Step 3: Install the SDK (Recommended))
- Step 4: Generate the API key and save it in a text file
- Step 5: Things to modify and consider before running the Python API script (Not always applicable))
- Step 6: Use the scripts to push automation tasks
Step 1: Make sure you have Python installed on the FTK machine
- Check if you have the latest version of Python installed on your machine.
- If not make sure you download it from here choosing the latest version.
- Check if the installation was successful by entering following command in CMD: python --version
Step 2: Install the "Requests" library for Python in order to simplify working with HTTP requests.
- The 'Requests' module allows you to send HTTP requests using Python. More information you can find here.
- You can check the latest version of the library here.
- Open CMD
- Type in following command: pip install requests
After the install, check if the installation was successful by running following command:
- Option 1;
pip list
- Option 2;
pip show requests (this is valid for checking any package pip show <packagename>)
Step 3: Install the FTK-API-SDK
- The SDK helps simplify the way python scripts are written. It helps avoid including large pieces of code in the automation API scripts. Therefore it is highly advisable to install it
- Download the SDK from the following GitHub repository by right-clicking on "Code" and choosing "Download ZIP"
NOTE: Not all Python scripts require the SDK. Nevertheless it is good to have it.
- Extract the contents of the FTK-API-SDK-main.zio file
- Open CMD
- Type in: cd <directory of the SDK folder>
- Enter following command: python setup.py install
- You must see the following message: Finished processing dependencies for exterro-ftk-sdk==1.0.0
- Still in CMD, type in python in order to enter the Python terminal
- Enter following command: import exterro.client and exit the Python Terminal by typing ctl+Z and Enter
- check if the installation was successful by running following command: pip list
Step 4: Generate an API key
- Create an API key by following this article
- Save it as a text file for later use with the SDK
Step 5: Things to be modified before running the script
Note: This point is not always applicable. Modifying the script body may not always be required
- Every script is different and should come with its documentation and its own specific instructions of use.
- In some cases the variables need to be supplied the following ways:
Option1: Integrated with the Windows CMD. So the script itself cannot be modified. The parameters should be supplied within the python command in the command prompt.
Example from the "Convert_JobInfo_Logs_V2.py" script:
'Output folder' and 'Export Folder' can only be supplied within CMD
Option 2: Included in the body of the script itself. - If needed, please consider the possibility of replacing following parameters within the scrips.
- Example from the "create_case.py" script:
- API key
- URL of the FTK instance
- Name of generated case
- Case folder path
- Responsive File Path
Step 6: Using the scripts to push automation tasks
- Execute the script using either
- Python: Open CMD and type in python<name of the script.py> <"parameter"> <"parameter">
Example: python Convert_Jobinfo_Logs_V2.py "D:\FTK\CASES\CASENAME" "D:\FTK\EXPORT\OUTPUT"
- Python IDLE