Traccar API: Bulk insert

brenthmiras8 years ago

In traccar API, there is a POST /devices route for adding a single device.
My application requires inserting multiple devices at once.
I have a separate web server for extended functionality but it cannot add device directly to the database because of this "internal cache" of traccar server.

Is there a way to bypass this internal cache so that traccar will honor direct database insertion without going through the api?

Anton Tananaev8 years ago

No, there is no way to get cache updated without API. You can always just call the API multiple times. Why does it have to be in a single call?

brenthmiras8 years ago

We will be inserting 10,000+ records

Anton Tananaev8 years ago

Is it a one-time thing or do you expect to do it regularly?

brenthmiras8 years ago

Neither. We will not be doing it regularly, but it's not one-time thing also. At first we will be needing to upload this huge number of records and then occasionally we may add more.

Anton Tananaev8 years ago

Then I guess the easiest option is to just restart the service after import.