getrowcount

If you wish to obtain the number of results of a query, you can use the getRowCount method.

From your getData call…

https://apirest.atinternet-solutions.com/data/v2/json/getData?&columns={d_source,d_entry_page,m_visits}&sort={-m_visits}&space={s:XXXXXX}&period={R:{D:'-1'}}&max-results=50&page-num=1

… just replace getData with getRowCount:

https://apirest.atinternet-solutions.com/data/v2/json/getRowCount?&columns={d_source,d_entry_page,m_visits}&sort={-m_visits}&space={s:XXXXXX}&period={R:{D:'-1'}}&max-results=50&page-num=1

This call therefore retrieves 1 piece of information (in the 3 standard formats) indicating the number of rows.

Was this post helpful?
Yes
No
Last update: 22/06/2017