mirror of
https://git.ianrenton.com/ian/spothole.git
synced 2025-10-27 08:49:27 +00:00
API docs for alerts #17
This commit is contained in:
@@ -179,6 +179,81 @@ paths:
|
||||
$ref: '#/components/schemas/Spot'
|
||||
|
||||
|
||||
/alerts:
|
||||
get:
|
||||
tags:
|
||||
- alerts
|
||||
summary: Get alerts
|
||||
description: Retrieves alerts (indications of upcoming activations) from the system. Supply this with no query parameters to retrieve all alerts known to the system. Supply query parameters to filter what is retrieved.
|
||||
operationId: spots
|
||||
parameters:
|
||||
- name: limit
|
||||
in: query
|
||||
description: Limit the number of alerts in the response
|
||||
required: false
|
||||
schema:
|
||||
type: integer
|
||||
- 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
|
||||
- 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."
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
enum:
|
||||
- POTA
|
||||
- SOTA
|
||||
- WWFF
|
||||
- WWBOTA
|
||||
- GMA
|
||||
- HEMA
|
||||
- ParksNPeaks
|
||||
- Cluster
|
||||
- RBN
|
||||
- APRS-IS
|
||||
- name: sig
|
||||
in: query
|
||||
description: "Limit the spots to only ones from one or more Special Interest Groups. To select more than one SIG, supply a comma-separated list."
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
enum:
|
||||
- POTA
|
||||
- SOTA
|
||||
- WWFF
|
||||
- WWBOTA
|
||||
- GMA
|
||||
- HEMA
|
||||
- name: dx_continent
|
||||
in: query
|
||||
description: "Limit the spots to only ones where the DX (the operator being spotted) is on the given continent(s). To select more than one continent, supply a comma-separated list."
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
enum:
|
||||
- EU
|
||||
- NA
|
||||
- SA
|
||||
- AS
|
||||
- AF
|
||||
- OC
|
||||
- AN
|
||||
responses:
|
||||
'200':
|
||||
description: Success
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/Alert'
|
||||
|
||||
|
||||
/status:
|
||||
get:
|
||||
tags:
|
||||
@@ -499,10 +574,18 @@ components:
|
||||
type: number
|
||||
description: Time of the spot, UTC seconds since UNIX epoch
|
||||
example: 1759579508
|
||||
time_iso:
|
||||
type: string
|
||||
description: Time of the spot, ISO 8601
|
||||
example: "2025-10-05T12:34:56.789Z"
|
||||
received_time:
|
||||
type: number
|
||||
description: Time that this software received the spot, UTC seconds since UNIX epoch. This is used with the "since_received" call to our API to receive all data that is new to us, even if by a quirk of the API it might be older than the list time the client polled the API.
|
||||
example: 1759579508
|
||||
received_time_iso:
|
||||
type: string
|
||||
description: Time that this software received the spot, ISO 8601
|
||||
example: "2025-10-05T12:34:56.789Z"
|
||||
comment:
|
||||
type: string
|
||||
description: Comment left by the spotter, if any
|
||||
@@ -587,6 +670,137 @@ components:
|
||||
description: The ID the source gave it, if any.
|
||||
example: "GUID-123456"
|
||||
|
||||
|
||||
Alert:
|
||||
type: object
|
||||
properties:
|
||||
id:
|
||||
type: integer
|
||||
description: Unique identifier based on a hash of the alert to distinguish this one from any others.
|
||||
example: 123987609816349182
|
||||
dx_call:
|
||||
type: string
|
||||
description: Callsign of the operator that is going to be activating
|
||||
example: M0TRT
|
||||
dx_name:
|
||||
type: string
|
||||
description: Name of the operator that is going to be activating
|
||||
example: Ian
|
||||
dx_country:
|
||||
type: string
|
||||
description: Country of the DX operator
|
||||
example: United Kingdom
|
||||
dx_flag:
|
||||
type: string
|
||||
description: Country flag of the DX operator
|
||||
example: ""
|
||||
dx_continent:
|
||||
type: string
|
||||
description: Continent of the DX operator
|
||||
enum:
|
||||
- EU
|
||||
- NA
|
||||
- SA
|
||||
- AS
|
||||
- AF
|
||||
- OC
|
||||
- AN
|
||||
example: EU
|
||||
dx_dxcc_id:
|
||||
type: integer
|
||||
description: DXCC ID of the DX operator
|
||||
example: 235
|
||||
dx_cq_zone:
|
||||
type: integer
|
||||
description: CQ zone of the DX operator
|
||||
example: 27
|
||||
dx_itu_zone:
|
||||
type: integer
|
||||
description: ITU zone of the DX operator
|
||||
example: 14
|
||||
freqs_modes:
|
||||
type: string
|
||||
description: An indication of the frequencies and modes that the activation will use, if provided.
|
||||
example: "7-ssb 14-ssb maybe 145-fm"
|
||||
start_time:
|
||||
type: number
|
||||
description: Time that the activation is expected to start, UTC seconds since UNIX epoch
|
||||
example: 1759579508
|
||||
start_time_iso:
|
||||
type: string
|
||||
description: Time that the activation is expected to start, ISO 8601
|
||||
example: "2025-10-05T12:34:56.789Z"
|
||||
end_time:
|
||||
type: number
|
||||
description: Time that the activation is expected to star, UTC seconds since UNIX epoch
|
||||
example: 1759579508
|
||||
end_time_iso:
|
||||
type: string
|
||||
description: Time that the activation is expected to star, ISO 8601
|
||||
example: "2025-10-05T12:34:56.789Z"
|
||||
received_time:
|
||||
type: number
|
||||
description: Time that this software received the alert, UTC seconds since UNIX epoch. This is used with the "since_received" call to our API to receive all data that is new to us, even if by a quirk of the API it might be older than the list time the client polled the API.
|
||||
example: 1759579508
|
||||
received_time_iso:
|
||||
type: string
|
||||
description: Time that this software received the alert, ISO 8601
|
||||
example: "2025-10-05T12:34:56.789Z"
|
||||
comment:
|
||||
type: string
|
||||
description: Comment made by the activator, if any
|
||||
example: "2025 DXpedition to null island"
|
||||
sig:
|
||||
type: string
|
||||
description: Special Interest Group (SIG), e.g. outdoor activity programme such as POTA
|
||||
enum:
|
||||
- POTA
|
||||
- SOTA
|
||||
- WWFF
|
||||
- WWBOTA
|
||||
- GMA
|
||||
- HEMA
|
||||
example: POTA
|
||||
sig_refs:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
description: SIG references. We allow multiple here for e.g. n-fer activations, unlike ADIF SIG_INFO
|
||||
example: GB-0001
|
||||
sig_refs_names:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
description: SIG reference names
|
||||
example: Null Country Park
|
||||
activation_score:
|
||||
type: integer
|
||||
description: Activation score. SOTA only
|
||||
example: 0
|
||||
icon:
|
||||
type: string
|
||||
descripton: Icon, from the Font Awesome set. This is fairly opinionated but is here to help the Spothole web UI and Field Spotter. Does not include the "fa-" prefix.
|
||||
example: tree
|
||||
source:
|
||||
type: string
|
||||
description: Where we got the alert from.
|
||||
enum:
|
||||
- POTA
|
||||
- SOTA
|
||||
- WWFF
|
||||
- WWBOTA
|
||||
- GMA
|
||||
- HEMA
|
||||
- ParksNPeaks
|
||||
- Cluster
|
||||
- RBN
|
||||
- APRS-IS
|
||||
example: POTA
|
||||
source_id:
|
||||
type: string
|
||||
description: The ID the source gave it, if any.
|
||||
example: "GUID-123456"
|
||||
|
||||
SpotProviderStatus:
|
||||
type: object
|
||||
properties:
|
||||
|
||||
Reference in New Issue
Block a user