Skip to content

Upload files to provisioning profile

About

Uploads a file to a provisioning profile. Different provisioning profiles require different files to be uploaded.

  • for MetaTrader 4 you must upload a file with the parameter fileName equal tobroker.srv or servers.ini
  • for MetaTrader 5 you must upload a file with the parameter fileName equal toservers.dat
  • for use Manager Api you must upload zip archive with parameter fileName equal tomanagerApi.zip
  • for use Manager UI for MetaTrader 4 you must upload a file with the parameter fileName equal tomt4manager.exe
  • for use Manager UI for MetaTrader 5 you must upload a file with the parameter fileName equal tomt5managersetup.exe
PUT /users/current/provisioning-profiles/:id/:fileName

For more information see swagger documentation

Headers

Name Type Required Description
auth-token string Yes Authorization token. See Authentication and authorization

Path parameters

Name Type Required Description
id string Yes Id of the profile the file will be uploaded to
fileName string Yes File name. Allowed: servers.dat, servers.ini, broker.srv, managerApi.zip, mt4manager.exe, mt5managersetup.exe. Each file type is described below.

Body

Name Type Required Description
file File Yes It can be one of:
  • 1. servers.dat file from /config MetaTrader 5 data folder. The file is required to create a MetaTrader 5 profile.
  • 2. *.srv or *.ini file from /config MetaTrader4 system data folder. The file is required to create MetaTrader 4 profile.
  • 3. *.zip archive containing manager API distributive (dlls and C++ headers).
  • 4. mt4manager.exe is MetaTrader 4 Manager installer. The file is required to use manager UI for MetaTrader 4.
  • 5. mt5managersetup.exe is MetaTrader 5 Manager installer. The file is required to use manager UI for MetaTrader 5

Response

  • 204 - File uploaded successfully
  • 400 - Validation failed. Response schema: Error
  • 401 - Authorization failed. Response schema: Error
  • 403 - Method or resource access permissions are missing. Response schema: Error
  • 404 - Provisioning profile with the specified id is not found. Response schema: Error

Examples

Example request:

curl 'https://mt-provisioning-api-v1.project-stock.agiliumtrade.ai/users/current/provisioning-profiles/f9ce1f12-e720-4b9a-9477-c2d4cb25f076/servers.dat' \
  -X 'PUT' \
  -H 'accept: application/json' \
  -H 'x-requested-with: XMLHttpRequest' \
  -H 'auth-token: token' \
  -H 'content-type: multipart/form-data; boundary=----WebKitFormBoundarymGyMjX2XovQg0tij' \
  --data-binary $'------WebKitFormBoundarymGyMjX2XovQg0tij\r\nContent-Disposition: form-data; name="file"; filename="servers.dat"\r\nContent-Type: application/octet-stream\r\n\r\n\r\n------WebKitFormBoundarymGyMjX2XovQg0tij--\r\n' \
  --compressed