From Opentaps Wiki
Revision as of 18:50, 31 July 2013 by Sichen (talk | contribs)
Jump to navigationJump to search

CRM-2 API is accessed via RESTful services using your authorization token key. All access to CRM-2 API follow this common pattern:

  • URL: RESTful URL of the CRM-2 resource
  • operation:
    • POST: creates new value
    • GET: get existing value(s)
    • PUT: update existing value
    • DELETE: delete existing value
  • clientDomain: name of your domain, ie
  • authToken: your access token key, a very long alphanumeric string
  • parameters: key value pairs for your API operation

You can also use curl or a visual RESTful client to test the API. For example,

$ curl -X POST 'http://crm-2-url/admin/activity-type' -d -d activityType="PINNED" 
-d authToken=<token>
$ curl -X GET "http://crm-2-url/admin/activity-type?
$ curl -X DELETE 'http://crm-2-url/admin/activity-type' -d -d activityType="PINNED" -d authToken=<token>

can be used to create, read, and delete data.

To update data, a PUT operation is used

$ curl -X PUT --data ""imaps"&

API available, grouped by section, are: