Add missing docs for recording query

develop
Ensar Sarajčić 2018-10-30 20:55:35 +01:00
parent e3e9cde53b
commit 141cf654ce
2 changed files with 40 additions and 0 deletions

View File

@ -0,0 +1,20 @@
Creates new recording query
---
tags:
- Recording
parameters:
- in: path
name: device_id
required: true
type: integer
description: Id of the device
- in: body
name: body
required: true
schema:
$ref: '#/definitions/Query'
responses:
200:
description: Success
schema:
type: array

View File

@ -161,6 +161,26 @@ definitions:
description: Value of the recording
example: 25.0
Query:
type: object
required:
- selections
- filters
- groups
properties:
selections:
type: object
description: SELECT part of query - columns to select and aggregate
example: { "record_value": "sum" }
filters:
type: object
description: WHERE part of query (filters) - All of them are combined with AND
example: { "record_value": { "$gt": "300", "$lt": "1000" } }
groups:
type: object
description: GROUP BY part of query
example: { "recorded_at": "year" }
RecordingCreation:
type: object
required: