Skip to content

Use resource IDs in REST paths and return full entities from create operations - #240

Open
barreiro wants to merge 1 commit into
Hyperfoil:mainfrom
barreiro:rest-interface
Open

Use resource IDs in REST paths and return full entities from create operations#240
barreiro wants to merge 1 commit into
Hyperfoil:mainfrom
barreiro:rest-interface

Conversation

@barreiro

@barreiro barreiro commented Aug 5, 2026

Copy link
Copy Markdown
Member

Summary

  • Replace name-based path parameters with numeric IDs for folder, view, and notification sub-resources
  • Return full entity objects from create/delete endpoints instead of bare IDs
  • Rename byName() service methods to find() across all service interfaces
  • Update frontend components, CLI commands, and tests to match the new API

Motivation

Name-based resource identifiers in URL paths are fragile: they break if a resource is renamed, require URL-encoding for names with special characters, and couple clients to a mutable attribute instead of a stable surrogate key. Using numeric IDs as path parameters follows REST conventions where URIs identify resources by stable, opaque identifiers (RFC 7231). Names that serve as lookup criteria are better suited as query parameters, which is where folder creation now takes its name.

Returning full entities from mutating operations eliminates the need for clients to issue a follow-up GET after every create, reducing round-trips and making the API more self-contained (per the principle of "respond with the resource representation").

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.

1 participant