Skip to content

Fix API endpoint URLs and documentation structure - #105

Merged
jlegrand62 merged 2 commits into
devfrom
hotfix/api-endpoint-mapping
Jul 20, 2026
Merged

jlegrand62 merged 2 commits into
devfrom
hotfix/api-endpoint-mapping

Conversation

@jlegrand62

Copy link
Copy Markdown
Member

Summary

  • Removed the redundant /scans prefix from fileset and file endpoint paths in the REST API documentation.
  • Standardized routes to:
    • /filesets/{scan_id}/{fileset_id}
    • /files/{scan_id}/{fileset_id}/{file_id}
  • Added a dedicated Filesets section header and re‑organized related endpoint listings.
  • Updated markdown formatting (section dividers, headings) and example request/response descriptions to match the new URLs.
  • Refactored src/commons/plantdb/commons/api_endpoints.py:
    • Grouped filesets under a clear section with {scan_id}/{fileset_id} routes.
    • Introduced a top‑level files section with {scan_id}/{fileset_id}/{file_id} hierarchy.
    • Simplified method annotations (e.g., (GET) for list operations, (POST)/(GET, POST) for create and metadata actions).
  • Improved comment layout for better readability.

- Update `src/commons/plantdb/commons/api_endpoints.py` to group **filesets** under a dedicated section with clear GET listing and nested `{scan_id}/{fileset_id}` routes
- Introduce separate top‑level **files** section with `{scan_id}/{fileset_id}/{file_id}` hierarchy
- Simplify method annotations: use `(GET)` for list operations and `(POST)`/`(GET, POST)` for create and metadata actions
- Adjust comment layout to reflect new endpoint organization and improve readability.
- Remove redundant `/scans` prefix from fileset and file endpoint paths in `docs/rest_api/rest_api_endpoints.md`
- Standardize routes to ` /filesets/{scan_id}/{fileset_id}` and ` /files/{scan_id}/{fileset_id}/{file_id}` for all CRUD and metadata operations
- Add a dedicated **Filesets** section header and restructure related endpoint listings
- Adjust markdown formatting (section dividers, headings) to reflect the new organization
- Update example request/response descriptions to match the revised URLs
@jlegrand62 jlegrand62 self-assigned this Jul 20, 2026
@jlegrand62 jlegrand62 added the bug Something isn't working label Jul 20, 2026
@jlegrand62
jlegrand62 merged commit 0b30a58 into dev Jul 20, 2026
1 check passed
@jlegrand62
jlegrand62 deleted the hotfix/api-endpoint-mapping branch July 24, 2026 23:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant