Managing Customization Projects by Using the SOAP API
You can use the web service API for manipulating customization projects from the code.
Methods of the web service API can be used, for example, to deploy customization packages to
local and remote instances of MYOB Acumatica.
For manipulating customization projects, the web service API includes the methods, which are
accessible through the SOAP API, described in the following topics:
A user of an application that invokes any of these methods should be assigned the
Customizer role in the appropriate instance of MYOB Acumatica. See To Assign the Customizer Role to a User Account for details.
The web service used for manipulating customization projects is available under the URL,
which is specified in one of the following ways (see the screenshot below):
http://<Computer Name>/<Website Name>/api/servicegate.asmx, such as
http://MyComputer/YogiFon/api/servicegate.asmx
http://<IP Address>/<Website Name>/api/servicegate.asmx, such as
http://111.222.3.44/YogiFon/api/servicegate.asmx
Figure 1. Accessing the web service through the browser To use the listed methods in the code, you should create a service gate for the
specified URL and log in, as shown in the following code
fragment.
var webserviceurl = "http://localhost/AcumaticaInstance/api/ServiceGate.asmx";
var username = "admin";
var password = "123";
var client = new ServiceGate.ServiceGate
{
Url = webserviceurl,
CookieContainer = new CookieContainer(),
Timeout = (int) TimeSpan.FromMinutes(5).TotalMilliseconds
};
var loginResult = client.Login(username, password);
if (loginResult.Code == ErrorCode.OK)
{
// Use the methods to manipulate customization projects
}