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

Addition of "lastStatusTime" Field #146

Merged
Merged
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 24 additions & 6 deletions code/API_definitions/device-status.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ info:
- `CONNECTED_DATA`, if device is connected to the network via data usage
- `NOT_CONNECTED`, if device is not connected to the network

* **LastStatusTime** : This property specifies the time when the status was last checked. Its inclusion in the response indicates that the information may not be current, while its absence suggests that the status information is fresh.
sachinvodafone marked this conversation as resolved.
Show resolved Hide resolved

# API Functionality

The API exposes following capabilities:
Expand Down Expand Up @@ -151,12 +153,15 @@ paths:
examples:
Connected-With-SMS:
value:
lastStatusTime: "2024-02-20T10:41:38.657Z"
connectivityStatus: CONNECTED_SMS
Connected-With-DATA:
value:
lastStatusTime: "2024-02-20T10:41:38.657Z"
connectivityStatus: CONNECTED_DATA
Not-Connected:
value:
lastStatusTime: "2024-02-20T10:41:38.657Z"
connectivityStatus: NOT_CONNECTED
"400":
$ref: "#/components/responses/Generic400"
Expand Down Expand Up @@ -201,16 +206,19 @@ paths:
examples:
No-Country-Name:
value:
lastStatusTime: "2024-02-20T10:41:38.657Z"
roaming: true
countryCode: 901
countryName: []
Single-Country-Code:
value:
lastStatusTime: "2024-02-20T10:41:38.657Z"
roaming: true
countryCode: 262
countryName: ["DE"]
Multiple-Country-Codes:
value:
lastStatusTime: "2024-02-20T10:41:38.657Z"
roaming: true
countryCode: 340
countryName: ["BL", "GF", "GP", "MF", "MQ"]
Expand Down Expand Up @@ -469,13 +477,21 @@ components:
required:
- roaming
properties:
lastStatusTime:
$ref: "#/components/schemas/LastStatusTime"
roaming:
$ref: "#/components/schemas/ActiveRoaming"
countryCode:
$ref: "#/components/schemas/CountryCode"
countryName:
$ref: "#/components/schemas/CountryName"

LastStatusTime:
description: Last time that the associated device roaming status/connectivity was checked and, if necessary, updated
sachinvodafone marked this conversation as resolved.
Show resolved Hide resolved
type: string
format: date-time
example: "2024-02-20T10:41:38.657Z"

ActiveRoaming:
description: Roaming status. True, if it is roaming
type: boolean
Expand All @@ -485,6 +501,8 @@ components:
required:
- connectivityStatus
properties:
lastStatusTime:
$ref: "#/components/schemas/LastStatusTime"
connectivityStatus:
$ref: "#/components/schemas/ConnectivityStatus"

Expand Down Expand Up @@ -763,7 +781,7 @@ components:
type: string
format: uuid
description: Identifier of the event subscription - This attribute must not be present in the POST request as it is provided by API server
example: qs15-h556-rt89-1298
example: 550e8400-e29b-41d4-a716-446655440000

CloudEvent:
description: The notification callback
Expand Down Expand Up @@ -828,11 +846,11 @@ components:
type: string
format: date-time
description: |
Timestamp of when the occurrence happened.
If the time of the occurrence cannot be determined then this attribute MAY be set to some other time (such as the current time) by the CloudEvents producer,
however all producers for the same source MUST be consistent in this respect. In other words,
either they all use the actual time of the occurrence or they all use the same algorithm to determine the value used.
It must follow [RFC 3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) and must have time zone.
Timestamp of when the occurrence happened.
If the time of the occurrence cannot be determined then this attribute MAY be set to some other time (such as the current time) by the CloudEvents producer,
however all producers for the same source MUST be consistent in this respect. In other words,
either they all use the actual time of the occurrence or they all use the same algorithm to determine the value used.
It must follow [RFC 3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) and must have time zone.
Recommended format is yyyy-MM-dd'T'HH:mm:ss.SSSZ (i.e. which allows 2023-07-03T14:27:08.312+02:00 or 2023-07-03T12:27:08.312Z)
example: "2018-04-05T17:31:00Z"

Expand Down