wiki:CiviCRM HowTo Use Rest API

Version 9 (modified by Richard Bramley, 11 years ago) ( diff )

--

CiviCRM Rest API

Relevant Links for version 4.2

Steps to Enable the Rest API

  1. Create a site key
  2. Create a user
  3. Enable the user to access the REST api

Create a Site Key

  1. Go to The Bit Mill
  2. Select Uppercase, Lowercase, Numbers, Punctuation
  3. Set Removals from selection as &=+$?%,/:{}#|'
  4. Set length to be 32
  5. Edit the CiviCRM Settings file.
    • For the test server this is: uhlbriccsapp04:/var/local/civicrm/drupal/sites/default/civicrm.settings.php

Using the REST API

  1. Login using the URL: http://{CIVIPATH}/civicrm/extern/rest.php?q=civicrm/login&name={USERNAME}&pass={PASSWORD}&key={SITE_KEY}&json=1
  2. Extract the SESSION_ID from the response.
  3. Make a request supplying the SITE_KEY and SESSION_ID
Note: See TracWiki for help on using the wiki.