Restore MSSQL Database API

Reseller Plan > API
API Name: restoreMssqlDb

Description: This api will restore a MSSQL database from a file that's uploaded to your hosting account.  Note: you must first upload your backup file to your hosting account via script or via FTP. 

Method: HTTP POST/GET

API URL: https://resellerapi.HostBuddy.com/restoreMssqlDb

Parameters:


Parameter_Name        
Type           
Length               
Description  
apiid string 9 This is your api id
apikey guid 48 This is your api key
loginid
string 2 to 255 This is the hosting account login-id.  Ex:  memberid-001 , memberid-002 and etc....
dbname string 8 to 16
Name of the database you would like to create
bak_path string 2 to 255
relative path to your .bak file.  Ex:  if your .bak file is in your account's \db folder, then the path to specify here is \db\yourfile.bak.    If it's in your site1 folder, then it's \site1\yourfile.bak.  Don't forget the \  in front of the path.








Return

This function will return true OR error message.

{"result": {"status" : "true/false", "code" : "response_code", "response_message" : "message" , "data" : ""}}


Error Code


G1000="Invalid Reseller Account/Authentication Error"
G1001="Invalid Hosting Account/Account Doesn't Belong To This Reseller"
G2000= [this is a general invalid parameter message]
G2001= [this is for other general error message]

S1001="Invalid DB Name or DB Server"