Weather - Get Daily Indices

屋外のスポーツ活動、建設、農業などの特定の活動に対して気象条件が最適かどうかを知りたい場合に使用します (結果には土壌水分情報が含まれます)。

API は Get Daily Indices 、将来のアクティビティを計画するときに役立つガイダンスを提供するインデックス値を返す 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

JsonFormat

応答の目的の形式。 サポートされているのは json 形式のみです。

api-version
query True

string

Azure Maps API のバージョン番号。

query
query True

number[]

緯度の後に経度 (例: "47.641268,-122.125679" など) で構成されるコンマ区切り文字列として指定された該当するクエリ。

duration
query

integer

日単位のインデックスが返される日数を指定します。 既定では、現在の日のインデックス データが返されます。 将来のインデックス データを要求する場合、現在の日は 1 日目として応答に含まれます。 使用可能な値は次のとおりです。

  • 1 - 現在の日の毎日のインデックス データを返します。 既定値です。
  • 5 - 現在の日から 5 日間の毎日のインデックス データを返します。
  • 10 - 現在の日から 10 日間の毎日のインデックス データを返します。
  • 15 - 現在の日から 15 日間の毎日のインデックス データを返します。
indexGroupId
query

integer

返された結果を対応するインデックスのサブセット (インデックス グループ) に制限するために使用できる数値インデックス グループ識別子。 と indexIdペアにすることはできません。 詳細については、「Azure Mapsの Weather サービス」を参照し、サポートされているインデックス グループを参照してください。

indexId
query

integer

返される結果を対応するインデックスの種類に制限するために使用できる数値インデックス識別子。 と indexGroupIdペアにすることはできません。 詳細については、Azure Mapsの Weather サービスに関するページと、サポートされているインデックスを参照してください。

language
query

string

検索結果を返す言語。 サポートされている IETF 言語タグの 1 つである必要があります。大文字と小文字は区別されません。 指定した言語のデータが特定のフィールドで使用できない場合は、既定の言語が使用されます。

詳細については、「 サポートされている言語 」を参照してください。

要求ヘッダー

名前 必須 説明
x-ms-client-id

string

Microsoft Entra ID セキュリティ モデルと組み合わせて使用するアカウントを指定します。 Azure Maps アカウントの一意の ID を表し、Azure Maps管理プレーン アカウント API から取得できます。 Azure MapsでMicrosoft Entra IDセキュリティを使用するには、次の記事を参照してください。

応答

名前 説明
200 OK

DailyIndicesResult

OK

Other Status Codes

ErrorResponse

予期しないエラーが発生しました。

セキュリティ

AADToken

これらは OAuth 2.0 フロー Microsoft Entraです。 Azure ロールベースのアクセス制御と組み合わせて使用すると、Azure Maps REST API へのアクセスを制御できます。 Azure ロールベースのアクセス制御は、1 つ以上のAzure Mapsリソース アカウントまたはサブリソースへのアクセスを指定するために使用されます。 REST API に対する 1 つ以上のアクセス許可で構成される組み込みロールまたはカスタム ロールを使用して、任意のユーザー、グループ、またはサービス プリンシパルにアクセス権 Azure Mapsを付与できます。

シナリオを実装するには、 認証の概念を表示することをお勧めします。 要約すると、このセキュリティ定義は、特定の API とスコープに対するアクセス制御が可能なオブジェクトを使用してアプリケーションをモデル化するためのソリューションを提供します。

メモ

  • このセキュリティ定義では、 ヘッダーを使用して、x-ms-client-idアプリケーションがアクセスを要求しているリソース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 を使用すると、複数のユース ケースに対してアプリケーションを構成ベースで設定できます。

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

名前 説明
https://atlas.microsoft.com/.default https://atlas.microsoft.com/.default

subscription-key

これは、Azure portalでAzure Maps アカウントを作成するとき、または PowerShell、CLI、Azure SDK、または REST API を使用するときにプロビジョニングされる共有キーです。

このキーを使用すると、すべてのアプリケーションがすべての REST API にアクセスできます。 つまり、このキーは、発行されたアカウントのマスター キーとして使用できます。

公開されているアプリケーションの場合は、機密クライアント アプリケーションのアプローチを使用して、キーを安全に格納できるように、Azure Maps REST API にアクセスすることをお勧めします。

Type: apiKey
In: query

SAS Token

これは、Azure portal、PowerShell、CLI、Azure SDK、または REST API を介して、Azure 管理プレーンを介して、Azure Maps リソースの List SAS 操作から作成される共有アクセス署名トークンです。

このトークンを使用すると、すべてのアプリケーションが Azure ロールベースのアクセス制御を使用してアクセスし、特定のトークンに使用される有効期限、レート、およびリージョンをきめ細かく制御できます。 つまり、SAS トークンを使用して、アプリケーションが共有キーよりもセキュリティで保護された方法でアクセスを制御できるようにします。

公開されているアプリケーションの場合、 Map アカウント リソース で許可される配信元の特定の一覧を構成して、レンダリングの不正使用を制限し、SAS トークンを定期的に更新することをお勧めします。

Type: apiKey
In: header

Successfully retrieve daily indices values from current day

Sample Request

GET https://atlas.microsoft.com/weather/indices/daily/json?api-version=1.1&query=43.84745,-79.37849&indexGroupId=11

Sample Response

{
  "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."
    }
  ]
}

定義

名前 説明
DailyIndex

日次インデックスに関する情報。

DailyIndicesResult

このオブジェクトは、成功した Get Daily インデックス呼び出しから返されます。

ErrorAdditionalInfo

リソース管理エラーの追加情報。

ErrorDetail

エラーの詳細。

ErrorResponse

エラー応答

JsonFormat

応答の目的の形式。 サポートされているのは json 形式のみです。

DailyIndex

日次インデックスに関する情報。

名前 説明
ascending

boolean

categoryValueの方向についてvalue説明します。 たとえば、 に true設定すると、最も低いインデックス値は 0 で、最適なインデックス値は 10 です。 に true設定すると、最も低いインデックス値は 10、最適なインデックス値は 0 になります。

category

string

インデックス値が適用されるレベルに対応するテキストの説明 categoryValue (例: "Very Good")。

categoryValue

integer

インデックス値が整数で表されるレベル。 この値は 1 から 5 にすることができ、インデックス間で異なる可能性があるため、 ascending フラグと組み合わせて使用する必要があります。 たとえば、モスキート アクティビティには、Low=1、Moderate=2、High=3、Very High=4、Extreme=5 の値が適用されます。

dateTime

string

ISO 8601 形式で表示されている現在の観測値の日付と時刻 (例: 2019-10-27T19:39:57-08:00)。

description

string

インデックス値とカテゴリを要約するために表示目的で使用できるテキスト説明。 たとえば、フライト遅延のインデックス値が非常に良好な場合、説明は "条件は飛行に適しています" になります。

indexId

integer

特定のインデックスを識別するために使用される数値 ID。 詳細については、Azure Mapsの Weather サービスに関するページを参照し、サポートされているインデックス ID を参照してください。 たとえば、インデックス ID は UI 視覚化シナリオをサポートできます。

indexName

string

インデックスの名前 (例: "Construction"、"Outdoor Activity"、"Flight Delays")。

value

number

インデックス値。 範囲は 0.0 から 10.0 です。 詳細については、「Azure Mapsの Weather サービス」を参照し、サポートされている範囲を確認してください。

DailyIndicesResult

このオブジェクトは、成功した Get Daily インデックス呼び出しから返されます。

名前 説明
results

DailyIndex[]

クエリ対象の場所のすべての日次インデックスの一覧。

ErrorAdditionalInfo

リソース管理エラーの追加情報。

名前 説明
info

object

追加情報。

type

string

追加情報の種類。

ErrorDetail

エラーの詳細。

名前 説明
additionalInfo

ErrorAdditionalInfo[]

エラーの追加情報。

code

string

エラー コード。

details

ErrorDetail[]

エラーの詳細です。

message

string

エラー メッセージ。

target

string

エラーのターゲット。

ErrorResponse

エラー応答

名前 説明
error

ErrorDetail

error オブジェクト。

JsonFormat

応答の目的の形式。 サポートされているのは json 形式のみです。

名前 説明
json

string

JavaScript オブジェクト表記データ交換形式