You are viewing the old version of the documentation. See the latest version here: CRM for Jira Server Home

You are viewing the old version of the documentation. See the latest version here: [CRMJS:CRM for Jira Server Home]

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

To do some actions with CRM data you can use CRM API. Now we have authorization in API. For access in API you need:

  • apiKey (Set in CRM Administration panel in Access inlay.) 
  • userName (Login of JIRA's user, which will perform all actions)

As now all actions will be performed under the JIRA's user, he owe to have all rights for access to methods (that rights are too in Access)

 

For access to:A user owe to have right:Function properties:
getcontactbynameCRM Main MenuReturn organization by name or ID
getcompaniesCRM Main MenuReturn list of all organizations
getcontactsCRM Main MenuReturn contact by name or ID
sync CRM Main MenuReturn list of all contacts
setcrmpropertiesCRM Main Menu 
addcompanyAdd companies 
setcontactAdd contacts 

 

How now owe to look method's calls :

 http://crm-demo.teamlead.ru/plugins/servlet/crm/api?&apiKey=${apiKey}&userName=${userName}&command=sync
http://crm-demo.teamlead.ru/plugins/servlet/crm/api?&apiKey=${apiKey}&userName=${userName}&command=setcontact&companyName=Adobe&contactName=TedJohnson
http://crm-demo.teamlead.ru/plugins/servlet/crm/api?&apiKey=${apiKey}&userName=${userName}&command=setcontact&companyId=15&contactId=6
http://crm-demo.teamlead.ru/plugins/servlet/crm/api?&apiKey=${apiKey}&userName=${userName}&command=addcompany&clients-org_name=test Company Name&clients-org_www=test.com&tableName=CLIENTS&view-clients-org_industry=Consulting&view-clients-org_sla=SLA-1 Free

$ {apiKey} need replace on key's value adjusted in Plugin administration panel.

{userName} need replace on JIRA user's login.


Here is an examples of a new method's calls.

 

http://crm-demo.teamlead.ru/plugins/servlet/crm/api?&apiKey=${apiKey}&userName=${userName}&command=getcompanies
http://crm-demo.teamlead.ru/plugins/servlet/crm/api?&apiKey=${apiKey}&userName=${userName}&command=getcontacts
http://crm-demo.teamlead.ru/plugins/servlet/crm/api?&apiKey=${apiKey}&userName=${userName}&command=getcompanybyname&companyId=2
http://crm-demo.teamlead.ru/plugins/servlet/crm/api?&apiKey=${apiKey}&userName=${userName}&command=getcompanybyname&companyName=Atlassian
http://crm-demo.teamlead.ru/plugins/servlet/crm/api?&apiKey=${apiKey}&userName=${userName}&command=getcontactbyname&contactId=2
http://crm-demo.teamlead.ru/plugins/servlet/crm/api?&apiKey=${apiKey}&userName=${userName}&command=getcontactbyname&contactName=Mike Cannon-Brookes
  • No labels