mirror of
https://git.ianrenton.com/ian/spothole.git
synced 2025-10-27 08:49:27 +00:00
Improve status API. Closes #11
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user