Skip to main content
Lorna
Contributor ⭐️⭐️⭐️
Feb 21, 2018 8:03 AM UTC
Solved

API 'statistics' date filter

Can I filter the statistics by date?

Basically I want to know how many topics etc per community (we have 3) on a weekly/monthly basis. The analytics in control only show me one community so to see all 3 I need to build something separately.
    Maryam
    MaryamAnswer
    Helper ⭐️⭐️
    Feb 21, 2018 3:04 PM UTC
    Hi Lorna,

    This is indeed possible by our API; I can suggest you two different ways to build it:
    1. Statistics object: You can fetch the community statistics by a GET /statistics call. However, it is not possible to filter the result based on date and it returns the total number of topics. If you store the data in your own CMS however, by the weekly/monthly difference of total topics you can indicate the number of new topics in that specific week/month.
    2. Thread object: You can also get all the topics created in a certain time period by: GET /thread?filter[t.dateline ][from]=123&filter[t.dateline ][to]=456. You can read the total number of topics created in the 'count' parameter.
    Hopefully one of the options will suit your purpose.

    4 replies

    Maryam
    MaryamAnswer
    Helper ⭐️⭐️
    Feb 21, 2018 3:04 PM UTC
    Hi Lorna,

    This is indeed possible by our API; I can suggest you two different ways to build it:
    1. Statistics object: You can fetch the community statistics by a GET /statistics call. However, it is not possible to filter the result based on date and it returns the total number of topics. If you store the data in your own CMS however, by the weekly/monthly difference of total topics you can indicate the number of new topics in that specific week/month.
    2. Thread object: You can also get all the topics created in a certain time period by: GET /thread?filter[t.dateline ][from]=123&filter[t.dateline ][to]=456. You can read the total number of topics created in the 'count' parameter.
    Hopefully one of the options will suit your purpose.
    Translate
    Lorna
    LornaAuthor
    Contributor ⭐️⭐️⭐️
    Mar 6, 2018 9:30 AM UTC
    @Maryam do you have an example of the dates using the php wrapper? I don't get any errors but I don't get any response data and I would expect some...
    Translate
    Lorna
    LornaAuthor
    Contributor ⭐️⭐️⭐️
    Mar 6, 2018 10:52 AM UTC
    Aaaan ignore me - I was being an idiot. 🤓
    Translate
    Contributor ⭐️
    Oct 26, 2021 12:07 AM UTC

    Do these endpoints still exist? I’m trying to pull statistics for an internal dashboard and don’t see any documentation for GET /statistics here: https://api2-eu-west-1.insided.com/docs/

     

    Translate