Skip to content

Review design of list endpoints GET /edge-cloud-zones and GET /clusters and fix issues #73

Description

@eric-murray

Problem description
There are a number of issues with the design of the GET /edge-cloud-zones and GET /clusters endpoints:

  • Common Issues

    • Neither endpoint supports pagination
    • Filtering by region requires use of edge cloud provider specific region names, meaning the results will be specific to a given edge cloud provider
    • Filtering by edge cloud provider is not supported
    • Documented error responses need reviewed
  • GET /edge-cloud-zones issues

    • Defining a default value of unknown for status filtering prevents returning a list of edge cloud zones independent of status, thus requiring 3 separate queries to retrieve the full list
  • GET /clusters

    • The response parameters provider is defined as the Application Provider (i.e. API consumer), but Kubernetes clusters are not Application Provider specific. This is surely meant to be the edge cloud provider, which is otherwise not a response parameter.
    • There is no good reason that this is a separate endpoint. The GET /clusters response data could be included as an optional response property of the GET /edge-cloud-zones endpoint, being included when relevant for the specific edgeCloudZoneId.

Expected behavior

  • Fix:

  • Consider:

    • combining GET /clusters with GET /edge-cloud-zones into a single listing endpoint
    • including pagination support to avoid the endpoint returning large amounts of data
    • adopting geographical region identifiers for region filtering that are independent of the edge cloud provider terminology - for example, ISO 3166-1 alpha-2 country codes ("GB", "DE", "US", etc.)
    • allowing filtering by edge cloud provider
    • removing the default value of unknown for status filtering

Alternative solution
None proposed

Additional context
None

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    correctionSuggesting corrections of API specification or indicating misalignment with API design guidelines

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions