Written by Sam Lane 18/07/25
Version A.1
A simple Python utility to automate the bulk modification of assets in a Trail.fi database
Clone the repository
git clone https://github.com/About-Time-Technologies/Trail-API-ExtendedCreate a api key in Trail with the minimum required privileges for the task and copy the details of the key
to a .env file as below, located in the same directory as this project.
TRAIL_KEY_ID = trailkeyid
TRAIL_KEY_SECRET = trailsecret
TRAIL_BASIC_AUTH_API_TOKEN = trailapitoken- Install all required modules:
pip install -r requirements.txt -
Define a list of asset ids in a
.CSVfile that you want to add to the reservation -
Run the script
- all commands make use of
-targetto define the asset id (or CSV file containing asset ids) - add
-hto a command to access the help
python trail-api-extended.py delete -target sample.csv --reason redundant --description "Removed from FOH"--reasonReason for deletion e.g.; redundant--descriptionThe reason for the deletion. Always enclose in "" e.g.; "Removed from stores"--forceIf this switch is used then the utility will not ask the user to confirm the item before deletion.--permanentPermanently deletes the item. Use with caution.