Fix status query. Closes #36

This commit is contained in:
Ian Renton
2025-10-08 16:26:43 +01:00
parent e01b6d5ea9
commit b45fda2dd2
4 changed files with 54 additions and 39 deletions

View File

@@ -33,19 +33,19 @@ paths:
description: Limit the spots to only ones at this time or later. Time in UTC seconds since UNIX epoch. Equivalent to "max_age" but saves the client having to work out how many seconds ago "midnight" was.
required: false
schema:
type: integer
type: number
- name: max_age
in: query
description: Limit the spots to only ones received in the last 'n' seconds. Equivalent to "since" but saves the client having to work out what time was 'n' seconds ago on every call. Refer to the "max_spot_age" in the /options call to figure out what the maximum useful value you can provide is. Larger values will still be accepted, there just won't be any spots in the system older than max_spot_age.
required: false
schema:
type: integer
type: number
- name: received_since
in: query
description: Limit the spots to only ones that the system found out about at this time or later. Time in UTC seconds since UNIX epoch. If you are using a front-end that tracks the last time it queried the API and requests spots since then, you want *this* version of the query parameter, not "since", because otherwise it may miss things. The logic is "greater than" rather than "greater than or equal to", so you can submit the time of the last received item back to this call and you will get all the more recent spots back, without duplicating the previous latest spot.
required: false
schema:
type: integer
type: number
- name: source
in: query
description: "Limit the spots to only ones from one or more sources. To select more than one source, supply a comma-separated list."
@@ -283,10 +283,10 @@ paths:
type: string
description: The callsign of this server's operator.
example: "M0TRT"
"uptime":
type: string
description: The amount of time the software has been running for.
example: "12:34:56"
"uptime_sec":
type: integer
description: The amount of time the software has been running for, in seconds.
example: 12345
"mem_use_mb":
type: number
description: The amount of memory the software is using, in megabytes.
@@ -307,9 +307,9 @@ paths:
description: The status of the cleanup thread
example: OK
last_ran:
type: string
description: The last time the cleanup operation ran
example: 2025-09-28T20:31:00+00:00
type: number
description: The last time the cleanup operation ran, UTC seconds since UNIX epoch.
example: 1759579508
"webserver":
type: object
properties:
@@ -318,13 +318,13 @@ paths:
description: The status of the web server
example: OK
last_page_access:
type: string
description: The last time a page was accessed on the web server
example: 2025-09-28T20:31:00+00:00
type: number
description: The last time a page was accessed on the web server, UTC seconds since UNIX epoch.
example: 1759579508
last_api_access:
type: string
description: The last time an API endpoint was accessed on the web server
example: 2025-09-28T20:31:00+00:00
type: number
description: The last time an API endpoint was accessed on the web server, UTC seconds since UNIX epoch.
example: 1759579508
spot_providers:
type: array
description: An array of all the spot providers.
@@ -823,13 +823,13 @@ components:
description: The status of the provider.
example: OK
last_updated:
type: string
description: The last time at which this provider received data.
example: 2025-09-28T20:31:00+00:00
type: number
description: The last time at which this provider received data, UTC seconds since UNIX epoch.
example: 1759579508
last_spot:
type: string
description: The time of the latest spot received by this provider.
example: 2025-09-28T20:31:00+00:00
type: number
description: The time of the latest spot received by this provider, UTC seconds since UNIX epoch.
example: 1759579508
AlertProviderStatus:
type: object
@@ -847,9 +847,9 @@ components:
description: The status of the provider.
example: OK
last_updated:
type: string
description: The last time at which this provider received data.
example: 2025-09-28T20:31:00+00:00
type: number
description: The last time at which this provider received data, UTC seconds since UNIX epoch.
example: 1759579508
Band:
type: object