Collect resource usage in a home environment (0.0.0-semantic-release)

Download OpenAPI specification:Download

E-mail: markus.felten@gmx.de License: MIT

admin

Create token.

Create token.

Authorizations:
konsumAuth

Responses

Response samples

Content type
application/json
{
  • "token": "string"
}

Stop the service.

Stop konsum server.

Authorizations:
konsumAuth

Responses

Reload config.

Reload konsum config.

Authorizations:
konsumAuth

Responses

Create backup on server.

Create backup on server.

Authorizations:
konsumAuth

Responses

Create backup.

Create backup.

Authorizations:
konsumAuth

Responses

Service status report.

Retrieve service state.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

authenticate

User login.

Login to request api token.

Request Body schema: application/json
required
username
required
string
password
required
string

Responses

Request samples

Content type
application/json
{
  • "username": "string",
  • "password": "string"
}

Response samples

Content type
application/json
{
  • "access_token": "string",
  • "token_type": "bearer",
  • "refresh_token": "string",
  • "expires_in": 0,
  • "scope": "string"
}

category

Retrieve list of categories.

Authorizations:
konsumAuth

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Retrieve a category.

Authorizations:
konsumAuth
path Parameters
category
required
string (CategoryName) ^[A-Za-z0-9-_\.:]+$

Category name.

Responses

Response samples

Content type
application/json
{
  • "name": "EV",
  • "description": "mains power",
  • "unit": "m3",
  • "fractionalDigits": 3,
  • "order": 1
}

Add a category.

Add a new category.

Authorizations:
konsumAuth
path Parameters
category
required
string (CategoryName) ^[A-Za-z0-9-_\.:]+$

Category name.

Request Body schema: application/json
required
name
required
string (CategoryName) ^[A-Za-z0-9-_\.:]+$

Category name.

description
string

The human readable description of your category.

unit
string

The physical measurment unit.

fractionalDigits
number
Default: 2

decimal precission.

order
number

sorting order higher number come first.

Responses

Request samples

Content type
application/json
{
  • "name": "EV",
  • "description": "mains power",
  • "unit": "m3",
  • "fractionalDigits": 3,
  • "order": 1
}

Response samples

Content type
{
  • "message": "string"
}

Alter a category.

Update a category.

Authorizations:
konsumAuth
path Parameters
category
required
string (CategoryName) ^[A-Za-z0-9-_\.:]+$

Category name.

Request Body schema: application/json
required
name
required
string (CategoryName) ^[A-Za-z0-9-_\.:]+$

Category name.

description
string

The human readable description of your category.

unit
string

The physical measurment unit.

fractionalDigits
number
Default: 2

decimal precission.

order
number

sorting order higher number come first.

Responses

Request samples

Content type
application/json
{
  • "name": "EV",
  • "description": "mains power",
  • "unit": "m3",
  • "fractionalDigits": 3,
  • "order": 1
}

Response samples

Content type
{
  • "message": "string"
}

Delete a category.

Delete a category.

Authorizations:
konsumAuth
path Parameters
category
required
string (CategoryName) ^[A-Za-z0-9-_\.:]+$

Category name.

Responses

Response samples

Content type
{
  • "message": "string"
}

value

Get values of a category.

List values of a category.

Authorizations:
konsumAuth
path Parameters
category
required
string (CategoryName) ^[A-Za-z0-9-_\.:]+$

Category name.

query Parameters
limit
integer

Limits the number of entries delivered.

reverse
boolean

Reverses the order in which the entries are delivered.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Get a value from a category.

One value of a category.

Authorizations:
konsumAuth
path Parameters
category
required
string (CategoryName) ^[A-Za-z0-9-_\.:]+$

Category name.

date
required
string <date-time> (Date)

Date time

query Parameters
limit
integer

Limits the number of entries delivered.

reverse
boolean

Reverses the order in which the entries are delivered.

Responses

Response samples

Content type
application/json
{
  • "date": "2019-08-24T14:15:22Z",
  • "value": 0
}

Add values to a category.

Insert a value into a category.

Authorizations:
konsumAuth
path Parameters
category
required
string (CategoryName) ^[A-Za-z0-9-_\.:]+$

Category name.

date
required
string <date-time> (Date)

Date time

query Parameters
limit
integer

Limits the number of entries delivered.

reverse
boolean

Reverses the order in which the entries are delivered.

Request Body schema: application/json
required
date
required
string <date-time>

date + time when the value was present

value
required
number

physical value on the meter

Responses

Request samples

Content type
application/json
{
  • "date": "2019-08-24T14:15:22Z",
  • "value": 0
}

Delete values from a category.

Delete a value from a category.

Authorizations:
konsumAuth
path Parameters
category
required
string (CategoryName) ^[A-Za-z0-9-_\.:]+$

Category name.

date
required
string <date-time> (Date)

Date time

query Parameters
limit
integer

Limits the number of entries delivered.

reverse
boolean

Reverses the order in which the entries are delivered.

Responses

Get values of a meter.

List values of a meter.

Authorizations:
konsumAuth
path Parameters
category
required
string (CategoryName) ^[A-Za-z0-9-_\.:]+$

Category name.

meter
required
string (MeterName) ^[A-Za-z0-9-_\.:]+$

Meter name.

query Parameters
limit
integer

Limits the number of entries delivered.

reverse
boolean

Reverses the order in which the entries are delivered.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Get values of a meter.

One value of a meter.

Authorizations:
konsumAuth
path Parameters
category
required
string (CategoryName) ^[A-Za-z0-9-_\.:]+$

Category name.

meter
required
string (MeterName) ^[A-Za-z0-9-_\.:]+$

Meter name.

date
required
string <date-time> (Date)

Date time

query Parameters
limit
integer

Limits the number of entries delivered.

reverse
boolean

Reverses the order in which the entries are delivered.

Responses

Response samples

Content type
application/json
{
  • "date": "2019-08-24T14:15:22Z",
  • "value": 0
}

Add values to a meter.

Insert a value into a meter.

Authorizations:
konsumAuth
path Parameters
category
required
string (CategoryName) ^[A-Za-z0-9-_\.:]+$

Category name.

meter
required
string (MeterName) ^[A-Za-z0-9-_\.:]+$

Meter name.

date
required
string <date-time> (Date)

Date time

query Parameters
limit
integer

Limits the number of entries delivered.

reverse
boolean

Reverses the order in which the entries are delivered.

Request Body schema: application/json
required
date
required
string <date-time>

date + time when the value was present

value
required
number

physical value on the meter

Responses

Request samples

Content type
application/json
{
  • "date": "2019-08-24T14:15:22Z",
  • "value": 0
}

Delete values from a meter.

Delete a value from a meter.

Authorizations:
konsumAuth
path Parameters
category
required
string (CategoryName) ^[A-Za-z0-9-_\.:]+$

Category name.

meter
required
string (MeterName) ^[A-Za-z0-9-_\.:]+$

Meter name.

date
required
string <date-time> (Date)

Date time

query Parameters
limit
integer

Limits the number of entries delivered.

reverse
boolean

Reverses the order in which the entries are delivered.

Responses

note

List notes of a category.

List notes of a category.

Authorizations:
konsumAuth
path Parameters
category
required
string (CategoryName) ^[A-Za-z0-9-_\.:]+$

Category name.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Get a note of a category.

One note of a category.

Authorizations:
konsumAuth
path Parameters
category
required
string (CategoryName) ^[A-Za-z0-9-_\.:]+$

Category name.

note
required
string (NoteName) ^[A-Za-z0-9-_\.:]+$

Note identifier.

Responses

Response samples

Content type
application/json
{
  • "name": "2011-10-05T14:48:00.000Z",
  • "description": "power outage"
}

Add a note to a meter.

add a note to a meter.

Authorizations:
konsumAuth
path Parameters
category
required
string (CategoryName) ^[A-Za-z0-9-_\.:]+$

Category name.

note
required
string (NoteName) ^[A-Za-z0-9-_\.:]+$

Note identifier.

Request Body schema: application/json
required
name
required
string (NoteName) ^[A-Za-z0-9-_\.:]+$

Note identifier.

description
string

The human readable description of your category.

Responses

Request samples

Content type
application/json
{
  • "name": "2011-10-05T14:48:00.000Z",
  • "description": "power outage"
}

Add a note to a meter.

Update a note.

Authorizations:
konsumAuth
path Parameters
category
required
string (CategoryName) ^[A-Za-z0-9-_\.:]+$

Category name.

note
required
string (NoteName) ^[A-Za-z0-9-_\.:]+$

Note identifier.

Request Body schema: application/json
required
name
required
string (NoteName) ^[A-Za-z0-9-_\.:]+$

Note identifier.

description
string

The human readable description of your category.

Responses

Request samples

Content type
application/json
{
  • "name": "2011-10-05T14:48:00.000Z",
  • "description": "power outage"
}

Delete a note from a category.

Delete a note.

Authorizations:
konsumAuth
path Parameters
category
required
string (CategoryName) ^[A-Za-z0-9-_\.:]+$

Category name.

note
required
string (NoteName) ^[A-Za-z0-9-_\.:]+$

Note identifier.

Responses

List notes of a meter.

List notes of a meter.

Authorizations:
konsumAuth
path Parameters
category
required
string (CategoryName) ^[A-Za-z0-9-_\.:]+$

Category name.

meter
required
string (MeterName) ^[A-Za-z0-9-_\.:]+$

Meter name.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Add a note to a meter.

Add a note to a meter.

Authorizations:
konsumAuth
path Parameters
category
required
string (CategoryName) ^[A-Za-z0-9-_\.:]+$

Category name.

meter
required
string (MeterName) ^[A-Za-z0-9-_\.:]+$

Meter name.

note
required
string (NoteName) ^[A-Za-z0-9-_\.:]+$

Note identifier.

Request Body schema: application/json
required
name
required
string (NoteName) ^[A-Za-z0-9-_\.:]+$

Note identifier.

description
string

The human readable description of your category.

Responses

Request samples

Content type
application/json
{
  • "name": "2011-10-05T14:48:00.000Z",
  • "description": "power outage"
}

Update a note.

Update a note.

Authorizations:
konsumAuth
path Parameters
category
required
string (CategoryName) ^[A-Za-z0-9-_\.:]+$

Category name.

meter
required
string (MeterName) ^[A-Za-z0-9-_\.:]+$

Meter name.

note
required
string (NoteName) ^[A-Za-z0-9-_\.:]+$

Note identifier.

Request Body schema: application/json
required
name
required
string (NoteName) ^[A-Za-z0-9-_\.:]+$

Note identifier.

description
string

The human readable description of your category.

Responses

Request samples

Content type
application/json
{
  • "name": "2011-10-05T14:48:00.000Z",
  • "description": "power outage"
}

Delete a note from a meter.

Delete a note.

Authorizations:
konsumAuth
path Parameters
category
required
string (CategoryName) ^[A-Za-z0-9-_\.:]+$

Category name.

meter
required
string (MeterName) ^[A-Za-z0-9-_\.:]+$

Meter name.

note
required
string (NoteName) ^[A-Za-z0-9-_\.:]+$

Note identifier.

Responses

meter

List meters of a category.

List meters of a category.

Authorizations:
konsumAuth
path Parameters
category
required
string (CategoryName) ^[A-Za-z0-9-_\.:]+$

Category name.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Add a meter to a category.

Add a meter to a category.

Authorizations:
konsumAuth
path Parameters
category
required
string (CategoryName) ^[A-Za-z0-9-_\.:]+$

Category name.

meter
required
string (MeterName) ^[A-Za-z0-9-_\.:]+$

Meter name.

Request Body schema: application/json
required
name
required
string (MeterName) ^[A-Za-z0-9-_\.:]+$

Meter name.

description
string

The human readable description of your meter.

unit
string

The physical measurment unit.

fractionalDigits
number
Default: 2

decimal precission.

serial
string

The serial number of the meter.

validFrom
string <date-time>

date + time when this meter becomes valid.

Responses

Request samples

Content type
application/json
{
  • "name": "EV-2020",
  • "serial": "123",
  • "validFrom": "2011-10-05T14:48:00.000Z",
  • "description": "new meter from utility provider"
}

Update a meter of a category.

Update a meter.

Authorizations:
konsumAuth
path Parameters
category
required
string (CategoryName) ^[A-Za-z0-9-_\.:]+$

Category name.

meter
required
string (MeterName) ^[A-Za-z0-9-_\.:]+$

Meter name.

Request Body schema: application/json
required
name
required
string (MeterName) ^[A-Za-z0-9-_\.:]+$

Meter name.

description
string

The human readable description of your meter.

unit
string

The physical measurment unit.

fractionalDigits
number
Default: 2

decimal precission.

serial
string

The serial number of the meter.

validFrom
string <date-time>

date + time when this meter becomes valid.

Responses

Request samples

Content type
application/json
{
  • "name": "EV-2020",
  • "serial": "123",
  • "validFrom": "2011-10-05T14:48:00.000Z",
  • "description": "new meter from utility provider"
}

Delete a meter from a category.

Delete a meter.

Authorizations:
konsumAuth
path Parameters
category
required
string (CategoryName) ^[A-Za-z0-9-_\.:]+$

Category name.

meter
required
string (MeterName) ^[A-Za-z0-9-_\.:]+$

Meter name.

Responses