2

After using Notion API for a couple of months now, one thing seems off with relation-type-properties related query results. I manage to find a workaround most of the time, but there isn't any this time.

Context

I'm using Notion API via the Google App Script's OAuth2 library, and I'm trying to fetch two values from a database entry's rollup properties. These values, named "Total points" and "Consumed points," are computed values. They're the sums of the consumed points and total points of all the child entries attached to the entry I'm querying. Those are, of course, linked via a relation property and can be pretty numerous.

Problem

The values I'm getting from the query are different from the actual values displayed on Notion.

It's not the first time I have noticed errors with data computed from relation properties (as those rollup values are), and I wonder if there is not some limitation here.

This is my first post ever on StackOverflow (everyone has its first ), so don't hesitate to tell me if my question needs additional info.

Thanks in advance for your help,

Georgiokams

1 Answers1

2

This behavior is explained in the documentation.

enter image description here

to get the actual value you must use:

GET https://api.notion.com/v1/pages/<PAGE_ID>/properties/<PROPERTY_ID>

and the response will be somthing like this:

enter image description here

Geraldo Ferraz
  • 129
  • 1
  • 4