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

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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 

Image Added

 

(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).

Image Added

 

For access to:A user owe to have rights:Function properties:
getcompanybynameCRM Main MenuReturn company by name or ID
getcontactbynameCRM Main MenuReturn contact by name or ID
getcompaniesCRM Main MenuReturn all companyscompanies
getcontactsCRM Main MenuReturn all contacts
sync CRM Main Menu 
setcrmpropertiesCRM Main Menu 
addcompanyAdd companies 
setcontactAdd contacts 

...

How now owe to look method's calls :

1.

Code Block
 http://crm-demo.teamlead.ru/plugins/servlet/crm/api?apiKey=${apiKey}&userName=${userName}&command=sync

2.

Code Block
http://crm-demo.teamlead.ru/plugins/servlet/crm/api?apiKey=${apiKey}&userName=${userName}&command=setcontact&companyName=Adobe&contactName=TedJohnson

3.

Code Block
http://crm-demo.teamlead.ru/plugins/servlet/crm/api?apiKey=${apiKey}&userName=${userName}&command=setcontact&companyId=15&contactId=6

4.

Code Block
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

...

Value:
Need to replace on:
${apiKey}

...

key's value (adjusted in Plugin administration panel

...

)

...

${userName}

...

JIRA user's login

...


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

 1.

Code Block
http://crm-demo.teamlead.ru/plugins/servlet/crm/api?apiKey=${apiKey}&userName=${userName}&command=getcompanies

2.

Code Block
http://crm-demo.teamlead.ru/plugins/servlet/crm/api?apiKey=${apiKey}&userName=${userName}&command=getcontacts

3.

Code Block
http://crm-demo.teamlead.ru/plugins/servlet/crm/api?apiKey=${apiKey}&userName=${userName}&command=getcompanybyname&companyId=2

4.

Code Block
http://crm-demo.teamlead.ru/plugins/servlet/crm/api?apiKey=${apiKey}&userName=${userName}&command=getcompanybyname&companyName=Atlassian

5.

Code Block
http://crm-demo.teamlead.ru/plugins/servlet/crm/api?apiKey=${apiKey}&userName=${userName}&command=getcontactbyname&contactId=2

6.

Code Block
http://crm-demo.teamlead.ru/plugins/servlet/crm/api?apiKey=${apiKey}&userName=${userName}&command=getcontactbyname&contactName=Mike Cannon-Brookes