Client API

From MobileX for SageCRM
Revision as of 14:54, 14 November 2016 by Crmtogether (talk | contribs)

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/