Skip to content

API Management Page #918

@matKlju

Description

@matKlju

AS A Service-Module admin / service creator
I WANT a dedicated API varamu (API Registry) page
SO THAT I can centrally manage endpoints and clearly see verification + schema readiness.


Image

Overview

Implement API varamu using the global endpoint store and shared backend Test URL logic.

  • Verification is non-blocking
  • Verification metadata is the single source of truth
  • No additional verification backend logic introduced

Table Structure

Columns

Nimi (Name) · Viimane test (Last test) · Staatus (Status) · Skeem (Schema) · Tegevused (Actions)


Field Mapping

  • Namedefinitions[0].label
  • Last testlastTestAt
  • StatusverificationStatus + lastStatusCode
  • SchemaschemaCaptured

Nimi (Name)

  • Max visible length: 30chars
  • If longer → truncate to 29 chars + "…"
  • Search/sort uses full label (not truncated)

Tooltip

  • Täisnimidefinitions[0].label
  • Kirjeldusdefinitions[0].description or ---
  • MeetodGET / POST
  • URL → first non-empty of url / openApiUrl / path

Display Rules

Viimane test

  • Format: dd.mm.yyyy hh:mm
  • If null → ---

Staatus

  • verified → ✓ + 2xx (incl. 204)
  • failed → ⓧ + non-2xx
  • unverified → ⓧ + ---

Skeem

  • Updated only on 2xx
  • Failed test must NOT overwrite last valid schema
  • 204 → treated as successful, no schema captured

Test Parameters (Configuration-Level)

  • Endpoint stores default test parameters:

    • params
    • headers
    • body
  • Used automatically when pressing Testi

  • Not stored per execution

  • Node-level test parameters remain service-scoped

Verification state consists only of:

  • verificationStatus
  • lastTestAt
  • lastStatusCode
  • schemaCaptured

Actions

Kopeeri (Copy)

  • Duplicates:

    • method
    • URL/path/openApiUrl
    • request structure
    • default test parameters
  • New name format:
    old_name_dd_mm-yyyy-hh-mm-ss

  • Added immediately to list

  • Verification fields reset:

    • verificationStatus = unverified
    • lastTestAt = null
    • lastStatusCode = null
    • schemaCaptured = false

Testi (Test)

  • Uses shared backend verification (Task 3)
  • Sends stored definition + default test parameters
  • Updates persisted verification metadata
  • Per-row loading state

Muuda (Edit)

  • Opens existing endpoint modal

Kustuta (Delete)

  • Requires confirmation
  • Backend errors surfaced (no silent fail)

Search, Sorting & Pagination

  • Case-insensitive search by Name
  • Default sort: created_at desc (fallback name asc)
  • Order: filter → sort → paginate
  • Default page size: 10
  • Page size options: 10 / 20 / 30 / 40 / 50
  • Page size change resets to page 1

Integrity Constraints

  • Single shared Test URL backend implementation
  • Verification never blocks create/edit
  • Schema preserved on failed verification
  • No LLM execution

Metadata

Metadata

Assignees

Labels

GUIRefers to procurement typeenhancementNew feature or requestv3.2

Type

Projects

Status

Ready

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions