Difference between revisions of "CRM-2 Activities API"

From Opentaps Wiki
Jump to navigationJump to search
(GET: Retrieve activities)
Line 1: Line 1:
== Activities API allows to perform operations on activities. ==
+
== Activities API ==
  
The API calls should be prefixed with URL <tt>http://crm-2-url/activities</tt>.
+
The Activities API is used for operations on Activities.  An Activity is pretty flexible and could be anything -- a note, a tweet, an email, a task (see below.)  The API calls should be prefixed with URL <tt>https://crm2.opentaps.com/activities</tt>.
  
 
Available operations are:
 
Available operations are:
Line 54: Line 54:
 
* contactId - A contact id.
 
* contactId - A contact id.
 
* role(optional) - A role, an arbitrary string.
 
* role(optional) - A role, an arbitrary string.
 +
 +
== Task API ==
 +
 +
Task is a specialized kind of Activity with

Revision as of 00:14, 17 January 2014

Activities API

The Activities API is used for operations on Activities. An Activity is pretty flexible and could be anything -- a note, a tweet, an email, a task (see below.) The API calls should be prefixed with URL https://crm2.opentaps.com/activities.

Available operations are:

GET: Retrieve activities

Use pattern /{numberOfActivities}/{startFrom}

Attributes:

  • numberOfActivities - number of activities to return.
  • startFrom(optional) - return activities starting from specified sequence number. W/o this attribute service returns all activites.

Parameters:

  • authToken - OAuth access token.
  • clientDomain - Customer's client domain.

Return JSON.

DELETE: Delete an activity

Use pattern /{activityId}

Attributes:

  • activityId - An activity identifier.

Parameters:

  • authToken - OAuth access token.

POST: Create or update activity

There is no special pattern. Post request to /activities.

Parameters:

  • authToken - OAuth access token.
  • clientDomain - Customer's client domain.
  • Fields of activity, attributes should be prefixed with "note_field_";

POST: Associate a contact with an activity in a role.

Use pattern /contact/add

Parameters:

  • authToken - OAuth access token.
  • clientDomain - Customer's client domain.
  • activityId - An activity identifier.
  • contactId - A contact id.
  • role(optional) - A role, an arbitrary string.

POST: Remove contact association.

Use pattern /contact/remove

Parameters:

  • authToken - OAuth access token.
  • clientDomain - Customer's client domain.
  • activityId - An activity identifier.
  • contactId - A contact id.
  • role(optional) - A role, an arbitrary string.

Task API

Task is a specialized kind of Activity with