Client API: Difference between revisions

From MobileX for SageCRM
No edit summary
No edit summary
Line 1: Line 1:
Any calls to the API from an external source must use CORS (crossDomain: true)


logon
logon

Revision as of 12:54, 14 November 2016

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/