# Add general statistics in API

**URL:** <https://forum.gitea.com/t/add-general-statistics-in-api/4684>\
**Category:** Gitea Usages\
**Created:** [February 15, 2022, 5:16pm UTC](https://forum.gitea.com/t/add-general-statistics-in-api/4684 "2022-02-15T17:16:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Cpm](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/cpm/32/1400_2.png) [@Cpm](https://forum.gitea.com/u/Cpm)\
**Post date:** [February 15, 2022, 5:16pm UTC](https://forum.gitea.com/t/add-general-statistics-in-api/4684/1 "2022-02-15T17:16:44Z")

</div>

I write here because I don’t want use Github, it is not a free software and it is not ethical.

Gitea is really great and its API swagger run well. But I need more entries to measure the general activity of my instance:

- account count: total, last month active count
- organization count: private, public, total
- repository count: total, private, public, forks, mirrors
- merge requests: total, open, closed
- issue count: total, opened, closed, issuers, locked
- datafiles: total in bytes, file count
- databases: total size

Actually, it is possible to compute them **but it requires many API requests and numerous walking in json files**.

So it will be **great if an API entry would return these data in only one request**. Moreover, since this information is anonymous, it could be provided without a token. For example, with `GET/stats`.

With all my thanks and encouragement 😃

---

<div class="post-metadata">

**Author:** ![singuliere](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/singuliere/32/5017_2.png) [@singuliere](https://forum.gitea.com/u/singuliere)\
**Post date:** [February 15, 2022, 9:59pm UTC](https://forum.gitea.com/t/add-general-statistics-in-api/4684/2 "2022-02-15T21:59:18Z")

</div>

> <https://github.com/go-gitea/gitea/issues/18777>
>
> \### Feature Description
> 
> Gitea is really great and its API swagger run well. But… I need more entries to measure the general activity of my instance:
> 
> \- account count: total, last month active count
> \- organization count: private, public, total
> \- repository count: total, private, public, forks, mirrors
> \- merge requests: total, open, closed
> \- issue count: total, opened, closed, issuers, locked
> \- datafiles: total in bytes, file count
> \- databases: total size
> 
> Actually, it is possible to compute them but it requires many API requests and numerous walking in json files.
> 
> So it will be great if an API entry would return these data in only one request. Moreover, since this information is anonymous, it could be provided without a token. For example, with GET/stats.
> 
> With all my thanks and encouragement :smiley:
> 
> \---
> 
> As a \[forgefriend\](https://forgefriends.org/), on behalf of \[cpm\](https://forum.gitea.com/u/Cpm). \[source\](https://forum.gitea.com/t/add-general-statistics-in-api/4684)
> 
> 
> \### Screenshots
> 
> \_No response\_
