• FAQ
  • API
  • Projects
  • Getting event history for a time period through API: get_events

Getting event history for a time period through API: get_events


Sample get_events request

?action=get_events&period=3d
Returns performed actions info in all or selected projects within selected time period
*info on who made changes, what changed and when

Better use webhooks instead (see details)
Required parameters:  
  • period — time period, possible values (integer): 1m..360m in minutes, 1h .. 72h in hours, 1d..30d in days
 
Optional parameters:
  • id_project — project ID (data only of a particular project)

Returned data :
  • action — performed action:
  • post — creating of a new project/task/comment
    update — editing of project/task/comment parameters
      close — task closing
      reopen — task reopening
      delete — comment deleting
  • object — object affected by action:
  • type — object type: project, task and comment
    id — object ID
      page — object link
  • date_added — performed action date and time
  • user_from — user, who performed the action
  • new — current or updated parameter values
  • for action=post these are the names of parameters specified during new object creation along with their values ​​
    for action=update these are the names of parameters being changed with their new values ​​
    • old — names of parameters being changed with their previous values ​​(only for action=update)

Sample JSON response
*shown for two performed actions: comment edited and task due date changed

If the request succeeds, the response will contain ok status and the following data: 

{
    "status": "ok",
    "data": [
        {
            "action": "update",
            "object": {
                "type": "comment",
                "id": "COMMENT_ID",
                "page": "/project/PROJECT_ID/TASK_ID/"
            },
            "date_added": "YYYY—MM—DD HH:II",
            "user_from": { "id": "USER_ID",
                "email": "USER_EMAIL",
                "name": "USER_NAME"
            },
            "new": {
                "text": "TEXT"
            },
            "old": {
                "text": "TEXT"
            }
        },
        {
            "action": "update",
            "object": {
                "type": "task",
                "id": "TASK_ID",
                "page": "/project/PROJECT_ID/TASK_ID/"
            },
            "date_added": "YYYY—MM—DD HH:II",
            "user_from": { "id": "USER_ID",
                "email": "USER_EMAIL",
                "name": "USER_NAME"
            },
            "new": {
                "date_end": "YYYY—MM—DD"
            },
            "old": {
                "date_end": "YYYY—MM—DD"
            }
        }
    ]
}