Device Update - Get File
Get a specific update file from the version.
GET https://{endpoint}/deviceUpdate/{instanceId}/updates/providers/{provider}/names/{name}/versions/{version}/files/{fileId}?api-version=2022-10-01
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
endpoint
|
path | True |
string url |
The Device Update for IoT Hub account endpoint (hostname only, no protocol). |
file
|
path | True |
string |
File identifier. |
instance
|
path | True |
string |
The Device Update for IoT Hub account instance identifier. |
name
|
path | True |
string |
Update name. |
provider
|
path | True |
string |
Update provider. |
version
|
path | True |
string |
Update version. |
api-version
|
query | True |
string |
Version of the API to be used with the client request. |
Request Header
Name | Required | Type | Description |
---|---|---|---|
If-None-Match |
string |
Defines the If-None-Match condition. The operation will be performed only if the ETag on the server does not match this value. |
Responses
Name | Type | Description |
---|---|---|
200 OK |
The requested file entity. |
|
Other Status Codes |
Default response. |
Security
azure_auth
Azure Active Directory OAuth2 Flow
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
Name | Description |
---|---|
https://api.adu.microsoft.com/.default | Default authorization scope. |
Examples
DeviceUpdate_GetFile
Sample request
GET https://contoso.api.adu.microsoft.com/deviceUpdate/blue/updates/providers/microsoft/names/adu/versions/1.0.0.0/files/abc123?api-version=2022-10-01
Sample response
{
"fileId": "abc123",
"fileName": "1v5uww1q.my2",
"sizeInBytes": 1862311,
"hashes": {
"sha256": "OVokcktf61lQXs17MzJCsM98lk48H1Wu1hy7Sp6lLfI="
},
"mimeType": "application/BuildAsync-s4jwikgq.44h",
"etag": "\"26bd8eba-4bb2-4960-a357-ca4d60b5fb4b\""
}
Definitions
Name | Description |
---|---|
Error |
Error details. |
Error |
Common error response. |
Inner |
An object containing more specific information than the current object about the error. |
Update |
Update file metadata. |
Update |
Update file basic metadata. |
Update |
Download handler for utilizing related files to download payload file. |
Error
Error details.
Name | Type | Description |
---|---|---|
code |
string |
Server defined error code. |
details |
Error[] |
An array of errors that led to the reported error. |
innererror |
An object containing more specific information than the current object about the error. |
|
message |
string |
A human-readable representation of the error. |
occurredDateTime |
string |
Date and time in UTC when the error occurred. |
target |
string |
The target of the error. |
ErrorResponse
Common error response.
Name | Type | Description |
---|---|---|
error |
The error details. |
InnerError
An object containing more specific information than the current object about the error.
Name | Type | Description |
---|---|---|
code |
string |
A more specific error code than what was provided by the containing error. |
errorDetail |
string |
The internal error or exception message. |
innerError |
An object containing more specific information than the current object about the error. |
|
message |
string |
A human-readable representation of the error. |
UpdateFile
Update file metadata.
Name | Type | Description |
---|---|---|
downloadHandler |
Optional download handler for utilizing related files to download payload file. |
|
etag |
string |
File ETag. |
fileId |
string |
File identity, generated by server at import time. |
fileName |
string |
File name. |
hashes |
object |
Mapping of hashing algorithm to base64 encoded hash values. |
mimeType |
string |
File MIME type. |
properties |
object |
Optional file properties (not consumed by service but pass-through to device). |
relatedFiles |
Optional related files metadata used together DownloadHandler metadata to download payload file. |
|
scanDetails |
string |
Anti-malware scan details. |
scanResult |
string |
Anti-malware scan result. |
sizeInBytes |
integer |
File size in number of bytes. |
UpdateFileBase
Update file basic metadata.
Name | Type | Description |
---|---|---|
fileName |
string |
File name. |
hashes |
object |
Mapping of hashing algorithm to base64 encoded hash values. |
mimeType |
string |
File MIME type. |
properties |
object |
Optional file properties (not consumed by service but pass-through to device). |
scanDetails |
string |
Anti-malware scan details. |
scanResult |
string |
Anti-malware scan result. |
sizeInBytes |
integer |
File size in number of bytes. |
UpdateFileDownloadHandler
Download handler for utilizing related files to download payload file.
Name | Type | Description |
---|---|---|
id |
string |
Download handler identifier. |