File Uploads - Create
Create the file upload storage account configuration.
PUT https://{subdomain}.{baseDomain}/api/fileUploads?api-version=2022-07-31
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
base
|
path | True |
string |
The base domain for all Azure IoT Central service requests. |
subdomain
|
path | True |
string |
The application subdomain. |
api-version
|
query | True |
string |
The version of the API being called. |
Request Body
Name | Required | Type | Description |
---|---|---|---|
connectionString | True |
string |
The connection string used to configure the storage account |
container | True |
string |
The name of the container inside the storage account |
account |
string |
The storage account name where to upload the file to |
|
etag |
string |
ETag used to prevent conflict with multiple uploads |
|
sasTtl |
string |
ISO 8601 duration standard, The amount of time the device’s request to upload a file is valid before it expires. |
Responses
Name | Type | Description |
---|---|---|
200 OK |
Success |
|
Other Status Codes |
An error response received from the IoT Central Service. Headers x-ms-error-code: string |
Security
azure_auth
Azure Active Directory OAuth2 Flow
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
Name | Description |
---|---|
user_impersonation | impersonate your user account |
Examples
Create file upload storage account configuration
Sample Request
PUT https://appsubdomain.azureiotcentral.com/api/fileUploads?api-version=2022-07-31
{
"account": "contoso-account",
"connectionString": "DefaultEndpointsProtocol=https;AccountName=MyAccountName;AccountKey=*****;EndpointSuffix=core.windows.net",
"container": "container",
"sasTtl": "PT1H"
}
Sample Response
{
"account": "contoso-account",
"connectionString": "DefaultEndpointsProtocol=https;AccountName=MyAccountName;AccountKey=*****;EndpointSuffix=core.windows.net",
"container": "container",
"sasTtl": "PT1H",
"state": "pending"
}
Definitions
Name | Description |
---|---|
Error |
The response error definition. |
Error |
The detail information of the error. |
File |
The file upload configuration definition. |
File |
The state of the file upload configuration |
Error
The response error definition.
Name | Type | Description |
---|---|---|
error |
Error details for current request. |
ErrorDetails
The detail information of the error.
Name | Type | Description |
---|---|---|
code |
string |
Error code. |
message |
string |
Error message details. |
requestId |
string |
Correlation Id for current request. |
time |
string |
The time that error request failed. |
FileUpload
The file upload configuration definition.
Name | Type | Description |
---|---|---|
account |
string |
The storage account name where to upload the file to |
connectionString |
string |
The connection string used to configure the storage account |
container |
string |
The name of the container inside the storage account |
etag |
string |
ETag used to prevent conflict with multiple uploads |
sasTtl |
string |
ISO 8601 duration standard, The amount of time the device’s request to upload a file is valid before it expires. |
state |
The state of the file upload configuration |
FileUploadState
The state of the file upload configuration
Name | Type | Description |
---|---|---|
deleting |
string |
|
failed |
string |
|
pending |
string |
|
succeeded |
string |
|
updating |
string |