Client API

From MobileX for SageCRM

Any calls to the API from an external source must use CORS (crossDomain: true)

logon

 Type: POST
 URL: http://server/crm/custompages/sagecrmws/KonneXGateway.aspx?SID=&action=logon
 Content-Type: application/x-www-form-urlencoded; charset=UTF-8
 POST Contents: dataonly=Y&username=admin&password=somepassword&crmurl=http://server/crm/

dataonly=Y ensures that only the SID is returned.

logout

 Type: POST
 URL: http://server/crm/custompages/sagecrmws/KonneXGateway.aspx?SID=231231221&action=logout
 Content-Type: application/x-www-form-urlencoded; charset=UTF-8
 POST Contents: dataonly=Y&crmurl=http://server/crm/

dataonly=Y ensures that only the result (true) is returned.

To call a plugin js file (in this example located at "js\plugins\Sample\server\getCompany.js"

logout

 Type: POST
 URL: http://server/crm/custompages/sagecrmws/KonneXGateway.aspx?SID=231231221&action=logout
 Content-Type: application/x-www-form-urlencoded; charset=UTF-8
 POST Contents: fileName==js%5Cplugins%5CSample%5Cserver%5CgetCompany.js&EntityId=123&crmurl=http://server/crm/



Please note that the following configuration options may need to be set on the server should the external URL fail to resolve on the CRM server

 <add key="CRMCodedPath" value="http://localhost/CRM/"/>
 <add key="GatewayCRMPath" value="http://localhost/CRM/"/>