Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to respond if queried device does not have an active session? #138

Open
gmuratk opened this issue Apr 10, 2024 · 3 comments · May be fixed by #262
Open

How to respond if queried device does not have an active session? #138

gmuratk opened this issue Apr 10, 2024 · 3 comments · May be fixed by #262
Labels
enhancement New feature or request Spring25

Comments

@gmuratk
Copy link
Contributor

gmuratk commented Apr 10, 2024

Problem description

There may be cases where the queried device for connectivity or roaming does not have an active session. An appropriate API response needs to be agreed to ensure same behavior by multiple API providers.
Possible evolution

  • An error response may be returned with an appropriate message.

  • A success message with a dedicated property maybe used to indicate device is not online

Alternative solution

Additional context

see: camaraproject/Commonalities#127 (comment)

@gmuratk gmuratk added the enhancement New feature or request label Apr 10, 2024
@akoshunyadi
Copy link
Collaborator

For connectivity we have the response value NOT_CONNECTED.
For roaming status the last known status is returned. So if the device changes to roaming and then it will be switched off, then the expected result is roaming=true.

@gmuratk
Copy link
Contributor Author

gmuratk commented Apr 12, 2024

Thanks @akoshunyadi. I think it will be good to document the expected behavior for the roaming case. We probably want to avoid API consumers mistakenly rely on retrieve-roaming-status response to infer device's connectivity status.

@eric-murray
Copy link
Collaborator

Hi @gmuratk, @bigludo7, @akoshunyadi

I was reviewing this issue to see if it could be closed. All the three status API (roaming, reachability and connected network) include a lastStatusTime response field that can be used to indicate that the information may be out of date. Anything that the API consumer infers about the current status given this "historical" status is up to them. If the API provider does not know the current status and has no historical information, they can return a 503.

However, I did note that lastStatusTime is not mandatory, but I think it should be. If it is not present, the API consumer will reasonably assume that the status is current. But why not make that explicit - it is not so difficult to add the current time to the response for "real-time" implementations.

So I think making lastStatusTime a required response parameter is all that is required to close this issue. Let me know if you agree, and whether we should push this through for the Spring'25 meta-release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Spring25
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants