<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Reporting API in APIs &amp; Integrations</title>
    <link>https://community.hubspot.com/t5/APIs-Integrations/Reporting-API/m-p/1012659#M75145</link>
    <description>&lt;P&gt;is it possible to filter records to show only the notes created today?&lt;BR /&gt;query I have used&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;query MyQuery {&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;CRM {&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;p_25_collection {&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;items {&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;hs_object_id&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;associations {&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;note_collection__c25_to_note(filter: {hs_createdate__eq: "2024-07-19T00:00:00.00Z"}) {&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;total&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;}&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;}&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;}&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;}&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;}&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;}&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;By above query im getting all the records where total is Zero as well&lt;/P&gt;</description>
    <pubDate>Fri, 19 Jul 2024 07:23:19 GMT</pubDate>
    <dc:creator>SVenkatesan</dc:creator>
    <dc:date>2024-07-19T07:23:19Z</dc:date>
    <item>
      <title>Reporting API</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Reporting-API/m-p/1012261#M75117</link>
      <description>&lt;P&gt;I have created a report in Hubspot which displays Record ID of custom object and count of notes each record created everyday. Is there any way to get record id and count details through API.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jul 2024 17:18:55 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Reporting-API/m-p/1012261#M75117</guid>
      <dc:creator>SVenkatesan</dc:creator>
      <dc:date>2024-07-18T17:18:55Z</dc:date>
    </item>
    <item>
      <title>Re: Reporting API</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Reporting-API/m-p/1012542#M75135</link>
      <description>&lt;P&gt;Reports are not exposed through the API, only the bare minimum on marketing analytics.&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":angry_face:"&gt;😠&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You'll have to compile that info from the CRM information in your code. There's not a nice friendly way to make it happen through regular rest calls that I have found.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'd do it by using GraphyQL.&lt;/P&gt;
&lt;P&gt;Here's a query using one of my own custom objects:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;query MyQuery {
  CRM {
    p_on24_collection {
      items {
        hs_object_id
        associations {
          note_collection__on24_to_note {
            total
          }
        }
      }
    }
  }
}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is what I get back, so it could be parsed to create your own report. Each object in the items array is a custom object record, and the &lt;FONT face="courier new,courier"&gt;associations.note_collection__on24_to_note.total&lt;/FONT&gt; is the total number of notes on that record.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;  "data": {
    "CRM": {
      "p_on24_collection": {
        "items": [
          {
            "hs_object_id": 3403924027,
            "associations": {
              "note_collection__on24_to_note": {
                "total": 0
              }
            }
          },
          {
            "hs_object_id": 3403932706,
            "associations": {
              "note_collection__on24_to_note": {
                "total": 1
              }
            }
          },
          {
            "hs_object_id": 3404103223,
            "associations": {
              "note_collection__on24_to_note": {
                "total": 0
              }
            }
          },
          {
            "hs_object_id": 3404225558,
            "associations": {
              "note_collection__on24_to_note": {
                "total": 0
              }
            }
          },
          {
            "hs_object_id": 3404259885,
            "associations": {
              "note_collection__on24_to_note": {
                "total": 0
              }
            }
          },
          {
            "hs_object_id": 3404273410,
            "associations": {
              "note_collection__on24_to_note": {
                "total": 0
              }
            }
          },
          {
            "hs_object_id": 3404326481,
            "associations": {
              "note_collection__on24_to_note": {
                "total": 2
              }
            }
          },
          {
            "hs_object_id": 3407101570,
            "associations": {
              "note_collection__on24_to_note": {
                "total": 0
              }
            }
          }
        ]
      }
    }
  }&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jul 2024 04:04:35 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Reporting-API/m-p/1012542#M75135</guid>
      <dc:creator>Bortami</dc:creator>
      <dc:date>2024-07-19T04:04:35Z</dc:date>
    </item>
    <item>
      <title>Re: Reporting API</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Reporting-API/m-p/1012659#M75145</link>
      <description>&lt;P&gt;is it possible to filter records to show only the notes created today?&lt;BR /&gt;query I have used&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;query MyQuery {&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;CRM {&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;p_25_collection {&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;items {&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;hs_object_id&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;associations {&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;note_collection__c25_to_note(filter: {hs_createdate__eq: "2024-07-19T00:00:00.00Z"}) {&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;total&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;}&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;}&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;}&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;}&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;}&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;}&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;By above query im getting all the records where total is Zero as well&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jul 2024 07:23:19 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Reporting-API/m-p/1012659#M75145</guid>
      <dc:creator>SVenkatesan</dc:creator>
      <dc:date>2024-07-19T07:23:19Z</dc:date>
    </item>
    <item>
      <title>Re: Reporting API</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Reporting-API/m-p/1013007#M75155</link>
      <description>&lt;P&gt;You can add a filter like you did. Once thing to know is that date timestamps are stored as miliseconds, so you'll want to use a filter like &lt;FONT face="courier new,courier"&gt;{hs_created_by__gt: date}&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;//today's date at midnight outside of query
const now = Date.now();
const today = new Date(now).setHours(0,0,0,0);
// 1721365200000


query MyQuery {
  CRM {
    p_on24_collection {
      items {
        hs_object_id
        associations {
          note_collection__on24_to_note(filter: {hs_created_by__gt: today} {
            total
            items
          }
        }
      }
    }
  }
}
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jul 2024 16:21:34 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Reporting-API/m-p/1013007#M75155</guid>
      <dc:creator>Bortami</dc:creator>
      <dc:date>2024-07-19T16:21:34Z</dc:date>
    </item>
  </channel>
</rss>

