# Log Count for Log retrieval using management API v2

**URL:** <https://community.auth0.com/t/log-count-for-log-retrieval-using-management-api-v2/8949>\
**Category:** Get Help\
**Tags:** logs, managment-api-v2, log-retention\
**Created:** [December 12, 2017, 4:54am UTC](https://community.auth0.com/t/log-count-for-log-retrieval-using-management-api-v2/8949 "2017-12-12T04:54:40Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![fllamo](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@fllamo](https://community.auth0.com/u/fllamo)\
**Post date:** [December 12, 2017, 4:54am UTC](https://community.auth0.com/t/log-count-for-log-retrieval-using-management-api-v2/8949/1 "2017-12-12T04:54:40Z")

</div>

I am working on pulling logs to avoid losing them since we only have 10 days of retention.  
I need a way to retrieve a total log count available using the management v2 API?

---

<div class="post-metadata">

**Author:** ![jmangelo](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/jmangelo/32/7923_2.png) [@jmangelo](https://community.auth0.com/u/jmangelo)\
**Post date:** [December 12, 2017, 7:07pm UTC](https://community.auth0.com/t/log-count-for-log-retrieval-using-management-api-v2/8949/2 "2017-12-12T19:07:48Z")

</div>

I may be missing something but if the objective is to perform a sort of log shipping I would expect the usage of the `from` checkpoint approach and no need for a total log count. Nonetheless, based on the documentation in the API explorer for the [logs endpoint](https://auth0.com/docs/api/management/v2#!/Logs/get_logs) you can perform a search by criteria (with a criteria that matches everything) and then use the `include_totals` option so that the response contain information about total log count.

---

<div class="post-metadata">

**Author:** ![fllamo](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@fllamo](https://community.auth0.com/u/fllamo)\
**Post date:** [December 12, 2017, 9:44pm UTC](https://community.auth0.com/t/log-count-for-log-retrieval-using-management-api-v2/8949/3 "2017-12-12T21:44:11Z")

</div>

Thank you, I don’t know how I completely missed that in the documentation.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [March 2, 2018, 5:57am UTC](https://community.auth0.com/t/log-count-for-log-retrieval-using-management-api-v2/8949/4 "2018-03-02T05:57:44Z")

</div>


