Skip to content

Commit

Permalink
Azure Sphere- adding Bulk Claim Device (#5697)
Browse files Browse the repository at this point in the history
  • Loading branch information
c-valdebenito authored Dec 16, 2021
1 parent 9862d91 commit e9b7e46
Show file tree
Hide file tree
Showing 2 changed files with 109 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,68 @@
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/claimDevices": {
"post": {
"operationId": "Catalogs_ClaimDevices",
"summary": "Bulk claim of devices in a catalog.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"parameters": [
{
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter"
},
{
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter"
},
{
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter"
},
{
"name": "catalogName",
"in": "path",
"required": true,
"description": "Catalog name",
"type": "string"
},
{
"name": "parameters",
"in": "body",
"required": true,
"description": "Devices to be claimed",
"schema": {
"$ref": "#/definitions/ClaimDevicesRequest"
}
}
],
"responses": {
"202": {
"description": "Response to the action call to bulk claim devices.",
"schema": {
"$ref": "#/definitions/ClaimDevicesResponse"
}
},
"default": {
"description": "An Azure Sphere Error",
"schema": {
"$ref": "#/definitions/AzureSphereErrorResponse"
},
"x-ms-error-response": true
}
},
"tags": [
"Catalogs"
],
"x-ms-examples": {
"Claims devices in bulk": {
"$ref": "./examples/PostClaimDevices.json"
}
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}": {
"get": {
"operationId": "Catalogs_Get",
Expand Down Expand Up @@ -3012,6 +3074,33 @@
},
"description": "Response to the action call to upload an image."
},
"ClaimDevicesRequest": {
"type": "object",
"properties": {
"deviceIdentifiers": {
"type": "array",
"items": {
"type": "string"
},
"x-adl-name": "string[]",
"description": "Device identifiers of the devices to be claimed."
}
},
"description": "Request to the action call to bulk claim devices.",
"required": [
"deviceIdentifiers"
]
},
"ClaimDevicesResponse": {
"type": "object",
"properties": {
"provisioningState": {
"$ref": "#/definitions/ProvisioningState",
"readOnly": true
}
},
"description": "Response to the action call to bulk claim devices."
},
"Catalog": {
"type": "object",
"properties": {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"parameters": {
"subscriptionId": "00000000-0000-0000-0000-000000000000",
"resourceGroupName": "MyResourceGroup1",
"catalogName": "MyCatalog1",
"parameters": {
"deviceIdentifiers": [
"AC2P87D8AB53AA97C9F4E8B896955AD7E4F9E034017E638B6E2E852A1B7BBF81BDCDA405B719CE27F5A5EF4A7E5C17CBAAA049EAB0EF2473461747DD30FRTY5E",
"ZXP0EE6CC3184HG98F7C05089DFE42D9B149B6EC67392B4FBE0FBC3C7F2F30F0ED4770F19E9DF34281305DC637F0F963E33D1CA760C2E340B6559F0C4FCC2PSW"
]
},
"api-version": "2022-02-01-privatepreview"
},
"responses": {
"202": {
"description": "The bulk device claim was accepted for processing.",
"body": {}
}
}
}

0 comments on commit e9b7e46

Please sign in to comment.