Updates - Get File
從版本取得特定的更新檔案。
GET https://{accountEndpoint}/deviceupdate/{instanceId}/v2/updates/providers/{provider}/names/{name}/versions/{version}/files/{fileId}
URI 參數
名稱 | 位於 | 必要 | 類型 | Description |
---|---|---|---|---|
account
|
path | True |
string |
帳戶端點。 |
file
|
path | True |
string |
檔案標識碼。 |
instance
|
path | True |
string |
帳戶實例標識碼。 |
name
|
path | True |
string |
更新名稱。 |
provider
|
path | True |
string |
更新提供者。 |
version
|
path | True |
string |
更新版本。 |
要求標頭
名稱 | 必要 | 類型 | Description |
---|---|---|---|
If-None-Match |
string |
定義 If-None-Match 條件。 只有在伺服器上的 ETag 不符合此值時,才會執行作業。 |
回應
名稱 | 類型 | Description |
---|---|---|
200 OK |
要求的檔案實體。 |
|
404 Not Found |
找不到。 |
|
429 Too Many Requests |
太多要求;在一段時間內可以執行多少作業有速率限制。 |
|
Other Status Codes |
未修改。 |
安全性
azure_auth_implicit
Azure Active Directory OAuth2 隱含流程
類型:
oauth2
Flow:
implicit
授權 URL:
https://login.microsoftonline.com/common/oauth2/v2.0/authorize
範圍
名稱 | Description |
---|---|
user_impersonation | 模擬您的用戶帳戶 |
azure_auth_code
Azure Active Directory OAuth2 AccessCode Flow
類型:
oauth2
Flow:
accessCode
授權 URL:
https://login.microsoftonline.com/common/oauth2/v2.0/authorize
權杖 URL:
https://login.microsoftonline.com/common/oauth2/v2.0/token
範圍
名稱 | Description |
---|---|
user_impersonation | 模擬您的用戶帳戶 |
azure_auth_application
Azure Active Directory OAuth2 應用程式流程
類型:
oauth2
Flow:
application
權杖 URL:
https://login.microsoftonline.com/common/oauth2/v2.0/token
範圍
名稱 | Description |
---|---|
.default | 用戶端認證範圍 |
azure_auth_password
Azure Active Directory OAuth2 密碼流程
類型:
oauth2
Flow:
password
權杖 URL:
https://login.microsoftonline.com/common/oauth2/v2.0/token
範圍
名稱 | Description |
---|---|
user_impersonation | 模擬您的用戶帳戶 |
範例
Updates_GetFile
範例要求
GET https://contoso.api.adu.microsoft.com/deviceupdate/blue/v2/updates/providers/microsoft/names/adu/versions/1.0.0.0/files/abc123
範例回覆
{
"fileId": "abc123",
"fileName": "1v5uww1q.my2",
"sizeInBytes": 1862311,
"hashes": {
"sha256": "OVokcktf61lQXs17MzJCsM98lk48H1Wu1hy7Sp6lLfI="
},
"mimeType": "application/BuildAsync-s4jwikgq.44h",
"etag": "\"26bd8eba-4bb2-4960-a357-ca4d60b5fb4b\""
}
定義
File
更新檔案元數據。
名稱 | 類型 | Description |
---|---|---|
etag |
string |
檔案 ETag。 |
fileId |
string |
檔案身分識別,由伺服器在匯入時產生。 |
fileName |
string |
檔案名稱 |
hashes |
object |
哈希演算法與base64編碼哈希值的對應。 |
mimeType |
string |
檔案MIME類型。 |
sizeInBytes |
integer |
檔案大小 (以位元組數為單位)。 |