Generics_V2

Get data from a single device generic.

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

/v2/generics/<dev-id>/?start=XXX&end=XXX

Arguments

  • dev_id [*]: Device id number

  • 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:

  • 502 Unsupported generic tech : No database conversion made, contact us
  • 404 Not found : No device found or don't have rights to get data
  • 400 Wrong plant or generics 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

Example

Get all generics data (last quarter) in for device_id XXXXX

GET /v2/generics/XXXXX HTTP/1.1
Host: apiexternal.mvscada.com
MV-API-Key: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
Content-Type: application/json

Response

{
    "plant": "XXXXXX",
    "devices_id": XXXXX,
    "start": "2025-04-25 11:15:00",
    "end": "",
    "generics": [
        {
        "data_generic_datetime": "2025-04-25 16:45:00",
        "data_generic_alarms": 0,
        "data_generic_status": "ok",
        "data_generic_data": {
            "WIND_SPEED": 0.35000000000000003,
            "GHI_ENERGY_YEAR": 3668394884,
            "DIRTY_ENERGY_MONTH": 2613789454,
            "AMB-HUM-PRES_SPECIFIC_ENTHALPY": 39.54,
            "AMB-HUM-PRES_MIXING_RATIO": 6.53,
            "GHI_IRRADIANCE": 840.28,
            "POA-R_IRRADIANCE": 63.2,
            "POA-R_ENERGY_DAY": 16081,
            "AMB-HUM-PRES_DEW_POINT": 7.73,
            ...
            }
        "devices_id": XXXXX,
        },
        {...}
    ]
}

Other examples

Get all datas of all meters between requested dates

/v2/generics/<dev-id>/?start=2025-04-25 00:00:00&end=2025-04-25 11:15:00