Skip to content

Instantly share code, notes, and snippets.

@taurus227
Created November 20, 2017 12:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save taurus227/dd97a2d447f5dca38735cb994fb7ce07 to your computer and use it in GitHub Desktop.
Save taurus227/dd97a2d447f5dca38735cb994fb7ce07 to your computer and use it in GitHub Desktop.
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