diff --git a/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/continuousdataexports_set.json b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/continuousdataexports_set.json index 5f2e51d29e79..12fed0bdfca9 100644 --- a/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/continuousdataexports_set.json +++ b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/continuousdataexports_set.json @@ -1,6 +1,6 @@ { - "title": "Create or update export", - "description": "Create a new export or update an existing export, specifying its Id.", + "title": "Create or replace export", + "description": "Create a new export or replace an existing export, specifying its Id.", "parameters": { "centralDnsSuffixInPath": "azureiotcentral.com", "subdomain": "appsubdomain", diff --git a/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/continuousdataexports_update.json b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/continuousdataexports_update.json new file mode 100644 index 000000000000..98f7cb58b2a2 --- /dev/null +++ b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/continuousdataexports_update.json @@ -0,0 +1,44 @@ +{ + "title": "Update export", + "description": "Update parts of an existing continuous data export, specifying its Id.", + "parameters": { + "centralDnsSuffixInPath": "azureiotcentral.com", + "subdomain": "appsubdomain", + "export_id": "abc", + "body": { + "displayName": "Updated export name", + "endpoint": { + "type": "StorageEndpoint", + "connectionString": "", + "name": "Blob 1" + }, + "enabled": false, + "sources": [ + "devices", + "deviceTemplates", + "telemetry" + ] + } + }, + "responses": { + "200": { + "body": { + "id": "abc", + "etag": "493aface-4c5e-4318-89e9-f6586f687009", + "displayName": "Updated export name", + "endpoint": { + "type": "StorageEndpoint", + "connectionString": "" } ], "email": "bob@contoso.com" @@ -21,7 +21,7 @@ "type": "EmailUser", "roles": [ { - "role": "ca310b8d-2f4a-44e0-a36e-957c202cd8d4" + "role": "" } ], "email": "bob@contoso.com" diff --git a/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/users_set_serviceprincipal.json b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/users_set_serviceprincipal.json index 0f7a29c171fc..4114bf4edfbc 100644 --- a/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/users_set_serviceprincipal.json +++ b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/users_set_serviceprincipal.json @@ -1,17 +1,17 @@ { - "title": "Add or update a service principal in your application", - "description": "Add or update an AAD service principal in your application.", + "title": "Add or replace a service principal in your application", + "description": "Add or replace an AAD service principal in your application.", "parameters": { "centralDnsSuffixInPath": "azureiotcentral.com", "subdomain": "appsubdomain", "user_id": "123", "body": { "type": "ServicePrincipalUser", - "tenantId": "027fdad7-cf0f-470a-a26a-272197813322", - "objectId": "65e13aac-1443-4c49-9d49-57b87197cfff", + "tenantId": "", + "objectId": "", "roles": [ { - "role": "c7be2c6b-797e-4551-bb24-33709f6b2e20" + "role": "" } ] } @@ -21,11 +21,11 @@ "body": { "id": "123", "type": "ServicePrincipalUser", - "tenantId": "027fdad7-cf0f-470a-a26a-272197813322", - "objectId": "65e13aac-1443-4c49-9d49-57b87197cfff", + "tenantId": "", + "objectId": "", "roles": [ { - "role": "c7be2c6b-797e-4551-bb24-33709f6b2e20" + "role": "" } ] } diff --git a/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/users_update.json b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/users_update.json new file mode 100644 index 000000000000..b78b7ea88eb6 --- /dev/null +++ b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/users_update.json @@ -0,0 +1,29 @@ +{ + "title": "Update a user in your application", + "description": "Update a user in your application.", + "parameters": { + "centralDnsSuffixInPath": "azureiotcentral.com", + "subdomain": "appsubdomain", + "user_id": "123", + "body": { + "roles": [ + { + "role": "" + } + ] + } + }, + "responses": { + "200": { + "body": { + "type": "EmailUser", + "roles": [ + { + "role": "" + } + ], + "email": "bob@contoso.com" + } + } + } +} diff --git a/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/iotcentral.json b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/iotcentral.json index 4834a4d9feae..f8f470568a91 100644 --- a/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/iotcentral.json +++ b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/iotcentral.json @@ -74,6 +74,32 @@ "value" ] }, + "Application": { + "type": "object", + "properties": { + "id": { + "description": "Unique ID of the application.", + "type": "string", + "readOnly": true + }, + "displayName": { + "description": "Display name of the application.", + "type": "string" + }, + "subdomain": { + "description": "The URL subdomain of the application.", + "type": "string" + }, + "host": { + "description": "The URL host of the application.", + "type": "string" + } + }, + "required": [ + "subdomain", + "host" + ] + }, "Attestation": { "type": "object", "properties": { @@ -255,6 +281,14 @@ "type": "string", "readOnly": true }, + "connectionTimeout": { + "description": "Connection Timeout in seconds to wait for a disconnected device to come online. Acceptable timeout values are from 0 to 30 seconds. Defaults to 0 seconds.", + "type": "integer" + }, + "responseTimeout": { + "description": "Response Timeout in seconds to wait for a command completion on a device. Acceptable timeout values are from 5 to 30 seconds. Defaults to 30 seconds.", + "type": "integer" + }, "request": { "description": "The payload for the device command." }, @@ -391,12 +425,10 @@ "type": "string" }, "capabilityModel": { - "description": "The capability model utilized by this device template.", - "type": "object" + "description": "The capability model utilized by this device template." }, "solutionModel": { - "description": "The solution model utilized by this device template.", - "type": "object" + "description": "The solution model utilized by this device template." } }, "required": [ @@ -933,7 +965,7 @@ } }, "put": { - "operationId": "ApiTokens_Set", + "operationId": "ApiTokens_Create", "summary": "Create a new API token in the application to use in the IoT Central public API. The token value will be returned in the response, and won't be returned again in subsequent requests.", "x-ms-examples": { "Create API token": { @@ -1041,7 +1073,7 @@ } }, "put": { - "operationId": "ContinuousDataExports_Set", + "operationId": "ContinuousDataExports_Create", "summary": "Create a new continuous data export or update an existing one by ID.", "x-ms-examples": { "Create or update export": { @@ -1075,6 +1107,39 @@ } } }, + "patch": { + "operationId": "ContinuousDataExports_Update", + "summary": "Update an existing continuous data export via PATCH.", + "x-ms-examples": { + "Update export": { + "$ref": "./examples/continuousdataexports_update.json" + } + }, + "parameters": [ + { + "in": "path", + "name": "export_id", + "description": "Unique ID for the continuous data export.", + "type": "string", + "required": true + }, + { + "in": "body", + "name": "body", + "description": "Data export patch body.", + "schema": {}, + "required": true + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/ContinuousDataExport" + } + } + } + }, "delete": { "operationId": "ContinuousDataExports_Remove", "summary": "Delete a continuous data export.", @@ -1167,11 +1232,11 @@ } }, "put": { - "operationId": "DeviceTemplates_Set", + "operationId": "DeviceTemplates_Create", "summary": "Publish a new device template or update the cloud properties and overrides of an existing device template. Default views will be automatically generated for new device templates created this way.", "x-ms-examples": { "Create a device template": { - "$ref": "./examples/devicetemplates_create.json" + "$ref": "./examples/devicetemplates_set.json" } }, "parameters": [ @@ -1316,12 +1381,12 @@ } }, "put": { - "operationId": "Devices_Set", + "operationId": "Devices_Create", "summary": "Create or update a device", "description": "Create a new device or update an existing one by device ID.", "x-ms-examples": { "Create device": { - "$ref": "./examples/devices_create.json" + "$ref": "./examples/devices_set.json" } }, "parameters": [ @@ -1347,6 +1412,36 @@ } } }, + "patch": { + "operationId": "Devices_Update", + "summary": "Update a device via patch", + "description": "Update an existing device by ID.", + "x-ms-examples": { + "Update device": { + "$ref": "./examples/devices_update.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/DeviceId" + }, + { + "in": "body", + "name": "body", + "description": "Device patch body.", + "schema": {}, + "required": true + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/Device" + } + } + } + }, "delete": { "operationId": "Devices_Remove", "summary": "Delete a device", @@ -1392,7 +1487,7 @@ } }, "put": { - "operationId": "Devices_SetAttestation", + "operationId": "Devices_CreateAttestation", "summary": "Create or update an individual device attestation", "x-ms-examples": { "Create or update device attestation - Symmetric Key": { @@ -1473,12 +1568,12 @@ } }, "put": { - "operationId": "Devices_UpdateCloudProperties", + "operationId": "Devices_SetCloudProperties", "summary": "Update device cloud properties", "description": "Update all cloud property values of a device by device ID.", "x-ms-examples": { "Update cloud properties": { - "$ref": "./examples/devices_cloudproperties_update.json" + "$ref": "./examples/devices_cloudproperties_set.json" } }, "parameters": [ @@ -1503,6 +1598,36 @@ } } } + }, + "patch": { + "operationId": "Devices_UpdateCloudProperties", + "summary": "Update device cloud properties via PATCH", + "description": "Update cloud property values of a device by device ID.", + "x-ms-examples": { + "Update cloud properties": { + "$ref": "./examples/devices_cloudproperties_update.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/DeviceId" + }, + { + "in": "body", + "name": "body", + "description": "Device properties patch.", + "schema": {}, + "required": true + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/DeviceCloudProperties" + } + } + } } }, "/devices/{device_id}/commands/{command_name}": { @@ -1692,7 +1817,7 @@ } }, "put": { - "operationId": "Devices_UpdateComponentProperties", + "operationId": "Devices_SetComponentProperties", "summary": "Update device properties for a specific component", "x-ms-examples": { "Update properties on components": { @@ -1724,6 +1849,38 @@ } } } + }, + "patch": { + "operationId": "Devices_UpdateComponentProperties", + "summary": "Update device properties for a specific component via PATCH", + "x-ms-examples": { + "Update properties on components": { + "$ref": "./examples/devices_properties_components_update.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/DeviceId" + }, + { + "$ref": "#/parameters/ComponentName" + }, + { + "in": "body", + "name": "body", + "description": "Device properties patch.", + "schema": {}, + "required": true + } + ], + "responses": { + "202": { + "description": "Success", + "schema": { + "$ref": "#/definitions/DeviceProperties" + } + } + } } }, "/devices/{device_id}/components/{component_name}/telemetry/{telemetry_name}": { @@ -2010,7 +2167,7 @@ } }, "put": { - "operationId": "Devices_UpdateModuleComponentProperties", + "operationId": "Devices_SetModuleComponentProperties", "summary": "Update module properties for a specific component", "x-ms-examples": { "Update properties of a module within a component": { @@ -2045,6 +2202,41 @@ } } } + }, + "patch": { + "operationId": "Devices_UpdateModuleComponentProperties", + "summary": "Update module properties for a specific component via PATCH", + "x-ms-examples": { + "Update properties of a module within a component": { + "$ref": "./examples/modules_properties_components_update.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/DeviceId" + }, + { + "$ref": "#/parameters/ModuleName" + }, + { + "$ref": "#/parameters/ComponentName" + }, + { + "in": "body", + "name": "body", + "description": "Module properties patch.", + "schema": {}, + "required": true + } + ], + "responses": { + "202": { + "description": "Success", + "schema": { + "$ref": "#/definitions/DeviceProperties" + } + } + } } }, "/devices/{device_id}/modules/{module_name}/components/{component_name}/telemetry/{telemetry_name}": { @@ -2109,12 +2301,12 @@ } }, "put": { - "operationId": "Devices_UpdateModuleProperties", + "operationId": "Devices_SetModuleProperties", "summary": "Update module properties", "description": "Update all property values of a module.", "x-ms-examples": { "Update properties of a module": { - "$ref": "./examples/modules_properties_update.json" + "$ref": "./examples/modules_properties_set.json" } }, "parameters": [ @@ -2142,6 +2334,39 @@ } } } + }, + "patch": { + "operationId": "Devices_UpdateModuleProperties", + "summary": "Update module properties via PATCH", + "description": "Update property values of a module.", + "x-ms-examples": { + "Update properties of a module": { + "$ref": "./examples/modules_properties_update.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/DeviceId" + }, + { + "$ref": "#/parameters/ModuleName" + }, + { + "in": "body", + "name": "body", + "description": "Module properties patch.", + "schema": {}, + "required": true + } + ], + "responses": { + "202": { + "description": "Success", + "schema": { + "$ref": "#/definitions/DeviceProperties" + } + } + } } }, "/devices/{device_id}/modules/{module_name}/telemetry/{telemetry_name}": { @@ -2200,12 +2425,12 @@ } }, "put": { - "operationId": "Devices_UpdateProperties", + "operationId": "Devices_SetProperties", "summary": "Update device properties", "description": "Update all property values of a device by device ID.", "x-ms-examples": { "Update properties": { - "$ref": "./examples/devices_properties_update.json" + "$ref": "./examples/devices_properties_set.json" } }, "parameters": [ @@ -2230,6 +2455,36 @@ } } } + }, + "patch": { + "operationId": "Devices_UpdateProperties", + "summary": "Update device properties via PATCH", + "description": "Update property values of a device by device ID.", + "x-ms-examples": { + "Update properties": { + "$ref": "./examples/devices_properties_update.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/DeviceId" + }, + { + "in": "body", + "name": "body", + "description": "Device properties patch.", + "schema": {}, + "required": true + } + ], + "responses": { + "202": { + "description": "Success", + "schema": { + "$ref": "#/definitions/DeviceProperties" + } + } + } } }, "/devices/{device_id}/telemetry/{telemetry_name}": { @@ -2307,7 +2562,7 @@ } }, "put": { - "operationId": "Jobs_Set", + "operationId": "Jobs_Create", "summary": "Execute a new job", "description": "Create and execute a new job via its job definition.", "x-ms-examples": { @@ -2541,7 +2796,7 @@ } }, "put": { - "operationId": "Users_Set", + "operationId": "Users_Create", "summary": "Create or update a user in the application", "x-ms-examples": { "Add or update a service principal user": { @@ -2578,6 +2833,42 @@ } } }, + "patch": { + "operationId": "Users_Update", + "summary": "Update a user in the application via PATCH", + "x-ms-examples": { + "Update a service principal user": { + "$ref": "./examples/users_set_serviceprincipal.json" + }, + "Update an email user": { + "$ref": "./examples/users_update.json" + } + }, + "parameters": [ + { + "in": "path", + "name": "user_id", + "description": "Unique ID of the user.", + "type": "string", + "required": true + }, + { + "in": "body", + "name": "body", + "description": "User patch body.", + "schema": {}, + "required": true + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/User" + } + } + } + }, "delete": { "operationId": "Users_Remove", "summary": "Delete a user", diff --git a/specification/iotcentral/data-plane/readme.md b/specification/iotcentral/data-plane/readme.md index 7f0d9cea25ee..dbd8bbdd0b35 100644 --- a/specification/iotcentral/data-plane/readme.md +++ b/specification/iotcentral/data-plane/readme.md @@ -9,7 +9,6 @@ To see additional help and options, run: > `autorest --help` --- - ## Configuration These are the global settings for the IoT Central API. ``` yaml