Created
November 20, 2017 12:26
-
-
Save taurus227/dd97a2d447f5dca38735cb994fb7ce07 to your computer and use it in GitHub Desktop.
Move Measurements
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
openapi: 3.0.0 | |
info: | |
description: API for querying power meter measurements. | |
version: 1.0.0 | |
title: Move Measurements | |
contact: | |
email: [email protected] | |
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