mirror of
https://git.ianrenton.com/ian/spothole.git
synced 2025-10-27 08:49:27 +00:00
Starting implementation of posting spots #2
This commit is contained in:
@@ -18,7 +18,7 @@ paths:
|
||||
get:
|
||||
tags:
|
||||
- spots
|
||||
summary: Retrieve a set of spots.
|
||||
summary: Get spots
|
||||
description: The main API call that retrieves spots from the system. Supply this with no query parameters to retrieve all spots known to the system. Supply query parameters to filter what is retrieved.
|
||||
operationId: spots
|
||||
parameters:
|
||||
@@ -170,7 +170,7 @@ paths:
|
||||
- AN
|
||||
responses:
|
||||
'200':
|
||||
description: Successfully retrieved spots.
|
||||
description: Success
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
@@ -183,12 +183,12 @@ paths:
|
||||
get:
|
||||
tags:
|
||||
- status
|
||||
summary: Retrieve the server status.
|
||||
description: Query information about the server for use in a diagnostics display
|
||||
summary: Get server status
|
||||
description: Query information about the server for use in a diagnostics display.
|
||||
operationId: status
|
||||
responses:
|
||||
'200':
|
||||
description: Successfully retrieved status.
|
||||
description: Success
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
@@ -251,12 +251,12 @@ paths:
|
||||
get:
|
||||
tags:
|
||||
- spots
|
||||
summary: Retieve a list of options for various enumerations.
|
||||
summary: Get enumeration options
|
||||
description: Retrieves the list of options for various enumerated types, which can be found in the spots and also provided back to the API as query parameters. While these enumerated options are defined in this spec anyway, providing them in an API call allows us to define extra parameters, like the colours associated with bands, and also allows clients to set up their filters and features without having to have internal knowledge about, for example, what bands the server knows about.
|
||||
operationId: options
|
||||
responses:
|
||||
'200':
|
||||
description: Successfully retrieved options.
|
||||
description: Success
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
@@ -302,6 +302,38 @@ paths:
|
||||
description: The maximum age, in seconds, of any spot before it will be deleted by the system. When querying the /api/spots endpoint and providing a "max_age" or "since" parameter, there is no point providing a number larger than this, because the system drops all spots older than this.
|
||||
example: 3600
|
||||
|
||||
|
||||
/spot:
|
||||
post:
|
||||
tags:
|
||||
- spots
|
||||
summary: Add a spot
|
||||
description: Supply a new spot object, which will be added to the system. Currently, this will not be reported up the chain to a cluster, POTA, SOTA etc. This will be introduced in a future version.
|
||||
operationId: spot
|
||||
parameters:
|
||||
- name: spot
|
||||
description: The spot data to post
|
||||
required: true
|
||||
schema:
|
||||
type:
|
||||
$ref: '#/components/schemas/Spot'
|
||||
responses:
|
||||
'200':
|
||||
description: Success
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: string
|
||||
example: "OK"
|
||||
'422':
|
||||
description: Validation error
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: string
|
||||
example: "Failed"
|
||||
|
||||
|
||||
components:
|
||||
schemas:
|
||||
Spot:
|
||||
|
||||
Reference in New Issue
Block a user