CRM-2 Activities API
From Opentaps Wiki
Jump to navigationJump to searchContents
Activities API allows to perform operations on activities.
The API calls should be prefixed with URL http://crm-2-url/activities.
Available operations are:
GET: Retrieve activities
Use pattern /{numberOfActivities}/{startFrom}
- numberOfActivities - number of activities to return.
- startFrom(optional) - return activities starting from specified sequence number. W/o this attribute service returns all activites.
Return JSON. Sample of output
"result":{
"resultValue":[
{"note":{
"noteId":"50aa76c9e4b06daa4f6041c7",
"noteText":"Dransfield and Ross - laundry totes",
"sequenceNum":1,
"clientDomain":"client.domain.com",
"dateTimeCreated":"2012-11-19 20:13:29.501",
"createdByUser":{
"photo":"http://.../avatars/30.jpg",
"name":"...",
"userType":"...",
"userInfoUrl":"http://.../",
"id":"m2ka"
},
"note_field_activityType":"PINNED",
"note_field_boardName":"graciousstyle.com",
...
"note_field_referenceUrl":"http://www.graciousstyle.com/shop/laundry-totes","note_field_status":"COMPLETED"
}
},
{"note":{
"noteId":"50aa76cbe4b06daa4f6041c8",
...
}
}
DELETE: Delete an activity
Use pattern /{activityId}
- activityId - An activity identifier.
POST: Create or update activity
There is no special pattern. Post request to /activities.
POST: Associate a contact with an activity in a role.
Use pattern /contact/add
Parameters:
- activityId - An activity identifier.
- contactId - A contact id.
- role(optional) - A role, an arbitrary string.
POST: Remove contact association.
Use pattern /contact/remove
Parameters:
- activityId - An activity identifier.
- contactId - A contact id.
- role(optional) - A role, an arbitrary string.