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
  • for MetaTrader 5 you must upload a file with the parameter fileName equal toservers.dat
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, broker.srv. 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 file from /config MetaTrader4 system data folder. The file is required to create MetaTrader 4 profile.

Response

  • 204 - File uploaded successfully
  • 400 - Wrong fileName field value. Response schema: Error
  • 401 - Authorization failed. 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.agiliumlabs.cloud/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