All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.microsoft.azure.sdk.iot.service.digitaltwin.swagger.digitalTwin.json Maven / Gradle / Ivy

There is a newer version: 2.1.9
Show newest version
{
  "swagger": "2.0",
  "info": {
    "version": "2020-09-30",
    "title": "IotHub Gateway Service APIs"
  },
  "host": "fully-qualified-iothubname.azure-devices.net",
  "schemes": [
    "https"
  ],
  "paths": {
    "/digitaltwins/{id}": {
      "get": {
        "summary": "Gets a digital twin.",
        "operationId": "DigitalTwin_GetDigitalTwin",
        "consumes": [],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Digital Twin ID.",
            "required": true,
            "type": "string"
          },
          {
            "$ref": "#/parameters/api-version"
          }
        ],
        "responses": {
          "200": {
            "description": "Returns the digital twin object",
            "schema": {
              "type": "object"
            },
            "headers": {
              "ETag": {
                "description": "Weak Etag",
                "type": "string"
              }
            }
          }
        }
      },
      "patch": {
        "summary": "Updates a digital twin.",
        "operationId": "DigitalTwin_UpdateDigitalTwin",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Digital Twin ID.",
            "required": true,
            "type": "string"
          },
          {
            "name": "digitalTwinPatch",
            "in": "body",
            "description": "json-patch contents to update.",
            "required": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "object"
              }
            }
          },
          {
            "name": "If-Match",
            "in": "header",
            "required": false,
            "type": "string"
          },
          {
            "$ref": "#/parameters/api-version"
          }
        ],
        "responses": {
          "202": {
            "description": "Accepted",
            "headers": {
              "ETag": {
                "description": "Weak Etag of the modified resource",
                "type": "string"
              },
              "Location": {
                "description": "URI of the digital twin",
                "type": "string"
              }
            }
          }
        }
      }
    },
    "/digitaltwins/{id}/commands/{commandName}": {
      "post": {
        "summary": "Invoke a digital twin root level command.",
        "description": "Invoke a digital twin root level command.",
        "operationId": "DigitalTwin_InvokeRootLevelCommand",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "commandName",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "payload",
            "in": "body",
            "required": false,
            "schema": {
              "description": "The Request Payload",
              "type": "object"
            }
          },
          {
            "$ref": "#/parameters/api-version"
          },
          {
            "name": "connectTimeoutInSeconds",
            "in": "query",
            "description": "Maximum interval of time, in seconds, that the digital twin command will wait for the answer.",
            "required": false,
            "type": "integer",
            "format": "int32"
          },
          {
            "name": "responseTimeoutInSeconds",
            "in": "query",
            "description": "Maximum interval of time, in seconds, that the digital twin command will wait for the answer.",
            "required": false,
            "type": "integer",
            "format": "int32"
          }
        ],
        "responses": {
          "200": {
            "description": "Returns the digital twin command response payload",
            "schema": {
              "description": "The Response Payload",
              "type": "object"
            },
            "headers": {
              "x-ms-command-statuscode": {
                "description": "Device Generated Status Code for this Operation",
                "type": "integer",
                "format": "int32"
              },
              "x-ms-request-id": {
                "description": "Server Generated Request Id (GUID), to uniquely identify this request in the service",
                "type": "string"
              }
            }
          }
        }
      }
    },
    "/digitaltwins/{id}/components/{componentPath}/commands/{commandName}": {
      "post": {
        "summary": "Invoke a digital twin command.",
        "description": "Invoke a digital twin command.",
        "operationId": "DigitalTwin_InvokeComponentCommand",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "componentPath",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "commandName",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "payload",
            "in": "body",
            "required": false,
            "schema": {
              "description": "The Request Payload",
              "type": "object"
            }
          },
          {
            "$ref": "#/parameters/api-version"
          },
          {
            "name": "connectTimeoutInSeconds",
            "in": "query",
            "description": "Maximum interval of time, in seconds, that the digital twin command will wait for the answer.",
            "required": false,
            "type": "integer",
            "format": "int32"
          },
          {
            "name": "responseTimeoutInSeconds",
            "in": "query",
            "description": "Maximum interval of time, in seconds, that the digital twin command will wait for the answer.",
            "required": false,
            "type": "integer",
            "format": "int32"
          }
        ],
        "responses": {
          "200": {
            "description": "Returns the digital twin command response payload",
            "schema": {
              "description": "The Response Payload",
              "type": "object"
            },
            "headers": {
              "x-ms-command-statuscode": {
                "description": "Device Generated Status Code for this Operation",
                "type": "integer",
                "format": "int32"
              },
              "x-ms-request-id": {
                "description": "Server Generated Request Id (GUID), to uniquely identify this request in the service",
                "type": "string"
              }
            }
          }
        }
      }
    }
  },
  "parameters": {
    "api-version": {
      "name": "api-version",
      "in": "query",
      "description": "Version of the Api.",
      "required": true,
      "type": "string",
      "default": "2020-09-30"
    }
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy