Client API: Difference between revisions
From MobileX for SageCRM
Crmtogether (talk | contribs) No edit summary |
Crmtogether (talk | contribs) No edit summary |
||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
Any calls to the API from an external source must use CORS (crossDomain: true) | |||
logon | logon | ||
Line 23: | Line 25: | ||
Content-Type: application/x-www-form-urlencoded; charset=UTF-8 | 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/ | 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/"/> |
Latest revision as of 10:00, 18 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/
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/"/>