{ "swagger": "2.0", "info": { "version": "2020-05-31-preview", "title": "Azure Digital Twins API", "description": "A service for managing and querying digital twins and digital twin models." }, "host": "digitaltwins-name.digitaltwins.azure.net", "schemes": [ "https" ], "produces": [ "application/json" ], "consumes": [ "application/json" ], "paths": { "/models": { "post": { "tags": [ "Models" ], "description": "Uploads one or more models. When any error occurs, no models are uploaded.\nStatus codes:\n200 (OK): Success.\n400 (Bad Request): The request is invalid.\n409 (Conflict): One or more of the provided models already exist.", "operationId": "DigitalTwinModels_Add", "x-ms-examples": { "ModelAdd": { "$ref": "./examples/ModelAdd.json" } }, "parameters": [ { "name": "models", "in": "body", "description": "An array of models to add.", "required": false, "schema": { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "type": "object" } } }, { "$ref": "#/parameters/api-version" } ], "responses": { "201": { "description": "Success", "schema": { "$ref": "#/definitions/NonPagedModelDataCollection" } }, "default": { "description": "Default response.", "schema": { "$ref": "#/definitions/ErrorResponse" } } } }, "get": { "tags": [ "Models" ], "description": "Retrieves model metadata and, optionally, model definitions.\nStatus codes:\n200 (OK): Success.\n400 (Bad Request): The request is invalid.", "x-ms-pageable": { "nextLinkName": "nextLink" }, "operationId": "DigitalTwinModels_List", "x-ms-examples": { "ModelsGet": { "$ref": "./examples/ModelsGet.json" }, "ModelsGetWithContextAndIncludeModelDefinition": { "$ref": "./examples/ModelsGetWithDependenciesAndIncludeModelDefinition.json" } }, "parameters": [ { "name": "dependenciesFor", "in": "query", "description": "The set of the models which will have their dependencies retrieved. If omitted, all models are retrieved.", "required": false, "type": "array", "collectionFormat": "multi", "items": { "type": "string" } }, { "$ref": "#/parameters/includeModelDefinition" }, { "$ref": "#/parameters/max-item-count" }, { "$ref": "#/parameters/api-version" } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/PagedModelDataCollection" } }, "default": { "description": "Default response.", "schema": { "$ref": "#/definitions/ErrorResponse" } } } } }, "/models/{id}": { "get": { "tags": [ "Models" ], "description": "Retrieves model metadata and optionally the model definition.\nStatus codes:\n200 (OK): Success.\n404 (Not Found): There is no model with the provided id.", "operationId": "DigitalTwinModels_GetById", "x-ms-examples": { "ModelGetById": { "$ref": "./examples/ModelGetById.json" }, "ModelGetByIdWithIncludeModelDefinition": { "$ref": "./examples/ModelGetByIdWithIncludeModelDefinition.json" } }, "parameters": [ { "$ref": "#/parameters/modelId" }, { "$ref": "#/parameters/includeModelDefinition" }, { "$ref": "#/parameters/api-version" } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/ModelData" } }, "default": { "description": "Default response.", "schema": { "$ref": "#/definitions/ErrorResponse" } } } }, "patch": { "tags": [ "Models" ], "description": "Updates the metadata for a model.\nStatus codes:\n200 (OK): Success.\n400 (Bad Request): The request is invalid.\n404 (Not Found): There is no model with the provided id.", "operationId": "DigitalTwinModels_Update", "consumes": [ "application/json-patch+json" ], "x-ms-examples": { "ModelUpdateDecommissioned": { "$ref": "./examples/ModelUpdateDecommissioned.json" } }, "parameters": [ { "$ref": "#/parameters/modelId" }, { "name": "updateModel", "description": "An update specification described by JSON Patch. Only the decommissioned property can be replaced.", "in": "body", "required": true, "schema": { "type": "array", "items": { "type": "object" } } }, { "$ref": "#/parameters/api-version" } ], "responses": { "204": { "description": "Success" }, "default": { "description": "Default response.", "schema": { "$ref": "#/definitions/ErrorResponse" } } } }, "delete": { "tags": [ "Models" ], "operationId": "DigitalTwinModels_Delete", "description": "Deletes a model. A model can only be deleted if no other models reference it.\nStatus codes:\n204 (No Content): Success.\n400 (Bad Request): The request is invalid.\n404 (Not Found): There is no model with the provided id.\n409 (Conflict): There are dependencies on the model that prevent it from being deleted.", "x-ms-examples": { "DeleteModel": { "$ref": "./examples/DeleteModel.json" } }, "parameters": [ { "$ref": "#/parameters/modelId" }, { "$ref": "#/parameters/api-version" } ], "responses": { "204": { "description": "Success" }, "default": { "description": "Default response.", "schema": { "$ref": "#/definitions/ErrorResponse" } } } } }, "/query": { "post": { "tags": [ "Query" ], "operationId": "Query_QueryTwins", "description": "Executes a query that allows traversing relationships and filtering by property values.\nStatus codes:\n200 (OK): Success.\n400 (Bad Request): The request is invalid.", "x-ms-examples": { "QueryFirstPage": { "$ref": "./examples/QueryFirstPage.json" }, "QueryNextPage": { "$ref": "./examples/QueryNextPage.json" }, "QueryJoin": { "$ref": "./examples/QueryJoin.json" } }, "parameters": [ { "name": "querySpecification", "in": "body", "description": "The query specification to execute.", "required": true, "schema": { "$ref": "#/definitions/QuerySpecification" } }, { "$ref": "#/parameters/api-version" } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/QueryResult" }, "headers": { "query-charge": { "description": "The query charge.", "type": "number" } } }, "default": { "description": "Default response.", "schema": { "$ref": "#/definitions/ErrorResponse" } } } } }, "/digitaltwins/{id}": { "get": { "tags": [ "Twins" ], "operationId": "DigitalTwins_GetById", "description": "Retrieves a digital twin.\nStatus codes:\n200 (OK): Success.\n404 (Not Found): There is no digital twin with the provided id.", "x-ms-examples": { "GetTwin": { "$ref": "./examples/GetTwin.json" } }, "parameters": [ { "$ref": "#/parameters/digitalTwinId" }, { "$ref": "#/parameters/api-version" } ], "responses": { "200": { "description": "Success", "schema": { "type": "object" }, "headers": { "ETag": { "description": "Weak Etag.", "type": "string" } } }, "default": { "description": "Default response.", "schema": { "$ref": "#/definitions/ErrorResponse" } } } }, "put": { "tags": [ "Twins" ], "operationId": "DigitalTwins_Add", "description": "Adds or replaces a digital twin.\nStatus codes:\n200 (OK): Success.\n400 (Bad Request): The request is invalid.\n412 (Precondition Failed): The model is decommissioned or the digital twin already exists (when using If-None-Match: *).", "x-ms-examples": { "PutTwinBasicExample": { "$ref": "./examples/PutTwinBasicExample.json" }, "PutTwinAdvancedExample": { "$ref": "./examples/PutTwinAdvancedExample.json" } }, "parameters": [ { "$ref": "#/parameters/digitalTwinId" }, { "name": "twin", "description": "The digital twin instance being added. If provided, the $dtId property is ignored.", "in": "body", "required": true, "schema": { "type": "object" } }, { "$ref": "#/parameters/if-none-match-star" }, { "$ref": "#/parameters/api-version" } ], "responses": { "200": { "description": "Success", "schema": { "type": "object" }, "headers": { "ETag": { "description": "Weak Etag.", "type": "string" } } }, "202": { "description": "Asynchronous Success" }, "default": { "description": "Default response.", "schema": { "$ref": "#/definitions/ErrorResponse" } } } }, "delete": { "tags": [ "Twins" ], "operationId": "DigitalTwins_Delete", "description": "Deletes a digital twin. All relationships referencing the digital twin must already be deleted.\nStatus codes:\n200 (OK): Success.\n400 (Bad Request): The request is invalid.\n404 (Not Found): There is no digital twin with the provided id.", "x-ms-examples": { "DeleteTwin": { "$ref": "./examples/DeleteTwin.json" } }, "parameters": [ { "$ref": "#/parameters/digitalTwinId" }, { "$ref": "#/parameters/if-match" }, { "$ref": "#/parameters/api-version" } ], "responses": { "204": { "description": "Success" }, "default": { "description": "Default response.", "schema": { "$ref": "#/definitions/ErrorResponse" } } } }, "patch": { "tags": [ "Twins" ], "operationId": "DigitalTwins_Update", "description": "Updates a digital twin.\nStatus codes:\n200 (OK): Success.\n400 (Bad Request): The request is invalid.\n404 (Not Found): There is no digital twin with the provided id.", "consumes": [ "application/json-patch+json" ], "x-ms-examples": { "PatchTwinBasicExample": { "$ref": "./examples/PatchTwinBasicExample.json" }, "PatchTwinAdvancedExample": { "$ref": "./examples/PatchTwinAdvancedExample.json" } }, "parameters": [ { "$ref": "#/parameters/digitalTwinId" }, { "name": "patchDocument", "description": "An update specification described by JSON Patch. Updates to property values and $model elements may happen in the same request. Operations are limited to add, replace and remove.", "in": "body", "required": true, "schema": { "type": "array", "items": { "type": "object" } } }, { "$ref": "#/parameters/if-match" }, { "$ref": "#/parameters/api-version" } ], "responses": { "204": { "description": "Success", "headers": { "ETag": { "description": "Weak Etag.", "type": "string" } } }, "202": { "description": "Asynchronous Success" }, "default": { "description": "Default response.", "schema": { "$ref": "#/definitions/ErrorResponse" } } } } }, "/digitaltwins/{id}/relationships/{relationshipId}": { "get": { "tags": [ "Twins" ], "operationId": "DigitalTwins_GetRelationshipById", "description": "Retrieves a relationship between two digital twins.\nStatus codes:\n200 (OK): Success.\n404 (Not Found): There is either no digital twin or relationship with the provided id.", "x-ms-examples": { "GetRelationshipById": { "$ref": "./examples/GetRelationshipById.json" } }, "parameters": [ { "$ref": "#/parameters/digitalTwinId" }, { "$ref": "#/parameters/relationshipId" }, { "$ref": "#/parameters/api-version" } ], "responses": { "200": { "description": "Success", "schema": { "type": "object" }, "headers": { "ETag": { "description": "Weak Etag.", "type": "string" } } }, "default": { "description": "Default response.", "schema": { "$ref": "#/definitions/ErrorResponse" } } } }, "put": { "tags": [ "Twins" ], "operationId": "DigitalTwins_AddRelationship", "description": "Adds a relationship between two digital twins.\nStatus codes:\n200 (OK): Success.\n400 (Bad Request): The request is invalid.\n404 (Not Found): There is either no digital twin, target digital twin, or relationship with the provided id.\n409 (Conflict): A relationship with the provided id already exists.", "x-ms-examples": { "CreateRelationshipBasicExample": { "$ref": "./examples/CreateRelationshipBasicExample.json" }, "CreateRelationshipAdvancedExample": { "$ref": "./examples/CreateRelationshipAdvancedExample.json" } }, "parameters": [ { "$ref": "#/parameters/digitalTwinId" }, { "$ref": "#/parameters/relationshipId" }, { "name": "relationship", "in": "body", "description": "The data for the relationship.", "required": false, "schema": { "type": "object" } }, { "$ref": "#/parameters/if-none-match-star" }, { "$ref": "#/parameters/api-version" } ], "responses": { "200": { "description": "Success", "schema": { "type": "object" }, "headers": { "ETag": { "description": "Weak Etag.", "type": "string" } } }, "default": { "description": "Default response.", "schema": { "$ref": "#/definitions/ErrorResponse" } } } }, "delete": { "tags": [ "Twins" ], "operationId": "DigitalTwins_DeleteRelationship", "description": "Deletes a relationship between two digital twins.\nStatus codes:\n200 (OK): Success.\n404 (Not Found): There is either no digital twin or relationship with the provided id.", "x-ms-examples": { "DeleteRelationship": { "$ref": "./examples/DeleteRelationship.json" } }, "parameters": [ { "$ref": "#/parameters/digitalTwinId" }, { "$ref": "#/parameters/relationshipId" }, { "$ref": "#/parameters/if-match" }, { "$ref": "#/parameters/api-version" } ], "responses": { "204": { "description": "Success" }, "default": { "description": "Default response.", "schema": { "$ref": "#/definitions/ErrorResponse" } } } }, "patch": { "tags": [ "Twins" ], "consumes": [ "application/json-patch+json" ], "operationId": "DigitalTwins_UpdateRelationship", "description": "Updates the properties on a relationship between two digital twins.\nStatus codes:\n200 (OK): Success.\n400 (Bad Request): The request is invalid.\n404 (Not Found): There is either no digital twin or relationship with the provided id.", "x-ms-examples": { "PatchRelationshipBasicExample": { "$ref": "./examples/PatchRelationshipBasicExample.json" }, "PatchRelationshipAdvancedExample": { "$ref": "./examples/PatchRelationshipAdvancedExample.json" } }, "parameters": [ { "$ref": "#/parameters/digitalTwinId" }, { "$ref": "#/parameters/relationshipId" }, { "name": "patchDocument", "description": "JSON Patch description of the update to the relationship properties.", "in": "body", "required": false, "schema": { "type": "array", "items": { "type": "object" } } }, { "$ref": "#/parameters/if-match" }, { "$ref": "#/parameters/api-version" } ], "responses": { "204": { "description": "Success", "headers": { "ETag": { "description": "Weak Etag.", "type": "string" } } }, "default": { "description": "Default response.", "schema": { "$ref": "#/definitions/ErrorResponse" } } } } }, "/digitaltwins/{id}/relationships": { "get": { "tags": [ "Twins" ], "operationId": "DigitalTwins_ListRelationships", "description": "Retrieves the relationships from a digital twin.\nStatus codes:\n200 (OK): Success.\n400 (Bad Request): The request is invalid.\n404 (Not Found): There is no digital twin with the provided id.", "x-ms-pageable": { "nextLinkName": "nextLink" }, "x-ms-examples": { "GetRelationship": { "$ref": "./examples/GetRelationship.json" }, "GetRelationshipByName": { "$ref": "./examples/GetRelationshipByRelationshipName.json" } }, "parameters": [ { "$ref": "#/parameters/digitalTwinId" }, { "name": "relationshipName", "description": "The name of the relationship.", "in": "query", "required": false, "type": "string" }, { "$ref": "#/parameters/api-version" } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/RelationshipCollection" } }, "default": { "description": "Default response.", "schema": { "$ref": "#/definitions/ErrorResponse" } } } } }, "/digitaltwins/{id}/incomingrelationships": { "get": { "tags": [ "Twins" ], "operationId": "DigitalTwins_ListIncomingRelationships", "description": "Retrieves all incoming relationship for a digital twin.\nStatus codes:\n200 (OK): Success.\n400 (Bad Request): The request is invalid.\n404 (Not Found): There is no digital twin with the provided id.", "x-ms-pageable": { "nextLinkName": "nextLink" }, "x-ms-examples": { "GetIncomingRelationship": { "$ref": "./examples/GetIncomingRelationship.json" } }, "parameters": [ { "$ref": "#/parameters/digitalTwinId" }, { "$ref": "#/parameters/api-version" } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/IncomingRelationshipCollection" } }, "default": { "description": "Default response.", "schema": { "$ref": "#/definitions/ErrorResponse" } } } } }, "/digitaltwins/{id}/telemetry": { "post": { "tags": [ "Twins" ], "operationId": "DigitalTwins_SendTelemetry", "description": "Sends telemetry on behalf of a digital twin.\nStatus codes:\n200 (OK): Success.\n400 (Bad Request): The request is invalid.\n404 (Not Found): There is no digital twin with the provided id.", "x-ms-examples": { "SendTelemetry": { "$ref": "./examples/SendTelemetry.json" } }, "parameters": [ { "$ref": "#/parameters/digitalTwinId" }, { "name": "telemetry", "in": "body", "description": "The telemetry measurements to send from the digital twin.", "required": true, "schema": { "type": "object" } }, { "name": "dt-id", "in": "header", "description": "A unique message identifier (in the scope of the digital twin id) that is commonly used for de-duplicating messages.", "required": true, "type": "string" }, { "name": "dt-timestamp", "in": "header", "description": "An RFC 3339 timestamp that identifies the time the telemetry was measured.", "required": false, "type": "string" }, { "$ref": "#/parameters/api-version" } ], "responses": { "204": { "description": "Success" }, "default": { "description": "Default response.", "schema": { "$ref": "#/definitions/ErrorResponse" } } } } }, "/digitaltwins/{id}/components/{componentPath}/telemetry": { "post": { "tags": [ "Twins" ], "operationId": "DigitalTwins_SendComponentTelemetry", "description": "Sends telemetry on behalf of a component in a digital twin.\nStatus codes:\n200 (OK): Success.\n400 (Bad Request): The request is invalid.\n404 (Not Found): There is either no digital twin with the provided id or the component path is invalid.", "x-ms-examples": { "SendTelemetry": { "$ref": "./examples/SendTelemetryFromComponent.json" } }, "parameters": [ { "$ref": "#/parameters/digitalTwinId" }, { "$ref": "#/parameters/componentPath" }, { "name": "telemetry", "in": "body", "description": "The telemetry measurements to send from the digital twin's component.", "required": true, "schema": { "type": "object" } }, { "name": "dt-id", "in": "header", "description": "A unique message identifier (in the scope of the digital twin id) that is commonly used for de-duplicating messages.", "required": true, "type": "string" }, { "name": "dt-timestamp", "in": "header", "description": "An RFC 3339 timestamp that identifies the time the telemetry was measured.", "required": false, "type": "string" }, { "$ref": "#/parameters/api-version" } ], "responses": { "204": { "description": "Success" }, "default": { "description": "Default response.", "schema": { "$ref": "#/definitions/ErrorResponse" } } } } }, "/digitaltwins/{id}/components/{componentPath}": { "get": { "tags": [ "Twins" ], "operationId": "DigitalTwins_GetComponent", "description": "Retrieves a component from a digital twin.\nStatus codes:\n200 (OK): Success.\n404 (Not Found): There is either no digital twin with the provided id or the component path is invalid.", "x-ms-examples": { "GetComponent": { "$ref": "./examples/GetComponent.json" } }, "parameters": [ { "$ref": "#/parameters/digitalTwinId" }, { "$ref": "#/parameters/componentPath" }, { "$ref": "#/parameters/api-version" } ], "responses": { "200": { "description": "Success", "schema": { "type": "object" }, "headers": { "ETag": { "description": "Weak Etag.", "type": "string" } } }, "default": { "description": "Default response.", "schema": { "$ref": "#/definitions/ErrorResponse" } } } }, "patch": { "tags": [ "Twins" ], "operationId": "DigitalTwins_UpdateComponent", "description": "Updates a component on a digital twin.\nStatus codes:\n200 (OK): Success.\n400 (Bad Request): The request is invalid.\n404 (Not Found): There is either no digital twin with the provided id or the component path is invalid.", "x-ms-examples": { "PatchComponentBasicExample": { "$ref": "./examples/PatchComponentBasicExample.json" }, "PatchComponentAdvancedExample": { "$ref": "./examples/PatchComponentAdvancedExample.json" } }, "consumes": [ "application/json-patch+json" ], "parameters": [ { "$ref": "#/parameters/digitalTwinId" }, { "$ref": "#/parameters/componentPath" }, { "name": "patchDocument", "description": "An update specification described by JSON Patch. Updates to property values and $model elements may happen in the same request. Operations are limited to add, replace and remove.", "in": "body", "required": false, "schema": { "type": "array", "items": { "type": "object" } } }, { "$ref": "#/parameters/if-match" }, { "$ref": "#/parameters/api-version" } ], "responses": { "204": { "description": "Success", "headers": { "ETag": { "description": "Weak Etag.", "type": "string" } } }, "202": { "description": "Asynchronous Success" }, "default": { "description": "Default response.", "schema": { "$ref": "#/definitions/ErrorResponse" } } } } }, "/eventroutes": { "get": { "tags": [ "EventRoutes" ], "description": "Retrieves all event routes.\nStatus codes:\n200 (OK): Success.\n400 (Bad Request): The request is invalid.", "operationId": "EventRoutes_List", "x-ms-examples": { "EventRoutesList": { "$ref": "./examples/EventRoutesList.json" } }, "parameters": [ { "$ref": "#/parameters/max-item-count" }, { "$ref": "#/parameters/api-version" } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/EventRouteCollection" } }, "default": { "description": "Default response.", "schema": { "$ref": "#/definitions/ErrorResponse" } } }, "x-ms-pageable": { "nextLinkName": "nextLink" } } }, "/eventroutes/{id}": { "get": { "tags": [ "EventRoutes" ], "description": "Retrieves an event route.\nStatus codes:\n200 (OK): Success.\n404 (Not Found): There is no event route with the provided id.", "operationId": "EventRoutes_GetById", "x-ms-examples": { "EventRouteGet": { "$ref": "./examples/EventRouteGet.json" } }, "parameters": [ { "$ref": "#/parameters/eventRouteId" }, { "$ref": "#/parameters/api-version" } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/EventRoute" } }, "default": { "description": "Default response.", "schema": { "$ref": "#/definitions/ErrorResponse" } } } }, "put": { "tags": [ "EventRoutes" ], "description": "Adds or replaces an event route.\nStatus codes:\n200 (OK): Success.\n400 (Bad Request): The request is invalid.", "operationId": "EventRoutes_Add", "x-ms-examples": { "EventRoutePut": { "$ref": "./examples/EventRoutePut.json" }, "EventRouteWithFilter": { "$ref": "./examples/EventRoutePutWithFilter.json" } }, "parameters": [ { "$ref": "#/parameters/eventRouteId" }, { "name": "eventRoute", "description": "The event route data", "in": "body", "schema": { "$ref": "#/definitions/EventRoute" } }, { "$ref": "#/parameters/api-version" } ], "responses": { "204": { "description": "Success" }, "default": { "description": "Default response.", "schema": { "$ref": "#/definitions/ErrorResponse" } } } }, "delete": { "tags": [ "EventRoutes" ], "description": "Deletes an event route.\nStatus codes:\n200 (OK): Success.\n404 (Not Found): There is no event route with the provided id.", "operationId": "EventRoutes_Delete", "x-ms-examples": { "EventRouteDelete": { "$ref": "./examples/EventRouteDelete.json" } }, "parameters": [ { "$ref": "#/parameters/eventRouteId" }, { "$ref": "#/parameters/api-version" } ], "responses": { "204": { "description": "Success" }, "default": { "description": "Default response.", "schema": { "$ref": "#/definitions/ErrorResponse" } } } } } }, "definitions": { "EventRoute": { "description": "A route which directs notification and telemetry events to an endpoint. Endpoints are a destination outside of Azure Digital Twins such as an EventHub.", "type": "object", "required": [ "endpointName" ], "properties": { "id": { "description": "The id of the event route.", "type": "string", "readOnly": true }, "endpointName": { "description": "The name of the endpoint this event route is bound to.", "type": "string" }, "filter": { "description": "An expression which describes the events which are routed to the endpoint.", "type": "string" } } }, "EventRouteCollection": { "description": "A collection of EventRoute objects.", "type": "object", "properties": { "value": { "description": "The EventRoute objects.", "type": "array", "items": { "$ref": "#/definitions/EventRoute" } }, "nextLink": { "description": "A URI to retrieve the next page of results.", "type": "string" } } }, "NonPagedModelDataCollection": { "description": "A collection of ModelData objects.", "type": "array", "items": { "$ref": "#/definitions/ModelData" } }, "PagedModelDataCollection": { "description": "A collection of ModelData objects.", "type": "object", "properties": { "value": { "description": "The ModelData objects.", "type": "array", "items": { "$ref": "#/definitions/ModelData" } }, "nextLink": { "description": "A URI to retrieve the next page of objects.", "type": "string" } } }, "ModelData": { "description": "A model definition and metadata for that model.", "required": [ "id" ], "type": "object", "properties": { "displayName": { "description": "A language map that contains the localized display names as specified in the model definition.", "type": "object", "additionalProperties": { "type": "string" } }, "description": { "description": "A language map that contains the localized descriptions as specified in the model definition.", "type": "object", "additionalProperties": { "type": "string" } }, "id": { "description": "The id of the model as specified in the model definition.", "type": "string" }, "uploadTime": { "description": "The time the model was uploaded to the service.", "format": "date-time", "type": "string" }, "decommissioned": { "description": "Indicates if the model is decommissioned. Decommissioned models cannot be referenced by newly created digital twins.", "type": "boolean", "default": false }, "model": { "description": "The model definition.", "type": "object" } } }, "RelationshipCollection": { "description": "A collection of relationships which relate digital twins together.", "type": "object", "properties": { "value": { "description": "The relationship objects.", "type": "array", "items": { "description": "The relationship JSON document.", "type": "object" } }, "nextLink": { "description": "A URI to retrieve the next page of objects.", "type": "string" } } }, "IncomingRelationshipCollection": { "description": "A collection of incoming relationships which relate digital twins together.", "type": "object", "properties": { "value": { "type": "array", "items": { "$ref": "#/definitions/IncomingRelationship" } }, "nextLink": { "type": "string", "description": "A URI to retrieve the next page of objects." } } }, "IncomingRelationship": { "type": "object", "description": "An incoming relationship.", "properties": { "$relationshipId": { "type": "string", "description": "A user-provided string representing the id of this relationship, unique in the context of the source digital twin, i.e. sourceId + relationshipId is unique in the context of the service." }, "$sourceId": { "type": "string", "description": "The id of the source digital twin." }, "$relationshipName": { "type": "string", "description": "The name of the relationship." }, "$relationshipLink": { "type": "string", "description": "Link to the relationship, to be used for deletion." } } }, "QuerySpecification": { "description": "A query specification containing either a query statement or a continuation token from a previous query result.", "type": "object", "properties": { "query": { "description": "The query to execute. This value is ignored if a continuation token is provided.", "type": "string" }, "continuationToken": { "description": "A token which is used to retrieve the next set of results from a previous query.", "type": "string" } } }, "QueryResult": { "description": "The results of a query operation and an optional continuation token.", "type": "object", "properties": { "items": { "description": "The query results.", "type": "array", "items": { "type": "object" } }, "continuationToken": { "description": "A token which can be used to construct a new QuerySpecification to retrieve the next set of results.", "type": "string" } } }, "ErrorResponse": { "description": "Error response.", "properties": { "error": { "$ref": "#/definitions/Error", "description": "The error details." } } }, "Error": { "description": "Error definition.", "properties": { "code": { "description": "Service specific error code which serves as the substatus for the HTTP error code.", "type": "string", "readOnly": true }, "message": { "description": "A human-readable representation of the error.", "type": "string", "readOnly": true }, "details": { "description": "Internal error details.", "type": "array", "items": { "$ref": "#/definitions/Error" }, "readOnly": true }, "innererror": { "description": "An object containing more specific information than the current object about the error.", "$ref": "#/definitions/InnerError" } } }, "InnerError": { "description": "A more specific error description than was provided by the containing error.", "properties": { "code": { "description": "A more specific error code than was provided by the containing error.", "type": "string" }, "innererror": { "description": "An object containing more specific information than the current object about the error.", "$ref": "#/definitions/InnerError" } } } }, "securityDefinitions": { "oauth2": { "flow": "implicit", "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize?resource=0b07f429-9f4b-4714-9392-cc5e8e80c8b0", "type": "oauth2" } }, "parameters": { "eventRouteId": { "name": "id", "in": "path", "required": true, "type": "string", "description": "The id for an event route. The id is unique within event routes and case sensitive.", "x-ms-parameter-location": "method" }, "includeModelDefinition": { "name": "includeModelDefinition", "description": "When true the model definition will be returned as part of the result.", "in": "query", "required": false, "type": "boolean", "default": false, "x-ms-parameter-location": "method" }, "digitalTwinId": { "name": "id", "in": "path", "description": "The id of the digital twin. The id is unique within the service and case sensitive.", "type": "string", "required": true, "x-ms-parameter-location": "method" }, "modelId": { "name": "id", "in": "path", "description": "The id for the model. The id is globally unique and case sensitive.", "required": true, "type": "string", "x-ms-parameter-location": "method" }, "relationshipId": { "name": "relationshipId", "description": "The id of the relationship. The id is unique within the digital twin and case sensitive.", "in": "path", "required": true, "type": "string", "x-ms-parameter-location": "method" }, "componentPath": { "name": "componentPath", "in": "path", "description": "The name of the DTDL component.", "type": "string", "required": true, "x-ms-parameter-location": "method" }, "api-version": { "name": "api-version", "in": "query", "description": "The requested API version.", "required": true, "type": "string", "enum": [ "2020-05-31-preview" ] }, "max-item-count": { "name": "x-ms-max-item-count", "in": "header", "description": "The maximum number of items to retrieve per request. The server may choose to return less than the requested max.", "required": false, "type": "integer", "default": -1, "x-ms-client-name": "MaxItemCount", "x-ms-parameter-location": "method", "x-ms-parameter-grouping": { "postfix": "Options" } }, "if-none-match-star": { "name": "If-None-Match", "in": "header", "description": "Only perform the operation if the entity does not already exist.", "required": false, "type": "string", "enum": [ "*" ], "x-ms-parameter-location": "method" }, "if-match": { "name": "If-Match", "in": "header", "description": "Only perform the operation if the entity's etag matches one of the etags provided or * is provided.", "required": false, "type": "string", "x-ms-parameter-location": "method" } }, "security": [ { "oauth2": [] } ] }