Meet the New API Explorer

Published
2015-02-25 12:19
Written by

Whether you're just getting started with customizing CiviCRM or you already think you know everything about it, I invite you to spend a few minutes playing with the new API Explorer in 4.6. You'll be glad you did.

New look

Building on Xavier's great previous work (thanks X for writing the original explorer) I rewrote the interface in 4.5 to reflect new api techniques and take advantage of new user-friendly UI widgets like select2. In 4.6 I've added even more goodies, so be sure to upgrade when it is released - some of the features listed below (marked with a *) are only in 4.6.

Interactive option lists

No need to type in secret codes, you can select groups, tags, location types, or other options by name.

Easy lookup of related entities

The explorer uses the new EntityRef widget to let you search the api for related contacts, activities, events, etc.

Deprecation notices

Are you using an outdated API? The explorer makes this easy to see, and will give tips on current alternatives.

Easy chaining

Click the "Chain API Call" button to quickly build chained actions.

Choose your operator

Easily work with the complex syntax used for building operators like > and IS NULL into your api expression.

More syntaxes

The api explorer generates all supported bindings including javascript, rest, php, and the new cli syntax for Drupal and Wordpress.

Browse examples*

Eileen's brilliant initiative to auto-generate examples from the test suite is now easy to browse right from the api explorer.

See documentation and source code*

Documentation that was previously buried in the CiviCRM source code is now readily accessible from the explorer. You can read the docs and source code for any api function. If the docs are looking a bit sparse anywhere, why not help out by submitting a PR to improve them?

In 4.7.x API explorer menu item is available via Support > Developer or via /civicrm/api

Filed under

Comments

Kudos to Coleman and Eileen for taking this critical developer tool to the next level. WOW!