{
  "openapi" : "3.1.0",
  "info" : {
    "description" : "This API allows managing telematics devices.",
    "title" : "Telematics Device",
    "version" : "2.0"
  },
  "externalDocs" : {
    "description" : "Trackunit Developer Hub",
    "url" : "https://developers.trackunit.com/"
  },
  "servers" : [ {
    "url" : "https://iris.trackunit.com/api/telematics-device",
    "description" : "Production"
  } ],
  "security" : [ {
    "authorizationBearer" : [ ]
  } ],
  "paths" : {
    "/v2/configuration-jobs" : {
      "get" : {
        "operationId" : "getConfigurationJobs",
        "parameters" : [ {
          "description" : "Zero-based page index (0..N)",
          "example" : 0,
          "in" : "query",
          "name" : "page",
          "required" : false,
          "schema" : {
            "type" : "integer",
            "format" : "int32",
            "default" : 0,
            "minimum" : 0
          }
        }, {
          "description" : "The size of the page to be returned",
          "example" : 20,
          "in" : "query",
          "name" : "size",
          "required" : false,
          "schema" : {
            "type" : "integer",
            "format" : "int32",
            "default" : 20,
            "minimum" : 1
          }
        }, {
          "description" : "Sort order: `property` (ascending by default), `+property` (ascending), `-property` (descending).",
          "in" : "query",
          "name" : "sort",
          "required" : false,
          "schema" : {
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          }
        } ],
        "responses" : {
          "200" : {
            "content" : {
              "*/*" : {
                "schema" : {
                  "$ref" : "#/components/schemas/PaginatedConfigurationJob"
                }
              }
            },
            "description" : "All configuration jobs"
          },
          "400" : {
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ConstraintViolationError"
                }
              }
            },
            "description" : "Bad request"
          },
          "401" : {
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/DefaultError"
                }
              }
            },
            "description" : "Invalid or missing bearer token in Authorization header"
          },
          "403" : {
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/DefaultError"
                }
              }
            },
            "description" : "User not allowed to make this request"
          },
          "404" : {
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/DefaultError"
                }
              }
            },
            "description" : "Resource not found"
          },
          "500" : {
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/DefaultError"
                }
              }
            },
            "description" : "Internal server error"
          }
        },
        "summary" : "Get all configuration jobs",
        "tags" : [ "Configuration job" ]
      },
      "post" : {
        "operationId" : "createConfigurationJob",
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/CreateConfigurationJob"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "201" : {
            "content" : {
              "*/*" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ConfigurationJob"
                }
              }
            },
            "description" : "The newly created configuration job"
          },
          "400" : {
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ConstraintViolationError"
                }
              }
            },
            "description" : "Bad request"
          },
          "401" : {
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/DefaultError"
                }
              }
            },
            "description" : "Invalid or missing bearer token in Authorization header"
          },
          "403" : {
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/DefaultError"
                }
              }
            },
            "description" : "User not allowed to make this request"
          },
          "404" : {
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/DefaultError"
                }
              }
            },
            "description" : "Resource not found"
          },
          "500" : {
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/DefaultError"
                }
              }
            },
            "description" : "Internal server error"
          }
        },
        "summary" : "Create a new configuration job",
        "tags" : [ "Configuration job" ]
      }
    },
    "/v2/configuration-jobs/{id}" : {
      "get" : {
        "operationId" : "getConfigurationJob",
        "parameters" : [ {
          "description" : "Id of a configuration job",
          "in" : "path",
          "name" : "id",
          "required" : true,
          "schema" : {
            "type" : "string",
            "format" : "uuid"
          }
        } ],
        "responses" : {
          "200" : {
            "content" : {
              "*/*" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ConfigurationJob"
                }
              }
            },
            "description" : "Configuration job"
          },
          "400" : {
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ConstraintViolationError"
                }
              }
            },
            "description" : "Bad request"
          },
          "401" : {
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/DefaultError"
                }
              }
            },
            "description" : "Invalid or missing bearer token in Authorization header"
          },
          "403" : {
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/DefaultError"
                }
              }
            },
            "description" : "User not allowed to make this request"
          },
          "404" : {
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/DefaultError"
                }
              }
            },
            "description" : "Resource not found"
          },
          "500" : {
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/DefaultError"
                }
              }
            },
            "description" : "Internal server error"
          }
        },
        "summary" : "Get configuration job",
        "tags" : [ "Configuration job" ]
      }
    },
    "/v2/configuration-jobs/{id}/device-statuses" : {
      "get" : {
        "description" : "Returns the current status of each device in this configuration job. Sort properties: id",
        "operationId" : "getConfigurationJobDeviceStatuses",
        "parameters" : [ {
          "description" : "Id of a configuration job",
          "in" : "path",
          "name" : "id",
          "required" : true,
          "schema" : {
            "type" : "string",
            "format" : "uuid"
          }
        }, {
          "description" : "Zero-based page index (0..N)",
          "example" : 0,
          "in" : "query",
          "name" : "page",
          "required" : false,
          "schema" : {
            "type" : "integer",
            "format" : "int32",
            "default" : 0,
            "minimum" : 0
          }
        }, {
          "description" : "The size of the page to be returned",
          "example" : 20,
          "in" : "query",
          "name" : "size",
          "required" : false,
          "schema" : {
            "type" : "integer",
            "format" : "int32",
            "default" : 20,
            "minimum" : 1
          }
        }, {
          "description" : "Sort order: `property` (ascending by default), `+property` (ascending), `-property` (descending).",
          "in" : "query",
          "name" : "sort",
          "required" : false,
          "schema" : {
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          }
        } ],
        "responses" : {
          "200" : {
            "content" : {
              "*/*" : {
                "schema" : {
                  "$ref" : "#/components/schemas/PaginatedConfigurationJobDeviceStatus"
                }
              }
            },
            "description" : "Paginated list of device statuses"
          },
          "400" : {
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ConstraintViolationError"
                }
              }
            },
            "description" : "Bad request"
          },
          "401" : {
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/DefaultError"
                }
              }
            },
            "description" : "Invalid or missing bearer token in Authorization header"
          },
          "403" : {
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/DefaultError"
                }
              }
            },
            "description" : "User not allowed to make this request"
          },
          "404" : {
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/DefaultError"
                }
              }
            },
            "description" : "Resource not found"
          },
          "500" : {
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/DefaultError"
                }
              }
            },
            "description" : "Internal server error"
          }
        },
        "summary" : "Get device statuses for a configuration job",
        "tags" : [ "Configuration job" ]
      }
    },
    "/v2/configuration-jobs/{id}/status" : {
      "get" : {
        "operationId" : "getConfigurationJobStatus",
        "parameters" : [ {
          "description" : "Id of a configuration job",
          "in" : "path",
          "name" : "id",
          "required" : true,
          "schema" : {
            "type" : "string",
            "format" : "uuid"
          }
        } ],
        "responses" : {
          "200" : {
            "content" : {
              "*/*" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ConfigurationJobStatus"
                }
              }
            },
            "description" : "Configuration job status"
          },
          "400" : {
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ConstraintViolationError"
                }
              }
            },
            "description" : "Bad request"
          },
          "401" : {
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/DefaultError"
                }
              }
            },
            "description" : "Invalid or missing bearer token in Authorization header"
          },
          "403" : {
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/DefaultError"
                }
              }
            },
            "description" : "User not allowed to make this request"
          },
          "404" : {
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/DefaultError"
                }
              }
            },
            "description" : "Resource not found"
          },
          "500" : {
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/DefaultError"
                }
              }
            },
            "description" : "Internal server error"
          }
        },
        "summary" : "Get configuration job status",
        "tags" : [ "Configuration job" ]
      }
    },
    "/v2/devices" : {
      "get" : {
        "operationId" : "filterDeviceIdentities",
        "parameters" : [ {
          "description" : "Serial number of a device",
          "in" : "query",
          "name" : "serialNumber",
          "required" : false,
          "schema" : {
            "type" : "string"
          }
        }, {
          "in" : "query",
          "name" : "pageable",
          "required" : true,
          "schema" : {
            "$ref" : "#/components/schemas/TuPageableMinimum"
          }
        } ],
        "responses" : {
          "200" : {
            "content" : {
              "*/*" : {
                "schema" : {
                  "$ref" : "#/components/schemas/PaginatedDeviceIdentity"
                }
              }
            },
            "description" : "A list of device identities including their capabilities and device information"
          },
          "400" : {
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ConstraintViolationError"
                }
              }
            },
            "description" : "Bad request"
          },
          "401" : {
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/DefaultError"
                }
              }
            },
            "description" : "Invalid or missing bearer token in Authorization header"
          },
          "403" : {
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/DefaultError"
                }
              }
            },
            "description" : "User not allowed to make this request"
          },
          "404" : {
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/DefaultError"
                }
              }
            },
            "description" : "Resource not found"
          },
          "500" : {
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/DefaultError"
                }
              }
            },
            "description" : "Internal server error"
          }
        },
        "summary" : "Get devices filtered by serial number",
        "tags" : [ "Devices identity" ]
      }
    },
    "/v2/devices/{id}" : {
      "get" : {
        "operationId" : "getDeviceIdentity",
        "parameters" : [ {
          "description" : "Id of a device",
          "in" : "path",
          "name" : "id",
          "required" : true,
          "schema" : {
            "type" : "string",
            "format" : "uuid"
          }
        } ],
        "responses" : {
          "200" : {
            "content" : {
              "*/*" : {
                "schema" : {
                  "$ref" : "#/components/schemas/DeviceIdentity"
                }
              }
            },
            "description" : "Device identity including capabilities and device information"
          },
          "400" : {
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ConstraintViolationError"
                }
              }
            },
            "description" : "Bad request"
          },
          "401" : {
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/DefaultError"
                }
              }
            },
            "description" : "Invalid or missing bearer token in Authorization header"
          },
          "403" : {
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/DefaultError"
                }
              }
            },
            "description" : "User not allowed to make this request"
          },
          "404" : {
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/DefaultError"
                }
              }
            },
            "description" : "Resource not found"
          },
          "500" : {
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/DefaultError"
                }
              }
            },
            "description" : "Internal server error"
          }
        },
        "summary" : "Get device identity",
        "tags" : [ "Devices identity" ]
      }
    },
    "/v2/devices/{id}/state" : {
      "get" : {
        "operationId" : "getDeviceState",
        "parameters" : [ {
          "description" : "Id of a device",
          "in" : "path",
          "name" : "id",
          "required" : true,
          "schema" : {
            "type" : "string",
            "format" : "uuid"
          }
        } ],
        "responses" : {
          "200" : {
            "content" : {
              "*/*" : {
                "schema" : {
                  "$ref" : "#/components/schemas/DeviceState"
                }
              }
            },
            "description" : "Desired and reported states of a device"
          },
          "400" : {
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ConstraintViolationError"
                }
              }
            },
            "description" : "Bad request"
          },
          "401" : {
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/DefaultError"
                }
              }
            },
            "description" : "Invalid or missing bearer token in Authorization header"
          },
          "403" : {
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/DefaultError"
                }
              }
            },
            "description" : "User not allowed to make this request"
          },
          "404" : {
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/DefaultError"
                }
              }
            },
            "description" : "Resource not found"
          },
          "500" : {
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/DefaultError"
                }
              }
            },
            "description" : "Internal server error"
          }
        },
        "summary" : "Get device state",
        "tags" : [ "Devices state" ]
      },
      "patch" : {
        "operationId" : "updateDesiredState",
        "parameters" : [ {
          "description" : "Id of a device",
          "in" : "path",
          "name" : "id",
          "required" : true,
          "schema" : {
            "type" : "string",
            "format" : "uuid"
          }
        } ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "type" : "object",
                "additionalProperties" : { },
                "description" : "Desired state"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "Partially update the desired state of a device"
          },
          "400" : {
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ConstraintViolationError"
                }
              }
            },
            "description" : "Bad request"
          },
          "401" : {
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/DefaultError"
                }
              }
            },
            "description" : "Invalid or missing bearer token in Authorization header"
          },
          "403" : {
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/DefaultError"
                }
              }
            },
            "description" : "User not allowed to make this request"
          },
          "404" : {
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/DefaultError"
                }
              }
            },
            "description" : "Resource not found"
          },
          "500" : {
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/DefaultError"
                }
              }
            },
            "description" : "Internal server error"
          }
        },
        "summary" : "Update desired state",
        "tags" : [ "Devices state" ]
      }
    },
    "/v2/devices/{id}/state-documentation" : {
      "get" : {
        "operationId" : "getDocumentation",
        "parameters" : [ {
          "description" : "Id of a device",
          "in" : "path",
          "name" : "id",
          "required" : true,
          "schema" : {
            "type" : "string",
            "format" : "uuid"
          }
        } ],
        "responses" : {
          "200" : {
            "content" : {
              "*/*" : {
                "schema" : {
                  "type" : "object",
                  "additionalProperties" : { }
                }
              }
            },
            "description" : "List of available desired states"
          },
          "400" : {
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ConstraintViolationError"
                }
              }
            },
            "description" : "Bad request"
          },
          "401" : {
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/DefaultError"
                }
              }
            },
            "description" : "Invalid or missing bearer token in Authorization header"
          },
          "403" : {
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/DefaultError"
                }
              }
            },
            "description" : "User not allowed to make this request"
          },
          "404" : {
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/DefaultError"
                }
              }
            },
            "description" : "Resource not found"
          },
          "500" : {
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/DefaultError"
                }
              }
            },
            "description" : "Internal server error"
          }
        },
        "summary" : "Get desired state documentation",
        "tags" : [ "Devices state" ]
      }
    },
    "/v2/devices/{id}/telemetry" : {
      "get" : {
        "operationId" : "getDeviceTelemetry",
        "parameters" : [ {
          "description" : "Id of a device",
          "in" : "path",
          "name" : "id",
          "required" : true,
          "schema" : {
            "type" : "string",
            "format" : "uuid"
          }
        } ],
        "responses" : {
          "200" : {
            "content" : {
              "*/*" : {
                "schema" : {
                  "$ref" : "#/components/schemas/DeviceTelemetry"
                }
              }
            },
            "description" : "Device telemetry"
          },
          "400" : {
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ConstraintViolationError"
                }
              }
            },
            "description" : "Bad request"
          },
          "401" : {
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/DefaultError"
                }
              }
            },
            "description" : "Invalid or missing bearer token in Authorization header"
          },
          "403" : {
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/DefaultError"
                }
              }
            },
            "description" : "User not allowed to make this request"
          },
          "404" : {
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/DefaultError"
                }
              }
            },
            "description" : "Resource not found"
          },
          "500" : {
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/DefaultError"
                }
              }
            },
            "description" : "Internal server error"
          }
        },
        "summary" : "Get device telemetry",
        "tags" : [ "Devices telemetry" ]
      }
    },
    "/v2/oems/trackunit/devices/{serialNumber}" : {
      "get" : {
        "operationId" : "getDeviceIdentityBySerialNumber",
        "parameters" : [ {
          "description" : "Serial number of a device",
          "in" : "path",
          "name" : "serialNumber",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "responses" : {
          "200" : {
            "content" : {
              "*/*" : {
                "schema" : {
                  "$ref" : "#/components/schemas/DeviceIdentity"
                }
              }
            },
            "description" : "Device identity including capabilities and device information"
          },
          "400" : {
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ConstraintViolationError"
                }
              }
            },
            "description" : "Bad request"
          },
          "401" : {
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/DefaultError"
                }
              }
            },
            "description" : "Invalid or missing bearer token in Authorization header"
          },
          "403" : {
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/DefaultError"
                }
              }
            },
            "description" : "User not allowed to make this request"
          },
          "404" : {
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/DefaultError"
                }
              }
            },
            "description" : "Resource not found"
          },
          "500" : {
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/DefaultError"
                }
              }
            },
            "description" : "Internal server error"
          }
        },
        "summary" : "Get device identity of a Trackunit device by serial number",
        "tags" : [ "Devices identity" ]
      }
    }
  },
  "components" : {
    "schemas" : {
      "ActivityDetection" : {
        "type" : "object",
        "properties" : {
          "state" : {
            "type" : "string"
          }
        }
      },
      "Can1" : {
        "type" : "object",
        "properties" : {
          "activityDetection" : {
            "$ref" : "#/components/schemas/ActivityDetection"
          },
          "latestReceptionTime" : {
            "type" : "string",
            "format" : "date-time"
          }
        }
      },
      "Can2" : {
        "type" : "object",
        "properties" : {
          "activityDetection" : {
            "$ref" : "#/components/schemas/ActivityDetection"
          },
          "latestReceptionTime" : {
            "type" : "string",
            "format" : "date-time"
          }
        }
      },
      "CanBus" : {
        "type" : "object",
        "properties" : {
          "can1" : {
            "$ref" : "#/components/schemas/Can1"
          },
          "can2" : {
            "$ref" : "#/components/schemas/Can2"
          }
        }
      },
      "ConfigurationJob" : {
        "type" : "object",
        "properties" : {
          "createdAt" : {
            "type" : "string",
            "format" : "date-time",
            "description" : "The time when the configuration job was created"
          },
          "description" : {
            "type" : "string",
            "description" : "Optional description for the configuration job"
          },
          "desiredStateOnEnter" : {
            "type" : "object",
            "additionalProperties" : { },
            "description" : "The desired state to configure on the supplied devices"
          },
          "deviceIds" : {
            "type" : "array",
            "description" : "Devices that will be configured",
            "items" : {
              "type" : "string",
              "format" : "uuid"
            },
            "uniqueItems" : true
          },
          "id" : {
            "type" : "string",
            "format" : "uuid",
            "description" : "Unique identifier of the configuration job"
          },
          "name" : {
            "type" : "string",
            "description" : "The name of the configuration job"
          }
        },
        "required" : [ "createdAt", "desiredStateOnEnter", "deviceIds", "name" ]
      },
      "ConfigurationJobDeviceStatus" : {
        "type" : "object",
        "properties" : {
          "id" : {
            "type" : "string",
            "format" : "uuid",
            "description" : "The unique id of the telematics device"
          },
          "trackingEventReason" : {
            "type" : "string",
            "description" : "The reason providing additional detail about the status."
          },
          "trackingEventStatus" : {
            "type" : "string",
            "description" : "The current status",
            "enum" : [ "CREATED", "PENDING", "EXECUTING", "SUCCEEDED", "FAILED", "UNKNOWN" ]
          },
          "trackingEventTime" : {
            "type" : "string",
            "format" : "date-time",
            "description" : "The time when the current status was updated"
          }
        },
        "required" : [ "id" ]
      },
      "ConfigurationJobStatus" : {
        "type" : "object",
        "properties" : {
          "total" : {
            "type" : "integer",
            "format" : "int64",
            "description" : "The total number of devices being configured in the configuration job"
          },
          "totalCompleted" : {
            "type" : "integer",
            "format" : "int64",
            "description" : "The total number of devices with a completed configuration in the configuration job"
          },
          "totalExecuting" : {
            "type" : "integer",
            "format" : "int64",
            "description" : "The total number of devices with an executing configuration in the configuration job"
          },
          "totalFailed" : {
            "type" : "integer",
            "format" : "int64",
            "description" : "The total number of devices with a failed configuration in the configuration job"
          },
          "totalPending" : {
            "type" : "integer",
            "format" : "int64",
            "description" : "The total number of devices with a pending configuration in the configuration job"
          }
        }
      },
      "Connectivity" : {
        "type" : "object",
        "properties" : {
          "bluetooth" : {
            "$ref" : "#/components/schemas/ConnectivityBluetooth",
            "description" : "Bluetooth connectivity"
          },
          "gps" : {
            "$ref" : "#/components/schemas/ConnectivityGps",
            "description" : "GPS connectivity"
          },
          "gsm" : {
            "$ref" : "#/components/schemas/ConnectivityGsm",
            "description" : "GSM connectivity"
          },
          "transmissions" : {
            "$ref" : "#/components/schemas/ConnectivityTransmissions",
            "description" : "Transmissions"
          },
          "wifi" : {
            "$ref" : "#/components/schemas/ConnectivityWifi",
            "description" : "WiFi connectivity"
          }
        }
      },
      "ConnectivityBluetooth" : {
        "type" : "object",
        "properties" : {
          "latestBluetoothReceptionTime" : {
            "type" : "string",
            "format" : "date-time",
            "description" : "The time of latest Bluetooth data reception"
          },
          "rssi" : {
            "type" : "integer",
            "format" : "int32",
            "description" : "Received Signal Strength Indicator for the Bluetooth signal - higher is better"
          }
        }
      },
      "ConnectivityGps" : {
        "type" : "object",
        "properties" : {
          "latestFixTime" : {
            "type" : "string",
            "format" : "date-time",
            "description" : "The time of latest valid GPS position"
          },
          "satellites" : {
            "type" : "integer",
            "format" : "int32",
            "description" : "Number of visible satellites"
          },
          "signalQuality" : {
            "type" : "integer",
            "format" : "int32",
            "description" : "The GPS signal quality - higher is better"
          }
        }
      },
      "ConnectivityGsm" : {
        "type" : "object",
        "properties" : {
          "networkTechnology" : {
            "type" : "string",
            "description" : "The GSM network technology (2G, 3G, 4G)",
            "enum" : [ "UNKNOWN", "NW_TECH_2G", "NW_TECH_3G", "NW_TECH_4G" ]
          },
          "signalQuality" : {
            "type" : "integer",
            "format" : "int32",
            "description" : "The GSM signal quality - higher is better",
            "maximum" : 4,
            "minimum" : 0
          }
        }
      },
      "ConnectivityTransmissions" : {
        "type" : "object",
        "properties" : {
          "latestReceptionTime" : {
            "type" : "string",
            "format" : "date-time",
            "description" : "The time of latest transmission reception"
          }
        }
      },
      "ConnectivityWifi" : {
        "type" : "object",
        "properties" : {
          "connected" : {
            "type" : "boolean",
            "description" : "Whether the device is connected to WiFi"
          },
          "connectedUpdateTime" : {
            "type" : "string",
            "format" : "date-time",
            "description" : "The time when the connected status was last updated"
          },
          "rssi" : {
            "type" : "integer",
            "format" : "int32",
            "description" : "Received Signal Strength Indicator for the WiFi signal (lower values indicate stronger signal)"
          },
          "rssiUpdateTime" : {
            "type" : "string",
            "format" : "date-time",
            "description" : "The time when the RSSI was last updated"
          },
          "securityType" : {
            "type" : "string",
            "description" : "The security type of the WiFi network",
            "enum" : [ "UNKNOWN", "OPEN", "WPA_PSK", "WPA2_PSK", "WPA3_PSK", "AUTOMATIC" ]
          },
          "signalQuality" : {
            "type" : "integer",
            "format" : "int32",
            "description" : "The WiFi signal quality"
          },
          "ssid" : {
            "type" : "string",
            "description" : "The SSID (network name) of the connected WiFi network"
          }
        }
      },
      "ConstraintViolationError" : {
        "type" : "object",
        "properties" : {
          "code" : {
            "type" : [ "string", "null" ],
            "description" : "Alphanumeric code (snake case) describing use case specific error"
          },
          "message" : {
            "type" : "string",
            "description" : "Detailed description of error"
          },
          "properties" : {
            "type" : [ "object", "null" ],
            "additionalProperties" : { },
            "description" : "Additional properties to be included in the error response"
          },
          "status" : {
            "type" : "integer",
            "format" : "int32",
            "description" : "HTTP status code"
          },
          "violations" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/Violation"
            }
          }
        }
      },
      "CreateConfigurationJob" : {
        "type" : "object",
        "properties" : {
          "description" : {
            "type" : "string",
            "description" : "Optional description for the configuration job"
          },
          "desiredStateOnEnter" : {
            "type" : "object",
            "additionalProperties" : { },
            "description" : "The desired state to configure on the supplied devices",
            "minProperties" : 1
          },
          "deviceIds" : {
            "type" : "array",
            "description" : "Devices that will be configured",
            "items" : {
              "type" : "string",
              "format" : "uuid"
            },
            "maxItems" : 500,
            "minItems" : 1,
            "uniqueItems" : true
          },
          "name" : {
            "type" : "string",
            "description" : "The name of the configuration job",
            "minLength" : 1
          }
        },
        "required" : [ "desiredStateOnEnter", "deviceIds", "name" ]
      },
      "DefaultError" : {
        "type" : "object",
        "properties" : {
          "code" : {
            "type" : [ "string", "null" ],
            "description" : "Alphanumeric code (snake case) describing use case specific error"
          },
          "message" : {
            "type" : "string",
            "description" : "Detailed description of error"
          },
          "properties" : {
            "type" : [ "object", "null" ],
            "additionalProperties" : { },
            "description" : "Additional properties to be included in the error response"
          },
          "status" : {
            "type" : "integer",
            "format" : "int32",
            "description" : "HTTP status code"
          }
        }
      },
      "DeviceIdentity" : {
        "type" : "object",
        "properties" : {
          "assetId" : {
            "type" : "string",
            "format" : "uuid",
            "description" : "Unique identifier of an asset"
          },
          "deviceType" : {
            "type" : "string",
            "description" : "Hardware type of device",
            "enum" : [ "TU201", "TU301", "TU401", "TU500", "TU501", "TU600", "TU700", "TU1000", "AEMP", "SCOMBOX1", "SCOMBOX2", "SCOMBOX2AC", "SATRAK_ASTRA", "SATRAK_TELTONIKA", "KIN", "KIN2", "SPOT", "SPOT2", "S300", "M3", "M4", "M5", "M6", "M7", "M8", "M10", "M20", "M50", "M70", "T15", "T25", "VIRTUAL", "BLUETOOTH_TAG", "GRIFFIN", "GW100", "GW200", "OTHER" ]
          },
          "id" : {
            "type" : "string",
            "format" : "uuid",
            "description" : "Unique identifier of a device"
          },
          "ownerAccountId" : {
            "type" : "string",
            "format" : "uuid",
            "description" : "Unique identifier of an asset owner"
          },
          "partNumber" : {
            "type" : "string",
            "description" : "Hardware part number"
          },
          "productionDate" : {
            "type" : "string",
            "format" : "date",
            "description" : "Date of production",
            "example" : "2023-04-28"
          },
          "serialNumber" : {
            "type" : "string",
            "description" : "The Serial Number as printed on the device"
          }
        }
      },
      "DeviceState" : {
        "type" : "object",
        "properties" : {
          "desired" : {
            "type" : "object",
            "additionalProperties" : { },
            "description" : "Desired state"
          },
          "id" : {
            "type" : "string",
            "format" : "uuid",
            "description" : "Unique identifier of a device"
          },
          "metadata" : {
            "$ref" : "#/components/schemas/DeviceStateMetadata",
            "description" : "State metadata"
          },
          "reported" : {
            "type" : "object",
            "additionalProperties" : { },
            "description" : "Reported state"
          },
          "serialNumber" : {
            "type" : "string",
            "description" : "Serial number of a device"
          }
        }
      },
      "DeviceStateMetadata" : {
        "type" : "object",
        "properties" : {
          "desired" : {
            "type" : "object",
            "additionalProperties" : { },
            "description" : "Metadata for desired state"
          },
          "reported" : {
            "type" : "object",
            "additionalProperties" : { },
            "description" : "Metadata for reported state"
          }
        }
      },
      "DeviceTelemetry" : {
        "type" : "object",
        "properties" : {
          "canBus" : {
            "$ref" : "#/components/schemas/CanBus",
            "description" : "Telemetry for the canbus on a device"
          },
          "connectivity" : {
            "$ref" : "#/components/schemas/Connectivity",
            "description" : "Telemetry for the connectivity types supported by a device"
          },
          "id" : {
            "type" : "string",
            "format" : "uuid",
            "description" : "Unique identifier of a device"
          },
          "io" : {
            "$ref" : "#/components/schemas/Io",
            "description" : "Telemetry for wired inputs and outputs on a device"
          },
          "modBus" : {
            "$ref" : "#/components/schemas/ModBus",
            "description" : "Telemetry for the modbus on a device"
          },
          "power" : {
            "$ref" : "#/components/schemas/Power",
            "description" : "Telemetry for external and internal power of a device"
          },
          "sensor" : {
            "$ref" : "#/components/schemas/Sensor",
            "description" : "Telemetry for internal and external sensors on a device"
          }
        }
      },
      "Io" : {
        "type" : "object",
        "properties" : {
          "input1" : {
            "$ref" : "#/components/schemas/IoInput",
            "description" : "Current state of Input"
          },
          "input2" : {
            "$ref" : "#/components/schemas/IoInput",
            "description" : "Current state of Input"
          },
          "input3" : {
            "$ref" : "#/components/schemas/IoInput",
            "description" : "Current state of Input"
          },
          "input4" : {
            "$ref" : "#/components/schemas/IoInput",
            "description" : "Current state of Input"
          },
          "output1" : {
            "$ref" : "#/components/schemas/IoOutput",
            "description" : "Current state of Output1"
          }
        }
      },
      "IoInput" : {
        "type" : "object",
        "properties" : {
          "active" : {
            "type" : "boolean",
            "description" : "Current state of the wired input"
          },
          "activeTime" : {
            "type" : "integer",
            "format" : "int64",
            "description" : "Accumulated active time of the wired input measured in seconds"
          },
          "voltage" : {
            "type" : "integer",
            "format" : "int32",
            "description" : "Current voltage on the wired input measured in mV"
          }
        }
      },
      "IoOutput" : {
        "type" : "object",
        "properties" : {
          "active" : {
            "type" : "boolean",
            "description" : "Current state of the wired output"
          },
          "loadDetect" : {
            "type" : "boolean",
            "description" : "Determines if a load exists on the wired output"
          }
        }
      },
      "ModBus" : {
        "type" : "object",
        "properties" : {
          "latestReceptionTime" : {
            "type" : "string",
            "format" : "date-time"
          }
        }
      },
      "PaginatedConfigurationJob" : {
        "type" : "object",
        "properties" : {
          "content" : {
            "type" : "array",
            "description" : "The page content as a list.",
            "items" : {
              "$ref" : "#/components/schemas/ConfigurationJob"
            }
          },
          "number" : {
            "type" : "integer",
            "format" : "int32",
            "description" : "The number of the current page."
          },
          "numberOfElements" : {
            "type" : "integer",
            "format" : "int32",
            "description" : "The number of elements currently on this page."
          },
          "size" : {
            "type" : "integer",
            "format" : "int32",
            "description" : "The size of the page."
          },
          "totalElements" : {
            "type" : "integer",
            "format" : "int64",
            "description" : "The total number of elements."
          },
          "totalPages" : {
            "type" : "integer",
            "format" : "int32",
            "description" : "The number of total pages."
          }
        }
      },
      "PaginatedConfigurationJobDeviceStatus" : {
        "type" : "object",
        "properties" : {
          "content" : {
            "type" : "array",
            "description" : "The page content as a list.",
            "items" : {
              "$ref" : "#/components/schemas/ConfigurationJobDeviceStatus"
            }
          },
          "number" : {
            "type" : "integer",
            "format" : "int32",
            "description" : "The number of the current page."
          },
          "numberOfElements" : {
            "type" : "integer",
            "format" : "int32",
            "description" : "The number of elements currently on this page."
          },
          "size" : {
            "type" : "integer",
            "format" : "int32",
            "description" : "The size of the page."
          },
          "totalElements" : {
            "type" : "integer",
            "format" : "int64",
            "description" : "The total number of elements."
          },
          "totalPages" : {
            "type" : "integer",
            "format" : "int32",
            "description" : "The number of total pages."
          }
        }
      },
      "PaginatedDeviceIdentity" : {
        "type" : "object",
        "properties" : {
          "content" : {
            "type" : "array",
            "description" : "The page content as a list.",
            "items" : {
              "$ref" : "#/components/schemas/DeviceIdentity"
            }
          },
          "number" : {
            "type" : "integer",
            "format" : "int32",
            "description" : "The number of the current page."
          },
          "numberOfElements" : {
            "type" : "integer",
            "format" : "int32",
            "description" : "The number of elements currently on this page."
          },
          "size" : {
            "type" : "integer",
            "format" : "int32",
            "description" : "The size of the page."
          },
          "totalElements" : {
            "type" : "integer",
            "format" : "int64",
            "description" : "The total number of elements."
          },
          "totalPages" : {
            "type" : "integer",
            "format" : "int32",
            "description" : "The number of total pages."
          }
        }
      },
      "Power" : {
        "type" : "object",
        "properties" : {
          "external" : {
            "$ref" : "#/components/schemas/PowerExternal",
            "description" : "External power"
          },
          "internal" : {
            "$ref" : "#/components/schemas/PowerInternal",
            "description" : "Internal battery power"
          }
        }
      },
      "PowerExternal" : {
        "type" : "object",
        "properties" : {
          "connected" : {
            "type" : "boolean",
            "description" : "Is external power supply connected (GW100 and GW200 only)"
          },
          "supply" : {
            "type" : "integer",
            "format" : "int32",
            "description" : "The external power supply measured in mV"
          }
        }
      },
      "PowerInternal" : {
        "type" : "object",
        "properties" : {
          "charging" : {
            "type" : "boolean",
            "description" : "The internal battery is charging"
          },
          "percentage" : {
            "type" : "integer",
            "format" : "int32",
            "description" : "The internal battery supply in percentage"
          },
          "supply" : {
            "type" : "integer",
            "format" : "int32",
            "description" : "The internal battery supply measured in mV"
          }
        }
      },
      "Sensor" : {
        "type" : "object",
        "properties" : {
          "distance" : {
            "$ref" : "#/components/schemas/SensorDistance",
            "description" : "Distance sensor"
          },
          "light" : {
            "$ref" : "#/components/schemas/SensorLight",
            "description" : "Light sensor"
          },
          "temperature1" : {
            "$ref" : "#/components/schemas/SensorTemperature",
            "description" : "Temperature sensor"
          },
          "temperature2" : {
            "$ref" : "#/components/schemas/SensorTemperature",
            "description" : "Temperature sensor"
          }
        }
      },
      "SensorDistance" : {
        "type" : "object",
        "properties" : {
          "value" : {
            "type" : "number",
            "format" : "double",
            "description" : "Distance measured in kilometers"
          }
        }
      },
      "SensorLight" : {
        "type" : "object",
        "properties" : {
          "active" : {
            "type" : "boolean",
            "description" : "Current state of the light sensor"
          }
        }
      },
      "SensorTemperature" : {
        "type" : "object",
        "properties" : {
          "value" : {
            "type" : "number",
            "format" : "double",
            "description" : "Temperature measured in Celsius"
          }
        }
      },
      "TuPageableMinimum" : {
        "type" : "object",
        "properties" : {
          "page" : {
            "type" : "integer",
            "format" : "int32"
          },
          "size" : {
            "type" : "integer",
            "format" : "int32",
            "maximum" : 2500,
            "minimum" : 1
          }
        }
      },
      "Violation" : {
        "type" : "object",
        "properties" : {
          "field" : {
            "type" : "string"
          },
          "message" : {
            "type" : "string"
          }
        }
      }
    },
    "securitySchemes" : {
      "authorizationBearer" : {
        "bearerFormat" : "JWT",
        "scheme" : "bearer",
        "type" : "http"
      }
    }
  }
}