Share via


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 매개 변수

Name In(다음 안에) 필수 형식 Description
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 날씨 서비스를 참조하고 지원되는 인덱스 그룹을 참조하세요.

indexId
query

integer

반환된 결과를 해당 인덱스 형식으로 제한하는 데 사용할 수 있는 숫자 인덱스 식별자입니다. 와 indexGroupId페어링할 수 없습니다. 자세한 내용은 Azure Maps 날씨 서비스를 참조하고 지원되는 인덱스를 확인하세요.

language
query

string

검색 결과를 반환해야 하는 언어입니다. 대/소문자를 구분하지 않는 지원되는 IETF 언어 태그 중 하나여야 합니다. 특정 필드에 대해 지정된 언어의 데이터를 사용할 수 없는 경우 기본 언어가 사용됩니다.

자세한 내용은 지원되는 언어를 참조하세요.

요청 헤더

Name 필수 형식 Description
x-ms-client-id

string

Microsoft Entra ID 보안 모델과 함께 사용할 계정을 지정합니다. Azure Maps 계정의 고유 ID를 나타내며 Azure Maps 관리 평면 계정 API에서 검색할 수 있습니다. Azure Maps Microsoft Entra ID 보안을 사용하려면 다음 문서를 참조하세요.

응답

Name 형식 Description
200 OK

DailyIndicesResult

정상

Other Status Codes

ErrorResponse

예기치 않은 오류가 발생했습니다.

보안

AADToken

다음은 Microsoft Entra OAuth 2.0 흐름입니다. Azure 역할 기반 액세스 제어와 쌍을 이루는 경우 Azure Maps REST API에 대한 액세스를 제어하는 데 사용할 수 있습니다. Azure 역할 기반 액세스 제어는 하나 이상의 Azure Maps 리소스 계정 또는 하위 리소스에 대한 액세스를 지정하는 데 사용됩니다. 모든 사용자, 그룹 또는 서비스 주체는 기본 제공 역할 또는 REST API를 Azure Maps 하나 이상의 권한으로 구성된 사용자 지정 역할을 통해 액세스 권한을 부여할 수 있습니다.

시나리오를 구현하려면 인증 개념을 보는 것이 좋습니다. 요약하자면, 이 보안 정의는 특정 API 및 범위에 대한 액세스 제어가 가능한 개체를 통해 애플리케이션을 모델링하는 솔루션을 제공합니다.

참고

  • 이 보안 정의 애플리케이션이 x-ms-client-id 액세스를 요청하는 Azure Maps 리소스를 나타내기 위해 헤더를 사용해야 합니다. 이는 지도 관리 API에서 가져올 수 있습니다.

Authorization URL 은 Azure 퍼블릭 클라우드 instance 관련됩니다. 소버린 클라우드에는 고유한 권한 부여 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

Name Description
https://atlas.microsoft.com/.default https://atlas.microsoft.com/.default

subscription-key

이 키는 Azure Portal Azure Maps 계정을 Create PowerShell, CLI, Azure SDK 또는 REST API를 사용할 때 프로비전되는 공유 키입니다.

이 키를 사용하면 모든 애플리케이션이 모든 REST API에 액세스할 수 있습니다. 즉, 이 키는 발급된 계정에서 master 키로 사용할 수 있습니다.

공개적으로 노출된 애플리케이션의 경우 기밀 클라이언트 애플리케이션 접근 방식을 사용하여 키를 안전하게 저장할 수 있도록 Azure Maps REST API에 액세스하는 것이 좋습니다.

Type: apiKey
In: query

SAS Token

공유 액세스 서명 토큰은 Azure Portal, PowerShell, CLI, Azure SDK 또는 REST API를 통해 Azure 관리 평면을 통해 Azure Maps 리소스의 SAS 나열 작업에서 만들어집니다.

이 토큰을 사용하면 모든 애플리케이션이 특정 토큰에 사용할 만료, 속도 및 지역에 대한 Azure 역할 기반 액세스 제어 및 세분화된 제어를 사용하여 액세스할 수 있는 권한이 부여됩니다. 즉, SAS 토큰을 사용하여 애플리케이션이 공유 키보다 더 보안이 유지되는 방식으로 액세스를 제어할 수 있습니다.

공개적으로 노출된 애플리케이션의 경우 렌더링 남용을 제한하고 정기적으로 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."
    }
  ]
}

정의

Name Description
DailyIndex

일별 인덱스 정보입니다.

DailyIndicesResult

이 개체는 성공적인 일일 인덱스 가져오기 호출에서 반환됩니다.

ErrorAdditionalInfo

리소스 관리 오류 추가 정보입니다.

ErrorDetail

오류 세부 정보입니다.

ErrorResponse

오류 응답

JsonFormat

원하는 응답 형식입니다. json 형식만 지원됩니다.

DailyIndex

일별 인덱스 정보입니다.

Name 형식 Description
ascending

boolean

categoryValuevalue 방향을 설명합니다. 예를 들어 로 설정 true하면 가장 낮은 인덱스 값은 0이고 가장 좋은 인덱스 값은 10입니다. 로 true설정하면 가장 낮은 인덱스 값은 10이고 가장 좋은 인덱스 값은 0입니다.

category

string

인덱스 categoryValue 값이 속하는 수준에 해당하는 텍스트 설명입니다(예: "매우 좋음").

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 날씨 서비스를 참조하고 지원되는 인덱스 ID를 확인하세요. 예를 들어 인덱스 ID는 UI 시각화 시나리오를 지원할 수 있습니다.

indexName

string

인덱스의 이름(예: "Construction", "Outdoor Activity", "Flight Delays").

value

number

인덱스 값입니다. 범위는 0.0에서 10.0까지입니다. 자세한 내용은 Azure Maps 날씨 서비스를 참조하고 지원되는 범위를 확인하세요.

DailyIndicesResult

이 개체는 성공적인 일일 인덱스 가져오기 호출에서 반환됩니다.

Name 형식 Description
results

DailyIndex[]

쿼리된 위치에 대한 모든 일일 인덱스 목록입니다.

ErrorAdditionalInfo

리소스 관리 오류 추가 정보입니다.

Name 형식 Description
info

object

추가 정보입니다.

type

string

추가 정보 유형입니다.

ErrorDetail

오류 세부 정보입니다.

Name 형식 Description
additionalInfo

ErrorAdditionalInfo[]

오류 추가 정보입니다.

code

string

오류 코드입니다.

details

ErrorDetail[]

오류 세부 정보입니다.

message

string

오류 메시지입니다.

target

string

오류 대상입니다.

ErrorResponse

오류 응답

Name 형식 Description
error

ErrorDetail

Error 개체.

JsonFormat

원하는 응답 형식입니다. json 형식만 지원됩니다.

Name 형식 Description
json

string

JavaScript 개체 표기법 데이터 교환 형식