List Activities

Returns a list of activities for the specified time period.

curl -X GET "" \
     -u YOUR_API_KEY:
# Available from chartmogul-ruby >= 2.0.0
ChartMogul::Metrics::Activity.all({ "per-page": 2, "start-date": "2023-02-21T09:28:10Z" })
ChartMogul.Metrics.Activity.all(config, {
  per_page: 1,
  start_date: "2023-02-21T09:28:10Z",
ChartMogul\Metrics\Activities::all(["start_date" => "2023-02-21T09:28:10Z"])
  StartDate: "2023-02-21T09:28:10Z", 
  AnchorCursor: cm.AnchorCursor{
    PerPage: 5,
    StartAfter: "b45b1d3f-3823-424f-ab47-5a1d0c00a7f6",
chartmogul.Activity.all(config, per_page=1)
Result Format
  "entries": [
      "description": "purchased the Silver plan",
      "activity-mrr-movement": 6000,
      "activity-mrr": 6000,
      "activity-arr": 72000,
      "date": "2023-02-21T09:28:10+00:00",
      "type": "new_biz",
      "currency": "USD",
      "subscription-external-id": "sub_0001",
      "plan-external-id": "silver",
      "customer-name": "Myriapod Labs",
      "customer-uuid": "cus_8bc55ab6-c3b5-11eb-ac45-2f9a49d75af7",
      "customer-external-id": "cus_0001",
      "billing-connector-uuid": "ds_99076cb8-97a1-11eb-8798-a73b507e7929",
      "uuid": "f1a49735-21c7-4e3f-9ddc-67927aaadcf4"
    // ...and more
  "cursor": "AjMx90kC0yMVQwNNwoYToyNC4wMDAwMDAwMDBgks68k",
  "has_more": false,
  "per_page": 200 // deprecated
    @description="purchased the Silver plan",
    @date=2023-02-21 09:28:10 +0000,
    @customer_name="Myriapod Labs",
    # ...and more
> # deprecated with version 4.0.0
  entries: [
      description: "purchased the Silver plan",
      activity-mrr-movement: 6000,
      activity-mrr: 6000,
      activity-arr: 72000,
      date: "2023-02-21T09:28:10+00:00",
      type: "new_biz",
      currency: "USD",
      subscription-external-id: "sub_0001",
      plan-external-id: "silver",
      customer-name: "Myriapod Labs",
      customer-uuid: "cus_8bc55ab6-c3b5-11eb-ac45-2f9a49d75af7",
      customer-external-id: "cus_0001",
      billing-connector-uuid: "ds_99076cb8-97a1-11eb-8798-a73b507e7929",
      uuid: "f1a49735-21c7-4e3f-9ddc-67927aaadcf4"
    // ...and more
  cursor: "AjMx90kC0yMVQwNNwoYToyNC4wMDAwMDAwMDBgks68k",
  has_more: false,
  per_page: 200 // deprecated
  "entries" => Doctrine\Common\Collections\ArrayCollection::__set_state(array(
    "elements" => array (
        "description" => "purchased the Silver plan"
        "type" => "new_biz"
        "date" => "2023-02-21T09:28:10+00:00"
        "activity-arr" => 72000
        "activity-mrr" => 6000
        "activity-mrr-movement" => 6000
        "currency" => "USD"
        "subscription-external-id" => "sub_0001"
        "plan-external-id" => "silver"
        "customer-name" => "Myriapod Labs"
        "customer-uuid" => "cus_8bc55ab6-c3b5-11eb-ac45-2f9a49d75af7"
        "customer-external-id" => "cus_0001"
        "billing-connector-uuid" => "ds_99076cb8-97a1-11eb-8798-a73b507e7929"
        "uuid" => "f1a49735-21c7-4e3f-9ddc-67927aaadcf4"
    // ...and more
  "cursor" => "AjMx90kC0yMVQwNNwoYToyNC4wMDAwMDAwMDBgks68k",
  "has_more" => false,
  "per_page" => 200, # deprecated with version 6.0.0
  Entries: ([]*chartmogul.MetricsActivity) (len=1) {
    ID: (uint64) 8913316,
    Date: (string) (len=25) "2023-02-21T09:28:10+00:00",
    ActivityArr: (float64) 72000,
    ActivityMrr: (float64) 6000,
    ActivityMrrMovement: (float64) 6000,
    Currency: (string) (len=3) "USD",
    CurrencySign: (string) (len=1) "$",
    Description: (string) (len=57) "purchased the Silver plan",
    Type: (string) (len=7) "new_biz",
     SubscriptionExternalId: (string) (len=8) "sub_0001"
   // ...and more
  Cursor: (string) (len=44) "AjMx90kC0yMVQwNNwoYToyNC4wMDAwMDAwMDBgks68k",
  HasMore: (bool) false,
  PerPage: (uint32) 1 // deprecated with version v4
    customer_name='Myriapod Labs',
    date=datetime.datetime(2023, 2, 21, 9, 28, 10, tzinfo=datetime.timezone(datetime.timedelta(0), '+0000')),
    description='purchased the Silver plan',
  # ...and more
per_page=1) # deprecated with version 4.0.0

In the response, entries contains an object for each activity, with the following data:

  • activity-arr - The new ARR after the activity has occurred.
  • activity-mrr - The new MRR after the activity has occurred.
  • activity-mrr-movement - The change in MRR as a result of the activity. May
    be a positive or negative number. All amounts are expressed as an integer number
    of cents in your account currency. Divide by 100 to obtain the actual amount.
  • currency - the code representing your account currency, e.g. USD or EUR
  • date - The timestamp of when the activity occurred.
  • description - a description of the activity.
  • type - The type of the activity. One of new_biz, churn, expansion,
    contraction or reactivation.
  • subscription-external-id - The unique external identifier for the activity's subscription on the activity date. This is usually the subscription identifier from your billing system.
  • plan-external-id - External identifier of the plan related to the activity.
  • customer-name - Name of the customer who was responsible for the activity.
  • customer-uuid - ChartMogul generated uuid for the customer who was responsible for the activity.
  • customer-external-id - The unique external identifier for the customer who was responsible for the activity, if any.
  • billing-connector-uuid - ChartMogul generated uuid for the billing system in use.
  • uuid - The UUID of the activity object generated by ChartMogul.

The other keys represent pagination attributes:

  • cursor - A value that should be used in the next API request to fetch the next page of activities. Request for next page should be initiated only if has_more is set to true indicating that there are more activities to list.
  • has_more - One of true or false depending on whether there are more pages with results for this request.
  • per_page - DEPRECATED The number of results in this response. The maximum value allowed is 200.

DEPRECATED - start-after is the pagination param you can use to request more result entries. start-after should be sent in the API request and its value is ChartMogul UUID of the last activity entry object on current list. It defines your spot in the list. For instance, if you made an API request and received 100 entries, ending with an activity with uuid abcde, your subsequent API call to get more activity entries should include start-after=abcde in query params in order to fetch the next page of the list.