How to get all projects in all namespaces sorted by last activity ascending order via API?

hi,

we are running gitlab CE 10.x and we would like to print a result of projects in all namespaces that haven’t been updated in the last 1~2 years.

Through the UI, am able to get such a list accessing this path: /admin/projects?sort=latest_activity_asc, how do I get the same via API?