Weather - Get Hourly Forecast

用於獲取長達 24 小時的詳細每小時天氣預報或長達 10 天的每日預報。
該 Get Hourly Forecast API 是一個 HTTP GET ,它請求給定座標位置未來 1、12、24(1 天)、72(3 天)、120(5 天)和 240 小時(10 天)的小時詳細天氣預報。 API 返回溫度、濕度、風、降水和紫外線 (UV) 指數等詳細資訊。 有關更多資訊,請參閱 請求每小時天氣預報數據。

GET {endpoint}/weather/forecast/hourly/json?api-version=1.1&query={query}
GET {endpoint}/weather/forecast/hourly/json?api-version=1.1&query={query}&unit={unit}&duration={duration}&language={language}

URI 參數

名稱 位於 必要 類型 Description
endpoint
path True

string (uri)

Azure 地圖服務 服務的主機名稱。 Azure公有雲用 https://atlas.microsoft.com。 若要鎖定特定Azure 地圖服務地理或主權雲,請參見 Azure 地圖服務 地理範圍。

format
path True

JsonFormat

回應所需的格式。 僅支援 json 格式。

api-version
query True

string

minLength: 1

用於此作業的 API 版本。

query
query True

number[]

指定為逗號分隔字串的適用查詢,由緯度所組成,後面接著經度,例如 “47.641268,-122.125679”。

通常,天氣資訊適用於陸地上的位置、被陸地包圍的水體以及距離海岸線約 50 海裡以內的海洋區域。

duration
query

integer (int32)

返回的天氣預報的時間範圍。 默認情況下,將返回下一小時的預測數據。 可用值為

  • 1 - 返回下一小時的預測數據。 預設值。
  • 12 - 返回未來 12 小時的每小時預報。
  • 24 - 返回未來 24 小時的每小時天氣預報。
  • 72 - 返回未來 72 小時(3 天)的每小時預報。
  • 120 - 返回未來 120 小時 (5) 的每小時預報。
  • 240 - 返回未來 240 小時(10 天)的每小時預報。
language
query

string

應該傳回搜尋結果的語言。 應該是其中一個支援的 IETF 語言標記,不區分大小寫。 當特定欄位無法使用指定語言的數據時,會使用預設語言。

如需詳細資訊,請參閱 支援的語言。

unit
query

WeatherDataUnit

指定以公制單位或英制單位返回數據。 預設值為 metric。

要求標頭

名稱 必要 類型 Description
x-ms-client-id

string

表示該帳號用於 Microsoft Entra ID 安全模型。 這個Azure 地圖服務帳號的唯一 ID 可以從 Azure 地圖服務 管理平面的 Account API 取得。 欲了解更多在Azure 地圖服務中使用Microsoft Entra ID安全,請參見管理 Azure 地圖服務 認證。

回覆

名稱 類型 Description
200 OK

HourlyForecastResult

要求已成功。

Other Status Codes

ErrorResponse

未預期的錯誤回應。

安全性

AadToken

這些是Microsoft Entra OAuth 2.0流。 當與 Azure 基於角色的存取 控制結合時,可以用來控制對 Azure 地圖服務 REST API 的存取。 Azure 角色基礎存取控制用於指定對一個或多個 Azure 地圖服務 資源帳號或子資源的存取權限。 任何使用者、群組或服務主體都可以透過內建角色或由一或多個 Azure 地圖服務 REST API 許可權所組成的自定義角色來授與存取權。

若要實作案例,建議您檢視 驗證概念。 總而言之,此安全性定義會透過能夠針對特定 API 和範圍進行訪問控制的物件,提供模型化應用程式的解決方案。

Note

  • 此安全性定義 需要 使用 x-ms-client-id 標頭來指出應用程式要求存取的 Azure 地圖服務資源。 這可以從 地圖管理 API取得。
  • Authorization URL 專屬於 Azure 公用雲端實例。 主權雲擁有獨特的授權網址和 Microsoft Entra ID 設定。
  • Azure 角色型訪問控制是從 azure 管理平面 設定, 透過 Azure 入口網站、PowerShell、CLI、Azure SDK 或 REST API。
  • Azure 地圖服務 Web SDK 的使用,可讓您針對多個使用案例設定應用程式。
  • 如需Microsoft身分識別平臺的詳細資訊,請參閱 Microsoft 身分識別平臺概觀。

類型: oauth2
Flow: implicit
授權 URL: https://login.microsoftonline.com/common/oauth2/authorize

範圍

名稱 Description
https://atlas.microsoft.com/.default

subscription-key

這是當您 在 Azure 入口網站或使用 PowerShell、CLI、Azure SDK 或 REST API 建立 Azure 地圖服務帳戶時所佈建的共用密鑰。

使用此金鑰,任何應用程式都可以存取所有 REST API。 換句話說,此金鑰可用來做為帳戶中核發的主要密鑰。

針對公開的應用程式,我們建議使用 機密用戶端應用程式 方法來存取 Azure 地圖服務 REST API,以便安全地儲存您的密鑰。

類型: apiKey
位於: header

SAS Token

這是透過 Azure 入口網站、PowerShell、CLI、Azure SDK 或 REST API,從 azure 地圖服務資源 列表 SAS 作業建立共用存取簽章令牌。

使用此令牌時,任何應用程式都有權使用 Azure 角色型訪問控制進行存取,並更精細地控制特定令牌的到期、速率和區域。 換句話說,SAS 令牌可用來讓應用程式以比共用密鑰更安全的方式控制存取。

對於公開的應用程式,我們建議在 對應帳戶資源上設定允許的來源特定清單, 以限制轉譯濫用,並定期更新 SAS 令牌。

類型: apiKey
位於: header

範例

Successfully retrieve detailed weather forecast by the hour

範例要求

GET https://atlas.microsoft.com/weather/forecast/hourly/json?api-version=1.1&query=47.632346,-122.138874&duration=12

範例回覆

{
  "forecasts": [
    {
      "ceiling": {
        "unit": "m",
        "unitType": 5,
        "value": 3901
      },
      "cloudCover": 100,
      "date": "2019-11-14T16:00:00-08:00",
      "dewPoint": {
        "unit": "C",
        "unitType": 17,
        "value": 8.4
      },
      "hasPrecipitation": false,
      "ice": {
        "unit": "mm",
        "unitType": 3,
        "value": 0
      },
      "iceProbability": 0,
      "iconCode": 7,
      "iconPhrase": "Cloudy",
      "isDaylight": true,
      "precipitationProbability": 39,
      "rain": {
        "unit": "mm",
        "unitType": 3,
        "value": 0
      },
      "rainProbability": 39,
      "realFeelTemperature": {
        "unit": "C",
        "unitType": 17,
        "value": 14.1
      },
      "relativeHumidity": 72,
      "snow": {
        "unit": "cm",
        "unitType": 4,
        "value": 0
      },
      "snowProbability": 0,
      "temperature": {
        "unit": "C",
        "unitType": 17,
        "value": 13.4
      },
      "totalLiquid": {
        "unit": "mm",
        "unitType": 3,
        "value": 0
      },
      "uvIndex": 0,
      "uvIndexPhrase": "Low",
      "visibility": {
        "unit": "km",
        "unitType": 6,
        "value": 16.1
      },
      "wetBulbTemperature": {
        "unit": "C",
        "unitType": 17,
        "value": 10.9
      },
      "wind": {
        "direction": {
          "degrees": 311,
          "localizedDescription": "NW"
        },
        "speed": {
          "unit": "km/h",
          "unitType": 7,
          "value": 3.7
        }
      },
      "windGust": {
        "speed": {
          "unit": "km/h",
          "unitType": 7,
          "value": 5.6
        }
      }
    },
    {
      "ceiling": {
        "unit": "m",
        "unitType": 5,
        "value": 4054
      },
      "cloudCover": 94,
      "date": "2019-11-14T17:00:00-08:00",
      "dewPoint": {
        "unit": "C",
        "unitType": 17,
        "value": 7.8
      },
      "hasPrecipitation": false,
      "ice": {
        "unit": "mm",
        "unitType": 3,
        "value": 0
      },
      "iceProbability": 0,
      "iconCode": 7,
      "iconPhrase": "Cloudy",
      "isDaylight": false,
      "precipitationProbability": 34,
      "rain": {
        "unit": "mm",
        "unitType": 3,
        "value": 0
      },
      "rainProbability": 34,
      "realFeelTemperature": {
        "unit": "C",
        "unitType": 17,
        "value": 12.8
      },
      "relativeHumidity": 73,
      "snow": {
        "unit": "cm",
        "unitType": 4,
        "value": 0
      },
      "snowProbability": 0,
      "temperature": {
        "unit": "C",
        "unitType": 17,
        "value": 12.5
      },
      "totalLiquid": {
        "unit": "mm",
        "unitType": 3,
        "value": 0
      },
      "uvIndex": 0,
      "uvIndexPhrase": "Low",
      "visibility": {
        "unit": "km",
        "unitType": 6,
        "value": 16.1
      },
      "wetBulbTemperature": {
        "unit": "C",
        "unitType": 17,
        "value": 10.2
      },
      "wind": {
        "direction": {
          "degrees": 281,
          "localizedDescription": "W"
        },
        "speed": {
          "unit": "km/h",
          "unitType": 7,
          "value": 5.6
        }
      },
      "windGust": {
        "speed": {
          "unit": "km/h",
          "unitType": 7,
          "value": 7.4
        }
      }
    },
    {
      "ceiling": {
        "unit": "m",
        "unitType": 5,
        "value": 4176
      },
      "cloudCover": 94,
      "date": "2019-11-14T18:00:00-08:00",
      "dewPoint": {
        "unit": "C",
        "unitType": 17,
        "value": 7.4
      },
      "hasPrecipitation": false,
      "ice": {
        "unit": "mm",
        "unitType": 3,
        "value": 0
      },
      "iceProbability": 0,
      "iconCode": 7,
      "iconPhrase": "Cloudy",
      "isDaylight": false,
      "precipitationProbability": 29,
      "rain": {
        "unit": "mm",
        "unitType": 3,
        "value": 0
      },
      "rainProbability": 29,
      "realFeelTemperature": {
        "unit": "C",
        "unitType": 17,
        "value": 11.3
      },
      "relativeHumidity": 77,
      "snow": {
        "unit": "cm",
        "unitType": 4,
        "value": 0
      },
      "snowProbability": 0,
      "temperature": {
        "unit": "C",
        "unitType": 17,
        "value": 11.3
      },
      "totalLiquid": {
        "unit": "mm",
        "unitType": 3,
        "value": 0
      },
      "uvIndex": 0,
      "uvIndexPhrase": "Low",
      "visibility": {
        "unit": "km",
        "unitType": 6,
        "value": 16.1
      },
      "wetBulbTemperature": {
        "unit": "C",
        "unitType": 17,
        "value": 9.5
      },
      "wind": {
        "direction": {
          "degrees": 206,
          "localizedDescription": "SSW"
        },
        "speed": {
          "unit": "km/h",
          "unitType": 7,
          "value": 7.4
        }
      },
      "windGust": {
        "speed": {
          "unit": "km/h",
          "unitType": 7,
          "value": 9.3
        }
      }
    },
    {
      "ceiling": {
        "unit": "m",
        "unitType": 5,
        "value": 4542
      },
      "cloudCover": 93,
      "date": "2019-11-14T19:00:00-08:00",
      "dewPoint": {
        "unit": "C",
        "unitType": 17,
        "value": 7
      },
      "hasPrecipitation": false,
      "ice": {
        "unit": "mm",
        "unitType": 3,
        "value": 0
      },
      "iceProbability": 0,
      "iconCode": 7,
      "iconPhrase": "Cloudy",
      "isDaylight": false,
      "precipitationProbability": 20,
      "rain": {
        "unit": "mm",
        "unitType": 3,
        "value": 0
      },
      "rainProbability": 20,
      "realFeelTemperature": {
        "unit": "C",
        "unitType": 17,
        "value": 9.8
      },
      "relativeHumidity": 79,
      "snow": {
        "unit": "cm",
        "unitType": 4,
        "value": 0
      },
      "snowProbability": 0,
      "temperature": {
        "unit": "C",
        "unitType": 17,
        "value": 10.4
      },
      "totalLiquid": {
        "unit": "mm",
        "unitType": 3,
        "value": 0
      },
      "uvIndex": 0,
      "uvIndexPhrase": "Low",
      "visibility": {
        "unit": "km",
        "unitType": 6,
        "value": 16.1
      },
      "wetBulbTemperature": {
        "unit": "C",
        "unitType": 17,
        "value": 8.8
      },
      "wind": {
        "direction": {
          "degrees": 169,
          "localizedDescription": "S"
        },
        "speed": {
          "unit": "km/h",
          "unitType": 7,
          "value": 7.4
        }
      },
      "windGust": {
        "speed": {
          "unit": "km/h",
          "unitType": 7,
          "value": 11.1
        }
      }
    },
    {
      "ceiling": {
        "unit": "m",
        "unitType": 5,
        "value": 4389
      },
      "cloudCover": 92,
      "date": "2019-11-14T20:00:00-08:00",
      "dewPoint": {
        "unit": "C",
        "unitType": 17,
        "value": 6.9
      },
      "hasPrecipitation": false,
      "ice": {
        "unit": "mm",
        "unitType": 3,
        "value": 0
      },
      "iceProbability": 0,
      "iconCode": 7,
      "iconPhrase": "Cloudy",
      "isDaylight": false,
      "precipitationProbability": 20,
      "rain": {
        "unit": "mm",
        "unitType": 3,
        "value": 0
      },
      "rainProbability": 20,
      "realFeelTemperature": {
        "unit": "C",
        "unitType": 17,
        "value": 9.2
      },
      "relativeHumidity": 80,
      "snow": {
        "unit": "cm",
        "unitType": 4,
        "value": 0
      },
      "snowProbability": 0,
      "temperature": {
        "unit": "C",
        "unitType": 17,
        "value": 10.1
      },
      "totalLiquid": {
        "unit": "mm",
        "unitType": 3,
        "value": 0
      },
      "uvIndex": 0,
      "uvIndexPhrase": "Low",
      "visibility": {
        "unit": "km",
        "unitType": 6,
        "value": 16.1
      },
      "wetBulbTemperature": {
        "unit": "C",
        "unitType": 17,
        "value": 8.6
      },
      "wind": {
        "direction": {
          "degrees": 170,
          "localizedDescription": "S"
        },
        "speed": {
          "unit": "km/h",
          "unitType": 7,
          "value": 9.3
        }
      },
      "windGust": {
        "speed": {
          "unit": "km/h",
          "unitType": 7,
          "value": 11.1
        }
      }
    },
    {
      "ceiling": {
        "unit": "m",
        "unitType": 5,
        "value": 4481
      },
      "cloudCover": 91,
      "date": "2019-11-14T21:00:00-08:00",
      "dewPoint": {
        "unit": "C",
        "unitType": 17,
        "value": 7.1
      },
      "hasPrecipitation": false,
      "ice": {
        "unit": "mm",
        "unitType": 3,
        "value": 0
      },
      "iceProbability": 0,
      "iconCode": 7,
      "iconPhrase": "Cloudy",
      "isDaylight": false,
      "precipitationProbability": 20,
      "rain": {
        "unit": "mm",
        "unitType": 3,
        "value": 0
      },
      "rainProbability": 20,
      "realFeelTemperature": {
        "unit": "C",
        "unitType": 17,
        "value": 9
      },
      "relativeHumidity": 82,
      "snow": {
        "unit": "cm",
        "unitType": 4,
        "value": 0
      },
      "snowProbability": 0,
      "temperature": {
        "unit": "C",
        "unitType": 17,
        "value": 10.1
      },
      "totalLiquid": {
        "unit": "mm",
        "unitType": 3,
        "value": 0
      },
      "uvIndex": 0,
      "uvIndexPhrase": "Low",
      "visibility": {
        "unit": "km",
        "unitType": 6,
        "value": 16.1
      },
      "wetBulbTemperature": {
        "unit": "C",
        "unitType": 17,
        "value": 8.8
      },
      "wind": {
        "direction": {
          "degrees": 170,
          "localizedDescription": "S"
        },
        "speed": {
          "unit": "km/h",
          "unitType": 7,
          "value": 9.3
        }
      },
      "windGust": {
        "speed": {
          "unit": "km/h",
          "unitType": 7,
          "value": 13
        }
      }
    },
    {
      "ceiling": {
        "unit": "m",
        "unitType": 5,
        "value": 4481
      },
      "cloudCover": 92,
      "date": "2019-11-14T22:00:00-08:00",
      "dewPoint": {
        "unit": "C",
        "unitType": 17,
        "value": 7.2
      },
      "hasPrecipitation": false,
      "ice": {
        "unit": "mm",
        "unitType": 3,
        "value": 0
      },
      "iceProbability": 0,
      "iconCode": 7,
      "iconPhrase": "Cloudy",
      "isDaylight": false,
      "precipitationProbability": 20,
      "rain": {
        "unit": "mm",
        "unitType": 3,
        "value": 0
      },
      "rainProbability": 20,
      "realFeelTemperature": {
        "unit": "C",
        "unitType": 17,
        "value": 8.5
      },
      "relativeHumidity": 84,
      "snow": {
        "unit": "cm",
        "unitType": 4,
        "value": 0
      },
      "snowProbability": 0,
      "temperature": {
        "unit": "C",
        "unitType": 17,
        "value": 9.8
      },
      "totalLiquid": {
        "unit": "mm",
        "unitType": 3,
        "value": 0
      },
      "uvIndex": 0,
      "uvIndexPhrase": "Low",
      "visibility": {
        "unit": "km",
        "unitType": 6,
        "value": 16.1
      },
      "wetBulbTemperature": {
        "unit": "C",
        "unitType": 17,
        "value": 8.6
      },
      "wind": {
        "direction": {
          "degrees": 174,
          "localizedDescription": "S"
        },
        "speed": {
          "unit": "km/h",
          "unitType": 7,
          "value": 9.3
        }
      },
      "windGust": {
        "speed": {
          "unit": "km/h",
          "unitType": 7,
          "value": 13
        }
      }
    },
    {
      "ceiling": {
        "unit": "m",
        "unitType": 5,
        "value": 3688
      },
      "cloudCover": 94,
      "date": "2019-11-14T23:00:00-08:00",
      "dewPoint": {
        "unit": "C",
        "unitType": 17,
        "value": 7
      },
      "hasPrecipitation": false,
      "ice": {
        "unit": "mm",
        "unitType": 3,
        "value": 0
      },
      "iceProbability": 0,
      "iconCode": 7,
      "iconPhrase": "Cloudy",
      "isDaylight": false,
      "precipitationProbability": 20,
      "rain": {
        "unit": "mm",
        "unitType": 3,
        "value": 0
      },
      "rainProbability": 20,
      "realFeelTemperature": {
        "unit": "C",
        "unitType": 17,
        "value": 8.5
      },
      "relativeHumidity": 82,
      "snow": {
        "unit": "cm",
        "unitType": 4,
        "value": 0
      },
      "snowProbability": 0,
      "temperature": {
        "unit": "C",
        "unitType": 17,
        "value": 9.8
      },
      "totalLiquid": {
        "unit": "mm",
        "unitType": 3,
        "value": 0
      },
      "uvIndex": 0,
      "uvIndexPhrase": "Low",
      "visibility": {
        "unit": "km",
        "unitType": 6,
        "value": 16.1
      },
      "wetBulbTemperature": {
        "unit": "C",
        "unitType": 17,
        "value": 8.5
      },
      "wind": {
        "direction": {
          "degrees": 175,
          "localizedDescription": "S"
        },
        "speed": {
          "unit": "km/h",
          "unitType": 7,
          "value": 9.3
        }
      },
      "windGust": {
        "speed": {
          "unit": "km/h",
          "unitType": 7,
          "value": 13
        }
      }
    },
    {
      "ceiling": {
        "unit": "m",
        "unitType": 5,
        "value": 2926
      },
      "cloudCover": 97,
      "date": "2019-11-15T00:00:00-08:00",
      "dewPoint": {
        "unit": "C",
        "unitType": 17,
        "value": 6.9
      },
      "hasPrecipitation": false,
      "ice": {
        "unit": "mm",
        "unitType": 3,
        "value": 0
      },
      "iceProbability": 0,
      "iconCode": 7,
      "iconPhrase": "Cloudy",
      "isDaylight": false,
      "precipitationProbability": 20,
      "rain": {
        "unit": "mm",
        "unitType": 3,
        "value": 0
      },
      "rainProbability": 20,
      "realFeelTemperature": {
        "unit": "C",
        "unitType": 17,
        "value": 8.8
      },
      "relativeHumidity": 81,
      "snow": {
        "unit": "cm",
        "unitType": 4,
        "value": 0
      },
      "snowProbability": 0,
      "temperature": {
        "unit": "C",
        "unitType": 17,
        "value": 10.1
      },
      "totalLiquid": {
        "unit": "mm",
        "unitType": 3,
        "value": 0
      },
      "uvIndex": 0,
      "uvIndexPhrase": "Low",
      "visibility": {
        "unit": "km",
        "unitType": 6,
        "value": 16.1
      },
      "wetBulbTemperature": {
        "unit": "C",
        "unitType": 17,
        "value": 8.6
      },
      "wind": {
        "direction": {
          "degrees": 176,
          "localizedDescription": "S"
        },
        "speed": {
          "unit": "km/h",
          "unitType": 7,
          "value": 9.3
        }
      },
      "windGust": {
        "speed": {
          "unit": "km/h",
          "unitType": 7,
          "value": 13
        }
      }
    },
    {
      "ceiling": {
        "unit": "m",
        "unitType": 5,
        "value": 2164
      },
      "cloudCover": 99,
      "date": "2019-11-15T01:00:00-08:00",
      "dewPoint": {
        "unit": "C",
        "unitType": 17,
        "value": 6.8
      },
      "hasPrecipitation": false,
      "ice": {
        "unit": "mm",
        "unitType": 3,
        "value": 0
      },
      "iceProbability": 0,
      "iconCode": 7,
      "iconPhrase": "Cloudy",
      "isDaylight": false,
      "precipitationProbability": 21,
      "rain": {
        "unit": "mm",
        "unitType": 3,
        "value": 0
      },
      "rainProbability": 21,
      "realFeelTemperature": {
        "unit": "C",
        "unitType": 17,
        "value": 8.5
      },
      "relativeHumidity": 81,
      "snow": {
        "unit": "cm",
        "unitType": 4,
        "value": 0
      },
      "snowProbability": 0,
      "temperature": {
        "unit": "C",
        "unitType": 17,
        "value": 9.9
      },
      "totalLiquid": {
        "unit": "mm",
        "unitType": 3,
        "value": 0
      },
      "uvIndex": 0,
      "uvIndexPhrase": "Low",
      "visibility": {
        "unit": "km",
        "unitType": 6,
        "value": 16.1
      },
      "wetBulbTemperature": {
        "unit": "C",
        "unitType": 17,
        "value": 8.5
      },
      "wind": {
        "direction": {
          "degrees": 177,
          "localizedDescription": "S"
        },
        "speed": {
          "unit": "km/h",
          "unitType": 7,
          "value": 9.3
        }
      },
      "windGust": {
        "speed": {
          "unit": "km/h",
          "unitType": 7,
          "value": 13
        }
      }
    },
    {
      "ceiling": {
        "unit": "m",
        "unitType": 5,
        "value": 1737
      },
      "cloudCover": 100,
      "date": "2019-11-15T02:00:00-08:00",
      "dewPoint": {
        "unit": "C",
        "unitType": 17,
        "value": 6.8
      },
      "hasPrecipitation": false,
      "ice": {
        "unit": "mm",
        "unitType": 3,
        "value": 0
      },
      "iceProbability": 0,
      "iconCode": 7,
      "iconPhrase": "Cloudy",
      "isDaylight": false,
      "precipitationProbability": 21,
      "rain": {
        "unit": "mm",
        "unitType": 3,
        "value": 0
      },
      "rainProbability": 21,
      "realFeelTemperature": {
        "unit": "C",
        "unitType": 17,
        "value": 8.5
      },
      "relativeHumidity": 82,
      "snow": {
        "unit": "cm",
        "unitType": 4,
        "value": 0
      },
      "snowProbability": 0,
      "temperature": {
        "unit": "C",
        "unitType": 17,
        "value": 9.8
      },
      "totalLiquid": {
        "unit": "mm",
        "unitType": 3,
        "value": 0
      },
      "uvIndex": 0,
      "uvIndexPhrase": "Low",
      "visibility": {
        "unit": "km",
        "unitType": 6,
        "value": 16.1
      },
      "wetBulbTemperature": {
        "unit": "C",
        "unitType": 17,
        "value": 8.4
      },
      "wind": {
        "direction": {
          "degrees": 172,
          "localizedDescription": "S"
        },
        "speed": {
          "unit": "km/h",
          "unitType": 7,
          "value": 9.3
        }
      },
      "windGust": {
        "speed": {
          "unit": "km/h",
          "unitType": 7,
          "value": 13
        }
      }
    },
    {
      "ceiling": {
        "unit": "m",
        "unitType": 5,
        "value": 1311
      },
      "cloudCover": 100,
      "date": "2019-11-15T03:00:00-08:00",
      "dewPoint": {
        "unit": "C",
        "unitType": 17,
        "value": 6.9
      },
      "hasPrecipitation": false,
      "ice": {
        "unit": "mm",
        "unitType": 3,
        "value": 0
      },
      "iceProbability": 0,
      "iconCode": 7,
      "iconPhrase": "Cloudy",
      "isDaylight": false,
      "precipitationProbability": 26,
      "rain": {
        "unit": "mm",
        "unitType": 3,
        "value": 0
      },
      "rainProbability": 26,
      "realFeelTemperature": {
        "unit": "C",
        "unitType": 17,
        "value": 8.6
      },
      "relativeHumidity": 83,
      "snow": {
        "unit": "cm",
        "unitType": 4,
        "value": 0
      },
      "snowProbability": 0,
      "temperature": {
        "unit": "C",
        "unitType": 17,
        "value": 9.7
      },
      "totalLiquid": {
        "unit": "mm",
        "unitType": 3,
        "value": 0
      },
      "uvIndex": 0,
      "uvIndexPhrase": "Low",
      "visibility": {
        "unit": "km",
        "unitType": 6,
        "value": 16.1
      },
      "wetBulbTemperature": {
        "unit": "C",
        "unitType": 17,
        "value": 8.4
      },
      "wind": {
        "direction": {
          "degrees": 161,
          "localizedDescription": "SSE"
        },
        "speed": {
          "unit": "km/h",
          "unitType": 7,
          "value": 9.3
        }
      },
      "windGust": {
        "speed": {
          "unit": "km/h",
          "unitType": 7,
          "value": 13
        }
      }
    }
  ]
}

定義

名稱 Description
ErrorAdditionalInfo

資源管理錯誤其他資訊。

ErrorDetail

錯誤詳細數據。

ErrorResponse

所有 Azure Resource Manager API 的常見錯誤回應,用於回傳失敗操作的錯誤細節。 (這也遵循 OData 錯誤回應格式。)。

HourlyForecast

該 HourlyForecast 天體提供每小時的天氣細節,包括日期與時間、預期與感知溫度,以及露點。 它涵蓋風速與風向、陣風、相對濕度、能見度及降水機率。 它指示是否預期會有降水,並指定降水類型。 其他特性包括紫外線指數、雲量百分比及雲頂高度。 同時也有一個圖示代碼和描述天氣狀況的片語。

HourlyForecastResult

回應由「獲取小時預報」操作回傳,包含指定地點的每小時天氣預報。 回覆的條目數量HourlyForecast與預報持續時間相符——分別為1、12、24、48、72或96小時(詳見聯合)。HourlyDuration

IconCode

數字天氣條件代碼,用來標示要顯示哪個圖示。 此列舉中的每個值對應一個 Azure 地圖服務 天氣圖示(如晴天、陰天或雷雨),並與一個人類可iconPhrase讀的回報一對應。 相同的程式碼可以出現在當前、每小時、每日、季度及每分鐘的回應中,讓應用程式能在所有氣象服務中呈現一致的圖示。

關於完整的代碼清單、它們所對應的圖示以及範例影像,請參見 Azure 地圖服務 中的天氣服務。

JsonFormat

回應所需的格式。 僅支援 json 格式。

UnitType

與顯示單位類型相關的整數值。 例如,17 表示攝氏度,18 表示華氏度。 可用於單位轉換。 欲了解更多資訊,請參閱氣象服務Azure 地圖服務。

WeatherDataUnit

指定資料回傳為公制或英制單位,預設為公制。 例如:

  • 公制:毫米(mm)、公尺(m)、公里(km)、攝氏(C)
  • 英制:英吋(內)、英尺(ft)、英里(mi)、華氏(F)
WeatherValue

天氣相關指標的數值,如溫度、露點及風速,以公制或英制單位表示,並依單位 URI 參數指定。 欲了解更多資訊,請參閱《Azure 地圖服務 中的天氣服務》一文中的單元類型。

WindDetails

提供預報風速,單位為公里每小時(km/h)或英里每小時(mph),視申請中指定的單位而定。 同時標示以方位角測量的風向,從真北開始順時針移動。 北對應0°,東對應90°,南對應180°,西對應270°。 可能的數值範圍從0°到359°不等。

WindDirection

提供風向細節,包括方位角方向及風向的局部縮寫。

ErrorAdditionalInfo

資源管理錯誤其他資訊。

名稱 類型 Description
info

其他資訊。

type

string

其他信息類型。

ErrorDetail

錯誤詳細數據。

名稱 類型 Description
additionalInfo

ErrorAdditionalInfo[]

錯誤其他資訊。

code

string

錯誤碼。

details

ErrorDetail[]

錯誤詳情

message

string

錯誤訊息。

target

string

錯誤目標。

ErrorResponse

所有 Azure Resource Manager API 的常見錯誤回應,用於回傳失敗操作的錯誤細節。 (這也遵循 OData 錯誤回應格式。)。

名稱 類型 Description
error

ErrorDetail

error 物件。

HourlyForecast

該 HourlyForecast 天體提供每小時的天氣細節,包括日期與時間、預期與感知溫度,以及露點。 它涵蓋風速與風向、陣風、相對濕度、能見度及降水機率。 它指示是否預期會有降水,並指定降水類型。 其他特性包括紫外線指數、雲量百分比及雲頂高度。 同時也有一個圖示代碼和描述天氣狀況的片語。

名稱 類型 Description
ceiling

WeatherValue

最低層雲層距地面高度,依請求中指定的單位,以英尺或公尺為單位。 這項測量對於航空和天氣預報至關重要。

cloudCover

integer (int32)

指指定時間天空中被雲覆蓋的百分比。 這個數值範圍從0%(晴朗天空)到100%(完全陰天)。 可能是 NULL。

date

string (date-time)

預報日期與時間,格式為 RFC 3339 (yyyy-mm-ddThh:mm:ss±hh:mm)。 例如, 2019-11-14T16:00:00-08:00。

dewPoint

WeatherValue

空氣飽和水分和露水的溫度開始形成。 其測量單位為華氏度(°F)或攝氏度(°C),視所用單位而定。 這個數值對於了解濕度非常重要,因為露點越高表示空氣中水分越多,會感覺更潮濕。

hasPrecipitation

boolean

一個布林值,表示在指定時間內是否預期會有降水(雨、雪、冰雹或冰雹)。 若預期降水,則回傳真,否則為假。

ice

WeatherValue

回報預報中每小時估計的冰層累積量,單位為毫米(mm)或英吋(in),視請求中指定的單位而定。

iceProbability

integer (int32)

顯示指定小時內冰形成的機率,以0到100的百分比表示。 0 表示沒有冰形成的機率,100 則表示冰層形成是必然的。 這些資訊有助於使用者評估可能出現的結冰狀況。

iconCode

IconCode

一個數值,對應於顯示 的 iconPhrase影像。 欲了解更多資訊,請參閱氣象服務Azure 地圖服務。

iconPhrase

string

一個描述性詞彙,對應特定天氣狀況,例如 晴朗。 它與一個 iconCode,一個數值,代表一張以視覺方式描繪天氣狀況 iconPhrase的影像。 欲了解更多資訊,請參閱氣象服務Azure 地圖服務。

isDaylight

boolean

一個布林值,表示指定時間內是否為白天。 若為白天則回傳真,否則為假。

precipitationProbability

integer (int32)

顯示指定小時內降水機率,以0至100百分比表示。 0 表示沒有降水機會,100 表示降水是必然的。 這有助於使用者評估降雨、降雪或其他降水的可能性。

rain

WeatherValue

回傳預報中每小時預期降雨量,單位為毫米(mm)或英吋(in),依請求中指定的單位而定。

rainProbability

integer (int32)

顯示指定時間內降雨機率,以0至100的百分比表示。 0 表示沒有降雨機率,100 表示必降雨。

realFeelTemperature

WeatherValue

提供指定小時的RealFeel™溫度值,以攝氏度(°C)或華氏度(華氏)為單位,依請求中指定的單位而定。 這項由AccuWeather開發的指標,涵蓋十多項因素,包括濕度、風速、雲量及日照強度,提供全面衡量天氣實際感受的指標。

欲了解更多資訊,請參閱 《AccuWeather RealFeel 溫度是什麼?》

relativeHumidity

integer (int32)

空氣中水蒸氣的含量,表示為空氣在相同溫度下能容納的最大水蒸氣百分比。 這個數值表示空氣接近濕度飽和程度,影響環境的舒適度或濕度。

snow

WeatherValue

回傳指定小時內預期的積雪量,單位為毫米(mm)或英吋(in),視申請中指定的單位而定。

snowProbability

integer (int32)

顯示指定小時內降雪機率,以0至100百分比表示。 0 表示沒有下雪機率,100 表示下雪必然。

temperature

WeatherValue

指定小時的預期溫度,以攝氏度(°C)或華氏(華氏)為單位,依請求中指定的單位而定。

totalLiquid

WeatherValue

回傳預報期間內每小時預期的液態降水量(如降雨),單位為毫米(mm)或英吋(in),依請求中指定的單位而定。

uvIndex

integer (int32)

提供預報期間每個小時的紫外線(UV)指數。 此指數顯示預期的紫外線輻射水平,幫助使用者了解不同時間段日曬的潛在風險。 支援的值為:

  • 0-2:對太陽紫外線或一般人來說危險性低。
  • 3-5:中度風險為未防護日曬造成的傷害。
  • 6-7:未防護的陽光曝曬帶來的高傷害風險。
  • 8-10:未防護的陽光曝曬造成極高風險。
  • 11+:未防護日曬帶來的極大傷害風險。
uvIndexPhrase

string

提供描述性短語,表示紫外線輻射的強度,如低、中度、高或非常高。

visibility

WeatherValue

回傳預報期間內每個小時可清楚辨識物體或光的距離,單位為公里(km)或英里(mi),視請求中指定的單位而定。 這表示視野清晰的距離,對於駕駛和航空等活動至關重要。

wetBulbTemperature

WeatherValue

回傳溫度是若空氣因水分蒸發而冷卻至飽和(相對濕度100%)。 此特性對於理解熱應力及蒸發的冷卻效應非常重要。

wind

WindDetails

提供預期的風速與風向。 風速以公里每小時(km/h)或英里每小時(mph)為單位測量,並依據所指定的單位。 風向以方位角測量,範圍從0°(真北)到359°,順時針方向移動(東風90°,南風180°,西風270°)。

windGust

WindDetails

回傳預報期間內每小時的預期最大陣風速,單位為公里每小時(km/h)或英里每小時(mph),並依據指定單位計算。 風向以方位角表示,範圍從0°(真北)到359°,順時針方向移動。 陣風是風速短暫增加,對於理解影響航空、帆船及戶外活動等活動的短期變化非常重要。

HourlyForecastResult

回應由「獲取小時預報」操作回傳,包含指定地點的每小時天氣預報。 回覆的條目數量HourlyForecast與預報持續時間相符——分別為1、12、24、48、72或96小時(詳見聯合)。HourlyDuration

名稱 類型 Description
forecasts

HourlyForecast[]

每小時的預報,按時間順序,每小時輸入一則。 每篇條目包含該小時的預期溫度、RealFeel、露點、風速、降水展望(雨、雪、冰的機率與數量)、雲量、能見度、紫外線指數、雲底及其他觀測數據。 例如,時長為 12 時,會回傳 12 條目,從 2019-11-14 T16:00:00-08:00 開始,並一小時一小時前進。

IconCode

數字天氣條件代碼,用來標示要顯示哪個圖示。 此列舉中的每個值對應一個 Azure 地圖服務 天氣圖示(如晴天、陰天或雷雨),並與一個人類可iconPhrase讀的回報一對應。 相同的程式碼可以出現在當前、每小時、每日、季度及每分鐘的回應中,讓應用程式能在所有氣象服務中呈現一致的圖示。

關於完整的代碼清單、它們所對應的圖示以及範例影像,請參見 Azure 地圖服務 中的天氣服務。

值 Description
1

Sunny

2

大部分晴朗

3

晴時多雲

4

間歇雲量

5

和煦陽光

6

多雲

7

Cloudy

8

陰鬱 (陰天)

11

Fog

12

Showers

13

多雲陣雨

14

晴時多雲陣雨

15

Thunderstorms

16

多雲雷暴

17

局部多雲有雷陣雨

18

Rain

19

Flurries

20

大部分多雲,伴隨零星小雪

21

晴時多雲陣雪

22

Snow

23

多雲降雪

24

Ice

25

Sleet

26

凍雨

29

雨天降雪

30

Hot

31

Cold

32

Windy

33

晴

34

大部晴朗

35

局部多雲

36

間歇雲量

37

朦朧月光

38

多雲

39

時陰陣雨

40

多雲陣雨

41

部分多雲伴有雷暴

42

多雲雷暴

43

大部分多雲,伴隨零星小雪

44

多雲降雪

JsonFormat

回應所需的格式。 僅支援 json 格式。

值 Description
json

JavaScript 物件表示法數據交換格式

UnitType

與顯示單位類型相關的整數值。 例如,17 表示攝氏度,18 表示華氏度。 可用於單位轉換。 欲了解更多資訊,請參閱氣象服務Azure 地圖服務。

值 Description
0

feet

1

inches

2

miles

3

millimeter

4

centimeter

5

計量

6

kilometer

7

kilometersPerHour

8

knots

9

milesPerHour

10

metersPerSecond

11

hectoPascals

12

inchesOfMercury

13

kiloPascals

14

millibars

15

millimetersOfMercury

16

poundsPerSquareInch

17

Celsius

18

Fahrenheit

19

kelvin

20

percent

21

float

22

整數

31

MicrogramsPerCubicMeterOfAir

WeatherDataUnit

指定資料回傳為公制或英制單位,預設為公制。 例如:

  • 公制:毫米(mm)、公尺(m)、公里(km)、攝氏(C)
  • 英制:英吋(內)、英尺(ft)、英里(mi)、華氏(F)
值 Description
imperial

回傳資料時使用英制單位,例如溫度用華氏(F)表示溫度,距離用英里(mi)表示。

metric

使用公制單位返回數據,例如攝氏度 (C) 表示溫度,公里 (km) 表示距離。

WeatherValue

天氣相關指標的數值,如溫度、露點及風速,以公制或英制單位表示,並依單位 URI 參數指定。 欲了解更多資訊,請參閱《Azure 地圖服務 中的天氣服務》一文中的單元類型。

名稱 類型 Description
unit

string

回傳值中使用的計量單位,例如「C」代表攝氏,「F」代表華氏。

unitType

UnitType

一個整數代表單位的類型。 例如,0代表英尺,1代表英吋,2代表英里。 完整列表請參閱《Azure 地圖服務 中的氣象服務》一文中的單元類型。

value

number (float)

以指定單位表示的測量值。

WindDetails

提供預報風速,單位為公里每小時(km/h)或英里每小時(mph),視申請中指定的單位而定。 同時標示以方位角測量的風向,從真北開始順時針移動。 北對應0°,東對應90°,南對應180°,西對應270°。 可能的數值範圍從0°到359°不等。

名稱 類型 Description
direction

WindDirection

風向以方位角為單位測量,從真北(0°)開始順時針移動。 東對應90°,南對應180°,西對應270°。 可能的數值範圍從0°到359°不等。 此性質回傳一個整數,代表風向。

speed

WeatherValue

預期風速,以公里每小時(km/h)或英里每小時(mph)為單位,依請求中指定的單位而定。

WindDirection

提供風向細節,包括方位角方向及風向的局部縮寫。

名稱 類型 Description
degrees

integer (int32)

風向以方位角為單位,從真北開始順時針移動。 北緯對應0度,東角為90度,南緯180度,西經270度。 可能的數值範圍從0到359度不等。

localizedDescription

string

風向的局部縮寫,並以請求中指定的語言回傳。 例如, N 北方、 E 東方、 S 南方和 W 西方。