Skip to content

Path Parameter Support for API Endpoints #981

@matKlju

Description

@matKlju

AS A Service-Module admin
I WANT support for path parameters in endpoint URLs
SO THAT I can use APIs that rely on URL-based parameters in service flows


Description

Add support for {param} placeholders in endpoint URLs.

  • Placeholders define path parameters (e.g. /items/{id})
  • Parameters are auto-detected from the URL and synced with the Params tab
  • Dynamic values (${var}) are supported, but only resolved within Service Module runtime scope

No Location column is introduced.


Acceptance Criteria

URL Handling

  • URL supports {param} placeholders
  • Adding {param} auto-creates parameter in Params (mandatory)
  • Parameter name must match placeholder exactly

Example:
https://api.example.com/items/{id}?lang=en&limit={limit}

  • {id} treated as path parameter
  • lang=en treated as static query
  • {limit} treated as dynamic query
  • Final URL is correctly constructed

URL ↔ Params Sync

  • URL → Params:
    • Add/remove/rename {param} updates Params
    • Query changes in URL update Params (if mapped)
  • Params → URL:
    • Rename updates {param} in URL
    • Add/remove query params updates URL
    • Deleting param removes placeholder or shows warning
    • Changing parameter values updates the URL (query string where applicable)
  • URL is the source of truth for parameter structure (path + query keys)
  • Params is the source of truth for parameter values
  • Parameter descriptions preserved unless parameter removed

Runtime Behavior

  • PATH parameters replaced first, QUERY applied after
  • Supports:
    • static values
    • Service Module variables (${var})
  • Values URL-encoded before insertion
  • Final URL contains no unresolved {}

Validation

  • Block Save/Test if:
    • PATH parameter missing value
    • Placeholder exists without parameter
  • Warn if parameter not used in URL
  • Clear toast errors:
    • ENG:
      • "Missing value for '{name}'"
      • "Unresolved placeholder '{name}'"
    • EST:
      • "Puudub väärtus parameetrile '{name}'"
      • "Lahendamata kohatäitja '{name}'"

Metadata

Metadata

Labels

Projects

Status

In Progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions