synchro_import.php
DRAFT! ๐ง
Purpose
This service is used for data synchronization.
Invoke this service to import data and trigger the synchronization in one single step.
In case you have chosen to
import the data directly into the synchronization table, then you
just need to trigger the synchronization. Use the service synchro_exec.php.
Example
php -q /var/www/itop/synchro/synchro_import.php --auth_login=john --auth_pwd=trust,no1 --data_source_id=1 --csvfile=mydata.csv
Arguments
Argument | Description | Defaut value |
---|---|---|
param_file | Parameters file - see Parameters file | - |
auth_login | User login - CLI mode only | - |
auth_pwd | User password - CLI mode only | - |
data_source_id | Synchro data source id | Mandatory! |
csvdata | In HTTP mode, this argument must contain the data | n/a |
csvfile | In CLI mode, this arguments must point to the file containing the input data | n/a |
synchronize | If set to 1, then the synchronization will be executed right after the data load | 1 |
charset | Character set encoding of the CSV data: UTF-8, ISO-8859-1, WINDOWS-1251, WINDOWS-1252, ISO-8859-15 | UTF-8 |
date_format | Input date format (used both for dates and datetimes) - Examples: %Y-%m-%d, %d/%m/%Y (Europe) - no transformation is applied if the argument is omitted | |
separator | column separator in CSV data (1 char, or tab) | ; |
qualifier | test qualifier in CSV data | โ |
output | retcode to return the count of lines
in error, summary to return a concise report,
details to get a detailed report (each line
listed) |
summary |
max_chunk_size | CLI mode only, Limit on the count of records that can be loaded at once while performing the synchronization | 0 |
0 | ||
comment | Comment to be added into the change log | |
no_stop_on_import_error | Do not stop the import in case of SQL import error. By default the import will stop at the first error (and rollback all changes). If this flag is set to 1 the import will continue anyway | 0 |
Some issues have been reported
with the simulate mode. This feature remains
experimental.
Output
๐ง
Normal execution
Error
Allowed users
Administrators will always be allowed to execute this page.
Non administrators will be
allowed if they are marked as being owner of the data source.
History
Available since 1.1
2_0_2/advancedtopics/synchro_import.php.txt ยท Last
modified: 2018/12/19 11:40 by 127.0.0.1