Class ProvisioningProfileClient
- java.lang.Object
-
- cloud.metaapi.sdk.clients.MetaApiClient
-
- cloud.metaapi.sdk.clients.meta_api.ProvisioningProfileClient
-
public class ProvisioningProfileClient extends MetaApiClient
metaapi.cloud provisioning profile API client (see https://metaapi.cloud/docs/provisioning/)
-
-
Field Summary
-
Fields inherited from class cloud.metaapi.sdk.clients.MetaApiClient
host, httpClient, token
-
-
Constructor Summary
Constructors Constructor Description ProvisioningProfileClient(HttpClient httpClient, String token)Constructs provisioning API client instance with default domain agiliumtrade.agiliumtrade.aiProvisioningProfileClient(HttpClient httpClient, String token, String domain)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CompletableFuture<ProvisioningProfileIdDto>createProvisioningProfile(NewProvisioningProfileDto provisioningProfile)Creates a new provisioning profile (see https://metaapi.cloud/docs/provisioning/api/provisioningProfile/createNewProvisioningProfile/).CompletableFuture<Void>deleteProvisioningProfile(String id)Deletes a provisioning profile (see https://metaapi.cloud/docs/provisioning/api/provisioningProfile/deleteProvisioningProfile/).CompletableFuture<ProvisioningProfileDto>getProvisioningProfile(String id)Retrieves a provisioning profile by id (see https://metaapi.cloud/docs/provisioning/api/provisioningProfile/readProvisioningProfile/).CompletableFuture<List<ProvisioningProfileDto>>getProvisioningProfiles(Integer version, String status)Retrieves provisioning profiles owned by user (see https://metaapi.cloud/docs/provisioning/api/provisioningProfile/readProvisioningProfiles/).CompletableFuture<Void>updateProvisioningProfile(String id, ProvisioningProfileUpdateDto provisioningProfile)Updates existing provisioning profile data (see https://metaapi.cloud/docs/provisioning/api/provisioningProfile/updateProvisioningProfile/).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/).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/).-
Methods inherited from class cloud.metaapi.sdk.clients.MetaApiClient
getTokenType, handleNoAccessError, isNotAccountToken, isNotJwtToken
-
-
-
-
Constructor Detail
-
ProvisioningProfileClient
public ProvisioningProfileClient(HttpClient httpClient, String token)
Constructs provisioning API client instance with default domain agiliumtrade.agiliumtrade.ai- Parameters:
httpClient- HTTP clienttoken- authorization token
-
ProvisioningProfileClient
public ProvisioningProfileClient(HttpClient httpClient, String token, String domain)
- Parameters:
domain- domain to connect to- See Also:
ProvisioningProfileClient(HttpClient, String, String)
-
-
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) ornullstatus- optional status filter (allowed values are new and active) ornull- 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 tofileName- name of the file to upload. Allowed values are servers.dat for MT5 profile, broker.srv for MT4 profilefilePath- 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 tofileName- name of the file to upload. Allowed values are servers.dat for MT5 profile, broker.srv for MT4 profilefileContents- 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 idprovisioningProfile- updated provisioning profile- Returns:
- completable future resolving when provisioning profile is updated
-
-