Triggers a Master Data Import from a remote server. If no remote server authentication is provided the master data import will be triggered with the current user context.
| Webservice Type: | POST |
| Output format: | json |
| Mandatory parameters: |
remoteServerUrl, the remote server from which to import.
leaderboardgroupUUID[], the UUIDs of the leaderboardgroups to be requested from the remote server.
|
| Optional parameters: |
remoteServerUsername
remoteServerPassword
remoteServerBearerToken
Use either username and password or bearer token, not all three parameters.
override, whether to override a leaderboardgroup already available on the server. The default is false.
compress, use only if remote server instance is at least running with commit 0fbf6071dea125bec4a56dee55d61c99def4a62e. The default is true.
exportWind, if false no wind data will be imported. The default is true.
exportDeviceConfigs, if true exports all the device configurations for the race manager app. The default is false.
exportTrackedRacesAndStartTracking, if true exports all the tracked races and starts the tracking. The default is true.
progressTrackingUUID, must be in UUID format, such as 23866298-8b0f-4291-9ab1-6b2a1fa93829; if provided, this can be
used to track the master data import's progress
|
| Request method: | POST |
| Example: | curl -X POST http://127.0.0.1:8889/sailingserver/api/v1/masterdataimport -d "remoteServerUrl=127.0.0.1:8888" -d "leaderboardgroupUUID[]=75e86618-8b0f-4291-9661-6b2a1fa47dff" -d "targetServerUsername=admin" -d "targetServerPassword=admin" -H "Authorization: Basic YWRtaW46YWRtaW4=" produces output:
{
"leaderboardgroupsImported": [
{
"id": "75e86618-8b0f-4291-9661-6b2a1fa47dff",
"name": "MyTestEventWithStrangeCharact/er*s",
"events": [
"067c5d3b-2f11-42b4-8897-2b5cfbff3eeb",
"8414067e-6be0-4f74-b199-d2c79d01c3c1"
]
}
],
"importedFrom": "127.0.0.1:8888",
"override": false,
"exportWind": false,
"exportDeviceConfigs": false,
"exportTrackedRacesAndStartTracking": false
}
|
Accepts the same form parameters and permissions as the synchronous import above. The importing server registers progress and schedules the import in the current user's security context, then returns HTTP 202 with a JSON object:
{"progressTrackingUuid":"23866298-8b0f-4291-9ab1-6b2a1fa93829"}
The returned UUID is the supplied progressTrackingUUID, or a newly generated UUID if none was supplied.
An already registered UUID is rejected. Acceptance means the import has been scheduled; it does not mean the import
has completed. Execution errors are reported through progress. This endpoint is recommended for long-running imports
because the trigger request ends before data transfer and import finish.
Requires the master-data import permission. Progress is replicated, so the request can be served by a replica. Poll periodically (for example, every five seconds). HTTP 404 means the UUID is not visible on that server or its progress has expired; allow a bounded initial delay for replication. Authentication/permission errors should be reported rather than retried indefinitely.
The JSON includes overallProgressPercent, the current sub-progress, failed,
errorMessage, and result. A failed import has failed=true. A successful import
publishes a non-null result only after all data, including wind and sensor fixes, has been imported.
The result contains creation counts and eventIdsImported, the UUIDs of imported events, including those
that already existed. An empty array means no events were imported; older producers may omit this field.
Progress is retained for one hour after completion. The original synchronous POST continues to return the full leaderboard-group/event import result.
Back to Web Service Overview