Share via


Weather - Get Tropical Storm Search

用來取得國家氣象預報機構發出的雨清單。

Get Tropical Storm Search API 是 HTTP GET 要求,會傳回依年份、區位標識符和政府標識碼發出的政府核發暴風雨清單。 有關暴風雨的資訊包括政府標識碼、水位標識符、狀態、年份、名稱,以及是否為子系。

GET https://atlas.microsoft.com/weather/tropical/storms/json?api-version=1.1&year={year}
GET https://atlas.microsoft.com/weather/tropical/storms/json?api-version=1.1&year={year}&basinId={basinId}&govId={govId}

URI 參數

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

JsonFormat

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

api-version
query True

string

Azure 地圖服務 API 的版本號碼。

year
query True

integer

int32

()

basinId
query

basinId

二元標識碼

govId
query

integer

int32

政府 Storm 識別碼

要求標頭

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

string

指定哪個帳戶與 Microsoft Entra ID 安全性模型搭配使用。 它代表 Azure 地圖服務 帳戶的唯一標識符,而且可以從 Azure 地圖服務 管理平面帳戶 API 擷取。 若要在 Azure 地圖服務 中使用 Microsoft Entra ID 安全性,請參閱下列文章以取得指引。

回應

名稱 類型 Description
200 OK

StormSearchResult

確定

Other Status Codes

ErrorResponse

發生意外錯誤。

安全性

AADToken

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

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

備註

  • 此安全性定義需要使用x-ms-client-id 標頭來指出應用程式要求存取權 Azure 地圖服務 資源。 這可以從 地圖管理 API 取得。

Authorization URL專屬於 Azure 公用雲端實例。 主權雲端具有唯一的授權 URL 和 Microsoft Entra ID 設定。 * 透過 Azure 入口網站、PowerShell、CLI、Azure SDK 或 REST API,從 Azure 管理平面設定 Azure 角色型存取控制。 * Azure 地圖服務 Web SDK 的使用方式允許針對多個使用案例設定應用程式設定。

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

Scopes

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

subscription-key

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

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

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

Type: apiKey
In: query

SAS Token

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

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

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

Type: apiKey
In: header

範例

Get Tropical Storm Search
Get Tropical Storm Search With Three Properties

Sample Request

GET https://atlas.microsoft.com/weather/tropical/storms/json?api-version=1.1&year=2021&basinId=AL

Sample Response

{
  "results": [
    {
      "year": "2021",
      "basinId": "AL",
      "govId": 1,
      "name": "Ana",
      "isActive": false,
      "isRetired": false,
      "isSubtropical": false
    },
    {
      "year": "2021",
      "basinId": "AL",
      "govId": 2,
      "name": "Bill",
      "isActive": false,
      "isRetired": false,
      "isSubtropical": false
    },
    {
      "year": "2021",
      "basinId": "AL",
      "govId": 3,
      "name": "Claudette",
      "isActive": false,
      "isRetired": false,
      "isSubtropical": false
    },
    {
      "year": "2021",
      "basinId": "AL",
      "govId": 4,
      "name": "Danny",
      "isActive": false,
      "isRetired": false,
      "isSubtropical": false
    },
    {
      "year": "2021",
      "basinId": "AL",
      "govId": 5,
      "name": "Elsa",
      "isActive": false,
      "isRetired": false,
      "isSubtropical": false
    },
    {
      "year": "2021",
      "basinId": "AL",
      "govId": 6,
      "name": "Fred",
      "isActive": false,
      "isRetired": false,
      "isSubtropical": false
    },
    {
      "year": "2021",
      "basinId": "AL",
      "govId": 7,
      "name": "Grace",
      "isActive": false,
      "isRetired": false,
      "isSubtropical": false
    },
    {
      "year": "2021",
      "basinId": "AL",
      "govId": 8,
      "name": "Henri",
      "isActive": false,
      "isRetired": false,
      "isSubtropical": false
    },
    {
      "year": "2021",
      "basinId": "AL",
      "govId": 9,
      "name": "Ida",
      "isActive": false,
      "isRetired": false,
      "isSubtropical": false
    },
    {
      "year": "2021",
      "basinId": "AL",
      "govId": 10,
      "name": "Kate",
      "isActive": false,
      "isRetired": false,
      "isSubtropical": false
    },
    {
      "year": "2021",
      "basinId": "AL",
      "govId": 11,
      "name": "Julian",
      "isActive": false,
      "isRetired": false,
      "isSubtropical": false
    },
    {
      "year": "2021",
      "basinId": "AL",
      "govId": 12,
      "name": "Larry",
      "isActive": false,
      "isRetired": false,
      "isSubtropical": false
    },
    {
      "year": "2021",
      "basinId": "AL",
      "govId": 13,
      "name": "Mindy",
      "isActive": false,
      "isRetired": false,
      "isSubtropical": false
    },
    {
      "year": "2021",
      "basinId": "AL",
      "govId": 14,
      "name": "Nicholas",
      "isActive": false,
      "isRetired": false,
      "isSubtropical": false
    },
    {
      "year": "2021",
      "basinId": "AL",
      "govId": 15,
      "name": "ODETTE",
      "isActive": false,
      "isRetired": false,
      "isSubtropical": false
    },
    {
      "year": "2021",
      "basinId": "AL",
      "govId": 16,
      "name": "Peter",
      "isActive": false,
      "isRetired": false,
      "isSubtropical": false
    },
    {
      "year": "2021",
      "basinId": "AL",
      "govId": 17,
      "name": "Rose",
      "isActive": false,
      "isRetired": false,
      "isSubtropical": false
    },
    {
      "year": "2021",
      "basinId": "AL",
      "govId": 18,
      "name": "Sam",
      "isActive": false,
      "isRetired": false,
      "isSubtropical": false
    },
    {
      "year": "2021",
      "basinId": "AL",
      "govId": 19,
      "name": "Teresa",
      "isActive": false,
      "isRetired": false,
      "isSubtropical": false
    },
    {
      "year": "2021",
      "basinId": "AL",
      "govId": 20,
      "name": "Victor",
      "isActive": false,
      "isRetired": false,
      "isSubtropical": false
    },
    {
      "year": "2021",
      "basinId": "AL",
      "govId": 21,
      "name": "Wanda",
      "isActive": false,
      "isRetired": false,
      "isSubtropical": false
    }
  ]
}

Get Tropical Storm Search With Three Properties

Sample Request

GET https://atlas.microsoft.com/weather/tropical/storms/json?api-version=1.1&year=2021&basinId=AL&govId=1

Sample Response

{
  "results": [
    {
      "year": "2021",
      "basinId": "AL",
      "govId": 1,
      "name": "Ana",
      "isActive": false,
      "isRetired": false,
      "isSubtropical": false
    }
  ]
}

定義

名稱 Description
basinId

二元標識碼

ErrorAdditionalInfo

資源管理錯誤其他資訊。

ErrorDetail

錯誤詳細數據。

ErrorResponse

錯誤回應

JsonFormat

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

StormSearchResult

搜尋 政府發出的暴風雨

StormSearchResultItem

政府發出的作用中 Storm 事件

basinId

二元標識碼

名稱 類型 Description
AL

string

大西洋

CP

string

太平洋中部

EP

string

東部太平洋

NI

string

北印度海

NP

string

太平洋北部

SI

string

印度南部

SP

string

南太平洋

ErrorAdditionalInfo

資源管理錯誤其他資訊。

名稱 類型 Description
info

object

其他資訊。

type

string

其他信息類型。

ErrorDetail

錯誤詳細數據。

名稱 類型 Description
additionalInfo

ErrorAdditionalInfo[]

錯誤其他資訊。

code

string

錯誤碼。

details

ErrorDetail[]

錯誤詳細資料。

message

string

錯誤訊息。

target

string

錯誤目標。

ErrorResponse

錯誤回應

名稱 類型 Description
error

ErrorDetail

錯誤物件。

JsonFormat

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

名稱 類型 Description
json

string

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

StormSearchResult

搜尋 政府發出的暴風雨

名稱 類型 Description
nextLink

string

是傳回之功能下一頁的連結。 如果是最後一頁,則不會有此欄位。

results

StormSearchResultItem[]

搜尋 政府發出的暴風雨

StormSearchResultItem

政府發出的作用中 Storm 事件

名稱 類型 Description
basinId

basinId

區位標識碼 (AL、EP、SI、NI、CP、NP、SP)

govId

integer

政府 Storm 識別碼。 這會比對擷取次數。

isActive

boolean

True 是表示 如果最近更新了耙耙。

isRetired

boolean

True 是表示 如果 storm 名稱已永久在來源湖中淘汰。

isSubtropical

boolean

True 是表示 當被分類為子向性耙耙。

name

string

擷取者的名稱。

year

string

原點年份