Skip to content

Simplifying the API #22

@monamok

Description

@monamok

As we've been talking today during the meeting, there are issues in commonolities that they're still pending and as we want to move forward and there are already some new proposals for new requirements, it's better to decide if want to have a simpler version of the API, having dedicated endpoints and removing unnecessary parameters. These are the main topics:

Having smaller APIs vs general APIs that include many endpoints (all and everything is related to deviceStatus)
Dedicated endpoint vs general endpoints

We already have been talking about some of them before here but let’s have pros and cons and decide what is the best way to move forward. I opened a PR because I find it easier commenting on each point but of course, we can continue the discussion here if you think it’s a better approach.

We have other 3 open issues:

So, in this version I excluded the part we would change error definitions and rename the parameters according to the guidelines. Those issues will be included in separated PRs. And for the third one, there’s already an open PR and once it gets approved I’ll include it here as well.

I opened a new PR including the changes I’d like to suggest.

  1. Renaming the endpoint to have a dedicated endpoint for roaming status.
  2. If the endpoint is dedicated to “roaming”, request body parameters eventType and eventStatus won’t be necessary anymore.
  3. Removing from response parameters that we already used to send the request to the endpoint. Is there any reason why we would need to get them back?
  4. The response was changed into a Boolean field to say if the device is roaming or not. We could keep the enum field with “ROAMING_ON" "ROAMING_OFF" values but do we really need it?
  5. The tag name and some descriptions were edited to be aligned with the changes that were made
  6. I didn’t change the filename. Depending on the result I’ll adjust it.

Please share your thoughts and preferences here or directly on the PR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions