Improve status API. Closes #11

This commit is contained in:
Ian Renton
2025-09-29 21:30:50 +01:00
parent ac6d4d40cd
commit 280749919d
3 changed files with 59 additions and 19 deletions

View File

@@ -184,39 +184,49 @@ paths:
schema:
type: object
properties:
"Web Server":
"uptime":
type: string
description: The amount of time the software has been running for.
example: "12:34:56"
"mem_use_mb":
type: number
description: The amount of memory the software is using, in megabytes.
example: 123.456
"num_spots":
type: integer
description: Number of spots currently in the system.
example: 123
"cleanup":
type: object
properties:
status:
type: string
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
"Cleanup Timer":
"webserver":
type: object
properties:
status:
type: string
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
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
"POTA...":
type: object
properties:
status:
type: string
example: OK
last_updated:
type: string
example: 2025-09-28T20:31:00+00:00
last_spot:
type: string
example: 2025-09-28T20:31:00+00:00
providers:
type: array
description: An array of all the data providers.
items:
$ref: '#/components/schemas/ProviderStatus'
components:
schemas:
@@ -448,4 +458,24 @@ components:
source_id:
type: string
description: The ID the source gave it, if any.
example: "GUID-123456"
example: "GUID-123456"
ProviderStatus:
type: object
properties:
name:
type: string
description: The name of the provider.
example: POTA
status:
type: string
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
last_spot:
type: string
description: The time of the latest spot received by this provider.
example: 2025-09-28T20:31:00+00:00