This repository has been archived by the owner on Oct 12, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 17
IoTHub Manager Deployments API
Elvin Morales edited this page Jan 24, 2019
·
1 revision
POST /v1/deployments
Creating an ADM or Edge deployment.
Basic structure of request:
{
"DeviceGroupName":"Device Group Name",
"PackageName":"Package Name",
"DeviceGroupId":"default_AllDevices",
"DeviceGroupQuery":"[]",
"Name":"MyEdgeDeployment",
"PackageContent":"{...}",
"Priority":"10",
"Type":"EdgeManifest"
}
Response
- Status Code 200 - Deployment created successfully
- Status Code 400 - Invalid input for example missing deviceGroupQuery.
GET /v1/deployments/{id}
Get deployment details given a specific deployment id.
Example Response
- Status Code 200 - Successfully found deployment
- Status Code 400 - Invalid deployment id.
- Status Code 404 - Deployment not found.
{
"Id": "deploymentGuid",
"Name": "testdeployment",
"CreatedDateTimeUtc": "2019-01-23T20:51:30.9072831Z",
"DeviceGroupId": "default_AllDevices",
"DeviceGroupName": "All devices",
"DeviceGroupQuery": null,
"PackageContent": null,
"PackageName": "DeploymentWithName.json",
"Priority": 10,
"PackageType": "EdgeManifest",
"ConfigType": "",
"Metrics": {
"SystemMetrics": {
"appliedCount": 0,
"targetedCount": 0,
"reportedSuccessfulCount": 0,
"reportedFailedCount": 0,
"pendingCount": 0
},
"CustomMetrics": {},
"DeviceStatuses": null
},
"$metadata": {
"$type": "DevicePropertyList;1",
"$url": "/v1/deviceproperties"
}
}
Retrieves all deployments in the corresponding IoTHub
GET /v1/deployments
Response
- Status Code 200 - Desc
{
"Items": [
{
"Id": "deploymentGuid",
"Name": "testdeployment",
"CreatedDateTimeUtc": "2019-01-23T20:51:30.9072831Z",
"DeviceGroupId": "default_AllDevices",
"DeviceGroupName": "All devices",
"DeviceGroupQuery": null,
"PackageContent": null,
"PackageName": "DeploymentWithName.json",
"Priority": 10,
"PackageType": "EdgeManifest",
"ConfigType": "",
"Metrics": {
"SystemMetrics": {
"appliedCount": 0,
"targetedCount": 0
},
"CustomMetrics": {},
"DeviceStatuses": null
},
"$metadata": {
"$type": "DevicePropertyList;1",
"$url": "/v1/deviceproperties"
}
}
],
"$metadata": {
"$type": "DevicePropertyList;1",
"$url": "/v1/deviceproperties"
}
}
Delete deployment of the given id
DELETE /v1/deployments/{id}
Response
- Status Code 200 - Successfully deleted deployment.
- Status Code 400 - Empty id provided.
- Status Code 404 - Unable to find deployment to delete.