Global activities

This section describes the API of the global resource activities of the user. These activities are all activities from advancements, expenses and reimbursements ordered in a timeline from most recent to the oldest.

List all activities

Retrieve the last 50 (by default) resource activities of the user. The resources include are: Advancement, Expense and Reimbursement. They will be ordered by created_at, from the most recent to the oldest (like a timeline of events). In case you would like to retrieve informations from a specific window of time, just provide the parameters created_at_gteq created_at_lteq. If you would like an specific amount of activities, just provide the parameter count.

Parameters (optional)

created_at_gteq *: string
created_at_lteq *: string
count: integer limit to 150
emoji_in_unicode: boolean default: false

* The gteq and lteq suffix comes from "greater than or equal" and "less than or equal", respectively.

Definition

GET https://app.rexpense.com/api/v1/activities

Example Request

$ curl -u $YOUR_API_TOKEN:X -X GET https://app.rexpense.com/api/v1/activities \
      -H 'Accept: application/json' \
      -H 'Content-type: application/json'

Response Example

    {
      "count": 1,
      "activities": [
        {
          "changes": "John made a new comment: This is my first comment.",
          "occurred_at": "2014-06-01T14:17:56Z",
          "subject": {
            "id": 1,
            "type": "Expense"
          },
          "source": {
            "id": 1,
            "type": "Comment"
            ...
          },
          "user": {
            "id": 1,
            "avatar": [],
            ...
          }
        }
      ]
    }