From 6fa65adc716a66bad261c7dc8856ebadbf4d2d05 Mon Sep 17 00:00:00 2001 From: Vivian Liu Date: Thu, 17 Oct 2019 17:34:56 -0700 Subject: [PATCH 01/22] Adding new API surface --- .../2019-10-28-preview/iotcentral.json | 1181 +++++++++++++++++ specification/iotcentral/data-plane/readme.md | 43 + 2 files changed, 1224 insertions(+) create mode 100644 specification/iotcentral/data-plane/preview/2019-10-28-preview/iotcentral.json create mode 100644 specification/iotcentral/data-plane/readme.md diff --git a/specification/iotcentral/data-plane/preview/2019-10-28-preview/iotcentral.json b/specification/iotcentral/data-plane/preview/2019-10-28-preview/iotcentral.json new file mode 100644 index 000000000000..55e0c117d008 --- /dev/null +++ b/specification/iotcentral/data-plane/preview/2019-10-28-preview/iotcentral.json @@ -0,0 +1,1181 @@ +{ + "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": { + "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" + } + } + }] + }, + "ApiTokenCollection": { + "type": "object", + "properties": { + "value": { + "description": "The collection of api tokens.", + "type": "array", + "items": { + "$ref": "#/definitions/ApiToken" + } + } + }, + "required": ["value"] + }, + "Application": { + "type": "object", + "properties": { + "id": { + "description": "Unique ID of the application.", + "type": "string", + "readOnly": true + }, + "displayName": { + "description": "Display name of the application.", + "type": "string" + }, + "subdomain": { + "description": "The URL subdomain of the application.", + "type": "string" + }, + "host": { + "description": "The URL host of the application.", + "type": "string" + } + }, + "required": ["subdomain", "host"] + }, + "ApplicationCollection": { + "type": "object", + "properties": { + "value": { + "description": "The collection of applications.", + "type": "array", + "items": { + "$ref": "#/definitions/Application" + } + } + }, + "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" + } + } + } + }] + }, + "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 + }, + "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"] + } + } + }, + "required": ["endpoint", "enabled", "sources"] + }, + "ContinuousDataExportCollection": { + "type": "object", + "properties": { + "value": { + "description": "The collection of continuous data exports.", + "type": "array", + "items": { + "$ref": "#/definitions/ContinuousDataExport" + } + } + }, + "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", "simulated"] + }, + "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"] + }, + "DeviceCloudProperties": { + "description": "Cloud property values associated with the device.", + "type": "object", + "additionalProperties": true + }, + "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"] + }, + "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"] + }, + "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"] + }] + }, + "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." + } + }, + "required": ["value"] + }, + "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" + } + } + }] + }, + "CapabilityReference": { + "type": "object", + "properties": { + "instance": { + "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.", + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/ApiTokenCollection" + } + } + } + } + }, + "/apiTokens/{token_id}": { + "get": { + "operationId": "ApiTokens_Get", + "summary": "Get an API token by ID.", + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/ApiToken" + } + } + } + }, + "put": { + "operationId": "ApiTokens_Set", + "summary": "Create a new API token in the application.", + "parameters": [{ + "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.", + "responses": { + "204": { + "description": "Success" + } + } + }, + "parameters": [{ + "in": "path", + "name": "token_id", + "description": "Unique ID for the API token.", + "type": "string", + "required": true + }] + }, + "/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" + } + } + } + } + }, + "/applications/{application_id}": { + "get": { + "operationId": "Applications_Get", + "summary": "Get an application by ID", + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/Application" + } + } + } + }, + "parameters": [{ + "in": "path", + "name": "application_id", + "description": "Unique ID of the application.", + "type": "string", + "required": true + }] + }, + "/continuousDataExports": { + "get": { + "operationId": "ContinuousDataExports_List", + "summary": "Get the list of continuous data exports in an application.", + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/ContinuousDataExportCollection" + } + } + } + }, + "post": { + "operationId": "ContinuousDataExports_Create", + "summary": "Create a new continuous data export in the application.", + "parameters": [{ + "name": "body", + "in": "body", + "description": "Data export body.", + "required": true, + "schema": { + "$ref": "#/definitions/ContinuousDataExport" + } + }], + "responses": { + "201": { + "description": "Success", + "schema": { + "$ref": "#/definitions/ContinuousDataExport" + } + } + } + } + }, + "/continuousDataExports/{export_id}": { + "get": { + "operationId": "ContinuousDataExports_Get", + "summary": "Get a continuous data export by ID.", + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/ContinuousDataExport" + } + } + } + }, + "delete": { + "operationId": "ContinuousDataExports_Remove", + "summary": "Delete a continuous data export.", + "responses": { + "204": { + "description": "Success" + } + } + }, + "parameters": [{ + "in": "path", + "name": "export_id", + "description": "Unique ID for the continuous data export.", + "type": "string", + "required": true + }] + }, + "/deviceTemplates": { + "get": { + "operationId": "DeviceTemplates_List", + "summary": "Get the list of device templates in an application", + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/DeviceTemplateCollection" + } + } + } + } + }, + "/deviceTemplates/{device_template_id}": { + "get": { + "operationId": "DeviceTemplates_Get", + "summary": "Get a device template by ID", + "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.", + "responses": { + "204": { + "description": "Success" + } + } + }, + "put": { + "operationId": "DeviceTemplates_Set", + "summary": "Create or update a device template by ID", + "parameters": [{ + "name": "body", + "in": "body", + "description": "Device template body.", + "required": true, + "schema": { + "$ref": "#/definitions/DeviceTemplate" + } + }], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/DeviceTemplate" + } + } + } + }, + "parameters": [{ + "$ref": "#/parameters/DeviceTemplateId" + }] + }, + "/deviceTemplates/{device_template_id}/merged": { + "get": { + "operationId": "DeviceTemplates_GetMerged", + "summary": "Get a merged device template by ID", + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/DeviceTemplate" + } + } + } + }, + "parameters": [{ + "$ref": "#/parameters/DeviceTemplateId" + }] + }, + "/deviceTemplates/{device_template_id}/devices": { + "get": { + "operationId": "DeviceTemplates_ListDevices", + "summary": "Get devices for a template", + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/DeviceCollection" + } + } + } + }, + "parameters": [{ + "$ref": "#/parameters/DeviceTemplateId" + }] + }, + "/devices": { + "get": { + "operationId": "Devices_List", + "summary": "Get the list of devices in an application", + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/DeviceCollection" + } + } + } + } + }, + "/devices/{device_id}": { + "get": { + "operationId": "Devices_Get", + "summary": "Get a device by ID", + "description": "Get details about an existing device by device ID.", + "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 device by device ID.", + "parameters": [{ + "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.", + "responses": { + "204": { + "description": "Success" + } + } + }, + "parameters": [{ + "$ref": "#/parameters/DeviceId" + }] + }, + "/roles": { + "get": { + "operationId": "Roles_List", + "summary": "Get the list of roles in an application.", + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/RoleCollection" + } + } + } + } + }, + "/roles/{role_id}": { + "get": { + "operationId": "Roles_Get", + "summary": "Get a role by ID.", + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/Role" + } + } + } + }, + "parameters": [{ + "in": "path", + "name": "role_id", + "description": "Unique ID for the role.", + "type": "string", + "required": true + }] + }, + "/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.", + "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.", + "parameters": [{ + "name": "body", + "in": "body", + "description": "Device properties.", + "required": true, + "schema": { + "$ref": "#/definitions/DeviceCloudProperties" + } + }], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/DeviceCloudProperties" + } + } + } + }, + "parameters": [{ + "$ref": "#/parameters/DeviceId" + }] + }, + "/devices/{device_id}/credentials": { + "get": { + "operationId": "Devices_GetCredentials", + "summary": "Get device credentials", + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/DeviceCredentials" + } + } + } + }, + "parameters": [{ + "$ref": "#/parameters/DeviceId" + }] + }, + "/devices/{device_id}/components/{component_name}/commands/{command_name}": { + "get": { + "operationId": "Devices_GetCommandHistory", + "summary": "Get device command history", + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/DeviceCommandCollection" + } + } + } + }, + "post": { + "operationId": "Devices_ExecuteCommand", + "summary": "Execute a device command", + "description": "Execute a command on a device.", + "parameters": [{ + "name": "body", + "in": "body", + "description": "Device command body.", + "required": true, + "schema": { + "$ref": "#/definitions/DeviceCommand" + } + }], + "responses": { + "201": { + "description": "Success", + "schema": { + "$ref": "#/definitions/DeviceCommand" + } + } + } + }, + "parameters": [{ + "$ref": "#/parameters/DeviceId" + }, { + "$ref": "#/parameters/ComponentName" + }, { + "in": "path", + "name": "command_name", + "description": "Name of this device command.", + "type": "string", + "required": true + }] + }, + "/devices/{device_id}/properties": { + "get": { + "operationId": "Devices_GetProperties", + "summary": "Get device properties", + "description": "Get all property values of a device by device ID.", + "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.", + "parameters": [{ + "name": "body", + "in": "body", + "description": "Device properties.", + "required": true, + "schema": { + "$ref": "#/definitions/DeviceProperties" + } + }], + "responses": { + "202": { + "description": "Success", + "schema": { + "$ref": "#/definitions/DeviceProperties" + } + } + } + }, + "parameters": [{ + "$ref": "#/parameters/DeviceId" + }] + }, + "/devices/{device_id}/components/{component_name}/properties": { + "get": { + "operationId": "Devices_GetComponentProperties", + "summary": "Get device properties for a specific component", + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/DeviceProperties" + } + } + } + }, + "put": { + "operationId": "Devices_UpdateComponentProperties", + "summary": "Update device properties for a specific component", + "parameters": [{ + "name": "body", + "in": "body", + "description": "Device properties.", + "required": true, + "schema": { + "$ref": "#/definitions/DeviceProperties" + } + }], + "responses": { + "202": { + "description": "Success", + "schema": { + "$ref": "#/definitions/DeviceProperties" + } + } + } + }, + "parameters": [{ + "$ref": "#/parameters/DeviceId" + }, { + "$ref": "#/parameters/ComponentName" + }] + }, + "/devices/{device_id}/components/{component_name}/telemetry/{telemetry_name}": { + "get": { + "operationId": "Devices_GetTelemetryValue", + "summary": "Get device telemetry value", + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/Value" + } + } + } + }, + "parameters": [{ + "$ref": "#/parameters/DeviceId" + }, { + "$ref": "#/parameters/ComponentName" + }, { + "in": "path", + "name": "telemetry_name", + "description": "Name of this device telemetry.", + "type": "string", + "required": true + }] + } + }, + "parameters": { + "DeviceTemplateId": { + "in": "path", + "name": "device_template_id", + "description": "Unique ID of the device template.", + "type": "string", + "required": true + }, + "DeviceId": { + "in": "path", + "name": "device_id", + "description": "Unique ID of the device.", + "type": "string", + "required": true + }, + "ComponentName": { + "in": "path", + "name": "component_name", + "description": "Name of the device component.", + "type": "string", + "required": true + } + } +} \ No newline at end of file diff --git a/specification/iotcentral/data-plane/readme.md b/specification/iotcentral/data-plane/readme.md new file mode 100644 index 000000000000..e5565741104d --- /dev/null +++ b/specification/iotcentral/data-plane/readme.md @@ -0,0 +1,43 @@ +# 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 +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 +``` From 5620b1eb572364fbf02ddde3cd0e231df3fd75cb Mon Sep 17 00:00:00 2001 From: Vivian Liu Date: Mon, 21 Oct 2019 20:20:20 -0700 Subject: [PATCH 02/22] With examples --- .../{iotcentral.json => app.json} | 1033 +++++++++-------- .../examples/apitoken_create.json | 19 + .../examples/apitoken_delete.json | 11 + .../examples/apitoken_get.json | 19 + .../examples/apitoken_list.json | 22 + .../examples/application_get.json | 22 + .../examples/application_list.json | 26 + .../examples/devicecredentials_get.json | 17 + .../examples/devices_cloudproperties_get.json | 15 + .../devices_cloudproperties_update.json | 16 + .../examples/devices_commands_send.json | 14 + .../examples/devices_commandshistory_get.json | 24 + .../examples/devices_create.json | 25 + .../examples/devices_delete.json | 11 + .../examples/devices_get.json | 21 + .../examples/devices_list.json | 50 + .../examples/devices_list_by_template.json | 43 + .../devices_properties_components_get.json | 53 + .../devices_properties_components_set.json | 33 + .../examples/devices_properties_get.json | 24 + .../examples/devices_properties_update.json | 34 + .../examples/devices_telemetry_get.json | 17 + .../examples/devicetemplates_create.json | 247 ++++ .../examples/devicetemplates_delete.json | 11 + .../examples/devicetemplates_get.json | 176 +++ .../examples/devicetemplates_get_merged.json | 170 +++ .../examples/devicetemplates_list.json | 179 +++ .../examples/roles_get.json | 12 + .../examples/roles_list.json | 26 + 29 files changed, 1857 insertions(+), 513 deletions(-) rename specification/iotcentral/data-plane/preview/2019-10-28-preview/{iotcentral.json => app.json} (60%) create mode 100644 specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/apitoken_create.json create mode 100644 specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/apitoken_delete.json create mode 100644 specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/apitoken_get.json create mode 100644 specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/apitoken_list.json create mode 100644 specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/application_get.json create mode 100644 specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/application_list.json create mode 100644 specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devicecredentials_get.json create mode 100644 specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_cloudproperties_get.json create mode 100644 specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_cloudproperties_update.json create mode 100644 specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_commands_send.json create mode 100644 specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_commandshistory_get.json create mode 100644 specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_create.json create mode 100644 specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_delete.json create mode 100644 specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_get.json create mode 100644 specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_list.json create mode 100644 specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_list_by_template.json create mode 100644 specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_properties_components_get.json create mode 100644 specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_properties_components_set.json create mode 100644 specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_properties_get.json create mode 100644 specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_properties_update.json create mode 100644 specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_telemetry_get.json create mode 100644 specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devicetemplates_create.json create mode 100644 specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devicetemplates_delete.json create mode 100644 specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devicetemplates_get.json create mode 100644 specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devicetemplates_get_merged.json create mode 100644 specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devicetemplates_list.json create mode 100644 specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/roles_get.json create mode 100644 specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/roles_list.json diff --git a/specification/iotcentral/data-plane/preview/2019-10-28-preview/iotcentral.json b/specification/iotcentral/data-plane/preview/2019-10-28-preview/app.json similarity index 60% rename from specification/iotcentral/data-plane/preview/2019-10-28-preview/iotcentral.json rename to specification/iotcentral/data-plane/preview/2019-10-28-preview/app.json index 55e0c117d008..4f87401b57a4 100644 --- a/specification/iotcentral/data-plane/preview/2019-10-28-preview/iotcentral.json +++ b/specification/iotcentral/data-plane/preview/2019-10-28-preview/app.json @@ -5,35 +5,44 @@ "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", + "host": "azureiotcentral.com", "basePath": "/api/preview", - "schemes": ["https"], - "consumes": ["application/json"], - "produces": ["application/json"], + "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" + "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" + } } } - }] + ] }, "ApiTokenCollection": { "type": "object", @@ -46,183 +55,70 @@ } } }, - "required": ["value"] - }, - "Application": { - "type": "object", - "properties": { - "id": { - "description": "Unique ID of the application.", - "type": "string", - "readOnly": true - }, - "displayName": { - "description": "Display name of the application.", - "type": "string" - }, - "subdomain": { - "description": "The URL subdomain of the application.", - "type": "string" - }, - "host": { - "description": "The URL host of the application.", - "type": "string" - } - }, - "required": ["subdomain", "host"] - }, - "ApplicationCollection": { - "type": "object", - "properties": { - "value": { - "description": "The collection of applications.", - "type": "array", - "items": { - "$ref": "#/definitions/Application" - } - } - }, - "required": ["value"] + "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" + "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" + "allOf": [ + { + "$ref": "#/definitions/NamedEntity" + }, + { + "properties": { + "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" - }] - }, - "ContinuousDataExport": { + "CapabilityModel": { "type": "object", - "properties": { - "id": { - "description": "Unique ID of the continuous data export.", - "type": "string", - "readOnly": true + "allOf": [ + { + "$ref": "#/definitions/Entity" }, - "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"] - } - } - }, - "required": ["endpoint", "enabled", "sources"] - }, - "ContinuousDataExportCollection": { - "type": "object", - "properties": { - "value": { - "description": "The collection of continuous data exports.", - "type": "array", - "items": { - "$ref": "#/definitions/ContinuousDataExport" + { + "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" + } + } } } - }, - "required": ["value"] + ] }, "Device": { "type": "object", @@ -262,7 +158,10 @@ "readOnly": true } }, - "required": ["instanceOf", "simulated"] + "required": [ + "instanceOf", + "simulated" + ] }, "DeviceCollection": { "type": "object", @@ -279,12 +178,9 @@ "type": "string" } }, - "required": ["value"] - }, - "DeviceCloudProperties": { - "description": "Cloud property values associated with the device.", - "type": "object", - "additionalProperties": true + "required": [ + "value" + ] }, "DeviceCommand": { "type": "object", @@ -319,7 +215,14 @@ } } }, - "required": ["value"] + "required": [ + "value" + ] + }, + "DeviceCloudProperties": { + "description": "Cloud property values associated with the device.", + "type": "object", + "additionalProperties": true }, "SymmetricKey": { "type": "object", @@ -333,7 +236,10 @@ "type": "string" } }, - "required": ["primaryKey", "secondaryKey"] + "required": [ + "primaryKey", + "secondaryKey" + ] }, "DeviceCredentials": { "type": "object", @@ -347,7 +253,10 @@ "$ref": "#/definitions/SymmetricKey" } }, - "required": ["scopeId", "symmetricKey"] + "required": [ + "scopeId", + "symmetricKey" + ] }, "DeviceProperties": { "description": "Property values associated with the device.", @@ -388,7 +297,10 @@ "$ref": "#/definitions/SolutionModel" } }, - "required": ["types"] + "required": [ + "types", + "capabilityModel" + ] }, "DeviceTemplateCollection": { "type": "object", @@ -405,7 +317,9 @@ "type": "string" } }, - "required": ["value"] + "required": [ + "value" + ] }, "Entity": { "type": "object", @@ -434,21 +348,28 @@ "type": "string" } }, - "required": ["@type"] + "required": [ + "@type" + ] }, "NamedEntity": { "type": "object", - "allOf": [{ - "$ref": "#/definitions/Entity" - }, { - "properties": { - "name": { - "description": "The programmatic name of the named entity.", - "type": "string" - } + "allOf": [ + { + "$ref": "#/definitions/Entity" }, - "required": ["name"] - }] + { + "properties": { + "name": { + "description": "The programmatic name of the named entity.", + "type": "string" + } + }, + "required": [ + "name" + ] + } + ] }, "Permission": { "type": "object", @@ -463,7 +384,9 @@ "maxItems": 1 } }, - "required": ["roles"] + "required": [ + "roles" + ] }, "Value": { "type": "object", @@ -472,7 +395,9 @@ "description": "The value of this API response." } }, - "required": ["value"] + "required": [ + "value" + ] }, "Role": { "type": "object", @@ -499,76 +424,87 @@ } } }, - "required": ["value"] + "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" + "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." + "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" + "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" + } } } - }] + ] }, "CapabilityReference": { "type": "object", @@ -589,6 +525,9 @@ "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", @@ -596,6 +535,9 @@ "$ref": "#/definitions/ApiTokenCollection" } } + }, + "x-ms-pageable": { + "nextLinkName": null } } }, @@ -603,6 +545,9 @@ "get": { "operationId": "ApiTokens_Get", "summary": "Get an API token by ID.", + "x-ms-examples": { + "Get API token by ID": { "$ref": "examples/apitoken_get.json" } + }, "responses": { "200": { "description": "Success", @@ -615,15 +560,20 @@ "put": { "operationId": "ApiTokens_Set", "summary": "Create a new API token in the application.", - "parameters": [{ - "name": "body", - "in": "body", - "description": "API token body.", - "required": true, - "schema": { - "$ref": "#/definitions/ApiToken" + "x-ms-examples": { + "Create API token": { "$ref": "examples/apitoken_create.json" } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "description": "API token body.", + "required": true, + "schema": { + "$ref": "#/definitions/ApiToken" + } } - }], + ], "responses": { "200": { "description": "Success", @@ -636,124 +586,115 @@ "delete": { "operationId": "ApiTokens_Remove", "summary": "Delete an API token.", + "x-ms-examples": { + "Delete API token": { "$ref": "examples/apitoken_delete.json" } + }, "responses": { "204": { "description": "Success" } } }, - "parameters": [{ - "in": "path", - "name": "token_id", - "description": "Unique ID for the API token.", - "type": "string", - "required": true - }] + "parameters": [ + { + "in": "path", + "name": "token_id", + "description": "Unique ID for the API token.", + "type": "string", + "required": true + } + ] }, - "/applications": { + "/devices": { "get": { - "operationId": "Applications_List", - "summary": "Get the list of applications accessible to the signed-in user", + "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/ApplicationCollection" + "$ref": "#/definitions/DeviceCollection" } } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" } } }, - "/applications/{application_id}": { + "/devices/{device_id}": { "get": { - "operationId": "Applications_Get", - "summary": "Get an application by ID", + "operationId": "Devices_Get", + "summary": "Get a device by ID", + "description": "Get details about an existing device by device ID.", + "x-ms-examples": { + "Get device by Id": { "$ref": "examples/devices_get.json" } + }, "responses": { "200": { "description": "Success", "schema": { - "$ref": "#/definitions/Application" + "$ref": "#/definitions/Device" } } } }, - "parameters": [{ - "in": "path", - "name": "application_id", - "description": "Unique ID of the application.", - "type": "string", - "required": true - }] - }, - "/continuousDataExports": { - "get": { - "operationId": "ContinuousDataExports_List", - "summary": "Get the list of continuous data exports in an application.", - "responses": { - "200": { - "description": "Success", + "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": [ + { + "name": "body", + "in": "body", + "description": "Device body.", + "required": true, "schema": { - "$ref": "#/definitions/ContinuousDataExportCollection" + "$ref": "#/definitions/Device" } } - } - }, - "post": { - "operationId": "ContinuousDataExports_Create", - "summary": "Create a new continuous data export in the application.", - "parameters": [{ - "name": "body", - "in": "body", - "description": "Data export body.", - "required": true, - "schema": { - "$ref": "#/definitions/ContinuousDataExport" - } - }], - "responses": { - "201": { - "description": "Success", - "schema": { - "$ref": "#/definitions/ContinuousDataExport" - } - } - } - } - }, - "/continuousDataExports/{export_id}": { - "get": { - "operationId": "ContinuousDataExports_Get", - "summary": "Get a continuous data export by ID.", + ], "responses": { "200": { "description": "Success", "schema": { - "$ref": "#/definitions/ContinuousDataExport" + "$ref": "#/definitions/Device" } } } }, "delete": { - "operationId": "ContinuousDataExports_Remove", - "summary": "Delete a continuous data export.", + "operationId": "Devices_Remove", + "summary": "Delete a device", + "description": "Delete an existing device by device ID.", + "x-ms-examples": { + "Delete device": { "$ref": "examples/devices_delete.json" } + }, "responses": { "204": { "description": "Success" } } }, - "parameters": [{ - "in": "path", - "name": "export_id", - "description": "Unique ID for the continuous data export.", - "type": "string", - "required": true - }] + "parameters": [ + { + "$ref": "#/parameters/DeviceId" + } + ] }, "/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", @@ -761,6 +702,9 @@ "$ref": "#/definitions/DeviceTemplateCollection" } } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" } } }, @@ -768,6 +712,9 @@ "get": { "operationId": "DeviceTemplates_Get", "summary": "Get a device template by ID", + "x-ms-examples": { + "Get a device template by Id": { "$ref": "examples/devicetemplates_get.json" } + }, "responses": { "200": { "description": "Success", @@ -781,6 +728,9 @@ "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" } + }, "responses": { "204": { "description": "Success" @@ -790,15 +740,20 @@ "put": { "operationId": "DeviceTemplates_Set", "summary": "Create or update a device template by ID", - "parameters": [{ - "name": "body", - "in": "body", - "description": "Device template body.", - "required": true, - "schema": { - "$ref": "#/definitions/DeviceTemplate" + "x-ms-examples": { + "Create a device template": { "$ref": "examples/devicetemplates_create.json" } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "description": "Device template body.", + "required": true, + "schema": { + "$ref": "#/definitions/DeviceTemplate" + } } - }], + ], "responses": { "200": { "description": "Success", @@ -808,14 +763,19 @@ } } }, - "parameters": [{ - "$ref": "#/parameters/DeviceTemplateId" - }] + "parameters": [ + { + "$ref": "#/parameters/DeviceTemplateId" + } + ] }, "/deviceTemplates/{device_template_id}/merged": { "get": { "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" } + }, "responses": { "200": { "description": "Success", @@ -825,14 +785,19 @@ } } }, - "parameters": [{ - "$ref": "#/parameters/DeviceTemplateId" - }] + "parameters": [ + { + "$ref": "#/parameters/DeviceTemplateId" + } + ] }, "/deviceTemplates/{device_template_id}/devices": { "get": { "operationId": "DeviceTemplates_ListDevices", "summary": "Get devices for a template", + "x-ms-examples": { + "List devices assocated to a device template": { "$ref": "examples/devices_list_by_template.json" } + }, "responses": { "200": { "description": "Success", @@ -840,80 +805,24 @@ "$ref": "#/definitions/DeviceCollection" } } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" } }, - "parameters": [{ - "$ref": "#/parameters/DeviceTemplateId" - }] - }, - "/devices": { - "get": { - "operationId": "Devices_List", - "summary": "Get the list of devices in an application", - "responses": { - "200": { - "description": "Success", - "schema": { - "$ref": "#/definitions/DeviceCollection" - } - } - } - } - }, - "/devices/{device_id}": { - "get": { - "operationId": "Devices_Get", - "summary": "Get a device by ID", - "description": "Get details about an existing device by device ID.", - "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 device by device ID.", - "parameters": [{ - "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.", - "responses": { - "204": { - "description": "Success" - } + "parameters": [ + { + "$ref": "#/parameters/DeviceTemplateId" } - }, - "parameters": [{ - "$ref": "#/parameters/DeviceId" - }] + ] }, "/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", @@ -921,6 +830,9 @@ "$ref": "#/definitions/RoleCollection" } } + }, + "x-ms-pageable": { + "nextLinkName": null } } }, @@ -928,6 +840,9 @@ "get": { "operationId": "Roles_Get", "summary": "Get a role by ID.", + "x-ms-examples": { + "Get role by Id": { "$ref": "examples/roles_get.json" } + }, "responses": { "200": { "description": "Success", @@ -937,19 +852,24 @@ } } }, - "parameters": [{ - "in": "path", - "name": "role_id", - "description": "Unique ID for the role.", - "type": "string", - "required": true - }] + "parameters": [ + { + "in": "path", + "name": "role_id", + "description": "Unique ID for the role.", + "type": "string", + "required": true + } + ] }, "/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.", + "x-ms-examples": { + "Get cloud properties": { "$ref": "examples/devices_cloudproperties_get.json" } + }, "responses": { "200": { "description": "Success", @@ -963,49 +883,42 @@ "operationId": "Devices_UpdateCloudProperties", "summary": "Update device cloud properties", "description": "Update all cloud property values of a device by device ID.", - "parameters": [{ - "name": "body", - "in": "body", - "description": "Device properties.", - "required": true, - "schema": { - "$ref": "#/definitions/DeviceCloudProperties" - } - }], - "responses": { - "200": { - "description": "Success", + "x-ms-examples": { + "Update cloud properties": { "$ref": "examples/devices_cloudproperties_update.json" } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "description": "Device properties.", + "required": true, "schema": { "$ref": "#/definitions/DeviceCloudProperties" } } - } - }, - "parameters": [{ - "$ref": "#/parameters/DeviceId" - }] - }, - "/devices/{device_id}/credentials": { - "get": { - "operationId": "Devices_GetCredentials", - "summary": "Get device credentials", + ], "responses": { "200": { "description": "Success", "schema": { - "$ref": "#/definitions/DeviceCredentials" + "$ref": "#/definitions/DeviceCloudProperties" } } } }, - "parameters": [{ - "$ref": "#/parameters/DeviceId" - }] + "parameters": [ + { + "$ref": "#/parameters/DeviceId" + } + ] }, "/devices/{device_id}/components/{component_name}/commands/{command_name}": { "get": { "operationId": "Devices_GetCommandHistory", "summary": "Get device command history", + "x-ms-examples": { + "Get command history": { "$ref": "examples/devices_commandshistory_get.json" } + }, "responses": { "200": { "description": "Success", @@ -1013,21 +926,29 @@ "$ref": "#/definitions/DeviceCommandCollection" } } + }, + "x-ms-pageable": { + "nextLinkName": null } }, "post": { "operationId": "Devices_ExecuteCommand", "summary": "Execute a device command", "description": "Execute a command on a device.", - "parameters": [{ - "name": "body", - "in": "body", - "description": "Device command body.", - "required": true, - "schema": { - "$ref": "#/definitions/DeviceCommand" + "x-ms-examples": { + "Send command": { "$ref": "examples/devices_commands_send.json" } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "description": "Device command body.", + "required": true, + "schema": { + "$ref": "#/definitions/DeviceCommand" + } } - }], + ], "responses": { "201": { "description": "Success", @@ -1037,23 +958,31 @@ } } }, - "parameters": [{ - "$ref": "#/parameters/DeviceId" - }, { - "$ref": "#/parameters/ComponentName" - }, { - "in": "path", - "name": "command_name", - "description": "Name of this device command.", - "type": "string", - "required": true - }] + "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 + } + ] }, "/devices/{device_id}/properties": { "get": { "operationId": "Devices_GetProperties", "summary": "Get device properties", "description": "Get all property values of a device by device ID.", + "x-ms-examples": { + "Get properties": { "$ref": "examples/devices_properties_get.json" } + }, "responses": { "200": { "description": "Success", @@ -1067,15 +996,20 @@ "operationId": "Devices_UpdateProperties", "summary": "Update device properties", "description": "Update all property values of a device by device ID.", - "parameters": [{ - "name": "body", - "in": "body", - "description": "Device properties.", - "required": true, - "schema": { - "$ref": "#/definitions/DeviceProperties" + "x-ms-examples": { + "Update properties": { "$ref": "examples/devices_properties_update.json" } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "description": "Device properties.", + "required": true, + "schema": { + "$ref": "#/definitions/DeviceProperties" + } } - }], + ], "responses": { "202": { "description": "Success", @@ -1085,14 +1019,19 @@ } } }, - "parameters": [{ - "$ref": "#/parameters/DeviceId" - }] + "parameters": [ + { + "$ref": "#/parameters/DeviceId" + } + ] }, "/devices/{device_id}/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" } + }, "responses": { "200": { "description": "Success", @@ -1105,15 +1044,20 @@ "put": { "operationId": "Devices_UpdateComponentProperties", "summary": "Update device properties for a specific component", - "parameters": [{ - "name": "body", - "in": "body", - "description": "Device properties.", - "required": true, - "schema": { - "$ref": "#/definitions/DeviceProperties" + "x-ms-examples": { + "Update properties on components": { "$ref": "examples/devices_properties_components_set.json" } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "description": "Device properties.", + "required": true, + "schema": { + "$ref": "#/definitions/DeviceProperties" + } } - }], + ], "responses": { "202": { "description": "Success", @@ -1123,16 +1067,44 @@ } } }, - "parameters": [{ - "$ref": "#/parameters/DeviceId" - }, { - "$ref": "#/parameters/ComponentName" - }] + "parameters": [ + { + "$ref": "#/parameters/DeviceId" + }, + { + "$ref": "#/parameters/ComponentName" + } + ] + }, + "/devices/{device_id}/credentials": { + "get": { + "operationId": "Devices_GetCredentials", + "summary": "Get device credentials", + "x-ms-examples": { + "Get device credentials": { "$ref": "examples/devicecredentials_get.json" } + }, + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/DeviceCredentials" + } + } + } + }, + "parameters": [ + { + "$ref": "#/parameters/DeviceId" + } + ] }, "/devices/{device_id}/components/{component_name}/telemetry/{telemetry_name}": { "get": { "operationId": "Devices_GetTelemetryValue", "summary": "Get device telemetry value", + "x-ms-examples": { + "Get telemetry": { "$ref": "examples/devices_telemetry_get.json" } + }, "responses": { "200": { "description": "Success", @@ -1142,31 +1114,30 @@ } } }, - "parameters": [{ - "$ref": "#/parameters/DeviceId" - }, { - "$ref": "#/parameters/ComponentName" - }, { - "in": "path", - "name": "telemetry_name", - "description": "Name of this device telemetry.", - "type": "string", - "required": true - }] + "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 + } + ] } }, "parameters": { - "DeviceTemplateId": { - "in": "path", - "name": "device_template_id", - "description": "Unique ID of the device template.", - "type": "string", - "required": true - }, "DeviceId": { "in": "path", "name": "device_id", "description": "Unique ID of the device.", + "x-ms-parameter-location": "method", "type": "string", "required": true }, @@ -1174,8 +1145,44 @@ "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 } + }, + "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}.azureiotcentral.com", + "parameters": [ + { + "$ref": "#/parameters/Subdomain" + } + ] } } \ No newline at end of file diff --git a/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/apitoken_create.json b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/apitoken_create.json new file mode 100644 index 000000000000..6e0b0adf1e76 --- /dev/null +++ b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/apitoken_create.json @@ -0,0 +1,19 @@ +{ + "title": "Get API tokens in your application", + "description": "Get a list of API tokens in your application.", + "parameters": { + "token_id": "testtoken" + }, + "responses": { + "200": { + "body": { + "id": "testtoken", + "roles": [ + "ca310b8d-2f4a-44e0-a36e-957c202cd8d4" + ], + "expiry": "2020-10-18T18:30:40.227Z" + } + } + } + } + \ No newline at end of file diff --git a/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/apitoken_delete.json b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/apitoken_delete.json new file mode 100644 index 000000000000..191319b02b98 --- /dev/null +++ b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/apitoken_delete.json @@ -0,0 +1,11 @@ +{ + "title": "Delete API token", + "description": "Delete an API token using its name.", + "parameters": { + "token_id": "testtoken" + }, + "responses": { + "204": {} + } +} + \ No newline at end of file diff --git a/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/apitoken_get.json b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/apitoken_get.json new file mode 100644 index 000000000000..6e0b0adf1e76 --- /dev/null +++ b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/apitoken_get.json @@ -0,0 +1,19 @@ +{ + "title": "Get API tokens in your application", + "description": "Get a list of API tokens in your application.", + "parameters": { + "token_id": "testtoken" + }, + "responses": { + "200": { + "body": { + "id": "testtoken", + "roles": [ + "ca310b8d-2f4a-44e0-a36e-957c202cd8d4" + ], + "expiry": "2020-10-18T18:30:40.227Z" + } + } + } + } + \ No newline at end of file diff --git a/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/apitoken_list.json b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/apitoken_list.json new file mode 100644 index 000000000000..7ef0e230aab4 --- /dev/null +++ b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/apitoken_list.json @@ -0,0 +1,22 @@ +{ + "title": "List API tokens in your application", + "description": "Get a list of API tokens in your application.", + "parameters": { + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "testtoken", + "roles": [ + "ca310b8d-2f4a-44e0-a36e-957c202cd8d4" + ], + "expiry": "2020-10-18T18:30:40.227Z" + } + ] + } + } + } + } + \ No newline at end of file diff --git a/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/application_get.json b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/application_get.json new file mode 100644 index 000000000000..84d15795d86a --- /dev/null +++ b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/application_get.json @@ -0,0 +1,22 @@ +{ + "title": "Get an application by Id", + "description": "Get an application by Id.", + "parameters": { + "application_id":"194e282c-290a-4858-b68f-4274690697fc" + }, + "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" + } + ] + } + } + } + } + \ No newline at end of file diff --git a/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/application_list.json b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/application_list.json new file mode 100644 index 000000000000..47ce8714897c --- /dev/null +++ b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/application_list.json @@ -0,0 +1,26 @@ +{ + "title": "List applications", + "description": "List applications that are accessible to the signed-in user.", + "parameters": { + }, + "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/preview/2019-10-28-preview/examples/devicecredentials_get.json b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devicecredentials_get.json new file mode 100644 index 000000000000..86d6755f807c --- /dev/null +++ b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devicecredentials_get.json @@ -0,0 +1,17 @@ +{ + "title": "Get device credentials", + "description": "Get the device credentials of a created device. Returns the app's scope Id and device SAS key", + "parameters": { + "device_id": "Checkout4" + }, + "responses": { + "200": { + "scopeId": "0ne0005F266", + "symmetricKey": { + "primaryKey": "XaMfV3vryCQw963L2IALf1SdApQRzSIBQd13/fassqM=", + "secondaryKey": "s+4uT31TRZJcTSGxZUPZb1yznjTicu4jr9tXNrg+xIQ=" + } + } + } +} + \ No newline at end of file diff --git a/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_cloudproperties_get.json b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_cloudproperties_get.json new file mode 100644 index 000000000000..92407d438ac6 --- /dev/null +++ b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_cloudproperties_get.json @@ -0,0 +1,15 @@ +{ + "title": "Get cloud property values of a device", + "description": "Get the current values of all cloud properties of a device.", + "parameters": { + "device_id": "mx1" + }, + "responses": { + "200": { + "body": { + "AssetID": "123abc" + } + } + } +} + \ No newline at end of file diff --git a/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_cloudproperties_update.json b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_cloudproperties_update.json new file mode 100644 index 000000000000..b8529c7e6357 --- /dev/null +++ b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_cloudproperties_update.json @@ -0,0 +1,16 @@ +{ + "title": "Update cloud properties of a device", + "description": "Update cloud properties of a device.", + "parameters": { + "device_id": "mx1", + "AssetID": "123abc" + }, + "responses": { + "200": { + "body": { + "AssetID": "123abc" + } + } + } +} + \ No newline at end of file diff --git a/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_commands_send.json b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_commands_send.json new file mode 100644 index 000000000000..3a81565d2cb3 --- /dev/null +++ b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_commands_send.json @@ -0,0 +1,14 @@ +{ + "title": "Send command", + "description": "Send a command to a device.", + "parameters": { + "device_id": "mx1", + "component_name": "Thermostat_1o", + "command_name": "CoolDown", + "tempVal": 30 + }, + "responses": { + "201": {} + } +} + \ No newline at end of file diff --git a/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_commandshistory_get.json b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_commandshistory_get.json new file mode 100644 index 000000000000..e261f575fce2 --- /dev/null +++ b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_commandshistory_get.json @@ -0,0 +1,24 @@ +{ + "title": "Get command history", + "description": "Get the most recent invocation of a command of a device.", + "parameters": { + "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 + } + ] + } + } + } +} + \ No newline at end of file diff --git a/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_create.json b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_create.json new file mode 100644 index 000000000000..822075392c82 --- /dev/null +++ b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_create.json @@ -0,0 +1,25 @@ +{ + "title": "Create a device", + "description": "Create a device with an Id.", + "parameters": { + "device_id": "ccc", + "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 + } + } + } +} + \ No newline at end of file diff --git a/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_delete.json b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_delete.json new file mode 100644 index 000000000000..eeb97862cf80 --- /dev/null +++ b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_delete.json @@ -0,0 +1,11 @@ +{ + "title": "Delete device", + "description": "Delete a device by Id.", + "parameters": { + "device_id": "ccc" + }, + "responses": { + "204": {} + } +} + \ No newline at end of file diff --git a/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_get.json b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_get.json new file mode 100644 index 000000000000..55e84af658bd --- /dev/null +++ b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_get.json @@ -0,0 +1,21 @@ +{ + "title": "Get a device by Id", + "description": "Get a device by Id", + "parameters": { + "device_id": "CheckoutThermostat" + }, + "responses": { + "200": { + "body": { + "id": "CheckoutThermostat", + "etag": "eyJoZWFkZXIiOiJcIjAyMDA4YzMyLTAwMDAtMGQwMC0wMDAwLTVkOTY4YjdhMDAwMFwiIn0", + "displayName": "CheckoutThermostat", + "instanceOf": "urn:kmwga2re7:modelDefinition:t_cj5wspyv", + "simulated": true, + "provisioned": true, + "approved": true + } + } + } +} + \ No newline at end of file diff --git a/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_list.json b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_list.json new file mode 100644 index 000000000000..94e2b7b3c231 --- /dev/null +++ b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_list.json @@ -0,0 +1,50 @@ +{ + "title": "List devices", + "description": "List all devices in your application.", + "parameters": {}, + "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 + } + ] + } + } + } +} + \ No newline at end of file diff --git a/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_list_by_template.json b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_list_by_template.json new file mode 100644 index 000000000000..8489b4bc7f3a --- /dev/null +++ b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_list_by_template.json @@ -0,0 +1,43 @@ +{ + "title": "List devices associated to a device template.", + "description": "List all devices associated to a device template.", + "parameters": { + "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 + } + ] + } + } + } +} + \ No newline at end of file diff --git a/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_properties_components_get.json b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_properties_components_get.json new file mode 100644 index 000000000000..dca9249c3f84 --- /dev/null +++ b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_properties_components_get.json @@ -0,0 +1,53 @@ +{ + "title": "Get device properties in component", + "description": "Get the read-write property values within a component of a device.", + "parameters": { + "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" + } + } + } + } + } + } +} + \ No newline at end of file diff --git a/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_properties_components_set.json b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_properties_components_set.json new file mode 100644 index 000000000000..a14c3521e73c --- /dev/null +++ b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_properties_components_set.json @@ -0,0 +1,33 @@ +{ + "title": "Set device properties in component", + "description": "Set the read-write property values within a component of a device.", + "parameters": { + "device_id": "mx1", + "component_name": "settings", + "fanSpeed": 35, + "voltage": 5, + "current": 2, + "irSwitch": true + }, + "responses": { + "202": { + "body": { + "$metadata": { + "fanSpeed": { + "desiredValue": 35 + }, + "voltage": { + "desiredValue": 5 + }, + "current": { + "desiredValue": 2 + }, + "irSwitch": { + "desiredValue": true + } + } + } + } + } +} + \ No newline at end of file diff --git a/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_properties_get.json b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_properties_get.json new file mode 100644 index 000000000000..fecaae3fa702 --- /dev/null +++ b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_properties_get.json @@ -0,0 +1,24 @@ +{ + "title": "Get device properties", + "description": "Get the current values of all device properties.", + "parameters": { + "device_id": "mx1" + }, + "responses": { + "200": { + "body": { + "deviceinfo": { + "manufacturer": "manufacturer", + "model": "model", + "swVersion": "swVersion", + "osName": "osName", + "processorArchitecture": "processorArchitecture", + "processorManufacturer": "processorManufacturer", + "totalStorage": 41, + "totalMemory": 49 + } + } + } + } +} + \ No newline at end of file diff --git a/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_properties_update.json b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_properties_update.json new file mode 100644 index 000000000000..e44d95742f00 --- /dev/null +++ b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_properties_update.json @@ -0,0 +1,34 @@ +{ + "title": "Update device properties", + "description": "Update the values of read-write properties of a device", + "parameters": { + "device_id": "mx1", + "device_info": { + "manufacturer": "manufacturer", + "model": "model", + "swVersion": "swVersion", + "osName": "osName", + "processorArchitecture": "processorArchitecture", + "processorManufacturer": "processorManufacturer", + "totalStorage": 24, + "totalMemory": 18 + } + }, + "responses": { + "200": { + "body": { + "deviceinfo": { + "manufacturer": "TODO", + "model": "model", + "swVersion": "swVersion", + "osName": "osName", + "processorArchitecture": "processorArchitecture", + "processorManufacturer": "processorManufacturer", + "totalStorage": 41, + "totalMemory": 49 + } + } + } + } +} + \ No newline at end of file diff --git a/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_telemetry_get.json b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_telemetry_get.json new file mode 100644 index 000000000000..aae665fa7d05 --- /dev/null +++ b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_telemetry_get.json @@ -0,0 +1,17 @@ +{ + "title": "Get telemetry", + "description": "Get the last known value of a telemetry stream of a device.", + "parameters": { + "device_id": "mx1", + "component_name": "sensors", + "telemetry_name": "temperature" + }, + "responses": { + "200": { + "body": { + "value": 32 + } + } + } +} + \ No newline at end of file diff --git a/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devicetemplates_create.json b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devicetemplates_create.json new file mode 100644 index 000000000000..e7329ed8895e --- /dev/null +++ b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devicetemplates_create.json @@ -0,0 +1,247 @@ +{ + "title": "Create a device template", + "description": "Creates and publishes a device template. In the body, specify the full device template object.", + "parameters": { + "device_template_id": "environmentstemplateid", + "device_template_object": { + "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" + ], + "instance": "urn:storeAnalyticsCheckoutPnp:capabilityModel:fyy5xn_y:1", + "reference": "urn:storeAnalyticsCheckoutPnp:Interface:Occupancy:1" + }, + "valueDetail": { + "@type": [ + "ValueDetail/NumberValueDetail" + ], + "maxValue": { + "@value": "50" + }, + "minValue": { + "@value": "0" + } + } + } + ] + } + } + }, + "responses": { + "200": { + "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" + ], + "instance": "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" + } + } + } + ] + } + } + } +} + \ No newline at end of file diff --git a/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devicetemplates_delete.json b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devicetemplates_delete.json new file mode 100644 index 000000000000..cdddfbe0efa9 --- /dev/null +++ b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devicetemplates_delete.json @@ -0,0 +1,11 @@ +{ + "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": { + "device_template_id": "urn:sbk9sd6sl:modelDefinition:u3b_fwd7os" + }, + "responses": { + "204": {} + } +} + \ No newline at end of file diff --git a/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devicetemplates_get.json b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devicetemplates_get.json new file mode 100644 index 000000000000..90adee5860b7 --- /dev/null +++ b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devicetemplates_get.json @@ -0,0 +1,176 @@ +{ + "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": { + "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": [] + } + } + } + } + } + \ No newline at end of file diff --git a/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devicetemplates_get_merged.json b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devicetemplates_get_merged.json new file mode 100644 index 000000000000..125d61678079 --- /dev/null +++ b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devicetemplates_get_merged.json @@ -0,0 +1,170 @@ +{ + "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": { + "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" + ] + } + } + } + } + } + \ No newline at end of file diff --git a/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devicetemplates_list.json b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devicetemplates_list.json new file mode 100644 index 000000000000..4b1a1fae6a09 --- /dev/null +++ b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devicetemplates_list.json @@ -0,0 +1,179 @@ +{ + "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": { + }, + "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": [] + } + } + ] + } + } + } + } + \ No newline at end of file diff --git a/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/roles_get.json b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/roles_get.json new file mode 100644 index 000000000000..deed32ee9c15 --- /dev/null +++ b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/roles_get.json @@ -0,0 +1,12 @@ +{ + "title": "Get role by Id", + "description": "Get a role by Id.", + "parameters": {}, + "responses": { + "200": { + "id": "ca310b8d-2f4a-44e0-a36e-957c202cd8d4", + "displayName": "Administrator" + } + } +} + \ No newline at end of file diff --git a/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/roles_list.json b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/roles_list.json new file mode 100644 index 000000000000..2349fef6a128 --- /dev/null +++ b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/roles_list.json @@ -0,0 +1,26 @@ +{ + "title": "List roles", + "description": "List roles in your application.", + "parameters": {}, + "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" + } + ] + } + } + } +} + \ No newline at end of file From d446b3e10dd6a58459376576f9b42390a6a4246c Mon Sep 17 00:00:00 2001 From: Vivian Liu Date: Mon, 21 Oct 2019 20:34:54 -0700 Subject: [PATCH 03/22] addressing validation errors1 --- .../preview/2019-10-28-preview/examples/apitoken_create.json | 1 + .../preview/2019-10-28-preview/examples/apitoken_delete.json | 1 + .../preview/2019-10-28-preview/examples/apitoken_get.json | 1 + .../preview/2019-10-28-preview/examples/apitoken_list.json | 1 + .../preview/2019-10-28-preview/examples/application_get.json | 1 + .../preview/2019-10-28-preview/examples/application_list.json | 1 + .../2019-10-28-preview/examples/devicecredentials_get.json | 1 + .../examples/devices_cloudproperties_get.json | 1 + .../examples/devices_cloudproperties_update.json | 1 + .../2019-10-28-preview/examples/devices_commands_send.json | 1 + .../examples/devices_commandshistory_get.json | 1 + .../preview/2019-10-28-preview/examples/devices_create.json | 1 + .../preview/2019-10-28-preview/examples/devices_delete.json | 1 + .../preview/2019-10-28-preview/examples/devices_get.json | 1 + .../preview/2019-10-28-preview/examples/devices_list.json | 3 ++- .../2019-10-28-preview/examples/devices_list_by_template.json | 1 + .../examples/devices_properties_components_get.json | 1 + .../examples/devices_properties_components_set.json | 1 + .../2019-10-28-preview/examples/devices_properties_get.json | 1 + .../2019-10-28-preview/examples/devices_properties_update.json | 1 + .../2019-10-28-preview/examples/devices_telemetry_get.json | 1 + .../2019-10-28-preview/examples/devicetemplates_create.json | 1 + .../2019-10-28-preview/examples/devicetemplates_delete.json | 1 + .../2019-10-28-preview/examples/devicetemplates_get.json | 1 + .../examples/devicetemplates_get_merged.json | 1 + .../2019-10-28-preview/examples/devicetemplates_list.json | 1 + .../preview/2019-10-28-preview/examples/roles_get.json | 3 ++- .../preview/2019-10-28-preview/examples/roles_list.json | 3 ++- 28 files changed, 31 insertions(+), 3 deletions(-) diff --git a/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/apitoken_create.json b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/apitoken_create.json index 6e0b0adf1e76..740a1474fa33 100644 --- a/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/apitoken_create.json +++ b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/apitoken_create.json @@ -2,6 +2,7 @@ "title": "Get API tokens in your application", "description": "Get a list of API tokens in your application.", "parameters": { + "subdomain": "{app-subdomain}", "token_id": "testtoken" }, "responses": { diff --git a/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/apitoken_delete.json b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/apitoken_delete.json index 191319b02b98..4722a67e0b63 100644 --- a/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/apitoken_delete.json +++ b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/apitoken_delete.json @@ -2,6 +2,7 @@ "title": "Delete API token", "description": "Delete an API token using its name.", "parameters": { + "subdomain": "{app-subdomain}", "token_id": "testtoken" }, "responses": { diff --git a/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/apitoken_get.json b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/apitoken_get.json index 6e0b0adf1e76..740a1474fa33 100644 --- a/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/apitoken_get.json +++ b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/apitoken_get.json @@ -2,6 +2,7 @@ "title": "Get API tokens in your application", "description": "Get a list of API tokens in your application.", "parameters": { + "subdomain": "{app-subdomain}", "token_id": "testtoken" }, "responses": { diff --git a/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/apitoken_list.json b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/apitoken_list.json index 7ef0e230aab4..bd1cfb0f047a 100644 --- a/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/apitoken_list.json +++ b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/apitoken_list.json @@ -2,6 +2,7 @@ "title": "List API tokens in your application", "description": "Get a list of API tokens in your application.", "parameters": { + "subdomain": "{app-subdomain}" }, "responses": { "200": { diff --git a/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/application_get.json b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/application_get.json index 84d15795d86a..f2cd5334bd50 100644 --- a/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/application_get.json +++ b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/application_get.json @@ -2,6 +2,7 @@ "title": "Get an application by Id", "description": "Get an application by Id.", "parameters": { + "subdomain": "{app-subdomain}", "application_id":"194e282c-290a-4858-b68f-4274690697fc" }, "responses": { diff --git a/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/application_list.json b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/application_list.json index 47ce8714897c..580e0fb5bcdf 100644 --- a/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/application_list.json +++ b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/application_list.json @@ -2,6 +2,7 @@ "title": "List applications", "description": "List applications that are accessible to the signed-in user.", "parameters": { + "subdomain": "{app-subdomain}" }, "responses": { "200": { diff --git a/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devicecredentials_get.json b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devicecredentials_get.json index 86d6755f807c..c8a67c518a9a 100644 --- a/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devicecredentials_get.json +++ b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devicecredentials_get.json @@ -2,6 +2,7 @@ "title": "Get device credentials", "description": "Get the device credentials of a created device. Returns the app's scope Id and device SAS key", "parameters": { + "subdomain": "{app-subdomain}", "device_id": "Checkout4" }, "responses": { diff --git a/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_cloudproperties_get.json b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_cloudproperties_get.json index 92407d438ac6..917ac7cd9b3f 100644 --- a/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_cloudproperties_get.json +++ b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_cloudproperties_get.json @@ -2,6 +2,7 @@ "title": "Get cloud property values of a device", "description": "Get the current values of all cloud properties of a device.", "parameters": { + "subdomain": "{app-subdomain}", "device_id": "mx1" }, "responses": { diff --git a/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_cloudproperties_update.json b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_cloudproperties_update.json index b8529c7e6357..c73dbadc7052 100644 --- a/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_cloudproperties_update.json +++ b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_cloudproperties_update.json @@ -2,6 +2,7 @@ "title": "Update cloud properties of a device", "description": "Update cloud properties of a device.", "parameters": { + "subdomain": "{app-subdomain}", "device_id": "mx1", "AssetID": "123abc" }, diff --git a/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_commands_send.json b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_commands_send.json index 3a81565d2cb3..241d672eb588 100644 --- a/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_commands_send.json +++ b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_commands_send.json @@ -2,6 +2,7 @@ "title": "Send command", "description": "Send a command to a device.", "parameters": { + "subdomain": "{app-subdomain}", "device_id": "mx1", "component_name": "Thermostat_1o", "command_name": "CoolDown", diff --git a/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_commandshistory_get.json b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_commandshistory_get.json index e261f575fce2..11dd8a53ba02 100644 --- a/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_commandshistory_get.json +++ b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_commandshistory_get.json @@ -2,6 +2,7 @@ "title": "Get command history", "description": "Get the most recent invocation of a command of a device.", "parameters": { + "subdomain": "{app-subdomain}", "device_id": "mx1", "component_name": "Thermostat_1o", "command_name": "CoolDown" diff --git a/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_create.json b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_create.json index 822075392c82..476a1c9f131f 100644 --- a/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_create.json +++ b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_create.json @@ -2,6 +2,7 @@ "title": "Create a device", "description": "Create a device with an Id.", "parameters": { + "subdomain": "{app-subdomain}", "device_id": "ccc", "displayName": "CheckoutThermostatccc", "instanceOf": "urn:kmwga2re7:modelDefinition:t_cj5wspyv", diff --git a/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_delete.json b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_delete.json index eeb97862cf80..d677bc75ed06 100644 --- a/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_delete.json +++ b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_delete.json @@ -2,6 +2,7 @@ "title": "Delete device", "description": "Delete a device by Id.", "parameters": { + "subdomain": "{app-subdomain}", "device_id": "ccc" }, "responses": { diff --git a/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_get.json b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_get.json index 55e84af658bd..67db9aef59da 100644 --- a/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_get.json +++ b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_get.json @@ -2,6 +2,7 @@ "title": "Get a device by Id", "description": "Get a device by Id", "parameters": { + "subdomain": "{app-subdomain}", "device_id": "CheckoutThermostat" }, "responses": { diff --git a/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_list.json b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_list.json index 94e2b7b3c231..5d163f8bd9a7 100644 --- a/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_list.json +++ b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_list.json @@ -1,7 +1,8 @@ { "title": "List devices", "description": "List all devices in your application.", - "parameters": {}, + "parameters": { + "subdomain": "{app-subdomain}"}, "responses": { "200": { "body": { diff --git a/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_list_by_template.json b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_list_by_template.json index 8489b4bc7f3a..6e91ecfed278 100644 --- a/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_list_by_template.json +++ b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_list_by_template.json @@ -2,6 +2,7 @@ "title": "List devices associated to a device template.", "description": "List all devices associated to a device template.", "parameters": { + "subdomain": "{app-subdomain}", "device_template_id": "urn:sbk9sd6sl:modelDefinition:u3b_fwd7os" }, "responses": { diff --git a/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_properties_components_get.json b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_properties_components_get.json index dca9249c3f84..6884c3208807 100644 --- a/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_properties_components_get.json +++ b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_properties_components_get.json @@ -2,6 +2,7 @@ "title": "Get device properties in component", "description": "Get the read-write property values within a component of a device.", "parameters": { + "subdomain": "{app-subdomain}", "device_id": "mx1", "component_name": "settings" }, diff --git a/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_properties_components_set.json b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_properties_components_set.json index a14c3521e73c..cc2fcf41ac0c 100644 --- a/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_properties_components_set.json +++ b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_properties_components_set.json @@ -2,6 +2,7 @@ "title": "Set device properties in component", "description": "Set the read-write property values within a component of a device.", "parameters": { + "subdomain": "{app-subdomain}", "device_id": "mx1", "component_name": "settings", "fanSpeed": 35, diff --git a/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_properties_get.json b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_properties_get.json index fecaae3fa702..81c5a9cf1bf9 100644 --- a/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_properties_get.json +++ b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_properties_get.json @@ -2,6 +2,7 @@ "title": "Get device properties", "description": "Get the current values of all device properties.", "parameters": { + "subdomain": "{app-subdomain}", "device_id": "mx1" }, "responses": { diff --git a/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_properties_update.json b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_properties_update.json index e44d95742f00..6b34cb297339 100644 --- a/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_properties_update.json +++ b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_properties_update.json @@ -2,6 +2,7 @@ "title": "Update device properties", "description": "Update the values of read-write properties of a device", "parameters": { + "subdomain": "{app-subdomain}", "device_id": "mx1", "device_info": { "manufacturer": "manufacturer", diff --git a/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_telemetry_get.json b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_telemetry_get.json index aae665fa7d05..c5f93951b6c4 100644 --- a/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_telemetry_get.json +++ b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_telemetry_get.json @@ -2,6 +2,7 @@ "title": "Get telemetry", "description": "Get the last known value of a telemetry stream of a device.", "parameters": { + "subdomain": "{app-subdomain}", "device_id": "mx1", "component_name": "sensors", "telemetry_name": "temperature" diff --git a/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devicetemplates_create.json b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devicetemplates_create.json index e7329ed8895e..a524c7aec40b 100644 --- a/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devicetemplates_create.json +++ b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devicetemplates_create.json @@ -2,6 +2,7 @@ "title": "Create a device template", "description": "Creates and publishes a device template. In the body, specify the full device template object.", "parameters": { + "subdomain": "{app-subdomain}", "device_template_id": "environmentstemplateid", "device_template_object": { "types": [ diff --git a/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devicetemplates_delete.json b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devicetemplates_delete.json index cdddfbe0efa9..e421f6b8dd95 100644 --- a/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devicetemplates_delete.json +++ b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devicetemplates_delete.json @@ -2,6 +2,7 @@ "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": { + "subdomain": "{app-subdomain}", "device_template_id": "urn:sbk9sd6sl:modelDefinition:u3b_fwd7os" }, "responses": { diff --git a/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devicetemplates_get.json b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devicetemplates_get.json index 90adee5860b7..aa12ece6da88 100644 --- a/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devicetemplates_get.json +++ b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devicetemplates_get.json @@ -2,6 +2,7 @@ "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": { + "subdomain": "{app-subdomain}", "device_template_id": "urn:sbk9sd6sl:modelDefinition:u3b_fwd7os" }, "responses": { diff --git a/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devicetemplates_get_merged.json b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devicetemplates_get_merged.json index 125d61678079..12db3a4612ac 100644 --- a/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devicetemplates_get_merged.json +++ b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devicetemplates_get_merged.json @@ -2,6 +2,7 @@ "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": { + "subdomain": "{app-subdomain}", "device_template_id": "urn:sbk9sd6sl:modelDefinition:u3b_fwd7os" }, "responses": { diff --git a/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devicetemplates_list.json b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devicetemplates_list.json index 4b1a1fae6a09..7c8066ec00bc 100644 --- a/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devicetemplates_list.json +++ b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devicetemplates_list.json @@ -2,6 +2,7 @@ "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": { + "subdomain": "{app-subdomain}" }, "responses": { "200": { diff --git a/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/roles_get.json b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/roles_get.json index deed32ee9c15..b00429dc6306 100644 --- a/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/roles_get.json +++ b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/roles_get.json @@ -1,7 +1,8 @@ { "title": "Get role by Id", "description": "Get a role by Id.", - "parameters": {}, + "parameters": { + "subdomain": "{app-subdomain}"}, "responses": { "200": { "id": "ca310b8d-2f4a-44e0-a36e-957c202cd8d4", diff --git a/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/roles_list.json b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/roles_list.json index 2349fef6a128..b9d3fb2bc34c 100644 --- a/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/roles_list.json +++ b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/roles_list.json @@ -1,7 +1,8 @@ { "title": "List roles", "description": "List roles in your application.", - "parameters": {}, + "parameters": { + "subdomain": "{app-subdomain}"}, "responses": { "200": { "body": { From 68ce5791119a1a707776af820b004092cd0770c5 Mon Sep 17 00:00:00 2001 From: Vivian Liu Date: Tue, 22 Oct 2019 10:20:34 -0700 Subject: [PATCH 04/22] Updated examples --- .../preview/2019-10-28-preview/app.json | 52 +++++++++---------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/specification/iotcentral/data-plane/preview/2019-10-28-preview/app.json b/specification/iotcentral/data-plane/preview/2019-10-28-preview/app.json index 4f87401b57a4..07759fc6da87 100644 --- a/specification/iotcentral/data-plane/preview/2019-10-28-preview/app.json +++ b/specification/iotcentral/data-plane/preview/2019-10-28-preview/app.json @@ -526,7 +526,7 @@ "operationId": "ApiTokens_List", "summary": "Get the list of API tokens in an application.", "x-ms-examples": { - "List API tokens" : { "$ref": "examples/apitoken_list.json" } + "List API tokens" : { "$ref": "./examples/apitoken_list.json" } }, "responses": { "200": { @@ -546,7 +546,7 @@ "operationId": "ApiTokens_Get", "summary": "Get an API token by ID.", "x-ms-examples": { - "Get API token by ID": { "$ref": "examples/apitoken_get.json" } + "Get API token by ID": { "$ref": "./examples/apitoken_get.json" } }, "responses": { "200": { @@ -561,7 +561,7 @@ "operationId": "ApiTokens_Set", "summary": "Create a new API token in the application.", "x-ms-examples": { - "Create API token": { "$ref": "examples/apitoken_create.json" } + "Create API token": { "$ref": "./examples/apitoken_create.json" } }, "parameters": [ { @@ -587,7 +587,7 @@ "operationId": "ApiTokens_Remove", "summary": "Delete an API token.", "x-ms-examples": { - "Delete API token": { "$ref": "examples/apitoken_delete.json" } + "Delete API token": { "$ref": "./examples/apitoken_delete.json" } }, "responses": { "204": { @@ -610,7 +610,7 @@ "operationId": "Devices_List", "summary": "Get the list of devices in an application", "x-ms-examples": { - "List devices": { "$ref": "examples/devices_list.json" } + "List devices": { "$ref": "./examples/devices_list.json" } }, "responses": { "200": { @@ -631,7 +631,7 @@ "summary": "Get a device by ID", "description": "Get details about an existing device by device ID.", "x-ms-examples": { - "Get device by Id": { "$ref": "examples/devices_get.json" } + "Get device by Id": { "$ref": "./examples/devices_get.json" } }, "responses": { "200": { @@ -647,7 +647,7 @@ "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" } + "Create device": { "$ref": "./examples/devices_create.json" } }, "parameters": [ { @@ -674,7 +674,7 @@ "summary": "Delete a device", "description": "Delete an existing device by device ID.", "x-ms-examples": { - "Delete device": { "$ref": "examples/devices_delete.json" } + "Delete device": { "$ref": "./examples/devices_delete.json" } }, "responses": { "204": { @@ -693,7 +693,7 @@ "operationId": "DeviceTemplates_List", "summary": "Get the list of device templates in an application", "x-ms-examples": { - "List device templates": { "$ref": "examples/devicetemplates_list.json" } + "List device templates": { "$ref": "./examples/devicetemplates_list.json" } }, "responses": { "200": { @@ -713,7 +713,7 @@ "operationId": "DeviceTemplates_Get", "summary": "Get a device template by ID", "x-ms-examples": { - "Get a device template by Id": { "$ref": "examples/devicetemplates_get.json" } + "Get a device template by Id": { "$ref": "./examples/devicetemplates_get.json" } }, "responses": { "200": { @@ -729,7 +729,7 @@ "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" } + "Delete a device template by Id": { "$ref": "./examples/devicetemplates_delete.json" } }, "responses": { "204": { @@ -741,7 +741,7 @@ "operationId": "DeviceTemplates_Set", "summary": "Create or update a device template by ID", "x-ms-examples": { - "Create a device template": { "$ref": "examples/devicetemplates_create.json" } + "Create a device template": { "$ref": "./examples/devicetemplates_create.json" } }, "parameters": [ { @@ -774,7 +774,7 @@ "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" } + "Get a merged device template by Id": { "$ref": "./examples/devicetemplates_get_merged.json" } }, "responses": { "200": { @@ -796,7 +796,7 @@ "operationId": "DeviceTemplates_ListDevices", "summary": "Get devices for a template", "x-ms-examples": { - "List devices assocated to a device template": { "$ref": "examples/devices_list_by_template.json" } + "List devices assocated to a device template": { "$ref": "./examples/devices_list_by_template.json" } }, "responses": { "200": { @@ -821,7 +821,7 @@ "operationId": "Roles_List", "summary": "Get the list of roles in an application.", "x-ms-examples": { - "List roles": { "$ref": "examples/roles_list.json" } + "List roles": { "$ref": "./examples/roles_list.json" } }, "responses": { "200": { @@ -841,7 +841,7 @@ "operationId": "Roles_Get", "summary": "Get a role by ID.", "x-ms-examples": { - "Get role by Id": { "$ref": "examples/roles_get.json" } + "Get role by Id": { "$ref": "./examples/roles_get.json" } }, "responses": { "200": { @@ -868,7 +868,7 @@ "summary": "Get device cloud properties", "description": "Get all cloud property values of a device by device ID.", "x-ms-examples": { - "Get cloud properties": { "$ref": "examples/devices_cloudproperties_get.json" } + "Get cloud properties": { "$ref": "./examples/devices_cloudproperties_get.json" } }, "responses": { "200": { @@ -884,7 +884,7 @@ "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": [ { @@ -917,7 +917,7 @@ "operationId": "Devices_GetCommandHistory", "summary": "Get device command history", "x-ms-examples": { - "Get command history": { "$ref": "examples/devices_commandshistory_get.json" } + "Get command history": { "$ref": "./examples/devices_commandshistory_get.json" } }, "responses": { "200": { @@ -936,7 +936,7 @@ "summary": "Execute a device command", "description": "Execute a command on a device.", "x-ms-examples": { - "Send command": { "$ref": "examples/devices_commands_send.json" } + "Send command": { "$ref": "./examples/devices_commands_send.json" } }, "parameters": [ { @@ -981,7 +981,7 @@ "summary": "Get device properties", "description": "Get all property values of a device by device ID.", "x-ms-examples": { - "Get properties": { "$ref": "examples/devices_properties_get.json" } + "Get properties": { "$ref": "./examples/devices_properties_get.json" } }, "responses": { "200": { @@ -997,7 +997,7 @@ "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" } + "Update properties": { "$ref": "./examples/devices_properties_update.json" } }, "parameters": [ { @@ -1030,7 +1030,7 @@ "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" } + "Get properties on components": { "$ref": "./examples/devices_properties_components_get.json" } }, "responses": { "200": { @@ -1045,7 +1045,7 @@ "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" } + "Update properties on components": { "$ref": "./examples/devices_properties_components_set.json" } }, "parameters": [ { @@ -1081,7 +1081,7 @@ "operationId": "Devices_GetCredentials", "summary": "Get device credentials", "x-ms-examples": { - "Get device credentials": { "$ref": "examples/devicecredentials_get.json" } + "Get device credentials": { "$ref": "./examples/devicecredentials_get.json" } }, "responses": { "200": { @@ -1103,7 +1103,7 @@ "operationId": "Devices_GetTelemetryValue", "summary": "Get device telemetry value", "x-ms-examples": { - "Get telemetry": { "$ref": "examples/devices_telemetry_get.json" } + "Get telemetry": { "$ref": "./examples/devices_telemetry_get.json" } }, "responses": { "200": { From dc20f9b3cbd7cc3fe86fff25611d981a9aca5173 Mon Sep 17 00:00:00 2001 From: rafarhat Date: Tue, 22 Oct 2019 17:14:33 -0700 Subject: [PATCH 05/22] Fixes to IoTCentral Swagger and Examples - Example Validation Passing --- .../preview/2019-10-28-preview/app.json | 1188 ---------------- .../examples/apitoken_create.json | 11 +- .../examples/apitoken_delete.json | 4 +- .../examples/apitoken_get.json | 4 +- .../examples/apitoken_list.json | 4 +- .../examples/application_get.json | 4 +- .../examples/application_list.json | 3 +- .../examples/devicecredentials_get.json | 6 +- .../examples/devices_cloudproperties_get.json | 4 +- .../devices_cloudproperties_update.json | 8 +- .../examples/devices_commands_send.json | 8 +- .../examples/devices_commandshistory_get.json | 4 +- .../examples/devices_create.json | 6 +- .../examples/devices_delete.json | 4 +- .../examples/devices_get.json | 4 +- .../examples/devices_list.json | 5 +- .../examples/devices_list_by_template.json | 4 +- .../devices_properties_components_get.json | 6 +- .../devices_properties_components_set.json | 6 +- .../examples/devices_properties_get.json | 4 +- .../examples/devices_properties_update.json | 9 +- .../examples/devices_telemetry_get.json | 6 +- .../examples/devicetemplates_create.json | 8 +- .../examples/devicetemplates_delete.json | 4 +- .../examples/devicetemplates_get.json | 4 +- .../examples/devicetemplates_get_merged.json | 4 +- .../examples/devicetemplates_list.json | 4 +- .../examples/roles_get.json | 8 +- .../examples/roles_list.json | 5 +- .../2019-10-28-preview/iotcentral.json | 1264 +++++++++++++++++ validation.json | Bin 0 -> 18094 bytes validationspec.json | Bin 0 -> 500 bytes 32 files changed, 1351 insertions(+), 1252 deletions(-) delete mode 100644 specification/iotcentral/data-plane/preview/2019-10-28-preview/app.json create mode 100644 specification/iotcentral/data-plane/preview/2019-10-28-preview/iotcentral.json create mode 100644 validation.json create mode 100644 validationspec.json diff --git a/specification/iotcentral/data-plane/preview/2019-10-28-preview/app.json b/specification/iotcentral/data-plane/preview/2019-10-28-preview/app.json deleted file mode 100644 index 07759fc6da87..000000000000 --- a/specification/iotcentral/data-plane/preview/2019-10-28-preview/app.json +++ /dev/null @@ -1,1188 +0,0 @@ -{ - "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": "azureiotcentral.com", - "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" - } - } - } - ] - }, - "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" - } - } - } - } - ] - }, - "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", - "simulated" - ] - }, - "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" - ] - } - ] - }, - "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." - } - }, - "required": [ - "value" - ] - }, - "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" - } - } - } - ] - }, - "CapabilityReference": { - "type": "object", - "properties": { - "instance": { - "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" } - }, - "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": [ - { - "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.", - "x-ms-examples": { - "Delete API token": { "$ref": "./examples/apitoken_delete.json" } - }, - "responses": { - "204": { - "description": "Success" - } - } - }, - "parameters": [ - { - "in": "path", - "name": "token_id", - "description": "Unique ID for the API token.", - "type": "string", - "required": true - } - ] - }, - "/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.", - "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": [ - { - "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.", - "x-ms-examples": { - "Delete device": { "$ref": "./examples/devices_delete.json" } - }, - "responses": { - "204": { - "description": "Success" - } - } - }, - "parameters": [ - { - "$ref": "#/parameters/DeviceId" - } - ] - }, - "/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", - "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.", - "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": [ - { - "name": "body", - "in": "body", - "description": "Device template body.", - "required": true, - "schema": { - "$ref": "#/definitions/DeviceTemplate" - } - } - ], - "responses": { - "200": { - "description": "Success", - "schema": { - "$ref": "#/definitions/DeviceTemplate" - } - } - } - }, - "parameters": [ - { - "$ref": "#/parameters/DeviceTemplateId" - } - ] - }, - "/deviceTemplates/{device_template_id}/merged": { - "get": { - "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" } - }, - "responses": { - "200": { - "description": "Success", - "schema": { - "$ref": "#/definitions/DeviceTemplate" - } - } - } - }, - "parameters": [ - { - "$ref": "#/parameters/DeviceTemplateId" - } - ] - }, - "/deviceTemplates/{device_template_id}/devices": { - "get": { - "operationId": "DeviceTemplates_ListDevices", - "summary": "Get devices for a template", - "x-ms-examples": { - "List devices assocated to a device template": { "$ref": "./examples/devices_list_by_template.json" } - }, - "responses": { - "200": { - "description": "Success", - "schema": { - "$ref": "#/definitions/DeviceCollection" - } - } - }, - "x-ms-pageable": { - "nextLinkName": "nextLink" - } - }, - "parameters": [ - { - "$ref": "#/parameters/DeviceTemplateId" - } - ] - }, - "/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.", - "x-ms-examples": { - "Get role by Id": { "$ref": "./examples/roles_get.json" } - }, - "responses": { - "200": { - "description": "Success", - "schema": { - "$ref": "#/definitions/Role" - } - } - } - }, - "parameters": [ - { - "in": "path", - "name": "role_id", - "description": "Unique ID for the role.", - "type": "string", - "required": true - } - ] - }, - "/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.", - "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": [ - { - "name": "body", - "in": "body", - "description": "Device properties.", - "required": true, - "schema": { - "$ref": "#/definitions/DeviceCloudProperties" - } - } - ], - "responses": { - "200": { - "description": "Success", - "schema": { - "$ref": "#/definitions/DeviceCloudProperties" - } - } - } - }, - "parameters": [ - { - "$ref": "#/parameters/DeviceId" - } - ] - }, - "/devices/{device_id}/components/{component_name}/commands/{command_name}": { - "get": { - "operationId": "Devices_GetCommandHistory", - "summary": "Get device command history", - "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": [ - { - "name": "body", - "in": "body", - "description": "Device command body.", - "required": true, - "schema": { - "$ref": "#/definitions/DeviceCommand" - } - } - ], - "responses": { - "201": { - "description": "Success", - "schema": { - "$ref": "#/definitions/DeviceCommand" - } - } - } - }, - "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 - } - ] - }, - "/devices/{device_id}/properties": { - "get": { - "operationId": "Devices_GetProperties", - "summary": "Get device properties", - "description": "Get all property values of a device by device ID.", - "x-ms-examples": { - "Get properties": { "$ref": "./examples/devices_properties_get.json" } - }, - "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": [ - { - "name": "body", - "in": "body", - "description": "Device properties.", - "required": true, - "schema": { - "$ref": "#/definitions/DeviceProperties" - } - } - ], - "responses": { - "202": { - "description": "Success", - "schema": { - "$ref": "#/definitions/DeviceProperties" - } - } - } - }, - "parameters": [ - { - "$ref": "#/parameters/DeviceId" - } - ] - }, - "/devices/{device_id}/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" } - }, - "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": [ - { - "name": "body", - "in": "body", - "description": "Device properties.", - "required": true, - "schema": { - "$ref": "#/definitions/DeviceProperties" - } - } - ], - "responses": { - "202": { - "description": "Success", - "schema": { - "$ref": "#/definitions/DeviceProperties" - } - } - } - }, - "parameters": [ - { - "$ref": "#/parameters/DeviceId" - }, - { - "$ref": "#/parameters/ComponentName" - } - ] - }, - "/devices/{device_id}/credentials": { - "get": { - "operationId": "Devices_GetCredentials", - "summary": "Get device credentials", - "x-ms-examples": { - "Get device credentials": { "$ref": "./examples/devicecredentials_get.json" } - }, - "responses": { - "200": { - "description": "Success", - "schema": { - "$ref": "#/definitions/DeviceCredentials" - } - } - } - }, - "parameters": [ - { - "$ref": "#/parameters/DeviceId" - } - ] - }, - "/devices/{device_id}/components/{component_name}/telemetry/{telemetry_name}": { - "get": { - "operationId": "Devices_GetTelemetryValue", - "summary": "Get device telemetry value", - "x-ms-examples": { - "Get telemetry": { "$ref": "./examples/devices_telemetry_get.json" } - }, - "responses": { - "200": { - "description": "Success", - "schema": { - "$ref": "#/definitions/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 - } - ] - } - }, - "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 - } - }, - "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}.azureiotcentral.com", - "parameters": [ - { - "$ref": "#/parameters/Subdomain" - } - ] - } -} \ No newline at end of file diff --git a/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/apitoken_create.json b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/apitoken_create.json index 740a1474fa33..0af0fd9f9899 100644 --- a/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/apitoken_create.json +++ b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/apitoken_create.json @@ -2,8 +2,14 @@ "title": "Get API tokens in your application", "description": "Get a list of API tokens in your application.", "parameters": { - "subdomain": "{app-subdomain}", - "token_id": "testtoken" + "centralDnsSuffixInPath": "azureiotcentral.com", + "subdomain": "appsubdomain", + "token_id": "testtoken", + "body": { + "roles": [ + "c7be2c6b-797e-4551-bb24-33709f6b2e20" + ] + } }, "responses": { "200": { @@ -17,4 +23,3 @@ } } } - \ No newline at end of file diff --git a/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/apitoken_delete.json b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/apitoken_delete.json index 4722a67e0b63..a8d426de665e 100644 --- a/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/apitoken_delete.json +++ b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/apitoken_delete.json @@ -2,11 +2,11 @@ "title": "Delete API token", "description": "Delete an API token using its name.", "parameters": { - "subdomain": "{app-subdomain}", + "centralDnsSuffixInPath": "azureiotcentral.com", + "subdomain": "appsubdomain", "token_id": "testtoken" }, "responses": { "204": {} } } - \ No newline at end of file diff --git a/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/apitoken_get.json b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/apitoken_get.json index 740a1474fa33..403d331a9a9b 100644 --- a/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/apitoken_get.json +++ b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/apitoken_get.json @@ -2,7 +2,8 @@ "title": "Get API tokens in your application", "description": "Get a list of API tokens in your application.", "parameters": { - "subdomain": "{app-subdomain}", + "centralDnsSuffixInPath": "azureiotcentral.com", + "subdomain": "appsubdomain", "token_id": "testtoken" }, "responses": { @@ -17,4 +18,3 @@ } } } - \ No newline at end of file diff --git a/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/apitoken_list.json b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/apitoken_list.json index bd1cfb0f047a..3bbec634ab9e 100644 --- a/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/apitoken_list.json +++ b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/apitoken_list.json @@ -2,7 +2,8 @@ "title": "List API tokens in your application", "description": "Get a list of API tokens in your application.", "parameters": { - "subdomain": "{app-subdomain}" + "centralDnsSuffixInPath": "azureiotcentral.com", + "subdomain": "appsubdomain" }, "responses": { "200": { @@ -20,4 +21,3 @@ } } } - \ No newline at end of file diff --git a/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/application_get.json b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/application_get.json index f2cd5334bd50..5ef7c1607b98 100644 --- a/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/application_get.json +++ b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/application_get.json @@ -2,7 +2,8 @@ "title": "Get an application by Id", "description": "Get an application by Id.", "parameters": { - "subdomain": "{app-subdomain}", + "centralDnsSuffixInPath": "azureiotcentral.com", + "subdomain": "appsubdomain", "application_id":"194e282c-290a-4858-b68f-4274690697fc" }, "responses": { @@ -20,4 +21,3 @@ } } } - \ No newline at end of file diff --git a/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/application_list.json b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/application_list.json index 580e0fb5bcdf..b55079257955 100644 --- a/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/application_list.json +++ b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/application_list.json @@ -2,7 +2,8 @@ "title": "List applications", "description": "List applications that are accessible to the signed-in user.", "parameters": { - "subdomain": "{app-subdomain}" + "centralDnsSuffixInPath": "azureiotcentral.com", + "subdomain": "appsubdomain" }, "responses": { "200": { diff --git a/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devicecredentials_get.json b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devicecredentials_get.json index c8a67c518a9a..79306f555b31 100644 --- a/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devicecredentials_get.json +++ b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devicecredentials_get.json @@ -2,17 +2,19 @@ "title": "Get device credentials", "description": "Get the device credentials of a created device. Returns the app's scope Id and device SAS key", "parameters": { - "subdomain": "{app-subdomain}", + "centralDnsSuffixInPath": "azureiotcentral.com", + "subdomain": "appsubdomain", "device_id": "Checkout4" }, "responses": { "200": { + "body":{ "scopeId": "0ne0005F266", "symmetricKey": { "primaryKey": "XaMfV3vryCQw963L2IALf1SdApQRzSIBQd13/fassqM=", "secondaryKey": "s+4uT31TRZJcTSGxZUPZb1yznjTicu4jr9tXNrg+xIQ=" } + } } } } - \ No newline at end of file diff --git a/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_cloudproperties_get.json b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_cloudproperties_get.json index 917ac7cd9b3f..507ac667d74b 100644 --- a/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_cloudproperties_get.json +++ b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_cloudproperties_get.json @@ -2,7 +2,8 @@ "title": "Get cloud property values of a device", "description": "Get the current values of all cloud properties of a device.", "parameters": { - "subdomain": "{app-subdomain}", + "centralDnsSuffixInPath": "azureiotcentral.com", + "subdomain": "appsubdomain", "device_id": "mx1" }, "responses": { @@ -13,4 +14,3 @@ } } } - \ No newline at end of file diff --git a/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_cloudproperties_update.json b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_cloudproperties_update.json index c73dbadc7052..999d46fb6b49 100644 --- a/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_cloudproperties_update.json +++ b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_cloudproperties_update.json @@ -2,9 +2,12 @@ "title": "Update cloud properties of a device", "description": "Update cloud properties of a device.", "parameters": { - "subdomain": "{app-subdomain}", - "device_id": "mx1", + "centralDnsSuffixInPath": "azureiotcentral.com", + "subdomain": "appsubdomain", + "body": { "AssetID": "123abc" + }, + "device_id": "mx1" }, "responses": { "200": { @@ -14,4 +17,3 @@ } } } - \ No newline at end of file diff --git a/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_commands_send.json b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_commands_send.json index 241d672eb588..f1181d825a03 100644 --- a/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_commands_send.json +++ b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_commands_send.json @@ -2,14 +2,14 @@ "title": "Send command", "description": "Send a command to a device.", "parameters": { - "subdomain": "{app-subdomain}", + "centralDnsSuffixInPath": "azureiotcentral.com", + "subdomain": "appsubdomain", "device_id": "mx1", "component_name": "Thermostat_1o", "command_name": "CoolDown", - "tempVal": 30 + "body":{ "request":{"tempVal": 30}} }, "responses": { - "201": {} + "201": {"body":{}} } } - \ No newline at end of file diff --git a/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_commandshistory_get.json b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_commandshistory_get.json index 11dd8a53ba02..cfbbec4852e9 100644 --- a/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_commandshistory_get.json +++ b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_commandshistory_get.json @@ -2,7 +2,8 @@ "title": "Get command history", "description": "Get the most recent invocation of a command of a device.", "parameters": { - "subdomain": "{app-subdomain}", + "centralDnsSuffixInPath": "azureiotcentral.com", + "subdomain": "appsubdomain", "device_id": "mx1", "component_name": "Thermostat_1o", "command_name": "CoolDown" @@ -22,4 +23,3 @@ } } } - \ No newline at end of file diff --git a/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_create.json b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_create.json index 476a1c9f131f..fc3a60805a2c 100644 --- a/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_create.json +++ b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_create.json @@ -2,12 +2,15 @@ "title": "Create a device", "description": "Create a device with an Id.", "parameters": { - "subdomain": "{app-subdomain}", + "centralDnsSuffixInPath": "azureiotcentral.com", + "subdomain": "appsubdomain", "device_id": "ccc", + "body":{ "displayName": "CheckoutThermostatccc", "instanceOf": "urn:kmwga2re7:modelDefinition:t_cj5wspyv", "simulated": true, "approved": true + } }, "responses": { "200": { @@ -23,4 +26,3 @@ } } } - \ No newline at end of file diff --git a/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_delete.json b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_delete.json index d677bc75ed06..516955d4b761 100644 --- a/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_delete.json +++ b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_delete.json @@ -2,11 +2,11 @@ "title": "Delete device", "description": "Delete a device by Id.", "parameters": { - "subdomain": "{app-subdomain}", + "centralDnsSuffixInPath": "azureiotcentral.com", + "subdomain": "appsubdomain", "device_id": "ccc" }, "responses": { "204": {} } } - \ No newline at end of file diff --git a/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_get.json b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_get.json index 67db9aef59da..4f240615c859 100644 --- a/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_get.json +++ b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_get.json @@ -2,7 +2,8 @@ "title": "Get a device by Id", "description": "Get a device by Id", "parameters": { - "subdomain": "{app-subdomain}", + "centralDnsSuffixInPath": "azureiotcentral.com", + "subdomain": "appsubdomain", "device_id": "CheckoutThermostat" }, "responses": { @@ -19,4 +20,3 @@ } } } - \ No newline at end of file diff --git a/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_list.json b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_list.json index 5d163f8bd9a7..ce52b0783ec1 100644 --- a/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_list.json +++ b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_list.json @@ -2,7 +2,9 @@ "title": "List devices", "description": "List all devices in your application.", "parameters": { - "subdomain": "{app-subdomain}"}, + "centralDnsSuffixInPath": "azureiotcentral.com", + "subdomain": "appsubdomain" + }, "responses": { "200": { "body": { @@ -48,4 +50,3 @@ } } } - \ No newline at end of file diff --git a/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_list_by_template.json b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_list_by_template.json index 6e91ecfed278..bb1f8cd4ba87 100644 --- a/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_list_by_template.json +++ b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_list_by_template.json @@ -2,7 +2,8 @@ "title": "List devices associated to a device template.", "description": "List all devices associated to a device template.", "parameters": { - "subdomain": "{app-subdomain}", + "centralDnsSuffixInPath": "azureiotcentral.com", + "subdomain": "appsubdomain", "device_template_id": "urn:sbk9sd6sl:modelDefinition:u3b_fwd7os" }, "responses": { @@ -41,4 +42,3 @@ } } } - \ No newline at end of file diff --git a/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_properties_components_get.json b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_properties_components_get.json index 6884c3208807..28531f7b74b0 100644 --- a/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_properties_components_get.json +++ b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_properties_components_get.json @@ -2,9 +2,10 @@ "title": "Get device properties in component", "description": "Get the read-write property values within a component of a device.", "parameters": { - "subdomain": "{app-subdomain}", + "centralDnsSuffixInPath": "azureiotcentral.com", + "subdomain": "appsubdomain", "device_id": "mx1", - "component_name": "settings" + "component_name": "settings" }, "responses": { "200": { @@ -51,4 +52,3 @@ } } } - \ No newline at end of file diff --git a/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_properties_components_set.json b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_properties_components_set.json index cc2fcf41ac0c..14bb244a1434 100644 --- a/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_properties_components_set.json +++ b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_properties_components_set.json @@ -2,13 +2,16 @@ "title": "Set device properties in component", "description": "Set the read-write property values within a component of a device.", "parameters": { - "subdomain": "{app-subdomain}", + "centralDnsSuffixInPath": "azureiotcentral.com", + "subdomain": "appsubdomain", "device_id": "mx1", "component_name": "settings", + "body":{ "fanSpeed": 35, "voltage": 5, "current": 2, "irSwitch": true + } }, "responses": { "202": { @@ -31,4 +34,3 @@ } } } - \ No newline at end of file diff --git a/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_properties_get.json b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_properties_get.json index 81c5a9cf1bf9..98681b1c1837 100644 --- a/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_properties_get.json +++ b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_properties_get.json @@ -2,7 +2,8 @@ "title": "Get device properties", "description": "Get the current values of all device properties.", "parameters": { - "subdomain": "{app-subdomain}", + "centralDnsSuffixInPath": "azureiotcentral.com", + "subdomain": "appsubdomain", "device_id": "mx1" }, "responses": { @@ -22,4 +23,3 @@ } } } - \ No newline at end of file diff --git a/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_properties_update.json b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_properties_update.json index 6b34cb297339..2efe07fab90e 100644 --- a/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_properties_update.json +++ b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_properties_update.json @@ -2,8 +2,10 @@ "title": "Update device properties", "description": "Update the values of read-write properties of a device", "parameters": { - "subdomain": "{app-subdomain}", + "centralDnsSuffixInPath": "azureiotcentral.com", + "subdomain": "appsubdomain", "device_id": "mx1", + "body":{ "device_info": { "manufacturer": "manufacturer", "model": "model", @@ -13,10 +15,10 @@ "processorManufacturer": "processorManufacturer", "totalStorage": 24, "totalMemory": 18 - } + }} }, "responses": { - "200": { + "202": { "body": { "deviceinfo": { "manufacturer": "TODO", @@ -32,4 +34,3 @@ } } } - \ No newline at end of file diff --git a/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_telemetry_get.json b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_telemetry_get.json index c5f93951b6c4..c6c42407b1fc 100644 --- a/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_telemetry_get.json +++ b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_telemetry_get.json @@ -2,10 +2,11 @@ "title": "Get telemetry", "description": "Get the last known value of a telemetry stream of a device.", "parameters": { - "subdomain": "{app-subdomain}", + "centralDnsSuffixInPath": "azureiotcentral.com", + "subdomain": "appsubdomain", "device_id": "mx1", "component_name": "sensors", - "telemetry_name": "temperature" + "telemetry_name": "temperature" }, "responses": { "200": { @@ -15,4 +16,3 @@ } } } - \ No newline at end of file diff --git a/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devicetemplates_create.json b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devicetemplates_create.json index a524c7aec40b..e0a35757dcf7 100644 --- a/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devicetemplates_create.json +++ b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devicetemplates_create.json @@ -2,9 +2,10 @@ "title": "Create a device template", "description": "Creates and publishes a device template. In the body, specify the full device template object.", "parameters": { - "subdomain": "{app-subdomain}", + "centralDnsSuffixInPath": "azureiotcentral.com", + "subdomain": "appsubdomain", "device_template_id": "environmentstemplateid", - "device_template_object": { + "body": { "types": [ "DeviceModel" ], @@ -124,6 +125,7 @@ }, "responses": { "200": { + "body":{ "id": "environmentstemplateid", "types": [ "DeviceModel" @@ -244,5 +246,5 @@ } } } + } } - \ No newline at end of file diff --git a/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devicetemplates_delete.json b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devicetemplates_delete.json index e421f6b8dd95..ba18b554cd58 100644 --- a/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devicetemplates_delete.json +++ b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devicetemplates_delete.json @@ -2,11 +2,11 @@ "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": { - "subdomain": "{app-subdomain}", + "centralDnsSuffixInPath": "azureiotcentral.com", + "subdomain": "appsubdomain", "device_template_id": "urn:sbk9sd6sl:modelDefinition:u3b_fwd7os" }, "responses": { "204": {} } } - \ No newline at end of file diff --git a/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devicetemplates_get.json b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devicetemplates_get.json index aa12ece6da88..ec1b186c2c33 100644 --- a/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devicetemplates_get.json +++ b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devicetemplates_get.json @@ -2,7 +2,8 @@ "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": { - "subdomain": "{app-subdomain}", + "centralDnsSuffixInPath": "azureiotcentral.com", + "subdomain": "appsubdomain", "device_template_id": "urn:sbk9sd6sl:modelDefinition:u3b_fwd7os" }, "responses": { @@ -174,4 +175,3 @@ } } } - \ No newline at end of file diff --git a/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devicetemplates_get_merged.json b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devicetemplates_get_merged.json index 12db3a4612ac..d88e63c5527d 100644 --- a/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devicetemplates_get_merged.json +++ b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devicetemplates_get_merged.json @@ -2,7 +2,8 @@ "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": { - "subdomain": "{app-subdomain}", + "centralDnsSuffixInPath": "azureiotcentral.com", + "subdomain": "appsubdomain", "device_template_id": "urn:sbk9sd6sl:modelDefinition:u3b_fwd7os" }, "responses": { @@ -168,4 +169,3 @@ } } } - \ No newline at end of file diff --git a/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devicetemplates_list.json b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devicetemplates_list.json index 7c8066ec00bc..e4763760ca1e 100644 --- a/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devicetemplates_list.json +++ b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devicetemplates_list.json @@ -2,7 +2,8 @@ "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": { - "subdomain": "{app-subdomain}" + "centralDnsSuffixInPath": "azureiotcentral.com", + "subdomain": "appsubdomain" }, "responses": { "200": { @@ -177,4 +178,3 @@ } } } - \ No newline at end of file diff --git a/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/roles_get.json b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/roles_get.json index b00429dc6306..d3f68826e146 100644 --- a/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/roles_get.json +++ b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/roles_get.json @@ -2,12 +2,16 @@ "title": "Get role by Id", "description": "Get a role by Id.", "parameters": { - "subdomain": "{app-subdomain}"}, + "centralDnsSuffixInPath": "azureiotcentral.com", + "subdomain": "appsubdomain", + "role_id":"ca310b8d-2f4a-44e0-a36e-957c202cd8d4" + }, "responses": { "200": { + "body":{ "id": "ca310b8d-2f4a-44e0-a36e-957c202cd8d4", "displayName": "Administrator" + } } } } - \ No newline at end of file diff --git a/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/roles_list.json b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/roles_list.json index b9d3fb2bc34c..4a3c1471cf2a 100644 --- a/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/roles_list.json +++ b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/roles_list.json @@ -2,7 +2,9 @@ "title": "List roles", "description": "List roles in your application.", "parameters": { - "subdomain": "{app-subdomain}"}, + "centralDnsSuffixInPath": "azureiotcentral.com", + "subdomain": "appsubdomain" + }, "responses": { "200": { "body": { @@ -24,4 +26,3 @@ } } } - \ No newline at end of file diff --git a/specification/iotcentral/data-plane/preview/2019-10-28-preview/iotcentral.json b/specification/iotcentral/data-plane/preview/2019-10-28-preview/iotcentral.json new file mode 100644 index 000000000000..7826343e2d8e --- /dev/null +++ b/specification/iotcentral/data-plane/preview/2019-10-28-preview/iotcentral.json @@ -0,0 +1,1264 @@ +{ + "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": "azureiotcentral.com", + "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 + }, + "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", + "simulated" + ] + }, + "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." + } + }, + "required": [ + "value" + ] + }, + "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": { + "instance": { + "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" + } + }, + "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": [ + { + "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.", + "x-ms-examples": { + "Delete API token": { + "$ref": "./examples/apitoken_delete.json" + } + }, + "responses": { + "204": { + "description": "Success" + } + } + }, + "parameters": [ + { + "in": "path", + "name": "token_id", + "description": "Unique ID for the API token.", + "type": "string", + "required": true + } + ] + }, + "/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.", + "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": [ + { + "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.", + "x-ms-examples": { + "Delete device": { + "$ref": "./examples/devices_delete.json" + } + }, + "responses": { + "204": { + "description": "Success" + } + } + }, + "parameters": [ + { + "$ref": "#/parameters/DeviceId" + } + ] + }, + "/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", + "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.", + "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": [ + { + "name": "body", + "in": "body", + "description": "Device template body.", + "required": true, + "schema": { + "$ref": "#/definitions/DeviceTemplate" + } + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/DeviceTemplate" + } + } + } + }, + "parameters": [ + { + "$ref": "#/parameters/DeviceTemplateId" + } + ] + }, + "/deviceTemplates/{device_template_id}/merged": { + "get": { + "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" + } + }, + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/DeviceTemplate" + } + } + } + }, + "parameters": [ + { + "$ref": "#/parameters/DeviceTemplateId" + } + ] + }, + "/deviceTemplates/{device_template_id}/devices": { + "get": { + "operationId": "DeviceTemplates_ListDevices", + "summary": "Get devices for a template", + "x-ms-examples": { + "List devices assocated to a device template": { + "$ref": "./examples/devices_list_by_template.json" + } + }, + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/DeviceCollection" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + }, + "parameters": [ + { + "$ref": "#/parameters/DeviceTemplateId" + } + ] + }, + "/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.", + "x-ms-examples": { + "Get role by Id": { + "$ref": "./examples/roles_get.json" + } + }, + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/Role" + } + } + } + }, + "parameters": [ + { + "in": "path", + "name": "role_id", + "description": "Unique ID for the role.", + "type": "string", + "required": true + } + ] + }, + "/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.", + "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": [ + { + "name": "body", + "in": "body", + "description": "Device properties.", + "required": true, + "schema": { + "$ref": "#/definitions/DeviceCloudProperties" + } + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/DeviceCloudProperties" + } + } + } + }, + "parameters": [ + { + "$ref": "#/parameters/DeviceId" + } + ] + }, + "/devices/{device_id}/components/{component_name}/commands/{command_name}": { + "get": { + "operationId": "Devices_GetCommandHistory", + "summary": "Get device command history", + "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": [ + { + "name": "body", + "in": "body", + "description": "Device command body.", + "required": true, + "schema": { + "$ref": "#/definitions/DeviceCommand" + } + } + ], + "responses": { + "201": { + "description": "Success", + "schema": { + "$ref": "#/definitions/DeviceCommand" + } + } + } + }, + "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 + } + ] + }, + "/devices/{device_id}/properties": { + "get": { + "operationId": "Devices_GetProperties", + "summary": "Get device properties", + "description": "Get all property values of a device by device ID.", + "x-ms-examples": { + "Get properties": { + "$ref": "./examples/devices_properties_get.json" + } + }, + "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": [ + { + "name": "body", + "in": "body", + "description": "Device properties.", + "required": true, + "schema": { + "$ref": "#/definitions/DeviceProperties" + } + } + ], + "responses": { + "202": { + "description": "Success", + "schema": { + "$ref": "#/definitions/DeviceProperties" + } + } + } + }, + "parameters": [ + { + "$ref": "#/parameters/DeviceId" + } + ] + }, + "/devices/{device_id}/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" + } + }, + "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": [ + { + "name": "body", + "in": "body", + "description": "Device properties.", + "required": true, + "schema": { + "$ref": "#/definitions/DeviceProperties" + } + } + ], + "responses": { + "202": { + "description": "Success", + "schema": { + "$ref": "#/definitions/DeviceProperties" + } + } + } + }, + "parameters": [ + { + "$ref": "#/parameters/DeviceId" + }, + { + "$ref": "#/parameters/ComponentName" + } + ] + }, + "/devices/{device_id}/credentials": { + "get": { + "operationId": "Devices_GetCredentials", + "summary": "Get device credentials", + "x-ms-examples": { + "Get device credentials": { + "$ref": "./examples/devicecredentials_get.json" + } + }, + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/DeviceCredentials" + } + } + } + }, + "parameters": [ + { + "$ref": "#/parameters/DeviceId" + } + ] + }, + "/devices/{device_id}/components/{component_name}/telemetry/{telemetry_name}": { + "get": { + "operationId": "Devices_GetTelemetryValue", + "summary": "Get device telemetry value", + "x-ms-examples": { + "Get telemetry": { + "$ref": "./examples/devices_telemetry_get.json" + } + }, + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/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 + } + ] + } + }, + "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/validation.json b/validation.json new file mode 100644 index 0000000000000000000000000000000000000000..88b1a30be1ea1d3343cf13215a5b584617e06702 GIT binary patch literal 18094 zcmeHPO>fgc5S=p;|G~k*+ zI!&l|Ri%mcW7dBAJbpW#^`GBAC6cbRWQf1Ie8sN=c`T1m%D*l7h|-RpOCWzaeb2qygJs@M-)Tr;j$QZA%~H zHqfGn?-;cmQ*Mu^juChS9Jyu62WZoh3Hr6<(v#)>jLpkTr&Q0IU z3CG}^^ZeQS5T$K7b$XmnE!w_3jtP2M#_VhmFS3fqJ;b?1U_u*ba)Dnwd!E%8zp7}_ zH1!qC7UzyWG%iM{-pK zn8#V46=6VH>lsKbb5CC{u0aLx?!_mC>+~D{GwM42IJ*{FjBb$?Ql2LcD<)qt*5RwG zANUkIHkk*^9ay)Tc>R8J$!^Gyjv`qdCb265>N8Z(o zC#y{=qBP3y*Hw^Uko7!aW;Stc#Nd6JO*StR>15h6L^8^Sny$V`uqhISaJl7k#G#zn z>GG=qf7M4WA(bmLPm|0cW=$52(hlWZEZ?eAtH-z6^d-|WQK**k;EwciP1zplZuuCV#f#f&y3Ae;w)Rsu$JFlIycluM0L2Bs4P7V z8&ur}M6H?jz!EB71kYyAka!)?(RP zZd`!6%eC|nkiOrYm|+Iy@88y2W4Tv&zR%EPygQoJv_9}&(}RcENZw(fcMT-o#(j!Q z4*H^?^nmEeu^^0 q8;WPp_<$_m2k{PyHbT59HczGOTSqQ2>-1Rmy%}Q@(Ymkqe*6UmI+v>e literal 0 HcmV?d00001 diff --git a/validationspec.json b/validationspec.json new file mode 100644 index 0000000000000000000000000000000000000000..aac5784d802aaa09e2f694433969eca53a3f4253 GIT binary patch literal 500 zcmcJLI}ZU-5QR@I@gKI+ARZ0dYc)z5k4wnzU0JV)`0My)h=gcmihD9=&Y3y)e!D19 zuAm(?)e4lVstR4JnnrYTn5ezhnu9Xx40m+A)`Hi#h}twwO{kr=DChK-FP+U4Oc`rv z4;$RKbSLXSy{2lQ&ge!atiM$WI-(0Yd8eb6+Uhge1~t@C&sE=Zzcw|s;Xb=1#VeAs z{?45Fp1}6h^G|fZ-*(M3R+l|FS42`3Xg|3=Tn*LL-G2S7{pb*7q5+9YP{}0;nSv)w N-1mV0f`9zaT@P?gQ|kZ# literal 0 HcmV?d00001 From 2bd4fa731630e83fc5a56170f67327a6643c85f0 Mon Sep 17 00:00:00 2001 From: Vivian Liu Date: Tue, 22 Oct 2019 17:49:27 -0700 Subject: [PATCH 06/22] added cde changes --- .../continuousdataexports_delete.json | 12 + .../examples/continuousdataexports_get.json | 30 +++ .../examples/continuousdataexports_list.json | 50 +++++ .../examples/continuousdataexports_set.json | 44 ++++ .../2019-10-28-preview/iotcentral.json | 212 +++++++++++++++++- 5 files changed, 347 insertions(+), 1 deletion(-) create mode 100644 specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/continuousdataexports_delete.json create mode 100644 specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/continuousdataexports_get.json create mode 100644 specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/continuousdataexports_list.json create mode 100644 specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/continuousdataexports_set.json diff --git a/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/continuousdataexports_delete.json b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/continuousdataexports_delete.json new file mode 100644 index 000000000000..119879c7b094 --- /dev/null +++ b/specification/iotcentral/data-plane/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/preview/2019-10-28-preview/examples/continuousdataexports_get.json b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/continuousdataexports_get.json new file mode 100644 index 000000000000..702c6ee42e2e --- /dev/null +++ b/specification/iotcentral/data-plane/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/preview/2019-10-28-preview/examples/continuousdataexports_list.json b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/continuousdataexports_list.json new file mode 100644 index 000000000000..9c4de398a267 --- /dev/null +++ b/specification/iotcentral/data-plane/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/preview/2019-10-28-preview/examples/continuousdataexports_set.json b/specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/continuousdataexports_set.json new file mode 100644 index 000000000000..a94e0dc109e2 --- /dev/null +++ b/specification/iotcentral/data-plane/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/preview/2019-10-28-preview/iotcentral.json b/specification/iotcentral/data-plane/preview/2019-10-28-preview/iotcentral.json index 7826343e2d8e..0b2a25f9af84 100644 --- a/specification/iotcentral/data-plane/preview/2019-10-28-preview/iotcentral.json +++ b/specification/iotcentral/data-plane/preview/2019-10-28-preview/iotcentral.json @@ -122,6 +122,125 @@ ], "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": { @@ -715,6 +834,97 @@ } ] }, + "/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.", + "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":[ + { + "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.", + "Delete export": { + "$ref": "./examples/continuousdataexports_delete.json" + } + }, + "responses":{ + "204":{ + "description":"Success" + } + } + }, + "parameters":[ + { + "in":"path", + "name":"export_id", + "description":"Unique ID for the continuous data export.", + "type":"string", + "required":true + } + ] + }, "/deviceTemplates": { "get": { "operationId": "DeviceTemplates_List", @@ -833,7 +1043,7 @@ "operationId": "DeviceTemplates_ListDevices", "summary": "Get devices for a template", "x-ms-examples": { - "List devices assocated to a device template": { + "List devices associated to a device template": { "$ref": "./examples/devices_list_by_template.json" } }, From 749790e30109ee65240bf13e44ff75707a9d0aec Mon Sep 17 00:00:00 2001 From: rafarhat Date: Tue, 22 Oct 2019 18:19:43 -0700 Subject: [PATCH 07/22] Adding readme.md autorest section and continuos data export --- .../2019-10-28-preview/iotcentral.json | 1 + specification/iotcentral/data-plane/readme.md | 24 +++++++++++++++++++ 2 files changed, 25 insertions(+) diff --git a/specification/iotcentral/data-plane/preview/2019-10-28-preview/iotcentral.json b/specification/iotcentral/data-plane/preview/2019-10-28-preview/iotcentral.json index 0b2a25f9af84..ca936965e0b7 100644 --- a/specification/iotcentral/data-plane/preview/2019-10-28-preview/iotcentral.json +++ b/specification/iotcentral/data-plane/preview/2019-10-28-preview/iotcentral.json @@ -905,6 +905,7 @@ "delete":{ "operationId":"ContinuousDataExports_Remove", "summary":"Delete a continuous data export.", + "x-ms-examples": { "Delete export": { "$ref": "./examples/continuousdataexports_delete.json" } diff --git a/specification/iotcentral/data-plane/readme.md b/specification/iotcentral/data-plane/readme.md index e5565741104d..228d7a0d4569 100644 --- a/specification/iotcentral/data-plane/readme.md +++ b/specification/iotcentral/data-plane/readme.md @@ -41,3 +41,27 @@ nodejs: 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)/preview/2019-10-28/iotcentral.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 From a239a3bc8673e284168e830ce6862ee0dba22fbe Mon Sep 17 00:00:00 2001 From: rafarhat Date: Tue, 22 Oct 2019 18:30:00 -0700 Subject: [PATCH 08/22] adding iotcentral customwords --- custom-words.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/custom-words.txt b/custom-words.txt index 0fc88446917e..00af77b9f545 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 @@ -291,6 +293,7 @@ containersas containerservice contentmoderator continuationtoken +continuousdataexports continuouswebjobs contoso contosodataset @@ -404,6 +407,7 @@ deserializing destinationshares deterministically deviceprovisioningservices +devicetemplates devspaces devtestlab devtestlabs From db40fd624153a257b825b4b9bd0bbbc640b9a31a Mon Sep 17 00:00:00 2001 From: rafarhat Date: Tue, 22 Oct 2019 18:37:47 -0700 Subject: [PATCH 09/22] iotcentral custom words --- custom-words.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/custom-words.txt b/custom-words.txt index 00af77b9f545..76676b4676d7 100644 --- a/custom-words.txt +++ b/custom-words.txt @@ -262,6 +262,7 @@ closedlist closedlists Cloudamize cloudapp +cloudproperties cloudsimple clustermonitoring Cmdkey @@ -274,6 +275,7 @@ codegeneration cognitiveservices colls COLUMNSTORE +commandshistory commitmentplans Compat compilationjobs @@ -406,6 +408,7 @@ deserializer deserializing destinationshares deterministically +devicecredentials deviceprovisioningservices devicetemplates devspaces From ff94fc80040eaf45c01693b3a44a4ce58e75770f Mon Sep 17 00:00:00 2001 From: rafarhat Date: Tue, 22 Oct 2019 19:32:59 -0700 Subject: [PATCH 10/22] Add Data Planse Parent Folder Structure --- .../preview/2019-10-28-preview/examples/apitoken_create.json | 0 .../preview/2019-10-28-preview/examples/apitoken_delete.json | 0 .../preview/2019-10-28-preview/examples/apitoken_get.json | 0 .../preview/2019-10-28-preview/examples/apitoken_list.json | 0 .../preview/2019-10-28-preview/examples/application_get.json | 0 .../preview/2019-10-28-preview/examples/application_list.json | 0 .../2019-10-28-preview/examples/continuousdataexports_delete.json | 0 .../2019-10-28-preview/examples/continuousdataexports_get.json | 0 .../2019-10-28-preview/examples/continuousdataexports_list.json | 0 .../2019-10-28-preview/examples/continuousdataexports_set.json | 0 .../2019-10-28-preview/examples/devicecredentials_get.json | 0 .../2019-10-28-preview/examples/devices_cloudproperties_get.json | 0 .../examples/devices_cloudproperties_update.json | 0 .../2019-10-28-preview/examples/devices_commands_send.json | 0 .../2019-10-28-preview/examples/devices_commandshistory_get.json | 0 .../preview/2019-10-28-preview/examples/devices_create.json | 0 .../preview/2019-10-28-preview/examples/devices_delete.json | 0 .../preview/2019-10-28-preview/examples/devices_get.json | 0 .../preview/2019-10-28-preview/examples/devices_list.json | 0 .../2019-10-28-preview/examples/devices_list_by_template.json | 0 .../examples/devices_properties_components_get.json | 0 .../examples/devices_properties_components_set.json | 0 .../2019-10-28-preview/examples/devices_properties_get.json | 0 .../2019-10-28-preview/examples/devices_properties_update.json | 0 .../2019-10-28-preview/examples/devices_telemetry_get.json | 0 .../2019-10-28-preview/examples/devicetemplates_create.json | 0 .../2019-10-28-preview/examples/devicetemplates_delete.json | 0 .../preview/2019-10-28-preview/examples/devicetemplates_get.json | 0 .../2019-10-28-preview/examples/devicetemplates_get_merged.json | 0 .../preview/2019-10-28-preview/examples/devicetemplates_list.json | 0 .../preview/2019-10-28-preview/examples/roles_get.json | 0 .../preview/2019-10-28-preview/examples/roles_list.json | 0 .../preview/2019-10-28-preview/iotcentral.json | 0 33 files changed, 0 insertions(+), 0 deletions(-) rename specification/iotcentral/data-plane/{ => Microsoft.IoTCentral}/preview/2019-10-28-preview/examples/apitoken_create.json (100%) rename specification/iotcentral/data-plane/{ => Microsoft.IoTCentral}/preview/2019-10-28-preview/examples/apitoken_delete.json (100%) rename specification/iotcentral/data-plane/{ => Microsoft.IoTCentral}/preview/2019-10-28-preview/examples/apitoken_get.json (100%) rename specification/iotcentral/data-plane/{ => Microsoft.IoTCentral}/preview/2019-10-28-preview/examples/apitoken_list.json (100%) rename specification/iotcentral/data-plane/{ => Microsoft.IoTCentral}/preview/2019-10-28-preview/examples/application_get.json (100%) rename specification/iotcentral/data-plane/{ => Microsoft.IoTCentral}/preview/2019-10-28-preview/examples/application_list.json (100%) rename specification/iotcentral/data-plane/{ => Microsoft.IoTCentral}/preview/2019-10-28-preview/examples/continuousdataexports_delete.json (100%) rename specification/iotcentral/data-plane/{ => Microsoft.IoTCentral}/preview/2019-10-28-preview/examples/continuousdataexports_get.json (100%) rename specification/iotcentral/data-plane/{ => Microsoft.IoTCentral}/preview/2019-10-28-preview/examples/continuousdataexports_list.json (100%) rename specification/iotcentral/data-plane/{ => Microsoft.IoTCentral}/preview/2019-10-28-preview/examples/continuousdataexports_set.json (100%) rename specification/iotcentral/data-plane/{ => Microsoft.IoTCentral}/preview/2019-10-28-preview/examples/devicecredentials_get.json (100%) rename specification/iotcentral/data-plane/{ => Microsoft.IoTCentral}/preview/2019-10-28-preview/examples/devices_cloudproperties_get.json (100%) rename specification/iotcentral/data-plane/{ => Microsoft.IoTCentral}/preview/2019-10-28-preview/examples/devices_cloudproperties_update.json (100%) rename specification/iotcentral/data-plane/{ => Microsoft.IoTCentral}/preview/2019-10-28-preview/examples/devices_commands_send.json (100%) rename specification/iotcentral/data-plane/{ => Microsoft.IoTCentral}/preview/2019-10-28-preview/examples/devices_commandshistory_get.json (100%) rename specification/iotcentral/data-plane/{ => Microsoft.IoTCentral}/preview/2019-10-28-preview/examples/devices_create.json (100%) rename specification/iotcentral/data-plane/{ => Microsoft.IoTCentral}/preview/2019-10-28-preview/examples/devices_delete.json (100%) rename specification/iotcentral/data-plane/{ => Microsoft.IoTCentral}/preview/2019-10-28-preview/examples/devices_get.json (100%) rename specification/iotcentral/data-plane/{ => Microsoft.IoTCentral}/preview/2019-10-28-preview/examples/devices_list.json (100%) rename specification/iotcentral/data-plane/{ => Microsoft.IoTCentral}/preview/2019-10-28-preview/examples/devices_list_by_template.json (100%) rename specification/iotcentral/data-plane/{ => Microsoft.IoTCentral}/preview/2019-10-28-preview/examples/devices_properties_components_get.json (100%) rename specification/iotcentral/data-plane/{ => Microsoft.IoTCentral}/preview/2019-10-28-preview/examples/devices_properties_components_set.json (100%) rename specification/iotcentral/data-plane/{ => Microsoft.IoTCentral}/preview/2019-10-28-preview/examples/devices_properties_get.json (100%) rename specification/iotcentral/data-plane/{ => Microsoft.IoTCentral}/preview/2019-10-28-preview/examples/devices_properties_update.json (100%) rename specification/iotcentral/data-plane/{ => Microsoft.IoTCentral}/preview/2019-10-28-preview/examples/devices_telemetry_get.json (100%) rename specification/iotcentral/data-plane/{ => Microsoft.IoTCentral}/preview/2019-10-28-preview/examples/devicetemplates_create.json (100%) rename specification/iotcentral/data-plane/{ => Microsoft.IoTCentral}/preview/2019-10-28-preview/examples/devicetemplates_delete.json (100%) rename specification/iotcentral/data-plane/{ => Microsoft.IoTCentral}/preview/2019-10-28-preview/examples/devicetemplates_get.json (100%) rename specification/iotcentral/data-plane/{ => Microsoft.IoTCentral}/preview/2019-10-28-preview/examples/devicetemplates_get_merged.json (100%) rename specification/iotcentral/data-plane/{ => Microsoft.IoTCentral}/preview/2019-10-28-preview/examples/devicetemplates_list.json (100%) rename specification/iotcentral/data-plane/{ => Microsoft.IoTCentral}/preview/2019-10-28-preview/examples/roles_get.json (100%) rename specification/iotcentral/data-plane/{ => Microsoft.IoTCentral}/preview/2019-10-28-preview/examples/roles_list.json (100%) rename specification/iotcentral/data-plane/{ => Microsoft.IoTCentral}/preview/2019-10-28-preview/iotcentral.json (100%) diff --git a/specification/iotcentral/data-plane/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 similarity index 100% rename from specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/apitoken_create.json rename to specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/apitoken_create.json diff --git a/specification/iotcentral/data-plane/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 similarity index 100% rename from specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/apitoken_delete.json rename to specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/apitoken_delete.json diff --git a/specification/iotcentral/data-plane/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 similarity index 100% rename from specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/apitoken_get.json rename to specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/apitoken_get.json diff --git a/specification/iotcentral/data-plane/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 similarity index 100% rename from specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/apitoken_list.json rename to specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/apitoken_list.json diff --git a/specification/iotcentral/data-plane/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 similarity index 100% rename from specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/application_get.json rename to specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/application_get.json diff --git a/specification/iotcentral/data-plane/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 similarity index 100% rename from specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/application_list.json rename to specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/application_list.json diff --git a/specification/iotcentral/data-plane/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 similarity index 100% rename from specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/continuousdataexports_delete.json rename to specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/continuousdataexports_delete.json diff --git a/specification/iotcentral/data-plane/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 similarity index 100% rename from specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/continuousdataexports_get.json rename to specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/continuousdataexports_get.json diff --git a/specification/iotcentral/data-plane/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 similarity index 100% rename from specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/continuousdataexports_list.json rename to specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/continuousdataexports_list.json diff --git a/specification/iotcentral/data-plane/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 similarity index 100% rename from specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/continuousdataexports_set.json rename to specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/continuousdataexports_set.json diff --git a/specification/iotcentral/data-plane/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 similarity index 100% rename from specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devicecredentials_get.json rename to specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/devicecredentials_get.json diff --git a/specification/iotcentral/data-plane/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 similarity index 100% rename from specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_cloudproperties_get.json rename to specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/devices_cloudproperties_get.json diff --git a/specification/iotcentral/data-plane/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 similarity index 100% rename from specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_cloudproperties_update.json rename to specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/devices_cloudproperties_update.json diff --git a/specification/iotcentral/data-plane/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 similarity index 100% rename from specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_commands_send.json rename to specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/devices_commands_send.json diff --git a/specification/iotcentral/data-plane/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 similarity index 100% rename from specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_commandshistory_get.json rename to specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/devices_commandshistory_get.json diff --git a/specification/iotcentral/data-plane/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 similarity index 100% rename from specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_create.json rename to specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/devices_create.json diff --git a/specification/iotcentral/data-plane/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 similarity index 100% rename from specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_delete.json rename to specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/devices_delete.json diff --git a/specification/iotcentral/data-plane/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 similarity index 100% rename from specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_get.json rename to specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/devices_get.json diff --git a/specification/iotcentral/data-plane/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 similarity index 100% rename from specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_list.json rename to specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/devices_list.json diff --git a/specification/iotcentral/data-plane/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 similarity index 100% rename from specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_list_by_template.json rename to specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/devices_list_by_template.json diff --git a/specification/iotcentral/data-plane/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 similarity index 100% rename from specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_properties_components_get.json rename to specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/devices_properties_components_get.json diff --git a/specification/iotcentral/data-plane/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 similarity index 100% rename from specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_properties_components_set.json rename to specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/devices_properties_components_set.json diff --git a/specification/iotcentral/data-plane/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 similarity index 100% rename from specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_properties_get.json rename to specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/devices_properties_get.json diff --git a/specification/iotcentral/data-plane/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 similarity index 100% rename from specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_properties_update.json rename to specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/devices_properties_update.json diff --git a/specification/iotcentral/data-plane/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 similarity index 100% rename from specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devices_telemetry_get.json rename to specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/devices_telemetry_get.json diff --git a/specification/iotcentral/data-plane/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 similarity index 100% rename from specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devicetemplates_create.json rename to specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/devicetemplates_create.json diff --git a/specification/iotcentral/data-plane/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 similarity index 100% rename from specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devicetemplates_delete.json rename to specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/devicetemplates_delete.json diff --git a/specification/iotcentral/data-plane/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 similarity index 100% rename from specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devicetemplates_get.json rename to specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/devicetemplates_get.json diff --git a/specification/iotcentral/data-plane/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 similarity index 100% rename from specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devicetemplates_get_merged.json rename to specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/devicetemplates_get_merged.json diff --git a/specification/iotcentral/data-plane/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 similarity index 100% rename from specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/devicetemplates_list.json rename to specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/devicetemplates_list.json diff --git a/specification/iotcentral/data-plane/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 similarity index 100% rename from specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/roles_get.json rename to specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/roles_get.json diff --git a/specification/iotcentral/data-plane/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 similarity index 100% rename from specification/iotcentral/data-plane/preview/2019-10-28-preview/examples/roles_list.json rename to specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/roles_list.json diff --git a/specification/iotcentral/data-plane/preview/2019-10-28-preview/iotcentral.json b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/iotcentral.json similarity index 100% rename from specification/iotcentral/data-plane/preview/2019-10-28-preview/iotcentral.json rename to specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/iotcentral.json From a1242a380bc7455c8435e702c02d210a7c74bd59 Mon Sep 17 00:00:00 2001 From: rafarhat Date: Wed, 23 Oct 2019 10:08:46 -0700 Subject: [PATCH 11/22] Fix readme.md input files pathing --- specification/iotcentral/data-plane/readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/iotcentral/data-plane/readme.md b/specification/iotcentral/data-plane/readme.md index 228d7a0d4569..13276f70cc06 100644 --- a/specification/iotcentral/data-plane/readme.md +++ b/specification/iotcentral/data-plane/readme.md @@ -54,7 +54,7 @@ require: $(this-folder)/../../../profiles/readme.md # all the input files across all versions input-file: - - $(this-folder)/preview/2019-10-28/iotcentral.json + - $(this-folder)/Microsoft.IoTCentral/preview/2019-10-28-preview/iotcentral.json ``` From 95ec31b307071e11490120b94fa4503ca676b022 Mon Sep 17 00:00:00 2001 From: Vivian Liu Date: Wed, 23 Oct 2019 10:25:16 -0700 Subject: [PATCH 12/22] Updating API token create --- .../preview/2019-10-28-preview/examples/apitoken_create.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 index 0af0fd9f9899..cdf8169186f8 100644 --- 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 @@ -18,7 +18,8 @@ "roles": [ "ca310b8d-2f4a-44e0-a36e-957c202cd8d4" ], - "expiry": "2020-10-18T18:30:40.227Z" + "expiry": "2020-10-18T18:30:40.227Z", + "token": "SharedAccessSignature sr=..." } } } From 6d02ba554d8feda5ec501d585c88fdea955ab7fb Mon Sep 17 00:00:00 2001 From: rafarhat Date: Wed, 23 Oct 2019 16:52:49 -0700 Subject: [PATCH 13/22] update readme for avocado --- specification/iotcentral/data-plane/readme.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/specification/iotcentral/data-plane/readme.md b/specification/iotcentral/data-plane/readme.md index 13276f70cc06..2a5a05c05154 100644 --- a/specification/iotcentral/data-plane/readme.md +++ b/specification/iotcentral/data-plane/readme.md @@ -20,6 +20,20 @@ To see additional help and options, run: ## 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 +``` + ```yaml version: latest clear-output-folder: true From 483ccd280075871bf2089cf6cc942448add03bd9 Mon Sep 17 00:00:00 2001 From: rafarhat Date: Wed, 23 Oct 2019 17:44:18 -0700 Subject: [PATCH 14/22] readme.md remove unused example files --- .../examples/application_get.json | 23 --------------- .../examples/application_list.json | 28 ------------------- specification/iotcentral/data-plane/readme.md | 24 ---------------- 3 files changed, 75 deletions(-) delete mode 100644 specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/application_get.json delete mode 100644 specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/application_list.json 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 deleted file mode 100644 index 5ef7c1607b98..000000000000 --- a/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/application_get.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "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": { - "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" - } - ] - } - } - } - } 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 deleted file mode 100644 index b55079257955..000000000000 --- a/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/application_list.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "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/readme.md b/specification/iotcentral/data-plane/readme.md index 2a5a05c05154..710038328bf3 100644 --- a/specification/iotcentral/data-plane/readme.md +++ b/specification/iotcentral/data-plane/readme.md @@ -54,28 +54,4 @@ 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 - -``` - -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 From 46eacb0e967a9f2c4c174194afcf10f7585d9ce6 Mon Sep 17 00:00:00 2001 From: rafarhat Date: Wed, 23 Oct 2019 19:58:50 -0700 Subject: [PATCH 15/22] remove uncessary files --- validation.json | Bin 18094 -> 0 bytes validationspec.json | Bin 500 -> 0 bytes 2 files changed, 0 insertions(+), 0 deletions(-) delete mode 100644 validation.json delete mode 100644 validationspec.json diff --git a/validation.json b/validation.json deleted file mode 100644 index 88b1a30be1ea1d3343cf13215a5b584617e06702..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 18094 zcmeHPO>fgc5S=p;|G~k*+ zI!&l|Ri%mcW7dBAJbpW#^`GBAC6cbRWQf1Ie8sN=c`T1m%D*l7h|-RpOCWzaeb2qygJs@M-)Tr;j$QZA%~H zHqfGn?-;cmQ*Mu^juChS9Jyu62WZoh3Hr6<(v#)>jLpkTr&Q0IU z3CG}^^ZeQS5T$K7b$XmnE!w_3jtP2M#_VhmFS3fqJ;b?1U_u*ba)Dnwd!E%8zp7}_ zH1!qC7UzyWG%iM{-pK zn8#V46=6VH>lsKbb5CC{u0aLx?!_mC>+~D{GwM42IJ*{FjBb$?Ql2LcD<)qt*5RwG zANUkIHkk*^9ay)Tc>R8J$!^Gyjv`qdCb265>N8Z(o zC#y{=qBP3y*Hw^Uko7!aW;Stc#Nd6JO*StR>15h6L^8^Sny$V`uqhISaJl7k#G#zn z>GG=qf7M4WA(bmLPm|0cW=$52(hlWZEZ?eAtH-z6^d-|WQK**k;EwciP1zplZuuCV#f#f&y3Ae;w)Rsu$JFlIycluM0L2Bs4P7V z8&ur}M6H?jz!EB71kYyAka!)?(RP zZd`!6%eC|nkiOrYm|+Iy@88y2W4Tv&zR%EPygQoJv_9}&(}RcENZw(fcMT-o#(j!Q z4*H^?^nmEeu^^0 q8;WPp_<$_m2k{PyHbT59HczGOTSqQ2>-1Rmy%}Q@(Ymkqe*6UmI+v>e diff --git a/validationspec.json b/validationspec.json deleted file mode 100644 index aac5784d802aaa09e2f694433969eca53a3f4253..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 500 zcmcJLI}ZU-5QR@I@gKI+ARZ0dYc)z5k4wnzU0JV)`0My)h=gcmihD9=&Y3y)e!D19 zuAm(?)e4lVstR4JnnrYTn5ezhnu9Xx40m+A)`Hi#h}twwO{kr=DChK-FP+U4Oc`rv z4;$RKbSLXSy{2lQ&ge!atiM$WI-(0Yd8eb6+Uhge1~t@C&sE=Zzcw|s;Xb=1#VeAs z{?45Fp1}6h^G|fZ-*(M3R+l|FS42`3Xg|3=Tn*LL-G2S7{pb*7q5+9YP{}0;nSv)w N-1mV0f`9zaT@P?gQ|kZ# From c1bbde6719eadaa719263a2844ab6e5a0041f54c Mon Sep 17 00:00:00 2001 From: Vivian Liu Date: Thu, 24 Oct 2019 10:52:59 -0700 Subject: [PATCH 16/22] Changed instance to component --- .../2019-10-28-preview/examples/devicetemplates_create.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 index e0a35757dcf7..792cdfed212f 100644 --- 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 @@ -104,7 +104,7 @@ "@type": [ "CapabilityReference" ], - "instance": "urn:storeAnalyticsCheckoutPnp:capabilityModel:fyy5xn_y:1", + "component": "urn:storeAnalyticsCheckoutPnp:capabilityModel:fyy5xn_y:1", "reference": "urn:storeAnalyticsCheckoutPnp:Interface:Occupancy:1" }, "valueDetail": { @@ -226,7 +226,7 @@ "@type": [ "CapabilityReference" ], - "instance": "urn:storeAnalyticsCheckoutPnp:capabilityModel:fyy5xn_y:1", + "component": "urn:storeAnalyticsCheckoutPnp:capabilityModel:fyy5xn_y:1", "reference": "urn:storeAnalyticsCheckoutPnp:Interface:Occupancy:1" }, "valueDetail": { From 0125cbe271528e8d58675ce93b4a3ec9d56eb836 Mon Sep 17 00:00:00 2001 From: Vivian Liu Date: Thu, 24 Oct 2019 11:53:39 -0700 Subject: [PATCH 17/22] updated swagger --- .../preview/2019-10-28-preview/iotcentral.json | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) 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 ca936965e0b7..9c0176de50ac 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 @@ -280,8 +280,7 @@ } }, "required": [ - "instanceOf", - "simulated" + "instanceOf" ] }, "DeviceCollection": { @@ -516,10 +515,7 @@ "value": { "description": "The value of this API response." } - }, - "required": [ - "value" - ] + } }, "Role": { "type": "object", From 9fe7747c4a03e0f7089b2a0efe118c7def02c055 Mon Sep 17 00:00:00 2001 From: Vivian Liu Date: Thu, 24 Oct 2019 13:49:25 -0700 Subject: [PATCH 18/22] Fixed swagger --- .../preview/2019-10-28-preview/iotcentral.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 9c0176de50ac..ab242347ec75 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 @@ -633,7 +633,7 @@ }, { "properties": { - "instance": { + "component": { "description": "The name of the component being referenced.", "type": "string" }, From d1f4a52e9956e1be0a5e0d3a47103ec7ea30b9e5 Mon Sep 17 00:00:00 2001 From: rafarhat Date: Thu, 24 Oct 2019 14:15:41 -0700 Subject: [PATCH 19/22] Adding getapplication/listpplication calls --- .../examples/application_get.json | 21 +++ .../examples/application_list.json | 28 ++++ .../2019-10-28-preview/iotcentralapps.json | 137 ++++++++++++++++++ specification/iotcentral/data-plane/readme.md | 1 + 4 files changed, 187 insertions(+) create mode 100644 specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/application_get.json create mode 100644 specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/examples/application_list.json create mode 100644 specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/iotcentralapps.json 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/iotcentralapps.json b/specification/iotcentral/data-plane/Microsoft.IoTCentral/preview/2019-10-28-preview/iotcentralapps.json new file mode 100644 index 000000000000..99ecbf28ecbb --- /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", + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/Application" + } + } + }, + "x-ms-examples": { + "Get application": { + "$ref": "./examples/application_get.json" + } + } + + }, + "parameters": [ + { + "in": "path", + "name": "application_id", + "description": "Unique ID of the application.", + "type": "string", + "required": true + } + ] + } + }, + "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 index 710038328bf3..bbda97709416 100644 --- a/specification/iotcentral/data-plane/readme.md +++ b/specification/iotcentral/data-plane/readme.md @@ -32,6 +32,7 @@ These settings apply only when `--tag=package-2019-10-28-preview` is specified o ``` 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 From 725e12bdedce8235a38392982846b5f05e578333 Mon Sep 17 00:00:00 2001 From: rafarhat Date: Thu, 24 Oct 2019 14:50:15 -0700 Subject: [PATCH 20/22] remove conflicting host --- .../preview/2019-10-28-preview/iotcentral.json | 1 - 1 file changed, 1 deletion(-) 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 ab242347ec75..175a9c830d1d 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,7 +5,6 @@ "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": "azureiotcentral.com", "basePath": "/api/preview", "schemes": [ "https" From f206a6c78a17e3bafe451eb709480e65acd5bc6a Mon Sep 17 00:00:00 2001 From: rafarhat Date: Thu, 24 Oct 2019 23:05:54 -0700 Subject: [PATCH 21/22] Testout parameter Change --- .../2019-10-28-preview/iotcentral.json | 36 +++++++++++++------ 1 file changed, 26 insertions(+), 10 deletions(-) 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 175a9c830d1d..69870f70a9a1 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 @@ -677,6 +677,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", @@ -695,6 +704,13 @@ } }, "parameters": [ + { + "in": "path", + "name": "token_id", + "description": "Unique ID for the API token.", + "type": "string", + "required": true + }, { "name": "body", "in": "body", @@ -717,6 +733,15 @@ "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" @@ -727,16 +752,7 @@ "description": "Success" } } - }, - "parameters": [ - { - "in": "path", - "name": "token_id", - "description": "Unique ID for the API token.", - "type": "string", - "required": true - } - ] + } }, "/devices": { "get": { From f338b5d08a0d0801750823862082dc996343e53b Mon Sep 17 00:00:00 2001 From: rafarhat Date: Thu, 24 Oct 2019 23:21:16 -0700 Subject: [PATCH 22/22] inline common parameters to methods to pass pipeline tooling swagger parsing bug --- .../2019-10-28-preview/iotcentral.json | 269 +++++++++++------- .../2019-10-28-preview/iotcentralapps.json | 20 +- 2 files changed, 174 insertions(+), 115 deletions(-) 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 69870f70a9a1..b0d5c37600a5 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 @@ -781,6 +781,12 @@ "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" @@ -805,6 +811,9 @@ } }, "parameters": [ + { + "$ref": "#/parameters/DeviceId" + }, { "name": "body", "in": "body", @@ -828,6 +837,11 @@ "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" @@ -838,12 +852,7 @@ "description": "Success" } } - }, - "parameters": [ - { - "$ref": "#/parameters/DeviceId" - } - ] + } }, "/continuousDataExports":{ "get":{ @@ -871,6 +880,15 @@ "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" @@ -894,6 +912,13 @@ } }, "parameters":[ + { + "in":"path", + "name":"export_id", + "description":"Unique ID for the continuous data export.", + "type":"string", + "required":true + }, { "name":"body", "in":"body", @@ -916,6 +941,15 @@ "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" @@ -926,16 +960,7 @@ "description":"Success" } } - }, - "parameters":[ - { - "in":"path", - "name":"export_id", - "description":"Unique ID for the continuous data export.", - "type":"string", - "required":true - } - ] + } }, "/deviceTemplates": { "get": { @@ -963,6 +988,11 @@ "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" @@ -981,6 +1011,11 @@ "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" @@ -1001,6 +1036,9 @@ } }, "parameters": [ + { + "$ref": "#/parameters/DeviceTemplateId" + }, { "name": "body", "in": "body", @@ -1019,17 +1057,17 @@ } } } - }, - "parameters": [ - { - "$ref": "#/parameters/DeviceTemplateId" - } - ] + } }, "/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" @@ -1043,17 +1081,17 @@ } } } - }, - "parameters": [ - { - "$ref": "#/parameters/DeviceTemplateId" - } - ] + } }, "/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" @@ -1070,12 +1108,7 @@ "x-ms-pageable": { "nextLinkName": "nextLink" } - }, - "parameters": [ - { - "$ref": "#/parameters/DeviceTemplateId" - } - ] + } }, "/roles": { "get": { @@ -1103,6 +1136,15 @@ "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" @@ -1116,22 +1158,18 @@ } } } - }, - "parameters": [ - { - "in": "path", - "name": "role_id", - "description": "Unique ID for the role.", - "type": "string", - "required": true - } - ] + } }, "/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" @@ -1156,6 +1194,9 @@ } }, "parameters": [ + { + "$ref": "#/parameters/DeviceId" + }, { "name": "body", "in": "body", @@ -1174,17 +1215,28 @@ } } } - }, - "parameters": [ - { - "$ref": "#/parameters/DeviceId" - } - ] + } }, "/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" @@ -1212,6 +1264,20 @@ } }, "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", @@ -1230,29 +1296,18 @@ } } } - }, - "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 - } - ] + } }, "/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" @@ -1277,6 +1332,9 @@ } }, "parameters": [ + { + "$ref": "#/parameters/DeviceId" + }, { "name": "body", "in": "body", @@ -1295,17 +1353,20 @@ } } } - }, - "parameters": [ - { - "$ref": "#/parameters/DeviceId" - } - ] + } }, "/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" @@ -1329,6 +1390,12 @@ } }, "parameters": [ + { + "$ref": "#/parameters/DeviceId" + }, + { + "$ref": "#/parameters/ComponentName" + }, { "name": "body", "in": "body", @@ -1347,20 +1414,17 @@ } } } - }, - "parameters": [ - { - "$ref": "#/parameters/DeviceId" - }, - { - "$ref": "#/parameters/ComponentName" - } - ] + } }, "/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" @@ -1374,17 +1438,28 @@ } } } - }, - "parameters": [ - { - "$ref": "#/parameters/DeviceId" - } - ] + } }, "/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" @@ -1398,23 +1473,7 @@ } } } - }, - "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 - } - ] + } } }, "parameters": { 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 99ecbf28ecbb..9c75c69e2873 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 @@ -87,6 +87,15 @@ "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", @@ -101,16 +110,7 @@ } } - }, - "parameters": [ - { - "in": "path", - "name": "application_id", - "description": "Unique ID of the application.", - "type": "string", - "required": true - } - ] + } } }, "parameters": {