Generating Simplifier Token
Request
curl -X POST 'https://your.simplifier.url/genToken/' \
-H 'content-type: application/json; charset=UTF-8' \
--data-raw '{"user":"<api_user_name>","pass":"<password>"}'
Response
{"result":"<simplifier_token>","success":true}
Export Transport Package
When the export starts, the transport is queued. The queue is gradually processed.
Request Export
curl -X POST 'https://your.simplifier.url/UserInterface/api/transport/export' \
-H 'content-type: application/json; charset=UTF-8' \
-H 'simplifiertoken: <simplifier_token>' \
--data-raw '{"transportCollectionName":"<transport_package_name"}'
Response Export
{"processId":"<export_process_id>"}
Request Export Status
curl 'https://your.simplifier.url/UserInterface/api/transport/export/status/<process_id>' \
-H 'content-type: application/json; charset=utf-8' \
-H 'simplifiertoken: <simplifier_token>'
Response Export Status
{"processId":"<process_id>","transportCollectionName":"<transport_package_name>","exporter":"<export_user>","statusI18n":"<state_of_the_transport>","statusData":["<state_data>"],"changed":"<change_date>"}
Request Download
When the state of the export changed to transportExportStatus_Finished then the package can be downloaded. The download can be triggered after starting the process, it is not necessary to wait for the finish state.
curl 'https://your.simplifier.url/UserInterface/api/transport/export/<process_id>?SimplifierToken=<simplifier_token>'
Response Download
The response is application/octet-stream
Request Export Queue
When exporting multiple packages at once, it is possible to check the global export queue
curl 'https://your.simplifier.url/UserInterface/api/transport/export/queue' \
-H 'SimplifierToken: <simplifier_token>'
Response Export Queue
{"processQueue":[<list_of_export_processes>]}
Import Transport Package
Request for Upload
To start an import process you have to upload the transport file as multipart
curl -F session=<optional_session> -F start=<start_byte_of_part> -F end=<end_byte_of_part> -F dataSize=<size_of_part> -F num=<part_number> -F count=<number_of_parts> -F data=@<local_filename> https://your.simplifier.url/UserInterface/api/html5Uploader?SimplifierToken=<simplifier_token>
Response for Upload
{"result":"<optional_session>","success":true}
It is recommended to split the upload into smaller parts, and reuse the session for every single request. However it is also possible to send the whole file in once, but this can lead to issues, based on the server settings and file size.
curl -F session=<session_id> -F start=0 -F end=<file_size> -F dataSize=<file_size> -F num=1 -F count=1 -F data=@<file_name> https://your.simplifier.url/UserInterface/api/html5Uploader?SimplifierToken=<simplifier_token>
Request Import
curl -X POST 'https://your.simplifier.url/UserInterface/api/transport/import' \
-H 'content-type: application/json; charset=UTF-8' \
-H 'simplifiertoken: <simplifier_token>' \
--data-raw '{"uploadSession":"<upload_session>","overwrite":<true|false>,"dryRun":<true|false>}'
Response Import
{"processId":"<process_id>"}
Request Import Status
curl 'https://your.simplifier.url/UserInterface/api/transport/import/status/<process_id>' \
-H 'content-type: application/json; charset=utf-8' \
-H 'simplifiertoken: <simplifier_token>'
Response Import Status
{"processId":"<process_id>","importert":"<import_user>","statusI18n":"<state_of_the_transport>","statusData":["<state_data>"],"changed":"<change_date>"}
Request Import Queue
When importing multiple packages at once, it is possible to check the global import queue
curl 'https://your.simplifier.url/UserInterface/api/transport/import/queue' \
-H 'SimplifierToken: <simplifier_token>'
Response Import Queue
{"processQueue":[<list_of_import_processes>]}