Trackers

Get a list of data from trackers in the plant of current time.

You can enter a range of dates to get the data for that period.

/v1/<plant>/trackers/<model>/<id_tracker>/?start=XXX&end=XXX

Arguments

  • plant [*]: Name of the plant where the trackers are located.
  • model [*]: Model of tracker (for ex: solon)
  • id_tracker: (Optional) ID tracker. If you enter the id of a tracker only show the data of that tracker.

  • start: (Optional) (yyyy-mm-dd hh:ii:ss) Start date of search interval.
    If you only enter the start date it will show the reading of that moment.

  • end: (Optional) (yyyy-mm-dd hh:ii:ss) End date of search interval.
    Can not be greater than the current date or the difference
    between dates can not be greater than 32 days

Response

JSON object with the result. May return the following errors:

  • 404 Not found : No device found or don't have rights to get data
  • 400 Wrong plant or meter id: The id format is incorrect
  • 400 Bad Dates: Dates entered are incorrect
  • 204 No data found: The data entered have not produced any results

Available models

  • Solon: solon
  • Pevafersa: pvfs
  • Girasol: girasol
  • SMI: smi
  • Phoenix Contact: phc

Example

Get the last data of all trackers on the plant 'DonBenito2'

GET /v1/DonBenito2/trackers/solon/ HTTP/1.1
Host: apiexternal.mvscada.com
MV-API-Key: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
Content-Type: application/json

Response

{
    "plant": "DonBenito2",
    "id_tracker": "all",
    "trackers_model": "solon"
    "start": "2017-04-10 18:15:00",
    "end": "",
    "trackers": [
        {
            "eppc": "eppc11",
            "elevac": 59.3,
            "plant": "DonBenito2",
            "azimut": 254.2,
            "datetime": "2017-04-10 18:15:00",
            "energy3": 0.556,
            "energy2": 0.556,
            "energy1": 0.544,
            "id": "mover136"
        },
        {
            "eppc": "eppc11",
            "elevac": 58.9,
            "plant": "DonBenito2",
            "azimut": 253.1,
            "datetime": "2017-04-10 18:15:00",
            "energy3": 0.639,
            "energy2": 0.615,
            "energy1": 0.621,
            "id": "mover137"
        },
        {...}
    ],
}

Other examples

Get all datas of all trackers between requested dates

/v1/DonBenito2/trackers/solon/?start=2017-03-30 08:00:00&end=2017-03-31 08:00:00

Get the data of the requested tracker in the requested date

/v1/DonBenito2/trackers/solon/mover111/?start=2017-03-30 08:00:00

Get all datas of the requested tracker between requested dates

/v1/DonBenito2/trackers/solon/mover111/?start=2017-03-30 08:00:00&end=2017-03-31 08:00:00