Exploring the CiviCRM API
Writing code is laborious. It takes a lot of skill, a lot of trial and error, and most importantly, a lot of time and cost. Rather than write the code from scratch, you can use prewritten functions that do the work. These functions, when gathered together, are called an Application Programming Interface (API).
How to do it…
CiviCRM has an API. This recipe shows you how to explore it:
- Navigate to
http://<mycivicrm.com>/civicrm/ajax/doc/api#explorer
. Substitute<mycivicrm.com>
with your own domain. - Select the Activity entity and perform a create action on it.
- Click on the Source Contact field, the Source Record field, and the Subject field. The fields are added dynamically to the API Explorer.
- Set Source Contact to 1, Source Record to 1, and Subject to Test. The values you put in each field are called parameters. Click on Go.
How it works…
CiviCRM provides us with ready-made code examples with the fields and parameters added.
CiviCRM also provides...