Class ProvisioningProfileClient


  • public class ProvisioningProfileClient
    extends MetaApiClient
    metaapi.cloud provisioning profile API client (see https://metaapi.cloud/docs/provisioning/)
    • Constructor Detail

      • ProvisioningProfileClient

        public ProvisioningProfileClient​(HttpClient httpClient,
                                         String token)
        Constructs provisioning API client instance with default domain agiliumtrade.agiliumtrade.ai
        Parameters:
        httpClient - HTTP client
        token - authorization token
    • Method Detail

      • getProvisioningProfiles

        public CompletableFuture<List<ProvisioningProfileDto>> getProvisioningProfiles​(Integer version,
                                                                                       String status)
        Retrieves provisioning profiles owned by user (see https://metaapi.cloud/docs/provisioning/api/provisioningProfile/readProvisioningProfiles/). Method is accessible only with API access token.
        Parameters:
        version - optional version filter (allowed values are 4 and 5) or null
        status - optional status filter (allowed values are new and active) or null
        Returns:
        completable future resolving with provisioning profiles found
      • getProvisioningProfile

        public CompletableFuture<ProvisioningProfileDto> getProvisioningProfile​(String id)
        Retrieves a provisioning profile by id (see https://metaapi.cloud/docs/provisioning/api/provisioningProfile/readProvisioningProfile/). Completable future is completed with an error if profile is not found. Method is accessible only with API access token.
        Parameters:
        id - provisioning profile id
        Returns:
        completable future resolving with provisioning profile found
      • createProvisioningProfile

        public CompletableFuture<ProvisioningProfileIdDto> createProvisioningProfile​(NewProvisioningProfileDto provisioningProfile)
        Creates a new provisioning profile (see https://metaapi.cloud/docs/provisioning/api/provisioningProfile/createNewProvisioningProfile/). After creating a provisioning profile you are required to upload extra files in order to activate the profile for further use. Method is accessible only with API access token.
        Parameters:
        provisioningProfile - provisioning profile to create
        Returns:
        completable future resolving with an id of the provisioning profile created
      • uploadProvisioningProfileFile

        public CompletableFuture<Void> uploadProvisioningProfileFile​(String provisioningProfileId,
                                                                     String fileName,
                                                                     String filePath)
        Uploads a file to a provisioning profile (see https://metaapi.cloud/docs/provisioning/api/provisioningProfile/uploadFilesToProvisioningProfile/). Method is accessible only with API access token.
        Parameters:
        provisioningProfileId - provisioning profile id to upload file to
        fileName - name of the file to upload. Allowed values are servers.dat for MT5 profile, broker.srv for MT4 profile
        filePath - file path to a file to upload
        Returns:
        completable future resolving when file upload is completed
      • uploadProvisioningProfileFile

        public CompletableFuture<Void> uploadProvisioningProfileFile​(String provisioningProfileId,
                                                                     String fileName,
                                                                     InputStream fileContents)
        Uploads a file to a provisioning profile (see https://metaapi.cloud/docs/provisioning/api/provisioningProfile/uploadFilesToProvisioningProfile/). Method is accessible only with API access token.
        Parameters:
        provisioningProfileId - provisioning profile id to upload file to
        fileName - name of the file to upload. Allowed values are servers.dat for MT5 profile, broker.srv for MT4 profile
        fileContents - input stream containing file contents to upload
        Returns:
        completable future resolving when file upload is completed
      • deleteProvisioningProfile

        public CompletableFuture<Void> deleteProvisioningProfile​(String id)
        Deletes a provisioning profile (see https://metaapi.cloud/docs/provisioning/api/provisioningProfile/deleteProvisioningProfile/). Please note that in order to delete a provisioning profile you need to delete MT accounts connected to it first. Method is accessible only with API access token.
        Parameters:
        id - provisioning profile id
        Returns:
        completable future resolving when provisioning profile is deleted
      • updateProvisioningProfile

        public CompletableFuture<Void> updateProvisioningProfile​(String id,
                                                                 ProvisioningProfileUpdateDto provisioningProfile)
        Updates existing provisioning profile data (see https://metaapi.cloud/docs/provisioning/api/provisioningProfile/updateProvisioningProfile/). Method is accessible only with API access token.
        Parameters:
        id - provisioning profile id
        provisioningProfile - updated provisioning profile
        Returns:
        completable future resolving when provisioning profile is updated