Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Move Measurements
openapi: 3.0.0
info:
description: API for querying power meter measurements.
version: 1.0.0
title: Move Measurements
contact:
email: robert@mikes.hu
servers:
- url: 'https://192.168.0.0/v1'
description: Production server (uses live data)
- url: 'https://192.168.0.0:8443/v1'
description: Sandbox server (uses test data)
tags:
- name: measurements
description: Poll measurement data
paths:
/measurements:
get:
tags:
- measurements
summary: Poll measurement data for a given time interval
description: ''
operationId: getMeasurements
parameters:
- name: powerMeterNames
in: query
description: Comma-separated list of power meter names
required: true
schema:
type: array
items:
type: string
style: form
explode: false
- name: beginTime
in: query
description: The beginning of the interval
required: true
schema:
type: string
format: dateTime
- name: endTime
in: query
description: The end of the interval
required: true
schema:
type: string
format: dateTime
responses:
'200':
description: Successful operation
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Measurement'
'400':
description: Invalid parameter value
'401':
description: >-
The authorization token is not valid. Contact your system
administrator please.
security:
- BearerAuth: []
components:
securitySchemes:
BearerAuth:
type: http
scheme: bearer
bearerFormat: JWT
schemas:
Measurement:
type: object
required:
- powerMeterName
- timestamp
- value
- unit
properties:
powerMeterName:
type: string
timestamp:
type: string
format: dateTime
value:
type: number
format: double
unit:
type: string
description: Unit of measurement
enum:
- mA
- A
- W
- kW
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.