Weather - Get Daily Indices
気象条件が屋外スポーツ活動、建設、農業などの特定の活動に最適かどうかを知りたい場合に使用します (結果には土壌水分情報が含まれます)。
Get Daily Indices API は HTTP GET リクエストで、将来のアクティビティを計画する際に役立つガイダンスを提供するインデックス値を返します。 たとえば、健康モバイル アプリケーションは、今日がランニングや、ゴルフや凧揚げなどのその他の屋外活動に適した天気であることをユーザーに通知できます。 小売店は、予測されたインデックス値に基づいてデジタルマーケティングキャンペーンを最適化できます。 このサービスは、現在および現在の日から始まる次の 5 日、10 日、15 日間の日次インデックス値で返されます。
GET https://atlas.microsoft.com/weather/indices/daily/json?api-version=1.1&query={query}
GET https://atlas.microsoft.com/weather/indices/daily/json?api-version=1.1&query={query}&language={language}&duration={duration}&indexId={indexId}&indexGroupId={indexGroupId}
URI パラメーター
| 名前 | / | 必須 | 型 | 説明 |
|---|---|---|---|---|
|
format
|
path | True |
応答の目的の形式。
|
|
|
api-version
|
query | True |
string |
Azure Maps API のバージョン番号。 |
|
query
|
query | True |
number[] |
緯度の後に経度 (例: "47.641268,-122.125679") で構成されるコンマ区切り文字列として指定された該当するクエリ。 気象情報は、通常、陸上の場所、陸地に囲まれた水域、および海岸線から約 50 海里以内の海域で利用できます。 |
|
duration
|
query |
integer |
日次インデックスが返される日数を指定します。 デフォルトでは、当日のインデックスデータが返されます。 将来のインデックス データを要求する場合、現在の日が 1 日目として応答に含まれます。 使用可能な値は次のとおりです
|
|
|
index
|
query |
integer |
返される結果をインデックスの対応するサブセット (インデックス グループ) に制限するために使用できる数値インデックス グループ識別子。
|
|
|
index
|
query |
integer |
返される結果を対応するインデックスの種類に制限するために使用できる数値インデックス識別子。
|
|
|
language
|
query |
string |
検索結果を返す言語。 サポートされている IETF 言語タグの 1 つである必要があります。大文字と小文字は区別されません。 指定した言語のデータが特定のフィールドで使用できない場合は、既定の言語が使用されます。 詳細については、サポートされている言語の を参照してください。 |
要求ヘッダー
| 名前 | 必須 | 型 | 説明 |
|---|---|---|---|
| x-ms-client-id |
string |
Microsoft Entra ID セキュリティ モデルでの使用を目的としたアカウントを示します。 Azure Maps アカウントのこの一意の ID は、 Azure Maps 管理プレーン アカウント API から取得できます。 Azure Maps で Microsoft Entra ID セキュリティを使用する方法の詳細については、「 Azure Maps での認証の管理」を参照してください。 |
応答
| 名前 | 型 | 説明 |
|---|---|---|
| 200 OK |
[OK] |
|
| Other Status Codes |
予期しないエラーが発生しました。 |
セキュリティ
AADToken
これらは、Microsoft Entra OAuth 2.0 フロー
シナリオを実装するには、認証の概念表示することをお勧めします。 要約すると、このセキュリティ定義は、特定の API とスコープに対するアクセス制御が可能なオブジェクトを介してアプリケーションをモデル化するためのソリューションを提供します。
注記
- このセキュリティ定義 使用して、アプリケーションがアクセスを要求している Azure Maps リソースを示す必要があります。 これは、Maps 管理 API から取得できます。
Authorization URL は、Azure パブリック クラウド インスタンスに固有です。 ソブリン クラウドには、一意の承認 URL と Microsoft Entra ID 構成があります。
* Azure ロールベースのアクセス制御は、Azure portal、PowerShell、CLI、Azure SDK、または REST API を使用して、Azure 管理プレーン から構成されます。
* Azure Maps Web SDK を使用すると、複数のユース ケースに対するアプリケーションの構成ベースのセットアップが可能になります。
- Microsoft ID プラットフォームの詳細については、「Microsoft ID プラットフォームの概要」を参照してください。
型:
oauth2
フロー:
implicit
Authorization URL (承認 URL):
https://login.microsoftonline.com/common/oauth2/authorize
スコープ
| 名前 | 説明 |
|---|---|
| https://atlas.microsoft.com/.default | https://atlas.microsoft.com/.default |
subscription-key
これは、Azure portal で、または PowerShell、CLI、Azure SDK、または REST API を使用して Azure Maps アカウント を作成 場合にプロビジョニングされる共有キーです。
このキーを使用すると、すべてのアプリケーションがすべての REST API にアクセスできます。 つまり、このキーは、発行されたアカウントのマスター キーとして使用できます。
パブリックに公開されているアプリケーションの場合は、キーを安全に格納できるように、機密クライアント アプリケーション アプローチを使用して Azure Maps REST API にアクセスすることをお勧めします。
型:
apiKey
/:
query
SAS Token
これは、Azure portal、PowerShell、CLI、Azure SDK、または REST API を介して Azure 管理プレーンを介して、Azure Maps リソース のリスト SAS 操作から作成される Shared Access Signature トークンです。
このトークンを使用すると、すべてのアプリケーションは、Azure ロールベースのアクセス制御と、特定のトークンに対する使用の有効期限、レート、およびリージョンに対するきめ細かな制御を使用してアクセスすることが承認されます。 つまり、SAS トークンを使用して、アプリケーションが共有キーよりもセキュリティで保護された方法でアクセスを制御できるようにします。
パブリックに公開されているアプリケーションの場合は、Map アカウント リソースの許可された配信元の特定の一覧を構成し、レンダリングの不正使用を制限し、SAS トークンを定期的に更新するように することをお勧めします。
型:
apiKey
/:
header
例
Successfully retrieve daily indices values from current day
要求のサンプル
GET https://atlas.microsoft.com/weather/indices/daily/json?api-version=1.1&query=43.84745,-79.37849&indexGroupId=11
応答のサンプル
{
"results": [
{
"indexName": "Running Forecast",
"indexId": 1,
"dateTime": "2020-07-14T07:00:00-04:00",
"value": 9.2,
"category": "Excellent",
"categoryValue": 5,
"ascending": true,
"description": "This is an excellent day for outdoor running!"
},
{
"indexName": "Jogging Forecast",
"indexId": 2,
"dateTime": "2020-07-14T07:00:00-04:00",
"value": 9.4,
"category": "Excellent",
"categoryValue": 5,
"ascending": true,
"description": "Conditions are excellent for jogging outdoors!"
},
{
"indexName": "Hiking Forecast",
"indexId": 3,
"dateTime": "2020-07-14T07:00:00-04:00",
"value": 9.8,
"category": "Excellent",
"categoryValue": 5,
"ascending": true,
"description": "Conditions are excellent for hiking!"
},
{
"indexName": "Bicycling Forecast",
"indexId": 4,
"dateTime": "2020-07-14T07:00:00-04:00",
"value": 9.9,
"category": "Excellent",
"categoryValue": 5,
"ascending": true,
"description": "Conditions are excellent for bicycling outdoors!"
},
{
"indexName": "Golf Weather Forecast",
"indexId": 5,
"dateTime": "2020-07-14T07:00:00-04:00",
"value": 10,
"category": "Excellent",
"categoryValue": 5,
"ascending": true,
"description": "This is a great day for golf."
},
{
"indexName": "Tennis Forecast",
"indexId": 6,
"dateTime": "2020-07-14T07:00:00-04:00",
"value": 9.2,
"category": "Excellent",
"categoryValue": 5,
"ascending": true,
"description": "This is an excellent day for playing tennis!"
},
{
"indexName": "Skateboarding Forecast",
"indexId": 7,
"dateTime": "2020-07-14T07:00:00-04:00",
"value": 9.9,
"category": "Excellent",
"categoryValue": 5,
"ascending": true,
"description": "This is an excellent day for skateboarding!"
},
{
"indexName": "Outdoor Concert Forecast",
"indexId": 8,
"dateTime": "2020-07-14T07:00:00-04:00",
"value": 9.7,
"category": "Excellent",
"categoryValue": 5,
"ascending": true,
"description": "Conditions are excellent for attending an outdoor concert!"
},
{
"indexName": "Kite Flying Forecast",
"indexId": 9,
"dateTime": "2020-07-14T07:00:00-04:00",
"value": 8.5,
"category": "Very Good",
"categoryValue": 4,
"ascending": true,
"description": "Conditions are very good today for kite-flying."
},
{
"indexName": "Beach & Pool Forecast",
"indexId": 10,
"dateTime": "2020-07-14T07:00:00-04:00",
"value": 8.6,
"category": "Very Good",
"categoryValue": 4,
"ascending": true,
"description": "Conditons will be very good for a visit to the beach or pool."
},
{
"indexName": "Sailing Forecast",
"indexId": 11,
"dateTime": "2020-07-14T07:00:00-04:00",
"value": 8.3,
"category": "Very Good",
"categoryValue": 4,
"ascending": true,
"description": "Conditions will be very good for sailing."
},
{
"indexName": "Stargazing Forecast",
"indexId": 12,
"dateTime": "2020-07-14T07:00:00-04:00",
"value": 9.5,
"category": "Excellent",
"categoryValue": 5,
"ascending": true,
"description": "This is a great night to be stargazing!"
},
{
"indexName": "Fishing Forecast",
"indexId": 13,
"dateTime": "2020-07-14T07:00:00-04:00",
"value": 3.5,
"category": "Fair",
"categoryValue": 2,
"ascending": true,
"description": "Expect only fair conditions for fishing."
},
{
"indexName": "Ski Weather Forecast",
"indexId": 15,
"dateTime": "2020-07-14T07:00:00-04:00",
"value": 0,
"category": "Poor",
"categoryValue": 1,
"ascending": true,
"description": "Expect poor conditions for skiing."
},
{
"indexName": "Mosquito Activity Forecast",
"indexId": 17,
"dateTime": "2020-07-14T07:00:00-04:00",
"value": 7,
"category": "Very High",
"categoryValue": 4,
"ascending": true,
"description": "The weather is favorable for a very high level of mosquito activity. Plan activities and insect repellents accordingly."
},
{
"indexName": "Hunting Forecast",
"indexId": 20,
"dateTime": "2020-07-14T07:00:00-04:00",
"value": 4.5,
"category": "Fair",
"categoryValue": 2,
"ascending": true,
"description": "Expect only fair conditions for hunting."
},
{
"indexName": "Outdoor Barbecue",
"indexId": 24,
"dateTime": "2020-07-14T07:00:00-04:00",
"value": 9.8,
"category": "Excellent",
"categoryValue": 5,
"ascending": true,
"description": "This is a great day for an outdoor barbecue!"
},
{
"indexName": "Lawn Mowing Forecast",
"indexId": 28,
"dateTime": "2020-07-14T07:00:00-04:00",
"value": 9.6,
"category": "Excellent",
"categoryValue": 5,
"ascending": true,
"description": "This is a great day for lawn mowing!"
},
{
"indexName": "Outdoor Activity Forecast",
"indexId": 29,
"dateTime": "2020-07-14T07:00:00-04:00",
"value": 8.7,
"category": "Very Good",
"categoryValue": 4,
"ascending": true,
"description": "Conditions will be very good for outdoor activities."
}
]
}
定義
| 名前 | 説明 |
|---|---|
|
Daily |
DailyIndexオブジェクトは、天候に基づいて屋外活動を計画するのに役立ちます。例えば「スキー天気予報」などのアクティビティ名を提供。適合性を示す数値評価は0.0から10.0です。テキスト評価(例えば「貧困」)、そして「スキーには悪い条件が予想される」などの条件の簡単な説明も含まれます。 |
|
Daily |
このオブジェクトは、Get Daily Indices の呼び出しが成功したときに返されます。 |
|
Error |
リソース管理エラーの追加情報。 |
|
Error |
エラーの詳細。 |
|
Error |
エラー応答 |
|
Json |
応答の目的の形式。
|
DailyIndex
DailyIndexオブジェクトは、天候に基づいて屋外活動を計画するのに役立ちます。例えば「スキー天気予報」などのアクティビティ名を提供。適合性を示す数値評価は0.0から10.0です。テキスト評価(例えば「貧困」)、そして「スキーには悪い条件が予想される」などの条件の簡単な説明も含まれます。
| 名前 | 型 | 説明 |
|---|---|---|
| ascending |
boolean |
|
| category |
string |
指数の質的評価を提供し、 |
| categoryValue |
integer (int32) |
カテゴリー特性の数値表現を提供し、指数の定性的評価を示します。 値は1から5までの範囲で、インデックスによって異なる可能性があるため、昇順旗と組み合わせて使用すべきです。 例えば、蚊の活動については、低=1、中程度=2、高=3、非常に高=4、極度=5。 |
| dateTime |
string (date-time) |
観測の日付と時間は ISO 8601 形式(yyyy-mm-ddThh:mm:ss-hh:mm)で示されています。 例えば、 2025-04-29T07:00:00-07:00です。 |
| description |
string |
インデックス値の簡潔で使いやすい説明を提供し、特定の気象条件や活動に関連するその重要性をユーザーが理解できるようにします。 例えば、屋外バーベキューのインデックス値が「Excellent」の場合、説明は「これは屋外バーベキューに最適な日です!」となります。 |
| indexId |
integer (int32) |
特定のインデックスタイプを一意に表現し、さまざまな屋外活動の異なるインデックスを区別する数値識別子です。 例えば、1の「indexId」は「Running」インデックスに対応し、「indexId」が5の「Golfing」インデックスに対応します。 詳細については、Azure Mapsの気象サービスコンセプト記事のインデックスIDを参照してください。 |
| indexName |
string |
この指数の名前は、ランニング、ゴルフ、その他のアウトドア活動など、関連する活動の種類や状態を示します。 詳細については、Azure Mapsの気象サービスコンセプト記事のインデックスIDを参照してください。 |
| value |
number (float) |
0.0から10.0までの数値指数値で、ランニングやゴルフなど特定の活動や条件に対する天候条件の適合性を定量化します。 値が高いほど、 |
DailyIndicesResult
このオブジェクトは、Get Daily Indices の呼び出しが成功したときに返されます。
| 名前 | 型 | 説明 |
|---|---|---|
| results |
クエリされた場所のすべての日次インデックスのリスト。 |
ErrorAdditionalInfo
リソース管理エラーの追加情報。
| 名前 | 型 | 説明 |
|---|---|---|
| info |
object |
追加情報。 |
| type |
string |
追加情報の種類。 |
ErrorDetail
エラーの詳細。
| 名前 | 型 | 説明 |
|---|---|---|
| additionalInfo |
エラーの追加情報。 |
|
| code |
string |
エラー コード。 |
| details |
エラーの詳細。 |
|
| message |
string |
エラー メッセージ。 |
| target |
string |
エラーターゲット。 |
ErrorResponse
エラー応答
| 名前 | 型 | 説明 |
|---|---|---|
| error |
エラー オブジェクト。 |
JsonFormat
応答の目的の形式。
json 形式のみがサポートされています。
| 値 | 説明 |
|---|---|
| json |
JavaScript オブジェクト表記データ交換形式 を する |