Skip to content
Merged
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
cde2161
Add lastStatusTime field to successful responses with examples
eric-murray Jun 15, 2026
3c5e6ef
Fix missing quotation marks
eric-murray Jun 15, 2026
9600b27
Update request examples
eric-murray Jun 15, 2026
8e9526e
Change type from object to string for date field
eric-murray Jun 15, 2026
0202f01
Fix check request examples
eric-murray Jun 15, 2026
dfeaf98
Update check request examples
eric-murray Jun 15, 2026
fc40d3f
Update device-data-volume.yaml to specify type for nullable
eric-murray Jun 15, 2026
9fd4534
Add volumeToCheck field to CheckRequest
eric-murray Jun 15, 2026
43d7666
Fix YAML key from 'units' to 'unit'
eric-murray Jun 15, 2026
5b9a7db
Refine LastStatusTime schema in device-data-volume.yaml
eric-murray Jun 15, 2026
8dfa297
Remove duplicate description from timestamp field
eric-murray Jun 15, 2026
55e1807
Try once more to use common DateTime schema for LastStatusTime
eric-murray Jun 15, 2026
22eaa4c
Fix comment indentation
eric-murray Jun 15, 2026
c004e2a
Remove comment
eric-murray Jun 15, 2026
ad7e395
Update DateTime schema to specify type as string
eric-murray Jun 15, 2026
f14b737
Refactor LastStatusTime schema definition
eric-murray Jun 15, 2026
6bd1bae
Give up on trying to add nullable property to common DateTime schema
eric-murray Jun 15, 2026
d14ad7f
Try once more to use common DateTime schema for LastStatusTime
eric-murray Jun 15, 2026
12b86f8
Try once more to use common DateTime schema for LastStatusTime
eric-murray Jun 15, 2026
dc0c3b3
Update LastStatusTime type to include DateTime reference
eric-murray Jun 15, 2026
8959bb0
Add unnecessary type definition to LastStatusTime schema to stop spec…
eric-murray Jun 15, 2026
bdd6998
One more go
eric-murray Jun 15, 2026
5ab5cce
Back to copy / paste from common schema
eric-murray Jun 15, 2026
0005598
Merge branch 'camaraproject:main' into eric-murray-patch-2
eric-murray Jul 30, 2026
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
82 changes: 74 additions & 8 deletions code/API_definitions/device-data-volume.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,16 @@ paths:
- openId:
- device-data-volume:read
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/RetrieveDataVolumeRequest"
required: true
examples:
Retrieve Request:
$ref: "#/components/examples/RetrieveRequest"
Retrieve Request With 2-legged Access Token:
$ref: "#/components/examples/RetrieveRequestWith2-leggedAccessToken"
responses:
"200":
description: Contains information about the remaining device data volume.
Expand All @@ -117,6 +122,8 @@ paths:
examples:
Successful Response:
$ref: "#/components/examples/SuccessfulRetrieveResponse"
Successful Retrieve Response With Unknown Status Time:
$ref: "#/components/examples/SuccessfulRetrieveResponseWithUnknownStatusTime"
Successful Response With Device Disambiguation:
$ref: "#/components/examples/SuccessfulRetrieveResponseWithDeviceDisambiguation"
"400":
Expand Down Expand Up @@ -145,11 +152,16 @@ paths:
- openId:
- device-data-volume:read
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/CheckDataVolumeRequest"
required: true
examples:
Check Request:
$ref: "#/components/examples/CheckRequest"
Retrieve Request With 2-legged Access Token:
$ref: "#/components/examples/CheckRequestWith2-leggedAccessToken"
responses:
"200":
description: Boolean response indicating if the remaining data volume exceeds the provided threshold
Expand All @@ -163,6 +175,8 @@ paths:
examples:
Successful Response:
$ref: "#/components/examples/SuccessfulCheckResponse"
Successful Check Response With Unknown Status Time:
$ref: "#/components/examples/SuccessfulCheckResponseWithUnknownStatusTime"
Successful Response With Device Disambiguation:
$ref: "#/components/examples/SuccessfulCheckResponseWithDeviceDisambiguation"
"400":
Expand All @@ -184,6 +198,16 @@ components:
$ref: "../common/CAMARA_common.yaml#/components/securitySchemes/openId"

schemas:
LastStatusTime:
description: |
The last time that the device data volume status was confirmed to be correct by the API provider. It might not be possible to provide the current status because, for example, the device may not be connected to any mobile network.
It must follow [RFC 3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) and must have time zone.
type: string
format: date-time
maxLength: 64
nullable: true
example: "2018-04-05T17:31:00Z"

VolumeUnitEnum:
description: Enumeration of volume units, where "MiB" is 2^20 bytes and "GiB" is 2^30 bytes.
type: string
Expand Down Expand Up @@ -230,14 +254,17 @@ components:
CheckDataVolumeResponse:
description: Represents the response, if the data volume exceeds a given threshold.
type: object
required:
- lastStatusTime
- thresholdExceeded
properties:
device:
$ref: "../common/CAMARA_common.yaml#/components/schemas/DeviceResponse"
lastStatusTime:
$ref: "#/components/schemas/LastStatusTime"
thresholdExceeded:
type: boolean
description: Indicates whether the remaining data volume exceeds the given threshold
required:
- thresholdExceeded

RetrieveDataVolumeRequest:
description: |
Expand All @@ -251,32 +278,71 @@ components:
RetrieveDataVolumeResponse:
description: Represents the remaining data volume of the requested device.
type: object
required:
- lastStatusTime
- dataVolumeCategory
properties:
device:
$ref: "../common/CAMARA_common.yaml#/components/schemas/DeviceResponse"
lastStatusTime:
$ref: "#/components/schemas/LastStatusTime"
dataVolumeCategory:
$ref: "#/components/schemas/DataVolumeCategory"
required:
- dataVolumeCategory

examples:
RetrieveRequest:
description: Request device data volume category with 3-legged access token
value: {}
RetrieveRequestWith2-leggedAccessToken:
description: Request device data volume category with 2-legged access token
value:
device:
phoneNumber: "+123456789"
SuccessfulRetrieveResponse:
description: Successfully retrieve the device data volume category
description: Successfully retrieve the device data volume category with known status time
value:
lastStatusTime: "2024-02-20T10:41:38.657Z"
dataVolumeCategory: "<200MiB"
SuccessfulRetrieveResponseWithUnknownStatusTime:
description: Successfully retrieve the device data volume category, but status time of that information is unknown
value:
lastStatusTime: null
dataVolumeCategory: "<200MiB"
SuccessfulRetrieveResponseWithDeviceDisambiguation:
description: Successfully retrieve the device data volume category but device disambiguation is required
value:
device:
phoneNumber: "+123456789"
lastStatusTime: "2024-02-20T10:41:38.657Z"
dataVolumeCategory: "<200MiB"
CheckRequest:
description: Request device data volume category check with 3-legged access token
value:
volumeToCheck:
value: 500
unit: "MiB"
CheckRequestWith2-leggedAccessToken:
description: Request device data volume category check with 2-legged access token
value:
device:
phoneNumber: "+123456789"
volumeToCheck:
value: 500
unit: "MiB"
SuccessfulCheckResponse:
description: Successfully check the device data volume category
description: Successfully check the device data volume category with known status time
value:
lastStatusTime: "2024-02-20T10:41:38.657Z"
thresholdExceeded: false
SuccessfulCheckResponseWithUnknownStatusTime:
description: Successfully check the device data volume category, but status time of that information is unknown
value:
lastStatusTime: null
thresholdExceeded: false
SuccessfulCheckResponseWithDeviceDisambiguation:
description: Successfully check the device data volume category but device disambiguation is required
value:
device:
phoneNumber: "+123456789"
lastStatusTime: "2024-02-20T10:41:38.657Z"
thresholdExceeded: true
Loading