Command line interface
Overview
The Blurit command line interface, this CLI lets you interact with Blurit On-Premise to perform various tasks related to media anonymization.
CLI
The main Blurit CLI command.
blurit [OPTIONS] COMMAND [ARGS]...License
Manage Blurit licenses.
info
Displays all Blurit license information.
options:
-h, --host TEXT Specify the host
-p, --port INTEGER Specify the port
-o [json] Output format in JSON
blurit license infoResponse:
+------------+--------------------------+
| Property | Value |
+============+==========================+
| Start Date | 2023-07-31T22:00:00.000Z |
+------------+--------------------------+
| End Date | 2023-12-31T21:59:59.000Z |
+------------+--------------------------+
| License | LICENSE |
+------------+--------------------------+add
Upload or update a Blurit On-Premise license.
options:
-h, --host TEXT Specify the host
-p, --port INTEGER Specify the port
-o [json] Output format in JSON
blurit license add LICENSEResponse:
+------------+--------------------------+
| Property | Value |
+============+==========================+
| Start Date | 2023-06-27T22:00:00.000Z |
+------------+--------------------------+
| End Date | 2023-09-30T21:59:59.000Z |
+------------+--------------------------+
| License | LICENSE |
+------------+--------------------------+Tasks
Manage Blurit tasks.
create
Create a new Blurit task. Options vary depending on the input type (file, directory, S3 or s3-directory). File processing only needs input argument but output can be specified to store the exit media to a precise location.
options:
--input-file [file|directory|s3|s3-directory] REQUIRED
--no-face-blur Disable face blur.
--no-plate-blur Disable plate blur.
--json-coord Use JSON coordinates.
--auto-delete Auto deletion of input media
-h, --host TEXT Specify the host
-p, --port INTEGER Specify the port
-o [json] Output format in JSON
blurit task create [OPTIONS] INPUT OUTPUTExample: Create a task by specifying input and output directories:
blurit task create --input-type directory input outputResponse:
job id: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxstatus
Get the status of a specific task using its ID.
options:
-h, --host TEXT Specify the host
-p, --port INTEGER Specify the port
-o [json] Output format in JSON
return:
Succeeded
Started
Sent
Failed
Couldn't contact the Blurit server
blurit task status TASK_IDExample:
blurit tasks status 31bc8405-4a56-4cb2-a67e-689797ad9a1aResponse:
Succeededlist
List history call tasks.
options:
--page TEXT Specify the page number
--count TEXT Specify the number of results per page
--starting-date TEXT Specify the starting date
--ending-date TEXT Specify the ending date
--filetype [picture|video|directory] Specify the file type
-h, --host TEXT Specify the host
-p, --port INTEGER Specify the port
-o [json] Output format in JSON
blurit listResponse:
+--------------------------+-------------------+-------------+--------------------------------------+---------------+-----------------------+---------------+
| Created At | Processing Time | File Type | Job ID | File Name | Output Media URL | Task Status |
+==========================+===================+=============+======================================+===============+=======================+===============+
| 2023-08-24T09:18:42.625Z | 05:42:50.70 | directory | 31bc8405-4a56-4cb2-a67e-689797ad9a1a | 629d57_part_1 | 629d57_part_2_process | Succeeded |
+--------------------------+-------------------+-------------+--------------------------------------+---------------+-----------------------+---------------+
Configure
Configure the Blurit application, need to be done at least once before first deployment ('blurit start').
blurit configureStart
Start the Blurit server, CLI must be on the host machine.
blurit startRestart
Restart the Blurit server, CLI must be on the host machine.
blurit restartStop
Stop the Blurit server, CLI must be on the host machine.
blurit stopStats
Display total and period (month, day) statistics.
options:
--date-start TEXT Starting date with format: %Y-%m-%d
--date-end TEXT Ending date with format: %Y-%m-%d
--granularity [day|month] Display statistics by month or days
-h, --host TEXT Specify the host
-p, --port INTEGER Specify the port
-o [json] Output format in JSON
--help Show this message and exit.
blurit statsResponse:
+------------------------------+-----------+
| Metric | Value |
+==============================+===========+
| Total Videos API Calls | 73 |
+------------------------------+-----------+
| Total Pictures API Calls | 443 |
+------------------------------+-----------+
| Total Videos Consumption | 3.33 GB |
+------------------------------+-----------+
| Total Pictures Consumption | 806.07 MB |
+------------------------------+-----------+
| Monthly Videos API Calls | 4 |
+------------------------------+-----------+
| Monthly Pictures API Calls | 8 |
+------------------------------+-----------+
| Monthly Videos Consumption | 22.12 MB |
+------------------------------+-----------+
| Monthly Pictures Consumption | 9.42 MB |
+------------------------------+-----------+Doc
Display link to documentation.
options:
-h, --host TEXT Specify the host
-p, --port INTEGER Specify the port
-o [json] Output format in JSON
blurit docresponse:
API Documentation:
Operation: https://doc-op.blurit.io
Local: http://127.0.0.1:8084/api/docsUninstall
Uninstall the Blurit server, CLI must be on the host machine.
blurit uninstallOutput Format
The Blurit CLI supports two output formats: text (default) and JSON. You can specify the output format using the -o or --output-format option. For example, to get JSON output, use -o json.
Example:
blurit tasks status 31bc8405-4a56-4cb2-a67e-689797ad9a1a -o jsonResponse:
{'task_id': '31bc8405-4a56-4cb2-a67e-689797ad9a1a', 'status': 'Succeeded', 'result': {'input_directory': {'protocol': 'file', 'path': 'input/629d57_part_2', 'auto_delete': False}, 'output_directory': {'protocol': 'file', 'path': 'output/629d57_part_2_process'}, 'size': {'VIDEO': 4979394177}, 'nb_files': {'VIDEO': 252}}}Support and Contribution
If you have any questions, issues, or would like to make a return of the Blurit CLI, please contact us at [email protected]. We hope this guide helps you effectively use the Blurit CLI to manage your media anonymization tasks.