Use the CLI tool
Last updated May 27th, 2025
Knox E-FOTA On-Premises has a command line interface (CLI), which allows you to automate frequently preformed tasks with scripts. You can also use it to easily manage multiple Knox E-FOTA On-Premises servers by switching between instances in the terminal without the need to access their web consoles.
Required files
You need the following files to use the CLI tool.
e-fota.py
(Executable python script)
Configuration
Manage configurations for the CLI tool.
The configuration file has five parameters in total.
apiUrl
— Mandatory. The url of your Knox E-FOTA On-Premises server.proxyHost
— Optional. The url of your Knox E-FOTA On-Premises server proxy host.proxyPort
— Optional. The port number of your Knox E-FOTA On-Premises server proxy.userId
— Optional. Only available after you’ve logged in to Knox E-FOTA On-Premises.domainId
— Optional. Only available after you’ve logged in to Knox E-FOTA On-Premises.
A config.json
file is generated when you set up your configuration with the following commands.
Command | Description |
---|---|
e-fota.py config set <config-name> <config-value> |
Set the value for the specified <config-name> . |
e-fota.py config get <config-name> |
Get the value for the specified <config-name> . |
e-fota.py config set apiUrl http://100.1.1.2:8080
e-fota.py config get apiUrl
Log in
Log in to Knox E-FOTA On-Premises.
Command | Description |
---|---|
e-fota.py login <user-id> <password> |
Log in with the specified username and password. |
e-fota.py login admin admin12#
Manage licenses
Upload and view licenses on Knox E-FOTA On-Premises.
Command | Description |
---|---|
e-fota.py license upload <license-file-path> |
Upload license file at the specified path. |
e-fota.py license get |
View all licenses. |
e-fota.py license upload c:/Project/Test_License.lic
e-fota.py license get
Manage workspaces
Manage and view workspaces on Knox E-FOTA On-Premises.
Command | Description |
---|---|
e-fota.py workspace create <workspace-name> |
Create a workspace named <workspace-name> . |
e-fota.py workspace modify <before-name> <after-name> |
Rename a workspace from <before-name> to <after-name> . |
e-fota.py workspace delete <workspace-name> |
Delete the workspace named <workspace-name> . |
e-fota.py workspace get |
View all workspaces. |
e-fota.py workspace create newWork1
e-fota.py workspace modify newWork1 newWork2
e-fota.py workspace delete newWork2
e-fota.py workspace get
Manage devices
Manage and view devices on Knox E-FOTA On-Premises.
Command | Description |
---|---|
e-fota.py device <workspace-name> upload <csv-file-path> |
Upload devices listed in the CSV file to the specified workspace. |
e-fota.py device <workspace-name> delete <csv-file-path> |
Delete devices listed in the CSV file from the specified workspace. |
e-fota.py device <workspace-name> enroll <csv-file-path> |
Enroll devices listed in the CSV file on the specified workspace to Knox E-FOTA. |
e-fota.py device <workspace-name> assign <campaign-name> <csv-file-path> |
Assign devices in the CSV file on the specified workspace to the specified campaign. |
e-fota.py device <workspace-name> unassign <csv-file-path> |
Unassign devices in the CSV file on the specified workspace from their campaigns. |
e-fota.py device <workspace-name> download <csv-export-path> |
Export devices in a specified workspace to a CSV file. |
e-fota.py device downloadAll <csv-export-path> |
Export devices across all workspaces to a CSV file. |
e-fota.py device default upload c:/Project/uploadDevice.csv
e-fota.py device default delete c:/Project/deleteDevice.csv
e-fota.py device default enroll c:/Project/enrollDevice.csv
e-fota.py device default assign newCampaign c:/Project/assignDevice.csv
e-fota.py device default unassign c:/Project/unassignDevice.csv
e-fota.py device default download c:/Project
e-fota.py device downloadAll c:/Project
Manage campaigns
Manage and view campaigns on Knox E-FOTA On-Premises.
Command | Description |
---|---|
e-fota.py campaign <workspace-name> create <json-file-path> |
Create a campaign in the specified workspace with the settings defined at <json-file-path> (see the campaign creation JSON example below). |
e-fota.py campaign <workspace-name> delete <campaign-name> |
Delete a campaign from the specified workspace. |
e-fota.py campaign <workspace-name> download <json-export-path> |
Export campaigns in the specified workspace to a JSON file. |
e-fota.py campaign downloadAll <json-export-path> |
Export campaigns across all workspaces to a JSON file. |
e-fota.py campaign default create c:/Project/createCampaign.json
e-fota.py campaign default delete cpn_nm
e-fota.py campaign default download c/:Project
e-fota.py campaign downloadAll c:/Project
{
"name": "cpn_nm",
"description": "cpn_dscn",
"targetFirmwares": [
{
"model": "SM-G889G",
"salesCode": "XSP",
"targetType": "Selective",
"targetFirmwareId": 78746250
}
],
"policy": {
"postponeCount": 1,
"networkType": "wifiOnly",
"dataRoaming": false,
"minBatteryLevel": 30,
"maxBandwidth": 0,
"powerCableConnectionOnly": false
},
"schedule": {
"startDate": "2024-12-23",
"endDate": "2024-12-27",
"weeklyRepeat": [
"Sunday",
"Monday",
"Tuesday",
"Wednesday",
"Thursday",
"Friday",
"Saturday"
],
"installationTimeType": "Specify",
"installationTimeFrom": 1,
"installationTimeTo": 23,
"downloadTimeType": "SameAsInstallation",
"downloadTimeFrom": 0,
"downloadTimeTo": 0,
"daysExclude": [],
"daysInclude": []
},
"activate": true
}
Manage firmware versions
Upload and download firmware versions on your Knox E-FOTA On-Premises server.
Command | Description |
---|---|
e-fota.py version upload <upload-path> |
Upload firmware versions to your Knox E-FOTA On-Premises server. |
e-fota.py version download <download-path> |
Download firmware versions from your Knox E-FOTA On-Premises server. |
e-fota.py version upload c:/Project/RQF-241210-00001
e-fota.py version download c:/Project
Export
Export device, activity log, and dashboard data from Knox E-FOTA On-Premises.
Command | Description |
---|---|
e-fota.py export <workspace-name> device <IMEI> <json-export-path> |
Export device log of the specified device on the given workspace to a JSON file. |
e-fota.py export <workspace-name> activity <csv-export-path> |
Export activity logs of the specified workspace to a CSV file. |
e-fota.py export <workspace-name> dashboard <json-export-path> |
Export the dashboard data of the specified workspace to a JSON file. |
e-fota.py exportAll activity <csv-export-path> |
Export activity logs across all workspaces to a CSV file. |
e-fota.py exportAll dashboard <json-export-path> |
Export the dashboard data across all workspaces to a JSON file. |
e-fota.py export default device 123456789123456 c:/Project
e-fota.py export default activity c:/Project
e-fota.py export default dashboard c:/Project
e-fota.py exportAll activity c:/Project
e-fota.py exportAll dashboard c:/Project
On this page
Is this page helpful?