Webservices API Manual WebService Interface Description 1. Introduction This reference explains possibilities for integrating BackupAgent with other IT and/or administrative services. It contains technical documentation describing the public WebService interface for managing user accounts. In this case BackupAgent uses the following specifications for their WebService: Version 4: Native SOAP/XML interface based on Microsoft WSE 2.
.1 Access To access the interface, choose a programming language or software package that supports client consumption of a WSDL which is protected by WSE 2.0. By default C# allows easy and reliable access to BackupAgent WebServices. Following step-by-step instructions show how to access BackupAgent WebServices. 1. Find the WSDL. In the normal case the WSDL is provided on an url like ‘https://yourdomain.com/CloudBackupService/BackupService.asmx?WSDL’ 2. Create a proxy class to represent the WebService.
server.RequestSoapContext.Security.Tokens.Clear(); server.RequestSoapContext.Security.Tokens.Add(token); server.RequestSoapContext.Security.Elements.Add(new MessageSignature(token)) return server; Login the user: StorageXS.LoginInfo login = server.CheckUserLogin(username.Trim(), password.Trim(), "clientname"); if(login.LoginStatus > 0) return true; else return false; Note: StorageXS is the local reference name used in the above example. Note: In case you use the WSE 3.
To access the interface, choose a programming language or software package that supports client consumption of a WSDL 1. Find the WSDL. In the normal case the WSDL is provided on an url like ‘https://yourdomain.com/CloudBackupService/BackupService.svc’ 2. Add a Service Reference, which connects to the above Address. 3. Give the namespace a friendly name such as 'BackupService' 4. Add a valid administrator or group username and password to the Credentials. 5. Set the Authentication.
client.ClientCredentials.UserName.UserName = "username"; client.ClientCredentials.UserName.Password = "password"; client.ClientCredentials.ServiceCertificate.Authentication.CertificateValidationMode = System.ServiceModel.Security.X509CertificateValidationMode.None; } } } Step 3 - call the CheckUserLogin function: LoginInfo login = client.CheckUserLogin_Ex("robbert.demo", "testtest"); 3.
enum parametersq string Username Returns all user information of a user string Username Returns all account information of a user GetUserInfoAdmin An UserInfo object GetAccountInfoAdmin An AccountInfo object GetChildAccountInfo string ParentUser (group An array of user)enum UserAccountInfo AccountDescriptionTypeboo objects l getAllAccountsenum RequestType Returns a collection of user and account information objects of multiple users GetUserBackupResults An array of string Usernamestring BackupR
Function Result Parameters CreateAccount Creates a new user with an account in the BackupAgent Server and returns an integer string ParentUserUserInfo userInfoAccountInfo accInfostring Usernamestring Passwordstring [Obsolete]string [Obsolete]bool SendEmail ChangeUserInfoAdmin Changes UserInfo for a user and returns an integer Changes AccountInfo ChangeAccountInfoAdmin for a user and returns an integer ActivateAccount Activates a new or deactivated account and returns an integer DeactivateAccount
returns an integer ChangePassword Allows a user to change a password and returns an integer CreateOwner Creates a new storage group and returns an integer If the token of request is a normal string OldPasswordstring user, this user can NewPassword change his/her own password OwnerInfo NewInfobool SetAsDefault The function creates a new storage group Returns 1 if Ok, else returns a negative integer ChangeOwner Changes a storage group and returns an integer OwnerInfo NewInfo The function changes a
4.
LanguageType_PL (Polish) LanguageType_HU (Hungarian) LanguageType_RO (Romanian) LanguageType_PT (Portuguese) LanguageType_RU (Russian) LanguageType_TR (Turkish) LanguageType_JA (Japanese) BackupReportStatus: Completed_Successfully Completed_Successfully_NonExistentResources Completed_Successfully_Skipped_NonExistentResources Completed_UnSuccessfully Completed_UnSuccessfully_Skipped Completed_UnSuccessfully_NonExistentResources Completed_UnSuccessfully_S
Email (string) - Mandatory FirstName (string) - Mandatory LastName (string) - Mandatory Sex (character: ‘m’ or ‘f’) - Obsolete Occupation (string) - Obsolete Zipcode (string) - Mandatory TelephoneNr (string) - Mandatory DefaultEmailLanguage (LanguageType) - Mandatory AccountInfo: AccountInfoID (int) - must be set to 0 when editing - Read-only UserInfoID (int) - must be set to 0 when editing - Read-only Status (int) – must be set to 1 - Mandatory Active (boolean
HasEncryptionKey (boolean) – must be set to false - Mandatory MaxVersions (int) – must be set, value 10 is recommended - Obsolete UserAccountInfo (return objects for GetChildAccountInfo function and is Readonly): parentUser (string) username (string) firstName (string) lastName (string) userAccountTypeName (string) isTrial (boolean) period (int) company (string) email (string) objUserStatus (StatusInfo) userProfileType (UserProfileType) accountStartDate
UserCount (int) - Read-only ResellerCount (int) - Read-only OwerName (string) - Mandatory StorageLocation (string, path to storage location) - Mandatory LoginName (string) - Obsolete LoginPassword (string) - Obsolete DomainName (string) - Obsolete UseDriveMapping (Boolean) – must be False - Obsolete ResellerName (string) - Optional AccountType: AccountTypeID (integer) - must be set to 0 when editing - Read-only TypeName (string) - Mandatory DescriptionType (str
restoreSizeDownloaded (string) restoreSkippedResources (string) restorePath (string) backupChangedFiles (int) backupSizeChangedFiles (string) backupSizeUploaded (string) backupSkippedResources (int) backupNonExistentResources (int) backupResources (array of strings) nonExistentResources (array of strings) NbNewFiles (int) NbNewFilesUploadedSize (long) NbPatches (int) NbPatchesUploadedSize (long) NbUnchangedFiles (int) DBID (int) ClientLogs (
supportURL (string) - Optional termsURL (string) - Optional registrationURL (string) - Optional logoURL (string) - Optional trialUpgradeURL (string) - Optional stylesheetURL (string) - Optional homepageURL (string) - Optional clientdownloadURL (string) - Optional serviceName (string) - Optional HTMLHeader (string) - Optional HTMLFooter (string) - Optional usagePercentageBeforeEmail (double) - Mandatory dataGridRowCount (int) - recommended setting is 10 - Ma
usedProfessionalUsers (int) maxStorageGB (int) assignedStorageMB (int) usedStorage (long) assignedStorageLocation (array of int) 5. Public exceptions This paragraph describes important public exception codes that can be thrown if functions are called incorrectly or the server is not configured properly. If an exception occurs within BackupAgent logic, the exception type will always be an inherited SOAPException of type BAServiceException.
017 001 Error occured creating an account. Most likely cause is that one of the strings in the UserInfo or AccountInfo object is too long to store in the database. 017 017 License does not allow for account creation through the API other An exception occured while creating or updating the account for a user. Most likely cause is that the token username is not an administrator or group user. 017 There was a problem sending a notification email, please check the email server settings.
9 Guadeloupe GP 10 Romania RO 11 Paraguay PY 12 Mauritius MU 13 Hungary 14 Iceland 15 Slovakia 16 Barbados 17 North Korea 18 Algeria 19 Lithuania LT 20 Thailand TH 21 Guernsey 22 Spain 23 United Arab Emirates 24 Egypt EG 25 Togo TG 26 Isle of Man 27 Ghana 28 Peru 29 South Africa 30 New Zealand 31 Mali 32 Gambia, the 33 Central African Republic 34 Cocos (Keeling) Islands 35 Bahamas 36 Cyprus 37 Wallis and Futuna 38 Bulgaria 39 Turkmenistan
41 Puerto Rico PR 42 Germany 43 Guinea 44 Antarctica 45 United Kingdom 46 Pitcairn Islands 47 Rwanda 48 Greece 49 Afghanistan 50 Morocco 51 Tristan da Cunha 52 Haiti 53 Maldives 54 Jordan 55 Slovenia 56 Greenland 57 Turkey TR 58 Estonia EE 59 Mauritania 60 Bermuda 61 Vanuatu 62 Venezuela 63 Tonga 64 Nigeria 65 Iran 66 Trinidad and Tobago 67 Cambodia 68 Georgia 69 St.
73 Guam GU 74 Cayman Islands 75 Palau 76 Norfolk Island 77 Bahrain 78 Grenada 79 Sierra Leone 80 Nicaragua 81 Brunei 82 Malaysia 83 Nauru 84 Ascension Island 85 Gibraltar 86 China CN 87 Jersey JE 88 Czech Republic 89 Switzerland 90 Antigua and Barbuda 91 Argentina 92 Montserrat 93 Belgium BE 94 Ethiopia ET 95 Jamaica JM 96 St.
105 Indonesia ID 106 San Marino 107 Luxembourg 108 Guatemala GT 109 Kyrgyzstan KG 110 Benin 111 Liechtenstein 112 St. Kitts and Nevis 113 Heard Island and Mcdonald Islands 114 Dominica 115 Timor-leste 116 American Samoa 117 St.
137 Nepal NP 138 French Southern and Antarctic Lands 139 Namibia 140 Malta 141 Bhutan 142 Philippines 143 Iraq 144 French Polynesia 145 India 146 Northern Mariana Islands 147 Ecuador EC 148 Canada CA 149 Poland PL 150 Italy 151 St.
169 Bouvet Island BV 170 Cape Verde 171 Zambia 172 South Georgia and The South Sandwich Islands 173 Sudan SD 174 Kuwait KW 175 United States Minor Outlying Islands 176 Guinea-Bissau 177 Christmas Island 178 Latvia 179 Belarus 180 Solomon Islands 181 Seychelles 182 Kiribati 183 Lebanon 184 Turks and Caicos Islands 185 Suriname 186 Finland 187 Uzbekistan 188 Croatia HR 189 Lesotho LS 190 Albania AL 191 Virgin Islands, British 192 Congo CG 193 Yemen YE
201 Pakistan PK 202 Serbia and Montenegro 203 Netherlands Antilles 204 Eritrea 205 Burkina Faso 206 Cuba 207 Sweden 208 Tajikistan 209 Brazil 210 Netherlands 211 Azerbaijan 212 Svalbard and Jan Mayen 213 Armenia 214 United States 215 Israel 216 Gabon GA 217 Aruba AW 218 Singapore 219 Tokelau TK 220 Mexico MX 221 Vatican City 222 Faroe Islands 223 Swaziland 224 Ukraine 225 Dominican Republic 226 Korea KR 227 Oman OM 228 Kenya KE 229 New Caledon
233 Burundi BI 234 Tunisia TN 235 Zimbabwe 236 Marshall Islands 237 Hong Kong Sar 238 Micronesia 239 Niger 240 Colombia 241 Chile 242 Martinique MQ 243 Macao Sar MO 244 So Tom and Prncipe ZW MH HK FM NE CO CL ST Appendix B - US State codes: ID StateName 1 Alabama 2 Alaska 3 Arizona 4 Arkansas 5 California 6 Colorado 7 Connecticut 8 Delaware 9 Florida 10 Georgia 11 Hawaii 12 Idaho 13 Illinois 14 Indiana 15 Iowa 16 Kansas 25
17 Kentucky 18 Louisiana 19 Maine 20 Maryland 21 Massachusetts 22 Michigan 23 Minnesota 24 Mississippi 25 Missouri 26 Montana 27 Nebraska 28 Nevada 29 New Hampshire 30 New Jersey 31 New Mexico 32 New York 33 North Carolina 34 North Dakota 35 Ohio 36 Oklahoma 37 Oregon 38 Pennsylvania 39 Rhode Island 40 South Carolina 41 South Dakota 42 Tennessee 43 Texas 44 Utah 45 Vermont 46 Virginia 47 Washington 48 West Virginia 26
49 Wisconsin 50 Wyoming 51 District of Columbia 27