From d5eb3055826743c9dbbe6ccda3074b2f5d5bda21 Mon Sep 17 00:00:00 2001 From: Abhinav Ghai Date: Tue, 18 Apr 2023 12:31:37 -0700 Subject: [PATCH 1/2] Add data-plane 2023-06-30 for Azure Digital Twins --- .../stable/2023-06-30/digitaltwins.json | 1953 +++++++++++++++++ .../CreateRelationshipAdvancedExample.json | 26 + .../CreateRelationshipBasicExample.json | 22 + .../2023-06-30/examples/DeleteModel.json | 9 + .../examples/DeleteRelationship.json | 10 + .../2023-06-30/examples/DeleteTwin.json | 9 + .../2023-06-30/examples/EventRouteDelete.json | 9 + .../2023-06-30/examples/EventRouteGet.json | 15 + .../2023-06-30/examples/EventRoutePut.json | 13 + .../examples/EventRoutePutWithFilter.json | 13 + .../2023-06-30/examples/EventRoutesList.json | 24 + .../2023-06-30/examples/GetComponent.json | 36 + .../examples/GetIncomingRelationship.json | 27 + .../2023-06-30/examples/GetRelationship.json | 31 + .../examples/GetRelationshipById.json | 19 + .../GetRelationshipByRelationshipName.json | 32 + .../stable/2023-06-30/examples/GetTwin.json | 38 + .../2023-06-30/examples/ImportJobCancel.json | 19 + .../2023-06-30/examples/ImportJobDelete.json | 9 + .../2023-06-30/examples/ImportJobGet.json | 20 + .../2023-06-30/examples/ImportJobList.json | 34 + .../2023-06-30/examples/ImportJobPut.json | 23 + .../stable/2023-06-30/examples/ModelAdd.json | 47 + .../2023-06-30/examples/ModelGetById.json | 15 + ...odelGetByIdWithIncludeModelDefinition.json | 41 + .../examples/ModelUpdateDecommissioned.json | 16 + .../stable/2023-06-30/examples/ModelsGet.json | 35 + ...DependenciesAndIncludeModelDefinition.json | 70 + .../PatchComponentAdvancedExample.json | 31 + .../examples/PatchComponentBasicExample.json | 17 + .../PatchRelationshipAdvancedExample.json | 26 + .../PatchRelationshipBasicExample.json | 17 + .../examples/PatchTwinAdvancedExample.json | 30 + .../examples/PatchTwinBasicExample.json | 16 + .../examples/PutTwinAdvancedExample.json | 62 + .../examples/PutTwinBasicExample.json | 22 + .../2023-06-30/examples/QueryFirstPage.json | 75 + .../stable/2023-06-30/examples/QueryJoin.json | 96 + .../2023-06-30/examples/QueryNextPage.json | 73 + .../2023-06-30/examples/SendTelemetry.json | 14 + .../examples/SendTelemetryFromComponent.json | 15 + .../digitaltwins/data-plane/readme.md | 11 +- .../digitaltwins/data-plane/readme.python.md | 11 + 43 files changed, 3130 insertions(+), 1 deletion(-) create mode 100644 specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/digitaltwins.json create mode 100644 specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/CreateRelationshipAdvancedExample.json create mode 100644 specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/CreateRelationshipBasicExample.json create mode 100644 specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/DeleteModel.json create mode 100644 specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/DeleteRelationship.json create mode 100644 specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/DeleteTwin.json create mode 100644 specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/EventRouteDelete.json create mode 100644 specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/EventRouteGet.json create mode 100644 specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/EventRoutePut.json create mode 100644 specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/EventRoutePutWithFilter.json create mode 100644 specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/EventRoutesList.json create mode 100644 specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/GetComponent.json create mode 100644 specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/GetIncomingRelationship.json create mode 100644 specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/GetRelationship.json create mode 100644 specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/GetRelationshipById.json create mode 100644 specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/GetRelationshipByRelationshipName.json create mode 100644 specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/GetTwin.json create mode 100644 specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/ImportJobCancel.json create mode 100644 specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/ImportJobDelete.json create mode 100644 specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/ImportJobGet.json create mode 100644 specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/ImportJobList.json create mode 100644 specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/ImportJobPut.json create mode 100644 specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/ModelAdd.json create mode 100644 specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/ModelGetById.json create mode 100644 specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/ModelGetByIdWithIncludeModelDefinition.json create mode 100644 specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/ModelUpdateDecommissioned.json create mode 100644 specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/ModelsGet.json create mode 100644 specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/ModelsGetWithDependenciesAndIncludeModelDefinition.json create mode 100644 specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/PatchComponentAdvancedExample.json create mode 100644 specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/PatchComponentBasicExample.json create mode 100644 specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/PatchRelationshipAdvancedExample.json create mode 100644 specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/PatchRelationshipBasicExample.json create mode 100644 specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/PatchTwinAdvancedExample.json create mode 100644 specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/PatchTwinBasicExample.json create mode 100644 specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/PutTwinAdvancedExample.json create mode 100644 specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/PutTwinBasicExample.json create mode 100644 specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/QueryFirstPage.json create mode 100644 specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/QueryJoin.json create mode 100644 specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/QueryNextPage.json create mode 100644 specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/SendTelemetry.json create mode 100644 specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/SendTelemetryFromComponent.json diff --git a/specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/digitaltwins.json b/specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/digitaltwins.json new file mode 100644 index 000000000000..448cf701c84e --- /dev/null +++ b/specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/digitaltwins.json @@ -0,0 +1,1953 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-06-30", + "title": "Azure Digital Twins API", + "description": "A service for managing and querying digital twins and digital twin models." + }, + "host": "digitaltwins-hostname", + "schemes": [ + "https" + ], + "produces": [ + "application/json" + ], + "consumes": [ + "application/json" + ], + "paths": { + "/models": { + "parameters": [ + { + "$ref": "#/parameters/traceparent" + }, + { + "$ref": "#/parameters/tracestate" + } + ], + "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": true, + "schema": { + "type": "array", + "minItems": 1, + "uniqueItems": true, + "items": { + "type": "object" + } + } + }, + { + "$ref": "#/parameters/api-version" + } + ], + "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": "If specified, only return the set of the specified models along with their dependencies. 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" + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/PagedDigitalTwinsModelDataCollection" + } + }, + "default": { + "description": "Default response.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, + "/models/{id}": { + "parameters": [ + { + "$ref": "#/parameters/traceparent" + }, + { + "$ref": "#/parameters/tracestate" + } + ], + "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" + } + ], + "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" + } + ], + "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" + } + ], + "responses": { + "204": { + "description": "Success" + }, + "default": { + "description": "Default response.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, + "/query": { + "parameters": [ + { + "$ref": "#/parameters/traceparent" + }, + { + "$ref": "#/parameters/tracestate" + } + ], + "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 * TimeoutError - The query execution timed out after 60 seconds. Try simplifying the query or adding conditions to reduce the result size.\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" + } + ], + "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}": { + "parameters": [ + { + "$ref": "#/parameters/traceparent" + }, + { + "$ref": "#/parameters/tracestate" + } + ], + "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" + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/DigitalTwin" + }, + "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" + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/DigitalTwin" + }, + "headers": { + "ETag": { + "description": "Weak Etag.", + "type": "string" + } + } + }, + "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" + } + ], + "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" + } + ], + "responses": { + "204": { + "description": "Success", + "headers": { + "ETag": { + "description": "Weak Etag.", + "type": "string" + } + } + }, + "default": { + "description": "Default response.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, + "/digitaltwins/{id}/relationships/{relationshipId}": { + "parameters": [ + { + "$ref": "#/parameters/traceparent" + }, + { + "$ref": "#/parameters/tracestate" + } + ], + "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" + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/Relationship" + }, + "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" + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/Relationship" + }, + "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" + } + ], + "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" + } + ], + "responses": { + "204": { + "description": "Success", + "headers": { + "ETag": { + "description": "Weak Etag.", + "type": "string" + } + } + }, + "default": { + "description": "Default response.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, + "/digitaltwins/{id}/relationships": { + "parameters": [ + { + "$ref": "#/parameters/traceparent" + }, + { + "$ref": "#/parameters/tracestate" + } + ], + "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" + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/RelationshipCollection" + } + }, + "default": { + "description": "Default response.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, + "/digitaltwins/{id}/incomingrelationships": { + "parameters": [ + { + "$ref": "#/parameters/traceparent" + }, + { + "$ref": "#/parameters/tracestate" + } + ], + "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" + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/IncomingRelationshipCollection" + } + }, + "default": { + "description": "Default response.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, + "/digitaltwins/{id}/telemetry": { + "parameters": [ + { + "$ref": "#/parameters/traceparent" + }, + { + "$ref": "#/parameters/tracestate" + } + ], + "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" + } + ], + "responses": { + "204": { + "description": "Success" + }, + "default": { + "description": "Default response.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, + "/digitaltwins/{id}/components/{componentPath}/telemetry": { + "parameters": [ + { + "$ref": "#/parameters/traceparent" + }, + { + "$ref": "#/parameters/tracestate" + } + ], + "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" + } + ], + "responses": { + "204": { + "description": "Success" + }, + "default": { + "description": "Default response.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, + "/digitaltwins/{id}/components/{componentPath}": { + "parameters": [ + { + "$ref": "#/parameters/traceparent" + }, + { + "$ref": "#/parameters/tracestate" + } + ], + "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" + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/Component" + }, + "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" + } + ], + "responses": { + "204": { + "description": "Success", + "headers": { + "ETag": { + "description": "Weak Etag.", + "type": "string" + } + } + }, + "default": { + "description": "Default response.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, + "/eventroutes": { + "parameters": [ + { + "$ref": "#/parameters/traceparent" + }, + { + "$ref": "#/parameters/tracestate" + } + ], + "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" + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/EventRouteCollection" + } + }, + "default": { + "description": "Default response.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/eventroutes/{id}": { + "parameters": [ + { + "$ref": "#/parameters/traceparent" + }, + { + "$ref": "#/parameters/tracestate" + } + ], + "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" + } + ], + "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", + "required": true, + "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:\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" + } + ], + "responses": { + "204": { + "description": "Success" + }, + "default": { + "description": "Default response.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, + "/jobs/imports": { + "parameters": [ + { + "$ref": "#/parameters/traceparent" + }, + { + "$ref": "#/parameters/tracestate" + } + ], + "get": { + "tags": [ + "Jobs" + ], + "operationId": "ImportJobs_List", + "description": "Retrieves all import jobs.\nStatus codes:\n* 200 OK", + "x-ms-examples": { + "Get all import jobs": { + "$ref": "./examples/ImportJobList.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/max-items-per-page" + }, + { + "$ref": "#/parameters/api-version" + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/ImportJobCollection" + } + }, + "default": { + "description": "Default response.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/jobs/imports/{id}": { + "parameters": [ + { + "$ref": "#/parameters/traceparent" + }, + { + "$ref": "#/parameters/tracestate" + } + ], + "put": { + "tags": [ + "Jobs" + ], + "operationId": "ImportJobs_Add", + "description": "Creates an import job.\nStatus codes:\n* 201 Created\n* 400 Bad Request\n * JobLimitReached - The maximum number of import jobs allowed has been reached.\n * ValidationFailed - The import job request is not valid.", + "x-ms-examples": { + "Add a job": { + "$ref": "./examples/ImportJobPut.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/importJobId" + }, + { + "name": "importJob", + "description": "The import job being added.", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ImportJob" + } + }, + { + "$ref": "#/parameters/api-version" + } + ], + "responses": { + "201": { + "description": "Success", + "schema": { + "$ref": "#/definitions/ImportJob" + } + }, + "default": { + "description": "Default response.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + }, + "get": { + "tags": [ + "Jobs" + ], + "operationId": "ImportJobs_GetById", + "description": "Retrieves an import job.\nStatus codes:\n* 200 OK\n* 404 Not Found\n * ImportJobNotFound - The import job was not found.", + "x-ms-examples": { + "Get an import job by id": { + "$ref": "./examples/ImportJobGet.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/importJobId" + }, + { + "$ref": "#/parameters/api-version" + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/ImportJob" + } + }, + "default": { + "description": "Default response.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + }, + "delete": { + "tags": [ + "Jobs" + ], + "operationId": "ImportJobs_Delete", + "description": "Deletes an import job.\nStatus codes:\n* 204 No Content\n* 400 Bad Request\n * ValidationFailed - The import job request is not valid.", + "x-ms-examples": { + "Delete an import job": { + "$ref": "./examples/ImportJobDelete.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/importJobId" + }, + { + "$ref": "#/parameters/api-version" + } + ], + "responses": { + "204": { + "description": "Success" + }, + "default": { + "description": "Default response.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, + "/jobs/imports/{id}/cancel": { + "parameters": [ + { + "$ref": "#/parameters/traceparent" + }, + { + "$ref": "#/parameters/tracestate" + } + ], + "post": { + "tags": [ + "Jobs" + ], + "operationId": "ImportJobs_Cancel", + "description": "Cancels an import job.\nStatus codes:\n* 200 Request Accepted\n* 400 Bad Request\n * ValidationFailed - The import job request is not valid.", + "x-ms-examples": { + "Cancel a job": { + "$ref": "./examples/ImportJobCancel.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/importJobId" + }, + { + "$ref": "#/parameters/api-version" + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/ImportJob" + } + }, + "default": { + "description": "Default response.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + } + }, + "definitions": { + "DigitalTwin": { + "description": "Digital twin", + "type": "object", + "additionalProperties": {} + }, + "Relationship": { + "description": "Digital twin relationship", + "type": "object", + "additionalProperties": {} + }, + "Component": { + "description": "Digital twin component", + "type": "object", + "additionalProperties": {} + }, + "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", + "required": [ + "value" + ], + "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", + "required": [ + "value" + ], + "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", + "required": [ + "value" + ], + "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", + "required": [ + "value" + ], + "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", + "required": [ + "value" + ], + "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" + } + } + }, + "ImportJob": { + "description": "A job which contains a reference to the operations to perform, results, and execution metadata.", + "type": "object", + "required": [ + "inputBlobUri", + "outputBlobUri" + ], + "properties": { + "id": { + "description": "The identifier of the import job.", + "type": "string", + "readOnly": true + }, + "inputBlobUri": { + "description": "The path to the input Azure storage blob that contains file(s) describing the operations to perform in the job.", + "type": "string" + }, + "outputBlobUri": { + "description": "The path to the output Azure storage blob that will contain the errors and progress logs of import job.", + "type": "string" + }, + "status": { + "description": "Status of the job.", + "enum": [ + "notstarted", + "running", + "failed", + "succeeded", + "cancelling", + "cancelled" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "status", + "modelAsExtensible": true, + "modelAsString": false + } + }, + "createdDateTime": { + "description": "Start time of the job. The timestamp is in RFC3339 format: `yyyy-MM-ddTHH:mm:ssZ`.", + "type": "string", + "format": "date-time", + "readOnly": true + }, + "lastActionDateTime": { + "description": "Last time service performed any action from the job. The timestamp is in RFC3339 format: `yyyy-MM-ddTHH:mm:ssZ`.", + "type": "string", + "format": "date-time", + "readOnly": true + }, + "finishedDateTime": { + "description": "End time of the job. The timestamp is in RFC3339 format: `yyyy-MM-ddTHH:mm:ssZ`.", + "type": "string", + "format": "date-time", + "readOnly": true + }, + "purgeDateTime": { + "description": "Time at which job will be purged by the service from the system. The timestamp is in RFC3339 format: `yyyy-MM-ddTHH:mm:ssZ`.", + "type": "string", + "format": "date-time", + "readOnly": true + }, + "error": { + "$ref": "#/definitions/Error", + "description": "Details of the error(s) that occurred executing the import job." + } + } + }, + "ImportJobCollection": { + "description": "A collection of import job objects.", + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "description": "The list of import job objects.", + "type": "array", + "items": { + "$ref": "#/definitions/ImportJob" + } + }, + "nextLink": { + "description": "A URI to retrieve the next page of results.", + "type": "string" + } + } + }, + "ErrorResponse": { + "description": "Error response.", + "required": [ + "error" + ], + "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" + }, + "importJobId": { + "name": "id", + "in": "path", + "description": "The id for the import job. The id is unique within the service and case sensitive.", + "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", + "minLength": 1 + }, + "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", + "x-ms-parameter-grouping": { + "postfix": "Options" + } + }, + "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", + "x-ms-parameter-grouping": { + "postfix": "Options" + } + }, + "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" + } + }, + "tracestate": { + "name": "tracestate", + "in": "header", + "description": "Provides vendor-specific trace identification information and is a companion to traceparent.", + "required": false, + "type": "string", + "x-ms-parameter-location": "method", + "x-ms-parameter-grouping": { + "postfix": "Options" + } + } + }, + "security": [ + { + "oauth2": [] + } + ] +} diff --git a/specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/CreateRelationshipAdvancedExample.json b/specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/CreateRelationshipAdvancedExample.json new file mode 100644 index 000000000000..48ed205ccc97 --- /dev/null +++ b/specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/CreateRelationshipAdvancedExample.json @@ -0,0 +1,26 @@ +{ + "parameters": { + "api-version": "2023-06-30", + "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/specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/CreateRelationshipBasicExample.json b/specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/CreateRelationshipBasicExample.json new file mode 100644 index 000000000000..046eeac6bb85 --- /dev/null +++ b/specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/CreateRelationshipBasicExample.json @@ -0,0 +1,22 @@ +{ + "parameters": { + "api-version": "2023-06-30", + "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/specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/DeleteModel.json b/specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/DeleteModel.json new file mode 100644 index 000000000000..574ff992ed19 --- /dev/null +++ b/specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/DeleteModel.json @@ -0,0 +1,9 @@ +{ + "parameters": { + "api-version": "2023-06-30", + "id": "dtmi:com:example:Sample;1" + }, + "responses": { + "204": {} + } +} diff --git a/specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/DeleteRelationship.json b/specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/DeleteRelationship.json new file mode 100644 index 000000000000..5f06ad41a686 --- /dev/null +++ b/specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/DeleteRelationship.json @@ -0,0 +1,10 @@ +{ + "parameters": { + "api-version": "2023-06-30", + "id": "myTwinId", + "relationshipId": "myRelationshipId" + }, + "responses": { + "204": {} + } +} diff --git a/specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/DeleteTwin.json b/specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/DeleteTwin.json new file mode 100644 index 000000000000..9790b6aaf40d --- /dev/null +++ b/specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/DeleteTwin.json @@ -0,0 +1,9 @@ +{ + "parameters": { + "api-version": "2023-06-30", + "id": "myTwinId" + }, + "responses": { + "204": {} + } +} diff --git a/specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/EventRouteDelete.json b/specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/EventRouteDelete.json new file mode 100644 index 000000000000..a7d81b2b1027 --- /dev/null +++ b/specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/EventRouteDelete.json @@ -0,0 +1,9 @@ +{ + "parameters": { + "id": "eventroute-001", + "api-version": "2023-06-30" + }, + "responses": { + "204": {} + } +} diff --git a/specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/EventRouteGet.json b/specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/EventRouteGet.json new file mode 100644 index 000000000000..fc4be81c5849 --- /dev/null +++ b/specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/EventRouteGet.json @@ -0,0 +1,15 @@ +{ + "parameters": { + "id": "eventroute-001", + "api-version": "2023-06-30" + }, + "responses": { + "200": { + "body": { + "id": "eventroute-001", + "endpointName": "endpoint-001", + "filter": "type = 'Microsoft.DigitalTwins.Twin.Create'" + } + } + } +} diff --git a/specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/EventRoutePut.json b/specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/EventRoutePut.json new file mode 100644 index 000000000000..12c22cca5bab --- /dev/null +++ b/specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/EventRoutePut.json @@ -0,0 +1,13 @@ +{ + "parameters": { + "id": "eventroute-001", + "eventRoute": { + "endpointName": "endpoint-001", + "filter": "true" + }, + "api-version": "2023-06-30" + }, + "responses": { + "204": {} + } +} diff --git a/specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/EventRoutePutWithFilter.json b/specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/EventRoutePutWithFilter.json new file mode 100644 index 000000000000..46c4469763fe --- /dev/null +++ b/specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/EventRoutePutWithFilter.json @@ -0,0 +1,13 @@ +{ + "parameters": { + "id": "eventroute-001", + "eventRoute": { + "endpointName": "endpoint-001", + "filter": "type = 'Microsoft.DigitalTwins.Twin.Create'" + }, + "api-version": "2023-06-30" + }, + "responses": { + "204": {} + } +} diff --git a/specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/EventRoutesList.json b/specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/EventRoutesList.json new file mode 100644 index 000000000000..0eb0058cb201 --- /dev/null +++ b/specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/EventRoutesList.json @@ -0,0 +1,24 @@ +{ + "parameters": { + "api-version": "2023-06-30" + }, + "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/specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/GetComponent.json b/specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/GetComponent.json new file mode 100644 index 000000000000..e92fc60da557 --- /dev/null +++ b/specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/GetComponent.json @@ -0,0 +1,36 @@ +{ + "parameters": { + "api-version": "2023-06-30", + "id": "myTwinId", + "componentPath": "myComponent" + }, + "responses": { + "200": { + "body": { + "property1": 1, + "property2": { + "subProperty1": "some value", + "subProperty2": "some other value" + }, + "component1": { + "componentProperty": "some value", + "$metadata": { + "$lastUpdateTime": "2022-02-28T00:30:00.1234567Z", + "componentProperty": { + "lastUpdateTime": "2022-02-28T00:30:00.1234567Z" + } + } + }, + "$metadata": { + "$lastUpdateTime": "2022-02-28T00:30:00.1234567Z", + "property1": { + "lastUpdateTime": "2022-02-28T00:30:00.1234567Z" + }, + "property2": { + "lastUpdateTime": "2022-02-28T00:30:00.1234567Z" + } + } + } + } + } +} diff --git a/specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/GetIncomingRelationship.json b/specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/GetIncomingRelationship.json new file mode 100644 index 000000000000..1b20e3a4d7aa --- /dev/null +++ b/specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/GetIncomingRelationship.json @@ -0,0 +1,27 @@ +{ + "parameters": { + "api-version": "2023-06-30", + "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/specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/GetRelationship.json b/specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/GetRelationship.json new file mode 100644 index 000000000000..ec85dc2e5658 --- /dev/null +++ b/specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/GetRelationship.json @@ -0,0 +1,31 @@ +{ + "parameters": { + "api-version": "2023-06-30", + "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/specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/GetRelationshipById.json b/specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/GetRelationshipById.json new file mode 100644 index 000000000000..b8a51e1f28df --- /dev/null +++ b/specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/GetRelationshipById.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "api-version": "2023-06-30", + "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/specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/GetRelationshipByRelationshipName.json b/specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/GetRelationshipByRelationshipName.json new file mode 100644 index 000000000000..c4f7bd8f6ee9 --- /dev/null +++ b/specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/GetRelationshipByRelationshipName.json @@ -0,0 +1,32 @@ +{ + "parameters": { + "api-version": "2023-06-30", + "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/specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/GetTwin.json b/specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/GetTwin.json new file mode 100644 index 000000000000..baf459fd1cea --- /dev/null +++ b/specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/GetTwin.json @@ -0,0 +1,38 @@ +{ + "parameters": { + "api-version": "2023-06-30", + "id": "myTwinId" + }, + "responses": { + "200": { + "body": { + "$dtId": "myTwinId", + "$etag": "W/\"9c2876c2-aff0-40b3-9fba-0c6be9d020a6\"", + "property1": 1, + "property2": { + "subProperty1": "some value", + "subProperty2": "some other value" + }, + "component1": { + "componentProperty": "some value", + "$metadata": { + "$lastUpdateTime": "2022-02-28T00:30:00.1234567Z", + "componentProperty": { + "lastUpdateTime": "2022-02-28T00:30:00.1234567Z" + } + } + }, + "$metadata": { + "$model": "dtmi:com:example:interfaces:interfaceName;1", + "$lastUpdateTime": "2022-02-28T00:30:00.1234567Z", + "property1": { + "lastUpdateTime": "2022-02-28T00:30:00.1234567Z" + }, + "property2": { + "lastUpdateTime": "2022-02-28T00:30:00.1234567Z" + } + } + } + } + } +} diff --git a/specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/ImportJobCancel.json b/specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/ImportJobCancel.json new file mode 100644 index 000000000000..a306ffad852b --- /dev/null +++ b/specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/ImportJobCancel.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "api-version": "2023-06-30", + "id": "importjob1" + }, + "responses": { + "200": { + "body": { + "id": "importjob1", + "inputBlobUri": "path to input blob", + "outputBlobUri": "path to output blob", + "createdDateTime": "2022-01-01T00:00:00.0000000+00:00", + "lastActionDateTime": "2022-01-01T00:01:00.0000000+00:00", + "purgeDateTime": "2022-01-31T00:01:00.0000000+00:00", + "status": "cancelling" + } + } + } +} diff --git a/specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/ImportJobDelete.json b/specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/ImportJobDelete.json new file mode 100644 index 000000000000..f3e503a1ea9a --- /dev/null +++ b/specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/ImportJobDelete.json @@ -0,0 +1,9 @@ +{ + "parameters": { + "id": "bulkimportjob1", + "api-version": "2023-06-30" + }, + "responses": { + "204": {} + } +} diff --git a/specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/ImportJobGet.json b/specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/ImportJobGet.json new file mode 100644 index 000000000000..4cfba4725012 --- /dev/null +++ b/specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/ImportJobGet.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "id": "importjob1", + "api-version": "2023-06-30" + }, + "responses": { + "200": { + "body": { + "id": "importjob1", + "inputBlobUri": "path to input blob", + "outputBlobUri": "path to output blob", + "createdDateTime": "2022-01-01T00:00:00.0000000+00:00", + "lastActionDateTime": "2022-01-01T00:01:00.0000000+00:00", + "finishedDateTime": "2022-01-01T00:01:00.0000000+00:00", + "purgeDateTime": "2022-01-31T00:01:00.0000000+00:00", + "status": "succeeded" + } + } + } +} diff --git a/specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/ImportJobList.json b/specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/ImportJobList.json new file mode 100644 index 000000000000..8a409895d931 --- /dev/null +++ b/specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/ImportJobList.json @@ -0,0 +1,34 @@ +{ + "parameters": { + "api-version": "2023-06-30" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "importjob1", + "inputBlobUri": "path to input blob", + "outputBlobUri": "path to output blob", + "createdDateTime": "2022-01-01T00:00:00.0000000+00:00", + "lastActionDateTime": "2022-01-01T00:01:00.0000000+00:00", + "finishedDateTime": "2022-01-01T00:01:00.0000000+00:00", + "purgeDateTime": "2022-01-31T00:01:00.0000000+00:00", + "status": "succeeded" + }, + { + "id": "importjob2", + "inputBlobUri": "path to input blob", + "outputBlobUri": "path to output blob", + "createdDateTime": "2022-01-01T00:00:00.0000000+00:00", + "lastActionDateTime": "2022-01-01T00:01:00.0000000+00:00", + "finishedDateTime": "2022-01-01T00:01:00.0000000+00:00", + "purgeDateTime": "2022-01-31T00:01:00.0000000+00:00", + "status": "succeeded" + } + ], + "nextLink": "url-to-next-page" + } + } + } +} diff --git a/specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/ImportJobPut.json b/specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/ImportJobPut.json new file mode 100644 index 000000000000..220e45310372 --- /dev/null +++ b/specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/ImportJobPut.json @@ -0,0 +1,23 @@ +{ + "parameters": { + "api-version": "2023-06-30", + "id": "importjob1", + "importJob": { + "inputBlobUri": "path to input blob", + "outputBlobUri": "path to output blob" + } + }, + "responses": { + "201": { + "body": { + "id": "importjob1", + "inputBlobUri": "path to input blob", + "outputBlobUri": "path to output blob", + "createdDateTime": "2022-01-01T00:00:00.0000000+00:00", + "lastActionDateTime": "2022-01-01T00:01:00.0000000+00:00", + "purgeDateTime": "2022-01-31T00:01:00.0000000+00:00", + "status": "notstarted" + } + } + } +} diff --git a/specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/ModelAdd.json b/specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/ModelAdd.json new file mode 100644 index 000000000000..cb2e8b3f1dd3 --- /dev/null +++ b/specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/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": "2023-06-30" + }, + "responses": { + "201": { + "body": [ + { + "id": "dtmi:com:example:Sample;1", + "displayName": { + "en": "Sample Interface" + }, + "uploadTime": "2022-02-28T00:30:00.1234567Z", + "decommissioned": false + } + ] + } + } +} diff --git a/specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/ModelGetById.json b/specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/ModelGetById.json new file mode 100644 index 000000000000..e7b4f4afc915 --- /dev/null +++ b/specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/ModelGetById.json @@ -0,0 +1,15 @@ +{ + "parameters": { + "id": "dtmi:com:example:Sample;1", + "api-version": "2023-06-30" + }, + "responses": { + "200": { + "body": { + "id": "dtmi:com:example:Sample;1", + "uploadTime": "2022-02-28T00:30:00.1234567Z", + "decommissioned": false + } + } + } +} diff --git a/specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/ModelGetByIdWithIncludeModelDefinition.json b/specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/ModelGetByIdWithIncludeModelDefinition.json new file mode 100644 index 000000000000..817556173770 --- /dev/null +++ b/specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/ModelGetByIdWithIncludeModelDefinition.json @@ -0,0 +1,41 @@ +{ + "parameters": { + "id": "dtmi:com:example:Sample;1", + "includeModelDefinition": true, + "api-version": "2023-06-30" + }, + "responses": { + "200": { + "body": { + "id": "dtmi:com:example:Sample;1", + "uploadTime": "2022-02-28T00:30:00.1234567Z", + "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/specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/ModelUpdateDecommissioned.json b/specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/ModelUpdateDecommissioned.json new file mode 100644 index 000000000000..941b92e9fadf --- /dev/null +++ b/specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/ModelUpdateDecommissioned.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "id": "dtmi:com:example:Sample;1", + "updateModel": [ + { + "op": "replace", + "path": "/decommissioned", + "value": true + } + ], + "api-version": "2023-06-30" + }, + "responses": { + "204": {} + } +} diff --git a/specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/ModelsGet.json b/specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/ModelsGet.json new file mode 100644 index 000000000000..5ceff66b5f4a --- /dev/null +++ b/specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/ModelsGet.json @@ -0,0 +1,35 @@ +{ + "parameters": { + "api-version": "2023-06-30" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "dtmi:com:example:Sample;1", + "uploadTime": "2022-02-28T00:30:00.1234567Z", + "decommissioned": false + }, + { + "id": "dtmi:com:example:SampleDeviceModel;1", + "displayName": { + "en": "My Device Model" + }, + "uploadTime": "2022-02-27T00:30:00.1234567Z", + "decommissioned": false + }, + { + "id": "dtmi:com:example:AnotherSample;1", + "displayName": { + "en": "My Sample" + }, + "uploadTime": "2022-02-26T00:30:00.1234567Z", + "decommissioned": false + } + ], + "nextLink": "url-to-next-page" + } + } + } +} diff --git a/specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/ModelsGetWithDependenciesAndIncludeModelDefinition.json b/specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/ModelsGetWithDependenciesAndIncludeModelDefinition.json new file mode 100644 index 000000000000..fae76ed64400 --- /dev/null +++ b/specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/ModelsGetWithDependenciesAndIncludeModelDefinition.json @@ -0,0 +1,70 @@ +{ + "parameters": { + "includeModelDefinition": true, + "dependenciesFor": [ + "dtmi:com:example:SampleDeviceModel;1" + ], + "x-ms-max-item-count": 20, + "api-version": "2023-06-30" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "dtmi:com:example:Sample;1", + "uploadTime": "2022-02-28T00:30:00.1234567Z", + "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": "2022-02-28T00:30:00.1234567Z", + "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/specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/PatchComponentAdvancedExample.json b/specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/PatchComponentAdvancedExample.json new file mode 100644 index 000000000000..2399d4bdd734 --- /dev/null +++ b/specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/PatchComponentAdvancedExample.json @@ -0,0 +1,31 @@ +{ + "parameters": { + "api-version": "2023-06-30", + "id": "myTwinId", + "componentPath": "myComponent", + "patchDocument": [ + { + "op": "add", + "path": "/property1", + "value": 1 + }, + { + "op": "replace", + "path": "/$metadata/property1/sourceTime", + "value": "2022-05-31T12:00:01.000125009Z" + }, + { + "op": "remove", + "path": "/property2" + }, + { + "op": "replace", + "path": "/property3/subProperty1", + "value": "new value" + } + ] + }, + "responses": { + "204": {} + } +} diff --git a/specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/PatchComponentBasicExample.json b/specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/PatchComponentBasicExample.json new file mode 100644 index 000000000000..df546b6cae4f --- /dev/null +++ b/specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/PatchComponentBasicExample.json @@ -0,0 +1,17 @@ +{ + "parameters": { + "api-version": "2023-06-30", + "id": "myTwinId", + "componentPath": "myComponent", + "patchDocument": [ + { + "op": "add", + "path": "/property", + "value": 1 + } + ] + }, + "responses": { + "204": {} + } +} diff --git a/specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/PatchRelationshipAdvancedExample.json b/specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/PatchRelationshipAdvancedExample.json new file mode 100644 index 000000000000..4141c0dcc824 --- /dev/null +++ b/specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/PatchRelationshipAdvancedExample.json @@ -0,0 +1,26 @@ +{ + "parameters": { + "api-version": "2023-06-30", + "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/specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/PatchRelationshipBasicExample.json b/specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/PatchRelationshipBasicExample.json new file mode 100644 index 000000000000..66dc3ebaf13d --- /dev/null +++ b/specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/PatchRelationshipBasicExample.json @@ -0,0 +1,17 @@ +{ + "parameters": { + "api-version": "2023-06-30", + "id": "myTwinId", + "relationshipId": "myRelationshipId", + "patchDocument": [ + { + "op": "add", + "path": "/property", + "value": 1 + } + ] + }, + "responses": { + "204": {} + } +} diff --git a/specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/PatchTwinAdvancedExample.json b/specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/PatchTwinAdvancedExample.json new file mode 100644 index 000000000000..7920ac634be1 --- /dev/null +++ b/specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/PatchTwinAdvancedExample.json @@ -0,0 +1,30 @@ +{ + "parameters": { + "api-version": "2023-06-30", + "id": "myNewTwinId", + "patchDocument": [ + { + "op": "replace", + "path": "/property1", + "value": 1 + }, + { + "op": "replace", + "path": "/$metadata/property1/sourceTime", + "value": "2022-05-31T12:00:01.000125009Z" + }, + { + "op": "add", + "path": "/property2/subProperty1", + "value": 1 + }, + { + "op": "remove", + "path": "/property3" + } + ] + }, + "responses": { + "204": {} + } +} diff --git a/specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/PatchTwinBasicExample.json b/specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/PatchTwinBasicExample.json new file mode 100644 index 000000000000..64e2654c6759 --- /dev/null +++ b/specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/PatchTwinBasicExample.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "api-version": "2023-06-30", + "id": "myNewTwinId", + "patchDocument": [ + { + "op": "replace", + "path": "/property1", + "value": 1 + } + ] + }, + "responses": { + "204": {} + } +} diff --git a/specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/PutTwinAdvancedExample.json b/specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/PutTwinAdvancedExample.json new file mode 100644 index 000000000000..5c98cbc6afa8 --- /dev/null +++ b/specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/PutTwinAdvancedExample.json @@ -0,0 +1,62 @@ +{ + "parameters": { + "api-version": "2023-06-30", + "id": "myNewTwinId", + "If-None-Match": "*", + "twin": { + "$metadata": { + "$model": "dtmi:com:example:interfaces:interfaceName;1", + "property1": { + "sourceTime": "2022-05-31T12:00:01.000125009Z" + } + }, + "property1": 1, + "property2": { + "subProperty1": "some value", + "subProperty2": "some other value" + }, + "component1": { + "$metadata": { + "componentProperty": { + "sourceTime": "2022-05-31T12:00:00.000125009Z" + } + }, + "componentProperty": "some value" + } + } + }, + "responses": { + "200": { + "body": { + "$dtId": "myNewTwinId", + "$etag": "W/\"9c2876c2-aff0-40b3-9fba-0c6be9d020a6\"", + "property1": 1, + "property2": { + "subProperty1": "some value", + "subProperty2": "some other value" + }, + "component1": { + "componentProperty": "some value", + "$metadata": { + "$lastUpdateTime": "2022-02-28T00:30:00.1234567Z", + "componentProperty": { + "lastUpdateTime": "2022-02-28T00:30:00.1234567Z", + "sourceTime": "2022-05-31T12:00:01.000125009Z" + } + } + }, + "$metadata": { + "$lastUpdateTime": "2022-02-28T00:30:00.1234567Z", + "$model": "dtmi:com:example:interfaces:interfaceName;1", + "property1": { + "lastUpdateTime": "2022-02-28T00:30:00.1234567Z", + "sourceTime": "2022-05-31T12:00:01.000125009Z" + }, + "property2": { + "lastUpdateTime": "2022-02-28T00:30:00.1234567Z" + } + } + } + } + } +} diff --git a/specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/PutTwinBasicExample.json b/specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/PutTwinBasicExample.json new file mode 100644 index 000000000000..0d7657c912ad --- /dev/null +++ b/specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/PutTwinBasicExample.json @@ -0,0 +1,22 @@ +{ + "parameters": { + "api-version": "2023-06-30", + "id": "myNewTwinId", + "twin": { + "$metadata": { + "$model": "dtmi:com:example:interfaces:interfaceName;1" + } + } + }, + "responses": { + "200": { + "body": { + "$dtId": "myNewTwinId", + "$metadata": { + "$model": "dtmi:com:example:interfaces:interfaceName;1", + "$lastUpdateTime": "2022-02-28T00:30:00.1234567Z" + } + } + } + } +} diff --git a/specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/QueryFirstPage.json b/specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/QueryFirstPage.json new file mode 100644 index 000000000000..e1ff664e7223 --- /dev/null +++ b/specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/QueryFirstPage.json @@ -0,0 +1,75 @@ +{ + "parameters": { + "querySpecification": { + "query": "SELECT * FROM DIGITALTWINS WHERE temp = 79" + }, + "api-version": "2023-06-30" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "$dtId": "Twin-01", + "$metadata": { + "$lastUpdateTime": "2022-02-28T00:30:00.1234567Z", + "$model": "dtmi:com:example:Sample;1", + "name": { + "lastUpdateTime": "2022-02-28T00:30:00.1234567Z" + }, + "temp": { + "lastUpdateTime": "2022-02-28T00:30:00.1234567Z" + }, + "comfortIndex": { + "lastUpdateTime": "2022-02-28T00:30:00.1234567Z" + } + }, + "name": "Sample01", + "temp": 79, + "comfortIndex": 50 + }, + { + "$dtId": "Twin-02", + "$metadata": { + "$lastUpdateTime": "2022-02-28T00:29:00.1234567Z", + "$model": "dtmi:com:example:Sample;1", + "name": { + "lastUpdateTime": "2022-02-28T00:29:00.1234567Z" + }, + "temp": { + "lastUpdateTime": "2022-02-28T00:29:00.1234567Z", + "sourceTime": "2022-05-31T12:00:00.000125009Z" + }, + "comfortIndex": { + "lastUpdateTime": "2022-02-28T00:29:00.1234567Z" + } + }, + "name": "Sample02", + "temp": 79, + "comfortIndex": 50 + }, + { + "$dtId": "Twin-03", + "$metadata": { + "$lastUpdateTime": "2022-02-28T00:31:00.1234567Z", + "$model": "dtmi:com:example:Sample;1", + "name": { + "lastUpdateTime": "2022-02-28T00:31:00.1234567Z" + }, + "temp": { + "lastUpdateTime": "2022-02-28T00:31:00.1234567Z" + }, + "comfortIndex": { + "lastUpdateTime": "2022-02-28T00:31:00.1234567Z" + } + }, + "name": "Sample03", + "temp": 79, + "comfortIndex": 50 + } + ], + "continuationToken": "" + } + } + } +} diff --git a/specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/QueryJoin.json b/specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/QueryJoin.json new file mode 100644 index 000000000000..6e5c656cc5f8 --- /dev/null +++ b/specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/QueryJoin.json @@ -0,0 +1,96 @@ +{ + "parameters": { + "querySpecification": { + "query": "SELECT Widget, Gadget FROM DIGITALTWINS Widget JOIN Gadget RELATED Widget.Contains WHERE Widget.$dtId = 'Twin-01'" + }, + "api-version": "2023-06-30" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "Widget": { + "$dtId": "Twin-01", + "$metadata": { + "$lastUpdateTime": "2022-02-28T00:30:00.1234567Z", + "$model": "dtmi:com:example:Sample;1", + "name": { + "lastUpdateTime": "2022-02-28T00:30:00.1234567Z" + }, + "temp": { + "lastUpdateTime": "2022-02-28T00:30:00.1234567Z" + }, + "comfortIndex": { + "lastUpdateTime": "2022-02-28T00:30:00.1234567Z" + } + }, + "name": "Sample01", + "temp": 79, + "comfortIndex": 50 + }, + "Gadget": { + "$dtId": "Twin-02", + "$metadata": { + "$lastUpdateTime": "2022-02-28T00:30:00.1234567Z", + "$model": "dtmi:com:example:Sample;1", + "name": { + "lastUpdateTime": "2022-02-28T00:30:00.1234567Z" + }, + "temp": { + "lastUpdateTime": "2022-02-28T00:30:00.1234567Z" + }, + "comfortIndex": { + "lastUpdateTime": "2022-02-28T00:30:00.1234567Z" + } + }, + "name": "Sample02", + "temp": 79, + "comfortIndex": 50 + } + }, + { + "Widget": { + "$dtId": "Twin-01", + "$metadata": { + "$lastUpdateTime": "2022-02-28T00:30:00.1234567Z", + "$model": "dtmi:com:example:Sample;1", + "name": { + "lastUpdateTime": "2022-02-28T00:30:00.1234567Z" + }, + "temp": { + "lastUpdateTime": "2022-02-28T00:30:00.1234567Z" + }, + "comfortIndex": { + "lastUpdateTime": "2022-02-28T00:30:00.1234567Z" + } + }, + "name": "Sample01", + "temp": 79, + "comfortIndex": 50 + }, + "Gadget": { + "$dtId": "Twin-10", + "$metadata": { + "$lastUpdateTime": "2022-02-28T00:30:00.1234567Z", + "$model": "dtmi:com:example:Sample;1", + "name": { + "lastUpdateTime": "2022-02-28T00:30:00.1234567Z" + }, + "temp": { + "lastUpdateTime": "2022-02-28T00:30:00.1234567Z" + }, + "comfortIndex": { + "lastUpdateTime": "2022-02-28T00:30:00.1234567Z" + } + }, + "name": "Sample10", + "temp": 79, + "comfortIndex": 50 + } + } + ] + } + } + } +} diff --git a/specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/QueryNextPage.json b/specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/QueryNextPage.json new file mode 100644 index 000000000000..accc3899066a --- /dev/null +++ b/specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/QueryNextPage.json @@ -0,0 +1,73 @@ +{ + "parameters": { + "querySpecification": { + "continuationToken": "" + }, + "api-version": "2023-06-30" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "$dtId": "Twin-04", + "$metadata": { + "$lastUpdateTime": "2022-02-28T00:30:00.1234567Z", + "$model": "dtmi:com:example:Sample;1", + "name": { + "lastUpdateTime": "2022-02-28T00:30:00.1234567Z" + }, + "temp": { + "lastUpdateTime": "2022-02-28T00:30:00.1234567Z" + }, + "comfortIndex": { + "lastUpdateTime": "2022-02-28T00:30:00.1234567Z" + } + }, + "name": "Sample04", + "temp": 79, + "comfortIndex": 50 + }, + { + "$dtId": "Twin-05", + "$metadata": { + "$lastUpdateTime": "2022-02-28T00:30:00.1234567Z", + "$model": "dtmi:com:example:Sample;1", + "name": { + "lastUpdateTime": "2022-02-28T00:30:00.1234567Z" + }, + "temp": { + "lastUpdateTime": "2022-02-28T00:30:00.1234567Z" + }, + "comfortIndex": { + "lastUpdateTime": "2022-02-28T00:30:00.1234567Z" + } + }, + "name": "Sample05", + "temp": 79, + "comfortIndex": 50 + }, + { + "$dtId": "Twin-06", + "$metadata": { + "$lastUpdateTime": "2022-02-28T00:30:00.1234567Z", + "$model": "dtmi:com:example:Sample;1", + "name": { + "lastUpdateTime": "2022-02-28T00:30:00.1234567Z" + }, + "temp": { + "lastUpdateTime": "2022-02-28T00:30:00.1234567Z" + }, + "comfortIndex": { + "lastUpdateTime": "2022-02-28T00:30:00.1234567Z" + } + }, + "name": "Sample06", + "temp": 79, + "comfortIndex": 50 + } + ] + } + } + } +} diff --git a/specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/SendTelemetry.json b/specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/SendTelemetry.json new file mode 100644 index 000000000000..c8900049ff9e --- /dev/null +++ b/specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/SendTelemetry.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "api-version": "2023-06-30", + "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/specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/SendTelemetryFromComponent.json b/specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/SendTelemetryFromComponent.json new file mode 100644 index 000000000000..f461f295f220 --- /dev/null +++ b/specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/examples/SendTelemetryFromComponent.json @@ -0,0 +1,15 @@ +{ + "parameters": { + "api-version": "2023-06-30", + "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": {} + } +} diff --git a/specification/digitaltwins/data-plane/readme.md b/specification/digitaltwins/data-plane/readme.md index a840a9a9e68a..6b1ef0e9a847 100644 --- a/specification/digitaltwins/data-plane/readme.md +++ b/specification/digitaltwins/data-plane/readme.md @@ -26,7 +26,16 @@ These are the global settings for Azure Digital Twins. ``` yaml openapi-type: data-plane -tag: package-preview-2023-02-27 +tag: package-2023-06-30 +``` + +### Tag: package-2023-06-30 + +These settings apply only when `--tag=package-2023-06-30` is specified on the command line. + +``` yaml $(tag) == 'package-2023-06-30' +input-file: + - Microsoft.DigitalTwins/stable/2023-06-30/digitaltwins.json ``` ### Tag: package-preview-2023-02-27 diff --git a/specification/digitaltwins/data-plane/readme.python.md b/specification/digitaltwins/data-plane/readme.python.md index 6bd18c8c3f10..8f8c8dd47bf7 100644 --- a/specification/digitaltwins/data-plane/readme.python.md +++ b/specification/digitaltwins/data-plane/readme.python.md @@ -12,6 +12,17 @@ python: clear-output-folder: true ``` +### Tag: package-2023-06-30 +These settings apply only when `--tag=package-2023-06-30` is specified on the command line. + +```yaml $(tag) == 'package-2023-06-30' && $(python) +python: + namespace: Azure.DigitalTwins.Core + package-name: digitaltwins + package-version: 2023-06-30 + output-folder: $(python-sdks-folder)/digitaltwins/2023-06-30 +``` + ### Tag: package-2022-05-31 These settings apply only when `--tag=package-2022-05-31` is specified on the command line. From 5c3b94b66c688268d7833a2acbff72bb21f6c091 Mon Sep 17 00:00:00 2001 From: Abhinav Ghai Date: Mon, 15 May 2023 14:48:34 -0700 Subject: [PATCH 2/2] Add x-ms-error-code to header --- .../stable/2023-06-30/digitaltwins.json | 174 ++++++++++++++++++ 1 file changed, 174 insertions(+) diff --git a/specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/digitaltwins.json b/specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/digitaltwins.json index 448cf701c84e..a3cd086df093 100644 --- a/specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/digitaltwins.json +++ b/specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2023-06-30/digitaltwins.json @@ -64,6 +64,12 @@ }, "default": { "description": "Default response.", + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "Error code for specific error that occurred." + } + }, "schema": { "$ref": "#/definitions/ErrorResponse" } @@ -118,6 +124,12 @@ }, "default": { "description": "Default response.", + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "Error code for specific error that occurred." + } + }, "schema": { "$ref": "#/definitions/ErrorResponse" } @@ -168,6 +180,12 @@ }, "default": { "description": "Default response.", + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "Error code for specific error that occurred." + } + }, "schema": { "$ref": "#/definitions/ErrorResponse" } @@ -214,6 +232,12 @@ }, "default": { "description": "Default response.", + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "Error code for specific error that occurred." + } + }, "schema": { "$ref": "#/definitions/ErrorResponse" } @@ -245,6 +269,12 @@ }, "default": { "description": "Default response.", + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "Error code for specific error that occurred." + } + }, "schema": { "$ref": "#/definitions/ErrorResponse" } @@ -310,6 +340,12 @@ }, "default": { "description": "Default response.", + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "Error code for specific error that occurred." + } + }, "schema": { "$ref": "#/definitions/ErrorResponse" } @@ -360,6 +396,12 @@ }, "default": { "description": "Default response.", + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "Error code for specific error that occurred." + } + }, "schema": { "$ref": "#/definitions/ErrorResponse" } @@ -415,6 +457,12 @@ }, "default": { "description": "Default response.", + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "Error code for specific error that occurred." + } + }, "schema": { "$ref": "#/definitions/ErrorResponse" } @@ -449,6 +497,12 @@ }, "default": { "description": "Default response.", + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "Error code for specific error that occurred." + } + }, "schema": { "$ref": "#/definitions/ErrorResponse" } @@ -507,6 +561,12 @@ }, "default": { "description": "Default response.", + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "Error code for specific error that occurred." + } + }, "schema": { "$ref": "#/definitions/ErrorResponse" } @@ -560,6 +620,12 @@ }, "default": { "description": "Default response.", + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "Error code for specific error that occurred." + } + }, "schema": { "$ref": "#/definitions/ErrorResponse" } @@ -618,6 +684,12 @@ }, "default": { "description": "Default response.", + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "Error code for specific error that occurred." + } + }, "schema": { "$ref": "#/definitions/ErrorResponse" } @@ -655,6 +727,12 @@ }, "default": { "description": "Default response.", + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "Error code for specific error that occurred." + } + }, "schema": { "$ref": "#/definitions/ErrorResponse" } @@ -716,6 +794,12 @@ }, "default": { "description": "Default response.", + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "Error code for specific error that occurred." + } + }, "schema": { "$ref": "#/definitions/ErrorResponse" } @@ -773,6 +857,12 @@ }, "default": { "description": "Default response.", + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "Error code for specific error that occurred." + } + }, "schema": { "$ref": "#/definitions/ErrorResponse" } @@ -820,6 +910,12 @@ }, "default": { "description": "Default response.", + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "Error code for specific error that occurred." + } + }, "schema": { "$ref": "#/definitions/ErrorResponse" } @@ -884,6 +980,12 @@ }, "default": { "description": "Default response.", + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "Error code for specific error that occurred." + } + }, "schema": { "$ref": "#/definitions/ErrorResponse" } @@ -951,6 +1053,12 @@ }, "default": { "description": "Default response.", + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "Error code for specific error that occurred." + } + }, "schema": { "$ref": "#/definitions/ErrorResponse" } @@ -1004,6 +1112,12 @@ }, "default": { "description": "Default response.", + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "Error code for specific error that occurred." + } + }, "schema": { "$ref": "#/definitions/ErrorResponse" } @@ -1065,6 +1179,12 @@ }, "default": { "description": "Default response.", + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "Error code for specific error that occurred." + } + }, "schema": { "$ref": "#/definitions/ErrorResponse" } @@ -1109,6 +1229,12 @@ }, "default": { "description": "Default response.", + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "Error code for specific error that occurred." + } + }, "schema": { "$ref": "#/definitions/ErrorResponse" } @@ -1156,6 +1282,12 @@ }, "default": { "description": "Default response.", + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "Error code for specific error that occurred." + } + }, "schema": { "$ref": "#/definitions/ErrorResponse" } @@ -1199,6 +1331,12 @@ }, "default": { "description": "Default response.", + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "Error code for specific error that occurred." + } + }, "schema": { "$ref": "#/definitions/ErrorResponse" } @@ -1230,6 +1368,12 @@ }, "default": { "description": "Default response.", + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "Error code for specific error that occurred." + } + }, "schema": { "$ref": "#/definitions/ErrorResponse" } @@ -1274,6 +1418,12 @@ }, "default": { "description": "Default response.", + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "Error code for specific error that occurred." + } + }, "schema": { "$ref": "#/definitions/ErrorResponse" } @@ -1330,6 +1480,12 @@ }, "default": { "description": "Default response.", + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "Error code for specific error that occurred." + } + }, "schema": { "$ref": "#/definitions/ErrorResponse" } @@ -1364,6 +1520,12 @@ }, "default": { "description": "Default response.", + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "Error code for specific error that occurred." + } + }, "schema": { "$ref": "#/definitions/ErrorResponse" } @@ -1395,6 +1557,12 @@ }, "default": { "description": "Default response.", + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "Error code for specific error that occurred." + } + }, "schema": { "$ref": "#/definitions/ErrorResponse" } @@ -1439,6 +1607,12 @@ }, "default": { "description": "Default response.", + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "Error code for specific error that occurred." + } + }, "schema": { "$ref": "#/definitions/ErrorResponse" }