Import a CSV file using command line interface
Use our command-line utility to import data from CSV file
Information below might be outdated - please visit our recently updated API Reference
1. Install python
You need a Python interpreter to run the console importer. Please download it from this website: https://www.python.org/
2. Install importer
pip3 install shortcm-client
3. Run the command
For example, you have this CSV file (file.csv):
Long URL | Short path | Page title | Created time | Salesperson email |
---|---|---|---|---|
http://yourlongdomain.com/yourlonglink | example1 | Webpage title | 2019-10-13T21:27:25+03:00 | [email protected] |
http://yourlongdomain.com/yourlonglink2 | example2 | Webpage title | 2019-10-13T21:27:25+03:00 | [email protected] |
To import the file you need to run a command with these parameters:
shortcm --secret-key <<apiKey>> csv-import --filename file.csv \
--domain <<domain_name>> --path-column 1 --original-url-column 0 \
--title-column 2 --created-at-column 3
Required parameters are secret-key
, filename
, domain
original-url-column
.
Updated 4 months ago