Get weather info

Get weather info of sites.

Request format

METHOD {URI-scheme}://{apigw-address}/solar-api/{version}/domainService/weatherInfo

Request Parameters

Name Location Required Datatype Description
token Query false String token, required when user account calls Solar API
orgId Query false String orgnization Id, required when service account calls Solar API
mdmids Query true String mdm ids with comma as splitter
begin_time Query false String Begin time, e.g, 2019-07-25 00:00:00
end_time Query false String End time, e.g, 2019-07-25 00:00:00

Response Parameters

Name Datatype Description
city String city id
date String date
weather String weather description in Chinese
weather_EN String weather description in English
temp String temperature(°C)
l_tmp String lowest tmeperature(°C)
h_tmp String highest tmeperature(°C)
ws String wind direction
wd String wind speed(km/h)

Error Codes

See Common response code.

Example

Request example

GET
https://{apigw-address}/solar-api/v1.0/domainService/weatherInfo?mdmids=EL****yP&token=APP_PORTAL_S_LVtNJAjPp5nQbZ92QJaDna9n9yaQ3KLD

Response example

{
    "data": {
        "EL****y": [
            {
                "city": "310100",
                "date": "2019-10-31",
                "weather": "晴",
                "weather_EN": "Sunny",
                "temp": "22.0",
                "l_tmp": "14.0",
                "h_tmp": "23.0",
                "sunrise": "",
                "sunset": "",
                "ws": "W",
                "wd": "1.0"
            }
        ]
    },
    "status": 0,
    "msg": "success"
}