Skip to content

Add hours query param to getDataUsage endpoint - #1680

Open
hamidmayeli wants to merge 5 commits into
OutlineFoundation:masterfrom
hamidmayeli:master
Open

Add hours query param to getDataUsage endpoint#1680
hamidmayeli wants to merge 5 commits into
OutlineFoundation:masterfrom
hamidmayeli:master

Conversation

@hamidmayeli

@hamidmayeli hamidmayeli commented Oct 21, 2025

Copy link
Copy Markdown

The usage is currently returns the usage of last 30 days. This PR adds a query to specify the last number of hours.

GET /metrics/transfer                    # Default: 30 days (720 hours)
GET /metrics/transfer?last=24h          # Last 24 hours
GET /metrics/transfer?last=1w         # Last 7 days
GET /metrics/transfer?last=30d         # Last 30 days (explicit)

```
GET /metrics/transfer                    # Default: 30 days (720 hours)
GET /metrics/transfer?hours=24          # Last 24 hours
GET /metrics/transfer?hours=168         # Last 7 days
GET /metrics/transfer?hours=720         # Last 30 days (explicit)
```
@hamidmayeli
hamidmayeli requested review from a team and fortuna as code owners October 21, 2025 20:58
@google-cla

google-cla Bot commented Oct 21, 2025

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

Comment thread .devcontainer/.dockerignore Outdated
Comment thread src/shadowbox/server/api.yml Outdated
Comment thread src/shadowbox/server/manager_service.ts Outdated
@hamidmayeli
hamidmayeli requested a review from fortuna October 22, 2025 11:44
@hamidmayeli

Copy link
Copy Markdown
Author

Hi @fortuna, could you please have another look at this?

@hamidmayeli

Copy link
Copy Markdown
Author

Hi @fortuna, I have applied the changes you suggested. Could you please have another look it this?

@hamidmayeli

Copy link
Copy Markdown
Author

Could you please have a second look at this?

@hamidmayeli hamidmayeli reopened this Nov 26, 2025
@hamidmayeli

Copy link
Copy Markdown
Author

Hi @daniellacosse , could you please have a look at this PR?

@daniellacosse

Copy link
Copy Markdown
Contributor

Hi @daniellacosse , could you please have a look at this PR?

Apologies, I'm no longer on the Outline team. Good luck.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants