Restore users from backup
POST /api/v2/MT4/{tradePlatform}/BackupRestoreUsers
Restore user records into the live MT4 database. Destructive — requires ?confirm=true.
Manager (live) call to the wrapper's
BackupRestoreUsers(UserRecord[] users). Each input
MT4UserRestoreInput is mapped to a fresh UserRecord
with the narrow restore field set — secrets, OTP, server-managed
timestamps, and reserved blobs are NOT carried (see DTO docs).
Idempotency-Key header is strongly recommended: a network blip during a multi-user restore can leave the client uncertain whether the write happened. Without the key, retry will double-write.
Batch cap: 10000 records per call. Larger restores must be split.
Timeout: 60 s by default, adjustable per request with the X-Request-Timeout header. When the trade server does not answer in time: The operation may still be completed by the server (X-Request-Outcome: unknown): check its result before repeating it.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| tradePlatform | path | string (uuid) | yes | Trade platform id (GUID) |
| confirm | query | boolean | no | Required deliberateness flag — must equal true |
| X-Request-Timeout | header | number (double) | no | How long to wait for the trade server, in seconds (1–300). Default for this operation: 60 s (server maintenance). The query parameter requestTimeout does the same for clients that cannot set headers. The applied value is returned in the X-Request-Timeout-Applied response header. |
Request body
MT4UserRestoreInput[] (application/json) — Array of users to restore (1..10000 records)
Responses
- 200 Success — BooleanApiResponse
Example
curl -X POST "https://cloud.mywebapi.com/api/v2/MT4/$TRADE_PLATFORM_ID/BackupRestoreUsers" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '[{ "login": 0, "group": "", "name": "", "email": "", "country": "", "leverage": 0 }]'