rstudio / rscloud

Managing RStudio Cloud spaces with R
https://rstudio.github.io/rscloud
Other
22 stars 11 forks source link

Add space member usage endpoint. #37

Closed ssinnott closed 4 years ago

ssinnott commented 4 years ago

The space usage endpoint should be available to this package. The details of the endpoint are as follows,

GET /space/<space_id>/usage

This will return the usage within the space. You can filter based on a number of arguments.

from - Date to calculate usage from (Example: 30d). until - Date to calculate usage until (Example: 1d). groupby - Group by condition (Example: user_id). project_id - Filters for a specific project. user_id - Filter for a specific user.

For example the following would filter for all usage in the last 90 days group by users,

GET /space/<space_id>/usage?groupby=user_id&from=90d