diff --git a/custom-words.txt b/custom-words.txt index 0fc88446917e..76676b4676d7 100644 --- a/custom-words.txt +++ b/custom-words.txt @@ -86,6 +86,7 @@ apimtags apimtenant apimusers apimversionsets +apitoken APNS appinsights applynetworkconfigurationupdates @@ -145,6 +146,7 @@ azuredatalakestore azuredeploy azureedge azurefiles +azureiotcentral azuremigrate azureml azuresql @@ -260,6 +262,7 @@ closedlist closedlists Cloudamize cloudapp +cloudproperties cloudsimple clustermonitoring Cmdkey @@ -272,6 +275,7 @@ codegeneration cognitiveservices colls COLUMNSTORE +commandshistory commitmentplans Compat compilationjobs @@ -291,6 +295,7 @@ containersas containerservice contentmoderator continuationtoken +continuousdataexports continuouswebjobs contoso contosodataset @@ -403,7 +408,9 @@ deserializer deserializing destinationshares deterministically +devicecredentials deviceprovisioningservices +devicetemplates devspaces devtestlab devtestlabs diff --git a/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/apitoken_create.json b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/apitoken_create.json new file mode 100644 index 000000000000..cdf8169186f8 --- /dev/null +++ b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/apitoken_create.json @@ -0,0 +1,26 @@ +{ + "title": "Get API tokens in your application", + "description": "Get a list of API tokens in your application.", + "parameters": { + "centralDnsSuffixInPath": "azureiotcentral.com", + "subdomain": "appsubdomain", + "token_id": "testtoken", + "body": { + "roles": [ + "c7be2c6b-797e-4551-bb24-33709f6b2e20" + ] + } + }, + "responses": { + "200": { + "body": { + "id": "testtoken", + "roles": [ + "ca310b8d-2f4a-44e0-a36e-957c202cd8d4" + ], + "expiry": "2020-10-18T18:30:40.227Z", + "token": "SharedAccessSignature sr=..." + } + } + } + } diff --git a/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/apitoken_delete.json b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/apitoken_delete.json new file mode 100644 index 000000000000..a8d426de665e --- /dev/null +++ b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/apitoken_delete.json @@ -0,0 +1,12 @@ +{ + "title": "Delete API token", + "description": "Delete an API token using its name.", + "parameters": { + "centralDnsSuffixInPath": "azureiotcentral.com", + "subdomain": "appsubdomain", + "token_id": "testtoken" + }, + "responses": { + "204": {} + } +} diff --git a/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/apitoken_get.json b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/apitoken_get.json new file mode 100644 index 000000000000..403d331a9a9b --- /dev/null +++ b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/apitoken_get.json @@ -0,0 +1,20 @@ +{ + "title": "Get API tokens in your application", + "description": "Get a list of API tokens in your application.", + "parameters": { + "centralDnsSuffixInPath": "azureiotcentral.com", + "subdomain": "appsubdomain", + "token_id": "testtoken" + }, + "responses": { + "200": { + "body": { + "id": "testtoken", + "roles": [ + "ca310b8d-2f4a-44e0-a36e-957c202cd8d4" + ], + "expiry": "2020-10-18T18:30:40.227Z" + } + } + } + } diff --git a/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/apitoken_list.json b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/apitoken_list.json new file mode 100644 index 000000000000..3bbec634ab9e --- /dev/null +++ b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/apitoken_list.json @@ -0,0 +1,23 @@ +{ + "title": "List API tokens in your application", + "description": "Get a list of API tokens in your application.", + "parameters": { + "centralDnsSuffixInPath": "azureiotcentral.com", + "subdomain": "appsubdomain" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "testtoken", + "roles": [ + "ca310b8d-2f4a-44e0-a36e-957c202cd8d4" + ], + "expiry": "2020-10-18T18:30:40.227Z" + } + ] + } + } + } + } diff --git a/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/application_get.json b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/application_get.json new file mode 100644 index 000000000000..247e78a23574 --- /dev/null +++ b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/application_get.json @@ -0,0 +1,21 @@ +{ + "title": "Get an application by Id", + "description": "Get an application by Id.", + "parameters": { + "centralDnsSuffixInPath": "azureiotcentral.com", + "subdomain": "appsubdomain", + "application_id":"194e282c-290a-4858-b68f-4274690697fc" + }, + "responses": { + "200": { + "body": { + + "id": "194e282c-290a-4858-b68f-4274690697fc", + "displayName": "x - Store Analytics Checkout - PnP", + "subdomain": "store-analytics-checkout---pnp", + "host": "store-analytics-checkout---pnp.azureiotcentral.com" + + } + } + } + } diff --git a/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/application_list.json b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/application_list.json new file mode 100644 index 000000000000..b55079257955 --- /dev/null +++ b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/application_list.json @@ -0,0 +1,28 @@ +{ + "title": "List applications", + "description": "List applications that are accessible to the signed-in user.", + "parameters": { + "centralDnsSuffixInPath": "azureiotcentral.com", + "subdomain": "appsubdomain" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "194e282c-290a-4858-b68f-4274690697fc", + "displayName": "x - Store Analytics Checkout - PnP", + "subdomain": "store-analytics-checkout---pnp", + "host": "store-analytics-checkout---pnp.azureiotcentral.com" + }, + { + "id": "ca517ec7-234e-4cbb-9d83-424f8a1d1809", + "displayName": "Custom 2gskl57ibaw", + "subdomain": "contoso", + "host": "contoso.azureiotcentral.com" + } + ] + } + } + } +} diff --git a/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/continuousdataexports_delete.json b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/continuousdataexports_delete.json new file mode 100644 index 000000000000..119879c7b094 --- /dev/null +++ b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/continuousdataexports_delete.json @@ -0,0 +1,12 @@ +{ + "title": "Delete export", + "description": "Delete an export using its Id.", + "parameters": { + "centralDnsSuffixInPath": "azureiotcentral.com", + "subdomain": "appsubdomain", + "export_id": "abc" + }, + "responses": { + "204": {} + } +} diff --git a/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/continuousdataexports_get.json b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/continuousdataexports_get.json new file mode 100644 index 000000000000..702c6ee42e2e --- /dev/null +++ b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/continuousdataexports_get.json @@ -0,0 +1,30 @@ +{ + "title": "Get export", + "description": "Get an export using its Id.", + "parameters": { + "centralDnsSuffixInPath": "azureiotcentral.com", + "subdomain": "appsubdomain", + "export_id": "16cad42a-bd47-4684-b106-9f9b4d2d02e9" + }, + "responses": { + "200": { + "body": { + "id": "16cad42a-bd47-4684-b106-9f9b4d2d02e9", + "etag": "076f201d-e9c3-4bef-af0a-608420ba4526", + "displayName": "Export to Storage 1", + "endpoint": { + "type": "StorageEndpoint", + "connectionString": "DefaultEndpointsProtocol=https;AccountName=jeffscratchppe;AccountKey=*****;EndpointSuffix=core.windows.net", + "name": "cde" + }, + "status": "running", + "enabled": true, + "sources": [ + "devices", + "deviceTemplates", + "telemetry" + ] + } + } + } + } diff --git a/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/continuousdataexports_list.json b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/continuousdataexports_list.json new file mode 100644 index 000000000000..9c4de398a267 --- /dev/null +++ b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/continuousdataexports_list.json @@ -0,0 +1,50 @@ +{ + "title": "List exports", + "description": "Get a list of all exports in your application", + "parameters": { + "centralDnsSuffixInPath": "azureiotcentral.com", + "subdomain": "appsubdomain" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "16cad42a-bd47-4684-b106-9f9b4d2d02e9", + "etag": "076f201d-e9c3-4bef-af0a-608420ba4526", + "displayName": "Export to Storage 1", + "endpoint": { + "type": "StorageEndpoint", + "connectionString": "DefaultEndpointsProtocol=https;AccountName=jeffscratchppe;AccountKey=*****;EndpointSuffix=core.windows.net", + "name": "cde" + }, + "status": "starting", + "enabled": true, + "sources": [ + "devices", + "deviceTemplates", + "telemetry" + ] + }, + { + "id": "9dce0282-751d-4121-aed3-b316d658f17a", + "etag": "3398c6b5-de40-44ad-bf4a-0c216e2b4d88", + "displayName": "Export to Event Hubs 1", + "endpoint": { + "type": "EventHubsEndpoint", + "connectionString": "Endpoint=sb://roommonitoring.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=*****", + "name": "roommonitoring-ehout" + }, + "status": "stopping", + "enabled": false, + "sources": [ + "devices", + "deviceTemplates", + "telemetry" + ] + } + ] + } + } + } + } diff --git a/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/continuousdataexports_set.json b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/continuousdataexports_set.json new file mode 100644 index 000000000000..a94e0dc109e2 --- /dev/null +++ b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/continuousdataexports_set.json @@ -0,0 +1,44 @@ +{ + "title": "Create or update export", + "description": "Create a new export or update an existing export, specifying its Id.", + "parameters": { + "centralDnsSuffixInPath": "azureiotcentral.com", + "subdomain": "appsubdomain", + "export_id": "abc", + "body": { + "displayName": "Export to Storage 2", + "endpoint": { + "type": "StorageEndpoint", + "connectionString": "{Connection-string-to-blob-storage}", + "name": "container" + }, + "enabled": true, + "sources": [ + "devices", + "deviceTemplates", + "telemetry" + ] + } + }, + "responses": { + "200": { + "body": { + "id": "abc", + "etag": "7e02c03e-25cb-4d1c-9f6b-019506283872", + "displayName": "Export to Storage 2", + "endpoint": { + "type": "StorageEndpoint", + "connectionString": "DefaultEndpointsProtocol=https;AccountName=contosoiotcstorage;AccountKey=*****;EndpointSuffix=core.windows.net", + "name": "container" + }, + "status": "starting", + "enabled": true, + "sources": [ + "devices", + "deviceTemplates", + "telemetry" + ] + } + } + } + } diff --git a/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/devicecredentials_get.json b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/devicecredentials_get.json new file mode 100644 index 000000000000..79306f555b31 --- /dev/null +++ b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/devicecredentials_get.json @@ -0,0 +1,20 @@ +{ + "title": "Get device credentials", + "description": "Get the device credentials of a created device. Returns the app's scope Id and device SAS key", + "parameters": { + "centralDnsSuffixInPath": "azureiotcentral.com", + "subdomain": "appsubdomain", + "device_id": "Checkout4" + }, + "responses": { + "200": { + "body":{ + "scopeId": "0ne0005F266", + "symmetricKey": { + "primaryKey": "XaMfV3vryCQw963L2IALf1SdApQRzSIBQd13/fassqM=", + "secondaryKey": "s+4uT31TRZJcTSGxZUPZb1yznjTicu4jr9tXNrg+xIQ=" + } + } + } + } +} diff --git a/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/devices_cloudproperties_get.json b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/devices_cloudproperties_get.json new file mode 100644 index 000000000000..507ac667d74b --- /dev/null +++ b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/devices_cloudproperties_get.json @@ -0,0 +1,16 @@ +{ + "title": "Get cloud property values of a device", + "description": "Get the current values of all cloud properties of a device.", + "parameters": { + "centralDnsSuffixInPath": "azureiotcentral.com", + "subdomain": "appsubdomain", + "device_id": "mx1" + }, + "responses": { + "200": { + "body": { + "AssetID": "123abc" + } + } + } +} diff --git a/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/devices_cloudproperties_update.json b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/devices_cloudproperties_update.json new file mode 100644 index 000000000000..999d46fb6b49 --- /dev/null +++ b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/devices_cloudproperties_update.json @@ -0,0 +1,19 @@ +{ + "title": "Update cloud properties of a device", + "description": "Update cloud properties of a device.", + "parameters": { + "centralDnsSuffixInPath": "azureiotcentral.com", + "subdomain": "appsubdomain", + "body": { + "AssetID": "123abc" + }, + "device_id": "mx1" + }, + "responses": { + "200": { + "body": { + "AssetID": "123abc" + } + } + } +} diff --git a/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/devices_commands_send.json b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/devices_commands_send.json new file mode 100644 index 000000000000..f1181d825a03 --- /dev/null +++ b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/devices_commands_send.json @@ -0,0 +1,15 @@ +{ + "title": "Send command", + "description": "Send a command to a device.", + "parameters": { + "centralDnsSuffixInPath": "azureiotcentral.com", + "subdomain": "appsubdomain", + "device_id": "mx1", + "component_name": "Thermostat_1o", + "command_name": "CoolDown", + "body":{ "request":{"tempVal": 30}} + }, + "responses": { + "201": {"body":{}} + } +} diff --git a/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/devices_commandshistory_get.json b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/devices_commandshistory_get.json new file mode 100644 index 000000000000..cfbbec4852e9 --- /dev/null +++ b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/devices_commandshistory_get.json @@ -0,0 +1,25 @@ +{ + "title": "Get command history", + "description": "Get the most recent invocation of a command of a device.", + "parameters": { + "centralDnsSuffixInPath": "azureiotcentral.com", + "subdomain": "appsubdomain", + "device_id": "mx1", + "component_name": "Thermostat_1o", + "command_name": "CoolDown" + }, + "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/2019-10-28-preview/examples/devices_create.json b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/devices_create.json new file mode 100644 index 000000000000..fc3a60805a2c --- /dev/null +++ b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/devices_create.json @@ -0,0 +1,28 @@ +{ + "title": "Create a device", + "description": "Create a device with an Id.", + "parameters": { + "centralDnsSuffixInPath": "azureiotcentral.com", + "subdomain": "appsubdomain", + "device_id": "ccc", + "body":{ + "displayName": "CheckoutThermostatccc", + "instanceOf": "urn:kmwga2re7:modelDefinition:t_cj5wspyv", + "simulated": true, + "approved": true + } + }, + "responses": { + "200": { + "body": { + "id": "ccc", + "etag": "eyJoZWFkZXIiOiJcIjE1MDE2ZDFiLTAwMDAtMGQwMC0wMDAwLTVkYWNkNDIxMDAwMFwiIiwiZGF0YSI6IlwiMTUwMTZhMWItMDAwMC0wZDAwLTAwMDAtNWRhY2Q0MjEwMDAwXCIifQ", + "displayName": "CheckoutThermostatccc", + "instanceOf": "urn:kmwga2re7:modelDefinition:t_cj5wspyv", + "simulated": true, + "provisioned": false, + "approved": true + } + } + } +} diff --git a/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/devices_delete.json b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/devices_delete.json new file mode 100644 index 000000000000..516955d4b761 --- /dev/null +++ b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/devices_delete.json @@ -0,0 +1,12 @@ +{ + "title": "Delete device", + "description": "Delete a device by Id.", + "parameters": { + "centralDnsSuffixInPath": "azureiotcentral.com", + "subdomain": "appsubdomain", + "device_id": "ccc" + }, + "responses": { + "204": {} + } +} diff --git a/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/devices_get.json b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/devices_get.json new file mode 100644 index 000000000000..4f240615c859 --- /dev/null +++ b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/devices_get.json @@ -0,0 +1,22 @@ +{ + "title": "Get a device by Id", + "description": "Get a device by Id", + "parameters": { + "centralDnsSuffixInPath": "azureiotcentral.com", + "subdomain": "appsubdomain", + "device_id": "CheckoutThermostat" + }, + "responses": { + "200": { + "body": { + "id": "CheckoutThermostat", + "etag": "eyJoZWFkZXIiOiJcIjAyMDA4YzMyLTAwMDAtMGQwMC0wMDAwLTVkOTY4YjdhMDAwMFwiIn0", + "displayName": "CheckoutThermostat", + "instanceOf": "urn:kmwga2re7:modelDefinition:t_cj5wspyv", + "simulated": true, + "provisioned": true, + "approved": true + } + } + } +} diff --git a/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/devices_list.json b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/devices_list.json new file mode 100644 index 000000000000..ce52b0783ec1 --- /dev/null +++ b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/devices_list.json @@ -0,0 +1,52 @@ +{ + "title": "List devices", + "description": "List all devices in your application.", + "parameters": { + "centralDnsSuffixInPath": "azureiotcentral.com", + "subdomain": "appsubdomain" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "CheckoutThermostat", + "etag": "eyJoZWFkZXIiOiJcIjAyMDA4YzMyLTAwMDAtMGQwMC0wMDAwLTVkOTY4YjdhMDAwMFwiIn0", + "displayName": "CheckoutThermostat", + "instanceOf": "urn:kmwga2re7:modelDefinition:t_cj5wspyv", + "simulated": true, + "provisioned": true, + "approved": true + }, + { + "id": "Checkout1", + "etag": "eyJoZWFkZXIiOiJcIjAyMDA4ZDMyLTAwMDAtMGQwMC0wMDAwLTVkOTY4Yjg3MDAwMFwiIn0", + "displayName": "Checkout1", + "instanceOf": "urn:sbk9sd6sl:modelDefinition:u3b_fwd7os", + "simulated": true, + "provisioned": true, + "approved": true + }, + { + "id": "Checkout2", + "etag": "eyJoZWFkZXIiOiJcIjAyMDA5MDMyLTAwMDAtMGQwMC0wMDAwLTVkOTY4Yjg3MDAwMFwiIn0", + "displayName": "Checkout2", + "instanceOf": "urn:sbk9sd6sl:modelDefinition:u3b_fwd7os", + "simulated": true, + "provisioned": true, + "approved": true + }, + { + "id": "Checkout3", + "etag": "eyJoZWFkZXIiOiJcIjAyMDA4ZTMyLTAwMDAtMGQwMC0wMDAwLTVkOTY4Yjg3MDAwMFwiIn0", + "displayName": "Checkout3", + "instanceOf": "urn:sbk9sd6sl:modelDefinition:u3b_fwd7os", + "simulated": true, + "provisioned": true, + "approved": true + } + ] + } + } + } +} diff --git a/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/devices_list_by_template.json b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/devices_list_by_template.json new file mode 100644 index 000000000000..bb1f8cd4ba87 --- /dev/null +++ b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/devices_list_by_template.json @@ -0,0 +1,44 @@ +{ + "title": "List devices associated to a device template.", + "description": "List all devices associated to a device template.", + "parameters": { + "centralDnsSuffixInPath": "azureiotcentral.com", + "subdomain": "appsubdomain", + "device_template_id": "urn:sbk9sd6sl:modelDefinition:u3b_fwd7os" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "Checkout1", + "etag": "eyJoZWFkZXIiOiJcIjAyMDA4ZDMyLTAwMDAtMGQwMC0wMDAwLTVkOTY4Yjg3MDAwMFwiIn0", + "displayName": "Checkout1", + "instanceOf": "urn:sbk9sd6sl:modelDefinition:u3b_fwd7os", + "simulated": true, + "provisioned": true, + "approved": true + }, + { + "id": "Checkout2", + "etag": "eyJoZWFkZXIiOiJcIjAyMDA5MDMyLTAwMDAtMGQwMC0wMDAwLTVkOTY4Yjg3MDAwMFwiIn0", + "displayName": "Checkout2", + "instanceOf": "urn:sbk9sd6sl:modelDefinition:u3b_fwd7os", + "simulated": true, + "provisioned": true, + "approved": true + }, + { + "id": "Checkout3", + "etag": "eyJoZWFkZXIiOiJcIjAyMDA4ZTMyLTAwMDAtMGQwMC0wMDAwLTVkOTY4Yjg3MDAwMFwiIn0", + "displayName": "Checkout3", + "instanceOf": "urn:sbk9sd6sl:modelDefinition:u3b_fwd7os", + "simulated": true, + "provisioned": true, + "approved": true + } + ] + } + } + } +} diff --git a/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/devices_properties_components_get.json b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/devices_properties_components_get.json new file mode 100644 index 000000000000..28531f7b74b0 --- /dev/null +++ b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/devices_properties_components_get.json @@ -0,0 +1,54 @@ +{ + "title": "Get device properties in component", + "description": "Get the read-write property values within a component of a device.", + "parameters": { + "centralDnsSuffixInPath": "azureiotcentral.com", + "subdomain": "appsubdomain", + "device_id": "mx1", + "component_name": "settings" + }, + "responses": { + "200": { + "body": { + "fanSpeed": 35, + "voltage": 5, + "current": 2, + "irSwitch": true, + "$metadata": { + "fanSpeed": { + "desiredValue": 35, + "ackDesiredState": { + "code": 200, + "version": 2, + "description": "Processed" + } + }, + "voltage": { + "desiredValue": 5, + "ackDesiredState": { + "code": 200, + "version": 2, + "description": "Processed" + } + }, + "current": { + "desiredValue": 2, + "ackDesiredState": { + "code": 200, + "version": 2, + "description": "Processed" + } + }, + "irSwitch": { + "desiredValue": true, + "ackDesiredState": { + "code": 200, + "version": 2, + "description": "Processed" + } + } + } + } + } + } +} diff --git a/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/devices_properties_components_set.json b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/devices_properties_components_set.json new file mode 100644 index 000000000000..14bb244a1434 --- /dev/null +++ b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/devices_properties_components_set.json @@ -0,0 +1,36 @@ +{ + "title": "Set device properties in component", + "description": "Set the read-write property values within a component of a device.", + "parameters": { + "centralDnsSuffixInPath": "azureiotcentral.com", + "subdomain": "appsubdomain", + "device_id": "mx1", + "component_name": "settings", + "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/2019-10-28-preview/examples/devices_properties_get.json b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/devices_properties_get.json new file mode 100644 index 000000000000..98681b1c1837 --- /dev/null +++ b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/devices_properties_get.json @@ -0,0 +1,25 @@ +{ + "title": "Get device properties", + "description": "Get the current values of all device properties.", + "parameters": { + "centralDnsSuffixInPath": "azureiotcentral.com", + "subdomain": "appsubdomain", + "device_id": "mx1" + }, + "responses": { + "200": { + "body": { + "deviceinfo": { + "manufacturer": "manufacturer", + "model": "model", + "swVersion": "swVersion", + "osName": "osName", + "processorArchitecture": "processorArchitecture", + "processorManufacturer": "processorManufacturer", + "totalStorage": 41, + "totalMemory": 49 + } + } + } + } +} diff --git a/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/devices_properties_update.json b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/devices_properties_update.json new file mode 100644 index 000000000000..2efe07fab90e --- /dev/null +++ b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/devices_properties_update.json @@ -0,0 +1,36 @@ +{ + "title": "Update device properties", + "description": "Update the values of read-write properties of a device", + "parameters": { + "centralDnsSuffixInPath": "azureiotcentral.com", + "subdomain": "appsubdomain", + "device_id": "mx1", + "body":{ + "device_info": { + "manufacturer": "manufacturer", + "model": "model", + "swVersion": "swVersion", + "osName": "osName", + "processorArchitecture": "processorArchitecture", + "processorManufacturer": "processorManufacturer", + "totalStorage": 24, + "totalMemory": 18 + }} + }, + "responses": { + "202": { + "body": { + "deviceinfo": { + "manufacturer": "TODO", + "model": "model", + "swVersion": "swVersion", + "osName": "osName", + "processorArchitecture": "processorArchitecture", + "processorManufacturer": "processorManufacturer", + "totalStorage": 41, + "totalMemory": 49 + } + } + } + } +} diff --git a/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/devices_telemetry_get.json b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/devices_telemetry_get.json new file mode 100644 index 000000000000..c6c42407b1fc --- /dev/null +++ b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/devices_telemetry_get.json @@ -0,0 +1,18 @@ +{ + "title": "Get telemetry", + "description": "Get the last known value of a telemetry stream of a device.", + "parameters": { + "centralDnsSuffixInPath": "azureiotcentral.com", + "subdomain": "appsubdomain", + "device_id": "mx1", + "component_name": "sensors", + "telemetry_name": "temperature" + }, + "responses": { + "200": { + "body": { + "value": 32 + } + } + } +} diff --git a/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/devicetemplates_create.json b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/devicetemplates_create.json new file mode 100644 index 000000000000..792cdfed212f --- /dev/null +++ b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/devicetemplates_create.json @@ -0,0 +1,250 @@ +{ + "title": "Create a device template", + "description": "Creates and publishes a device template. In the body, specify the full device template object.", + "parameters": { + "centralDnsSuffixInPath": "azureiotcentral.com", + "subdomain": "appsubdomain", + "device_template_id": "environmentstemplateid", + "body": { + "types": [ + "DeviceModel" + ], + "displayName": "Environment sensor 1", + "capabilityModel": { + "@id": "urn:storeAnalyticsCheckoutPnp:capabilityModel:1", + "@type": [ + "CapabilityModel" + ], + "implements": [ + { + "@id": "urn:storeAnalyticsCheckoutPnp:capabilityModel:fyy5xn_y:1", + "@type": [ + "InterfaceInstance" + ], + "displayName": "Interface", + "name": "Interface", + "schema": { + "@id": "urn:storeAnalyticsCheckoutPnp:Interface:1", + "@type": [ + "Interface" + ], + "displayName": "Interface", + "contents": [ + { + "@id": "urn:storeAnalyticsCheckoutPnp:Interface:Temperature:1", + "@type": [ + "Telemetry", + "SemanticType/Temperature" + ], + "displayName": "Temperature", + "name": "Temperature", + "schema": "double", + "unit": "Units/Temperature/celsius" + }, + { + "@id": "urn:storeAnalyticsCheckoutPnp:Interface:Humidity:1", + "@type": [ + "Telemetry", + "SemanticType/Humidity" + ], + "displayName": "Humidity", + "name": "Humidity", + "schema": "double", + "unit": "Units/Humidity/percent" + }, + { + "@id": "urn:storeAnalyticsCheckoutPnp:Interface:Occupancy:1", + "@type": [ + "Telemetry" + ], + "displayName": "Occupancy", + "name": "Occupancy", + "schema": "double" + } + ] + } + } + ], + "displayName": "Motion detector", + "contents": [], + "@context": [ + "http://azureiot.com/v1/contexts/IoTModel.json" + ] + }, + "solutionModel": { + "@id": "urn:1dsfbt7i:modelDefinition:zadjfmgvh", + "@type": [ + "SolutionModel" + ], + "cloudProperties": [ + { + "@id": "urn:1dsfbt7i:modelDefinition:AssetId", + "@type": [ + "CloudProperty" + ], + "displayName": "Asset Id", + "name": "AssetId", + "schema": "string", + "valueDetail": { + "@id": "urn:1dsfbt7i:modelDefinition:AssetId:valueDetail", + "@type": [ + "ValueDetail/StringValueDetail" + ] + } + } + ], + "initialValues": [], + "overrides": [ + { + "@id": "urn:1dsfbt7i:modelDefinition:1qehkys5", + "@type": [ + "Override" + ], + "capability": { + "@type": [ + "CapabilityReference" + ], + "component": "urn:storeAnalyticsCheckoutPnp:capabilityModel:fyy5xn_y:1", + "reference": "urn:storeAnalyticsCheckoutPnp:Interface:Occupancy:1" + }, + "valueDetail": { + "@type": [ + "ValueDetail/NumberValueDetail" + ], + "maxValue": { + "@value": "50" + }, + "minValue": { + "@value": "0" + } + } + } + ] + } + } + }, + "responses": { + "200": { + "body":{ + "id": "environmentstemplateid", + "types": [ + "DeviceModel" + ], + "displayName": "Environment sensor 1", + "capabilityModel": { + "@id": "urn:storeAnalyticsCheckoutPnp:capabilityModel:1", + "@type": [ + "CapabilityModel" + ], + "implements": [ + { + "@id": "urn:storeAnalyticsCheckoutPnp:capabilityModel:fyy5xn_y:1", + "@type": [ + "InterfaceInstance" + ], + "displayName": "Interface", + "name": "Interface", + "schema": { + "@id": "urn:storeAnalyticsCheckoutPnp:Interface:1", + "@type": [ + "Interface" + ], + "displayName": "Interface", + "contents": [ + { + "@id": "urn:storeAnalyticsCheckoutPnp:Interface:Temperature:1", + "@type": [ + "Telemetry", + "SemanticType/Temperature" + ], + "displayName": "Temperature", + "name": "Temperature", + "schema": "double", + "unit": "Units/Temperature/celsius" + }, + { + "@id": "urn:storeAnalyticsCheckoutPnp:Interface:Humidity:1", + "@type": [ + "Telemetry", + "SemanticType/Humidity" + ], + "displayName": "Humidity", + "name": "Humidity", + "schema": "double", + "unit": "Units/Humidity/percent" + }, + { + "@id": "urn:storeAnalyticsCheckoutPnp:Interface:Occupancy:1", + "@type": [ + "Telemetry" + ], + "displayName": "Occupancy", + "name": "Occupancy", + "schema": "double" + } + ] + } + } + ], + "displayName": "Motion detector", + "contents": [], + "@context": [ + "http://azureiot.com/v1/contexts/IoTModel.json" + ] + }, + "solutionModel": { + "@id": "urn:1dsfbt7i:modelDefinition:zadjfmgvh", + "@type": [ + "SolutionModel" + ], + "cloudProperties": [ + { + "@id": "urn:1dsfbt7i:modelDefinition:AssetId", + "@type": [ + "CloudProperty" + ], + "displayName": "Asset Id", + "name": "AssetId", + "schema": "string", + "valueDetail": { + "@id": "urn:1dsfbt7i:modelDefinition:AssetId:valueDetail", + "@type": [ + "ValueDetail/StringValueDetail" + ] + } + } + ], + "initialValues": [], + "overrides": [ + { + "@id": "urn:1dsfbt7i:modelDefinition:1qehkys5", + "@type": [ + "Override" + ], + "capability": { + "@id": "urn:1dsfbt7i:modelDefinition:1qehkys5:6wq2v5i7j", + "@type": [ + "CapabilityReference" + ], + "component": "urn:storeAnalyticsCheckoutPnp:capabilityModel:fyy5xn_y:1", + "reference": "urn:storeAnalyticsCheckoutPnp:Interface:Occupancy:1" + }, + "valueDetail": { + "@id": "urn:1dsfbt7i:modelDefinition:1qehkys5:_covclwk_", + "@type": [ + "ValueDetail/NumberValueDetail" + ], + "maxValue": { + "@value": "50" + }, + "minValue": { + "@value": "0" + } + } + } + ] + } + } + } + } +} diff --git a/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/devicetemplates_delete.json b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/devicetemplates_delete.json new file mode 100644 index 000000000000..ba18b554cd58 --- /dev/null +++ b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/devicetemplates_delete.json @@ -0,0 +1,12 @@ +{ + "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": { + "centralDnsSuffixInPath": "azureiotcentral.com", + "subdomain": "appsubdomain", + "device_template_id": "urn:sbk9sd6sl:modelDefinition:u3b_fwd7os" + }, + "responses": { + "204": {} + } +} diff --git a/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/devicetemplates_get.json b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/devicetemplates_get.json new file mode 100644 index 000000000000..ec1b186c2c33 --- /dev/null +++ b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/devicetemplates_get.json @@ -0,0 +1,177 @@ +{ + "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": { + "centralDnsSuffixInPath": "azureiotcentral.com", + "subdomain": "appsubdomain", + "device_template_id": "urn:sbk9sd6sl:modelDefinition:u3b_fwd7os" + }, + "responses": { + "200": { + "body": { + "id": "urn:sbk9sd6sl:modelDefinition:u3b_fwd7os", + "types": [ + "DeviceModel" + ], + "displayName": "RS40 Occupancy Sensor", + "capabilityModel": { + "@id": "urn:rigado:RS40_Occupancy_Sensor:1", + "@type": [ + "CapabilityModel" + ], + "implements": [ + { + "@id": "urn:rigado:RS40_Occupancy_Sensor:Device_information_RS40_Occupancy_Sensor:1", + "@type": [ + "InterfaceInstance" + ], + "name": "Device_information_RS40_Occupancy_Sensor", + "schema": { + "@id": "urn:azureiot:DeviceManagement:DeviceInformation:1", + "@type": [ + "Interface" + ], + "displayName": "Device Information", + "contents": [ + { + "@id": "urn:azureiot:DeviceManagement:DeviceInformation:manufacturer:1", + "@type": [ + "Property" + ], + "description": "Company name of the device manufacturer. This could be the same as the name of the original equipment manufacturer (OEM). Ex. Contoso.", + "displayName": "Manufacturer", + "name": "manufacturer", + "schema": "string" + }, + { + "@id": "urn:azureiot:DeviceManagement:DeviceInformation:model:1", + "@type": [ + "Property" + ], + "description": "Device model name or ID. Ex. Surface Book 2.", + "displayName": "Device model", + "name": "model", + "schema": "string" + }, + { + "@id": "urn:azureiot:DeviceManagement:DeviceInformation:swVersion:1", + "@type": [ + "Property" + ], + "description": "Version of the software on your device. This could be the version of your firmware. Ex. 1.3.45", + "displayName": "Software version", + "name": "swVersion", + "schema": "string" + }, + { + "@id": "urn:azureiot:DeviceManagement:DeviceInformation:osName:1", + "@type": [ + "Property" + ], + "description": "Name of the operating system on the device. Ex. Windows 10 IoT Core.", + "displayName": "Operating system name", + "name": "osName", + "schema": "string" + }, + { + "@id": "urn:azureiot:DeviceManagement:DeviceInformation:processorArchitecture:1", + "@type": [ + "Property" + ], + "description": "Architecture of the processor on the device. Ex. x64 or ARM.", + "displayName": "Processor architecture", + "name": "processorArchitecture", + "schema": "string" + }, + { + "@id": "urn:azureiot:DeviceManagement:DeviceInformation:processorManufacturer:1", + "@type": [ + "Property" + ], + "description": "Name of the manufacturer of the processor on the device. Ex. Intel.", + "displayName": "Processor manufacturer", + "name": "processorManufacturer", + "schema": "string" + }, + { + "@id": "urn:azureiot:DeviceManagement:DeviceInformation:totalStorage:1", + "@type": [ + "Property" + ], + "description": "Total available storage on the device in kilobytes. Ex. 2048000 kilobytes.", + "displayName": "Total storage", + "name": "totalStorage", + "displayUnit": "kilobytes", + "schema": "long" + }, + { + "@id": "urn:azureiot:DeviceManagement:DeviceInformation:totalMemory:1", + "@type": [ + "Property" + ], + "description": "Total available memory on the device in kilobytes. Ex. 256000 kilobytes.", + "displayName": "Total memory", + "name": "totalMemory", + "displayUnit": "kilobytes", + "schema": "long" + } + ] + } + }, + { + "@id": "urn:rigado:RS40_Occupancy_Sensor:RS40_Occupancy_Sensor:1", + "@type": [ + "InterfaceInstance" + ], + "name": "RS40_Occupancy_Sensor", + "schema": { + "@id": "urn:rigado:interfaces:RS40_Occupancy_Sensor:1", + "@type": [ + "Interface" + ], + "displayName": "Interface", + "contents": [ + { + "@id": "urn:rigado:interfaces:RS40_Occupancy_Sensor:count:1", + "@type": [ + "Telemetry" + ], + "comment": "", + "description": "Count of motion events seen in the previous interval", + "displayName": "count", + "name": "count", + "schema": "integer" + }, + { + "@id": "urn:rigado:interfaces:RS40_Occupancy_Sensor:state:1", + "@type": [ + "Telemetry" + ], + "description": "Occupancy State", + "displayName": "state", + "name": "state", + "schema": "boolean" + } + ] + } + } + ], + "displayName": "RS40 Occupancy Sensor", + "contents": [], + "@context": [ + "http://azureiot.com/v1/contexts/IoTModel.json" + ] + }, + "solutionModel": { + "@id": "urn:sbk9sd6sl:modelDefinition:rxyaituqzz", + "@type": [ + "SolutionModel" + ], + "cloudProperties": [], + "initialValues": [], + "overrides": [] + } + } + } + } + } diff --git a/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/devicetemplates_get_merged.json b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/devicetemplates_get_merged.json new file mode 100644 index 000000000000..d88e63c5527d --- /dev/null +++ b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/devicetemplates_get_merged.json @@ -0,0 +1,171 @@ +{ + "title": "Get a merged device template by Id", + "description": "Get a single merged view of a device template by Id. The merged view of a device template contains the overrides and initial values from the solutionModel merged into the capabilityModel. This operation does not return device templates in draft state.", + "parameters": { + "centralDnsSuffixInPath": "azureiotcentral.com", + "subdomain": "appsubdomain", + "device_template_id": "urn:sbk9sd6sl:modelDefinition:u3b_fwd7os" + }, + "responses": { + "200": { + "body": { + "id": "urn:sbk9sd6sl:modelDefinition:u3b_fwd7os", + "etag": "\"1800bfd5-0000-0d00-0000-5d96df080000\"", + "types": [ + "DeviceModel" + ], + "displayName": "RS40 Occupancy Sensor", + "capabilityModel": { + "@id": "urn:rigado:RS40_Occupancy_Sensor:1", + "@type": [ + "CapabilityModel" + ], + "implements": [ + { + "@id": "urn:rigado:RS40_Occupancy_Sensor:Device_information_RS40_Occupancy_Sensor:1", + "@type": [ + "InterfaceInstance" + ], + "name": "Device_information_RS40_Occupancy_Sensor", + "schema": { + "@id": "urn:azureiot:DeviceManagement:DeviceInformation:1", + "@type": [ + "Interface" + ], + "displayName": "Device Information", + "contents": [ + { + "@id": "urn:azureiot:DeviceManagement:DeviceInformation:manufacturer:1", + "@type": [ + "Property" + ], + "description": "Company name of the device manufacturer. This could be the same as the name of the original equipment manufacturer (OEM). Ex. Contoso.", + "displayName": "Manufacturer", + "name": "manufacturer", + "schema": "string" + }, + { + "@id": "urn:azureiot:DeviceManagement:DeviceInformation:model:1", + "@type": [ + "Property" + ], + "description": "Device model name or ID. Ex. Surface Book 2.", + "displayName": "Device model", + "name": "model", + "schema": "string" + }, + { + "@id": "urn:azureiot:DeviceManagement:DeviceInformation:swVersion:1", + "@type": [ + "Property" + ], + "description": "Version of the software on your device. This could be the version of your firmware. Ex. 1.3.45", + "displayName": "Software version", + "name": "swVersion", + "schema": "string" + }, + { + "@id": "urn:azureiot:DeviceManagement:DeviceInformation:osName:1", + "@type": [ + "Property" + ], + "description": "Name of the operating system on the device. Ex. Windows 10 IoT Core.", + "displayName": "Operating system name", + "name": "osName", + "schema": "string" + }, + { + "@id": "urn:azureiot:DeviceManagement:DeviceInformation:processorArchitecture:1", + "@type": [ + "Property" + ], + "description": "Architecture of the processor on the device. Ex. x64 or ARM.", + "displayName": "Processor architecture", + "name": "processorArchitecture", + "schema": "string" + }, + { + "@id": "urn:azureiot:DeviceManagement:DeviceInformation:processorManufacturer:1", + "@type": [ + "Property" + ], + "description": "Name of the manufacturer of the processor on the device. Ex. Intel.", + "displayName": "Processor manufacturer", + "name": "processorManufacturer", + "schema": "string" + }, + { + "@id": "urn:azureiot:DeviceManagement:DeviceInformation:totalStorage:1", + "@type": [ + "Property" + ], + "description": "Total available storage on the device in kilobytes. Ex. 2048000 kilobytes.", + "displayName": "Total storage", + "name": "totalStorage", + "displayUnit": "kilobytes", + "schema": "long" + }, + { + "@id": "urn:azureiot:DeviceManagement:DeviceInformation:totalMemory:1", + "@type": [ + "Property" + ], + "description": "Total available memory on the device in kilobytes. Ex. 256000 kilobytes.", + "displayName": "Total memory", + "name": "totalMemory", + "displayUnit": "kilobytes", + "schema": "long" + } + ] + } + }, + { + "@id": "urn:rigado:RS40_Occupancy_Sensor:RS40_Occupancy_Sensor:1", + "@type": [ + "InterfaceInstance" + ], + "name": "RS40_Occupancy_Sensor", + "schema": { + "@id": "urn:rigado:interfaces:RS40_Occupancy_Sensor:1", + "@type": [ + "Interface" + ], + "displayName": "Interface", + "contents": [ + { + "@id": "urn:rigado:interfaces:RS40_Occupancy_Sensor:count:1", + "@type": [ + "Telemetry" + ], + "comment": "", + "description": "Count of motion events seen in the previous interval", + "displayName": "count", + "name": "count", + "schema": "integer" + }, + { + "@id": "urn:rigado:interfaces:RS40_Occupancy_Sensor:state:1", + "@type": [ + "Telemetry" + ], + "description": "Occupancy State", + "displayName": "state", + "name": "state", + "schema": "boolean" + } + ] + } + } + ], + "displayName": "RS40 Occupancy Sensor" + }, + "solutionModel": { + "@id": "urn:sbk9sd6sl:modelDefinition:rxyaituqzz", + "@type": [ + "SolutionModel" + ] + } + } + } + } + } diff --git a/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/devicetemplates_list.json b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/devicetemplates_list.json new file mode 100644 index 000000000000..e4763760ca1e --- /dev/null +++ b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/devicetemplates_list.json @@ -0,0 +1,180 @@ +{ + "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": { + "centralDnsSuffixInPath": "azureiotcentral.com", + "subdomain": "appsubdomain" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "urn:sbk9sd6sl:modelDefinition:u3b_fwd7os", + "types": [ + "DeviceModel" + ], + "displayName": "RS40 Occupancy Sensor", + "capabilityModel": { + "@id": "urn:rigado:RS40_Occupancy_Sensor:1", + "@type": [ + "CapabilityModel" + ], + "implements": [ + { + "@id": "urn:rigado:RS40_Occupancy_Sensor:Device_information_RS40_Occupancy_Sensor:1", + "@type": [ + "InterfaceInstance" + ], + "name": "Device_information_RS40_Occupancy_Sensor", + "schema": { + "@id": "urn:azureiot:DeviceManagement:DeviceInformation:1", + "@type": [ + "Interface" + ], + "displayName": "Device Information", + "contents": [ + { + "@id": "urn:azureiot:DeviceManagement:DeviceInformation:manufacturer:1", + "@type": [ + "Property" + ], + "description": "Company name of the device manufacturer. This could be the same as the name of the original equipment manufacturer (OEM). Ex. Contoso.", + "displayName": "Manufacturer", + "name": "manufacturer", + "schema": "string" + }, + { + "@id": "urn:azureiot:DeviceManagement:DeviceInformation:model:1", + "@type": [ + "Property" + ], + "description": "Device model name or ID. Ex. Surface Book 2.", + "displayName": "Device model", + "name": "model", + "schema": "string" + }, + { + "@id": "urn:azureiot:DeviceManagement:DeviceInformation:swVersion:1", + "@type": [ + "Property" + ], + "description": "Version of the software on your device. This could be the version of your firmware. Ex. 1.3.45", + "displayName": "Software version", + "name": "swVersion", + "schema": "string" + }, + { + "@id": "urn:azureiot:DeviceManagement:DeviceInformation:osName:1", + "@type": [ + "Property" + ], + "description": "Name of the operating system on the device. Ex. Windows 10 IoT Core.", + "displayName": "Operating system name", + "name": "osName", + "schema": "string" + }, + { + "@id": "urn:azureiot:DeviceManagement:DeviceInformation:processorArchitecture:1", + "@type": [ + "Property" + ], + "description": "Architecture of the processor on the device. Ex. x64 or ARM.", + "displayName": "Processor architecture", + "name": "processorArchitecture", + "schema": "string" + }, + { + "@id": "urn:azureiot:DeviceManagement:DeviceInformation:processorManufacturer:1", + "@type": [ + "Property" + ], + "description": "Name of the manufacturer of the processor on the device. Ex. Intel.", + "displayName": "Processor manufacturer", + "name": "processorManufacturer", + "schema": "string" + }, + { + "@id": "urn:azureiot:DeviceManagement:DeviceInformation:totalStorage:1", + "@type": [ + "Property" + ], + "description": "Total available storage on the device in kilobytes. Ex. 2048000 kilobytes.", + "displayName": "Total storage", + "name": "totalStorage", + "displayUnit": "kilobytes", + "schema": "long" + }, + { + "@id": "urn:azureiot:DeviceManagement:DeviceInformation:totalMemory:1", + "@type": [ + "Property" + ], + "description": "Total available memory on the device in kilobytes. Ex. 256000 kilobytes.", + "displayName": "Total memory", + "name": "totalMemory", + "displayUnit": "kilobytes", + "schema": "long" + } + ] + } + }, + { + "@id": "urn:rigado:RS40_Occupancy_Sensor:RS40_Occupancy_Sensor:1", + "@type": [ + "InterfaceInstance" + ], + "name": "RS40_Occupancy_Sensor", + "schema": { + "@id": "urn:rigado:interfaces:RS40_Occupancy_Sensor:1", + "@type": [ + "Interface" + ], + "displayName": "Interface", + "contents": [ + { + "@id": "urn:rigado:interfaces:RS40_Occupancy_Sensor:count:1", + "@type": [ + "Telemetry" + ], + "comment": "", + "description": "Count of motion events seen in the previous interval", + "displayName": "count", + "name": "count", + "schema": "integer" + }, + { + "@id": "urn:rigado:interfaces:RS40_Occupancy_Sensor:state:1", + "@type": [ + "Telemetry" + ], + "description": "Occupancy State", + "displayName": "state", + "name": "state", + "schema": "boolean" + } + ] + } + } + ], + "displayName": "RS40 Occupancy Sensor", + "contents": [], + "@context": [ + "http://azureiot.com/v1/contexts/IoTModel.json" + ] + }, + "solutionModel": { + "@id": "urn:sbk9sd6sl:modelDefinition:rxyaituqzz", + "@type": [ + "SolutionModel" + ], + "cloudProperties": [], + "initialValues": [], + "overrides": [] + } + } + ] + } + } + } + } diff --git a/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/roles_get.json b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/roles_get.json new file mode 100644 index 000000000000..d3f68826e146 --- /dev/null +++ b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/roles_get.json @@ -0,0 +1,17 @@ +{ + "title": "Get role by Id", + "description": "Get a role by Id.", + "parameters": { + "centralDnsSuffixInPath": "azureiotcentral.com", + "subdomain": "appsubdomain", + "role_id":"ca310b8d-2f4a-44e0-a36e-957c202cd8d4" + }, + "responses": { + "200": { + "body":{ + "id": "ca310b8d-2f4a-44e0-a36e-957c202cd8d4", + "displayName": "Administrator" + } + } + } +} diff --git a/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/roles_list.json b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/roles_list.json new file mode 100644 index 000000000000..4a3c1471cf2a --- /dev/null +++ b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/roles_list.json @@ -0,0 +1,28 @@ +{ + "title": "List roles", + "description": "List roles in your application.", + "parameters": { + "centralDnsSuffixInPath": "azureiotcentral.com", + "subdomain": "appsubdomain" + }, + "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" + } + ] + } + } + } +} diff --git a/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/iotcentral.json b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/iotcentral.json new file mode 100644 index 000000000000..b0d5c37600a5 --- /dev/null +++ b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/iotcentral.json @@ -0,0 +1,1545 @@ +{ + "swagger": "2.0", + "info": { + "version": "1.0.0", + "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." + }, + "basePath": "/api/preview", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "definitions": { + "ApiToken": { + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/Permission" + }, + { + "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" + } + } + } + ], + "additionalProperties": true + }, + "ApiTokenCollection": { + "type": "object", + "properties": { + "value": { + "description": "The collection of api tokens.", + "type": "array", + "items": { + "$ref": "#/definitions/ApiToken" + } + } + }, + "required": [ + "value" + ] + }, + "Interface": { + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/Entity" + }, + { + "properties": { + "contents": { + "description": "The data definitions contained by the interface.", + "type": "array", + "items": { + "$ref": "#/definitions/NamedEntity" + } + } + } + } + ] + }, + "Component": { + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/NamedEntity" + }, + { + "properties": { + "schema": { + "description": "The interface used by this component.", + "$ref": "#/definitions/Interface" + } + } + } + ] + }, + "CapabilityModel": { + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/Entity" + }, + { + "properties": { + "implements": { + "description": "The component implemented by the capability model.", + "type": "array", + "items": { + "$ref": "#/definitions/Component" + } + }, + "contents": { + "description": "The relationships contained by the capability model.", + "type": "array", + "items": { + "$ref": "#/definitions/NamedEntity" + } + } + } + } + ], + "additionalProperties": true + }, + "Endpoint":{ + "type":"object", + "properties":{ + "type":{ + "description":"Type of the endpoint.", + "type":"string" + }, + "connectionString":{ + "description":"Information for connecting to the endpoint.", + "type":"string" + }, + "name":{ + "description":"Name of the entity to send data to.", + "type":"string" + } + }, + "required":[ + "type", + "connectionString", + "name" + ], + "discriminator":"type" + }, + "StorageEndpoint":{ + "allOf":[ + { + "$ref":"#/definitions/Endpoint" + } + ] + }, + "EventHubsEndpoint":{ + "allOf":[ + { + "$ref":"#/definitions/Endpoint" + } + ] + }, + "ServiceBusQueueEndpoint":{ + "allOf":[ + { + "$ref":"#/definitions/Endpoint" + } + ] + }, + "ServiceBusTopicEndpoint":{ + "allOf":[ + { + "$ref":"#/definitions/Endpoint" + } + ] + }, + "ContinuousDataExport":{ + "type":"object", + "properties":{ + "id":{ + "description":"Unique ID of the continuous data export.", + "type":"string", + "readOnly":true + }, + "etag":{ + "description":"ETag used to prevent conflict in continuous data export updates.", + "type":"string" + }, + "displayName":{ + "description":"Display name of the continuous data export.", + "type":"string" + }, + "endpoint":{ + "description":"Location where exported data should be sent.", + "$ref":"#/definitions/Endpoint" + }, + "status":{ + "description":"Indicates whether the continuous data export is starting, running, etc.", + "type":"string", + "readOnly":true + }, + "enabled":{ + "description":"Boolean indicating whether the continuous data export should be running or not.", + "type":"boolean" + }, + "sources":{ + "description":"Data sources to export to the endpoint.", + "type":"array", + "items":{ + "type":"string", + "enum":[ + "devices", + "deviceTemplates", + "telemetry" + ] + }, + "minItems":1 + } + }, + "required":[ + "endpoint", + "enabled", + "sources" + ] + }, + "ContinuousDataExportCollection":{ + "type":"object", + "properties":{ + "value":{ + "description":"The collection of continuous data exports.", + "type":"array", + "items":{ + "$ref":"#/definitions/ContinuousDataExport" + } + }, + "nextLink":{ + "description":"URL to get the next page of continuous data exports.", + "type":"string" + } + }, + "required":[ + "value" + ] + }, + "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" + }, + "description": { + "description": "Detailed description of the device.", + "type": "string" + }, + "instanceOf": { + "description": "The model definition for the device.", + "type": "string" + }, + "simulated": { + "description": "Whether the device is simulated.", + "type": "boolean" + }, + "approved": { + "description": "Whether the device has been approved to connect to IoT Central.", + "type": "boolean" + }, + "provisioned": { + "description": "Whether resources have been allocated for the device.", + "type": "boolean", + "readOnly": true + } + }, + "required": [ + "instanceOf" + ] + }, + "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 + }, + "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": "number", + "readOnly": true + } + } + }, + "DeviceCommandCollection": { + "type": "object", + "properties": { + "value": { + "description": "The collection of device command executions.", + "type": "array", + "items": { + "$ref": "#/definitions/DeviceCommand" + } + } + }, + "required": [ + "value" + ] + }, + "DeviceCloudProperties": { + "description": "Cloud property values associated with the device.", + "type": "object", + "additionalProperties": true + }, + "SymmetricKey": { + "type": "object", + "properties": { + "primaryKey": { + "description": "The primary key for the credential.", + "type": "string" + }, + "secondaryKey": { + "description": "The secondary key for the credential.", + "type": "string" + } + }, + "required": [ + "primaryKey", + "secondaryKey" + ] + }, + "DeviceCredentials": { + "type": "object", + "properties": { + "scopeId": { + "description": "Scope id for connecting to device provisioning service.", + "type": "string" + }, + "symmetricKey": { + "description": "The symmetric key credentials for the device.", + "$ref": "#/definitions/SymmetricKey" + } + }, + "required": [ + "scopeId", + "symmetricKey" + ] + }, + "DeviceProperties": { + "description": "Property values associated with the device.", + "type": "object", + "additionalProperties": true + }, + "DeviceTemplate": { + "type": "object", + "properties": { + "id": { + "description": "Unique ID of the device template.", + "type": "string", + "readOnly": true + }, + "etag": { + "description": "ETag used to prevent conflict in device template updates.", + "type": "string" + }, + "types": { + "description": "The types of device to which this template applies.", + "type": "array", + "items": { + "type": "string" + } + }, + "displayName": { + "description": "Display name of the device template.", + "type": "string" + }, + "description": { + "description": "Detailed description of the device template.", + "type": "string" + }, + "capabilityModel": { + "$ref": "#/definitions/CapabilityModel" + }, + "solutionModel": { + "$ref": "#/definitions/SolutionModel" + } + }, + "required": [ + "types", + "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" + ] + }, + "Entity": { + "type": "object", + "properties": { + "@id": { + "description": "Unique ID of the entity.", + "type": "string" + }, + "@type": { + "description": "Type of the entity.", + "type": "array", + "items": { + "type": "string" + } + }, + "displayName": { + "description": "Display name of the entity.", + "type": "string" + }, + "description": { + "description": "Detailed description of the entity.", + "type": "string" + }, + "comment": { + "description": "Developer comment about the entity.", + "type": "string" + } + }, + "required": [ + "@type" + ] + }, + "NamedEntity": { + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/Entity" + }, + { + "properties": { + "name": { + "description": "The programmatic name of the named entity.", + "type": "string" + } + }, + "required": [ + "name" + ] + } + ], + "additionalProperties": true + }, + "Permission": { + "type": "object", + "properties": { + "roles": { + "description": "Roles that the permission has been granted permission to.", + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1, + "maxItems": 1 + } + }, + "required": [ + "roles" + ] + }, + "Value": { + "type": "object", + "properties": { + "value": { + "description": "The value of this API response." + } + } + }, + "Role": { + "type": "object", + "properties": { + "id": { + "description": "Unique ID of the role.", + "type": "string", + "readOnly": true + }, + "displayName": { + "description": "Display name of the role.", + "type": "string" + } + } + }, + "RoleCollection": { + "type": "object", + "properties": { + "value": { + "description": "The collection of roles.", + "type": "array", + "items": { + "$ref": "#/definitions/Role" + } + } + }, + "required": [ + "value" + ] + }, + "SolutionModel": { + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/Entity" + }, + { + "properties": { + "cloudProperties": { + "description": "The cloud properties defined by the solution model.", + "type": "array", + "items": { + "$ref": "#/definitions/NamedEntity" + } + }, + "initialValues": { + "description": "The initial values defined by the solution model.", + "type": "array", + "items": { + "$ref": "#/definitions/InitialValue" + } + }, + "overrides": { + "description": "The overrides defined by the solution model.", + "type": "array", + "items": { + "$ref": "#/definitions/Override" + } + } + } + } + ] + }, + "InitialValue": { + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/Entity" + }, + { + "properties": { + "capability": { + "$ref": "#/definitions/CapabilityReference" + }, + "value": { + "description": "The initial value of the capability." + } + } + } + ] + }, + "Override": { + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/Entity" + }, + { + "properties": { + "capability": { + "$ref": "#/definitions/CapabilityReference" + }, + "displayUnit": { + "description": "The overridden display unit.", + "type": "string" + }, + "semanticType": { + "description": "The overridden semantic type.", + "type": "string" + }, + "unit": { + "description": "The overridden unit.", + "type": "string" + } + } + } + ], + "additionalProperties": true + }, + "CapabilityReference": { + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/Entity" + }, + { + "properties": { + "component": { + "description": "The name of the component being referenced.", + "type": "string" + }, + "reference": { + "description": "The name of the capability being referenced.", + "type": "string" + } + } + } + ] + } + }, + "paths": { + "/apiTokens": { + "get": { + "operationId": "ApiTokens_List", + "summary": "Get the list of API tokens in an application.", + "x-ms-examples": { + "List API tokens": { + "$ref": "./examples/apitoken_list.json" + } + }, + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/ApiTokenCollection" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + } + } + }, + "/apiTokens/{token_id}": { + "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": [ + { + "in": "path", + "name": "token_id", + "description": "Unique ID for the API token.", + "type": "string", + "required": true + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/ApiToken" + } + } + } + }, + "put": { + "operationId": "ApiTokens_Set", + "summary": "Create a new API token in the application.", + "x-ms-examples": { + "Create API token": { + "$ref": "./examples/apitoken_create.json" + } + }, + "parameters": [ + { + "in": "path", + "name": "token_id", + "description": "Unique ID for the API token.", + "type": "string", + "required": true + }, + { + "name": "body", + "in": "body", + "description": "API token body.", + "required": true, + "schema": { + "$ref": "#/definitions/ApiToken" + } + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/ApiToken" + } + } + } + }, + "delete": { + "operationId": "ApiTokens_Remove", + "summary": "Delete an API token.", + "parameters": [ + { + "in": "path", + "name": "token_id", + "description": "Unique ID for the API token.", + "type": "string", + "required": true + } + ], + "x-ms-examples": { + "Delete API token": { + "$ref": "./examples/apitoken_delete.json" + } + }, + "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" + } + }, + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/DeviceCollection" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/devices/{device_id}": { + "get": { + "operationId": "Devices_Get", + "summary": "Get a device by ID", + "description": "Get details about an existing device by device ID.", + + "parameters": [ + { + "$ref": "#/parameters/DeviceId" + } + ], + "x-ms-examples": { + "Get device by Id": { + "$ref": "./examples/devices_get.json" + } + }, + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/Device" + } + } + } + }, + "put": { + "operationId": "Devices_Set", + "summary": "Create or update a device", + "description": "Create a new device or update an existing one by device ID.", + "x-ms-examples": { + "Create device": { + "$ref": "./examples/devices_create.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/DeviceId" + }, + { + "name": "body", + "in": "body", + "description": "Device body.", + "required": true, + "schema": { + "$ref": "#/definitions/Device" + } + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/Device" + } + } + } + }, + "delete": { + "operationId": "Devices_Remove", + "summary": "Delete a device", + "description": "Delete an existing device by device ID.", + "parameters": [ + { + "$ref": "#/parameters/DeviceId" + } + ], + "x-ms-examples": { + "Delete device": { + "$ref": "./examples/devices_delete.json" + } + }, + "responses": { + "204": { + "description": "Success" + } + } + } + }, + "/continuousDataExports":{ + "get":{ + "operationId":"ContinuousDataExports_List", + "summary":"Get the list of continuous data exports in an application.", + "x-ms-examples": { + "List exports": { + "$ref": "./examples/continuousdataexports_list.json" + } + }, + "responses":{ + "200":{ + "description":"Success", + "schema":{ + "$ref":"#/definitions/ContinuousDataExportCollection" + } + } + }, + "x-ms-pageable":{ + "nextLinkName":"nextLink" + } + } + }, + "/continuousDataExports/{export_id}":{ + "get":{ + "operationId":"ContinuousDataExports_Get", + "summary":"Get a continuous data export by ID.", + "parameters":[ + { + "in":"path", + "name":"export_id", + "description":"Unique ID for the continuous data export.", + "type":"string", + "required":true + } + ], + "x-ms-examples": { + "Get export": { + "$ref": "./examples/continuousdataexports_get.json" + } + }, + "responses":{ + "200":{ + "description":"Success", + "schema":{ + "$ref":"#/definitions/ContinuousDataExport" + } + } + } + }, + "put":{ + "operationId":"ContinuousDataExports_Set", + "summary":"Create a new continuous data export or update an existing one by ID.", + "x-ms-examples": { + "Create or update export": { + "$ref": "./examples/continuousdataexports_set.json" + } + }, + "parameters":[ + { + "in":"path", + "name":"export_id", + "description":"Unique ID for the continuous data export.", + "type":"string", + "required":true + }, + { + "name":"body", + "in":"body", + "description":"Data export body.", + "required":true, + "schema":{ + "$ref":"#/definitions/ContinuousDataExport" + } + } + ], + "responses":{ + "200":{ + "description":"Success", + "schema":{ + "$ref":"#/definitions/ContinuousDataExport" + } + } + } + }, + "delete":{ + "operationId":"ContinuousDataExports_Remove", + "summary":"Delete a continuous data export.", + "parameters":[ + { + "in":"path", + "name":"export_id", + "description":"Unique ID for the continuous data export.", + "type":"string", + "required":true + } + ], + "x-ms-examples": { + "Delete export": { + "$ref": "./examples/continuousdataexports_delete.json" + } + }, + "responses":{ + "204":{ + "description":"Success" + } + } + } + }, + "/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" + } + }, + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/DeviceTemplateCollection" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/deviceTemplates/{device_template_id}": { + "get": { + "operationId": "DeviceTemplates_Get", + "summary": "Get a device template by ID", + "parameters": [ + { + "$ref": "#/parameters/DeviceTemplateId" + } + ], + "x-ms-examples": { + "Get a device template by Id": { + "$ref": "./examples/devicetemplates_get.json" + } + }, + "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.", + "parameters": [ + { + "$ref": "#/parameters/DeviceTemplateId" + } + ], + "x-ms-examples": { + "Delete a device template by Id": { + "$ref": "./examples/devicetemplates_delete.json" + } + }, + "responses": { + "204": { + "description": "Success" + } + } + }, + "put": { + "operationId": "DeviceTemplates_Set", + "summary": "Create or update a device template by ID", + "x-ms-examples": { + "Create a device template": { + "$ref": "./examples/devicetemplates_create.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/DeviceTemplateId" + }, + { + "name": "body", + "in": "body", + "description": "Device template body.", + "required": true, + "schema": { + "$ref": "#/definitions/DeviceTemplate" + } + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/DeviceTemplate" + } + } + } + } + }, + "/deviceTemplates/{device_template_id}/merged": { + "get": { + "operationId": "DeviceTemplates_GetMerged", + "summary": "Get a merged device template by ID", + "parameters": [ + { + "$ref": "#/parameters/DeviceTemplateId" + } + ], + "x-ms-examples": { + "Get a merged device template by Id": { + "$ref": "./examples/devicetemplates_get_merged.json" + } + }, + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/DeviceTemplate" + } + } + } + } + }, + "/deviceTemplates/{device_template_id}/devices": { + "get": { + "operationId": "DeviceTemplates_ListDevices", + "summary": "Get devices for a template", + "parameters": [ + { + "$ref": "#/parameters/DeviceTemplateId" + } + ], + "x-ms-examples": { + "List devices associated to a device template": { + "$ref": "./examples/devices_list_by_template.json" + } + }, + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/DeviceCollection" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/roles": { + "get": { + "operationId": "Roles_List", + "summary": "Get the list of roles in an application.", + "x-ms-examples": { + "List roles": { + "$ref": "./examples/roles_list.json" + } + }, + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/RoleCollection" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + } + } + }, + "/roles/{role_id}": { + "get": { + "operationId": "Roles_Get", + "summary": "Get a role by ID.", + "parameters": [ + { + "in": "path", + "name": "role_id", + "description": "Unique ID for the role.", + "type": "string", + "required": true + } + ], + "x-ms-examples": { + "Get role by Id": { + "$ref": "./examples/roles_get.json" + } + }, + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/Role" + } + } + } + } + }, + "/devices/{device_id}/cloudProperties": { + "get": { + "operationId": "Devices_GetCloudProperties", + "summary": "Get device cloud properties", + "description": "Get all cloud property values of a device by device ID.", + "parameters": [ + { + "$ref": "#/parameters/DeviceId" + } + ], + "x-ms-examples": { + "Get cloud properties": { + "$ref": "./examples/devices_cloudproperties_get.json" + } + }, + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/DeviceCloudProperties" + } + } + } + }, + "put": { + "operationId": "Devices_UpdateCloudProperties", + "summary": "Update device cloud properties", + "description": "Update all cloud property values of a device by device ID.", + "x-ms-examples": { + "Update cloud properties": { + "$ref": "./examples/devices_cloudproperties_update.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/DeviceId" + }, + { + "name": "body", + "in": "body", + "description": "Device properties.", + "required": true, + "schema": { + "$ref": "#/definitions/DeviceCloudProperties" + } + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/DeviceCloudProperties" + } + } + } + } + }, + "/devices/{device_id}/components/{component_name}/commands/{command_name}": { + "get": { + "operationId": "Devices_GetCommandHistory", + "summary": "Get device command history", + "parameters": [ + { + "$ref": "#/parameters/DeviceId" + }, + { + "$ref": "#/parameters/ComponentName" + }, + { + "in": "path", + "name": "command_name", + "description": "Name of this device command.", + "x-ms-parameter-location": "method", + "type": "string", + "required": true + } + ], + "x-ms-examples": { + "Get command history": { + "$ref": "./examples/devices_commandshistory_get.json" + } + }, + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/DeviceCommandCollection" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + } + }, + "post": { + "operationId": "Devices_ExecuteCommand", + "summary": "Execute a device command", + "description": "Execute a command on a device.", + "x-ms-examples": { + "Send command": { + "$ref": "./examples/devices_commands_send.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/DeviceId" + }, + { + "$ref": "#/parameters/ComponentName" + }, + { + "in": "path", + "name": "command_name", + "description": "Name of this device command.", + "x-ms-parameter-location": "method", + "type": "string", + "required": true + }, + { + "name": "body", + "in": "body", + "description": "Device command body.", + "required": true, + "schema": { + "$ref": "#/definitions/DeviceCommand" + } + } + ], + "responses": { + "201": { + "description": "Success", + "schema": { + "$ref": "#/definitions/DeviceCommand" + } + } + } + } + }, + "/devices/{device_id}/properties": { + "get": { + "operationId": "Devices_GetProperties", + "summary": "Get device properties", + "description": "Get all property values of a device by device ID.", + "parameters": [ + { + "$ref": "#/parameters/DeviceId" + } + ], + "x-ms-examples": { + "Get properties": { + "$ref": "./examples/devices_properties_get.json" + } + }, + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/DeviceProperties" + } + } + } + }, + "put": { + "operationId": "Devices_UpdateProperties", + "summary": "Update device properties", + "description": "Update all property values of a device by device ID.", + "x-ms-examples": { + "Update properties": { + "$ref": "./examples/devices_properties_update.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/DeviceId" + }, + { + "name": "body", + "in": "body", + "description": "Device properties.", + "required": true, + "schema": { + "$ref": "#/definitions/DeviceProperties" + } + } + ], + "responses": { + "202": { + "description": "Success", + "schema": { + "$ref": "#/definitions/DeviceProperties" + } + } + } + } + }, + "/devices/{device_id}/components/{component_name}/properties": { + "get": { + "operationId": "Devices_GetComponentProperties", + "summary": "Get device properties for a specific component", + "parameters": [ + { + "$ref": "#/parameters/DeviceId" + }, + { + "$ref": "#/parameters/ComponentName" + } + ], + "x-ms-examples": { + "Get properties on components": { + "$ref": "./examples/devices_properties_components_get.json" + } + }, + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/DeviceProperties" + } + } + } + }, + "put": { + "operationId": "Devices_UpdateComponentProperties", + "summary": "Update device properties for a specific component", + "x-ms-examples": { + "Update properties on components": { + "$ref": "./examples/devices_properties_components_set.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/DeviceId" + }, + { + "$ref": "#/parameters/ComponentName" + }, + { + "name": "body", + "in": "body", + "description": "Device properties.", + "required": true, + "schema": { + "$ref": "#/definitions/DeviceProperties" + } + } + ], + "responses": { + "202": { + "description": "Success", + "schema": { + "$ref": "#/definitions/DeviceProperties" + } + } + } + } + }, + "/devices/{device_id}/credentials": { + "get": { + "operationId": "Devices_GetCredentials", + "summary": "Get device credentials", + "parameters": [ + { + "$ref": "#/parameters/DeviceId" + } + ], + "x-ms-examples": { + "Get device credentials": { + "$ref": "./examples/devicecredentials_get.json" + } + }, + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/DeviceCredentials" + } + } + } + } + }, + "/devices/{device_id}/components/{component_name}/telemetry/{telemetry_name}": { + "get": { + "operationId": "Devices_GetTelemetryValue", + "summary": "Get device telemetry value", + "parameters": [ + { + "$ref": "#/parameters/DeviceId" + }, + { + "$ref": "#/parameters/ComponentName" + }, + { + "in": "path", + "name": "telemetry_name", + "description": "Name of this device telemetry.", + "x-ms-parameter-location": "method", + "type": "string", + "required": true + } + ], + "x-ms-examples": { + "Get telemetry": { + "$ref": "./examples/devices_telemetry_get.json" + } + }, + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/Value" + } + } + } + } + } + }, + "parameters": { + "DeviceId": { + "in": "path", + "name": "device_id", + "description": "Unique ID of the device.", + "x-ms-parameter-location": "method", + "type": "string", + "required": true + }, + "ComponentName": { + "in": "path", + "name": "component_name", + "description": "Name of the device component.", + "x-ms-parameter-location": "method", + "type": "string", + "required": true + }, + "DeviceTemplateId": { + "in": "path", + "name": "device_template_id", + "description": "Unique ID of the device template.", + "x-ms-parameter-location": "method", + "type": "string", + "required": true + }, + "Subdomain": { + "in": "path", + "name": "subdomain", + "description": "Application subdomain.", + "x-ms-parameter-location": "client", + "type": "string", + "required": true + }, + "CentralDnsSuffixInPath": { + "name": "centralDnsSuffixInPath", + "in": "path", + "required": true, + "type": "string", + "default": "azureiotcentral.com", + "x-ms-skip-url-encoding": true, + "description": "The DNS suffix used as the base for all Azure Data Lake Analytics Job service requests.", + "x-ms-parameter-location": "client" + } + }, + "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" + } + } + }, + "x-ms-parameterized-host": { + "hostTemplate": "{subdomain}.{centralDnsSuffixInPath}", + "parameters": [ + { + "$ref": "#/parameters/Subdomain" + }, + { + "$ref": "#/parameters/CentralDnsSuffixInPath" + } + ] + } +} diff --git a/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/iotcentralapps.json b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/iotcentralapps.json new file mode 100644 index 000000000000..9c75c69e2873 --- /dev/null +++ b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/iotcentralapps.json @@ -0,0 +1,137 @@ +{ + "swagger": "2.0", + "info": { + "version": "1.0.0", + "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." + }, + "host": "apps.azureiotcentral.com", + "basePath": "/api/preview", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "definitions": { + "Application": { + "type": "object", + "properties": { + "id": { + "description": "Unique ID of the application.", + "type": "string", + "readOnly": true + }, + "displayName": { + "description": "Display name of the application.", + "type": "string" + }, + "subdomain": { + "description": "The URL subdomain of the application.", + "type": "string" + }, + "host": { + "description": "The URL host of the application.", + "type": "string" + } + }, + "required": [ + "subdomain", + "host" + ] + }, + "ApplicationCollection": { + "type": "object", + "properties": { + "value": { + "description": "The collection of applications.", + "type": "array", + "items": { + "$ref": "#/definitions/Application" + } + } + }, + "required": [ + "value" + ] + } + }, + "paths": { + "/applications": { + "get": { + "operationId": "Applications_List", + "summary": "Get the list of applications accessible to the signed-in user", + + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/ApplicationCollection" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + }, + "x-ms-examples": { + "List applications": { + "$ref": "./examples/application_list.json" + } + } + } + }, + "/applications/{application_id}": { + "get": { + "operationId": "Applications_Get", + "summary": "Get an application by ID", + "parameters": [ + { + "in": "path", + "name": "application_id", + "description": "Unique ID of the application.", + "type": "string", + "required": true + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/Application" + } + } + }, + "x-ms-examples": { + "Get application": { + "$ref": "./examples/application_get.json" + } + } + + } + } + }, + "parameters": { + "Subdomain": { + "in": "path", + "name": "subdomain", + "description": "Application subdomain.", + "x-ms-parameter-location": "client", + "type": "string", + "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.md b/specification/iotcentral/data-plane/readme.md new file mode 100644 index 000000000000..bbda97709416 --- /dev/null +++ b/specification/iotcentral/data-plane/readme.md @@ -0,0 +1,58 @@ +# IoT Central - API client generation + +> see https://aka.ms/autorest + +This is the AutoRest configuration file for MonitorClient. + + + +--- +## Getting Started +To build the SDK for MonitorClient, simply [Install AutoRest](https://aka.ms/autorest/install) and in this folder, run: + +> `autorest` + +To see additional help and options, run: + +> `autorest --help` +--- + +## Configuration +These are the global settings for the IoT Central API. + +``` yaml +openapi-type: data-plane +tag: package-2019-10-28-preview +``` + +### Tag: package-2019-10-28-preview + +These settings apply only when `--tag=package-2019-10-28-preview` is specified on the command line. + +``` yaml $(tag) == 'package-2019-10-28-preview' +input-file: +- Microsoft.IoTCentral/preview/2019-10-28-preview/iotcentral.json +- Microsoft.IoTCentral/preview/2019-10-28-preview/iotcentralapps.json +``` + +```yaml +version: latest +clear-output-folder: true + +# azure-validator: true +semantic-validator: true + +azure-arm: true +add-credentials: true +generate-metadata: true +license-header: MICROSOFT_MIT_NO_VERSION + +csharp: + namespace: Microsoft.Azure.IotCentral + output-folder: client/csharp/Microsoft.Azure.IotCentral + +nodejs: + package-name: azure-iotcentral + package-version: 1.0.0 + output-folder: client/nodejs +``` \ No newline at end of file