From 722f2748cd19da7f883f6c572be958916b15a7bf Mon Sep 17 00:00:00 2001 From: timtay-microsoft Date: Mon, 5 Oct 2020 11:05:56 -0700 Subject: [PATCH 1/2] Remove local copy of digital twins preview swagger --- .../2020-05-31-preview/digitaltwins.json | 1497 ----------------- .../CreateRelationshipAdvancedExample.json | 25 - .../CreateRelationshipBasicExample.json | 21 - .../examples/DeleteModel.json | 9 - .../examples/DeleteRelationship.json | 10 - .../examples/DeleteTwin.json | 9 - .../examples/EventRouteDelete.json | 9 - .../examples/EventRouteGet.json | 15 - .../examples/EventRoutePut.json | 13 - .../examples/EventRoutePutWithFilter.json | 13 - .../examples/EventRoutesList.json | 24 - .../examples/GetComponent.json | 53 - .../examples/GetIncomingRelationship.json | 27 - .../examples/GetRelationship.json | 29 - .../examples/GetRelationshipById.json | 18 - .../GetRelationshipByRelationshipName.json | 30 - .../2020-05-31-preview/examples/GetTwin.json | 53 - .../2020-05-31-preview/examples/ModelAdd.json | 47 - .../examples/ModelGetById.json | 15 - ...odelGetByIdWithIncludeModelDefinition.json | 41 - .../examples/ModelUpdateDecommissioned.json | 16 - .../examples/ModelsGet.json | 35 - ...DependenciesAndIncludeModelDefinition.json | 70 - .../PatchComponentAdvancedExample.json | 27 - .../examples/PatchComponentBasicExample.json | 18 - .../PatchRelationshipAdvancedExample.json | 26 - .../PatchRelationshipBasicExample.json | 17 - .../examples/PatchTwinAdvancedExample.json | 26 - .../examples/PatchTwinBasicExample.json | 17 - .../examples/PutTwinAdvancedExample.json | 71 - .../examples/PutTwinBasicExample.json | 22 - .../examples/QueryFirstPage.json | 44 - .../examples/QueryJoin.json | 56 - .../examples/QueryNextPage.json | 43 - .../examples/SendTelemetry.json | 14 - .../examples/SendTelemetryFromComponent.json | 15 - 36 files changed, 2475 deletions(-) delete mode 100644 sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/digitaltwins.json delete mode 100644 sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/CreateRelationshipAdvancedExample.json delete mode 100644 sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/CreateRelationshipBasicExample.json delete mode 100644 sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/DeleteModel.json delete mode 100644 sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/DeleteRelationship.json delete mode 100644 sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/DeleteTwin.json delete mode 100644 sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/EventRouteDelete.json delete mode 100644 sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/EventRouteGet.json delete mode 100644 sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/EventRoutePut.json delete mode 100644 sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/EventRoutePutWithFilter.json delete mode 100644 sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/EventRoutesList.json delete mode 100644 sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/GetComponent.json delete mode 100644 sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/GetIncomingRelationship.json delete mode 100644 sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/GetRelationship.json delete mode 100644 sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/GetRelationshipById.json delete mode 100644 sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/GetRelationshipByRelationshipName.json delete mode 100644 sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/GetTwin.json delete mode 100644 sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/ModelAdd.json delete mode 100644 sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/ModelGetById.json delete mode 100644 sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/ModelGetByIdWithIncludeModelDefinition.json delete mode 100644 sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/ModelUpdateDecommissioned.json delete mode 100644 sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/ModelsGet.json delete mode 100644 sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/ModelsGetWithDependenciesAndIncludeModelDefinition.json delete mode 100644 sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/PatchComponentAdvancedExample.json delete mode 100644 sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/PatchComponentBasicExample.json delete mode 100644 sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/PatchRelationshipAdvancedExample.json delete mode 100644 sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/PatchRelationshipBasicExample.json delete mode 100644 sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/PatchTwinAdvancedExample.json delete mode 100644 sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/PatchTwinBasicExample.json delete mode 100644 sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/PutTwinAdvancedExample.json delete mode 100644 sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/PutTwinBasicExample.json delete mode 100644 sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/QueryFirstPage.json delete mode 100644 sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/QueryJoin.json delete mode 100644 sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/QueryNextPage.json delete mode 100644 sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/SendTelemetry.json delete mode 100644 sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/SendTelemetryFromComponent.json diff --git a/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/digitaltwins.json b/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/digitaltwins.json deleted file mode 100644 index fe035fde82aa..000000000000 --- a/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/digitaltwins.json +++ /dev/null @@ -1,1497 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "version": "2020-05-31-preview", - "title": "Azure Digital Twins API", - "description": "A service for managing and querying digital twins and digital twin models." - }, - "host": "digitaltwins-name.digitaltwins.azure.net", - "schemes": [ - "https" - ], - "produces": [ - "application/json" - ], - "consumes": [ - "application/json" - ], - "paths": { - "/models": { - "post": { - "tags": [ - "Models" - ], - "description": "Uploads one or more models. When any error occurs, no models are uploaded.\nStatus codes:\n200 (OK): Success.\n400 (Bad Request): The request is invalid.\n409 (Conflict): One or more of the provided models already exist.", - "operationId": "DigitalTwinModels_Add", - "x-ms-examples": { - "ModelAdd": { - "$ref": "./examples/ModelAdd.json" - } - }, - "parameters": [ - { - "name": "models", - "in": "body", - "description": "An array of models to add.", - "required": false, - "schema": { - "type": "array", - "minItems": 1, - "uniqueItems": true, - "items": { - "type": "object" - } - } - }, - { - "$ref": "#/parameters/api-version" - } - ], - "responses": { - "201": { - "description": "Success", - "schema": { - "$ref": "#/definitions/NonPagedModelDataCollection" - } - }, - "default": { - "description": "Default response.", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - } - }, - "get": { - "tags": [ - "Models" - ], - "description": "Retrieves model metadata and, optionally, model definitions.\nStatus codes:\n200 (OK): Success.\n400 (Bad Request): The request is invalid.", - "x-ms-pageable": { - "nextLinkName": "nextLink" - }, - "operationId": "DigitalTwinModels_List", - "x-ms-examples": { - "ModelsGet": { - "$ref": "./examples/ModelsGet.json" - }, - "ModelsGetWithContextAndIncludeModelDefinition": { - "$ref": "./examples/ModelsGetWithDependenciesAndIncludeModelDefinition.json" - } - }, - "parameters": [ - { - "name": "dependenciesFor", - "in": "query", - "description": "The set of the models which will have their dependencies retrieved. If omitted, all models are retrieved.", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { - "type": "string" - } - }, - { - "$ref": "#/parameters/includeModelDefinition" - }, - { - "$ref": "#/parameters/max-item-count" - }, - { - "$ref": "#/parameters/api-version" - } - ], - "responses": { - "200": { - "description": "Success", - "schema": { - "$ref": "#/definitions/PagedModelDataCollection" - } - }, - "default": { - "description": "Default response.", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - } - } - }, - "/models/{id}": { - "get": { - "tags": [ - "Models" - ], - "description": "Retrieves model metadata and optionally the model definition.\nStatus codes:\n200 (OK): Success.\n404 (Not Found): There is no model with the provided id.", - "operationId": "DigitalTwinModels_GetById", - "x-ms-examples": { - "ModelGetById": { - "$ref": "./examples/ModelGetById.json" - }, - "ModelGetByIdWithIncludeModelDefinition": { - "$ref": "./examples/ModelGetByIdWithIncludeModelDefinition.json" - } - }, - "parameters": [ - { - "$ref": "#/parameters/modelId" - }, - { - "$ref": "#/parameters/includeModelDefinition" - }, - { - "$ref": "#/parameters/api-version" - } - ], - "responses": { - "200": { - "description": "Success", - "schema": { - "$ref": "#/definitions/ModelData" - } - }, - "default": { - "description": "Default response.", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - } - }, - "patch": { - "tags": [ - "Models" - ], - "description": "Updates the metadata for a model.\nStatus codes:\n200 (OK): Success.\n400 (Bad Request): The request is invalid.\n404 (Not Found): There is no model with the provided id.", - "operationId": "DigitalTwinModels_Update", - "consumes": [ - "application/json-patch+json" - ], - "x-ms-examples": { - "ModelUpdateDecommissioned": { - "$ref": "./examples/ModelUpdateDecommissioned.json" - } - }, - "parameters": [ - { - "$ref": "#/parameters/modelId" - }, - { - "name": "updateModel", - "description": "An update specification described by JSON Patch. Only the decommissioned property can be replaced.", - "in": "body", - "required": true, - "schema": { - "type": "array", - "items": { - "type": "object" - } - } - }, - { - "$ref": "#/parameters/api-version" - } - ], - "responses": { - "204": { - "description": "Success" - }, - "default": { - "description": "Default response.", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - } - }, - "delete": { - "tags": [ - "Models" - ], - "operationId": "DigitalTwinModels_Delete", - "description": "Deletes a model. A model can only be deleted if no other models reference it.\nStatus codes:\n204 (No Content): Success.\n400 (Bad Request): The request is invalid.\n404 (Not Found): There is no model with the provided id.\n409 (Conflict): There are dependencies on the model that prevent it from being deleted.", - "x-ms-examples": { - "DeleteModel": { - "$ref": "./examples/DeleteModel.json" - } - }, - "parameters": [ - { - "$ref": "#/parameters/modelId" - }, - { - "$ref": "#/parameters/api-version" - } - ], - "responses": { - "204": { - "description": "Success" - }, - "default": { - "description": "Default response.", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - } - } - }, - "/query": { - "post": { - "tags": [ - "Query" - ], - "operationId": "Query_QueryTwins", - "description": "Executes a query that allows traversing relationships and filtering by property values.\nStatus codes:\n200 (OK): Success.\n400 (Bad Request): The request is invalid.", - "x-ms-examples": { - "QueryFirstPage": { - "$ref": "./examples/QueryFirstPage.json" - }, - "QueryNextPage": { - "$ref": "./examples/QueryNextPage.json" - }, - "QueryJoin": { - "$ref": "./examples/QueryJoin.json" - } - }, - "parameters": [ - { - "name": "querySpecification", - "in": "body", - "description": "The query specification to execute.", - "required": true, - "schema": { - "$ref": "#/definitions/QuerySpecification" - } - }, - { - "$ref": "#/parameters/api-version" - } - ], - "responses": { - "200": { - "description": "Success", - "schema": { - "$ref": "#/definitions/QueryResult" - }, - "headers": { - "query-charge": { - "description": "The query charge.", - "type": "number" - } - } - }, - "default": { - "description": "Default response.", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - } - } - }, - "/digitaltwins/{id}": { - "get": { - "tags": [ - "Twins" - ], - "operationId": "DigitalTwins_GetById", - "description": "Retrieves a digital twin.\nStatus codes:\n200 (OK): Success.\n404 (Not Found): There is no digital twin with the provided id.", - "x-ms-examples": { - "GetTwin": { - "$ref": "./examples/GetTwin.json" - } - }, - "parameters": [ - { - "$ref": "#/parameters/digitalTwinId" - }, - { - "$ref": "#/parameters/api-version" - } - ], - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "object" - }, - "headers": { - "ETag": { - "description": "Weak Etag.", - "type": "string" - } - } - }, - "default": { - "description": "Default response.", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - } - }, - "put": { - "tags": [ - "Twins" - ], - "operationId": "DigitalTwins_Add", - "description": "Adds or replaces a digital twin.\nStatus codes:\n200 (OK): Success.\n400 (Bad Request): The request is invalid.\n412 (Precondition Failed): The model is decommissioned or the digital twin already exists (when using If-None-Match: *).", - "x-ms-examples": { - "PutTwinBasicExample": { - "$ref": "./examples/PutTwinBasicExample.json" - }, - "PutTwinAdvancedExample": { - "$ref": "./examples/PutTwinAdvancedExample.json" - } - }, - "parameters": [ - { - "$ref": "#/parameters/digitalTwinId" - }, - { - "name": "twin", - "description": "The digital twin instance being added. If provided, the $dtId property is ignored.", - "in": "body", - "required": true, - "schema": { - "type": "object" - } - }, - { - "$ref": "#/parameters/if-none-match-star" - }, - { - "$ref": "#/parameters/api-version" - } - ], - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "object" - }, - "headers": { - "ETag": { - "description": "Weak Etag.", - "type": "string" - } - } - }, - "202": { - "description": "Asynchronous Success" - }, - "default": { - "description": "Default response.", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - } - }, - "delete": { - "tags": [ - "Twins" - ], - "operationId": "DigitalTwins_Delete", - "description": "Deletes a digital twin. All relationships referencing the digital twin must already be deleted.\nStatus codes:\n200 (OK): Success.\n400 (Bad Request): The request is invalid.\n404 (Not Found): There is no digital twin with the provided id.", - "x-ms-examples": { - "DeleteTwin": { - "$ref": "./examples/DeleteTwin.json" - } - }, - "parameters": [ - { - "$ref": "#/parameters/digitalTwinId" - }, - { - "$ref": "#/parameters/if-match" - }, - { - "$ref": "#/parameters/api-version" - } - ], - "responses": { - "204": { - "description": "Success" - }, - "default": { - "description": "Default response.", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - } - }, - "patch": { - "tags": [ - "Twins" - ], - "operationId": "DigitalTwins_Update", - "description": "Updates a digital twin.\nStatus codes:\n200 (OK): Success.\n400 (Bad Request): The request is invalid.\n404 (Not Found): There is no digital twin with the provided id.", - "consumes": [ - "application/json-patch+json" - ], - "x-ms-examples": { - "PatchTwinBasicExample": { - "$ref": "./examples/PatchTwinBasicExample.json" - }, - "PatchTwinAdvancedExample": { - "$ref": "./examples/PatchTwinAdvancedExample.json" - } - }, - "parameters": [ - { - "$ref": "#/parameters/digitalTwinId" - }, - { - "name": "patchDocument", - "description": "An update specification described by JSON Patch. Updates to property values and $model elements may happen in the same request. Operations are limited to add, replace and remove.", - "in": "body", - "required": true, - "schema": { - "type": "array", - "items": { - "type": "object" - } - } - }, - { - "$ref": "#/parameters/if-match" - }, - { - "$ref": "#/parameters/api-version" - } - ], - "responses": { - "204": { - "description": "Success", - "headers": { - "ETag": { - "description": "Weak Etag.", - "type": "string" - } - } - }, - "202": { - "description": "Asynchronous Success" - }, - "default": { - "description": "Default response.", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - } - } - }, - "/digitaltwins/{id}/relationships/{relationshipId}": { - "get": { - "tags": [ - "Twins" - ], - "operationId": "DigitalTwins_GetRelationshipById", - "description": "Retrieves a relationship between two digital twins.\nStatus codes:\n200 (OK): Success.\n404 (Not Found): There is either no digital twin or relationship with the provided id.", - "x-ms-examples": { - "GetRelationshipById": { - "$ref": "./examples/GetRelationshipById.json" - } - }, - "parameters": [ - { - "$ref": "#/parameters/digitalTwinId" - }, - { - "$ref": "#/parameters/relationshipId" - }, - { - "$ref": "#/parameters/api-version" - } - ], - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "object" - }, - "headers": { - "ETag": { - "description": "Weak Etag.", - "type": "string" - } - } - }, - "default": { - "description": "Default response.", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - } - }, - "put": { - "tags": [ - "Twins" - ], - "operationId": "DigitalTwins_AddRelationship", - "description": "Adds a relationship between two digital twins.\nStatus codes:\n200 (OK): Success.\n400 (Bad Request): The request is invalid.\n404 (Not Found): There is either no digital twin, target digital twin, or relationship with the provided id.\n409 (Conflict): A relationship with the provided id already exists.", - "x-ms-examples": { - "CreateRelationshipBasicExample": { - "$ref": "./examples/CreateRelationshipBasicExample.json" - }, - "CreateRelationshipAdvancedExample": { - "$ref": "./examples/CreateRelationshipAdvancedExample.json" - } - }, - "parameters": [ - { - "$ref": "#/parameters/digitalTwinId" - }, - { - "$ref": "#/parameters/relationshipId" - }, - { - "name": "relationship", - "in": "body", - "description": "The data for the relationship.", - "required": false, - "schema": { - "type": "object" - } - }, - { - "$ref": "#/parameters/if-none-match-star" - }, - { - "$ref": "#/parameters/api-version" - } - ], - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "object" - }, - "headers": { - "ETag": { - "description": "Weak Etag.", - "type": "string" - } - } - }, - "default": { - "description": "Default response.", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - } - }, - "delete": { - "tags": [ - "Twins" - ], - "operationId": "DigitalTwins_DeleteRelationship", - "description": "Deletes a relationship between two digital twins.\nStatus codes:\n200 (OK): Success.\n404 (Not Found): There is either no digital twin or relationship with the provided id.", - "x-ms-examples": { - "DeleteRelationship": { - "$ref": "./examples/DeleteRelationship.json" - } - }, - "parameters": [ - { - "$ref": "#/parameters/digitalTwinId" - }, - { - "$ref": "#/parameters/relationshipId" - }, - { - "$ref": "#/parameters/if-match" - }, - { - "$ref": "#/parameters/api-version" - } - ], - "responses": { - "204": { - "description": "Success" - }, - "default": { - "description": "Default response.", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - } - }, - "patch": { - "tags": [ - "Twins" - ], - "consumes": [ - "application/json-patch+json" - ], - "operationId": "DigitalTwins_UpdateRelationship", - "description": "Updates the properties on a relationship between two digital twins.\nStatus codes:\n200 (OK): Success.\n400 (Bad Request): The request is invalid.\n404 (Not Found): There is either no digital twin or relationship with the provided id.", - "x-ms-examples": { - "PatchRelationshipBasicExample": { - "$ref": "./examples/PatchRelationshipBasicExample.json" - }, - "PatchRelationshipAdvancedExample": { - "$ref": "./examples/PatchRelationshipAdvancedExample.json" - } - }, - "parameters": [ - { - "$ref": "#/parameters/digitalTwinId" - }, - { - "$ref": "#/parameters/relationshipId" - }, - { - "name": "patchDocument", - "description": "JSON Patch description of the update to the relationship properties.", - "in": "body", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "object" - } - } - }, - { - "$ref": "#/parameters/if-match" - }, - { - "$ref": "#/parameters/api-version" - } - ], - "responses": { - "204": { - "description": "Success", - "headers": { - "ETag": { - "description": "Weak Etag.", - "type": "string" - } - } - }, - "default": { - "description": "Default response.", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - } - } - }, - "/digitaltwins/{id}/relationships": { - "get": { - "tags": [ - "Twins" - ], - "operationId": "DigitalTwins_ListRelationships", - "description": "Retrieves the relationships from a digital twin.\nStatus codes:\n200 (OK): Success.\n400 (Bad Request): The request is invalid.\n404 (Not Found): There is no digital twin with the provided id.", - "x-ms-pageable": { - "nextLinkName": "nextLink" - }, - "x-ms-examples": { - "GetRelationship": { - "$ref": "./examples/GetRelationship.json" - }, - "GetRelationshipByName": { - "$ref": "./examples/GetRelationshipByRelationshipName.json" - } - }, - "parameters": [ - { - "$ref": "#/parameters/digitalTwinId" - }, - { - "name": "relationshipName", - "description": "The name of the relationship.", - "in": "query", - "required": false, - "type": "string" - }, - { - "$ref": "#/parameters/api-version" - } - ], - "responses": { - "200": { - "description": "Success", - "schema": { - "$ref": "#/definitions/RelationshipCollection" - } - }, - "default": { - "description": "Default response.", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - } - } - }, - "/digitaltwins/{id}/incomingrelationships": { - "get": { - "tags": [ - "Twins" - ], - "operationId": "DigitalTwins_ListIncomingRelationships", - "description": "Retrieves all incoming relationship for a digital twin.\nStatus codes:\n200 (OK): Success.\n400 (Bad Request): The request is invalid.\n404 (Not Found): There is no digital twin with the provided id.", - "x-ms-pageable": { - "nextLinkName": "nextLink" - }, - "x-ms-examples": { - "GetIncomingRelationship": { - "$ref": "./examples/GetIncomingRelationship.json" - } - }, - "parameters": [ - { - "$ref": "#/parameters/digitalTwinId" - }, - { - "$ref": "#/parameters/api-version" - } - ], - "responses": { - "200": { - "description": "Success", - "schema": { - "$ref": "#/definitions/IncomingRelationshipCollection" - } - }, - "default": { - "description": "Default response.", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - } - } - }, - "/digitaltwins/{id}/telemetry": { - "post": { - "tags": [ - "Twins" - ], - "operationId": "DigitalTwins_SendTelemetry", - "description": "Sends telemetry on behalf of a digital twin.\nStatus codes:\n200 (OK): Success.\n400 (Bad Request): The request is invalid.\n404 (Not Found): There is no digital twin with the provided id.", - "x-ms-examples": { - "SendTelemetry": { - "$ref": "./examples/SendTelemetry.json" - } - }, - "parameters": [ - { - "$ref": "#/parameters/digitalTwinId" - }, - { - "name": "telemetry", - "in": "body", - "description": "The telemetry measurements to send from the digital twin.", - "required": true, - "schema": { - "type": "object" - } - }, - { - "name": "dt-id", - "in": "header", - "description": "A unique message identifier (in the scope of the digital twin id) that is commonly used for de-duplicating messages.", - "required": true, - "type": "string" - }, - { - "name": "dt-timestamp", - "in": "header", - "description": "An RFC 3339 timestamp that identifies the time the telemetry was measured.", - "required": false, - "type": "string" - }, - { - "$ref": "#/parameters/api-version" - } - ], - "responses": { - "204": { - "description": "Success" - }, - "default": { - "description": "Default response.", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - } - } - }, - "/digitaltwins/{id}/components/{componentPath}/telemetry": { - "post": { - "tags": [ - "Twins" - ], - "operationId": "DigitalTwins_SendComponentTelemetry", - "description": "Sends telemetry on behalf of a component in a digital twin.\nStatus codes:\n200 (OK): Success.\n400 (Bad Request): The request is invalid.\n404 (Not Found): There is either no digital twin with the provided id or the component path is invalid.", - "x-ms-examples": { - "SendTelemetry": { - "$ref": "./examples/SendTelemetryFromComponent.json" - } - }, - "parameters": [ - { - "$ref": "#/parameters/digitalTwinId" - }, - { - "$ref": "#/parameters/componentPath" - }, - { - "name": "telemetry", - "in": "body", - "description": "The telemetry measurements to send from the digital twin's component.", - "required": true, - "schema": { - "type": "object" - } - }, - { - "name": "dt-id", - "in": "header", - "description": "A unique message identifier (in the scope of the digital twin id) that is commonly used for de-duplicating messages.", - "required": true, - "type": "string" - }, - { - "name": "dt-timestamp", - "in": "header", - "description": "An RFC 3339 timestamp that identifies the time the telemetry was measured.", - "required": false, - "type": "string" - }, - { - "$ref": "#/parameters/api-version" - } - ], - "responses": { - "204": { - "description": "Success" - }, - "default": { - "description": "Default response.", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - } - } - }, - "/digitaltwins/{id}/components/{componentPath}": { - "get": { - "tags": [ - "Twins" - ], - "operationId": "DigitalTwins_GetComponent", - "description": "Retrieves a component from a digital twin.\nStatus codes:\n200 (OK): Success.\n404 (Not Found): There is either no digital twin with the provided id or the component path is invalid.", - "x-ms-examples": { - "GetComponent": { - "$ref": "./examples/GetComponent.json" - } - }, - "parameters": [ - { - "$ref": "#/parameters/digitalTwinId" - }, - { - "$ref": "#/parameters/componentPath" - }, - { - "$ref": "#/parameters/api-version" - } - ], - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "object" - }, - "headers": { - "ETag": { - "description": "Weak Etag.", - "type": "string" - } - } - }, - "default": { - "description": "Default response.", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - } - }, - "patch": { - "tags": [ - "Twins" - ], - "operationId": "DigitalTwins_UpdateComponent", - "description": "Updates a component on a digital twin.\nStatus codes:\n200 (OK): Success.\n400 (Bad Request): The request is invalid.\n404 (Not Found): There is either no digital twin with the provided id or the component path is invalid.", - "x-ms-examples": { - "PatchComponentBasicExample": { - "$ref": "./examples/PatchComponentBasicExample.json" - }, - "PatchComponentAdvancedExample": { - "$ref": "./examples/PatchComponentAdvancedExample.json" - } - }, - "consumes": [ - "application/json-patch+json" - ], - "parameters": [ - { - "$ref": "#/parameters/digitalTwinId" - }, - { - "$ref": "#/parameters/componentPath" - }, - { - "name": "patchDocument", - "description": "An update specification described by JSON Patch. Updates to property values and $model elements may happen in the same request. Operations are limited to add, replace and remove.", - "in": "body", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "object" - } - } - }, - { - "$ref": "#/parameters/if-match" - }, - { - "$ref": "#/parameters/api-version" - } - ], - "responses": { - "204": { - "description": "Success", - "headers": { - "ETag": { - "description": "Weak Etag.", - "type": "string" - } - } - }, - "202": { - "description": "Asynchronous Success" - }, - "default": { - "description": "Default response.", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - } - } - }, - "/eventroutes": { - "get": { - "tags": [ - "EventRoutes" - ], - "description": "Retrieves all event routes.\nStatus codes:\n200 (OK): Success.\n400 (Bad Request): The request is invalid.", - "operationId": "EventRoutes_List", - "x-ms-examples": { - "EventRoutesList": { - "$ref": "./examples/EventRoutesList.json" - } - }, - "parameters": [ - { - "$ref": "#/parameters/max-item-count" - }, - { - "$ref": "#/parameters/api-version" - } - ], - "responses": { - "200": { - "description": "Success", - "schema": { - "$ref": "#/definitions/EventRouteCollection" - } - }, - "default": { - "description": "Default response.", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - }, - "x-ms-pageable": { - "nextLinkName": "nextLink" - } - } - }, - "/eventroutes/{id}": { - "get": { - "tags": [ - "EventRoutes" - ], - "description": "Retrieves an event route.\nStatus codes:\n200 (OK): Success.\n404 (Not Found): There is no event route with the provided id.", - "operationId": "EventRoutes_GetById", - "x-ms-examples": { - "EventRouteGet": { - "$ref": "./examples/EventRouteGet.json" - } - }, - "parameters": [ - { - "$ref": "#/parameters/eventRouteId" - }, - { - "$ref": "#/parameters/api-version" - } - ], - "responses": { - "200": { - "description": "Success", - "schema": { - "$ref": "#/definitions/EventRoute" - } - }, - "default": { - "description": "Default response.", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - } - }, - "put": { - "tags": [ - "EventRoutes" - ], - "description": "Adds or replaces an event route.\nStatus codes:\n200 (OK): Success.\n400 (Bad Request): The request is invalid.", - "operationId": "EventRoutes_Add", - "x-ms-examples": { - "EventRoutePut": { - "$ref": "./examples/EventRoutePut.json" - }, - "EventRouteWithFilter": { - "$ref": "./examples/EventRoutePutWithFilter.json" - } - }, - "parameters": [ - { - "$ref": "#/parameters/eventRouteId" - }, - { - "name": "eventRoute", - "description": "The event route data", - "in": "body", - "schema": { - "$ref": "#/definitions/EventRoute" - } - }, - { - "$ref": "#/parameters/api-version" - } - ], - "responses": { - "204": { - "description": "Success" - }, - "default": { - "description": "Default response.", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - } - }, - "delete": { - "tags": [ - "EventRoutes" - ], - "description": "Deletes an event route.\nStatus codes:\n200 (OK): Success.\n404 (Not Found): There is no event route with the provided id.", - "operationId": "EventRoutes_Delete", - "x-ms-examples": { - "EventRouteDelete": { - "$ref": "./examples/EventRouteDelete.json" - } - }, - "parameters": [ - { - "$ref": "#/parameters/eventRouteId" - }, - { - "$ref": "#/parameters/api-version" - } - ], - "responses": { - "204": { - "description": "Success" - }, - "default": { - "description": "Default response.", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - } - } - } - }, - "definitions": { - "EventRoute": { - "description": "A route which directs notification and telemetry events to an endpoint. Endpoints are a destination outside of Azure Digital Twins such as an EventHub.", - "type": "object", - "required": [ - "endpointName" - ], - "properties": { - "id": { - "description": "The id of the event route.", - "type": "string", - "readOnly": true - }, - "endpointName": { - "description": "The name of the endpoint this event route is bound to.", - "type": "string" - }, - "filter": { - "description": "An expression which describes the events which are routed to the endpoint.", - "type": "string" - } - } - }, - "EventRouteCollection": { - "description": "A collection of EventRoute objects.", - "type": "object", - "properties": { - "value": { - "description": "The EventRoute objects.", - "type": "array", - "items": { - "$ref": "#/definitions/EventRoute" - } - }, - "nextLink": { - "description": "A URI to retrieve the next page of results.", - "type": "string" - } - } - }, - "NonPagedModelDataCollection": { - "description": "A collection of ModelData objects.", - "type": "array", - "items": { - "$ref": "#/definitions/ModelData" - } - }, - "PagedModelDataCollection": { - "description": "A collection of ModelData objects.", - "type": "object", - "properties": { - "value": { - "description": "The ModelData objects.", - "type": "array", - "items": { - "$ref": "#/definitions/ModelData" - } - }, - "nextLink": { - "description": "A URI to retrieve the next page of objects.", - "type": "string" - } - } - }, - "ModelData": { - "description": "A model definition and metadata for that model.", - "required": [ - "id" - ], - "type": "object", - "properties": { - "displayName": { - "description": "A language map that contains the localized display names as specified in the model definition.", - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "description": { - "description": "A language map that contains the localized descriptions as specified in the model definition.", - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "id": { - "description": "The id of the model as specified in the model definition.", - "type": "string" - }, - "uploadTime": { - "description": "The time the model was uploaded to the service.", - "format": "date-time", - "type": "string" - }, - "decommissioned": { - "description": "Indicates if the model is decommissioned. Decommissioned models cannot be referenced by newly created digital twins.", - "type": "boolean", - "default": false - }, - "model": { - "description": "The model definition.", - "type": "object" - } - } - }, - "RelationshipCollection": { - "description": "A collection of relationships which relate digital twins together.", - "type": "object", - "properties": { - "value": { - "description": "The relationship objects.", - "type": "array", - "items": { - "description": "The relationship JSON document.", - "type": "object" - } - }, - "nextLink": { - "description": "A URI to retrieve the next page of objects.", - "type": "string" - } - } - }, - "IncomingRelationshipCollection": { - "description": "A collection of incoming relationships which relate digital twins together.", - "type": "object", - "properties": { - "value": { - "type": "array", - "items": { - "$ref": "#/definitions/IncomingRelationship" - } - }, - "nextLink": { - "type": "string", - "description": "A URI to retrieve the next page of objects." - } - } - }, - "IncomingRelationship": { - "type": "object", - "description": "An incoming relationship.", - "properties": { - "$relationshipId": { - "type": "string", - "description": "A user-provided string representing the id of this relationship, unique in the context of the source digital twin, i.e. sourceId + relationshipId is unique in the context of the service." - }, - "$sourceId": { - "type": "string", - "description": "The id of the source digital twin." - }, - "$relationshipName": { - "type": "string", - "description": "The name of the relationship." - }, - "$relationshipLink": { - "type": "string", - "description": "Link to the relationship, to be used for deletion." - } - } - }, - "QuerySpecification": { - "description": "A query specification containing either a query statement or a continuation token from a previous query result.", - "type": "object", - "properties": { - "query": { - "description": "The query to execute. This value is ignored if a continuation token is provided.", - "type": "string" - }, - "continuationToken": { - "description": "A token which is used to retrieve the next set of results from a previous query.", - "type": "string" - } - } - }, - "QueryResult": { - "description": "The results of a query operation and an optional continuation token.", - "type": "object", - "properties": { - "items": { - "description": "The query results.", - "type": "array", - "items": { - "type": "object" - } - }, - "continuationToken": { - "description": "A token which can be used to construct a new QuerySpecification to retrieve the next set of results.", - "type": "string" - } - } - }, - "ErrorResponse": { - "description": "Error response.", - "properties": { - "error": { - "$ref": "#/definitions/Error", - "description": "The error details." - } - } - }, - "Error": { - "description": "Error definition.", - "properties": { - "code": { - "description": "Service specific error code which serves as the substatus for the HTTP error code.", - "type": "string", - "readOnly": true - }, - "message": { - "description": "A human-readable representation of the error.", - "type": "string", - "readOnly": true - }, - "details": { - "description": "Internal error details.", - "type": "array", - "items": { - "$ref": "#/definitions/Error" - }, - "readOnly": true - }, - "innererror": { - "description": "An object containing more specific information than the current object about the error.", - "$ref": "#/definitions/InnerError" - } - } - }, - "InnerError": { - "description": "A more specific error description than was provided by the containing error.", - "properties": { - "code": { - "description": "A more specific error code than was provided by the containing error.", - "type": "string" - }, - "innererror": { - "description": "An object containing more specific information than the current object about the error.", - "$ref": "#/definitions/InnerError" - } - } - } - }, - "securityDefinitions": { - "oauth2": { - "flow": "implicit", - "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize?resource=0b07f429-9f4b-4714-9392-cc5e8e80c8b0", - "type": "oauth2" - } - }, - "parameters": { - "eventRouteId": { - "name": "id", - "in": "path", - "required": true, - "type": "string", - "description": "The id for an event route. The id is unique within event routes and case sensitive.", - "x-ms-parameter-location": "method" - }, - "includeModelDefinition": { - "name": "includeModelDefinition", - "description": "When true the model definition will be returned as part of the result.", - "in": "query", - "required": false, - "type": "boolean", - "default": false, - "x-ms-parameter-location": "method" - }, - "digitalTwinId": { - "name": "id", - "in": "path", - "description": "The id of the digital twin. The id is unique within the service and case sensitive.", - "type": "string", - "required": true, - "x-ms-parameter-location": "method" - }, - "modelId": { - "name": "id", - "in": "path", - "description": "The id for the model. The id is globally unique and case sensitive.", - "required": true, - "type": "string", - "x-ms-parameter-location": "method" - }, - "relationshipId": { - "name": "relationshipId", - "description": "The id of the relationship. The id is unique within the digital twin and case sensitive.", - "in": "path", - "required": true, - "type": "string", - "x-ms-parameter-location": "method" - }, - "componentPath": { - "name": "componentPath", - "in": "path", - "description": "The name of the DTDL component.", - "type": "string", - "required": true, - "x-ms-parameter-location": "method" - }, - "api-version": { - "name": "api-version", - "in": "query", - "description": "The requested API version.", - "required": true, - "type": "string", - "enum": [ - "2020-05-31-preview" - ] - }, - "max-item-count": { - "name": "x-ms-max-item-count", - "in": "header", - "description": "The maximum number of items to retrieve per request. The server may choose to return less than the requested max.", - "required": false, - "type": "integer", - "default": -1, - "x-ms-client-name": "MaxItemCount", - "x-ms-parameter-location": "method", - "x-ms-parameter-grouping": { - "postfix": "Options" - } - }, - "if-none-match-star": { - "name": "If-None-Match", - "in": "header", - "description": "Only perform the operation if the entity does not already exist.", - "required": false, - "type": "string", - "enum": [ - "*" - ], - "x-ms-parameter-location": "method" - }, - "if-match": { - "name": "If-Match", - "in": "header", - "description": "Only perform the operation if the entity's etag matches one of the etags provided or * is provided.", - "required": false, - "type": "string", - "x-ms-parameter-location": "method" - } - }, - "security": [ - { - "oauth2": [] - } - ] -} diff --git a/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/CreateRelationshipAdvancedExample.json b/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/CreateRelationshipAdvancedExample.json deleted file mode 100644 index 1f6ec28e906c..000000000000 --- a/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/CreateRelationshipAdvancedExample.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "parameters": { - "api-version": "2020-05-31-preview", - "id": "mySourceTwin", - "relationshipId": "myRelationshipId", - "relationship": { - "$targetId": "myTargetTwin", - "$relationshipName": "myRelationship", - "relationshipProperty1": 1, - "relationshipProperty2": "some value" - } - }, - "responses": { - "200": { - "body": { - "$relationshipId": "myRelationshipId", - "$sourceId": "mySourceTwin", - "$targetId": "myTargetTwin", - "$relationshipName": "myRelationship", - "relationshipProperty1": 1, - "relationshipProperty2": "some value" - } - } - } -} diff --git a/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/CreateRelationshipBasicExample.json b/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/CreateRelationshipBasicExample.json deleted file mode 100644 index 5ab5127bfb36..000000000000 --- a/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/CreateRelationshipBasicExample.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "parameters": { - "api-version": "2020-05-31-preview", - "id": "mySourceTwin", - "relationshipId": "myRelationshipId", - "relationship": { - "$targetId": "myTargetTwin", - "$relationshipName": "myRelationship" - } - }, - "responses": { - "200": { - "body": { - "$relationshipId": "myRelationshipId", - "$sourceId": "mySourceTwin", - "$targetId": "myTargetTwin", - "$relationshipName": "myRelationship" - } - } - } -} diff --git a/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/DeleteModel.json b/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/DeleteModel.json deleted file mode 100644 index 4a0428b03fb4..000000000000 --- a/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/DeleteModel.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "parameters": { - "api-version": "2020-05-31-preview", - "id": "dtmi:com:example:Sample;1" - }, - "responses": { - "204": {} - } -} diff --git a/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/DeleteRelationship.json b/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/DeleteRelationship.json deleted file mode 100644 index d9acb6cc90a8..000000000000 --- a/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/DeleteRelationship.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "parameters": { - "api-version": "2020-05-31-preview", - "id": "myTwinId", - "relationshipId": "myRelationshipId" - }, - "responses": { - "204": {} - } -} diff --git a/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/DeleteTwin.json b/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/DeleteTwin.json deleted file mode 100644 index bb55048e32c3..000000000000 --- a/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/DeleteTwin.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "parameters": { - "api-version": "2020-05-31-preview", - "id": "myTwinId" - }, - "responses": { - "204": {} - } -} diff --git a/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/EventRouteDelete.json b/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/EventRouteDelete.json deleted file mode 100644 index 2ca8cfd3f824..000000000000 --- a/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/EventRouteDelete.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "parameters": { - "id": "eventroute-001", - "api-version": "2020-05-31-preview" - }, - "responses": { - "204": {} - } -} diff --git a/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/EventRouteGet.json b/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/EventRouteGet.json deleted file mode 100644 index be0dc040a850..000000000000 --- a/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/EventRouteGet.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "parameters": { - "id": "eventroute-001", - "api-version": "2020-05-31-preview" - }, - "responses": { - "200": { - "body": { - "id": "eventroute-001", - "endpointName": "endpoint-001", - "filter": "type = 'Microsoft.DigitalTwins.Twin.Create'" - } - } - } -} diff --git a/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/EventRoutePut.json b/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/EventRoutePut.json deleted file mode 100644 index b652891c1b31..000000000000 --- a/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/EventRoutePut.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "parameters": { - "id": "eventroute-001", - "eventRoute": { - "endpointName": "endpoint-001", - "filter": "true" - }, - "api-version": "2020-05-31-preview" - }, - "responses": { - "204": {} - } -} diff --git a/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/EventRoutePutWithFilter.json b/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/EventRoutePutWithFilter.json deleted file mode 100644 index 21f265e6ca92..000000000000 --- a/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/EventRoutePutWithFilter.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "parameters": { - "id": "eventroute-001", - "eventRoute": { - "endpointName": "endpoint-001", - "filter": "type = 'Microsoft.DigitalTwins.Twin.Create'" - }, - "api-version": "2020-05-31-preview" - }, - "responses": { - "204": {} - } -} diff --git a/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/EventRoutesList.json b/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/EventRoutesList.json deleted file mode 100644 index 44c31910f394..000000000000 --- a/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/EventRoutesList.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "parameters": { - "api-version": "2020-05-31-preview" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "id": "eventroute-001", - "endpointName": "endpoint-001", - "filter": "type = 'Microsoft.DigitalTwins.Twin.Create'" - }, - { - "id": "eventroute-002", - "endpointName": "endpoint-002", - "filter": "type = 'Microsoft.DigitalTwins.Twin.Create' OR type = 'microsoft.iot.telemetry'" - } - ], - "nextLink": "url-to-next-page" - } - } - } -} diff --git a/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/GetComponent.json b/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/GetComponent.json deleted file mode 100644 index 655246856feb..000000000000 --- a/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/GetComponent.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "parameters": { - "api-version": "2020-05-31-preview", - "id": "myTwinId", - "componentPath": "myComponent" - }, - "responses": { - "200": { - "body": { - "$metadata": { - "$model": "dtmi:com:example:interfaces:interfaceName;1", - "property1": { - "desiredValue": 1, - "desiredVersion": 1, - "ackVersion": 1, - "ackCode": 200, - "ackDescription": "description", - "lastUpdateTime": "2020-05-23T21:44:02Z" - }, - "property2": { - "desiredValue": { - "subProperty1": "some value", - "subProperty2": "some other value" - }, - "desiredVersion": 1, - "ackVersion": 1, - "ackCode": 200, - "ackDescription": "description", - "lastUpdateTime": "2020-05-23T21:44:02Z" - } - }, - "property1": 1, - "property2": { - "subProperty1": "some value", - "subProperty2": "some other value" - }, - "component1": { - "$metadata": { - "$model": "dtmi:com:example:interfaces:subInterfaceName;1", - "componentProperty": { - "desiredValue": "some value", - "desiredVersion": 1, - "ackVersion": 1, - "ackCode": 200, - "ackDescription": "description", - "lastUpdateTime": "2020-05-23T21:44:02Z" - } - } - } - } - } - } -} diff --git a/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/GetIncomingRelationship.json b/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/GetIncomingRelationship.json deleted file mode 100644 index a50ceb94c675..000000000000 --- a/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/GetIncomingRelationship.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "parameters": { - "api-version": "2020-05-31-preview", - "id": "mySourceTwin" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "$sourceId": "mySourceTwin", - "$relationshipId": "firstRelationshipId", - "$relationshipName": "myRelationship", - "$relationshipLink": "/digitaltwins/mySourceTwin/relationships/myRelationship/firstRelationshipId" - }, - { - "$sourceId": "mySourceTwin", - "$relationshipId": "secondRelationshipId", - "$relationshipName": "myRelationship", - "$relationshipLink": "/digitaltwins/mySourceTwin/relationships/myRelationship/secondRelationshipId" - } - ], - "nextLink": "url-to-next-page" - } - } - } -} diff --git a/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/GetRelationship.json b/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/GetRelationship.json deleted file mode 100644 index 259950edf17d..000000000000 --- a/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/GetRelationship.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "parameters": { - "api-version": "2020-05-31-preview", - "id": "mySourceTwin" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "$sourceId": "mySourceTwin", - "$relationshipId": "firstRelationshipId", - "$targetId": "targetTwinId", - "$relationshipName": "myRelationship", - "property": "value" - }, - { - "$sourceId": "mySourceTwin", - "$relationshipId": "secondRelationshipId", - "$targetId": "targetTwinId", - "$relationshipName": "myRelationship", - "property": "value" - } - ], - "nextLink": "url-to-next-page" - } - } - } -} diff --git a/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/GetRelationshipById.json b/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/GetRelationshipById.json deleted file mode 100644 index 28a5a08c9784..000000000000 --- a/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/GetRelationshipById.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "parameters": { - "api-version": "2020-05-31-preview", - "id": "mySourceTwin", - "relationshipId": "myRelationshipId" - }, - "responses": { - "200": { - "body": { - "$relationshipId": "myRelationshipId", - "$sourceId": "mySourceTwin", - "$targetId": "myTargetTwin", - "$relationshipName": "myRelationship", - "relationshipProperty": "some value" - } - } - } -} diff --git a/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/GetRelationshipByRelationshipName.json b/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/GetRelationshipByRelationshipName.json deleted file mode 100644 index 591dc7ae4b71..000000000000 --- a/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/GetRelationshipByRelationshipName.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "parameters": { - "api-version": "2020-05-31-preview", - "id": "mySourceTwin", - "relationshipName": "myRelationship" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "$sourceId": "mySourceTwin", - "$relationshipId": "firstRelationshipId", - "$targetId": "targetTwinId", - "$relationshipName": "myRelationship", - "property": "value" - }, - { - "$sourceId": "mySourceTwin", - "$relationshipId": "secondRelationshipId", - "$targetId": "targetTwinId", - "$relationshipName": "myRelationship", - "property": "value" - } - ], - "nextLink": "url-to-next-page" - } - } - } -} diff --git a/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/GetTwin.json b/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/GetTwin.json deleted file mode 100644 index 7dce0f94a6e8..000000000000 --- a/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/GetTwin.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "parameters": { - "api-version": "2020-05-31-preview", - "id": "myTwinId" - }, - "responses": { - "200": { - "body": { - "$dtId": "myTwinId", - "$metadata": { - "$model": "dtmi:com:example:interfaces:interfaceName;1", - "property1": { - "desiredValue": 1, - "desiredVersion": 1, - "ackVersion": 1, - "ackCode": 200, - "ackDescription": "description", - "lastUpdateTime": "2020-05-23T21:44:02Z" - }, - "property2": { - "desiredValue": { - "subProperty1": "some value", - "subProperty2": "some other value" - }, - "desiredVersion": 1, - "ackVersion": 1, - "ackCode": 200, - "ackDescription": "description", - "lastUpdateTime": "2020-05-23T21:44:02Z" - } - }, - "property1": 1, - "property2": { - "subProperty1": "some value", - "subProperty2": "some other value" - }, - "component1": { - "$metadata": { - "$model": "dtmi:com:example:interfaces:subInterfaceName;1", - "componentProperty": { - "desiredValue": "some value", - "desiredVersion": 1, - "ackVersion": 1, - "ackCode": 200, - "ackDescription": "description", - "lastUpdateTime": "2020-05-23T21:44:02Z" - } - } - } - } - } - } -} diff --git a/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/ModelAdd.json b/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/ModelAdd.json deleted file mode 100644 index b8b2b44eace4..000000000000 --- a/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/ModelAdd.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "parameters": { - "models": [ - { - "@id": "dtmi:com:example:Sample;1", - "@type": "Interface", - "displayName": "Sample Interface", - "contents": [ - { - "@type": "Property", - "name": "name", - "displayName": "Sample instance name", - "schema": "string" - }, - { - "@type": "Property", - "name": "temp", - "displayName": "Sample instance temperature", - "schema": "integer" - }, - { - "@type": "Property", - "name": "comfortIndex", - "displayName": "Sample instance comfort index", - "schema": "integer" - } - ], - "@context": "dtmi:dtdl:context;2" - } - ], - "api-version": "2020-05-31-preview" - }, - "responses": { - "201": { - "body": [ - { - "id": "dtmi:com:example:Sample;1", - "displayName": { - "en": "Sample Interface" - }, - "uploadTime": "2020-03-01T17:32:28Z", - "decommissioned": false - } - ] - } - } -} diff --git a/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/ModelGetById.json b/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/ModelGetById.json deleted file mode 100644 index 6de5d0f71a6e..000000000000 --- a/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/ModelGetById.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "parameters": { - "id": "dtmi:com:example:Sample;1", - "api-version": "2020-05-31-preview" - }, - "responses": { - "200": { - "body": { - "id": "dtmi:com:example:Sample;1", - "uploadTime": "2020-03-01T17:32:28Z", - "decommissioned": false - } - } - } -} diff --git a/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/ModelGetByIdWithIncludeModelDefinition.json b/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/ModelGetByIdWithIncludeModelDefinition.json deleted file mode 100644 index da0330cc5288..000000000000 --- a/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/ModelGetByIdWithIncludeModelDefinition.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "parameters": { - "id": "dtmi:com:example:Sample;1", - "includeModelDefinition": true, - "api-version": "2020-05-31-preview" - }, - "responses": { - "200": { - "body": { - "id": "dtmi:com:example:Sample;1", - "uploadTime": "2020-03-01T17:32:28Z", - "decommissioned": false, - "model": { - "@id": "dtmi:com:example:Sample;1", - "@type": "Interface", - "contents": [ - { - "@type": "Property", - "name": "name", - "displayName": "Sample instance name", - "schema": "string" - }, - { - "@type": "Property", - "name": "temp", - "displayName": "Sample instance temperature", - "schema": "integer" - }, - { - "@type": "Property", - "name": "comfortIndex", - "displayName": "Sample instance comfort index", - "schema": "integer" - } - ], - "@context": "dtmi:dtdl:context;2" - } - } - } - } -} diff --git a/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/ModelUpdateDecommissioned.json b/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/ModelUpdateDecommissioned.json deleted file mode 100644 index 513e272d1f54..000000000000 --- a/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/ModelUpdateDecommissioned.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "parameters": { - "id": "dtmi:com:example:Sample;1", - "updateModel": [ - { - "op": "replace", - "path": "/decommissioned", - "value": true - } - ], - "api-version": "2020-05-31-preview" - }, - "responses": { - "204": {} - } -} diff --git a/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/ModelsGet.json b/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/ModelsGet.json deleted file mode 100644 index e4fd22da2eec..000000000000 --- a/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/ModelsGet.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "parameters": { - "api-version": "2020-05-31-preview" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "id": "dtmi:com:example:Sample;1", - "uploadTime": "2020-03-01T17:32:28Z", - "decommissioned": false - }, - { - "id": "dtmi:com:example:SampleDeviceModel;1", - "displayName": { - "en": "My Device Model" - }, - "uploadTime": "2020-05-01T17:32:28Z", - "decommissioned": false - }, - { - "id": "dtmi:com:example:AnotherSample;1", - "displayName": { - "en": "My Sample" - }, - "uploadTime": "2020-03-01T17:32:28Z", - "decommissioned": false - } - ], - "nextLink": "url-to-next-page" - } - } - } -} diff --git a/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/ModelsGetWithDependenciesAndIncludeModelDefinition.json b/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/ModelsGetWithDependenciesAndIncludeModelDefinition.json deleted file mode 100644 index 72f41ae288cd..000000000000 --- a/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/ModelsGetWithDependenciesAndIncludeModelDefinition.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "parameters": { - "includeModelDefinition": true, - "dependenciesFor": [ - "dtmi:com:example:SampleDeviceModel;1" - ], - "x-ms-max-item-count": 20, - "api-version": "2020-05-31-preview" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "id": "dtmi:com:example:Sample;1", - "uploadTime": "2020-03-01T17:32:28Z", - "decommissioned": false, - "model": { - "@id": "dtmi:com:example:Sample;1", - "@type": "Interface", - "contents": [ - { - "@type": "Property", - "name": "name", - "displayName": "Sample instance name", - "schema": "string" - }, - { - "@type": "Property", - "name": "temp", - "displayName": "Sample instance temperature", - "schema": "integer" - }, - { - "@type": "Property", - "name": "comfortIndex", - "displayName": "Sample instance comfort index", - "schema": "integer" - } - ], - "@context": "dtmi:dtdl:context;2" - } - }, - { - "id": "dtmi:com:example:SampleDeviceModel;1", - "displayName": { - "en": "My Device Model" - }, - "uploadTime": "2020-03-01T17:32:28Z", - "decommissioned": false, - "model": { - "@id": "dtmi:com:example:SampleDeviceModel;1", - "@type": "Interface", - "displayName": "My Device Model", - "contents": [ - { - "@type": "Component", - "name": "Sample", - "schema": "dtmi:com:example:Sample;1" - } - ], - "@context": "dtmi:dtdl:context;2" - } - } - ], - "nextLink": "url-to-next-page" - } - } - } -} diff --git a/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/PatchComponentAdvancedExample.json b/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/PatchComponentAdvancedExample.json deleted file mode 100644 index 195387a5d378..000000000000 --- a/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/PatchComponentAdvancedExample.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "parameters": { - "api-version": "2020-05-31-preview", - "id": "myTwinId", - "componentPath": "myComponent", - "patchDocument": [ - { - "op": "add", - "path": "/property1", - "value": 1 - }, - { - "op": "remove", - "path": "/property2" - }, - { - "op": "replace", - "path": "/property3/subProperty1", - "value": "new value" - } - ] - }, - "responses": { - "202": {}, - "204": {} - } -} diff --git a/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/PatchComponentBasicExample.json b/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/PatchComponentBasicExample.json deleted file mode 100644 index c2a0624b8c35..000000000000 --- a/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/PatchComponentBasicExample.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "parameters": { - "api-version": "2020-05-31-preview", - "id": "myTwinId", - "componentPath": "myComponent", - "patchDocument": [ - { - "op": "add", - "path": "/property", - "value": 1 - } - ] - }, - "responses": { - "202": {}, - "204": {} - } -} diff --git a/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/PatchRelationshipAdvancedExample.json b/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/PatchRelationshipAdvancedExample.json deleted file mode 100644 index 59e611092081..000000000000 --- a/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/PatchRelationshipAdvancedExample.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "parameters": { - "api-version": "2020-05-31-preview", - "id": "myTwinId", - "relationshipId": "myRelationshipId", - "patchDocument": [ - { - "op": "add", - "path": "/property1", - "value": 1 - }, - { - "op": "remove", - "path": "/property2" - }, - { - "op": "replace", - "path": "/property3/subProperty1", - "value": "new value" - } - ] - }, - "responses": { - "204": {} - } -} diff --git a/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/PatchRelationshipBasicExample.json b/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/PatchRelationshipBasicExample.json deleted file mode 100644 index f5294ae496de..000000000000 --- a/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/PatchRelationshipBasicExample.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "parameters": { - "api-version": "2020-05-31-preview", - "id": "myTwinId", - "relationshipId": "myRelationshipId", - "patchDocument": [ - { - "op": "add", - "path": "/property", - "value": 1 - } - ] - }, - "responses": { - "204": {} - } -} diff --git a/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/PatchTwinAdvancedExample.json b/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/PatchTwinAdvancedExample.json deleted file mode 100644 index 3a33baa321bb..000000000000 --- a/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/PatchTwinAdvancedExample.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "parameters": { - "api-version": "2020-05-31-preview", - "id": "myNewTwinId", - "patchDocument": [ - { - "op": "replace", - "path": "/property1", - "value": 1 - }, - { - "op": "add", - "path": "/property2/subProperty1", - "value": 1 - }, - { - "op": "remove", - "path": "/property3" - } - ] - }, - "responses": { - "202": {}, - "204": {} - } -} diff --git a/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/PatchTwinBasicExample.json b/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/PatchTwinBasicExample.json deleted file mode 100644 index 477251dce783..000000000000 --- a/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/PatchTwinBasicExample.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "parameters": { - "api-version": "2020-05-31-preview", - "id": "myNewTwinId", - "patchDocument": [ - { - "op": "replace", - "path": "/property1", - "value": 1 - } - ] - }, - "responses": { - "202": {}, - "204": {} - } -} diff --git a/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/PutTwinAdvancedExample.json b/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/PutTwinAdvancedExample.json deleted file mode 100644 index 7639f575e1dc..000000000000 --- a/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/PutTwinAdvancedExample.json +++ /dev/null @@ -1,71 +0,0 @@ -{ - "parameters": { - "api-version": "2020-05-31-preview", - "id": "myNewTwinId", - "If-None-Match": "*", - "twin": { - "$metadata": { - "$model": "dtmi:com:example:interfaces:interfaceName;1" - }, - "property1": 1, - "property2": { - "subProperty1": "some value", - "subProperty2": "some other value" - }, - "component1": { - "$metadata": { - "$model": "dtmi:com:example:interfaces:subInterfaceName;1" - }, - "componentProperty": "some value" - } - } - }, - "responses": { - "200": { - "body": { - "$dtId": "myNewTwinId", - "$metadata": { - "$model": "dtmi:com:example:interfaces:interfaceName;1", - "property1": { - "desiredValue": 1, - "desiredVersion": 1, - "ackVersion": 1, - "ackCode": 200, - "ackDescription": "description", - "lastUpdateTime": "2020-05-23T21:44:02Z" - }, - "property2": { - "desiredValue": { - "subProperty1": "some value", - "subProperty2": "some other value" - }, - "desiredVersion": 1, - "ackVersion": 1, - "ackCode": 200, - "ackDescription": "description", - "lastUpdateTime": "2020-05-23T21:44:02Z" - } - }, - "property1": 1, - "property2": { - "subProperty1": "some value", - "subProperty2": "some other value" - }, - "component1": { - "$metadata": { - "$model": "dtmi:com:example:interfaces:subInterfaceName;1", - "componentProperty": { - "desiredValue": "some value", - "desiredVersion": 1, - "ackVersion": 1, - "ackCode": 200, - "ackDescription": "description", - "lastUpdateTime": "2020-05-23T21:44:02Z" - } - } - } - } - }, - "202": {} - } -} diff --git a/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/PutTwinBasicExample.json b/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/PutTwinBasicExample.json deleted file mode 100644 index b1ee99c8ecfc..000000000000 --- a/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/PutTwinBasicExample.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "parameters": { - "api-version": "2020-05-31-preview", - "id": "myNewTwinId", - "twin": { - "$metadata": { - "$model": "dtmi:com:example:interfaces:interfaceName;1" - } - } - }, - "responses": { - "200": { - "body": { - "$dtId": "myNewTwinId", - "$metadata": { - "$model": "dtmi:com:example:interfaces:interfaceName;1" - } - } - }, - "202": {} - } -} diff --git a/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/QueryFirstPage.json b/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/QueryFirstPage.json deleted file mode 100644 index fe1106c5608b..000000000000 --- a/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/QueryFirstPage.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "parameters": { - "querySpecification": { - "query": "SELECT * FROM DIGITALTWINS WHERE temp = 79" - }, - "api-version": "2020-05-31-preview" - }, - "responses": { - "200": { - "body": { - "items": [ - { - "$dtId": "Twin-01", - "$metadata": { - "$model": "dtmi:com:example:Sample;1" - }, - "name": "Sample01", - "temp": 79, - "comfortIndex": 50 - }, - { - "$dtId": "Twin-02", - "$metadata": { - "$model": "dtmi:com:example:Sample;1" - }, - "name": "Sample02", - "temp": 79, - "comfortIndex": 50 - }, - { - "$dtId": "Twin-03", - "$metadata": { - "$model": "dtmi:com:example:Sample;1" - }, - "name": "Sample03", - "temp": 79, - "comfortIndex": 50 - } - ], - "continuationToken": "" - } - } - } -} diff --git a/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/QueryJoin.json b/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/QueryJoin.json deleted file mode 100644 index d40910417c06..000000000000 --- a/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/QueryJoin.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "parameters": { - "querySpecification": { - "query": "SELECT Widget, Gadget FROM DIGITALTWINS Widget JOIN Gadget RELATED Widget.Contains WHERE Widget.$dtId = 'Twin-01'" - }, - "api-version": "2020-05-31-preview" - }, - "responses": { - "200": { - "body": { - "items": [ - { - "Widget": { - "$dtId": "Twin-01", - "$metadata": { - "$model": "dtmi:com:example:Sample;1" - }, - "name": "Sample01", - "temp": 79, - "comfortIndex": 50 - }, - "Gadget": { - "$dtId": "Twin-02", - "$metadata": { - "$model": "dtmi:com:example:Sample;1" - }, - "name": "Sample02", - "temp": 79, - "comfortIndex": 50 - } - }, - { - "Widget": { - "$dtId": "Twin-01", - "$metadata": { - "$model": "dtmi:com:example:Sample;1" - }, - "name": "Sample01", - "temp": 79, - "comfortIndex": 50 - }, - "Gadget": { - "$dtId": "Twin-10", - "$metadata": { - "$model": "dtmi:com:example:Sample;1" - }, - "name": "Sample10", - "temp": 79, - "comfortIndex": 50 - } - } - ] - } - } - } -} diff --git a/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/QueryNextPage.json b/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/QueryNextPage.json deleted file mode 100644 index d7ecc8ad39c6..000000000000 --- a/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/QueryNextPage.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "parameters": { - "querySpecification": { - "continuationToken": "" - }, - "api-version": "2020-05-31-preview" - }, - "responses": { - "200": { - "body": { - "items": [ - { - "$dtId": "Twin-04", - "$metadata": { - "$model": "dtmi:com:example:Sample;1" - }, - "name": "Sample04", - "temp": 79, - "comfortIndex": 50 - }, - { - "$dtId": "Twin-05", - "$metadata": { - "$model": "dtmi:com:example:Sample;1" - }, - "name": "Sample05", - "temp": 79, - "comfortIndex": 50 - }, - { - "$dtId": "Twin-06", - "$metadata": { - "$model": "dtmi:com:example:Sample;1" - }, - "name": "Sample06", - "temp": 79, - "comfortIndex": 50 - } - ] - } - } - } -} diff --git a/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/SendTelemetry.json b/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/SendTelemetry.json deleted file mode 100644 index 941a77beffa3..000000000000 --- a/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/SendTelemetry.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "parameters": { - "api-version": "2020-05-31-preview", - "id": "myTwinId", - "dt-id": "e5ca50dd-ca31-4fae-8d84-3af5a72b10c5", - "dt-timestamp": "1985-04-12T23:20:50.52Z", - "telemetry": { - "temperature": 1 - } - }, - "responses": { - "204": {} - } -} diff --git a/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/SendTelemetryFromComponent.json b/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/SendTelemetryFromComponent.json deleted file mode 100644 index dfec5fa53273..000000000000 --- a/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-05-31-preview/examples/SendTelemetryFromComponent.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "parameters": { - "api-version": "2020-05-31-preview", - "id": "myTwinId", - "componentPath": "myComponent", - "dt-id": "e5ca50dd-ca31-4fae-8d84-3af5a72b10c5", - "dt-timestamp": "1985-04-12T23:20:50.52Z", - "telemetry": { - "temperature": 1 - } - }, - "responses": { - "204": {} - } -} From 225e0f5041bf514648315887ccfcfcd0c4357921 Mon Sep 17 00:00:00 2001 From: timtay-microsoft Date: Tue, 22 Sep 2020 14:28:46 -0700 Subject: [PATCH 2/2] Add local copy of digital twins GA swagger --- .../azure-digitaltwins-core/autorest.md | 2 +- .../swagger/2020-10-31/digitaltwins.json | 1583 +++++++++++++++++ .../CreateRelationshipAdvancedExample.json | 26 + .../CreateRelationshipBasicExample.json | 22 + .../2020-10-31/examples/DeleteModel.json | 9 + .../examples/DeleteRelationship.json | 10 + .../2020-10-31/examples/DeleteTwin.json | 9 + .../2020-10-31/examples/EventRouteDelete.json | 9 + .../2020-10-31/examples/EventRouteGet.json | 15 + .../2020-10-31/examples/EventRoutePut.json | 13 + .../examples/EventRoutePutWithFilter.json | 13 + .../2020-10-31/examples/EventRoutesList.json | 24 + .../2020-10-31/examples/GetComponent.json | 52 + .../examples/GetIncomingRelationship.json | 27 + .../2020-10-31/examples/GetRelationship.json | 31 + .../examples/GetRelationshipById.json | 19 + .../GetRelationshipByRelationshipName.json | 32 + .../swagger/2020-10-31/examples/GetTwin.json | 52 + .../swagger/2020-10-31/examples/ModelAdd.json | 47 + .../2020-10-31/examples/ModelGetById.json | 15 + ...odelGetByIdWithIncludeModelDefinition.json | 41 + .../examples/ModelUpdateDecommissioned.json | 16 + .../2020-10-31/examples/ModelsGet.json | 35 + ...DependenciesAndIncludeModelDefinition.json | 70 + .../PatchComponentAdvancedExample.json | 27 + .../examples/PatchComponentBasicExample.json | 18 + .../PatchRelationshipAdvancedExample.json | 26 + .../PatchRelationshipBasicExample.json | 17 + .../examples/PatchTwinAdvancedExample.json | 26 + .../examples/PatchTwinBasicExample.json | 17 + .../examples/PutTwinAdvancedExample.json | 68 + .../examples/PutTwinBasicExample.json | 22 + .../2020-10-31/examples/QueryFirstPage.json | 44 + .../2020-10-31/examples/QueryJoin.json | 56 + .../2020-10-31/examples/QueryNextPage.json | 43 + .../2020-10-31/examples/SendTelemetry.json | 14 + .../examples/SendTelemetryFromComponent.json | 15 + 37 files changed, 2564 insertions(+), 1 deletion(-) create mode 100644 sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/digitaltwins.json create mode 100644 sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/examples/CreateRelationshipAdvancedExample.json create mode 100644 sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/examples/CreateRelationshipBasicExample.json create mode 100644 sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/examples/DeleteModel.json create mode 100644 sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/examples/DeleteRelationship.json create mode 100644 sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/examples/DeleteTwin.json create mode 100644 sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/examples/EventRouteDelete.json create mode 100644 sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/examples/EventRouteGet.json create mode 100644 sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/examples/EventRoutePut.json create mode 100644 sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/examples/EventRoutePutWithFilter.json create mode 100644 sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/examples/EventRoutesList.json create mode 100644 sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/examples/GetComponent.json create mode 100644 sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/examples/GetIncomingRelationship.json create mode 100644 sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/examples/GetRelationship.json create mode 100644 sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/examples/GetRelationshipById.json create mode 100644 sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/examples/GetRelationshipByRelationshipName.json create mode 100644 sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/examples/GetTwin.json create mode 100644 sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/examples/ModelAdd.json create mode 100644 sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/examples/ModelGetById.json create mode 100644 sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/examples/ModelGetByIdWithIncludeModelDefinition.json create mode 100644 sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/examples/ModelUpdateDecommissioned.json create mode 100644 sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/examples/ModelsGet.json create mode 100644 sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/examples/ModelsGetWithDependenciesAndIncludeModelDefinition.json create mode 100644 sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/examples/PatchComponentAdvancedExample.json create mode 100644 sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/examples/PatchComponentBasicExample.json create mode 100644 sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/examples/PatchRelationshipAdvancedExample.json create mode 100644 sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/examples/PatchRelationshipBasicExample.json create mode 100644 sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/examples/PatchTwinAdvancedExample.json create mode 100644 sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/examples/PatchTwinBasicExample.json create mode 100644 sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/examples/PutTwinAdvancedExample.json create mode 100644 sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/examples/PutTwinBasicExample.json create mode 100644 sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/examples/QueryFirstPage.json create mode 100644 sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/examples/QueryJoin.json create mode 100644 sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/examples/QueryNextPage.json create mode 100644 sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/examples/SendTelemetry.json create mode 100644 sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/examples/SendTelemetryFromComponent.json diff --git a/sdk/digitaltwins/azure-digitaltwins-core/autorest.md b/sdk/digitaltwins/azure-digitaltwins-core/autorest.md index 4589fac55965..ba1ef923cc9b 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/autorest.md +++ b/sdk/digitaltwins/azure-digitaltwins-core/autorest.md @@ -20,7 +20,7 @@ Run `generate.ps1` in this directory to generate the code. ``` yaml #When generating from the official specifications repository -input-file: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/digitaltwins/data-plane/Microsoft.DigitalTwins/preview/2020-05-31-preview/digitaltwins.json +input-file: 2020-10-31/digitaltwins.json #When generating from the local copy: #input-file: 2020-05-31-preview/digitaltwins.json diff --git a/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/digitaltwins.json b/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/digitaltwins.json new file mode 100644 index 000000000000..554e6f1603f3 --- /dev/null +++ b/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/digitaltwins.json @@ -0,0 +1,1583 @@ +{ + "swagger": "2.0", + "info": { + "version": "2020-10-31", + "title": "Azure Digital Twins API", + "description": "A service for managing and querying digital twins and digital twin models." + }, + "host": "digitaltwins-name.digitaltwins.azure.net", + "schemes": [ + "https" + ], + "produces": [ + "application/json" + ], + "consumes": [ + "application/json" + ], + "paths": { + "/models": { + "post": { + "tags": [ + "Models" + ], + "description": "Uploads one or more models. When any error occurs, no models are uploaded.\nStatus codes:\n* 201 Created\n* 400 Bad Request\n * DTDLParserError - The models provided are not valid DTDL.\n * InvalidArgument - The model id is invalid.\n * LimitExceeded - The maximum number of model ids allowed in 'dependenciesFor' has been reached.\n * ModelVersionNotSupported - The version of DTDL used is not supported.\n* 409 Conflict\n * ModelAlreadyExists - The model provided already exists.", + "operationId": "DigitalTwinModels_Add", + "x-ms-examples": { + "Add models": { + "$ref": "./examples/ModelAdd.json" + } + }, + "parameters": [ + { + "name": "models", + "in": "body", + "description": "An array of models to add.", + "required": false, + "schema": { + "type": "array", + "minItems": 1, + "uniqueItems": true, + "items": { + "type": "object" + } + } + }, + { + "$ref": "#/parameters/api-version" + }, + { + "$ref": "#/parameters/traceparent" + } + ], + "responses": { + "201": { + "description": "Success", + "schema": { + "$ref": "#/definitions/NonPagedDigitalTwinsModelDataCollection" + } + }, + "default": { + "description": "Default response.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + }, + "get": { + "tags": [ + "Models" + ], + "description": "Retrieves model metadata and, optionally, model definitions.\nStatus codes:\n* 200 OK\n* 400 Bad Request\n * InvalidArgument - The model id is invalid.\n * LimitExceeded - The maximum number of model ids allowed in 'dependenciesFor' has been reached.\n* 404 Not Found\n * ModelNotFound - The model was not found.", + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "operationId": "DigitalTwinModels_List", + "x-ms-examples": { + "List models": { + "$ref": "./examples/ModelsGet.json" + }, + "List models (include dependencies and definitions)": { + "$ref": "./examples/ModelsGetWithDependenciesAndIncludeModelDefinition.json" + } + }, + "parameters": [ + { + "name": "dependenciesFor", + "in": "query", + "description": "The set of the models which will have their dependencies retrieved. If omitted, all models are retrieved.", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + } + }, + { + "$ref": "#/parameters/includeModelDefinition" + }, + { + "$ref": "#/parameters/max-items-per-page" + }, + { + "$ref": "#/parameters/api-version" + }, + { + "$ref": "#/parameters/traceparent" + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/PagedDigitalTwinsModelDataCollection" + } + }, + "default": { + "description": "Default response.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, + "/models/{id}": { + "get": { + "tags": [ + "Models" + ], + "description": "Retrieves model metadata and optionally the model definition.\nStatus codes:\n* 200 OK\n* 400 Bad Request\n * InvalidArgument - The model id is invalid.\n * MissingArgument - The model id was not provided.\n* 404 Not Found\n * ModelNotFound - The model was not found.", + "operationId": "DigitalTwinModels_GetById", + "x-ms-examples": { + "Get a model by id": { + "$ref": "./examples/ModelGetById.json" + }, + "Get a model by id (with definition)": { + "$ref": "./examples/ModelGetByIdWithIncludeModelDefinition.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/modelId" + }, + { + "$ref": "#/parameters/includeModelDefinition" + }, + { + "$ref": "#/parameters/api-version" + }, + { + "$ref": "#/parameters/traceparent" + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/DigitalTwinsModelData" + } + }, + "default": { + "description": "Default response.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + }, + "patch": { + "tags": [ + "Models" + ], + "description": "Updates the metadata for a model.\nStatus codes:\n* 204 No Content\n* 400 Bad Request\n * InvalidArgument - The model id is invalid.\n * JsonPatchInvalid - The JSON Patch provided is invalid.\n * MissingArgument - The model id was not provided.\n* 404 Not Found\n * ModelNotFound - The model was not found.\n* 409 Conflict\n * ModelReferencesNotDecommissioned - The model refers to models that are not decommissioned.", + "operationId": "DigitalTwinModels_Update", + "consumes": [ + "application/json-patch+json" + ], + "x-ms-examples": { + "Decommission a model": { + "$ref": "./examples/ModelUpdateDecommissioned.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/modelId" + }, + { + "name": "updateModel", + "description": "An update specification described by JSON Patch. Only the decommissioned property can be replaced.", + "in": "body", + "required": true, + "schema": { + "type": "array", + "items": { + "type": "object" + } + } + }, + { + "$ref": "#/parameters/api-version" + }, + { + "$ref": "#/parameters/traceparent" + } + ], + "responses": { + "204": { + "description": "Success" + }, + "default": { + "description": "Default response.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + }, + "delete": { + "tags": [ + "Models" + ], + "operationId": "DigitalTwinModels_Delete", + "description": "Deletes a model. A model can only be deleted if no other models reference it.\nStatus codes:\n* 204 No Content\n* 400 Bad Request\n * InvalidArgument - The model id is invalid.\n * MissingArgument - The model id was not provided.\n* 404 Not Found\n * ModelNotFound - The model was not found.\n* 409 Conflict\n * ModelReferencesNotDeleted - The model refers to models that are not deleted.", + "x-ms-examples": { + "Delete a model": { + "$ref": "./examples/DeleteModel.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/modelId" + }, + { + "$ref": "#/parameters/api-version" + }, + { + "$ref": "#/parameters/traceparent" + } + ], + "responses": { + "204": { + "description": "Success" + }, + "default": { + "description": "Default response.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, + "/query": { + "post": { + "tags": [ + "Query" + ], + "operationId": "Query_QueryTwins", + "description": "Executes a query that allows traversing relationships and filtering by property values.\nStatus codes:\n* 200 OK\n* 400 Bad Request\n * BadRequest - The continuation token is invalid.\n * SqlQueryError - The query contains some errors.\n* 429 Too Many Requests\n * QuotaReachedError - The maximum query rate limit has been reached.", + "x-ms-examples": { + "Query for digital twins": { + "$ref": "./examples/QueryFirstPage.json" + }, + "Retrieve paged query results": { + "$ref": "./examples/QueryNextPage.json" + }, + "Query for digital twins through a relationship": { + "$ref": "./examples/QueryJoin.json" + } + }, + "parameters": [ + { + "name": "querySpecification", + "in": "body", + "description": "The query specification to execute.", + "required": true, + "schema": { + "$ref": "#/definitions/QuerySpecification" + } + }, + { + "$ref": "#/parameters/max-items-per-page" + }, + { + "$ref": "#/parameters/api-version" + }, + { + "$ref": "#/parameters/traceparent" + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/QueryResult" + }, + "headers": { + "query-charge": { + "description": "The query charge.", + "type": "number" + } + } + }, + "default": { + "description": "Default response.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, + "/digitaltwins/{id}": { + "get": { + "tags": [ + "Twins" + ], + "operationId": "DigitalTwins_GetById", + "description": "Retrieves a digital twin.\nStatus codes:\n* 200 OK\n* 400 Bad Request\n * InvalidArgument - The digital twin id is invalid.\n* 404 Not Found\n * DigitalTwinNotFound - The digital twin was not found.", + "x-ms-examples": { + "Get a digital twin by id": { + "$ref": "./examples/GetTwin.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/digitalTwinId" + }, + { + "$ref": "#/parameters/api-version" + }, + { + "$ref": "#/parameters/traceparent" + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "object" + }, + "headers": { + "ETag": { + "description": "Weak Etag.", + "type": "string" + } + } + }, + "default": { + "description": "Default response.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + }, + "put": { + "tags": [ + "Twins" + ], + "operationId": "DigitalTwins_Add", + "description": "Adds or replaces a digital twin.\nStatus codes:\n* 200 OK\n* 400 Bad Request\n * InvalidArgument - The digital twin id or payload is invalid.\n * ModelDecommissioned - The model for the digital twin is decommissioned.\n * TwinLimitReached - The maximum number of digital twins allowed has been reached.\n * ValidationFailed - The digital twin payload is not valid.\n* 412 Precondition Failed\n * PreconditionFailed - The precondition check (If-Match or If-None-Match) failed.", + "x-ms-examples": { + "Add a digital twin": { + "$ref": "./examples/PutTwinBasicExample.json" + }, + "Add a digital twin (with properties and components)": { + "$ref": "./examples/PutTwinAdvancedExample.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/digitalTwinId" + }, + { + "name": "twin", + "description": "The digital twin instance being added. If provided, the $dtId property is ignored.", + "in": "body", + "required": true, + "schema": { + "type": "object" + } + }, + { + "$ref": "#/parameters/if-none-match-star" + }, + { + "$ref": "#/parameters/api-version" + }, + { + "$ref": "#/parameters/traceparent" + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "object" + }, + "headers": { + "ETag": { + "description": "Weak Etag.", + "type": "string" + } + } + }, + "202": { + "description": "Asynchronous Success" + }, + "default": { + "description": "Default response.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + }, + "delete": { + "tags": [ + "Twins" + ], + "operationId": "DigitalTwins_Delete", + "description": "Deletes a digital twin. All relationships referencing the digital twin must already be deleted.\nStatus codes:\n* 204 No Content\n* 400 Bad Request\n * InvalidArgument - The digital twin id is invalid.\n * RelationshipsNotDeleted - The digital twin contains relationships.\n* 404 Not Found\n * DigitalTwinNotFound - The digital twin was not found.\n* 412 Precondition Failed\n * PreconditionFailed - The precondition check (If-Match or If-None-Match) failed.", + "x-ms-examples": { + "Delete a digital twin": { + "$ref": "./examples/DeleteTwin.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/digitalTwinId" + }, + { + "$ref": "#/parameters/if-match" + }, + { + "$ref": "#/parameters/api-version" + }, + { + "$ref": "#/parameters/traceparent" + } + ], + "responses": { + "204": { + "description": "Success" + }, + "default": { + "description": "Default response.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + }, + "patch": { + "tags": [ + "Twins" + ], + "operationId": "DigitalTwins_Update", + "description": "Updates a digital twin.\nStatus codes:\n* 204 No Content\n* 400 Bad Request\n * InvalidArgument - The digital twin id or payload is invalid.\n * JsonPatchInvalid - The JSON Patch provided is invalid.\n * ValidationFailed - Applying the patch results in an invalid digital twin.\n* 404 Not Found\n * DigitalTwinNotFound - The digital twin was not found.\n* 412 Precondition Failed\n * PreconditionFailed - The precondition check (If-Match or If-None-Match) failed.", + "consumes": [ + "application/json-patch+json" + ], + "x-ms-examples": { + "Update a digital twin": { + "$ref": "./examples/PatchTwinBasicExample.json" + }, + "Update a digital twin (multiple updates)": { + "$ref": "./examples/PatchTwinAdvancedExample.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/digitalTwinId" + }, + { + "name": "patchDocument", + "description": "An update specification described by JSON Patch. Updates to property values and $model elements may happen in the same request. Operations are limited to add, replace and remove.", + "in": "body", + "required": true, + "schema": { + "type": "array", + "items": { + "type": "object" + } + } + }, + { + "$ref": "#/parameters/if-match" + }, + { + "$ref": "#/parameters/api-version" + }, + { + "$ref": "#/parameters/traceparent" + } + ], + "responses": { + "204": { + "description": "Success", + "headers": { + "ETag": { + "description": "Weak Etag.", + "type": "string" + } + } + }, + "202": { + "description": "Asynchronous Success" + }, + "default": { + "description": "Default response.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, + "/digitaltwins/{id}/relationships/{relationshipId}": { + "get": { + "tags": [ + "Twins" + ], + "operationId": "DigitalTwins_GetRelationshipById", + "description": "Retrieves a relationship between two digital twins.\nStatus codes:\n* 200 OK\n* 400 Bad Request\n * InvalidArgument - The digital twin id or relationship id is invalid.\n* 404 Not Found\n * DigitalTwinNotFound - The digital twin was not found.\n * RelationshipNotFound - The relationship was not found.", + "x-ms-examples": { + "Get a relationship by id": { + "$ref": "./examples/GetRelationshipById.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/digitalTwinId" + }, + { + "$ref": "#/parameters/relationshipId" + }, + { + "$ref": "#/parameters/api-version" + }, + { + "$ref": "#/parameters/traceparent" + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "object" + }, + "headers": { + "ETag": { + "description": "Weak Etag.", + "type": "string" + } + } + }, + "default": { + "description": "Default response.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + }, + "put": { + "tags": [ + "Twins" + ], + "operationId": "DigitalTwins_AddRelationship", + "description": "Adds a relationship between two digital twins.\nStatus codes:\n* 200 OK\n* 400 Bad Request\n * InvalidArgument - The digital twin id, relationship id, or payload is invalid.\n * InvalidRelationship - The relationship is invalid.\n * OperationNotAllowed - The relationship cannot connect to the same digital twin.\n * ValidationFailed - The relationship content is invalid.\n* 404 Not Found\n * DigitalTwinNotFound - The digital twin was not found.\n * TargetTwinNotFound - The digital twin target of the relationship was not found.\n* 412 Precondition Failed\n * PreconditionFailed - The precondition check (If-Match or If-None-Match) failed.", + "x-ms-examples": { + "Create a relationship": { + "$ref": "./examples/CreateRelationshipBasicExample.json" + }, + "Create a relationship (with properties)": { + "$ref": "./examples/CreateRelationshipAdvancedExample.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/digitalTwinId" + }, + { + "$ref": "#/parameters/relationshipId" + }, + { + "name": "relationship", + "in": "body", + "description": "The data for the relationship.", + "required": true, + "schema": { + "type": "object" + } + }, + { + "$ref": "#/parameters/if-none-match-star" + }, + { + "$ref": "#/parameters/api-version" + }, + { + "$ref": "#/parameters/traceparent" + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "object" + }, + "headers": { + "ETag": { + "description": "Weak Etag.", + "type": "string" + } + } + }, + "default": { + "description": "Default response.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + }, + "delete": { + "tags": [ + "Twins" + ], + "operationId": "DigitalTwins_DeleteRelationship", + "description": "Deletes a relationship between two digital twins.\nStatus codes:\n* 204 No Content\n* 400 Bad Request\n * InvalidArgument - The digital twin id or relationship id is invalid.\n* 404 Not Found\n * DigitalTwinNotFound - The digital twin was not found.\n * RelationshipNotFound - The relationship was not found.\n* 412 Precondition Failed\n * PreconditionFailed - The precondition check (If-Match or If-None-Match) failed.", + "x-ms-examples": { + "Delete a relationship": { + "$ref": "./examples/DeleteRelationship.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/digitalTwinId" + }, + { + "$ref": "#/parameters/relationshipId" + }, + { + "$ref": "#/parameters/if-match" + }, + { + "$ref": "#/parameters/api-version" + }, + { + "$ref": "#/parameters/traceparent" + } + ], + "responses": { + "204": { + "description": "Success" + }, + "default": { + "description": "Default response.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + }, + "patch": { + "tags": [ + "Twins" + ], + "consumes": [ + "application/json-patch+json" + ], + "operationId": "DigitalTwins_UpdateRelationship", + "description": "Updates the properties on a relationship between two digital twins.\nStatus codes:\n* 204 No Content\n* 400 Bad Request\n * InvalidArgument - The digital twin id or relationship id is invalid.\n * InvalidRelationship - The relationship is invalid.\n * JsonPatchInvalid - The JSON Patch provided is invalid.\n * ValidationFailed - The relationship content is invalid.\n* 404 Not Found\n * DigitalTwinNotFound - The digital twin was not found.\n * RelationshipNotFound - The relationship was not found.\n* 409 Conflict\n * RelationshipAlreadyExists - The relationship already exists.\n* 412 Precondition Failed\n * PreconditionFailed - The precondition check (If-Match or If-None-Match) failed.", + "x-ms-examples": { + "Update relationship properties": { + "$ref": "./examples/PatchRelationshipBasicExample.json" + }, + "Update relationship properties (multiple updates)": { + "$ref": "./examples/PatchRelationshipAdvancedExample.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/digitalTwinId" + }, + { + "$ref": "#/parameters/relationshipId" + }, + { + "name": "patchDocument", + "description": "JSON Patch description of the update to the relationship properties.", + "in": "body", + "required": true, + "schema": { + "type": "array", + "items": { + "type": "object" + } + } + }, + { + "$ref": "#/parameters/if-match" + }, + { + "$ref": "#/parameters/api-version" + }, + { + "$ref": "#/parameters/traceparent" + } + ], + "responses": { + "204": { + "description": "Success", + "headers": { + "ETag": { + "description": "Weak Etag.", + "type": "string" + } + } + }, + "default": { + "description": "Default response.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, + "/digitaltwins/{id}/relationships": { + "get": { + "tags": [ + "Twins" + ], + "operationId": "DigitalTwins_ListRelationships", + "description": "Retrieves the relationships from a digital twin.\nStatus codes:\n* 200 OK\n* 400 Bad Request\n * InvalidArgument - The digital twin id is invalid.\n* 404 Not Found\n * DigitalTwinNotFound - The digital twin was not found.", + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List relationships": { + "$ref": "./examples/GetRelationship.json" + }, + "List relationships by name": { + "$ref": "./examples/GetRelationshipByRelationshipName.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/digitalTwinId" + }, + { + "name": "relationshipName", + "description": "The name of the relationship.", + "in": "query", + "required": false, + "type": "string" + }, + { + "$ref": "#/parameters/api-version" + }, + { + "$ref": "#/parameters/traceparent" + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/RelationshipCollection" + } + }, + "default": { + "description": "Default response.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, + "/digitaltwins/{id}/incomingrelationships": { + "get": { + "tags": [ + "Twins" + ], + "operationId": "DigitalTwins_ListIncomingRelationships", + "description": "Retrieves all incoming relationship for a digital twin.\nStatus codes:\n* 200 OK\n* 400 Bad Request\n * InvalidArgument - The digital twin id is invalid.\n* 404 Not Found\n * DigitalTwinNotFound - The digital twin was not found.", + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List incoming relationships": { + "$ref": "./examples/GetIncomingRelationship.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/digitalTwinId" + }, + { + "$ref": "#/parameters/api-version" + }, + { + "$ref": "#/parameters/traceparent" + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/IncomingRelationshipCollection" + } + }, + "default": { + "description": "Default response.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, + "/digitaltwins/{id}/telemetry": { + "post": { + "tags": [ + "Twins" + ], + "operationId": "DigitalTwins_SendTelemetry", + "description": "Sends telemetry on behalf of a digital twin.\nStatus codes:\n* 204 No Content\n* 400 Bad Request\n * InvalidArgument - The digital twin id or message id is invalid.\n * ValidationFailed - The telemetry content is invalid.\n* 404 Not Found\n * DigitalTwinNotFound - The digital twin was not found.", + "x-ms-examples": { + "Send telemetry": { + "$ref": "./examples/SendTelemetry.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/digitalTwinId" + }, + { + "name": "telemetry", + "in": "body", + "description": "The telemetry measurements to send from the digital twin.", + "required": true, + "schema": { + "type": "object" + } + }, + { + "name": "Message-Id", + "in": "header", + "description": "A unique message identifier (in the scope of the digital twin id) that is commonly used for de-duplicating messages.", + "required": true, + "type": "string" + }, + { + "name": "Telemetry-Source-Time", + "in": "header", + "description": "An RFC 3339 timestamp that identifies the time the telemetry was measured.", + "required": false, + "type": "string" + }, + { + "$ref": "#/parameters/api-version" + }, + { + "$ref": "#/parameters/traceparent" + } + ], + "responses": { + "204": { + "description": "Success" + }, + "default": { + "description": "Default response.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, + "/digitaltwins/{id}/components/{componentPath}/telemetry": { + "post": { + "tags": [ + "Twins" + ], + "operationId": "DigitalTwins_SendComponentTelemetry", + "description": "Sends telemetry on behalf of a component in a digital twin.\nStatus codes:\n* 204 No Content\n* 400 Bad Request\n * InvalidArgument - The digital twin id, message id, or component path is invalid.\n * ValidationFailed - The telemetry content is invalid.\n* 404 Not Found\n * DigitalTwinNotFound - The digital twin was not found.\n * ComponentNotFound - The component path was not found.", + "x-ms-examples": { + "Send telemetry in a component": { + "$ref": "./examples/SendTelemetryFromComponent.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/digitalTwinId" + }, + { + "$ref": "#/parameters/componentPath" + }, + { + "name": "telemetry", + "in": "body", + "description": "The telemetry measurements to send from the digital twin's component.", + "required": true, + "schema": { + "type": "object" + } + }, + { + "name": "Message-Id", + "in": "header", + "description": "A unique message identifier (in the scope of the digital twin id) that is commonly used for de-duplicating messages.", + "required": true, + "type": "string" + }, + { + "name": "Telemetry-Source-Time", + "in": "header", + "description": "An RFC 3339 timestamp that identifies the time the telemetry was measured.", + "required": false, + "type": "string" + }, + { + "$ref": "#/parameters/api-version" + }, + { + "$ref": "#/parameters/traceparent" + } + ], + "responses": { + "204": { + "description": "Success" + }, + "default": { + "description": "Default response.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, + "/digitaltwins/{id}/components/{componentPath}": { + "get": { + "tags": [ + "Twins" + ], + "operationId": "DigitalTwins_GetComponent", + "description": "Retrieves a component from a digital twin.\nStatus codes:\n* 200 OK\n* 400 Bad Request\n * InvalidArgument - The digital twin id or component path is invalid.\n* 404 Not Found\n * DigitalTwinNotFound - The digital twin was not found.\n * ComponentNotFound - The component path was not found.", + "x-ms-examples": { + "Get a component in a digital twin": { + "$ref": "./examples/GetComponent.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/digitalTwinId" + }, + { + "$ref": "#/parameters/componentPath" + }, + { + "$ref": "#/parameters/api-version" + }, + { + "$ref": "#/parameters/traceparent" + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "object" + }, + "headers": { + "ETag": { + "description": "Weak Etag.", + "type": "string" + } + } + }, + "default": { + "description": "Default response.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + }, + "patch": { + "tags": [ + "Twins" + ], + "operationId": "DigitalTwins_UpdateComponent", + "description": "Updates a component on a digital twin.\nStatus codes:\n* 204 No Content\n* 400 Bad Request\n * InvalidArgument - The digital twin id, component path, or payload is invalid.\n * JsonPatchInvalid - The JSON Patch provided is invalid.\n * ValidationFailed - Applying the patch results in an invalid digital twin.\n* 404 Not Found\n * DigitalTwinNotFound - The digital twin was not found.\n* 412 Precondition Failed\n * PreconditionFailed - The precondition check (If-Match or If-None-Match) failed.", + "x-ms-examples": { + "Update a component in a digital twin": { + "$ref": "./examples/PatchComponentBasicExample.json" + }, + "Update a component in a digital twin (multiple updates)": { + "$ref": "./examples/PatchComponentAdvancedExample.json" + } + }, + "consumes": [ + "application/json-patch+json" + ], + "parameters": [ + { + "$ref": "#/parameters/digitalTwinId" + }, + { + "$ref": "#/parameters/componentPath" + }, + { + "name": "patchDocument", + "description": "An update specification described by JSON Patch. Updates to property values and $model elements may happen in the same request. Operations are limited to add, replace and remove.", + "in": "body", + "required": true, + "schema": { + "type": "array", + "items": { + "type": "object" + } + } + }, + { + "$ref": "#/parameters/if-match" + }, + { + "$ref": "#/parameters/api-version" + }, + { + "$ref": "#/parameters/traceparent" + } + ], + "responses": { + "204": { + "description": "Success", + "headers": { + "ETag": { + "description": "Weak Etag.", + "type": "string" + } + } + }, + "202": { + "description": "Asynchronous Success" + }, + "default": { + "description": "Default response.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, + "/eventroutes": { + "get": { + "tags": [ + "EventRoutes" + ], + "description": "Retrieves all event routes.\nStatus codes:\n* 200 OK", + "operationId": "EventRoutes_List", + "x-ms-examples": { + "List event routes": { + "$ref": "./examples/EventRoutesList.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/max-items-per-page" + }, + { + "$ref": "#/parameters/api-version" + }, + { + "$ref": "#/parameters/traceparent" + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/EventRouteCollection" + } + }, + "default": { + "description": "Default response.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/eventroutes/{id}": { + "get": { + "tags": [ + "EventRoutes" + ], + "description": "Retrieves an event route.\nStatus codes:\n* 200 OK\n* 404 Not Found\n * EventRouteNotFound - The event route was not found.", + "operationId": "EventRoutes_GetById", + "x-ms-examples": { + "Get an event route by id": { + "$ref": "./examples/EventRouteGet.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/eventRouteId" + }, + { + "$ref": "#/parameters/api-version" + }, + { + "$ref": "#/parameters/traceparent" + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/EventRoute" + } + }, + "default": { + "description": "Default response.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + }, + "put": { + "tags": [ + "EventRoutes" + ], + "description": "Adds or replaces an event route.\nStatus codes:\n* 204 No Content\n* 400 Bad Request\n * EventRouteEndpointInvalid - The endpoint provided does not exist or is not active.\n * EventRouteFilterInvalid - The event route filter is invalid.\n * EventRouteIdInvalid - The event route id is invalid.\n * LimitExceeded - The maximum number of event routes allowed has been reached.", + "operationId": "EventRoutes_Add", + "x-ms-examples": { + "Add an event route": { + "$ref": "./examples/EventRoutePut.json" + }, + "Add an event route (with filter)": { + "$ref": "./examples/EventRoutePutWithFilter.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/eventRouteId" + }, + { + "name": "eventRoute", + "description": "The event route data", + "in": "body", + "schema": { + "$ref": "#/definitions/EventRoute" + } + }, + { + "$ref": "#/parameters/api-version" + }, + { + "$ref": "#/parameters/traceparent" + } + ], + "responses": { + "204": { + "description": "Success" + }, + "default": { + "description": "Default response.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + }, + "delete": { + "tags": [ + "EventRoutes" + ], + "description": "Deletes an event route.\nStatus codes:\n* 204 No Content\n* 404 Not Found\n * EventRouteNotFound - The event route was not found.", + "operationId": "EventRoutes_Delete", + "x-ms-examples": { + "Delete an event route": { + "$ref": "./examples/EventRouteDelete.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/eventRouteId" + }, + { + "$ref": "#/parameters/api-version" + }, + { + "$ref": "#/parameters/traceparent" + } + ], + "responses": { + "204": { + "description": "Success" + }, + "default": { + "description": "Default response.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + } + }, + "definitions": { + "EventRoute": { + "description": "A route which directs notification and telemetry events to an endpoint. Endpoints are a destination outside of Azure Digital Twins such as an EventHub.", + "type": "object", + "required": [ + "endpointName", + "filter" + ], + "properties": { + "id": { + "description": "The id of the event route.", + "type": "string", + "readOnly": true + }, + "endpointName": { + "description": "The name of the endpoint this event route is bound to.", + "type": "string" + }, + "filter": { + "description": "An expression which describes the events which are routed to the endpoint.", + "type": "string" + } + } + }, + "EventRouteCollection": { + "description": "A collection of EventRoute objects.", + "type": "object", + "properties": { + "value": { + "description": "The EventRoute objects.", + "type": "array", + "items": { + "$ref": "#/definitions/EventRoute" + } + }, + "nextLink": { + "description": "A URI to retrieve the next page of results.", + "type": "string" + } + } + }, + "NonPagedDigitalTwinsModelDataCollection": { + "description": "A collection of DigitalTwinsModelData objects.", + "type": "array", + "items": { + "$ref": "#/definitions/DigitalTwinsModelData" + } + }, + "PagedDigitalTwinsModelDataCollection": { + "description": "A collection of DigitalTwinsModelData objects.", + "type": "object", + "properties": { + "value": { + "description": "The DigitalTwinsModelData objects.", + "type": "array", + "items": { + "$ref": "#/definitions/DigitalTwinsModelData" + } + }, + "nextLink": { + "description": "A URI to retrieve the next page of objects.", + "type": "string" + } + } + }, + "DigitalTwinsModelData": { + "description": "A model definition and metadata for that model.", + "required": [ + "id" + ], + "type": "object", + "properties": { + "displayName": { + "description": "A language map that contains the localized display names as specified in the model definition.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "description": { + "description": "A language map that contains the localized descriptions as specified in the model definition.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "id": { + "description": "The id of the model as specified in the model definition.", + "type": "string" + }, + "uploadTime": { + "description": "The time the model was uploaded to the service.", + "format": "date-time", + "type": "string" + }, + "decommissioned": { + "description": "Indicates if the model is decommissioned. Decommissioned models cannot be referenced by newly created digital twins.", + "type": "boolean", + "default": false + }, + "model": { + "description": "The model definition.", + "type": "object" + } + } + }, + "RelationshipCollection": { + "description": "A collection of relationships which relate digital twins together.", + "type": "object", + "properties": { + "value": { + "description": "The relationship objects.", + "type": "array", + "items": { + "description": "The relationship JSON document.", + "type": "object" + } + }, + "nextLink": { + "description": "A URI to retrieve the next page of objects.", + "type": "string" + } + } + }, + "IncomingRelationshipCollection": { + "description": "A collection of incoming relationships which relate digital twins together.", + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/IncomingRelationship" + } + }, + "nextLink": { + "type": "string", + "description": "A URI to retrieve the next page of objects." + } + } + }, + "IncomingRelationship": { + "type": "object", + "description": "An incoming relationship.", + "properties": { + "$relationshipId": { + "type": "string", + "description": "A user-provided string representing the id of this relationship, unique in the context of the source digital twin, i.e. sourceId + relationshipId is unique in the context of the service." + }, + "$sourceId": { + "type": "string", + "description": "The id of the source digital twin." + }, + "$relationshipName": { + "type": "string", + "description": "The name of the relationship." + }, + "$relationshipLink": { + "type": "string", + "description": "Link to the relationship, to be used for deletion." + } + } + }, + "QuerySpecification": { + "description": "A query specification containing either a query statement or a continuation token from a previous query result.", + "type": "object", + "properties": { + "query": { + "description": "The query to execute. This value is ignored if a continuation token is provided.", + "type": "string" + }, + "continuationToken": { + "description": "A token which is used to retrieve the next set of results from a previous query.", + "type": "string" + } + } + }, + "QueryResult": { + "description": "The results of a query operation and an optional continuation token.", + "type": "object", + "properties": { + "value": { + "description": "The query results.", + "type": "array", + "items": { + "type": "object" + } + }, + "continuationToken": { + "description": "A token which can be used to construct a new QuerySpecification to retrieve the next set of results.", + "type": "string" + } + } + }, + "ErrorResponse": { + "description": "Error response.", + "properties": { + "error": { + "$ref": "#/definitions/Error", + "description": "The error details." + } + } + }, + "Error": { + "description": "Error definition.", + "properties": { + "code": { + "description": "Service specific error code which serves as the substatus for the HTTP error code.", + "type": "string", + "readOnly": true + }, + "message": { + "description": "A human-readable representation of the error.", + "type": "string", + "readOnly": true + }, + "details": { + "description": "Internal error details.", + "type": "array", + "items": { + "$ref": "#/definitions/Error" + }, + "readOnly": true + }, + "innererror": { + "description": "An object containing more specific information than the current object about the error.", + "$ref": "#/definitions/InnerError" + } + } + }, + "InnerError": { + "description": "A more specific error description than was provided by the containing error.", + "properties": { + "code": { + "description": "A more specific error code than was provided by the containing error.", + "type": "string" + }, + "innererror": { + "description": "An object containing more specific information than the current object about the error.", + "$ref": "#/definitions/InnerError" + } + } + } + }, + "securityDefinitions": { + "oauth2": { + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize?resource=0b07f429-9f4b-4714-9392-cc5e8e80c8b0", + "type": "oauth2" + } + }, + "parameters": { + "eventRouteId": { + "name": "id", + "in": "path", + "required": true, + "type": "string", + "description": "The id for an event route. The id is unique within event routes and case sensitive.", + "x-ms-parameter-location": "method" + }, + "includeModelDefinition": { + "name": "includeModelDefinition", + "description": "When true the model definition will be returned as part of the result.", + "in": "query", + "required": false, + "type": "boolean", + "default": false, + "x-ms-parameter-location": "method" + }, + "digitalTwinId": { + "name": "id", + "in": "path", + "description": "The id of the digital twin. The id is unique within the service and case sensitive.", + "type": "string", + "required": true, + "x-ms-parameter-location": "method" + }, + "modelId": { + "name": "id", + "in": "path", + "description": "The id for the model. The id is globally unique and case sensitive.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "relationshipId": { + "name": "relationshipId", + "description": "The id of the relationship. The id is unique within the digital twin and case sensitive.", + "in": "path", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "componentPath": { + "name": "componentPath", + "in": "path", + "description": "The name of the DTDL component.", + "type": "string", + "required": true, + "x-ms-parameter-location": "method" + }, + "api-version": { + "name": "api-version", + "in": "query", + "description": "The requested API version.", + "required": true, + "type": "string", + "enum": [ + "2020-10-31" + ] + }, + "max-items-per-page": { + "name": "max-items-per-page", + "in": "header", + "description": "The maximum number of items to retrieve per request. The server may choose to return less than the requested number.", + "required": false, + "type": "integer", + "x-ms-client-name": "MaxItemsPerPage", + "x-ms-parameter-location": "method", + "x-ms-parameter-grouping": { + "postfix": "Options" + } + }, + "if-none-match-star": { + "name": "If-None-Match", + "in": "header", + "description": "Only perform the operation if the entity does not already exist.", + "required": false, + "type": "string", + "enum": [ + "*" + ], + "x-ms-parameter-location": "method" + }, + "if-match": { + "name": "If-Match", + "in": "header", + "description": "Only perform the operation if the entity's etag matches one of the etags provided or * is provided.", + "required": false, + "type": "string", + "x-ms-parameter-location": "method" + }, + "traceparent": { + "name": "traceparent", + "in": "header", + "description": "Identifies the request in a distributed tracing system.", + "required": false, + "type": "string", + "x-ms-parameter-location": "method", + "x-ms-parameter-grouping": { + "postfix": "Options" + } + } + }, + "security": [ + { + "oauth2": [] + } + ] +} diff --git a/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/examples/CreateRelationshipAdvancedExample.json b/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/examples/CreateRelationshipAdvancedExample.json new file mode 100644 index 000000000000..23e1422abcbe --- /dev/null +++ b/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/examples/CreateRelationshipAdvancedExample.json @@ -0,0 +1,26 @@ +{ + "parameters": { + "api-version": "2020-10-31", + "id": "mySourceTwin", + "relationshipId": "myRelationshipId", + "relationship": { + "$targetId": "myTargetTwin", + "$relationshipName": "myRelationship", + "relationshipProperty1": 1, + "relationshipProperty2": "some value" + } + }, + "responses": { + "200": { + "body": { + "$relationshipId": "myRelationshipId", + "$sourceId": "mySourceTwin", + "$targetId": "myTargetTwin", + "$relationshipName": "myRelationship", + "relationshipProperty1": 1, + "relationshipProperty2": "some value", + "$etag": "W/\"1553dbf5-0052-4be8-bea8-46269075b503\"" + } + } + } +} diff --git a/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/examples/CreateRelationshipBasicExample.json b/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/examples/CreateRelationshipBasicExample.json new file mode 100644 index 000000000000..8ddf2f83ba71 --- /dev/null +++ b/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/examples/CreateRelationshipBasicExample.json @@ -0,0 +1,22 @@ +{ + "parameters": { + "api-version": "2020-10-31", + "id": "mySourceTwin", + "relationshipId": "myRelationshipId", + "relationship": { + "$targetId": "myTargetTwin", + "$relationshipName": "myRelationship" + } + }, + "responses": { + "200": { + "body": { + "$relationshipId": "myRelationshipId", + "$sourceId": "mySourceTwin", + "$targetId": "myTargetTwin", + "$relationshipName": "myRelationship", + "$etag": "W/\"1553dbf5-0052-4be8-bea8-46269075b503\"" + } + } + } +} diff --git a/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/examples/DeleteModel.json b/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/examples/DeleteModel.json new file mode 100644 index 000000000000..8f2728fe38e2 --- /dev/null +++ b/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/examples/DeleteModel.json @@ -0,0 +1,9 @@ +{ + "parameters": { + "api-version": "2020-10-31", + "id": "dtmi:com:example:Sample;1" + }, + "responses": { + "204": {} + } +} diff --git a/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/examples/DeleteRelationship.json b/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/examples/DeleteRelationship.json new file mode 100644 index 000000000000..010ff9c5db72 --- /dev/null +++ b/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/examples/DeleteRelationship.json @@ -0,0 +1,10 @@ +{ + "parameters": { + "api-version": "2020-10-31", + "id": "myTwinId", + "relationshipId": "myRelationshipId" + }, + "responses": { + "204": {} + } +} diff --git a/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/examples/DeleteTwin.json b/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/examples/DeleteTwin.json new file mode 100644 index 000000000000..3bf08e7c80c5 --- /dev/null +++ b/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/examples/DeleteTwin.json @@ -0,0 +1,9 @@ +{ + "parameters": { + "api-version": "2020-10-31", + "id": "myTwinId" + }, + "responses": { + "204": {} + } +} diff --git a/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/examples/EventRouteDelete.json b/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/examples/EventRouteDelete.json new file mode 100644 index 000000000000..7a8618a1081d --- /dev/null +++ b/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/examples/EventRouteDelete.json @@ -0,0 +1,9 @@ +{ + "parameters": { + "id": "eventroute-001", + "api-version": "2020-10-31" + }, + "responses": { + "204": {} + } +} diff --git a/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/examples/EventRouteGet.json b/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/examples/EventRouteGet.json new file mode 100644 index 000000000000..b45b652cecaa --- /dev/null +++ b/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/examples/EventRouteGet.json @@ -0,0 +1,15 @@ +{ + "parameters": { + "id": "eventroute-001", + "api-version": "2020-10-31" + }, + "responses": { + "200": { + "body": { + "id": "eventroute-001", + "endpointName": "endpoint-001", + "filter": "type = 'Microsoft.DigitalTwins.Twin.Create'" + } + } + } +} diff --git a/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/examples/EventRoutePut.json b/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/examples/EventRoutePut.json new file mode 100644 index 000000000000..937e1f7a8cd1 --- /dev/null +++ b/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/examples/EventRoutePut.json @@ -0,0 +1,13 @@ +{ + "parameters": { + "id": "eventroute-001", + "eventRoute": { + "endpointName": "endpoint-001", + "filter": "true" + }, + "api-version": "2020-10-31" + }, + "responses": { + "204": {} + } +} diff --git a/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/examples/EventRoutePutWithFilter.json b/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/examples/EventRoutePutWithFilter.json new file mode 100644 index 000000000000..63045804a4b6 --- /dev/null +++ b/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/examples/EventRoutePutWithFilter.json @@ -0,0 +1,13 @@ +{ + "parameters": { + "id": "eventroute-001", + "eventRoute": { + "endpointName": "endpoint-001", + "filter": "type = 'Microsoft.DigitalTwins.Twin.Create'" + }, + "api-version": "2020-10-31" + }, + "responses": { + "204": {} + } +} diff --git a/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/examples/EventRoutesList.json b/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/examples/EventRoutesList.json new file mode 100644 index 000000000000..8075d4942a96 --- /dev/null +++ b/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/examples/EventRoutesList.json @@ -0,0 +1,24 @@ +{ + "parameters": { + "api-version": "2020-10-31" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "eventroute-001", + "endpointName": "endpoint-001", + "filter": "type = 'Microsoft.DigitalTwins.Twin.Create'" + }, + { + "id": "eventroute-002", + "endpointName": "endpoint-002", + "filter": "type = 'Microsoft.DigitalTwins.Twin.Create' OR type = 'microsoft.iot.telemetry'" + } + ], + "nextLink": "url-to-next-page" + } + } + } +} diff --git a/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/examples/GetComponent.json b/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/examples/GetComponent.json new file mode 100644 index 000000000000..3bfbe8c87b49 --- /dev/null +++ b/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/examples/GetComponent.json @@ -0,0 +1,52 @@ +{ + "parameters": { + "api-version": "2020-10-31", + "id": "myTwinId", + "componentPath": "myComponent" + }, + "responses": { + "200": { + "body": { + "$metadata": { + "$model": "dtmi:com:example:interfaces:interfaceName;1", + "property1": { + "desiredValue": 1, + "desiredVersion": 1, + "ackVersion": 1, + "ackCode": 200, + "ackDescription": "description", + "lastUpdateTime": "2020-05-23T21:44:02Z" + }, + "property2": { + "desiredValue": { + "subProperty1": "some value", + "subProperty2": "some other value" + }, + "desiredVersion": 1, + "ackVersion": 1, + "ackCode": 200, + "ackDescription": "description", + "lastUpdateTime": "2020-05-23T21:44:02Z" + } + }, + "property1": 1, + "property2": { + "subProperty1": "some value", + "subProperty2": "some other value" + }, + "component1": { + "$metadata": { + "componentProperty": { + "desiredValue": "some value", + "desiredVersion": 1, + "ackVersion": 1, + "ackCode": 200, + "ackDescription": "description", + "lastUpdateTime": "2020-05-23T21:44:02Z" + } + } + } + } + } + } +} diff --git a/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/examples/GetIncomingRelationship.json b/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/examples/GetIncomingRelationship.json new file mode 100644 index 000000000000..69bef6f47357 --- /dev/null +++ b/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/examples/GetIncomingRelationship.json @@ -0,0 +1,27 @@ +{ + "parameters": { + "api-version": "2020-10-31", + "id": "mySourceTwin" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "$sourceId": "mySourceTwin", + "$relationshipId": "firstRelationshipId", + "$relationshipName": "myRelationship", + "$relationshipLink": "/digitaltwins/mySourceTwin/relationships/myRelationship/firstRelationshipId" + }, + { + "$sourceId": "mySourceTwin", + "$relationshipId": "secondRelationshipId", + "$relationshipName": "myRelationship", + "$relationshipLink": "/digitaltwins/mySourceTwin/relationships/myRelationship/secondRelationshipId" + } + ], + "nextLink": "url-to-next-page" + } + } + } +} diff --git a/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/examples/GetRelationship.json b/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/examples/GetRelationship.json new file mode 100644 index 000000000000..919f6207c1c4 --- /dev/null +++ b/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/examples/GetRelationship.json @@ -0,0 +1,31 @@ +{ + "parameters": { + "api-version": "2020-10-31", + "id": "mySourceTwin" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "$sourceId": "mySourceTwin", + "$relationshipId": "firstRelationshipId", + "$targetId": "targetTwinId", + "$relationshipName": "myRelationship", + "$etag": "W/\"1553dbf5-0052-4be8-bea8-46269075b503\"", + "property": "value" + }, + { + "$sourceId": "mySourceTwin", + "$relationshipId": "secondRelationshipId", + "$targetId": "targetTwinId", + "$relationshipName": "myRelationship", + "$etag": "W/\"2552a0a7-0666-4d5e-a67f-ece5b9b81fe0\"", + "property": "value" + } + ], + "nextLink": "url-to-next-page" + } + } + } +} diff --git a/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/examples/GetRelationshipById.json b/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/examples/GetRelationshipById.json new file mode 100644 index 000000000000..dd31b91a3591 --- /dev/null +++ b/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/examples/GetRelationshipById.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "api-version": "2020-10-31", + "id": "mySourceTwin", + "relationshipId": "myRelationshipId" + }, + "responses": { + "200": { + "body": { + "$relationshipId": "myRelationshipId", + "$sourceId": "mySourceTwin", + "$targetId": "myTargetTwin", + "$relationshipName": "myRelationship", + "$etag": "W/\"1553dbf5-0052-4be8-bea8-46269075b503\"", + "relationshipProperty": "some value" + } + } + } +} diff --git a/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/examples/GetRelationshipByRelationshipName.json b/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/examples/GetRelationshipByRelationshipName.json new file mode 100644 index 000000000000..18224390bc25 --- /dev/null +++ b/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/examples/GetRelationshipByRelationshipName.json @@ -0,0 +1,32 @@ +{ + "parameters": { + "api-version": "2020-10-31", + "id": "mySourceTwin", + "relationshipName": "myRelationship" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "$sourceId": "mySourceTwin", + "$relationshipId": "firstRelationshipId", + "$targetId": "targetTwinId", + "$relationshipName": "myRelationship", + "$etag": "W/\"1553dbf5-0052-4be8-bea8-46269075b503\"", + "property": "value" + }, + { + "$sourceId": "mySourceTwin", + "$relationshipId": "secondRelationshipId", + "$targetId": "targetTwinId", + "$relationshipName": "myRelationship", + "$etag": "W/\"2552a0a7-0666-4d5e-a67f-ece5b9b81fe0\"", + "property": "value" + } + ], + "nextLink": "url-to-next-page" + } + } + } +} diff --git a/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/examples/GetTwin.json b/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/examples/GetTwin.json new file mode 100644 index 000000000000..dd68f5b7d31a --- /dev/null +++ b/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/examples/GetTwin.json @@ -0,0 +1,52 @@ +{ + "parameters": { + "api-version": "2020-10-31", + "id": "myTwinId" + }, + "responses": { + "200": { + "body": { + "$dtId": "myTwinId", + "$metadata": { + "$model": "dtmi:com:example:interfaces:interfaceName;1", + "property1": { + "desiredValue": 1, + "desiredVersion": 1, + "ackVersion": 1, + "ackCode": 200, + "ackDescription": "description", + "lastUpdateTime": "2020-05-23T21:44:02Z" + }, + "property2": { + "desiredValue": { + "subProperty1": "some value", + "subProperty2": "some other value" + }, + "desiredVersion": 1, + "ackVersion": 1, + "ackCode": 200, + "ackDescription": "description", + "lastUpdateTime": "2020-05-23T21:44:02Z" + } + }, + "property1": 1, + "property2": { + "subProperty1": "some value", + "subProperty2": "some other value" + }, + "component1": { + "$metadata": { + "componentProperty": { + "desiredValue": "some value", + "desiredVersion": 1, + "ackVersion": 1, + "ackCode": 200, + "ackDescription": "description", + "lastUpdateTime": "2020-05-23T21:44:02Z" + } + } + } + } + } + } +} diff --git a/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/examples/ModelAdd.json b/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/examples/ModelAdd.json new file mode 100644 index 000000000000..a5017f15d487 --- /dev/null +++ b/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/examples/ModelAdd.json @@ -0,0 +1,47 @@ +{ + "parameters": { + "models": [ + { + "@id": "dtmi:com:example:Sample;1", + "@type": "Interface", + "displayName": "Sample Interface", + "contents": [ + { + "@type": "Property", + "name": "name", + "displayName": "Sample instance name", + "schema": "string" + }, + { + "@type": "Property", + "name": "temp", + "displayName": "Sample instance temperature", + "schema": "integer" + }, + { + "@type": "Property", + "name": "comfortIndex", + "displayName": "Sample instance comfort index", + "schema": "integer" + } + ], + "@context": "dtmi:dtdl:context;2" + } + ], + "api-version": "2020-10-31" + }, + "responses": { + "201": { + "body": [ + { + "id": "dtmi:com:example:Sample;1", + "displayName": { + "en": "Sample Interface" + }, + "uploadTime": "2020-03-01T17:32:28Z", + "decommissioned": false + } + ] + } + } +} diff --git a/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/examples/ModelGetById.json b/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/examples/ModelGetById.json new file mode 100644 index 000000000000..edd1e1125172 --- /dev/null +++ b/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/examples/ModelGetById.json @@ -0,0 +1,15 @@ +{ + "parameters": { + "id": "dtmi:com:example:Sample;1", + "api-version": "2020-10-31" + }, + "responses": { + "200": { + "body": { + "id": "dtmi:com:example:Sample;1", + "uploadTime": "2020-03-01T17:32:28Z", + "decommissioned": false + } + } + } +} diff --git a/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/examples/ModelGetByIdWithIncludeModelDefinition.json b/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/examples/ModelGetByIdWithIncludeModelDefinition.json new file mode 100644 index 000000000000..90f1ed206de8 --- /dev/null +++ b/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/examples/ModelGetByIdWithIncludeModelDefinition.json @@ -0,0 +1,41 @@ +{ + "parameters": { + "id": "dtmi:com:example:Sample;1", + "includeModelDefinition": true, + "api-version": "2020-10-31" + }, + "responses": { + "200": { + "body": { + "id": "dtmi:com:example:Sample;1", + "uploadTime": "2020-03-01T17:32:28Z", + "decommissioned": false, + "model": { + "@id": "dtmi:com:example:Sample;1", + "@type": "Interface", + "contents": [ + { + "@type": "Property", + "name": "name", + "displayName": "Sample instance name", + "schema": "string" + }, + { + "@type": "Property", + "name": "temp", + "displayName": "Sample instance temperature", + "schema": "integer" + }, + { + "@type": "Property", + "name": "comfortIndex", + "displayName": "Sample instance comfort index", + "schema": "integer" + } + ], + "@context": "dtmi:dtdl:context;2" + } + } + } + } +} diff --git a/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/examples/ModelUpdateDecommissioned.json b/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/examples/ModelUpdateDecommissioned.json new file mode 100644 index 000000000000..47a17c17fd8f --- /dev/null +++ b/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/examples/ModelUpdateDecommissioned.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "id": "dtmi:com:example:Sample;1", + "updateModel": [ + { + "op": "replace", + "path": "/decommissioned", + "value": true + } + ], + "api-version": "2020-10-31" + }, + "responses": { + "204": {} + } +} diff --git a/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/examples/ModelsGet.json b/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/examples/ModelsGet.json new file mode 100644 index 000000000000..fd34a6fcc0d2 --- /dev/null +++ b/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/examples/ModelsGet.json @@ -0,0 +1,35 @@ +{ + "parameters": { + "api-version": "2020-10-31" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "dtmi:com:example:Sample;1", + "uploadTime": "2020-03-01T17:32:28Z", + "decommissioned": false + }, + { + "id": "dtmi:com:example:SampleDeviceModel;1", + "displayName": { + "en": "My Device Model" + }, + "uploadTime": "2020-05-01T17:32:28Z", + "decommissioned": false + }, + { + "id": "dtmi:com:example:AnotherSample;1", + "displayName": { + "en": "My Sample" + }, + "uploadTime": "2020-03-01T17:32:28Z", + "decommissioned": false + } + ], + "nextLink": "url-to-next-page" + } + } + } +} diff --git a/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/examples/ModelsGetWithDependenciesAndIncludeModelDefinition.json b/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/examples/ModelsGetWithDependenciesAndIncludeModelDefinition.json new file mode 100644 index 000000000000..16754af81549 --- /dev/null +++ b/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/examples/ModelsGetWithDependenciesAndIncludeModelDefinition.json @@ -0,0 +1,70 @@ +{ + "parameters": { + "includeModelDefinition": true, + "dependenciesFor": [ + "dtmi:com:example:SampleDeviceModel;1" + ], + "x-ms-max-item-count": 20, + "api-version": "2020-10-31" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "dtmi:com:example:Sample;1", + "uploadTime": "2020-03-01T17:32:28Z", + "decommissioned": false, + "model": { + "@id": "dtmi:com:example:Sample;1", + "@type": "Interface", + "contents": [ + { + "@type": "Property", + "name": "name", + "displayName": "Sample instance name", + "schema": "string" + }, + { + "@type": "Property", + "name": "temp", + "displayName": "Sample instance temperature", + "schema": "integer" + }, + { + "@type": "Property", + "name": "comfortIndex", + "displayName": "Sample instance comfort index", + "schema": "integer" + } + ], + "@context": "dtmi:dtdl:context;2" + } + }, + { + "id": "dtmi:com:example:SampleDeviceModel;1", + "displayName": { + "en": "My Device Model" + }, + "uploadTime": "2020-03-01T17:32:28Z", + "decommissioned": false, + "model": { + "@id": "dtmi:com:example:SampleDeviceModel;1", + "@type": "Interface", + "displayName": "My Device Model", + "contents": [ + { + "@type": "Component", + "name": "Sample", + "schema": "dtmi:com:example:Sample;1" + } + ], + "@context": "dtmi:dtdl:context;2" + } + } + ], + "nextLink": "url-to-next-page" + } + } + } +} diff --git a/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/examples/PatchComponentAdvancedExample.json b/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/examples/PatchComponentAdvancedExample.json new file mode 100644 index 000000000000..cbf869751468 --- /dev/null +++ b/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/examples/PatchComponentAdvancedExample.json @@ -0,0 +1,27 @@ +{ + "parameters": { + "api-version": "2020-10-31", + "id": "myTwinId", + "componentPath": "myComponent", + "patchDocument": [ + { + "op": "add", + "path": "/property1", + "value": 1 + }, + { + "op": "remove", + "path": "/property2" + }, + { + "op": "replace", + "path": "/property3/subProperty1", + "value": "new value" + } + ] + }, + "responses": { + "202": {}, + "204": {} + } +} diff --git a/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/examples/PatchComponentBasicExample.json b/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/examples/PatchComponentBasicExample.json new file mode 100644 index 000000000000..14d2de803f73 --- /dev/null +++ b/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/examples/PatchComponentBasicExample.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2020-10-31", + "id": "myTwinId", + "componentPath": "myComponent", + "patchDocument": [ + { + "op": "add", + "path": "/property", + "value": 1 + } + ] + }, + "responses": { + "202": {}, + "204": {} + } +} diff --git a/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/examples/PatchRelationshipAdvancedExample.json b/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/examples/PatchRelationshipAdvancedExample.json new file mode 100644 index 000000000000..9d9eea1c56a0 --- /dev/null +++ b/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/examples/PatchRelationshipAdvancedExample.json @@ -0,0 +1,26 @@ +{ + "parameters": { + "api-version": "2020-10-31", + "id": "myTwinId", + "relationshipId": "myRelationshipId", + "patchDocument": [ + { + "op": "add", + "path": "/property1", + "value": 1 + }, + { + "op": "remove", + "path": "/property2" + }, + { + "op": "replace", + "path": "/property3/subProperty1", + "value": "new value" + } + ] + }, + "responses": { + "204": {} + } +} diff --git a/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/examples/PatchRelationshipBasicExample.json b/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/examples/PatchRelationshipBasicExample.json new file mode 100644 index 000000000000..a45183bf6c0f --- /dev/null +++ b/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/examples/PatchRelationshipBasicExample.json @@ -0,0 +1,17 @@ +{ + "parameters": { + "api-version": "2020-10-31", + "id": "myTwinId", + "relationshipId": "myRelationshipId", + "patchDocument": [ + { + "op": "add", + "path": "/property", + "value": 1 + } + ] + }, + "responses": { + "204": {} + } +} diff --git a/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/examples/PatchTwinAdvancedExample.json b/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/examples/PatchTwinAdvancedExample.json new file mode 100644 index 000000000000..f018af463d1a --- /dev/null +++ b/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/examples/PatchTwinAdvancedExample.json @@ -0,0 +1,26 @@ +{ + "parameters": { + "api-version": "2020-10-31", + "id": "myNewTwinId", + "patchDocument": [ + { + "op": "replace", + "path": "/property1", + "value": 1 + }, + { + "op": "add", + "path": "/property2/subProperty1", + "value": 1 + }, + { + "op": "remove", + "path": "/property3" + } + ] + }, + "responses": { + "202": {}, + "204": {} + } +} diff --git a/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/examples/PatchTwinBasicExample.json b/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/examples/PatchTwinBasicExample.json new file mode 100644 index 000000000000..4b5e3a015ece --- /dev/null +++ b/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/examples/PatchTwinBasicExample.json @@ -0,0 +1,17 @@ +{ + "parameters": { + "api-version": "2020-10-31", + "id": "myNewTwinId", + "patchDocument": [ + { + "op": "replace", + "path": "/property1", + "value": 1 + } + ] + }, + "responses": { + "202": {}, + "204": {} + } +} diff --git a/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/examples/PutTwinAdvancedExample.json b/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/examples/PutTwinAdvancedExample.json new file mode 100644 index 000000000000..e52e9481e53b --- /dev/null +++ b/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/examples/PutTwinAdvancedExample.json @@ -0,0 +1,68 @@ +{ + "parameters": { + "api-version": "2020-10-31", + "id": "myNewTwinId", + "If-None-Match": "*", + "twin": { + "$metadata": { + "$model": "dtmi:com:example:interfaces:interfaceName;1" + }, + "property1": 1, + "property2": { + "subProperty1": "some value", + "subProperty2": "some other value" + }, + "component1": { + "$metadata": {}, + "componentProperty": "some value" + } + } + }, + "responses": { + "200": { + "body": { + "$dtId": "myNewTwinId", + "$metadata": { + "$model": "dtmi:com:example:interfaces:interfaceName;1", + "property1": { + "desiredValue": 1, + "desiredVersion": 1, + "ackVersion": 1, + "ackCode": 200, + "ackDescription": "description", + "lastUpdateTime": "2020-05-23T21:44:02Z" + }, + "property2": { + "desiredValue": { + "subProperty1": "some value", + "subProperty2": "some other value" + }, + "desiredVersion": 1, + "ackVersion": 1, + "ackCode": 200, + "ackDescription": "description", + "lastUpdateTime": "2020-05-23T21:44:02Z" + } + }, + "property1": 1, + "property2": { + "subProperty1": "some value", + "subProperty2": "some other value" + }, + "component1": { + "$metadata": { + "componentProperty": { + "desiredValue": "some value", + "desiredVersion": 1, + "ackVersion": 1, + "ackCode": 200, + "ackDescription": "description", + "lastUpdateTime": "2020-05-23T21:44:02Z" + } + } + } + } + }, + "202": {} + } +} diff --git a/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/examples/PutTwinBasicExample.json b/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/examples/PutTwinBasicExample.json new file mode 100644 index 000000000000..144fd8fec259 --- /dev/null +++ b/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/examples/PutTwinBasicExample.json @@ -0,0 +1,22 @@ +{ + "parameters": { + "api-version": "2020-10-31", + "id": "myNewTwinId", + "twin": { + "$metadata": { + "$model": "dtmi:com:example:interfaces:interfaceName;1" + } + } + }, + "responses": { + "200": { + "body": { + "$dtId": "myNewTwinId", + "$metadata": { + "$model": "dtmi:com:example:interfaces:interfaceName;1" + } + } + }, + "202": {} + } +} diff --git a/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/examples/QueryFirstPage.json b/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/examples/QueryFirstPage.json new file mode 100644 index 000000000000..ba4afbe86671 --- /dev/null +++ b/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/examples/QueryFirstPage.json @@ -0,0 +1,44 @@ +{ + "parameters": { + "querySpecification": { + "query": "SELECT * FROM DIGITALTWINS WHERE temp = 79" + }, + "api-version": "2020-10-31" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "$dtId": "Twin-01", + "$metadata": { + "$model": "dtmi:com:example:Sample;1" + }, + "name": "Sample01", + "temp": 79, + "comfortIndex": 50 + }, + { + "$dtId": "Twin-02", + "$metadata": { + "$model": "dtmi:com:example:Sample;1" + }, + "name": "Sample02", + "temp": 79, + "comfortIndex": 50 + }, + { + "$dtId": "Twin-03", + "$metadata": { + "$model": "dtmi:com:example:Sample;1" + }, + "name": "Sample03", + "temp": 79, + "comfortIndex": 50 + } + ], + "continuationToken": "" + } + } + } +} diff --git a/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/examples/QueryJoin.json b/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/examples/QueryJoin.json new file mode 100644 index 000000000000..e6426f051780 --- /dev/null +++ b/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/examples/QueryJoin.json @@ -0,0 +1,56 @@ +{ + "parameters": { + "querySpecification": { + "query": "SELECT Widget, Gadget FROM DIGITALTWINS Widget JOIN Gadget RELATED Widget.Contains WHERE Widget.$dtId = 'Twin-01'" + }, + "api-version": "2020-10-31" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "Widget": { + "$dtId": "Twin-01", + "$metadata": { + "$model": "dtmi:com:example:Sample;1" + }, + "name": "Sample01", + "temp": 79, + "comfortIndex": 50 + }, + "Gadget": { + "$dtId": "Twin-02", + "$metadata": { + "$model": "dtmi:com:example:Sample;1" + }, + "name": "Sample02", + "temp": 79, + "comfortIndex": 50 + } + }, + { + "Widget": { + "$dtId": "Twin-01", + "$metadata": { + "$model": "dtmi:com:example:Sample;1" + }, + "name": "Sample01", + "temp": 79, + "comfortIndex": 50 + }, + "Gadget": { + "$dtId": "Twin-10", + "$metadata": { + "$model": "dtmi:com:example:Sample;1" + }, + "name": "Sample10", + "temp": 79, + "comfortIndex": 50 + } + } + ] + } + } + } +} diff --git a/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/examples/QueryNextPage.json b/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/examples/QueryNextPage.json new file mode 100644 index 000000000000..4c8028135709 --- /dev/null +++ b/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/examples/QueryNextPage.json @@ -0,0 +1,43 @@ +{ + "parameters": { + "querySpecification": { + "continuationToken": "" + }, + "api-version": "2020-10-31" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "$dtId": "Twin-04", + "$metadata": { + "$model": "dtmi:com:example:Sample;1" + }, + "name": "Sample04", + "temp": 79, + "comfortIndex": 50 + }, + { + "$dtId": "Twin-05", + "$metadata": { + "$model": "dtmi:com:example:Sample;1" + }, + "name": "Sample05", + "temp": 79, + "comfortIndex": 50 + }, + { + "$dtId": "Twin-06", + "$metadata": { + "$model": "dtmi:com:example:Sample;1" + }, + "name": "Sample06", + "temp": 79, + "comfortIndex": 50 + } + ] + } + } + } +} diff --git a/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/examples/SendTelemetry.json b/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/examples/SendTelemetry.json new file mode 100644 index 000000000000..bf7bed32bcbc --- /dev/null +++ b/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/examples/SendTelemetry.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "api-version": "2020-10-31", + "id": "myTwinId", + "Message-Id": "e5ca50dd-ca31-4fae-8d84-3af5a72b10c5", + "Telemetry-Source-Time": "1985-04-12T23:20:50.52Z", + "telemetry": { + "temperature": 1 + } + }, + "responses": { + "204": {} + } +} diff --git a/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/examples/SendTelemetryFromComponent.json b/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/examples/SendTelemetryFromComponent.json new file mode 100644 index 000000000000..25841e14c07f --- /dev/null +++ b/sdk/digitaltwins/azure-digitaltwins-core/swagger/2020-10-31/examples/SendTelemetryFromComponent.json @@ -0,0 +1,15 @@ +{ + "parameters": { + "api-version": "2020-10-31", + "id": "myTwinId", + "componentPath": "myComponent", + "Message-Id": "e5ca50dd-ca31-4fae-8d84-3af5a72b10c5", + "Telemetry-Source-Time": "1985-04-12T23:20:50.52Z", + "telemetry": { + "temperature": 1 + } + }, + "responses": { + "204": {} + } +}