diff --git a/custom-words.txt b/custom-words.txt index f2b1de52262c..badece50c293 100644 --- a/custom-words.txt +++ b/custom-words.txt @@ -1735,6 +1735,7 @@ WGXM whitelisted Whitelisting Whitelistings +whitespaces Whois Widevine windowsazuremediaservices diff --git a/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/devices_components_get.json b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/devices_components_get.json new file mode 100644 index 000000000000..8c1d95e58b49 --- /dev/null +++ b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/devices_components_get.json @@ -0,0 +1,31 @@ +{ + "title": "Get components from a device", + "description": "Get the list of components in a device.", + "parameters": { + "centralDnsSuffixInPath": "azureiotcentral.com", + "subdomain": "appsubdomain", + "device_id": "device1" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "@id": "", + "@type": [ + "InterfaceInstance" + ], + "name": "LocationTracking" + }, + { + "@id": "", + "@type": [ + "InterfaceInstance" + ], + "name": "EnvironmentSensing" + } + ] + } + } + } +} diff --git a/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/devices_modules_components_get.json b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/devices_modules_components_get.json new file mode 100644 index 000000000000..c43347e5aab8 --- /dev/null +++ b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/devices_modules_components_get.json @@ -0,0 +1,26 @@ +{ + "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": { + "centralDnsSuffixInPath": "azureiotcentral.com", + "subdomain": "appsubdomain", + "device_id": "edgedevice1", + "module_name": "edgemodule" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "@id": "", + "@type": [ + "InterfaceInstance" + ], + "name": "interfaceA", + "displayName": "InterfaceA" + } + ] + } + } + } +} diff --git a/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/devices_modules_get.json b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/devices_modules_get.json new file mode 100644 index 000000000000..06bfb2a01738 --- /dev/null +++ b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/devices_modules_get.json @@ -0,0 +1,33 @@ +{ + "title": "Get modules from an Edge device", + "description": "Get the list of modules in an IoT Edge device.", + "parameters": { + "centralDnsSuffixInPath": "azureiotcentral.com", + "subdomain": "appsubdomain", + "device_id": "edgedevice1" + }, + "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/2019-10-28-preview/iotcentral.json b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/iotcentral.json index b6f625803b3a..e6db1b5e77a2 100644 --- a/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/iotcentral.json +++ b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/iotcentral.json @@ -5,6 +5,18 @@ "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", + "x-ms-parameterized-host": { + "hostTemplate": "{subdomain}.{centralDnsSuffixInPath}", + "parameters": [ + { + "$ref": "#/parameters/CentralDnsSuffixInPath" + }, + { + "$ref": "#/parameters/Subdomain" + } + ] + }, "basePath": "/api/preview", "schemes": [ "https" @@ -62,167 +74,6 @@ "value" ] }, - "Attestation": { - "type": "object", - "properties": { - "type": { - "description": "Type of the attestation.", - "type": "string" - } - }, - "required": [ - "type" - ], - "discriminator": "type" - }, - "SymmetricKeyAttestation": { - "x-ms-discriminator-value": "SymmetricKeyAttestation", - "allOf": [ - { - "$ref": "#/definitions/Attestation" - }, - { - "type": "object", - "properties": { - "symmetricKey": { - "description": "The symmetric key credentials for this attestation.", - "$ref": "#/definitions/SymmetricKey" - } - }, - "required": [ - "symmetricKey" - ] - } - ] - }, - "X509Attestation": { - "x-ms-discriminator-value": "X509Attestation", - "allOf": [ - { - "$ref": "#/definitions/Attestation" - }, - { - "type": "object", - "properties": { - "x509": { - "description": "The X.509 credentials for this attestation.", - "$ref": "#/definitions/X509" - } - }, - "required": [ - "x509" - ] - } - ] - }, - "TpmAttestation": { - "x-ms-discriminator-value": "TpmAttestation", - "allOf": [ - { - "$ref": "#/definitions/Attestation" - }, - { - "type": "object", - "properties": { - "tpm": { - "description": "The TPM credentials for this attestation.", - "$ref": "#/definitions/Tpm" - } - }, - "required": [ - "tpm" - ] - } - ] - }, - "ObjectSchema": { - "allOf": [ - { - "$ref": "#/definitions/Entity" - }, - { - "type": "object", - "properties": { - "fields": { - "description": "The property fields of this object type.", - "type": "array", - "items": { - "$ref": "#/definitions/SchemaField" - } - } - }, - "required": [ - "fields" - ] - } - ] - }, - "EnumSchema": { - "allOf": [ - { - "$ref": "#/definitions/Entity" - }, - { - "type": "object", - "properties": { - "valueSchema": { - "description": "The schema for values of this enum type." - }, - "enumValues": { - "description": "The discreet named values of this enum type.", - "type": "array", - "items": { - "$ref": "#/definitions/EnumValue" - } - } - }, - "required": [ - "valueSchema", - "enumValues" - ] - } - ] - }, - "EnumValue": { - "allOf": [ - { - "$ref": "#/definitions/NamedEntity" - }, - { - "type": "object", - "properties": { - "enumValue": { - "description": "The resolved value of this enum entry." - } - }, - "required": [ - "enumValue" - ] - } - ] - }, - "MapSchema": { - "allOf": [ - { - "$ref": "#/definitions/Entity" - }, - { - "type": "object", - "properties": { - "mapKey": { - "description": "The schema for keys of this map type." - }, - "mapValue": { - "description": "The schema for values of this map type." - } - }, - "required": [ - "mapKey", - "mapValue" - ] - } - ] - }, "ArraySchema": { "allOf": [ { @@ -241,31 +92,18 @@ } ] }, - "SchemaField": { - "allOf": [ - { - "$ref": "#/definitions/NamedEntity" - }, - { - "type": "object", - "properties": { - "schema": { - "description": "The schema of this field." - }, - "displayUnit": { - "description": "The display name of the unit of this field.", - "type": "string" - }, - "unit": { - "description": "The unit of this field.", - "type": "string" - } - }, - "required": [ - "schema" - ] + "Attestation": { + "type": "object", + "properties": { + "type": { + "description": "Type of the attestation.", + "type": "string" } - ] + }, + "required": [ + "type" + ], + "discriminator": "type" }, "Capability": { "allOf": [ @@ -285,18 +123,9 @@ "unit": { "description": "The unit of this field.", "type": "string" - } - } - }, - { - "type": "object", - "properties": { + }, "commandType": { "description": "The call pattern of this command.", - "x-ms-enum": { - "name": "CommandTypes", - "modelAsString": true - }, "type": "string", "enum": [ "synchronous", @@ -310,21 +139,11 @@ "response": { "description": "The response definition for this command.", "$ref": "#/definitions/SchemaField" - } - } - }, - { - "type": "object", - "properties": { + }, "writable": { "description": "Whether this property is writable.", "type": "boolean" - } - } - }, - { - "type": "object", - "properties": { + }, "target": { "description": "The target capability models for this relationship.", "type": "array", @@ -339,111 +158,65 @@ } ] }, - "Interface": { + "CapabilityModel": { "allOf": [ { - "$ref": "#/definitions/Entity" + "$ref": "#/definitions/Interface" }, { "type": "object", "properties": { - "contents": { - "description": "The data definitions contained by the interface.", + "implements": { + "description": "The component implemented by the capability model.", "type": "array", "items": { - "$ref": "#/definitions/Capability" + "$ref": "#/definitions/Component" } } } } ] }, - "Component": { + "CapabilityReference": { "allOf": [ { - "$ref": "#/definitions/NamedEntity" + "$ref": "#/definitions/Entity" }, { "type": "object", "properties": { - "schema": { - "description": "The interface used by this component.", - "$ref": "#/definitions/Interface" + "component": { + "description": "The name of the component being referenced.", + "type": "string" + }, + "reference": { + "description": "The name of the capability being referenced.", + "type": "string" } }, "required": [ - "schema" + "component", + "reference" ] } ] }, - "CapabilityModel": { + "Component": { "allOf": [ { - "$ref": "#/definitions/Interface" + "$ref": "#/definitions/NamedEntity" }, { "type": "object", "properties": { - "implements": { - "description": "The component implemented by the capability model.", - "type": "array", - "items": { - "$ref": "#/definitions/Component" - } + "schema": { + "description": "The interface used by this component.", + "$ref": "#/definitions/Interface" } - } - } - ] - }, - "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" + }, + "required": [ + "schema" + ] } ] }, @@ -554,6 +327,11 @@ } } }, + "DeviceCloudProperties": { + "description": "Cloud property values associated with the device.", + "type": "object", + "additionalProperties": true + }, "DeviceCollection": { "type": "object", "properties": { @@ -573,11 +351,6 @@ "value" ] }, - "DeviceCloudProperties": { - "description": "Cloud property values associated with the device.", - "additionalProperties": true, - "type": "object" - }, "DeviceCommand": { "type": "object", "properties": { @@ -645,7 +418,8 @@ }, "DeviceProperties": { "description": "Property values associated with the device.", - "type": "object" + "type": "object", + "additionalProperties": true }, "DeviceTelemetry": { "type": "object", @@ -720,88 +494,28 @@ "value" ] }, - "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" - ] - }, - "Tpm": { + "Endpoint": { "type": "object", "properties": { - "endorsementKey": { - "description": "The TPM endorsement key for this credential.", + "type": { + "description": "Type of the endpoint.", "type": "string" - } - }, - "required": [ - "endorsementKey" - ] - }, - "X509": { - "type": "object", - "properties": { - "clientCertificates": { - "description": "The X.509 client certificates for this credential.", - "$ref": "#/definitions/X509Certificates" - } - }, - "required": [ - "clientCertificates" - ] - }, - "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" - ] - }, - "X509Certificate": { - "type": "object", - "properties": { - "certificate": { - "description": "The string representation of this certificate.", + "connectionString": { + "description": "Information for connecting to the endpoint.", "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.", + "name": { + "description": "Name of the entity to send data to.", "type": "string" } }, "required": [ - "sha1Thumbprint" - ] + "type", + "connectionString", + "name" + ], + "discriminator": "type" }, "Entity": { "type": "object", @@ -838,7 +552,7 @@ "@type" ] }, - "NamedEntity": { + "EnumSchema": { "allOf": [ { "$ref": "#/definitions/Entity" @@ -846,68 +560,73 @@ { "type": "object", "properties": { - "name": { - "description": "The programmatic name of the named entity.", - "type": "string" + "valueSchema": { + "description": "The schema for values of this enum type." + }, + "enumValues": { + "description": "The discreet named values of this enum type.", + "type": "array", + "items": { + "$ref": "#/definitions/EnumValue" + } } }, "required": [ - "name" + "valueSchema", + "enumValues" ] } ] }, - "Permission": { - "type": "object", - "properties": { - "roles": { - "description": "List of role IDs that specify the permissions to access the application.", - "type": "array", - "items": { - "type": "string" + "EnumValue": { + "allOf": [ + { + "$ref": "#/definitions/NamedEntity" + }, + { + "type": "object", + "properties": { + "enumValue": { + "description": "The resolved value of this enum entry." + } }, - "minItems": 1, - "maxItems": 1 + "required": [ + "enumValue" + ] } - }, - "required": [ - "roles" ] }, - "Role": { - "type": "object", - "properties": { - "id": { - "description": "Unique ID of the role.", - "type": "string", - "readOnly": true - }, - "displayName": { - "description": "Display name of the role.", - "type": "string" + "EventHubsEndpoint": { + "allOf": [ + { + "$ref": "#/definitions/Endpoint" } - } + ] }, - "RoleCollection": { - "type": "object", - "properties": { - "value": { - "description": "The collection of roles.", - "type": "array", - "items": { - "$ref": "#/definitions/Role" - } + "InitialValue": { + "allOf": [ + { + "$ref": "#/definitions/Entity" }, - "nextLink": { - "description": "URL to get the next page of roles.", - "type": "string" + { + "type": "object", + "properties": { + "capability": { + "description": "The reference to the capability for which an initial value is being provided.", + "$ref": "#/definitions/CapabilityReference" + }, + "value": { + "description": "The initial value of the capability." + } + }, + "required": [ + "capability", + "value" + ] } - }, - "required": [ - "value" ] }, - "SolutionModel": { + "Interface": { "allOf": [ { "$ref": "#/definitions/Entity" @@ -915,32 +634,18 @@ { "type": "object", "properties": { - "cloudProperties": { - "description": "The cloud properties defined by the solution model.", + "contents": { + "description": "The data definitions contained by the interface.", "type": "array", "items": { "$ref": "#/definitions/Capability" } - }, - "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": { + "MapSchema": { "allOf": [ { "$ref": "#/definitions/Entity" @@ -948,17 +653,76 @@ { "type": "object", "properties": { - "capability": { - "description": "The reference to the capability for which an initial value is being provided.", - "$ref": "#/definitions/CapabilityReference" + "mapKey": { + "description": "The schema for keys of this map type." }, - "value": { - "description": "The initial value of the capability." + "mapValue": { + "description": "The schema for values of this map type." } }, "required": [ - "capability", - "value" + "mapKey", + "mapValue" + ] + } + ] + }, + "NamedEntity": { + "allOf": [ + { + "$ref": "#/definitions/Entity" + }, + { + "type": "object", + "properties": { + "name": { + "description": "The programmatic name of the named entity.", + "type": "string" + } + }, + "required": [ + "name" + ] + } + ] + }, + "NamedEntityCollection": { + "type": "object", + "properties": { + "value": { + "description": "The collection of named entities.", + "type": "array", + "items": { + "$ref": "#/definitions/NamedEntity" + } + }, + "nextLink": { + "description": "URL to get the next page of named entities.", + "type": "string" + } + }, + "required": [ + "value" + ] + }, + "ObjectSchema": { + "allOf": [ + { + "$ref": "#/definitions/Entity" + }, + { + "type": "object", + "properties": { + "fields": { + "description": "The property fields of this object type.", + "type": "array", + "items": { + "$ref": "#/definitions/SchemaField" + } + } + }, + "required": [ + "fields" ] } ] @@ -998,54 +762,233 @@ } ] }, - "ValueDetail": { + "Permission": { + "type": "object", + "properties": { + "roles": { + "description": "List of role IDs that specify the permissions to access the application.", + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1 + } + }, + "required": [ + "roles" + ] + }, + "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" + } + }, + "nextLink": { + "description": "URL to get the next page of roles.", + "type": "string" + } + }, + "required": [ + "value" + ] + }, + "SchemaField": { "allOf": [ { - "$ref": "#/definitions/Entity" + "$ref": "#/definitions/NamedEntity" }, { "type": "object", "properties": { - "falseName": { - "description": "The string representation of a false value.", + "schema": { + "description": "The schema of this field." + }, + "displayUnit": { + "description": "The display name of the unit of this field.", "type": "string" }, - "trueName": { - "description": "The string representation of a true value.", + "unit": { + "description": "The unit of this field.", "type": "string" } - } + }, + "required": [ + "schema" + ] + } + ] + }, + "ServiceBusQueueEndpoint": { + "allOf": [ + { + "$ref": "#/definitions/Endpoint" + } + ] + }, + "ServiceBusTopicEndpoint": { + "allOf": [ + { + "$ref": "#/definitions/Endpoint" + } + ] + }, + "SolutionModel": { + "allOf": [ + { + "$ref": "#/definitions/Entity" }, { "type": "object", "properties": { - "hideTime": { - "description": "Specifies that the time portion of the date-time value should be hidden.", - "type": "boolean" + "cloudProperties": { + "description": "The cloud properties defined by the solution model.", + "type": "array", + "items": { + "$ref": "#/definitions/Capability" + } + }, + "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" + } } } + } + ] + }, + "StorageEndpoint": { + "allOf": [ + { + "$ref": "#/definitions/Endpoint" + } + ] + }, + "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": "SymmetricKeyAttestation", + "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": "TpmAttestation", + "allOf": [ + { + "$ref": "#/definitions/Attestation" }, { "type": "object", "properties": { + "tpm": { + "description": "The TPM credentials for this attestation.", + "$ref": "#/definitions/Tpm" + } + }, + "required": [ + "tpm" + ] + } + ] + }, + "ValueDetail": { + "allOf": [ + { + "$ref": "#/definitions/Entity" + }, + { + "type": "object", + "properties": { + "falseName": { + "description": "The string representation of a false value.", + "type": "string" + }, + "trueName": { + "description": "The string representation of a true value.", + "type": "string" + }, + "hideTime": { + "description": "Specifies that the time portion of the date-time value should be hidden.", + "type": "boolean" + }, "severity": { "description": "Specifies the severity of the event.", - "x-ms-enum": { - "name": "EventSeverity", - "modelAsString": true - }, "type": "string", "enum": [ "error", "warning", "information" ] - } - } - }, - { - "type": "object", - "properties": { + }, "decimalPlaces": { "description": "The number of decimal places that should be displayed for the number.", "type": "integer" @@ -1057,12 +1000,7 @@ "minValue": { "description": "The minimum expected value of the number.", "type": "number" - } - } - }, - { - "type": "object", - "properties": { + }, "maxLength": { "description": "The maximum expected length of the string.", "type": "integer" @@ -1072,36 +1010,83 @@ "type": "integer" }, "trimWhitespace": { - "description": "Specifies the visual and storage treatment of white spaces in the string.", + "description": "Specifies the visual and storage treatment of whitespaces in the string.", "type": "boolean" } } } ] }, - "CapabilityReference": { + "X509": { + "type": "object", + "properties": { + "clientCertificates": { + "description": "The X.509 client certificates for this credential.", + "$ref": "#/definitions/X509Certificates" + } + } + }, + "X509Attestation": { + "x-ms-discriminator-value": "X509Attestation", "allOf": [ { - "$ref": "#/definitions/Entity" + "$ref": "#/definitions/Attestation" }, { "type": "object", "properties": { - "component": { - "description": "The name of the component being referenced.", - "type": "string" - }, - "reference": { - "description": "The name of the capability being referenced.", - "type": "string" + "x509": { + "description": "The X.509 credentials for this attestation.", + "$ref": "#/definitions/X509" } }, "required": [ - "component", - "reference" + "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": { @@ -1128,15 +1113,6 @@ } }, "/apiTokens/{token_id}": { - "parameters": [ - { - "in": "path", - "name": "token_id", - "description": "Unique ID for the API token.", - "type": "string", - "required": true - } - ], "get": { "operationId": "ApiTokens_Get", "summary": "Get an API token by ID.", @@ -1145,6 +1121,15 @@ "$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", @@ -1171,13 +1156,13 @@ "required": true }, { - "name": "body", "in": "body", + "name": "body", "description": "API token body.", - "required": true, "schema": { "$ref": "#/definitions/ApiToken" - } + }, + "required": true } ], "responses": { @@ -1192,6 +1177,11 @@ "delete": { "operationId": "ApiTokens_Remove", "summary": "Delete an API token.", + "x-ms-examples": { + "Delete API token": { + "$ref": "./examples/apitoken_delete.json" + } + }, "parameters": [ { "in": "path", @@ -1201,11 +1191,6 @@ "required": true } ], - "x-ms-examples": { - "Delete API token": { - "$ref": "./examples/apitoken_delete.json" - } - }, "responses": { "204": { "description": "Success" @@ -1236,15 +1221,6 @@ } }, "/continuousDataExports/{export_id}": { - "parameters": [ - { - "in": "path", - "name": "export_id", - "description": "Unique ID for the continuous data export.", - "type": "string", - "required": true - } - ], "get": { "operationId": "ContinuousDataExports_Get", "summary": "Get a continuous data export by ID.", @@ -1253,6 +1229,15 @@ "$ref": "./examples/continuousdataexports_get.json" } }, + "parameters": [ + { + "in": "path", + "name": "export_id", + "description": "Unique ID for the continuous data export.", + "type": "string", + "required": true + } + ], "responses": { "200": { "description": "Success", @@ -1279,13 +1264,13 @@ "required": true }, { - "name": "body", "in": "body", + "name": "body", "description": "Data export body.", - "required": true, "schema": { "$ref": "#/definitions/ContinuousDataExport" - } + }, + "required": true } ], "responses": { @@ -1300,6 +1285,11 @@ "delete": { "operationId": "ContinuousDataExports_Remove", "summary": "Delete a continuous data export.", + "x-ms-examples": { + "Delete export": { + "$ref": "./examples/continuousdataexports_delete.json" + } + }, "parameters": [ { "in": "path", @@ -1309,11 +1299,6 @@ "required": true } ], - "x-ms-examples": { - "Delete export": { - "$ref": "./examples/continuousdataexports_delete.json" - } - }, "responses": { "204": { "description": "Success" @@ -1347,42 +1332,22 @@ "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" + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/DeviceTemplate" + } } } }, @@ -1399,13 +1364,13 @@ "$ref": "#/parameters/DeviceTemplateId" }, { - "name": "body", "in": "body", + "name": "body", "description": "Device template body.", - "required": true, "schema": { "$ref": "#/definitions/DeviceTemplate" - } + }, + "required": true } ], "responses": { @@ -1416,54 +1381,74 @@ } } } + }, + "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/DeviceTemplateId" + } + ], + "responses": { + "204": { + "description": "Success" + } + } } }, - "/deviceTemplates/{device_template_id}/merged": { + "/deviceTemplates/{device_template_id}/devices": { "get": { - "operationId": "DeviceTemplates_GetMerged", - "summary": "Get a merged device template by ID", + "operationId": "DeviceTemplates_ListDevices", + "summary": "Get devices for a template", + "x-ms-examples": { + "List devices associated to a device template": { + "$ref": "./examples/devices_list_by_template.json" + } + }, "parameters": [ { "$ref": "#/parameters/DeviceTemplateId" } ], - "x-ms-examples": { - "Get a merged device template by Id": { - "$ref": "./examples/devicetemplates_get_merged.json" - } + "x-ms-pageable": { + "nextLinkName": "nextLink" }, "responses": { "200": { "description": "Success", "schema": { - "$ref": "#/definitions/DeviceTemplate" + "$ref": "#/definitions/DeviceCollection" } } } } }, - "/deviceTemplates/{device_template_id}/devices": { + "/deviceTemplates/{device_template_id}/merged": { "get": { - "operationId": "DeviceTemplates_ListDevices", - "summary": "Get devices for a template", + "operationId": "DeviceTemplates_GetMerged", + "summary": "Get a merged device template by ID", + "x-ms-examples": { + "Get a merged device template by Id": { + "$ref": "./examples/devicetemplates_get_merged.json" + } + }, "parameters": [ { "$ref": "#/parameters/DeviceTemplateId" } ], - "x-ms-examples": { - "List devices associated to a device template": { - "$ref": "./examples/devices_list_by_template.json" - } - }, - "x-ms-pageable": { - "nextLinkName": "nextLink" - }, "responses": { "200": { "description": "Success", "schema": { - "$ref": "#/definitions/DeviceCollection" + "$ref": "#/definitions/DeviceTemplate" } } } @@ -1496,16 +1481,16 @@ "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" } }, + "parameters": [ + { + "$ref": "#/parameters/DeviceId" + } + ], "responses": { "200": { "description": "Success", @@ -1529,13 +1514,13 @@ "$ref": "#/parameters/DeviceId" }, { - "name": "body", "in": "body", + "name": "body", "description": "Device body.", - "required": true, "schema": { "$ref": "#/definitions/Device" - } + }, + "required": true } ], "responses": { @@ -1551,79 +1536,24 @@ "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" - } - } - } - }, - "/roles": { - "get": { - "operationId": "Roles_List", - "summary": "Get the list of roles in an application.", - "x-ms-examples": { - "List roles": { - "$ref": "./examples/roles_list.json" - } - }, - "x-ms-pageable": { - "nextLinkName": "nextLink" - }, - "responses": { - "200": { - "description": "Success", - "schema": { - "$ref": "#/definitions/RoleCollection" - } - } - } - } - }, - "/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 + "$ref": "#/parameters/DeviceId" } ], - "x-ms-examples": { - "Get role by Id": { - "$ref": "./examples/roles_get.json" - } - }, "responses": { - "200": { - "description": "Success", - "schema": { - "$ref": "#/definitions/Role" - } + "204": { + "description": "Success" } } } }, "/devices/{device_id}/attestation": { - "parameters": [ - { - "$ref": "#/parameters/DeviceId" - } - ], "get": { "operationId": "Devices_GetAttestation", "summary": "Get device attestation", @@ -1632,6 +1562,11 @@ "$ref": "./examples/devices_attestations_get.json" } }, + "parameters": [ + { + "$ref": "#/parameters/DeviceId" + } + ], "responses": { "200": { "description": "Success", @@ -1644,31 +1579,31 @@ "put": { "operationId": "Devices_SetAttestation", "summary": "Create or update 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/DeviceId" }, { - "name": "body", "in": "body", + "name": "body", "description": "Individual device attestation body.", - "required": true, "schema": { "$ref": "#/definitions/Attestation" - } + }, + "required": true } ], - "x-ms-examples": { - "Create or update device attestation - Symmetric Key": { - "$ref": "./examples/devices_attestations_set_symmetricKey.json" - }, - "Create or update device attestation - X509": { - "$ref": "./examples/devices_attestations_set_x509.json" - }, - "Create or update device attestation - TPM": { - "$ref": "./examples/devices_attestations_set_tpm.json" - } - }, "responses": { "200": { "description": "Success", @@ -1681,16 +1616,16 @@ "delete": { "operationId": "Devices_RemoveAttestation", "summary": "Remove an individual device attestation", - "parameters": [ - { - "$ref": "#/parameters/DeviceId" - } - ], "x-ms-examples": { "Delete device attestation": { "$ref": "./examples/devices_attestations_delete.json" } }, + "parameters": [ + { + "$ref": "#/parameters/DeviceId" + } + ], "responses": { "204": { "description": "Success" @@ -1699,11 +1634,6 @@ } }, "/devices/{device_id}/cloudProperties": { - "parameters": [ - { - "$ref": "#/parameters/DeviceId" - } - ], "get": { "operationId": "Devices_GetCloudProperties", "summary": "Get device cloud properties", @@ -1713,6 +1643,11 @@ "$ref": "./examples/devices_cloudproperties_get.json" } }, + "parameters": [ + { + "$ref": "#/parameters/DeviceId" + } + ], "responses": { "200": { "description": "Success", @@ -1727,51 +1662,78 @@ "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" + "Update cloud properties": { + "$ref": "./examples/devices_cloudproperties_update.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/DeviceId" + }, + { + "in": "body", + "name": "body", + "description": "Device properties.", + "schema": { + "$ref": "#/definitions/DeviceCloudProperties" + }, + "required": true + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/DeviceCloudProperties" + } + } + } + } + }, + "/devices/{device_id}/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": [ { - "name": "body", - "in": "body", - "description": "Device properties.", - "required": true, - "schema": { - "$ref": "#/definitions/DeviceCloudProperties" - } + "$ref": "#/parameters/DeviceId" } ], "responses": { "200": { "description": "Success", "schema": { - "$ref": "#/definitions/DeviceCloudProperties" + "$ref": "#/definitions/NamedEntityCollection" } } } } }, "/devices/{device_id}/components/{component_name}/commands/{command_name}": { - "parameters": [ - { - "$ref": "#/parameters/DeviceId" - }, - { - "$ref": "#/parameters/ComponentName" - }, - { - "$ref": "#/parameters/CommandName" - } - ], "get": { "operationId": "Devices_GetComponentCommandHistory", - "summary": "Get command history for a component of the device", + "summary": "Get device command history", "x-ms-examples": { "Get command history": { "$ref": "./examples/devices_commandshistory_get.json" } }, + "parameters": [ + { + "$ref": "#/parameters/DeviceId" + }, + { + "$ref": "#/parameters/ComponentName" + }, + { + "$ref": "#/parameters/CommandName" + } + ], "x-ms-pageable": { "nextLinkName": "nextLink" }, @@ -1786,24 +1748,33 @@ }, "post": { "operationId": "Devices_ExecuteComponentCommand", - "summary": "Execute a command on a component of a device", + "summary": "Execute a device command", "description": "Execute a command on a device.", + "x-ms-examples": { + "Send command": { + "$ref": "./examples/devices_commands_send.json" + } + }, "parameters": [ { - "name": "body", + "$ref": "#/parameters/DeviceId" + }, + { + "$ref": "#/parameters/ComponentName" + }, + { + "$ref": "#/parameters/CommandName" + }, + { "in": "body", + "name": "body", "description": "Device command body.", - "required": true, "schema": { "$ref": "#/definitions/DeviceCommand" - } + }, + "required": true } ], - "x-ms-examples": { - "Send command": { - "$ref": "./examples/devices_commands_send.json" - } - }, "responses": { "201": { "description": "Success", @@ -1814,74 +1785,98 @@ } } }, - "/devices/{device_id}/modules/{module_name}/components/{component_name}/commands/{command_name}": { - "parameters": [ - { - "$ref": "#/parameters/DeviceId" - }, - { - "$ref": "#/parameters/ModuleName" - }, - { - "$ref": "#/parameters/ComponentName" - }, - { - "$ref": "#/parameters/CommandName" - } - ], + "/devices/{device_id}/components/{component_name}/properties": { "get": { - "operationId": "Devices_GetModuleComponentCommandHistory", - "summary": "Get module command history", + "operationId": "Devices_GetComponentProperties", + "summary": "Get device properties for a specific component", "x-ms-examples": { - "Get command history within module": { - "$ref": "./examples/modules_commandshistory_get.json" + "Get properties on components": { + "$ref": "./examples/devices_properties_components_get.json" } }, + "parameters": [ + { + "$ref": "#/parameters/DeviceId" + }, + { + "$ref": "#/parameters/ComponentName" + } + ], "responses": { "200": { "description": "Success", "schema": { - "$ref": "#/definitions/DeviceCommandCollection" + "$ref": "#/definitions/DeviceProperties" } } } }, - "post": { - "operationId": "Devices_ExecuteModuleComponentCommand", - "summary": "Execute a module command", - "description": "Execute a command on a module.", + "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": [ { - "name": "body", + "$ref": "#/parameters/DeviceId" + }, + { + "$ref": "#/parameters/ComponentName" + }, + { "in": "body", - "description": "Device command body.", - "required": true, + "name": "body", + "description": "Device properties.", "schema": { - "$ref": "#/definitions/DeviceCommand" - } + "$ref": "#/definitions/DeviceProperties" + }, + "required": true } ], + "responses": { + "202": { + "description": "Success", + "schema": { + "$ref": "#/definitions/DeviceProperties" + } + } + } + } + }, + "/devices/{device_id}/components/{component_name}/telemetry/{telemetry_name}": { + "get": { + "operationId": "Devices_GetComponentTelemetryValue", + "summary": "Get device telemetry value", "x-ms-examples": { - "Send command to module": { - "$ref": "./examples/modules_commands_send.json" + "Get telemetry": { + "$ref": "./examples/devices_telemetry_get.json" } }, + "parameters": [ + { + "$ref": "#/parameters/DeviceId" + }, + { + "$ref": "#/parameters/ComponentName" + }, + { + "$ref": "#/parameters/TelemetryName" + } + ], "responses": { - "201": { + "200": { "description": "Success", "schema": { - "$ref": "#/definitions/DeviceCommand" + "$ref": "#/definitions/DeviceTelemetry" } } } } }, "/devices/{device_id}/credentials": { - "parameters": [ - { - "$ref": "#/parameters/DeviceId" - } - ], "get": { "operationId": "Devices_GetCredentials", "summary": "Get device credentials", @@ -1890,6 +1885,11 @@ "$ref": "./examples/devicecredentials_get.json" } }, + "parameters": [ + { + "$ref": "#/parameters/DeviceId" + } + ], "responses": { "200": { "description": "Success", @@ -1900,77 +1900,154 @@ } } }, - "/devices/{device_id}/properties": { - "parameters": [ - { - "$ref": "#/parameters/DeviceId" + "/devices/{device_id}/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/DeviceId" + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/NamedEntityCollection" + } + } } - ], + } + }, + "/devices/{device_id}/modules/{module_name}/components": { "get": { - "operationId": "Devices_GetProperties", - "summary": "Get device properties", - "description": "Get all property values of a device by device ID.", + "operationId": "Devices_ListModuleComponents", + "summary": "List the components present in a module", "x-ms-examples": { - "Get properties": { - "$ref": "./examples/devices_properties_get.json" + "List module components": { + "$ref": "./examples/devices_modules_components_get.json" } }, + "parameters": [ + { + "$ref": "#/parameters/DeviceId" + }, + { + "$ref": "#/parameters/ModuleName" + } + ], "responses": { "200": { "description": "Success", "schema": { - "$ref": "#/definitions/DeviceProperties" + "$ref": "#/definitions/NamedEntityCollection" + } + } + } + } + }, + "/devices/{device_id}/modules/{module_name}/components/{component_name}/commands/{command_name}": { + "get": { + "operationId": "Devices_GetModuleComponentCommandHistory", + "summary": "Get module command history", + "x-ms-examples": { + "Get command history within module": { + "$ref": "./examples/modules_commandshistory_get.json" + } + }, + "parameters": [ + { + "$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" } } } }, - "put": { - "operationId": "Devices_UpdateProperties", - "summary": "Update device properties", - "description": "Update all property values of a device by device ID.", + "post": { + "operationId": "Devices_ExecuteModuleComponentCommand", + "summary": "Execute a module command", + "description": "Execute a command on a module.", "x-ms-examples": { - "Update properties": { - "$ref": "./examples/devices_properties_update.json" + "Send command to module": { + "$ref": "./examples/modules_commands_send.json" } }, "parameters": [ { - "name": "body", + "$ref": "#/parameters/DeviceId" + }, + { + "$ref": "#/parameters/ModuleName" + }, + { + "$ref": "#/parameters/ComponentName" + }, + { + "$ref": "#/parameters/CommandName" + }, + { "in": "body", - "description": "Device properties.", - "required": true, + "name": "body", + "description": "Device command body.", "schema": { - "$ref": "#/definitions/DeviceProperties" - } + "$ref": "#/definitions/DeviceCommand" + }, + "required": true } ], "responses": { - "202": { + "201": { "description": "Success", "schema": { - "$ref": "#/definitions/DeviceProperties" + "$ref": "#/definitions/DeviceCommand" } } } } }, - "/devices/{device_id}/components/{component_name}/properties": { - "parameters": [ - { - "$ref": "#/parameters/DeviceId" - }, - { - "$ref": "#/parameters/ComponentName" - } - ], + "/devices/{device_id}/modules/{module_name}/components/{component_name}/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" + "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/DeviceId" + }, + { + "$ref": "#/parameters/ModuleName" + }, + { + "$ref": "#/parameters/ComponentName" + } + ], "responses": { "200": { "description": "Success", @@ -1981,22 +2058,31 @@ } }, "put": { - "operationId": "Devices_UpdateComponentProperties", - "summary": "Update device properties for a specific component", + "operationId": "Devices_UpdateModuleComponentProperties", + "summary": "Update module properties for a specific component", "x-ms-examples": { - "Update properties on components": { - "$ref": "./examples/devices_properties_components_set.json" + "Update properties of a module within a component": { + "$ref": "./examples/modules_properties_components_set.json" } }, "parameters": [ { - "name": "body", + "$ref": "#/parameters/DeviceId" + }, + { + "$ref": "#/parameters/ModuleName" + }, + { + "$ref": "#/parameters/ComponentName" + }, + { "in": "body", - "description": "Device properties.", - "required": true, + "name": "body", + "description": "Module properties.", "schema": { "$ref": "#/definitions/DeviceProperties" - } + }, + "required": true } ], "responses": { @@ -2009,15 +2095,40 @@ } } }, - "/devices/{device_id}/modules/{module_name}/properties": { - "parameters": [ - { - "$ref": "#/parameters/DeviceId" + "/devices/{device_id}/modules/{module_name}/components/{component_name}/telemetry/{telemetry_name}": { + "get": { + "operationId": "Devices_GetModuleComponentTelemetryValue", + "summary": "Get module telemetry value", + "x-ms-examples": { + "Get telemetry from module": { + "$ref": "./examples/modules_telemetry_get.json" + } }, - { - "$ref": "#/parameters/ModuleName" + "parameters": [ + { + "$ref": "#/parameters/DeviceId" + }, + { + "$ref": "#/parameters/ModuleName" + }, + { + "$ref": "#/parameters/ComponentName" + }, + { + "$ref": "#/parameters/TelemetryName" + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/DeviceTelemetry" + } + } } - ], + } + }, + "/devices/{device_id}/modules/{module_name}/properties": { "get": { "operationId": "Devices_GetModuleProperties", "summary": "Get module properties", @@ -2027,6 +2138,14 @@ "$ref": "./examples/modules_properties_get.json" } }, + "parameters": [ + { + "$ref": "#/parameters/DeviceId" + }, + { + "$ref": "#/parameters/ModuleName" + } + ], "responses": { "200": { "description": "Success", @@ -2040,22 +2159,28 @@ "operationId": "Devices_UpdateModuleProperties", "summary": "Update module properties", "description": "Update all property values of a module.", + "x-ms-examples": { + "Update properties of a module": { + "$ref": "./examples/modules_properties_update.json" + } + }, "parameters": [ { - "name": "body", + "$ref": "#/parameters/DeviceId" + }, + { + "$ref": "#/parameters/ModuleName" + }, + { "in": "body", + "name": "body", "description": "Module properties.", - "required": true, "schema": { "$ref": "#/definitions/DeviceProperties" - } + }, + "required": true } ], - "x-ms-examples": { - "Update properties of a module": { - "$ref": "./examples/modules_properties_update.json" - } - }, "responses": { "202": { "description": "Success", @@ -2066,26 +2191,21 @@ } } }, - "/devices/{device_id}/modules/{module_name}/components/{component_name}/properties": { - "parameters": [ - { - "$ref": "#/parameters/DeviceId" - }, - { - "$ref": "#/parameters/ModuleName" - }, - { - "$ref": "#/parameters/ComponentName" - } - ], + "/devices/{device_id}/properties": { "get": { - "operationId": "Devices_GetModuleComponentProperties", - "summary": "Get module properties for a specific component", + "operationId": "Devices_GetProperties", + "summary": "Get device properties", + "description": "Get all property values of a device by device ID.", "x-ms-examples": { - "Get properties of a module": { - "$ref": "./examples/modules_properties_components_get.json" + "Get properties": { + "$ref": "./examples/devices_properties_get.json" } }, + "parameters": [ + { + "$ref": "#/parameters/DeviceId" + } + ], "responses": { "200": { "description": "Success", @@ -2096,24 +2216,28 @@ } }, "put": { - "operationId": "Devices_UpdateModuleComponentProperties", - "summary": "Update module properties for a specific component", + "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": [ { - "name": "body", + "$ref": "#/parameters/DeviceId" + }, + { "in": "body", - "description": "Module properties.", - "required": true, + "name": "body", + "description": "Device properties.", "schema": { "$ref": "#/definitions/DeviceProperties" - } + }, + "required": true } ], - "x-ms-examples": { - "Update properties of a module within a component": { - "$ref": "./examples/modules_properties_components_set.json" - } - }, "responses": { "202": { "description": "Success", @@ -2124,64 +2248,51 @@ } } }, - "/devices/{device_id}/components/{component_name}/telemetry/{telemetry_name}": { - "parameters": [ - { - "$ref": "#/parameters/DeviceId" - }, - { - "$ref": "#/parameters/ComponentName" - }, - { - "$ref": "#/parameters/TelemetryName" - } - ], + "/roles": { "get": { - "operationId": "Devices_GetComponentTelemetryValue", - "summary": "Get device telemetry value", + "operationId": "Roles_List", + "summary": "Get the list of roles in an application.", "x-ms-examples": { - "Get telemetry": { - "$ref": "./examples/devices_telemetry_get.json" + "List roles": { + "$ref": "./examples/roles_list.json" } }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, "responses": { "200": { "description": "Success", "schema": { - "$ref": "#/definitions/DeviceTelemetry" + "$ref": "#/definitions/RoleCollection" } } } } }, - "/devices/{device_id}/modules/{module_name}/components/{component_name}/telemetry/{telemetry_name}": { - "parameters": [ - { - "$ref": "#/parameters/DeviceId" - }, - { - "$ref": "#/parameters/ModuleName" - }, - { - "$ref": "#/parameters/ComponentName" - }, - { - "$ref": "#/parameters/TelemetryName" - } - ], + "/roles/{role_id}": { "get": { - "operationId": "Devices_GetModuleComponentTelemetryValue", - "summary": "Get module telemetry value", + "operationId": "Roles_Get", + "summary": "Get a role by ID.", "x-ms-examples": { - "Get telemetry from module": { - "$ref": "./examples/modules_telemetry_get.json" + "Get role by Id": { + "$ref": "./examples/roles_get.json" } }, + "parameters": [ + { + "in": "path", + "name": "role_id", + "description": "Unique ID for the role.", + "type": "string", + "required": true + } + ], "responses": { "200": { "description": "Success", "schema": { - "$ref": "#/definitions/DeviceTelemetry" + "$ref": "#/definitions/Role" } } } @@ -2189,50 +2300,52 @@ } }, "parameters": { - "DeviceTemplateId": { + "CentralDnsSuffixInPath": { "in": "path", - "name": "device_template_id", - "description": "Unique ID of the device template.", - "x-ms-parameter-location": "method", + "name": "centralDnsSuffixInPath", + "description": "The DNS suffix used as the base 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 }, - "DeviceId": { + "CommandName": { "in": "path", - "name": "device_id", - "description": "Unique ID of the device.", + "name": "command_name", + "description": "Name of this device command.", "x-ms-parameter-location": "method", "type": "string", "required": true }, - "ModuleName": { + "ComponentName": { "in": "path", - "name": "module_name", - "description": "Name of the device module.", + "name": "component_name", + "description": "Name of the component. In the device template editor in your app, this is the interface instance name.", "x-ms-parameter-location": "method", "type": "string", "required": true }, - "ComponentName": { + "DeviceId": { "in": "path", - "name": "component_name", - "description": "Name of the component. In the device template editor in your app, this is the interface instance name.", + "name": "device_id", + "description": "Unique ID of the device.", "x-ms-parameter-location": "method", "type": "string", "required": true }, - "CommandName": { + "DeviceTemplateId": { "in": "path", - "name": "command_name", - "description": "Name of this device command.", + "name": "device_template_id", + "description": "Unique ID of the device template.", "x-ms-parameter-location": "method", "type": "string", "required": true }, - "TelemetryName": { + "ModuleName": { "in": "path", - "name": "telemetry_name", - "description": "Name of this device telemetry.", + "name": "module_name", + "description": "Name of the device module.", "x-ms-parameter-location": "method", "type": "string", "required": true @@ -2240,23 +2353,26 @@ "Subdomain": { "in": "path", "name": "subdomain", - "description": "Application subdomain.", + "description": "The application subdomain.", "x-ms-parameter-location": "client", "type": "string", "required": true }, - "CentralDnsSuffixInPath": { - "name": "centralDnsSuffixInPath", + "TelemetryName": { "in": "path", - "required": true, + "name": "telemetry_name", + "description": "Name of this device telemetry.", + "x-ms-parameter-location": "method", "type": "string", - "default": "azureiotcentral.com", - "x-ms-skip-url-encoding": true, - "description": "The DNS suffix used as the base for all Azure IoT Central service requests.", - "x-ms-parameter-location": "client" + "required": true } }, "securityDefinitions": { + "APIKeyHeader": { + "type": "apiKey", + "in": "header", + "name": "Authorization" + }, "azure_auth": { "type": "oauth2", "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", @@ -2267,15 +2383,9 @@ } } }, - "x-ms-parameterized-host": { - "hostTemplate": "{subdomain}.{centralDnsSuffixInPath}", - "parameters": [ - { - "$ref": "#/parameters/Subdomain" - }, - { - "$ref": "#/parameters/CentralDnsSuffixInPath" - } - ] - } + "security": [ + { + "APIKeyHeader": [] + } + ] } 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 index 51e8c8ea2184..f8ad6cee92c4 100644 --- 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 @@ -2,7 +2,7 @@ "swagger": "2.0", "info": { "version": "preview", - "title": "Azure IoT Central", + "title": "Azure IoT Central Applications", "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", @@ -52,6 +52,10 @@ "items": { "$ref": "#/definitions/Application" } + }, + "nextLink": { + "description": "URL to get the next page of applications.", + "type": "string" } }, "required": [ @@ -64,6 +68,14 @@ "get": { "operationId": "Applications_List", "summary": "Get the list of applications accessible to the signed-in user", + "x-ms-examples": { + "List applications": { + "$ref": "./examples/application_list.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, "responses": { "200": { "description": "Success", @@ -71,14 +83,6 @@ "$ref": "#/definitions/ApplicationCollection" } } - }, - "x-ms-pageable": { - "nextLinkName": null - }, - "x-ms-examples": { - "List applications": { - "$ref": "./examples/application_list.json" - } } } }, @@ -86,6 +90,11 @@ "get": { "operationId": "Applications_Get", "summary": "Get an application by ID", + "x-ms-examples": { + "Get application": { + "$ref": "./examples/application_get.json" + } + }, "parameters": [ { "in": "path", @@ -102,26 +111,28 @@ "$ref": "#/definitions/Application" } } - }, - "x-ms-examples": { - "Get application": { - "$ref": "./examples/application_get.json" - } } } } }, "parameters": { - "Subdomain": { + "CentralDnsSuffixInPath": { "in": "path", - "name": "subdomain", - "description": "Application subdomain.", + "name": "centralDnsSuffixInPath", + "description": "The DNS suffix used as the base 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 } }, "securityDefinitions": { + "APIKeyHeader": { + "type": "apiKey", + "in": "header", + "name": "Authorization" + }, "azure_auth": { "type": "oauth2", "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", @@ -131,5 +142,10 @@ "user_impersonation": "impersonate your user account" } } - } + }, + "security": [ + { + "APIKeyHeader": [] + } + ] } diff --git a/specification/iotcentral/data-plane/readme.md b/specification/iotcentral/data-plane/readme.md index 3927cea53f3b..29406dbbaf09 100644 --- a/specification/iotcentral/data-plane/readme.md +++ b/specification/iotcentral/data-plane/readme.md @@ -1,83 +1,66 @@ # 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 $(package-2019-10-28-preview-global) +input-file: Microsoft.IoTCentral/preview/2019-10-28-preview/iotcentralapps.json +``` +```yaml $(package-2019-10-28-preview-app) +input-file: Microsoft.IoTCentral/preview/2019-10-28-preview/iotcentral.json +``` + +```yaml +batch: + - package-2019-10-28-preview-global : true + - package-2019-10-28-preview-app: true ``` ```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 ``` ## Multi-API/Profile support for AutoRest v3 generators - AutoRest V3 generators require the use of `--tag=all-api-versions` to select api files. - This block is updated by an automatic script. Edits may be lost! - ``` yaml $(tag) == 'all-api-versions' /* autogenerated */ # include the azure profile definitions from the standard location require: $(this-folder)/../../../profiles/readme.md - # all the input files across all versions input-file: - $(this-folder)/Microsoft.IoTCentral/preview/2019-10-28-preview/iotcentral.json - $(this-folder)/Microsoft.IoTCentral/preview/2019-10-28-preview/iotcentralapps.json - ``` - If there are files that should not be in the `all-api-versions` set, uncomment the `exclude-file` section below and add the file paths. - ``` yaml $(tag) == 'all-api-versions' #exclude-file: # - $(this-folder)/Microsoft.Example/stable/2010-01-01/somefile.json -``` - +``` \ No newline at end of file