Personal tools

API r4

From PhotoVoltaic Logger new generation

Jump to: navigation, search

/api/r4/batch/:guid [PUT]
/api/r4/channel/:guid/:attribute [GET]
/api/r4/channel/:guid [GET]
/api/r4/channel/:id [DELETE]
/api/r4/channels [GET]
/api/r4/csv/:guid [PUT]
/api/r4/data/:guid(/:p1(/:p2)) [GET]
/api/r4/data/:guid/:timestamp [DELETE]
/api/r4/data/:guid [POST]
/api/r4/data/:guid [PUT]
/api/r4/data/raw/:guid [PUT]
/api/r4/daylight(/:offset) [GET]
/api/r4/daylight/:latitude/:longitude(/:offset) [GET]
/api/r4/hash [GET|POST]
/api/r4/help [ANY]
/api/r4/helphtml [ANY]
/api/r4/json/:path+ [GET]
/api/r4/json/:path+ [POST]
/api/r4/jsonencode [POST]
/api/r4/log/:id [DELETE]
/api/r4/log/:id [GET]
/api/r4/log/:id [POST]
/api/r4/log/all(/:page(/:count)) [GET]
/api/r4/log [PUT]
/api/r4/ping [GET]
/api/r4/status [GET]
/api/r4/sunrise(/:date) [GET]
/api/r4/sunrise/:latitude/:longitude(/:date) [GET]
/api/r4/sunset(/:date) [GET]
/api/r4/sunset/:latitude/:longitude(/:date) [GET]
/api/r4/tariff/:id/:date [GET]
/api/r4/tariff/:id/time/:date(/:to) [GET]
/api/r4/tariff/:id [GET]
/api/r4/tariff [GET]
/api/r4/time(/:format) [GET]
/api/r4/translation [GET]
/api/r4/tree/:id [DELETE]
/api/r4/tree/alias/:id [PUT]
/api/r4/view/:slug [DELETE]
/api/r4/view/:slug [GET]
/api/r4/view/:slug [POST]
/api/r4/view [PUT]
/api/r4/views(/:language) [GET]

Version r4

Routes for /api/r4

[PUT] /api/r4/batch/:guid

Save multiple reading values

API key required: yes

Available since: r2

Payload

- <timestamp>,<value>;... : Semicolon separated timestamp and value data sets
- <date time>,<value>;... : Semicolon separated date time and value data sets
- <date>,<time>,<value>;... : Semicolon separated date, time and value data sets

[GET] /api/r4/channel/:guid/:attribute

Fetch all channel attributes or specific channel attribute

API key required: yes

Available since: r3

[GET] /api/r4/channel/:guid

Fetch single channel attribute

API key required: yes

Available since: r3

[DELETE] /api/r4/channel/:id

Delete channel and its readings

API key required: yes

Available since: r4

[GET] /api/r4/channels

Fetch all channels

API key required: yes

Available since: r3

[PUT] /api/r4/csv/:guid

Save multiple reading values from CSV file

API key required: yes

Available since: r2

Payload

- <timestamp>;<value> : Semicolon separated timestamp and value data rows
- <date time>;<value> : Semicolon separated date time and value data rows
- <date>;<time>;<value> : Semicolon separated date, time and value data rows

[GET] /api/r4/data/:guid(/:p1(/:p2))

Read reading values

API key required: yes

Available since: r2

[DELETE] /api/r4/data/:guid/:timestamp

Delete a reading value

API key required: yes

Available since: r2

[POST] /api/r4/data/:guid

Update a reading value, timestamp is required here

API key required: yes

Available since: r4

Payload

- {"data":"<value>","timestamp":"<timestamp>"} : JSON encoded value

[PUT] /api/r4/data/:guid

Save a reading value

API key required: yes

Available since: r2

Payload

- {"data":"<value>"} : JSON encoded value

[PUT] /api/r4/data/raw/:guid

Save raw data, channel decide what to do with them

API key required: yes

Available since: r4

[GET] /api/r4/daylight(/:offset)

Check for daylight for configured location, accept additional minutes before/after

API key required: yes

Available since: r3

[GET] /api/r4/daylight/:latitude/:longitude(/:offset)

Check for daylight, accept additional minutes before/after

API key required: yes

Available since: r3

[GET|POST] /api/r4/hash

Create MD5 and SHA1 hashes and a slug for the given text

API key required: yes

Available since: r3

[ANY] /api/r4/help

This help, overview of valid calls

API key required: yes

Available since: r1

[ANY] /api/r4/helphtml

This help in HTML for browsers, overview of valid calls

API key required: yes

Available since: r4

[GET] /api/r4/json/:path+

Extract a section/value from given JSON data from query string

API key required: yes

Available since: r1

Payload

...json/path/to/node/?json=<JSON data>

[POST] /api/r4/json/:path+

Extract a section/value from given JSON data sended in request body e.g. from a file

API key required: yes

Available since: r1

[POST] /api/r4/jsonencode

Encode posted data to JSON

API key required: yes

Available since: r1

[DELETE] /api/r4/log/:id

Delete a log entry

API key required: yes

Available since: r2

[GET] /api/r4/log/:id

Read a log entry

API key required: yes

Available since: r2

[POST] /api/r4/log/:id

Update a log entry

API key required: yes

Available since: r2

Payload

{"scope":"...", "message":"..."}

[GET] /api/r4/log/all(/:page(/:count))

Read all log entries, paginated for :page, :count entries

API key required: yes

Available since: r2

[PUT] /api/r4/log

Store new log entry, scope defaults to 'API rr4'

API key required: yes

Available since: r2

Payload

{"scope":"...", "message":"..."}

[GET] /api/r4/ping

For new relic pinger

API key required: yes

Available since: r4

[GET] /api/r4/status

System status

API key required: yes

Available since: r2

[GET] /api/r4/sunrise(/:date)

Get sunrise of day, using configured loaction

API key required: yes

Available since: r3

[GET] /api/r4/sunrise/:latitude/:longitude(/:date)

Get sunrise for location and day

API key required: yes

Available since: r3

[GET] /api/r4/sunset(/:date)

Get sunset of day, using configured loaction

API key required: yes

Available since: r3

[GET] /api/r4/sunset/:latitude/:longitude(/:date)

Get sunset of day

API key required: yes

Available since: r3

[GET] /api/r4/tariff/:id/:date

Extract tariff for a day

API key required: yes

Available since: r4

[GET] /api/r4/tariff/:id/time/:date(/:to)

Extract tariff for a day

API key required: yes

Available since: r4

[GET] /api/r4/tariff/:id

Extract a tariff

API key required: yes

Available since: r4

[GET] /api/r4/tariff

Extract all tariffs

API key required: yes

Available since: r4

[GET] /api/r4/time(/:format)

Deliver actual server time

API key required: yes

Available since: r4

[GET] /api/r4/translation

Extract english texts for translation

API key required: yes

Available since: r3

[DELETE] /api/r4/tree/:id

Delete channel from channel hierarchy

API key required: yes

Available since: r4

[PUT] /api/r4/tree/alias/:id

Create alias from given hierarchy Id

API key required: yes

Available since: r4

[DELETE] /api/r4/view/:slug

Detele chart view data by slug

API key required: yes

Available since: r3

[GET] /api/r4/view/:slug

Fetch chart view data via slug

API key required: yes

Available since: r3

[POST] /api/r4/view/:slug

Update chart view data via slug

API key required: yes

Available since: r3

[PUT] /api/r4/view

Create chart view data, return slug

API key required: yes

Available since: r3

[GET] /api/r4/views(/:language)

Fetch all charts

API key required: yes

Available since: r3