Skip to content

Add missing admin endpoints for assets - #681

Merged
GianlucaFicarelli merged 1 commit into
mainfrom
admin_asset_endpoints_3
Jul 23, 2026
Merged

Add missing admin endpoints for assets#681
GianlucaFicarelli merged 1 commit into
mainfrom
admin_asset_endpoints_3

Conversation

@GianlucaFicarelli

Copy link
Copy Markdown
Collaborator

Add the following admin endpoints for assets, mirroring the existing user-facing endpoints in routers/asset.py:

  • POST /admin/{entity_route}/{entity_id}/assets — small file upload
  • POST /admin/{entity_route}/{entity_id}/assets/register — register existing cloud asset
  • GET /admin/{entity_route}/{entity_id}/assets/{asset_id}/list — list directory contents
  • POST /admin/{entity_route}/{entity_id}/assets/multipart-upload/initiate
  • POST /admin/{entity_route}/{entity_id}/assets/{asset_id}/multipart-upload/complete
  • POST /admin/{entity_route}/{entity_id}/assets/directory/multipart-upload/initiate
  • POST /admin/{entity_route}/{entity_id}/assets/{asset_id}/directory/multipart-upload/complete

All new endpoints delegate to _unverified functions, avoiding code duplication. A _get_entity_and_vlab helper in service/admin.py handles the auth-bypass entity + virtual lab lookup shared across the write endpoints.

@GianlucaFicarelli GianlucaFicarelli self-assigned this Jul 22, 2026
Comment thread app/routers/admin.py
@GianlucaFicarelli
GianlucaFicarelli force-pushed the admin_asset_endpoints_3 branch 2 times, most recently from 98a8565 to 1eae09c Compare July 22, 2026 15:51
@GianlucaFicarelli
GianlucaFicarelli changed the base branch from main to reorder_admin_assets July 22, 2026 15:53
@GianlucaFicarelli
GianlucaFicarelli force-pushed the admin_asset_endpoints_3 branch from 1eae09c to 9de99ba Compare July 22, 2026 15:57
Base automatically changed from reorder_admin_assets to main July 23, 2026 06:22

@eleftherioszisis eleftherioszisis left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thanks for adding them.

@GianlucaFicarelli
GianlucaFicarelli force-pushed the admin_asset_endpoints_3 branch from 9de99ba to 79a06b1 Compare July 23, 2026 06:24
@codecov

codecov Bot commented Jul 23, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

Flag Coverage Δ
pytest 97.79% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
app/routers/admin.py 96.82% <100.00%> (+1.26%) ⬆️
app/routers/asset.py 100.00% <100.00%> (ø)
app/service/admin.py 93.50% <100.00%> (+3.12%) ⬆️
app/service/asset.py 98.26% <100.00%> (+0.02%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@GianlucaFicarelli
GianlucaFicarelli merged commit bb61b88 into main Jul 23, 2026
2 checks passed
@GianlucaFicarelli
GianlucaFicarelli deleted the admin_asset_endpoints_3 branch July 23, 2026 11:46
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.

2 participants