dawarich/swagger/v1/swagger.yaml
2024-06-19 21:16:06 +02:00

109 lines
3.2 KiB
YAML

---
openapi: 3.0.1
info:
title: API V1
version: v1
paths:
"/api/v1/overland/batches":
post:
summary: Creates a batch of points
tags:
- Batches
parameters:
- name: api_key
in: query
required: true
description: API Key
schema:
type: string
responses:
'201':
description: Batch of points created
'401':
description: Unauthorized
requestBody:
content:
application/json:
schema:
type: object
properties:
type:
type: string
geometry:
type: object
properties:
type:
type: string
coordinates:
type: array
properties:
type: object
properties:
timestamp:
type: string
altitude:
type: number
speed:
type: number
horizontal_accuracy:
type: number
vertical_accuracy:
type: number
motion:
type: array
pauses:
type: boolean
activity:
type: string
desired_accuracy:
type: number
deferred:
type: number
significant_change:
type: string
locations_in_payload:
type: number
device_id:
type: string
wifi:
type: string
battery_state:
type: string
battery_level:
type: number
required:
- geometry
- properties
examples:
'0':
summary: Creates a batch of points
value:
locations:
- type: Feature
geometry:
type: Point
coordinates:
- 13.356718
- 52.502397
properties:
timestamp: '2021-06-01T12:00:00Z'
altitude: 0
speed: 0
horizontal_accuracy: 0
vertical_accuracy: 0
motion: []
pauses: false
activity: unknown
desired_accuracy: 0
deferred: 0
significant_change: unknown
locations_in_payload: 1
device_id: Swagger
wifi: unknown
battery_state: unknown
battery_level: 0
servers:
- url: http://{defaultHost}
variables:
defaultHost:
default: localhost:3000