diff --git a/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/apitoken_create.json b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/apitoken_create.json new file mode 100644 index 000000000000..4e10c7faee9c --- /dev/null +++ b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/apitoken_create.json @@ -0,0 +1,39 @@ +{ + "title": "Get API tokens in your application", + "description": "Get a list of API tokens in your application.", + "parameters": { + "baseDomain": "azureiotcentral.com", + "subdomain": "appsubdomain", + "tokenId": "testtoken", + "api-version": "1.1-preview", + "body": { + "roles": [ + { + "role": "ca310b8d-2f4a-44e0-a36e-957c202cd8d4" + }, + { + "role": "c495eb57-eb18-489e-9802-62c474e5645c", + "organization": "seattle" + } + ] + } + }, + "responses": { + "200": { + "body": { + "id": "testtoken", + "roles": [ + { + "role": "ca310b8d-2f4a-44e0-a36e-957c202cd8d4" + }, + { + "role": "c495eb57-eb18-489e-9802-62c474e5645c", + "organization": "seattle" + } + ], + "expiry": "2020-10-18T18:30:40.227Z", + "token": "SharedAccessSignature sr=..." + } + } + } +} diff --git a/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/apitoken_delete.json b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/apitoken_delete.json new file mode 100644 index 000000000000..75d3e6ec0170 --- /dev/null +++ b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/apitoken_delete.json @@ -0,0 +1,13 @@ +{ + "title": "Delete API token", + "description": "Delete an API token using its name.", + "parameters": { + "baseDomain": "azureiotcentral.com", + "subdomain": "appsubdomain", + "tokenId": "testtoken", + "api-version": "1.1-preview" + }, + "responses": { + "204": {} + } +} diff --git a/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/apitoken_get.json b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/apitoken_get.json new file mode 100644 index 000000000000..988ad63316c8 --- /dev/null +++ b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/apitoken_get.json @@ -0,0 +1,24 @@ +{ + "title": "Get an API token in your application", + "description": "Get an API token by Id in your application.", + "parameters": { + "baseDomain": "azureiotcentral.com", + "subdomain": "appsubdomain", + "tokenId": "testtoken", + "api-version": "1.1-preview" + }, + "responses": { + "200": { + "body": { + "id": "testtoken", + "roles": [ + { + "role": "c495eb57-eb18-489e-9802-62c474e5645c", + "organization": "seattle" + } + ], + "expiry": "2020-10-18T18:30:40.227Z" + } + } + } +} diff --git a/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/apitoken_list.json b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/apitoken_list.json new file mode 100644 index 000000000000..8deb73a0d961 --- /dev/null +++ b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/apitoken_list.json @@ -0,0 +1,30 @@ +{ + "title": "List API tokens in your application", + "description": "Get a list of API tokens in your application.", + "parameters": { + "baseDomain": "azureiotcentral.com", + "subdomain": "appsubdomain", + "api-version": "1.1-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "testtoken", + "roles": [ + { + "role": "ca310b8d-2f4a-44e0-a36e-957c202cd8d4" + }, + { + "role": "c495eb57-eb18-489e-9802-62c474e5645c", + "organization": "seattle" + } + ], + "expiry": "2020-10-18T18:30:40.227Z" + } + ] + } + } + } +} diff --git a/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/devicecredentials_get.json b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/devicecredentials_get.json new file mode 100644 index 000000000000..fcd7c84e3c17 --- /dev/null +++ b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/devicecredentials_get.json @@ -0,0 +1,21 @@ +{ + "title": "Get device credentials", + "description": "Get the device credentials of a created device. Returns the app's scope Id and device SAS key", + "parameters": { + "baseDomain": "azureiotcentral.com", + "subdomain": "appsubdomain", + "deviceId": "Checkout4", + "api-version": "1.1-preview" + }, + "responses": { + "200": { + "body": { + "idScope": "", + "symmetricKey": { + "primaryKey": "", + "secondaryKey": "" + } + } + } + } +} diff --git a/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/devicegroups_list.json b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/devicegroups_list.json new file mode 100644 index 000000000000..853e8c9eead5 --- /dev/null +++ b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/devicegroups_list.json @@ -0,0 +1,39 @@ +{ + "title": "DeviceGroup List", + "description": "List all device groups in your application.", + "parameters": { + "baseDomain": "azureiotcentral.com", + "subdomain": "appsubdomain", + "api-version": "1.1-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "475cad48-b7ff-4a09-b51e-1a9021385453", + "displayName": "DeviceGroupEntry1", + "organizations": [ + "seattle" + ] + }, + { + "id": "c2d5ae1d-2cb7-4f58-bf44-5e816aba0a0e", + "displayName": "DeviceGroupEntry2", + "organizations": [ + "redmond" + ] + }, + { + "id": "241ad72b-32aa-4216-aabe-91b240582c8d", + "displayName": "DeviceGroupEntry3" + }, + { + "id": "241ad72b-32aa-4216-aabe-91b240582c8d", + "displayName": "DeviceGroupEntry4" + } + ] + } + } + } +} diff --git a/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/devices_attestations_delete.json b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/devices_attestations_delete.json new file mode 100644 index 000000000000..ea36a6a06a26 --- /dev/null +++ b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/devices_attestations_delete.json @@ -0,0 +1,13 @@ +{ + "title": "Delete device attestation", + "description": "Deletes the attestation for a device.", + "parameters": { + "baseDomain": "azureiotcentral.com", + "subdomain": "appsubdomain", + "deviceId": "Checkout4", + "api-version": "1.1-preview" + }, + "responses": { + "204": {} + } +} diff --git a/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/devices_attestations_get.json b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/devices_attestations_get.json new file mode 100644 index 000000000000..4db452f6ff23 --- /dev/null +++ b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/devices_attestations_get.json @@ -0,0 +1,26 @@ +{ + "title": "Get device attestation", + "description": "Gets the attestation for a device.", + "parameters": { + "baseDomain": "azureiotcentral.com", + "subdomain": "appsubdomain", + "deviceId": "CheckoutThermostat", + "api-version": "1.1-preview" + }, + "responses": { + "200": { + "body": { + "type": "x509", + "x509": { + "clientCertificates": { + "primary": { + "info": { + "sha1Thumbprint": "" + } + } + } + } + } + } + } +} diff --git a/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/devices_attestations_set_symmetricKey.json b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/devices_attestations_set_symmetricKey.json new file mode 100644 index 000000000000..ff6ae940aacc --- /dev/null +++ b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/devices_attestations_set_symmetricKey.json @@ -0,0 +1,28 @@ +{ + "title": "Set device attestation - Symmetric key", + "description": "Creates or updates the symmetric key attestation for a device.", + "parameters": { + "baseDomain": "azureiotcentral.com", + "subdomain": "appsubdomain", + "deviceId": "CheckoutThermostat", + "api-version": "1.1-preview", + "body": { + "type": "symmetricKey", + "symmetricKey": { + "primaryKey": "", + "secondaryKey": "" + } + } + }, + "responses": { + "200": { + "body": { + "type": "symmetricKey", + "symmetricKey": { + "primaryKey": "", + "secondaryKey": "" + } + } + } + } +} diff --git a/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/devices_attestations_set_tpm.json b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/devices_attestations_set_tpm.json new file mode 100644 index 000000000000..3948ce8a303a --- /dev/null +++ b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/devices_attestations_set_tpm.json @@ -0,0 +1,26 @@ +{ + "title": "Set device attestation - TPM", + "description": "Creates or updates the TPM attestation for a device.", + "parameters": { + "baseDomain": "azureiotcentral.com", + "subdomain": "appsubdomain", + "deviceId": "CheckoutThermostat", + "api-version": "1.1-preview", + "body": { + "type": "tpm", + "tpm": { + "endorsementKey": "" + } + } + }, + "responses": { + "200": { + "body": { + "type": "tpm", + "tpm": { + "endorsementKey": "" + } + } + } + } +} diff --git a/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/devices_attestations_set_x509.json b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/devices_attestations_set_x509.json new file mode 100644 index 000000000000..20199ddb986c --- /dev/null +++ b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/devices_attestations_set_x509.json @@ -0,0 +1,36 @@ +{ + "title": "Set device attestation - X509", + "description": "Creates or updates the X509 attestation for a device.", + "parameters": { + "baseDomain": "azureiotcentral.com", + "subdomain": "appsubdomain", + "deviceId": "CheckoutThermostat", + "api-version": "1.1-preview", + "body": { + "type": "x509", + "x509": { + "clientCertificates": { + "primary": { + "certificate": "" + } + } + } + } + }, + "responses": { + "200": { + "body": { + "type": "x509", + "x509": { + "clientCertificates": { + "primary": { + "info": { + "sha1Thumbprint": "" + } + } + } + } + } + } + } +} diff --git a/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/devices_commands_send.json b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/devices_commands_send.json new file mode 100644 index 000000000000..bc3e1e1df11c --- /dev/null +++ b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/devices_commands_send.json @@ -0,0 +1,22 @@ +{ + "title": "Send command", + "description": "Send a command to a device.", + "parameters": { + "baseDomain": "azureiotcentral.com", + "subdomain": "appsubdomain", + "deviceId": "mx1", + "componentName": "Thermostat_1o", + "commandName": "CoolDown", + "api-version": "1.1-preview", + "body": { + "request": { + "tempVal": 30 + } + } + }, + "responses": { + "201": { + "body": {} + } + } +} diff --git a/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/devices_commandshistory_get.json b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/devices_commandshistory_get.json new file mode 100644 index 000000000000..7bafbb747fff --- /dev/null +++ b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/devices_commandshistory_get.json @@ -0,0 +1,26 @@ +{ + "title": "Get command history", + "description": "Get the most recent invocation of a command of a device.", + "parameters": { + "baseDomain": "azureiotcentral.com", + "subdomain": "appsubdomain", + "deviceId": "mx1", + "componentName": "Thermostat_1o", + "commandName": "CoolDown", + "api-version": "1.1-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "request": 20, + "id": "4e17dd2e-7bf2-458d-8466-19bc6fc9b642", + "response": 58.795679629034694, + "responseCode": 200 + } + ] + } + } + } +} diff --git a/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/devices_components_get.json b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/devices_components_get.json new file mode 100644 index 000000000000..39a0fd177b73 --- /dev/null +++ b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/devices_components_get.json @@ -0,0 +1,32 @@ +{ + "title": "Get components from a device", + "description": "Get the list of components in a device.", + "parameters": { + "baseDomain": "azureiotcentral.com", + "subdomain": "appsubdomain", + "deviceId": "device1", + "api-version": "1.1-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "@id": "", + "@type": [ + "Component" + ], + "name": "LocationTracking" + }, + { + "@id": "", + "@type": [ + "Component" + ], + "name": "EnvironmentSensing" + } + ] + } + } + } +} diff --git a/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/devices_create.json b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/devices_create.json new file mode 100644 index 000000000000..2995d26608f3 --- /dev/null +++ b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/devices_create.json @@ -0,0 +1,35 @@ +{ + "title": "Create a device", + "description": "Create a device with an Id.", + "parameters": { + "baseDomain": "azureiotcentral.com", + "subdomain": "appsubdomain", + "deviceId": "ccc", + "api-version": "1.1-preview", + "body": { + "displayName": "CheckoutThermostatccc", + "template": "dtmi:contoso:testDeviceTemplate;1", + "simulated": true, + "enabled": true, + "organizations": [ + "seattle" + ] + } + }, + "responses": { + "200": { + "body": { + "id": "ccc", + "etag": "eyJoZWFkZXIiOiJcIjE1MDE2ZDFiLTAwMDAtMGQwMC0wMDAwLTVkYWNkNDIxMDAwMFwiIiwiZGF0YSI6IlwiMTUwMTZhMWItMDAwMC0wZDAwLTAwMDAtNWRhY2Q0MjEwMDAwXCIifQ", + "displayName": "CheckoutThermostatccc", + "template": "dtmi:contoso:testDeviceTemplate;1", + "simulated": true, + "provisioned": false, + "enabled": true, + "organizations": [ + "seattle" + ] + } + } + } +} diff --git a/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/devices_delete.json b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/devices_delete.json new file mode 100644 index 000000000000..a3590d5448fa --- /dev/null +++ b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/devices_delete.json @@ -0,0 +1,13 @@ +{ + "title": "Delete device", + "description": "Delete a device by Id.", + "parameters": { + "baseDomain": "azureiotcentral.com", + "subdomain": "appsubdomain", + "deviceId": "ccc", + "api-version": "1.1-preview" + }, + "responses": { + "204": {} + } +} diff --git a/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/devices_get.json b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/devices_get.json new file mode 100644 index 000000000000..0cb499fbd31c --- /dev/null +++ b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/devices_get.json @@ -0,0 +1,26 @@ +{ + "title": "Get a device by Id", + "description": "Get a device by Id", + "parameters": { + "baseDomain": "azureiotcentral.com", + "subdomain": "appsubdomain", + "deviceId": "CheckoutThermostat", + "api-version": "1.1-preview" + }, + "responses": { + "200": { + "body": { + "id": "CheckoutThermostat", + "etag": "eyJoZWFkZXIiOiJcIjAyMDA4YzMyLTAwMDAtMGQwMC0wMDAwLTVkOTY4YjdhMDAwMFwiIn0", + "displayName": "CheckoutThermostat", + "template": "dtmi:contoso:testDeviceTemplate;1", + "simulated": true, + "provisioned": true, + "enabled": true, + "organizations": [ + "seattle" + ] + } + } + } +} diff --git a/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/devices_list.json b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/devices_list.json new file mode 100644 index 000000000000..c1eef72021b7 --- /dev/null +++ b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/devices_list.json @@ -0,0 +1,59 @@ +{ + "title": "List devices", + "description": "List all devices in your application.", + "parameters": { + "baseDomain": "azureiotcentral.com", + "subdomain": "appsubdomain", + "api-version": "1.1-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "CheckoutThermostat", + "etag": "eyJoZWFkZXIiOiJcIjAyMDA4YzMyLTAwMDAtMGQwMC0wMDAwLTVkOTY4YjdhMDAwMFwiIn0", + "displayName": "CheckoutThermostat", + "template": "dtmi:contoso:testDeviceTemplate;1", + "simulated": true, + "provisioned": true, + "enabled": true, + "organizations": [ + "seattle" + ] + }, + { + "id": "Checkout1", + "etag": "eyJoZWFkZXIiOiJcIjAyMDA4ZDMyLTAwMDAtMGQwMC0wMDAwLTVkOTY4Yjg3MDAwMFwiIn0", + "displayName": "Checkout1", + "template": "dtmi:contoso:testDeviceTemplate;1", + "simulated": true, + "provisioned": true, + "enabled": true, + "organizations": [ + "seattle" + ] + }, + { + "id": "Checkout2", + "etag": "eyJoZWFkZXIiOiJcIjAyMDA5MDMyLTAwMDAtMGQwMC0wMDAwLTVkOTY4Yjg3MDAwMFwiIn0", + "displayName": "Checkout2", + "template": "dtmi:contoso:testDeviceTemplate;1", + "simulated": true, + "provisioned": true, + "enabled": true + }, + { + "id": "Checkout3", + "etag": "eyJoZWFkZXIiOiJcIjAyMDA4ZTMyLTAwMDAtMGQwMC0wMDAwLTVkOTY4Yjg3MDAwMFwiIn0", + "displayName": "Checkout3", + "template": "dtmi:contoso:testDeviceTemplate;1", + "simulated": true, + "provisioned": true, + "enabled": true + } + ] + } + } + } +} diff --git a/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/devices_modules_components_get.json b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/devices_modules_components_get.json new file mode 100644 index 000000000000..6203fa4805df --- /dev/null +++ b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/devices_modules_components_get.json @@ -0,0 +1,27 @@ +{ + "title": "Get components from a module in an Edge device", + "description": "Get a list of components from a module in an IoT Edge device.", + "parameters": { + "baseDomain": "azureiotcentral.com", + "subdomain": "appsubdomain", + "deviceId": "edgedevice1", + "moduleName": "edgemodule", + "api-version": "1.1-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "@id": "", + "@type": [ + "Component" + ], + "name": "interfaceA", + "displayName": "InterfaceA" + } + ] + } + } + } +} diff --git a/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/devices_modules_get.json b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/devices_modules_get.json new file mode 100644 index 000000000000..61c9582f10ec --- /dev/null +++ b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/devices_modules_get.json @@ -0,0 +1,34 @@ +{ + "title": "Get modules from an Edge device", + "description": "Get the list of modules in an IoT Edge device.", + "parameters": { + "baseDomain": "azureiotcentral.com", + "subdomain": "appsubdomain", + "deviceId": "edgedevice1", + "api-version": "1.1-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "@id": "", + "@type": [ + "Relationship", + "SemanticType/EdgeModule" + ], + "name": "Environment" + }, + { + "@id": "", + "@type": [ + "Relationship", + "SemanticType/EdgeModule" + ], + "name": "Camera" + } + ] + } + } + } +} diff --git a/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/devices_properties_components_get.json b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/devices_properties_components_get.json new file mode 100644 index 000000000000..6b88a7940687 --- /dev/null +++ b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/devices_properties_components_get.json @@ -0,0 +1,47 @@ +{ + "title": "Get device properties in component", + "description": "Get the read-write property values within a component of a device.", + "parameters": { + "baseDomain": "azureiotcentral.com", + "subdomain": "appsubdomain", + "deviceId": "mx1", + "componentName": "settings", + "api-version": "1.1-preview" + }, + "responses": { + "200": { + "body": { + "fanSpeed": 35, + "voltage": 5, + "current": 2, + "irSwitch": true, + "$metadata": { + "fanSpeed": { + "desiredValue": 35, + "ackCode": 200, + "ackVersion": 2, + "ackDescription": "Processed" + }, + "voltage": { + "desiredValue": 5, + "ackCode": 200, + "ackVersion": 2, + "ackDescription": "Processed" + }, + "current": { + "desiredValue": 2, + "ackCode": 200, + "ackVersion": 2, + "ackDescription": "Processed" + }, + "irSwitch": { + "desiredValue": true, + "ackCode": 200, + "ackVersion": 2, + "ackDescription": "Processed" + } + } + } + } + } +} diff --git a/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/devices_properties_components_set.json b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/devices_properties_components_set.json new file mode 100644 index 000000000000..131d3cb77b21 --- /dev/null +++ b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/devices_properties_components_set.json @@ -0,0 +1,37 @@ +{ + "title": "Set device properties in component", + "description": "Set the read-write property values within a component of a device.", + "parameters": { + "baseDomain": "azureiotcentral.com", + "subdomain": "appsubdomain", + "deviceId": "mx1", + "componentName": "settings", + "api-version": "1.1-preview", + "body": { + "fanSpeed": 35, + "voltage": 5, + "current": 2, + "irSwitch": true + } + }, + "responses": { + "202": { + "body": { + "$metadata": { + "fanSpeed": { + "desiredValue": 35 + }, + "voltage": { + "desiredValue": 5 + }, + "current": { + "desiredValue": 2 + }, + "irSwitch": { + "desiredValue": true + } + } + } + } + } +} diff --git a/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/devices_properties_get.json b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/devices_properties_get.json new file mode 100644 index 000000000000..d32bb46a4c9a --- /dev/null +++ b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/devices_properties_get.json @@ -0,0 +1,42 @@ +{ + "title": "Get device properties", + "description": "Get the current values of all device properties. Properties that have never been set by the device or by a user or API request will not be returned.", + "parameters": { + "baseDomain": "azureiotcentral.com", + "subdomain": "appsubdomain", + "deviceId": "mx1", + "api-version": "1.1-preview" + }, + "responses": { + "200": { + "body": { + "deviceinfo": { + "manufacturer": "manufacturer", + "$metadata": { + "manufacturer": { + "lastUpdateTime": "2020-07-21T19:06:50.9718608Z" + }, + "model": { + "lastUpdateTime": "2020-07-21T19:06:50.9718608Z" + }, + "swVersion": { + "lastUpdateTime": "2020-07-21T19:06:50.9718608Z" + } + }, + "model": "model", + "swVersion": "swVersion" + }, + "settings": { + "fanSpeed": 12.5, + "$metadata": { + "fanSpeed": { + "desiredValue": 30, + "desiredVersion": 2, + "lastUpdateTime": "2020-07-21T19:06:50.9718608Z" + } + } + } + } + } + } +} diff --git a/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/devices_properties_update.json b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/devices_properties_update.json new file mode 100644 index 000000000000..001860e443ee --- /dev/null +++ b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/devices_properties_update.json @@ -0,0 +1,32 @@ +{ + "title": "Update device properties", + "description": "Update the values of read-write properties of a device", + "parameters": { + "baseDomain": "azureiotcentral.com", + "subdomain": "appsubdomain", + "deviceId": "mx1", + "api-version": "1.1-preview", + "body": { + "settings": { + "voltage": 25, + "current": 7 + } + } + }, + "responses": { + "202": { + "body": { + "settings": { + "$metadata": { + "voltage": { + "desiredValue": 25 + }, + "current": { + "desiredValue": 7 + } + } + } + } + } + } +} diff --git a/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/devices_telemetry_get.json b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/devices_telemetry_get.json new file mode 100644 index 000000000000..88c6de2dec67 --- /dev/null +++ b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/devices_telemetry_get.json @@ -0,0 +1,20 @@ +{ + "title": "Get telemetry", + "description": "Get the last known value of a telemetry stream of a device.", + "parameters": { + "baseDomain": "azureiotcentral.com", + "subdomain": "appsubdomain", + "deviceId": "mx1", + "componentName": "sensors", + "telemetryName": "temperature", + "api-version": "1.1-preview" + }, + "responses": { + "200": { + "body": { + "value": 32, + "timestamp": "2021-05-04T21:59:39.153Z" + } + } + } +} diff --git a/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/devicetemplates_create.json b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/devicetemplates_create.json new file mode 100644 index 000000000000..1b78f2bda9ed --- /dev/null +++ b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/devicetemplates_create.json @@ -0,0 +1,352 @@ +{ + "title": "Create a device template", + "description": "Creates and publishes a device template. In the body, specify the full device template object. Default views will be automatically generated.", + "parameters": { + "baseDomain": "azureiotcentral.com", + "subdomain": "appsubdomain", + "deviceTemplateId": "dtmi:contoso:testDeviceTemplate;1", + "api-version": "1.1-preview", + "body": { + "@type": [ + "ModelDefinition", + "DeviceModel", + "EdgeModel" + ], + "displayName": "Test Definition", + "capabilityModel": { + "@id": "dtmi:contoso:testCapabilityModel;1", + "@type": "Interface", + "displayName": "Test Capability Model", + "extends": [ + { + "@id": "dtmi:contoso:testInterface;1", + "@type": "Interface", + "displayName": "Test Interface", + "contents": [ + { + "@type": "Telemetry", + "displayName": "Test Telemetry", + "name": "testTelemetry", + "schema": "double" + }, + { + "@type": [ + "Telemetry", + "Event", + "EventValue" + ], + "displayName": "Test Event", + "name": "testEvent", + "schema": "integer", + "severity": "warning" + }, + { + "@type": [ + "Property", + "Initialized" + ], + "displayName": "Test Property", + "name": "testProperty", + "schema": "string", + "writable": true, + "initialValue": "initialValue1" + }, + { + "@type": "Property", + "displayName": "Test Read-Only Property", + "name": "testReadOnly", + "schema": "string" + }, + { + "@type": "Property", + "displayName": "Test Complex Property", + "name": "testComplex", + "schema": { + "@id": "dtmi:contoso:testComplex;1", + "@type": "Object", + "displayName": "Object", + "fields": [ + { + "displayName": "First", + "name": "first", + "schema": "string" + }, + { + "displayName": "Second", + "name": "second", + "schema": "string" + } + ] + }, + "writable": true + }, + { + "@type": "Command", + "commandType": "synchronous", + "displayName": "Test Command", + "name": "testCommand", + "request": { + "displayName": "Test Request", + "name": "testRequest", + "schema": "double" + }, + "response": { + "displayName": "Test Response", + "name": "testResponse", + "schema": "geopoint" + } + }, + { + "@type": "Property", + "displayName": "Test Enum", + "name": "testEnum", + "schema": { + "@id": "dtmi:contoso:testEnum;1", + "@type": "Enum", + "displayName": "Enum", + "enumValues": [ + { + "displayName": "First", + "enumValue": 1, + "name": "first" + }, + { + "displayName": "Second", + "enumValue": 2, + "name": "second" + } + ], + "valueSchema": "integer" + }, + "writable": true + } + ] + } + ], + "contents": [ + { + "@type": [ + "Relationship", + "EdgeModule" + ], + "displayName": "Test Module", + "maxMultiplicity": 1, + "name": "testModule", + "target": [ + { + "@id": "dtmi:contoso:testModuleCapabilityModel;1", + "@type": "Interface", + "displayName": "Test Module Capability Model", + "extends": [ + { + "@id": "dtmi:contoso:testModuleInterface;1", + "@type": "Interface", + "contents": [ + { + "@type": "Telemetry", + "displayName": "Test Module Telemetry", + "name": "testModuleTelemetry", + "schema": "double" + }, + { + "@type": "Property", + "displayName": "Test Module Property", + "name": "testModuleProperty", + "schema": "string", + "writable": true + } + ], + "displayName": "Test Module Interface" + } + ] + } + ] + }, + { + "@type": [ + "Cloud", + "Property" + ], + "displayName": "Test Cloud Property", + "name": "testCloudProperty", + "schema": "dateTime" + } + ] + } + } + }, + "responses": { + "200": { + "body": { + "@id": "dtmi:contoso:testDeviceTemplate;1", + "@type": [ + "ModelDefinition", + "DeviceModel", + "EdgeModel" + ], + "displayName": "Test Definition", + "etag": "\"~jbzfGhYctc9wtzNZXVmVua5JjTHO/FfjMUJvk9hqkRY=\"", + "capabilityModel": { + "@id": "dtmi:contoso:testCapabilityModel;1", + "@type": "Interface", + "displayName": "Test Capability Model", + "extends": [ + { + "@id": "dtmi:contoso:testInterface;1", + "@type": "Interface", + "displayName": "Test Interface", + "contents": [ + { + "@type": "Telemetry", + "displayName": "Test Telemetry", + "name": "testTelemetry", + "schema": "double" + }, + { + "@type": [ + "Telemetry", + "Event", + "EventValue" + ], + "displayName": "Test Event", + "name": "testEvent", + "schema": "integer", + "severity": "warning" + }, + { + "@type": [ + "Property", + "Initialized" + ], + "displayName": "Test Property", + "name": "testProperty", + "schema": "string", + "writable": true, + "initialValue": "initialValue1" + }, + { + "@type": "Property", + "displayName": "Test Read-Only Property", + "name": "testReadOnly", + "schema": "string" + }, + { + "@type": "Property", + "displayName": "Test Complex Property", + "name": "testComplex", + "schema": { + "@id": "dtmi:contoso:testComplex;1", + "@type": "Object", + "displayName": "Object", + "fields": [ + { + "displayName": "First", + "name": "first", + "schema": "string" + }, + { + "displayName": "Second", + "name": "second", + "schema": "string" + } + ] + }, + "writable": true + }, + { + "@type": "Command", + "commandType": "synchronous", + "displayName": "Test Command", + "name": "testCommand", + "request": { + "displayName": "Test Request", + "name": "testRequest", + "schema": "double" + }, + "response": { + "displayName": "Test Response", + "name": "testResponse", + "schema": "geopoint" + } + }, + { + "@type": "Property", + "displayName": "Test Enum", + "name": "testEnum", + "schema": { + "@id": "dtmi:contoso:testEnum;1", + "@type": "Enum", + "displayName": "Enum", + "enumValues": [ + { + "displayName": "First", + "enumValue": 1, + "name": "first" + }, + { + "displayName": "Second", + "enumValue": 2, + "name": "second" + } + ], + "valueSchema": "integer" + }, + "writable": true + } + ] + } + ], + "contents": [ + { + "@type": [ + "Relationship", + "EdgeModule" + ], + "displayName": "Test Module", + "maxMultiplicity": 1, + "name": "testModule", + "target": [ + { + "@id": "dtmi:contoso:testModuleCapabilityModel;1", + "@type": "Interface", + "displayName": "Test Module Capability Model", + "extends": [ + { + "@id": "dtmi:contoso:testModuleInterface;1", + "@type": "Interface", + "contents": [ + { + "@type": "Telemetry", + "displayName": "Test Module Telemetry", + "name": "testModuleTelemetry", + "schema": "double" + }, + { + "@type": "Property", + "displayName": "Test Module Property", + "name": "testModuleProperty", + "schema": "string", + "writable": true + } + ], + "displayName": "Test Module Interface" + } + ] + } + ] + }, + { + "@type": [ + "Cloud", + "Property" + ], + "displayName": "Test Cloud Property", + "name": "testCloudProperty", + "schema": "dateTime" + } + ] + } + } + } + } +} diff --git a/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/devicetemplates_delete.json b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/devicetemplates_delete.json new file mode 100644 index 000000000000..3291259c4508 --- /dev/null +++ b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/devicetemplates_delete.json @@ -0,0 +1,13 @@ +{ + "title": "Delete a device template by Id", + "description": "Delete a published device template that has no devices currently associated to it. This operation does not operate on device templates in draft state.", + "parameters": { + "baseDomain": "azureiotcentral.com", + "subdomain": "appsubdomain", + "deviceTemplateId": "dtmi:contoso:testDeviceTemplate;1", + "api-version": "1.1-preview" + }, + "responses": { + "204": {} + } +} diff --git a/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/devicetemplates_get.json b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/devicetemplates_get.json new file mode 100644 index 000000000000..0f9bba02f678 --- /dev/null +++ b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/devicetemplates_get.json @@ -0,0 +1,184 @@ +{ + "title": "Get a device template by Id", + "description": "Get a published device template by Id. This operation does not return device templates in draft state.", + "parameters": { + "baseDomain": "azureiotcentral.com", + "subdomain": "appsubdomain", + "deviceTemplateId": "dtmi:contoso:testDeviceTemplate;1", + "api-version": "1.1-preview" + }, + "responses": { + "200": { + "body": { + "@id": "dtmi:contoso:testDeviceTemplate;1", + "@type": [ + "ModelDefinition", + "DeviceModel", + "EdgeModel" + ], + "displayName": "Test Definition", + "etag": "\"~jbzfGhYctc9wtzNZXVmVua5JjTHO/FfjMUJvk9hqkRY=\"", + "capabilityModel": { + "@id": "dtmi:contoso:testCapabilityModel;1", + "@type": "Interface", + "displayName": "Test Capability Model", + "extends": [ + { + "@id": "dtmi:contoso:testInterface;1", + "@type": "Interface", + "displayName": "Test Interface", + "contents": [ + { + "@type": "Telemetry", + "displayName": "Test Telemetry", + "name": "testTelemetry", + "schema": "double" + }, + { + "@type": [ + "Telemetry", + "Event", + "EventValue" + ], + "displayName": "Test Event", + "name": "testEvent", + "schema": "integer", + "severity": "warning" + }, + { + "@type": [ + "Property", + "Initialized" + ], + "displayName": "Test Property", + "name": "testProperty", + "schema": "string", + "writable": true, + "initialValue": "initialValue1" + }, + { + "@type": "Property", + "displayName": "Test Read-Only Property", + "name": "testReadOnly", + "schema": "string" + }, + { + "@type": "Property", + "displayName": "Test Complex Property", + "name": "testComplex", + "schema": { + "@id": "dtmi:contoso:testComplex;1", + "@type": "Object", + "displayName": "Object", + "fields": [ + { + "displayName": "First", + "name": "first", + "schema": "string" + }, + { + "displayName": "Second", + "name": "second", + "schema": "string" + } + ] + }, + "writable": true + }, + { + "@type": "Command", + "commandType": "synchronous", + "displayName": "Test Command", + "name": "testCommand", + "request": { + "displayName": "Test Request", + "name": "testRequest", + "schema": "double" + }, + "response": { + "displayName": "Test Response", + "name": "testResponse", + "schema": "geopoint" + } + }, + { + "@type": "Property", + "displayName": "Test Enum", + "name": "testEnum", + "schema": { + "@id": "dtmi:contoso:testEnum;1", + "@type": "Enum", + "displayName": "Enum", + "enumValues": [ + { + "displayName": "First", + "enumValue": 1, + "name": "first" + }, + { + "displayName": "Second", + "enumValue": 2, + "name": "second" + } + ], + "valueSchema": "integer" + }, + "writable": true + } + ] + } + ], + "contents": [ + { + "@type": [ + "Relationship", + "EdgeModule" + ], + "displayName": "Test Module", + "maxMultiplicity": 1, + "name": "testModule", + "target": [ + { + "@id": "dtmi:contoso:testModuleCapabilityModel;1", + "@type": "Interface", + "displayName": "Test Module Capability Model", + "extends": [ + { + "@id": "dtmi:contoso:testModuleInterface;1", + "@type": "Interface", + "contents": [ + { + "@type": "Telemetry", + "displayName": "Test Module Telemetry", + "name": "testModuleTelemetry", + "schema": "double" + }, + { + "@type": "Property", + "displayName": "Test Module Property", + "name": "testModuleProperty", + "schema": "string", + "writable": true + } + ], + "displayName": "Test Module Interface" + } + ] + } + ] + }, + { + "@type": [ + "Cloud", + "Property" + ], + "displayName": "Test Cloud Property", + "name": "testCloudProperty", + "schema": "dateTime" + } + ] + } + } + } + } +} diff --git a/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/devicetemplates_list.json b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/devicetemplates_list.json new file mode 100644 index 000000000000..869589d04a80 --- /dev/null +++ b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/devicetemplates_list.json @@ -0,0 +1,187 @@ +{ + "title": "List device templates", + "description": "List device templates that are currently published in the application. This operation does not return device templates in draft state.", + "parameters": { + "baseDomain": "azureiotcentral.com", + "subdomain": "appsubdomain", + "api-version": "1.1-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "@id": "dtmi:contoso:testDeviceTemplate;1", + "@type": [ + "ModelDefinition", + "DeviceModel", + "EdgeModel" + ], + "displayName": "Test Definition", + "etag": "\"~jbzfGhYctc9wtzNZXVmVua5JjTHO/FfjMUJvk9hqkRY=\"", + "capabilityModel": { + "@id": "dtmi:contoso:testCapabilityModel;1", + "@type": "Interface", + "displayName": "Test Capability Model", + "extends": [ + { + "@id": "dtmi:contoso:testInterface;1", + "@type": "Interface", + "displayName": "Test Interface", + "contents": [ + { + "@type": "Telemetry", + "displayName": "Test Telemetry", + "name": "testTelemetry", + "schema": "double" + }, + { + "@type": [ + "Telemetry", + "Event", + "EventValue" + ], + "displayName": "Test Event", + "name": "testEvent", + "schema": "integer", + "severity": "warning" + }, + { + "@type": [ + "Property", + "Initialized" + ], + "displayName": "Test Property", + "name": "testProperty", + "schema": "string", + "writable": true, + "initialValue": "initialValue1" + }, + { + "@type": "Property", + "displayName": "Test Read-Only Property", + "name": "testReadOnly", + "schema": "string" + }, + { + "@type": "Property", + "displayName": "Test Complex Property", + "name": "testComplex", + "schema": { + "@id": "dtmi:contoso:testComplex;1", + "@type": "Object", + "displayName": "Object", + "fields": [ + { + "displayName": "First", + "name": "first", + "schema": "string" + }, + { + "displayName": "Second", + "name": "second", + "schema": "string" + } + ] + }, + "writable": true + }, + { + "@type": "Command", + "commandType": "synchronous", + "displayName": "Test Command", + "name": "testCommand", + "request": { + "displayName": "Test Request", + "name": "testRequest", + "schema": "double" + }, + "response": { + "displayName": "Test Response", + "name": "testResponse", + "schema": "geopoint" + } + }, + { + "@type": "Property", + "displayName": "Test Enum", + "name": "testEnum", + "schema": { + "@id": "dtmi:contoso:testEnum;1", + "@type": "Enum", + "displayName": "Enum", + "enumValues": [ + { + "displayName": "First", + "enumValue": 1, + "name": "first" + }, + { + "displayName": "Second", + "enumValue": 2, + "name": "second" + } + ], + "valueSchema": "integer" + }, + "writable": true + } + ] + } + ], + "contents": [ + { + "@type": [ + "Relationship", + "EdgeModule" + ], + "displayName": "Test Module", + "maxMultiplicity": 1, + "name": "testModule", + "target": [ + { + "@id": "dtmi:contoso:testModuleCapabilityModel;1", + "@type": "Interface", + "displayName": "Test Module Capability Model", + "extends": [ + { + "@id": "dtmi:contoso:testModuleInterface;1", + "@type": "Interface", + "contents": [ + { + "@type": "Telemetry", + "displayName": "Test Module Telemetry", + "name": "testModuleTelemetry", + "schema": "double" + }, + { + "@type": "Property", + "displayName": "Test Module Property", + "name": "testModuleProperty", + "schema": "string", + "writable": true + } + ], + "displayName": "Test Module Interface" + } + ] + } + ] + }, + { + "@type": [ + "Cloud", + "Property" + ], + "displayName": "Test Cloud Property", + "name": "testCloudProperty", + "schema": "dateTime" + } + ] + } + } + ] + } + } + } +} diff --git a/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/fileUpload_delete.json b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/fileUpload_delete.json new file mode 100644 index 000000000000..6904577f5cad --- /dev/null +++ b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/fileUpload_delete.json @@ -0,0 +1,12 @@ +{ + "title": "Delete the configuration of File upload", + "description": "Delete the file upload storage configuration", + "parameters": { + "baseDomain": "azureiotcentral.com", + "subdomain": "appsubdomain", + "api-version": "1.1-preview" + }, + "responses": { + "204": {} + } +} diff --git a/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/fileUpload_get.json b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/fileUpload_get.json new file mode 100644 index 000000000000..8c92cf9cead7 --- /dev/null +++ b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/fileUpload_get.json @@ -0,0 +1,20 @@ +{ + "title": "Get the file upload storage account configuration", + "description": "Get the file upload storage account configuration", + "parameters": { + "baseDomain": "azureiotcentral.com", + "subdomain": "appsubdomain", + "api-version": "1.1-preview" + }, + "responses": { + "200": { + "body": { + "account": "contoso-account", + "connectionString": "DefaultEndpointsProtocol=https;AccountName=MyAccountName;AccountKey=*****;EndpointSuffix=core.windows.net", + "container": "container", + "sasTtl": "PT2H", + "state": "succeeded" + } + } + } +} diff --git a/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/fileUpload_update.json b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/fileUpload_update.json new file mode 100644 index 000000000000..769cacb18397 --- /dev/null +++ b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/fileUpload_update.json @@ -0,0 +1,26 @@ +{ + "title": "Update the file upload storage account configuration", + "description": "Update the file upload storage account configuration11", + "parameters": { + "baseDomain": "azureiotcentral.com", + "subdomain": "appsubdomain", + "api-version": "1.1-preview", + "body": { + "account": "contoso-account", + "connectionString": "DefaultEndpointsProtocol=https;AccountName=MyAccountName;AccountKey=*****;EndpointSuffix=core.windows.net", + "container": "container", + "sasTtl": "PT1H" + } + }, + "responses": { + "200": { + "body": { + "account": "contoso-account", + "connectionString": "DefaultEndpointsProtocol=https;AccountName=MyAccountName;AccountKey=*****;EndpointSuffix=core.windows.net", + "container": "container", + "sasTtl": "PT1H", + "state": "pending" + } + } + } +} diff --git a/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/jobs_create.json b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/jobs_create.json new file mode 100644 index 000000000000..9fe51390eacb --- /dev/null +++ b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/jobs_create.json @@ -0,0 +1,40 @@ +{ + "title": "Execute a new job", + "description": "Create and execute a new job via its job definition.", + "parameters": { + "baseDomain": "azureiotcentral.com", + "subdomain": "appsubdomain", + "jobId": "myJobId", + "api-version": "1.1-preview", + "body": { + "displayName": "My Job", + "group": "475cad48-b7ff-4a09-b51e-1a9021385453", + "data": [ + { + "type": "property", + "target": "urn:1dgygpt7t:modelDefinition:02uwtefvdy", + "path": "componentName.propertyName", + "value": "updated value" + } + ] + } + }, + "responses": { + "200": { + "body": { + "id": "myJobId", + "displayName": "My Job", + "group": "475cad48-b7ff-4a09-b51e-1a9021385453", + "data": [ + { + "type": "property", + "target": "urn:1dgygpt7t:modelDefinition:02uwtefvdy", + "path": "componentName.propertyName", + "value": "updated value" + } + ], + "status": "running" + } + } + } +} diff --git a/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/jobs_devices.json b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/jobs_devices.json new file mode 100644 index 000000000000..5cdedc3663f1 --- /dev/null +++ b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/jobs_devices.json @@ -0,0 +1,38 @@ +{ + "title": "Get device statuses", + "description": "Get the list of individual device statuses by job ID.", + "parameters": { + "baseDomain": "azureiotcentral.com", + "subdomain": "appsubdomain", + "jobId": "myJobId", + "api-version": "1.1-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "ylleedih6k", + "status": "completed" + }, + { + "id": "t81v3k204k", + "status": "completed" + }, + { + "id": "iotc-1", + "status": "completed" + }, + { + "id": "iotc", + "status": "completed" + }, + { + "id": "1c5cs18m7k1", + "status": "completed" + } + ] + } + } + } +} diff --git a/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/jobs_get.json b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/jobs_get.json new file mode 100644 index 000000000000..978eee94bead --- /dev/null +++ b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/jobs_get.json @@ -0,0 +1,28 @@ +{ + "title": "Get a job by Id", + "description": "Get a job by Id", + "parameters": { + "baseDomain": "azureiotcentral.com", + "subdomain": "appsubdomain", + "jobId": "myJobId", + "api-version": "1.1-preview" + }, + "responses": { + "200": { + "body": { + "id": "myJobId", + "displayName": "My Job", + "group": "475cad48-b7ff-4a09-b51e-1a9021385453", + "data": [ + { + "type": "property", + "target": "urn:1dgygpt7t:modelDefinition:02uwtefvdy", + "path": "componentName.propertyName", + "value": "updated value" + } + ], + "status": "running" + } + } + } +} diff --git a/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/jobs_list.json b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/jobs_list.json new file mode 100644 index 000000000000..e970aa3ee20e --- /dev/null +++ b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/jobs_list.json @@ -0,0 +1,31 @@ +{ + "title": "List jobs", + "description": "List all jobs in your application.", + "parameters": { + "baseDomain": "azureiotcentral.com", + "subdomain": "appsubdomain", + "api-version": "1.1-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "myJobId", + "displayName": "My Job", + "group": "475cad48-b7ff-4a09-b51e-1a9021385453", + "data": [ + { + "type": "property", + "target": "urn:1dgygpt7t:modelDefinition:02uwtefvdy", + "path": "componentName.propertyName", + "value": "updated value" + } + ], + "status": "running" + } + ] + } + } + } +} diff --git a/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/jobs_rerun.json b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/jobs_rerun.json new file mode 100644 index 000000000000..a4b66bf017ba --- /dev/null +++ b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/jobs_rerun.json @@ -0,0 +1,29 @@ +{ + "title": "Rerun a job on failed devices", + "description": "Execute a rerun of an existing job on all failed devices.", + "parameters": { + "baseDomain": "azureiotcentral.com", + "subdomain": "appsubdomain", + "jobId": "myJobId", + "rerunId": "myJobRerunId", + "api-version": "1.1-preview" + }, + "responses": { + "200": { + "body": { + "id": "myJobRerunId", + "displayName": "My Job", + "group": "475cad48-b7ff-4a09-b51e-1a9021385453", + "data": [ + { + "type": "property", + "target": "urn:1dgygpt7t:modelDefinition:02uwtefvdy", + "path": "componentName.propertyName", + "value": "updated value" + } + ], + "status": "running" + } + } + } +} diff --git a/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/jobs_resume.json b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/jobs_resume.json new file mode 100644 index 000000000000..abc3600d4c66 --- /dev/null +++ b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/jobs_resume.json @@ -0,0 +1,13 @@ +{ + "title": "Resume a stopped job", + "description": "Resume execution of an existing stoppped job.", + "parameters": { + "baseDomain": "azureiotcentral.com", + "subdomain": "appsubdomain", + "jobId": "myJobId", + "api-version": "1.1-preview" + }, + "responses": { + "204": {} + } +} diff --git a/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/jobs_stop.json b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/jobs_stop.json new file mode 100644 index 000000000000..fcd340abdb77 --- /dev/null +++ b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/jobs_stop.json @@ -0,0 +1,13 @@ +{ + "title": "Stop a running job", + "description": "Stop execution of a job that is currently running.", + "parameters": { + "baseDomain": "azureiotcentral.com", + "subdomain": "appsubdomain", + "jobId": "myJobId", + "api-version": "1.1-preview" + }, + "responses": { + "204": {} + } +} diff --git a/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/modules_commands_send.json b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/modules_commands_send.json new file mode 100644 index 000000000000..5a4a960c19b1 --- /dev/null +++ b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/modules_commands_send.json @@ -0,0 +1,27 @@ +{ + "title": "Send command", + "description": "Send a command to a device.", + "parameters": { + "baseDomain": "azureiotcentral.com", + "subdomain": "appsubdomain", + "deviceId": "mx1", + "moduleName": "Camera", + "componentName": "componentA", + "commandName": "Reboot", + "api-version": "1.1-preview", + "body": { + "request": { + "SafeMode": true + } + } + }, + "responses": { + "201": { + "body": { + "request": { + "SafeMode": true + } + } + } + } +} diff --git a/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/modules_commandshistory_get.json b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/modules_commandshistory_get.json new file mode 100644 index 000000000000..7a8abb7710d2 --- /dev/null +++ b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/modules_commandshistory_get.json @@ -0,0 +1,25 @@ +{ + "title": "Get command history within a module", + "description": "Get the most recent invocaion of a command from within a module.", + "parameters": { + "baseDomain": "azureiotcentral.com", + "subdomain": "appsubdomain", + "deviceId": "mx1", + "moduleName": "camera", + "componentName": "componentA", + "commandName": "AdjustFrameRate", + "api-version": "1.1-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "response": "Success", + "responseCode": 200 + } + ] + } + } + } +} diff --git a/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/modules_properties_components_get.json b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/modules_properties_components_get.json new file mode 100644 index 000000000000..645ad120e12c --- /dev/null +++ b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/modules_properties_components_get.json @@ -0,0 +1,33 @@ +{ + "title": "Get device properties", + "description": "Get the current values of all device properties.", + "parameters": { + "baseDomain": "azureiotcentral.com", + "subdomain": "appsubdomain", + "deviceId": "mx1", + "moduleName": "module_env", + "componentName": "componentA", + "api-version": "1.1-preview" + }, + "responses": { + "200": { + "body": { + "SensitivityDial": 50, + "Status": 66.82181229066656, + "$metadata": { + "SensitivityDial": { + "desiredValue": 50, + "desiredVersion": 3, + "ackVersion": 1, + "ackDescription": "Ok", + "ackCode": 200, + "lastUpdateTime": "2020-04-27T22:08:55.1149957Z" + }, + "Status": { + "lastUpdateTime": "2020-04-27T22:09:25.1151948Z" + } + } + } + } + } +} diff --git a/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/modules_properties_components_set.json b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/modules_properties_components_set.json new file mode 100644 index 000000000000..9bbb3f888f5c --- /dev/null +++ b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/modules_properties_components_set.json @@ -0,0 +1,32 @@ +{ + "title": "Update properties of a module within a component", + "description": "Update the values of read-write properties of a module within a single component", + "parameters": { + "baseDomain": "azureiotcentral.com", + "subdomain": "appsubdomain", + "deviceId": "mx1", + "moduleName": "module_env", + "componentName": "componentA", + "api-version": "1.1-preview", + "body": { + "SensitivityDial": 300 + } + }, + "responses": { + "202": { + "body": { + "SensitivityDial": 50, + "$metadata": { + "SensitivityDial": { + "desiredValue": 300, + "desiredVersion": 3, + "ackVersion": 1, + "ackDescription": "Ok", + "ackCode": 200, + "lastUpdateTime": "2020-04-27T22:08:55.1149957Z" + } + } + } + } + } +} diff --git a/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/modules_properties_get.json b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/modules_properties_get.json new file mode 100644 index 000000000000..fad2c8a52179 --- /dev/null +++ b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/modules_properties_get.json @@ -0,0 +1,34 @@ +{ + "title": "Get properties of a module", + "description": "Get the current values of all device properties within a module.", + "parameters": { + "baseDomain": "azureiotcentral.com", + "subdomain": "appsubdomain", + "deviceId": "mx1", + "moduleName": "module_env", + "api-version": "1.1-preview" + }, + "responses": { + "200": { + "body": { + "componentA": { + "SensitivityDial": 50, + "Status": 25.494280816287844, + "$metadata": { + "SensitivityDial": { + "desiredValue": 50, + "desiredVersion": 3, + "ackVersion": 1, + "ackDescription": "Ok", + "ackCode": 200, + "lastUpdateTime": "2020-04-27T22:08:55.1149957Z" + }, + "Status": { + "lastUpdateTime": "2020-04-27T22:19:31.9485342Z" + } + } + } + } + } + } +} diff --git a/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/modules_properties_update.json b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/modules_properties_update.json new file mode 100644 index 000000000000..c014778fa10f --- /dev/null +++ b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/modules_properties_update.json @@ -0,0 +1,35 @@ +{ + "title": "Update properties of a module", + "description": "Update the values of read-write properties of a module", + "parameters": { + "baseDomain": "azureiotcentral.com", + "subdomain": "appsubdomain", + "deviceId": "mx1", + "moduleName": "module_env", + "api-version": "1.1-preview", + "body": { + "componentA": { + "SensitivityDial": 200 + } + } + }, + "responses": { + "202": { + "body": { + "componentA": { + "SensitivityDial": 75, + "$metadata": { + "SensitivityDial": { + "desiredValue": 200, + "desiredVersion": 3, + "ackVersion": 1, + "ackDescription": "Ok", + "ackCode": 200, + "lastUpdateTime": "2020-04-27T22:08:55.1149957Z" + } + } + } + } + } + } +} diff --git a/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/modules_telemetry_get.json b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/modules_telemetry_get.json new file mode 100644 index 000000000000..a8959a7057a1 --- /dev/null +++ b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/modules_telemetry_get.json @@ -0,0 +1,24 @@ +{ + "title": "Get telemetry from a module", + "description": "Get the last known value of a telemetry stream from a module.", + "parameters": { + "baseDomain": "azureiotcentral.com", + "subdomain": "appsubdomain", + "deviceId": "mx1", + "moduleName": "environment", + "componentName": "componentA", + "telemetryName": "ambient", + "api-version": "1.1-preview" + }, + "responses": { + "200": { + "body": { + "value": { + "temperature": 20.961113326000568, + "humidity": 24 + }, + "timestamp": "2020-04-16T03:24:44.84Z" + } + } + } +} diff --git a/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/organizations_create.json b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/organizations_create.json new file mode 100644 index 000000000000..b6dd6f134507 --- /dev/null +++ b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/organizations_create.json @@ -0,0 +1,23 @@ +{ + "title": "Add or update an organization in your application", + "description": "Add or update an organization in your application.", + "parameters": { + "baseDomain": "azureiotcentral.com", + "subdomain": "appsubdomain", + "organizationId": "seattle", + "api-version": "1.1-preview", + "body": { + "displayName": "Seattle", + "parent": "washington" + } + }, + "responses": { + "200": { + "body": { + "id": "seattle", + "displayName": "Seattle", + "parent": "washington" + } + } + } +} diff --git a/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/organizations_delete.json b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/organizations_delete.json new file mode 100644 index 000000000000..88023d1b9d3d --- /dev/null +++ b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/organizations_delete.json @@ -0,0 +1,13 @@ +{ + "title": "Delete an organization in your application", + "description": "Delete an organization in your application.", + "parameters": { + "baseDomain": "azureiotcentral.com", + "subdomain": "appsubdomain", + "organizationId": "seattle", + "api-version": "1.1-preview" + }, + "responses": { + "204": {} + } +} diff --git a/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/organizations_get.json b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/organizations_get.json new file mode 100644 index 000000000000..22a6959cdf94 --- /dev/null +++ b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/organizations_get.json @@ -0,0 +1,19 @@ +{ + "title": "Get an organization in your application", + "description": "Get an organization by Id in your application.", + "parameters": { + "baseDomain": "azureiotcentral.com", + "subdomain": "appsubdomain", + "organizationId": "seattle", + "api-version": "1.1-preview" + }, + "responses": { + "200": { + "body": { + "id": "seattle", + "displayName": "Seattle", + "parent": "washington" + } + } + } +} diff --git a/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/organizations_list.json b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/organizations_list.json new file mode 100644 index 000000000000..86545ab78dc2 --- /dev/null +++ b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/organizations_list.json @@ -0,0 +1,31 @@ +{ + "title": "List organizations in your application", + "description": "Get a list of organizations in your application.", + "parameters": { + "baseDomain": "azureiotcentral.com", + "subdomain": "appsubdomain", + "api-version": "1.1-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "us", + "displayName": "United States" + }, + { + "id": "washington", + "displayName": "Washington", + "parent": "us" + }, + { + "id": "seattle", + "displayName": "Seattle", + "parent": "washington" + } + ] + } + } + } +} diff --git a/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/roles_get.json b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/roles_get.json new file mode 100644 index 000000000000..a77f23bad7cd --- /dev/null +++ b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/roles_get.json @@ -0,0 +1,18 @@ +{ + "title": "Get role by Id", + "description": "Get a role by Id.", + "parameters": { + "baseDomain": "azureiotcentral.com", + "subdomain": "appsubdomain", + "roleId": "ca310b8d-2f4a-44e0-a36e-957c202cd8d4", + "api-version": "1.1-preview" + }, + "responses": { + "200": { + "body": { + "id": "ca310b8d-2f4a-44e0-a36e-957c202cd8d4", + "displayName": "Administrator" + } + } + } +} diff --git a/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/roles_list.json b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/roles_list.json new file mode 100644 index 000000000000..598a4e156542 --- /dev/null +++ b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/roles_list.json @@ -0,0 +1,41 @@ +{ + "title": "List roles", + "description": "List roles in your application.", + "parameters": { + "baseDomain": "azureiotcentral.com", + "subdomain": "appsubdomain", + "api-version": "1.1-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "ca310b8d-2f4a-44e0-a36e-957c202cd8d4", + "displayName": "Administrator" + }, + { + "id": "344138e9-8de4-4497-8c54-5237e96d6aaf", + "displayName": "Builder" + }, + { + "id": "ae2c9854-393b-4f97-8c42-479d70ce626e", + "displayName": "Operator" + }, + { + "id": "c495eb57-eb18-489e-9802-62c474e5645c", + "displayName": "Org Admin" + }, + { + "id": "b4935647-30e4-4ed3-9074-dcac66c2f8ef", + "displayName": "Org Operator" + }, + { + "id": "84cc62c1-dabe-49d3-b16e-8b291232b285", + "displayName": "Org Viewer" + } + ] + } + } + } +} diff --git a/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/users_delete.json b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/users_delete.json new file mode 100644 index 000000000000..e03b39813c75 --- /dev/null +++ b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/users_delete.json @@ -0,0 +1,13 @@ +{ + "title": "Remove a user", + "description": "Remove a user from the application by Id.", + "parameters": { + "baseDomain": "azureiotcentral.com", + "subdomain": "appsubdomain", + "userId": "abc", + "api-version": "1.1-preview" + }, + "responses": { + "204": {} + } +} diff --git a/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/users_get.json b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/users_get.json new file mode 100644 index 000000000000..003fe2d2c325 --- /dev/null +++ b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/users_get.json @@ -0,0 +1,25 @@ +{ + "title": "Get a user in your application", + "description": "Get a user by Id in your application.", + "parameters": { + "baseDomain": "azureiotcentral.com", + "subdomain": "appsubdomain", + "userId": "abc", + "api-version": "1.1-preview" + }, + "responses": { + "200": { + "body": { + "id": "abc", + "type": "email", + "roles": [ + { + "role": "c495eb57-eb18-489e-9802-62c474e5645c", + "organization": "seattle" + } + ], + "email": "alice@contoso.com" + } + } + } +} diff --git a/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/users_list.json b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/users_list.json new file mode 100644 index 000000000000..b89b78dd9648 --- /dev/null +++ b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/users_list.json @@ -0,0 +1,39 @@ +{ + "title": "List users in your application", + "description": "Get a list of users in your application.", + "parameters": { + "baseDomain": "azureiotcentral.com", + "subdomain": "appsubdomain", + "api-version": "1.1-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "af0d5b8f-7a69-4521-868e-19745fae353f", + "type": "email", + "roles": [ + { + "role": "ca310b8d-2f4a-44e0-a36e-957c202cd8d4" + } + ], + "email": "alice@contoso.com" + }, + { + "id": "123", + "type": "servicePrincipal", + "roles": [ + { + "role": "c495eb57-eb18-489e-9802-62c474e5645c", + "organization": "seattle" + } + ], + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "objectId": "9071c899-bce0-4862-b208-75dabae226a9" + } + ] + } + } + } +} diff --git a/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/users_set.json b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/users_set.json new file mode 100644 index 000000000000..66abd74356e5 --- /dev/null +++ b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/users_set.json @@ -0,0 +1,40 @@ +{ + "title": "Add or update an email user in your application", + "description": "Add or update an email user in your application.", + "parameters": { + "baseDomain": "azureiotcentral.com", + "subdomain": "appsubdomain", + "userId": "123", + "api-version": "1.1-preview", + "body": { + "type": "email", + "roles": [ + { + "role": "ca310b8d-2f4a-44e0-a36e-957c202cd8d4" + }, + { + "role": "c495eb57-eb18-489e-9802-62c474e5645c", + "organization": "seattle" + } + ], + "email": "bob@contoso.com" + } + }, + "responses": { + "200": { + "body": { + "type": "email", + "roles": [ + { + "role": "ca310b8d-2f4a-44e0-a36e-957c202cd8d4" + }, + { + "role": "c495eb57-eb18-489e-9802-62c474e5645c", + "organization": "seattle" + } + ], + "email": "bob@contoso.com" + } + } + } +} diff --git a/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/users_set_serviceprincipal.json b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/users_set_serviceprincipal.json new file mode 100644 index 000000000000..113bd6ab3012 --- /dev/null +++ b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/examples/users_set_serviceprincipal.json @@ -0,0 +1,43 @@ +{ + "title": "Add or update a service principal in your application", + "description": "Add or update an AAD service principal in your application.", + "parameters": { + "baseDomain": "azureiotcentral.com", + "subdomain": "appsubdomain", + "userId": "123", + "api-version": "1.1-preview", + "body": { + "type": "servicePrincipal", + "tenantId": "027fdad7-cf0f-470a-a26a-272197813322", + "objectId": "65e13aac-1443-4c49-9d49-57b87197cfff", + "roles": [ + { + "role": "c7be2c6b-797e-4551-bb24-33709f6b2e20" + }, + { + "role": "c495eb57-eb18-489e-9802-62c474e5645c", + "organization": "seattle" + } + ] + } + }, + "responses": { + "200": { + "body": { + "id": "123", + "type": "servicePrincipal", + "tenantId": "027fdad7-cf0f-470a-a26a-272197813322", + "objectId": "65e13aac-1443-4c49-9d49-57b87197cfff", + "roles": [ + { + "role": "c7be2c6b-797e-4551-bb24-33709f6b2e20" + }, + { + "role": "c495eb57-eb18-489e-9802-62c474e5645c", + "organization": "seattle" + } + ] + } + } + } +} diff --git a/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/iotcentral.json b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/iotcentral.json new file mode 100644 index 000000000000..9c40c8f5961f --- /dev/null +++ b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/1.1-preview/iotcentral.json @@ -0,0 +1,3355 @@ +{ + "swagger": "2.0", + "info": { + "title": "Azure IoT Central", + "description": "Azure IoT Central is a service that makes it easy to connect, monitor, and manage your IoT devices at scale.", + "version": "1.1-preview" + }, + "x-ms-parameterized-host": { + "hostTemplate": "{subdomain}.{baseDomain}", + "parameters": [ + { + "$ref": "#/parameters/BaseDomain" + }, + { + "$ref": "#/parameters/Subdomain" + } + ] + }, + "basePath": "/api", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "definitions": { + "ADGroupUser": { + "x-ms-discriminator-value": "adGroup", + "allOf": [ + { + "$ref": "#/definitions/User" + } + ], + "type": "object", + "properties": { + "tenantId": { + "description": "The AAD tenant ID of the AD Group.", + "type": "string" + }, + "objectId": { + "description": "The AAD object ID of the AD Group.", + "type": "string" + } + }, + "required": [ + "tenantId", + "objectId" + ] + }, + "ApiToken": { + "allOf": [ + { + "$ref": "#/definitions/Permission" + } + ], + "type": "object", + "properties": { + "id": { + "description": "Unique ID of the API token.", + "type": "string", + "readOnly": true + }, + "token": { + "description": "Value of the API token.", + "type": "string", + "readOnly": true + }, + "expiry": { + "description": "String-formatted date representing the time when the token expires.", + "type": "string", + "format": "date-time" + } + } + }, + "ApiTokenCollection": { + "type": "object", + "properties": { + "value": { + "description": "The collection of API tokens.", + "type": "array", + "items": { + "$ref": "#/definitions/ApiToken" + } + }, + "nextLink": { + "description": "URL to get the next page of API tokens.", + "type": "string" + } + }, + "required": [ + "value" + ] + }, + "Attestation": { + "type": "object", + "properties": { + "type": { + "description": "Type of the attestation.", + "type": "string" + } + }, + "required": [ + "type" + ], + "discriminator": "type" + }, + "CloudPropertyJobData": { + "x-ms-discriminator-value": "cloudProperty", + "allOf": [ + { + "$ref": "#/definitions/JobData" + } + ] + }, + "Collection": { + "type": "object", + "properties": { + "value": { + "description": "The collection of entities.", + "type": "array", + "items": { + "type": "object" + } + }, + "nextLink": { + "description": "URL to get the next page of entities.", + "type": "string" + } + }, + "required": [ + "value" + ] + }, + "CommandJobData": { + "x-ms-discriminator-value": "command", + "allOf": [ + { + "$ref": "#/definitions/JobData" + } + ] + }, + "Device": { + "type": "object", + "properties": { + "id": { + "description": "Unique ID of the device.", + "type": "string", + "readOnly": true + }, + "etag": { + "description": "ETag used to prevent conflict in device updates.", + "type": "string" + }, + "displayName": { + "description": "Display name of the device.", + "type": "string" + }, + "template": { + "description": "The device template definition for the device.", + "type": "string" + }, + "enabled": { + "description": "Whether the device connection to IoT Central has been enabled.", + "type": "boolean" + }, + "provisioned": { + "description": "Whether resources have been allocated for the device.", + "type": "boolean", + "readOnly": true + }, + "simulated": { + "description": "Whether the device is simulated.", + "type": "boolean" + }, + "organizations": { + "description": "List of organization IDs that the device is a part of.", + "type": "array", + "items": { + "type": "string" + }, + "maxItems": 1 + } + } + }, + "DeviceCollection": { + "type": "object", + "properties": { + "value": { + "description": "The collection of devices.", + "type": "array", + "items": { + "$ref": "#/definitions/Device" + } + }, + "nextLink": { + "description": "URL to get the next page of devices.", + "type": "string" + } + }, + "required": [ + "value" + ] + }, + "DeviceCommand": { + "type": "object", + "properties": { + "id": { + "description": "The request ID of the device command execution.", + "type": "string", + "readOnly": true + }, + "connectionTimeout": { + "description": "Connection timeout in seconds to wait for a disconnected device to come online. Defaults to 0 seconds.", + "type": "integer", + "minimum": 0, + "maximum": 30 + }, + "responseTimeout": { + "description": "Response timeout in seconds to wait for a command completion on a device. Defaults to 30 seconds.", + "type": "integer", + "minimum": 5, + "maximum": 30 + }, + "request": { + "description": "The payload for the device command." + }, + "response": { + "description": "The payload of the device command response.", + "readOnly": true + }, + "responseCode": { + "description": "The status code of the device command response.", + "type": "integer", + "readOnly": true + } + } + }, + "DeviceCommandCollection": { + "type": "object", + "properties": { + "value": { + "description": "The collection of device command executions.", + "type": "array", + "items": { + "$ref": "#/definitions/DeviceCommand" + } + }, + "nextLink": { + "description": "URL to get the next page of device command executions.", + "type": "string" + } + }, + "required": [ + "value" + ] + }, + "DeviceCredentials": { + "type": "object", + "properties": { + "idScope": { + "description": "ID scope for connecting to the IoT Central application.", + "type": "string" + }, + "symmetricKey": { + "description": "The symmetric key credentials for the device.", + "$ref": "#/definitions/SymmetricKey" + }, + "x509": { + "description": "The X.509 credential information for the device.", + "$ref": "#/definitions/X509" + }, + "tpm": { + "description": "The TPM credentials for the device.", + "$ref": "#/definitions/Tpm" + } + }, + "required": [ + "idScope" + ] + }, + "DeviceGroup": { + "type": "object", + "properties": { + "id": { + "description": "Unique ID of the device group.", + "type": "string", + "readOnly": true + }, + "displayName": { + "description": "Display name of the device group.", + "type": "string" + }, + "organizations": { + "description": "List of organization IDs of the device group.", + "type": "array", + "items": { + "type": "string" + }, + "maxItems": 1 + } + } + }, + "DeviceGroupCollection": { + "type": "object", + "properties": { + "value": { + "description": "The collection of device groups.", + "type": "array", + "items": { + "$ref": "#/definitions/DeviceGroup" + } + }, + "nextLink": { + "description": "URL to get the next page of device groups.", + "type": "string" + } + }, + "required": [ + "value" + ] + }, + "DeviceProperties": { + "description": "Property values associated with the device.", + "type": "object", + "additionalProperties": true + }, + "DeviceTelemetry": { + "type": "object", + "properties": { + "value": { + "description": "The last known value of this device telemetry." + }, + "timestamp": { + "description": "String-formatted date representing the time when the telemetry value was sent.", + "type": "string", + "format": "date-time" + } + } + }, + "DeviceTemplate": { + "type": "object", + "properties": { + "@id": { + "description": "Unique ID of the device template.", + "type": "string", + "readOnly": true + }, + "@type": { + "description": "The JSON-LD types of this device template.", + "type": "array", + "items": { + "type": "string" + } + }, + "etag": { + "description": "ETag used to prevent conflict in device template updates.", + "type": "string" + }, + "displayName": { + "description": "Display name of the device template.", + "type": "string" + }, + "description": { + "description": "Detailed description of the device template.", + "type": "string" + }, + "capabilityModel": { + "description": "The capability model utilized by this device template.", + "type": "object" + } + }, + "required": [ + "@type", + "capabilityModel" + ] + }, + "DeviceTemplateCollection": { + "type": "object", + "properties": { + "value": { + "description": "The collection of device templates.", + "type": "array", + "items": { + "$ref": "#/definitions/DeviceTemplate" + } + }, + "nextLink": { + "description": "URL to get the next page of device templates.", + "type": "string" + } + }, + "required": [ + "value" + ] + }, + "EmailUser": { + "x-ms-discriminator-value": "email", + "allOf": [ + { + "$ref": "#/definitions/User" + } + ], + "type": "object", + "properties": { + "email": { + "description": "Email address of the user.", + "type": "string", + "format": "email" + } + }, + "required": [ + "email" + ] + }, + "FileUpload": { + "type": "object", + "properties": { + "account": { + "description": "The storage account name where to upload the file to", + "type": "string" + }, + "connectionString": { + "description": "The connection string used to configure the storage account", + "type": "string" + }, + "container": { + "description": "The name of the container inside the storage account", + "type": "string" + }, + "sasTtl": { + "description": "ISO 8601 duration standard, The amount of time the device’s request to upload a file is valid before it expires.​", + "type": "string" + }, + "state": { + "description": "The state of the file upload configuration", + "type": "string", + "readOnly": true, + "enum": [ + "pending", + "updating", + "deleting", + "succeeded", + "failed" + ], + "x-ms-enum": { + "name": "FileUploadState", + "modelAsString": false, + "values": [ + { + "value": "pending", + "name": "Pending" + }, + { + "value": "updating", + "name": "Updating" + }, + { + "value": "deleting", + "name": "Deleting" + }, + { + "value": "succeeded", + "name": "Succeeded" + }, + { + "value": "failed", + "name": "Failed" + } + ] + } + }, + "etag": { + "description": "ETag used to prevent conflict with multiple uploads", + "type": "string" + } + }, + "required": [ + "connectionString", + "container" + ] + }, + "Job": { + "type": "object", + "properties": { + "id": { + "description": "Unique ID of the job.", + "type": "string", + "readOnly": true + }, + "displayName": { + "description": "Display name of the job.", + "type": "string" + }, + "description": { + "description": "Detailed description of the job.", + "type": "string" + }, + "group": { + "description": "The ID of the device group on which to execute the job.", + "type": "string" + }, + "batch": { + "description": "The batching configuration for the job.", + "$ref": "#/definitions/JobBatch" + }, + "cancellationThreshold": { + "description": "The cancellation threshold for the job.", + "$ref": "#/definitions/JobCancellationThreshold" + }, + "data": { + "description": "The capabilities being updated by the job and the values with which they are being updated.", + "type": "array", + "items": { + "$ref": "#/definitions/JobData" + }, + "minItems": 1 + }, + "status": { + "description": "Indicates whether the job is starting, running, etc.", + "type": "string", + "readOnly": true + } + }, + "required": [ + "group", + "data" + ] + }, + "JobBatch": { + "type": "object", + "properties": { + "type": { + "description": "Whether batching is done on a specified number of devices or a percentage of the total devices.", + "type": "string", + "enum": [ + "number", + "percentage" + ], + "x-ms-enum": { + "name": "JobBatchType", + "modelAsString": false, + "values": [ + { + "value": "number", + "name": "Number", + "description": "Job Batching based on number of devices." + }, + { + "value": "percentage", + "name": "Percentage", + "description": "Job Batching based percentage of total applied devices." + } + ] + } + }, + "value": { + "description": "The number or percentage of devices on which batching is done.", + "type": "number" + } + }, + "required": [ + "type", + "value" + ] + }, + "JobCancellationThreshold": { + "type": "object", + "properties": { + "type": { + "description": "Whether the cancellation threshold is per a specified number of devices or a percentage of the total devices.", + "type": "string", + "enum": [ + "number", + "percentage" + ], + "x-ms-enum": { + "name": "JobCancellationThresholdType", + "modelAsString": false, + "values": [ + { + "value": "number", + "name": "Number", + "description": "Job cancellation threshold based on specified number of devices." + }, + { + "value": "percentage", + "name": "Percentage", + "description": "Job cancellation threshold based on percentage of total devices." + } + ] + } + }, + "value": { + "description": "The number or percentage of devices on which the cancellation threshold is applied.", + "type": "number" + }, + "batch": { + "description": "Whether the cancellation threshold applies per-batch or to the overall job.", + "type": "boolean" + } + }, + "required": [ + "type", + "value" + ] + }, + "JobCollection": { + "type": "object", + "properties": { + "value": { + "description": "The collection of jobs.", + "type": "array", + "items": { + "$ref": "#/definitions/Job" + } + }, + "nextLink": { + "description": "URL to get the next page of jobs.", + "type": "string" + } + }, + "required": [ + "value" + ] + }, + "JobData": { + "type": "object", + "properties": { + "type": { + "description": "Type of the job data.", + "type": "string" + }, + "target": { + "description": "The device template which defines the target capability for the job.", + "type": "string" + }, + "path": { + "description": "The path to the target capability within the device template.", + "type": "string" + }, + "value": { + "description": "The value used to update the target capability, if any." + } + }, + "required": [ + "type", + "target", + "path" + ], + "discriminator": "type" + }, + "JobDeviceStatus": { + "properties": { + "id": { + "description": "ID of the device whose job status is being provided.", + "type": "string", + "readOnly": true + }, + "status": { + "description": "Indicates whether the job is starting, running, etc. for the given device.", + "type": "string", + "readOnly": true + } + } + }, + "JobDeviceStatusCollection": { + "type": "object", + "properties": { + "value": { + "description": "The collection of job device statuses.", + "type": "array", + "items": { + "$ref": "#/definitions/JobDeviceStatus" + } + }, + "nextLink": { + "description": "URL to get the next page of job device statuses.", + "type": "string" + } + }, + "required": [ + "value" + ] + }, + "Organization": { + "type": "object", + "properties": { + "id": { + "description": "Unique ID of the organization.", + "type": "string", + "readOnly": true + }, + "displayName": { + "description": "Display name of the organization.", + "type": "string" + }, + "parent": { + "description": "ID of the parent of the organization.", + "type": "string" + } + } + }, + "OrganizationCollection": { + "type": "object", + "properties": { + "value": { + "description": "The collection of organizations.", + "type": "array", + "items": { + "$ref": "#/definitions/Organization" + } + }, + "nextLink": { + "description": "URL to get the next page of organizations.", + "type": "string" + } + }, + "required": [ + "value" + ] + }, + "Permission": { + "type": "object", + "properties": { + "roles": { + "description": "List of role assignments that specify the permissions to access the application.", + "type": "array", + "items": { + "$ref": "#/definitions/RoleAssignment" + }, + "minItems": 1 + } + }, + "required": [ + "roles" + ] + }, + "PropertyJobData": { + "x-ms-discriminator-value": "property", + "allOf": [ + { + "$ref": "#/definitions/JobData" + } + ] + }, + "Role": { + "type": "object", + "properties": { + "id": { + "description": "Unique ID of the role.", + "type": "string", + "readOnly": true + }, + "displayName": { + "description": "Display name of the role.", + "type": "string" + } + } + }, + "RoleAssignment": { + "type": "object", + "properties": { + "role": { + "description": "ID of the role for this role assignment.", + "type": "string" + }, + "organization": { + "description": "ID of the organization for this role assignment.", + "type": "string" + } + }, + "required": [ + "role" + ] + }, + "RoleCollection": { + "type": "object", + "properties": { + "value": { + "description": "The collection of roles.", + "type": "array", + "items": { + "$ref": "#/definitions/Role" + } + }, + "nextLink": { + "description": "URL to get the next page of roles.", + "type": "string" + } + }, + "required": [ + "value" + ] + }, + "ServicePrincipalUser": { + "x-ms-discriminator-value": "servicePrincipal", + "allOf": [ + { + "$ref": "#/definitions/User" + } + ], + "type": "object", + "properties": { + "tenantId": { + "description": "The AAD tenant ID of the service principal.", + "type": "string" + }, + "objectId": { + "description": "The AAD object ID of the service principal.", + "type": "string" + } + }, + "required": [ + "tenantId", + "objectId" + ] + }, + "SymmetricKey": { + "type": "object", + "properties": { + "primaryKey": { + "description": "The primary key for this credential.", + "type": "string" + }, + "secondaryKey": { + "description": "The secondary key for this credential.", + "type": "string" + } + }, + "required": [ + "primaryKey", + "secondaryKey" + ] + }, + "SymmetricKeyAttestation": { + "x-ms-discriminator-value": "symmetricKey", + "allOf": [ + { + "$ref": "#/definitions/Attestation" + } + ], + "type": "object", + "properties": { + "symmetricKey": { + "description": "The symmetric key credentials for this attestation.", + "$ref": "#/definitions/SymmetricKey" + } + }, + "required": [ + "symmetricKey" + ] + }, + "Tpm": { + "type": "object", + "properties": { + "endorsementKey": { + "description": "The TPM endorsement key for this credential.", + "type": "string" + } + }, + "required": [ + "endorsementKey" + ] + }, + "TpmAttestation": { + "x-ms-discriminator-value": "tpm", + "allOf": [ + { + "$ref": "#/definitions/Attestation" + } + ], + "type": "object", + "properties": { + "tpm": { + "description": "The TPM credentials for this attestation.", + "$ref": "#/definitions/Tpm" + } + }, + "required": [ + "tpm" + ] + }, + "User": { + "allOf": [ + { + "$ref": "#/definitions/Permission" + } + ], + "type": "object", + "properties": { + "id": { + "description": "Unique ID of the user.", + "type": "string", + "readOnly": true + }, + "type": { + "description": "Type of the user.", + "type": "string" + } + }, + "required": [ + "type" + ], + "discriminator": "type" + }, + "UserCollection": { + "type": "object", + "properties": { + "value": { + "description": "The collection of users.", + "type": "array", + "items": { + "$ref": "#/definitions/User" + } + }, + "nextLink": { + "description": "URL to get the next page of users.", + "type": "string" + } + }, + "required": [ + "value" + ] + }, + "X509": { + "type": "object", + "properties": { + "clientCertificates": { + "description": "The X.509 client certificates for this credential.", + "$ref": "#/definitions/X509Certificates" + } + } + }, + "X509Attestation": { + "x-ms-discriminator-value": "x509", + "allOf": [ + { + "$ref": "#/definitions/Attestation" + } + ], + "type": "object", + "properties": { + "x509": { + "description": "The X.509 credentials for this attestation.", + "$ref": "#/definitions/X509" + } + }, + "required": [ + "x509" + ] + }, + "X509Certificate": { + "type": "object", + "properties": { + "certificate": { + "description": "The string representation of this certificate.", + "type": "string" + }, + "info": { + "description": "Information about this certificate.", + "readOnly": true, + "$ref": "#/definitions/X509CertificateInfo" + } + } + }, + "X509CertificateInfo": { + "type": "object", + "properties": { + "sha1Thumbprint": { + "description": "The SHA-1 hash value of the certificate.", + "type": "string" + } + }, + "required": [ + "sha1Thumbprint" + ] + }, + "X509Certificates": { + "type": "object", + "properties": { + "primary": { + "description": "The primary X.509 certificate for this credential.", + "$ref": "#/definitions/X509Certificate" + }, + "secondary": { + "description": "The secondary X.509 certificate for this credential.", + "$ref": "#/definitions/X509Certificate" + } + }, + "required": [ + "primary" + ] + } + }, + "paths": { + "/apiTokens": { + "get": { + "operationId": "ApiTokens_List", + "summary": "Get the list of API tokens in an application. The token value will never be returned for security reasons.", + "x-ms-examples": { + "List API tokens": { + "$ref": "./examples/apitoken_list.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/Version" + } + ], + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/ApiTokenCollection" + } + } + } + } + }, + "/apiTokens/{tokenId}": { + "get": { + "operationId": "ApiTokens_Get", + "summary": "Get an API token by ID.", + "x-ms-examples": { + "Get API token by ID": { + "$ref": "./examples/apitoken_get.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/Version" + }, + { + "in": "path", + "name": "tokenId", + "description": "Unique ID for the API token.", + "type": "string", + "required": true + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/ApiToken" + } + } + } + }, + "put": { + "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": { + "$ref": "./examples/apitoken_create.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/Version" + }, + { + "in": "path", + "name": "tokenId", + "description": "Unique ID for the API token.", + "type": "string", + "required": true + }, + { + "in": "body", + "name": "body", + "description": "API token body.", + "schema": { + "$ref": "#/definitions/ApiToken" + }, + "required": true + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/ApiToken" + } + } + } + }, + "delete": { + "operationId": "ApiTokens_Remove", + "summary": "Delete an API token.", + "x-ms-examples": { + "Delete API token": { + "$ref": "./examples/apitoken_delete.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/Version" + }, + { + "in": "path", + "name": "tokenId", + "description": "Unique ID for the API token.", + "type": "string", + "required": true + } + ], + "responses": { + "204": { + "description": "Success" + } + } + } + }, + "/deviceGroups": { + "get": { + "operationId": "DeviceGroups_List", + "summary": "Get the list of device groups in an application.", + "x-ms-examples": { + "List device groups": { + "$ref": "./examples/devicegroups_list.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/Version" + } + ], + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/DeviceGroupCollection" + } + } + } + } + }, + "/deviceTemplates": { + "get": { + "operationId": "DeviceTemplates_List", + "summary": "Get the list of device templates in an application", + "x-ms-examples": { + "List device templates": { + "$ref": "./examples/devicetemplates_list.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/Version" + } + ], + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/DeviceTemplateCollection" + } + } + } + } + }, + "/deviceTemplates/{deviceTemplateId}": { + "get": { + "operationId": "DeviceTemplates_Get", + "summary": "Get a device template by ID", + "x-ms-examples": { + "Get a device template by Id": { + "$ref": "./examples/devicetemplates_get.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/Version" + }, + { + "$ref": "#/parameters/DeviceTemplateId" + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/DeviceTemplate" + } + } + } + }, + "put": { + "operationId": "DeviceTemplates_Create", + "summary": "Publish a new 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" + } + }, + "parameters": [ + { + "$ref": "#/parameters/Version" + }, + { + "$ref": "#/parameters/DeviceTemplateId" + }, + { + "in": "body", + "name": "body", + "description": "Device template body.", + "schema": { + "$ref": "#/definitions/DeviceTemplate" + }, + "required": true + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/DeviceTemplate" + } + } + } + }, + "patch": { + "operationId": "DeviceTemplates_Update", + "summary": "Update the cloud properties and overrides of an existing device template via patch.", + "x-ms-examples": { + "Update a device template": { + "$ref": "./examples/devicetemplates_create.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/Version" + }, + { + "$ref": "#/parameters/DeviceTemplateId" + }, + { + "in": "body", + "name": "body", + "description": "Device template patch body.", + "schema": { + "type": "object" + }, + "required": true + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/DeviceTemplate" + } + } + } + }, + "delete": { + "operationId": "DeviceTemplates_Remove", + "summary": "Delete a device template", + "description": "Delete an existing device template by device ID.", + "x-ms-examples": { + "Delete a device template by Id": { + "$ref": "./examples/devicetemplates_delete.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/Version" + }, + { + "$ref": "#/parameters/DeviceTemplateId" + } + ], + "responses": { + "204": { + "description": "Success" + } + } + } + }, + "/devices": { + "get": { + "operationId": "Devices_List", + "summary": "Get the list of devices in an application", + "x-ms-examples": { + "List devices": { + "$ref": "./examples/devices_list.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/Version" + } + ], + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/DeviceCollection" + } + } + } + } + }, + "/devices/{deviceId}": { + "get": { + "operationId": "Devices_Get", + "summary": "Get a device by ID", + "description": "Get details about an existing device by device ID.", + "x-ms-examples": { + "Get device by Id": { + "$ref": "./examples/devices_get.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/Version" + }, + { + "$ref": "#/parameters/DeviceId" + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/Device" + } + } + } + }, + "put": { + "operationId": "Devices_Create", + "summary": "Create or update a device", + "description": "Create a new device.", + "x-ms-examples": { + "Create device": { + "$ref": "./examples/devices_create.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/Version" + }, + { + "$ref": "#/parameters/DeviceId" + }, + { + "in": "body", + "name": "body", + "description": "Device body.", + "schema": { + "$ref": "#/definitions/Device" + }, + "required": true + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/Device" + } + } + } + }, + "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_create.json" + } + }, + "consumes": [ + "application/json", + "application/json-patch+json" + ], + "parameters": [ + { + "$ref": "#/parameters/Version" + }, + { + "$ref": "#/parameters/DeviceId" + }, + { + "in": "body", + "name": "body", + "description": "Device patch body.", + "schema": { + "type": "object" + }, + "required": true + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/Device" + } + } + } + }, + "delete": { + "operationId": "Devices_Remove", + "summary": "Delete a device", + "description": "Delete an existing device by device ID.", + "x-ms-examples": { + "Delete device": { + "$ref": "./examples/devices_delete.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/Version" + }, + { + "$ref": "#/parameters/DeviceId" + } + ], + "responses": { + "204": { + "description": "Success" + } + } + } + }, + "/devices/{deviceId}/attestation": { + "get": { + "operationId": "Devices_GetAttestation", + "summary": "Get device attestation", + "x-ms-examples": { + "Get device attestation": { + "$ref": "./examples/devices_attestations_get.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/Version" + }, + { + "$ref": "#/parameters/DeviceId" + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/Attestation" + } + } + } + }, + "put": { + "operationId": "Devices_CreateAttestation", + "summary": "Create an individual device attestation", + "x-ms-examples": { + "Create or update device attestation - Symmetric Key": { + "$ref": "./examples/devices_attestations_set_symmetricKey.json" + }, + "Create or update device attestation - TPM": { + "$ref": "./examples/devices_attestations_set_tpm.json" + }, + "Create or update device attestation - X509": { + "$ref": "./examples/devices_attestations_set_x509.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/Version" + }, + { + "$ref": "#/parameters/DeviceId" + }, + { + "in": "body", + "name": "body", + "description": "Individual device attestation body.", + "schema": { + "$ref": "#/definitions/Attestation" + }, + "required": true + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/Attestation" + } + } + } + }, + "patch": { + "operationId": "Devices_UpdateAttestation", + "summary": "Update an individual device attestation via patch", + "x-ms-examples": { + "Update device attestation - Symmetric Key": { + "$ref": "./examples/devices_attestations_set_symmetricKey.json" + }, + "Update device attestation - TPM": { + "$ref": "./examples/devices_attestations_set_tpm.json" + }, + "Update device attestation - X509": { + "$ref": "./examples/devices_attestations_set_x509.json" + } + }, + "consumes": [ + "application/json", + "application/json-patch+json" + ], + "parameters": [ + { + "$ref": "#/parameters/Version" + }, + { + "$ref": "#/parameters/DeviceId" + }, + { + "in": "body", + "name": "body", + "description": "Individual device attestation patch body.", + "schema": { + "type": "object" + }, + "required": true + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/Attestation" + } + } + } + }, + "delete": { + "operationId": "Devices_RemoveAttestation", + "summary": "Remove an individual device attestation", + "x-ms-examples": { + "Delete device attestation": { + "$ref": "./examples/devices_attestations_delete.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/Version" + }, + { + "$ref": "#/parameters/DeviceId" + } + ], + "responses": { + "204": { + "description": "Success" + } + } + } + }, + "/devices/{deviceId}/commands/{commandName}": { + "get": { + "operationId": "Devices_GetCommandHistory", + "summary": "Get device command history", + "x-ms-examples": { + "Get command history": { + "$ref": "./examples/devices_commandshistory_get.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/Version" + }, + { + "$ref": "#/parameters/DeviceId" + }, + { + "$ref": "#/parameters/CommandName" + } + ], + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/DeviceCommandCollection" + } + } + } + }, + "post": { + "operationId": "Devices_RunCommand", + "summary": "Run a device command", + "description": "Run a command on a device.", + "x-ms-examples": { + "Send command": { + "$ref": "./examples/devices_commands_send.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/Version" + }, + { + "$ref": "#/parameters/DeviceId" + }, + { + "$ref": "#/parameters/CommandName" + }, + { + "in": "body", + "name": "body", + "description": "Device command body.", + "schema": { + "$ref": "#/definitions/DeviceCommand" + }, + "required": true + } + ], + "responses": { + "201": { + "description": "Success", + "schema": { + "$ref": "#/definitions/DeviceCommand" + } + } + } + } + }, + "/devices/{deviceId}/components": { + "get": { + "operationId": "Devices_ListComponents", + "summary": "List the components present in a device", + "x-ms-examples": { + "List components": { + "$ref": "./examples/devices_components_get.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/Version" + }, + { + "$ref": "#/parameters/DeviceId" + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/Collection" + } + } + } + } + }, + "/devices/{deviceId}/components/{componentName}/commands/{commandName}": { + "get": { + "operationId": "Devices_GetComponentCommandHistory", + "summary": "Get component command history", + "x-ms-examples": { + "Get command history": { + "$ref": "./examples/devices_commandshistory_get.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/Version" + }, + { + "$ref": "#/parameters/DeviceId" + }, + { + "$ref": "#/parameters/ComponentName" + }, + { + "$ref": "#/parameters/CommandName" + } + ], + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/DeviceCommandCollection" + } + } + } + }, + "post": { + "operationId": "Devices_RunComponentCommand", + "summary": "Run a component command", + "description": "Run a command on a component.", + "x-ms-examples": { + "Send command": { + "$ref": "./examples/devices_commands_send.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/Version" + }, + { + "$ref": "#/parameters/DeviceId" + }, + { + "$ref": "#/parameters/ComponentName" + }, + { + "$ref": "#/parameters/CommandName" + }, + { + "in": "body", + "name": "body", + "description": "Device command body.", + "schema": { + "$ref": "#/definitions/DeviceCommand" + }, + "required": true + } + ], + "responses": { + "201": { + "description": "Success", + "schema": { + "$ref": "#/definitions/DeviceCommand" + } + } + } + } + }, + "/devices/{deviceId}/components/{componentName}/properties": { + "get": { + "operationId": "Devices_GetComponentProperties", + "summary": "Get device properties for a specific component", + "x-ms-examples": { + "Get properties on components": { + "$ref": "./examples/devices_properties_components_get.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/Version" + }, + { + "$ref": "#/parameters/DeviceId" + }, + { + "$ref": "#/parameters/ComponentName" + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/DeviceProperties" + } + } + } + }, + "put": { + "operationId": "Devices_ReplaceComponentProperties", + "summary": "Replace device properties for a specific component", + "x-ms-examples": { + "Update properties on components": { + "$ref": "./examples/devices_properties_components_set.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/Version" + }, + { + "$ref": "#/parameters/DeviceId" + }, + { + "$ref": "#/parameters/ComponentName" + }, + { + "in": "body", + "name": "body", + "description": "Device properties.", + "schema": { + "$ref": "#/definitions/DeviceProperties" + }, + "required": true + } + ], + "responses": { + "202": { + "description": "Success", + "schema": { + "$ref": "#/definitions/DeviceProperties" + } + } + } + }, + "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_set.json" + } + }, + "consumes": [ + "application/json", + "application/json-patch+json" + ], + "parameters": [ + { + "$ref": "#/parameters/Version" + }, + { + "$ref": "#/parameters/DeviceId" + }, + { + "$ref": "#/parameters/ComponentName" + }, + { + "in": "body", + "name": "body", + "description": "Device properties patch.", + "schema": { + "type": "object" + }, + "required": true + } + ], + "responses": { + "202": { + "description": "Success", + "schema": { + "$ref": "#/definitions/DeviceProperties" + } + } + } + } + }, + "/devices/{deviceId}/components/{componentName}/telemetry/{telemetryName}": { + "get": { + "operationId": "Devices_GetComponentTelemetryValue", + "summary": "Get component telemetry value", + "description": "Get the last telemetry value from a component.", + "x-ms-examples": { + "Get telemetry": { + "$ref": "./examples/devices_telemetry_get.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/Version" + }, + { + "$ref": "#/parameters/DeviceId" + }, + { + "$ref": "#/parameters/ComponentName" + }, + { + "$ref": "#/parameters/TelemetryName" + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/DeviceTelemetry" + } + } + } + } + }, + "/devices/{deviceId}/credentials": { + "get": { + "operationId": "Devices_GetCredentials", + "summary": "Get device credentials", + "x-ms-examples": { + "Get device credentials": { + "$ref": "./examples/devicecredentials_get.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/Version" + }, + { + "$ref": "#/parameters/DeviceId" + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/DeviceCredentials" + } + } + } + } + }, + "/devices/{deviceId}/modules": { + "get": { + "operationId": "Devices_ListModules", + "summary": "List the modules present in a device", + "x-ms-examples": { + "List modules": { + "$ref": "./examples/devices_modules_get.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/Version" + }, + { + "$ref": "#/parameters/DeviceId" + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/Collection" + } + } + } + } + }, + "/devices/{deviceId}/modules/{moduleName}/commands/{commandName}": { + "get": { + "operationId": "Devices_GetModuleCommandHistory", + "summary": "Get module command history", + "x-ms-examples": { + "Get command history within module": { + "$ref": "./examples/modules_commandshistory_get.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/Version" + }, + { + "$ref": "#/parameters/DeviceId" + }, + { + "$ref": "#/parameters/ModuleName" + }, + { + "$ref": "#/parameters/CommandName" + } + ], + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/DeviceCommandCollection" + } + } + } + }, + "post": { + "operationId": "Devices_RunModuleCommand", + "summary": "Run a module command", + "description": "Run a command on a module.", + "x-ms-examples": { + "Send command to module": { + "$ref": "./examples/modules_commands_send.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/Version" + }, + { + "$ref": "#/parameters/DeviceId" + }, + { + "$ref": "#/parameters/ModuleName" + }, + { + "$ref": "#/parameters/CommandName" + }, + { + "in": "body", + "name": "body", + "description": "Device command body.", + "schema": { + "$ref": "#/definitions/DeviceCommand" + }, + "required": true + } + ], + "responses": { + "201": { + "description": "Success", + "schema": { + "$ref": "#/definitions/DeviceCommand" + } + } + } + } + }, + "/devices/{deviceId}/modules/{moduleName}/components": { + "get": { + "operationId": "Devices_ListModuleComponents", + "summary": "List the components present in a module", + "x-ms-examples": { + "List module components": { + "$ref": "./examples/devices_modules_components_get.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/Version" + }, + { + "$ref": "#/parameters/DeviceId" + }, + { + "$ref": "#/parameters/ModuleName" + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/Collection" + } + } + } + } + }, + "/devices/{deviceId}/modules/{moduleName}/components/{componentName}/commands/{commandName}": { + "get": { + "operationId": "Devices_GetModuleComponentCommandHistory", + "summary": "Get module component command history", + "x-ms-examples": { + "Get command history within module": { + "$ref": "./examples/modules_commandshistory_get.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/Version" + }, + { + "$ref": "#/parameters/DeviceId" + }, + { + "$ref": "#/parameters/ModuleName" + }, + { + "$ref": "#/parameters/ComponentName" + }, + { + "$ref": "#/parameters/CommandName" + } + ], + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/DeviceCommandCollection" + } + } + } + }, + "post": { + "operationId": "Devices_RunModuleComponentCommand", + "summary": "Run a module component command", + "description": "Run a command on a module.", + "x-ms-examples": { + "Send command to module": { + "$ref": "./examples/modules_commands_send.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/Version" + }, + { + "$ref": "#/parameters/DeviceId" + }, + { + "$ref": "#/parameters/ModuleName" + }, + { + "$ref": "#/parameters/ComponentName" + }, + { + "$ref": "#/parameters/CommandName" + }, + { + "in": "body", + "name": "body", + "description": "Device command body.", + "schema": { + "$ref": "#/definitions/DeviceCommand" + }, + "required": true + } + ], + "responses": { + "201": { + "description": "Success", + "schema": { + "$ref": "#/definitions/DeviceCommand" + } + } + } + } + }, + "/devices/{deviceId}/modules/{moduleName}/components/{componentName}/properties": { + "get": { + "operationId": "Devices_GetModuleComponentProperties", + "summary": "Get module properties for a specific component", + "x-ms-examples": { + "Get properties of a module": { + "$ref": "./examples/modules_properties_components_get.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/Version" + }, + { + "$ref": "#/parameters/DeviceId" + }, + { + "$ref": "#/parameters/ModuleName" + }, + { + "$ref": "#/parameters/ComponentName" + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/DeviceProperties" + } + } + } + }, + "put": { + "operationId": "Devices_ReplaceModuleComponentProperties", + "summary": "Replace module properties for a specific component", + "x-ms-examples": { + "Update properties of a module within a component": { + "$ref": "./examples/modules_properties_components_set.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/Version" + }, + { + "$ref": "#/parameters/DeviceId" + }, + { + "$ref": "#/parameters/ModuleName" + }, + { + "$ref": "#/parameters/ComponentName" + }, + { + "in": "body", + "name": "body", + "description": "Module properties.", + "schema": { + "$ref": "#/definitions/DeviceProperties" + }, + "required": true + } + ], + "responses": { + "202": { + "description": "Success", + "schema": { + "$ref": "#/definitions/DeviceProperties" + } + } + } + }, + "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_set.json" + } + }, + "consumes": [ + "application/json", + "application/json-patch+json" + ], + "parameters": [ + { + "$ref": "#/parameters/Version" + }, + { + "$ref": "#/parameters/DeviceId" + }, + { + "$ref": "#/parameters/ModuleName" + }, + { + "$ref": "#/parameters/ComponentName" + }, + { + "in": "body", + "name": "body", + "description": "Module properties patch.", + "schema": { + "type": "object" + }, + "required": true + } + ], + "responses": { + "202": { + "description": "Success", + "schema": { + "$ref": "#/definitions/DeviceProperties" + } + } + } + } + }, + "/devices/{deviceId}/modules/{moduleName}/components/{componentName}/telemetry/{telemetryName}": { + "get": { + "operationId": "Devices_GetModuleComponentTelemetryValue", + "summary": "Get module component telemetry value", + "description": "Get the last telemetry value from a module component.", + "x-ms-examples": { + "Get telemetry from module": { + "$ref": "./examples/modules_telemetry_get.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/Version" + }, + { + "$ref": "#/parameters/DeviceId" + }, + { + "$ref": "#/parameters/ModuleName" + }, + { + "$ref": "#/parameters/ComponentName" + }, + { + "$ref": "#/parameters/TelemetryName" + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/DeviceTelemetry" + } + } + } + } + }, + "/devices/{deviceId}/modules/{moduleName}/properties": { + "get": { + "operationId": "Devices_GetModuleProperties", + "summary": "Get module properties", + "description": "Get all property values of a module.", + "x-ms-examples": { + "Get properties of a module": { + "$ref": "./examples/modules_properties_get.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/Version" + }, + { + "$ref": "#/parameters/DeviceId" + }, + { + "$ref": "#/parameters/ModuleName" + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/DeviceProperties" + } + } + } + }, + "put": { + "operationId": "Devices_ReplaceModuleProperties", + "summary": "Replace module properties", + "description": "Replace all property values of a module.", + "x-ms-examples": { + "Update properties of a module": { + "$ref": "./examples/modules_properties_update.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/Version" + }, + { + "$ref": "#/parameters/DeviceId" + }, + { + "$ref": "#/parameters/ModuleName" + }, + { + "in": "body", + "name": "body", + "description": "Module properties.", + "schema": { + "$ref": "#/definitions/DeviceProperties" + }, + "required": true + } + ], + "responses": { + "202": { + "description": "Success", + "schema": { + "$ref": "#/definitions/DeviceProperties" + } + } + } + }, + "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" + } + }, + "consumes": [ + "application/json", + "application/json-patch+json" + ], + "parameters": [ + { + "$ref": "#/parameters/Version" + }, + { + "$ref": "#/parameters/DeviceId" + }, + { + "$ref": "#/parameters/ModuleName" + }, + { + "in": "body", + "name": "body", + "description": "Module properties patch.", + "schema": { + "type": "object" + }, + "required": true + } + ], + "responses": { + "202": { + "description": "Success", + "schema": { + "$ref": "#/definitions/DeviceProperties" + } + } + } + } + }, + "/devices/{deviceId}/modules/{moduleName}/telemetry/{telemetryName}": { + "get": { + "operationId": "Devices_GetModuleTelemetryValue", + "summary": "Get module telemetry value", + "description": "Get the last telemetry value from a module.", + "x-ms-examples": { + "Get telemetry from module": { + "$ref": "./examples/modules_telemetry_get.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/Version" + }, + { + "$ref": "#/parameters/DeviceId" + }, + { + "$ref": "#/parameters/ModuleName" + }, + { + "$ref": "#/parameters/TelemetryName" + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/DeviceTelemetry" + } + } + } + } + }, + "/devices/{deviceId}/properties": { + "get": { + "operationId": "Devices_GetProperties", + "summary": "Get device properties", + "description": "Get all property values of a device by device ID.", + "x-ms-examples": { + "Get properties": { + "$ref": "./examples/devices_properties_get.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/Version" + }, + { + "$ref": "#/parameters/DeviceId" + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/DeviceProperties" + } + } + } + }, + "put": { + "operationId": "Devices_ReplaceProperties", + "summary": "Replace device properties", + "description": "Replace all property values of a device by device ID.", + "x-ms-examples": { + "Update properties": { + "$ref": "./examples/devices_properties_update.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/Version" + }, + { + "$ref": "#/parameters/DeviceId" + }, + { + "in": "body", + "name": "body", + "description": "Device properties.", + "schema": { + "$ref": "#/definitions/DeviceProperties" + }, + "required": true + } + ], + "responses": { + "202": { + "description": "Success", + "schema": { + "$ref": "#/definitions/DeviceProperties" + } + } + } + }, + "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" + } + }, + "consumes": [ + "application/json", + "application/json-patch+json" + ], + "parameters": [ + { + "$ref": "#/parameters/Version" + }, + { + "$ref": "#/parameters/DeviceId" + }, + { + "in": "body", + "name": "body", + "description": "Device properties patch.", + "schema": { + "type": "object" + }, + "required": true + } + ], + "responses": { + "202": { + "description": "Success", + "schema": { + "$ref": "#/definitions/DeviceProperties" + } + } + } + } + }, + "/devices/{deviceId}/telemetry/{telemetryName}": { + "get": { + "operationId": "Devices_GetTelemetryValue", + "summary": "Get device telemetry value", + "description": "Get the last telemetry value from a device.", + "x-ms-examples": { + "Get telemetry": { + "$ref": "./examples/devices_telemetry_get.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/Version" + }, + { + "$ref": "#/parameters/DeviceId" + }, + { + "$ref": "#/parameters/TelemetryName" + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/DeviceTelemetry" + } + } + } + } + }, + "/fileUploads": { + "get": { + "operationId": "FileUploads_Get", + "summary": "Get the file upload storage account configuration.", + "x-ms-examples": { + "Get file upload storage account configuration": { + "$ref": "./examples/fileUpload_get.json" + } + }, + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/FileUpload" + } + } + } + }, + "put": { + "operationId": "FileUploads_Create", + "summary": "Create the file upload storage account configuration.", + "x-ms-examples": { + "Create file upload storage account configuration": { + "$ref": "./examples/fileUpload_update.json" + } + }, + "parameters": [ + { + "in": "body", + "name": "body", + "description": "File upload storage account configuration body.", + "schema": { + "$ref": "#/definitions/FileUpload" + }, + "required": true + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/FileUpload" + } + } + } + }, + "patch": { + "operationId": "FileUploads_Update", + "summary": "Update the file upload storage account configuration", + "x-ms-examples": { + "Update file upload storage account configuration": { + "$ref": "./examples/fileUpload_update.json" + } + }, + "consumes": [ + "application/json", + "application/json-patch+json" + ], + "parameters": [ + { + "in": "body", + "name": "body", + "description": "File upload storage account configuration body.", + "schema": { + "type": "object" + }, + "required": true + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/FileUpload" + } + } + } + }, + "delete": { + "operationId": "FileUploads_Remove", + "summary": "Delete the file upload storage configuration.", + "x-ms-examples": { + "Remove file upload storage configuration": { + "$ref": "./examples/fileUpload_delete.json" + } + }, + "responses": { + "204": { + "description": "Success" + } + } + } + }, + "/jobs": { + "get": { + "operationId": "Jobs_List", + "summary": "Get the list of jobs in an application", + "x-ms-examples": { + "List jobs": { + "$ref": "./examples/jobs_list.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/Version" + } + ], + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/JobCollection" + } + } + } + } + }, + "/jobs/{jobId}": { + "get": { + "operationId": "Jobs_Get", + "summary": "Get a job by ID", + "description": "Get details about a running or completed job by job ID.", + "x-ms-examples": { + "Get a job by Id": { + "$ref": "./examples/jobs_get.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/Version" + }, + { + "$ref": "#/parameters/JobId" + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/Job" + } + } + } + }, + "put": { + "operationId": "Jobs_Create", + "summary": "Execute a new job", + "description": "Create and execute a new job via its job definition.", + "x-ms-examples": { + "Execute a new job": { + "$ref": "./examples/jobs_create.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/Version" + }, + { + "$ref": "#/parameters/JobId" + }, + { + "in": "body", + "name": "body", + "description": "Job definition.", + "schema": { + "$ref": "#/definitions/Job" + }, + "required": true + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/Job" + } + } + } + } + }, + "/jobs/{jobId}/devices": { + "get": { + "operationId": "Jobs_GetDevices", + "summary": "Get device statuses", + "description": "Get the list of individual device statuses by job ID.", + "x-ms-examples": { + "Get device statuses": { + "$ref": "./examples/jobs_devices.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/Version" + }, + { + "$ref": "#/parameters/JobId" + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/JobDeviceStatusCollection" + } + } + } + } + }, + "/jobs/{jobId}/rerun/{rerunId}": { + "put": { + "operationId": "Jobs_Rerun", + "summary": "Rerun a job on failed devices", + "description": "Execute a rerun of an existing job on all failed devices.", + "x-ms-examples": { + "Rerun a job on failed devices": { + "$ref": "./examples/jobs_rerun.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/Version" + }, + { + "$ref": "#/parameters/JobId" + }, + { + "in": "path", + "name": "rerunId", + "description": "Unique ID of the job rerun.", + "x-ms-parameter-location": "method", + "type": "string", + "required": true + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/Job" + } + } + } + } + }, + "/jobs/{jobId}/resume": { + "post": { + "operationId": "Jobs_Resume", + "summary": "Resume a stopped job", + "description": "Resume execution of an existing stopped job.", + "x-ms-examples": { + "Resume a stopped job": { + "$ref": "./examples/jobs_resume.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/Version" + }, + { + "$ref": "#/parameters/JobId" + } + ], + "responses": { + "204": { + "description": "Success" + } + } + } + }, + "/jobs/{jobId}/stop": { + "post": { + "operationId": "Jobs_Stop", + "summary": "Stop a running job", + "description": "Stop execution of a job that is currently running.", + "x-ms-examples": { + "Stop a running job": { + "$ref": "./examples/jobs_stop.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/Version" + }, + { + "$ref": "#/parameters/JobId" + } + ], + "responses": { + "204": { + "description": "Success" + } + } + } + }, + "/organizations": { + "get": { + "operationId": "Organizations_List", + "summary": "Get the list of organizations the user has access to in an application.", + "x-ms-examples": { + "List organizations": { + "$ref": "./examples/organizations_list.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/Version" + } + ], + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/OrganizationCollection" + } + } + } + } + }, + "/organizations/{organizationId}": { + "get": { + "operationId": "Organizations_Get", + "summary": "Get an organization by ID", + "x-ms-examples": { + "Get organization": { + "$ref": "./examples/organizations_get.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/Version" + }, + { + "in": "path", + "name": "organizationId", + "description": "Unique ID of the organization.", + "type": "string", + "required": true + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/Organization" + } + } + } + }, + "put": { + "operationId": "Organizations_Create", + "summary": "Create an organization in the application", + "x-ms-examples": { + "Add or update organization": { + "$ref": "./examples/organizations_create.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/Version" + }, + { + "in": "path", + "name": "organizationId", + "description": "Unique ID of the organization.", + "type": "string", + "required": true + }, + { + "in": "body", + "name": "body", + "description": "Organization body.", + "schema": { + "$ref": "#/definitions/Organization" + }, + "required": true + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/Organization" + } + } + } + }, + "patch": { + "operationId": "Organizations_Update", + "summary": "Update an organization in the application via patch", + "x-ms-examples": { + "Update organization": { + "$ref": "./examples/organizations_create.json" + } + }, + "consumes": [ + "application/json", + "application/json-patch+json" + ], + "parameters": [ + { + "$ref": "#/parameters/Version" + }, + { + "in": "path", + "name": "organizationId", + "description": "Unique ID of the organization.", + "type": "string", + "required": true + }, + { + "in": "body", + "name": "body", + "description": "Organization patch body.", + "schema": { + "type": "object" + }, + "required": true + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/Organization" + } + } + } + }, + "delete": { + "operationId": "Organizations_Remove", + "summary": "Delete an organization", + "x-ms-examples": { + "Delete organization": { + "$ref": "./examples/organizations_delete.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/Version" + }, + { + "in": "path", + "name": "organizationId", + "description": "Unique ID of the organization.", + "type": "string", + "required": true + } + ], + "responses": { + "204": { + "description": "Success" + } + } + } + }, + "/roles": { + "get": { + "operationId": "Roles_List", + "summary": "Get the list of roles in an application.", + "x-ms-examples": { + "List roles": { + "$ref": "./examples/roles_list.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/Version" + } + ], + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/RoleCollection" + } + } + } + } + }, + "/roles/{roleId}": { + "get": { + "operationId": "Roles_Get", + "summary": "Get a role by ID.", + "x-ms-examples": { + "Get role by Id": { + "$ref": "./examples/roles_get.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/Version" + }, + { + "in": "path", + "name": "roleId", + "description": "Unique ID for the role.", + "type": "string", + "required": true + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/Role" + } + } + } + } + }, + "/users": { + "get": { + "operationId": "Users_List", + "summary": "Get the list of users in an application", + "x-ms-examples": { + "List users": { + "$ref": "./examples/users_list.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/Version" + } + ], + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/UserCollection" + } + } + } + } + }, + "/users/{userId}": { + "get": { + "operationId": "Users_Get", + "summary": "Get a user by ID", + "x-ms-examples": { + "Get a user by ID": { + "$ref": "./examples/users_get.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/Version" + }, + { + "in": "path", + "name": "userId", + "description": "Unique ID of the user.", + "type": "string", + "required": true + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/User" + } + } + } + }, + "put": { + "operationId": "Users_Create", + "summary": "Create a user in the application", + "x-ms-examples": { + "Add or update a service principal user": { + "$ref": "./examples/users_set_serviceprincipal.json" + }, + "Add or update an email user": { + "$ref": "./examples/users_set.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/Version" + }, + { + "in": "path", + "name": "userId", + "description": "Unique ID of the user.", + "type": "string", + "required": true + }, + { + "in": "body", + "name": "body", + "description": "User body.", + "schema": { + "$ref": "#/definitions/User" + }, + "required": true + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/User" + } + } + } + }, + "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_set.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/Version" + }, + { + "in": "path", + "name": "userId", + "description": "Unique ID of the user.", + "type": "string", + "required": true + }, + { + "in": "body", + "name": "body", + "description": "User patch body.", + "schema": { + "type": "object" + }, + "required": true + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/User" + } + } + } + }, + "delete": { + "operationId": "Users_Remove", + "summary": "Delete a user", + "x-ms-examples": { + "Delete a user": { + "$ref": "./examples/users_delete.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/Version" + }, + { + "in": "path", + "name": "userId", + "description": "Unique ID of the user.", + "type": "string", + "required": true + } + ], + "responses": { + "204": { + "description": "Success" + } + } + } + } + }, + "parameters": { + "BaseDomain": { + "in": "path", + "name": "baseDomain", + "description": "The base domain for all Azure IoT Central service requests.", + "x-ms-parameter-location": "client", + "type": "string", + "x-ms-skip-url-encoding": true, + "default": "azureiotcentral.com", + "required": true + }, + "CommandName": { + "in": "path", + "name": "commandName", + "description": "Name of this device command.", + "x-ms-parameter-location": "method", + "type": "string", + "required": true + }, + "ComponentName": { + "in": "path", + "name": "componentName", + "description": "Name of the device component.", + "x-ms-parameter-location": "method", + "type": "string", + "required": true + }, + "DeviceId": { + "in": "path", + "name": "deviceId", + "description": "Unique ID of the device.", + "x-ms-parameter-location": "method", + "type": "string", + "required": true + }, + "DeviceTemplateId": { + "in": "path", + "name": "deviceTemplateId", + "description": "Unique [Digital Twin Model Identifier](https://github.com/Azure/opendigitaltwins-dtdl/blob/master/DTDL/v2/dtdlv2.md#digital-twin-model-identifier) of the device template.", + "x-ms-parameter-location": "method", + "type": "string", + "required": true + }, + "JobId": { + "in": "path", + "name": "jobId", + "description": "Unique ID of the job.", + "x-ms-parameter-location": "method", + "type": "string", + "required": true + }, + "ModuleName": { + "in": "path", + "name": "moduleName", + "description": "Name of the device module.", + "x-ms-parameter-location": "method", + "type": "string", + "required": true + }, + "Subdomain": { + "in": "path", + "name": "subdomain", + "description": "The application subdomain.", + "x-ms-parameter-location": "client", + "type": "string", + "required": true + }, + "TelemetryName": { + "in": "path", + "name": "telemetryName", + "description": "Name of this device telemetry.", + "x-ms-parameter-location": "method", + "type": "string", + "required": true + }, + "Version": { + "in": "query", + "name": "api-version", + "description": "The version of the API being called.", + "x-ms-parameter-location": "client", + "type": "string", + "enum": [ + "1.1-preview" + ], + "required": true + } + }, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "flow": "implicit", + "description": "Azure Active Directory OAuth2 Flow", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + } +} diff --git a/specification/iotcentral/data-plane/readme.go.md b/specification/iotcentral/data-plane/readme.go.md index bb157476ac20..40761dd5f3fe 100644 --- a/specification/iotcentral/data-plane/readme.go.md +++ b/specification/iotcentral/data-plane/readme.go.md @@ -8,5 +8,5 @@ go: license-header: MICROSOFT_MIT_NO_VERSION namespace: iotcentral clear-output-folder: true - output-folder: $(go-sdks-folder)/services/preview/$(namespace)/2021-04-30-preview/$(namespace) + output-folder: $(go-sdks-folder)/services/preview/$(namespace)/1.1-preview/$(namespace) ``` \ No newline at end of file diff --git a/specification/iotcentral/data-plane/readme.md b/specification/iotcentral/data-plane/readme.md index 86b5c74bbc71..cf1ca68fde38 100644 --- a/specification/iotcentral/data-plane/readme.md +++ b/specification/iotcentral/data-plane/readme.md @@ -17,7 +17,15 @@ These are the global settings for the IoT Central API. ``` yaml openapi-type: data-plane -tag: package-2021-04-30-preview +tag: package-1.1-preview +``` + +### Tag: package-1.1-preview +These settings apply only when `--tag=package-1.1-preview` is specified on the command line. + +```yaml $(tag) == 'package-1.1-preview' +input-file: + - Microsoft.IoTCentral/preview/1.1-preview/iotcentral.json ``` ### Tag: package-2021-04-30-preview diff --git a/specification/iotcentral/data-plane/readme.python.md b/specification/iotcentral/data-plane/readme.python.md index adf805b22311..17a1ff783a1e 100644 --- a/specification/iotcentral/data-plane/readme.python.md +++ b/specification/iotcentral/data-plane/readme.python.md @@ -12,6 +12,17 @@ python: clear-output-folder: true ``` +### Tag: package-1.1-preview +These settings apply only when `--tag=package-1.1-preview` is specified on the command line. + +```yaml $(tag) == 'package-1.1-preview' +python: + namespace: Microsoft.Azure.IotCentral.Preview + package-name: iotcentral + package-version: 1.1-preview + output-folder: $(python-sdks-folder)/iotcentral/1.1-preview +``` + ### Tag: package-2021-04-30-preview These settings apply only when `--tag=package-2021-04-30-preview` is specified on the command line.