### GET /iot/channels/{chanId} Source: https://connhex.com/api/core/latest/things/api.json Retrieves channel info. Required Permission: - Resource: ```core:channels:{chanId}``` - Action: ```core:channels:get``` ```markdown ### Parameters - **chanId** (string (uuid), path, required): Unique channel identifier. ### Responses #### 200 - response **ChannelResSchema** - **id** (string) (required): Unique channel identifier generated by the service. - **name** (string): Free-form channel name. - **metadata** (object): Arbitrary, object-encoded channel's data. #### 400 - Bad request. Bad request. #### 401 - Unauthorized. Unauthorized. #### 404 - Channel not found. Channel not found. #### 422 - Unprocessable entity. Unprocessable entity. #### 500 - response ### Example Usage ```bash curl -X GET "https://apis.connhex.com/iot/channels/{chanId}" ``` ``` -------------------------------- ### GET /iot/things Source: https://connhex.com/api/core/latest/things/api.json Returns a paginated list of things. Use limit and offset to iterate through results. Required Permission: - Resource: ```core:things``` - Action: ```core:things:list``` ```markdown ### Parameters - **limit** (integer, query, optional): Size of the subset to retrieve. - **offset** (integer, query, optional): Number of items to skip during retrieval. - **name** (string, query, optional): Name filter. Filtering is performed as a case-insensitive partial match. - **order** (string (name|id), query, optional): Order type. - **dir** (string (asc|desc), query, optional): Order direction. - **metadata** (object, query, optional): Metadata filter. Filtering is performed matching the parameter with metadata on top level. Parameter is json. ### Responses #### 200 - response **ThingsPage** - **things** (array (ThingResSchema)) Array items: - **id** (string (uuid)) (required): Unique thing identifier generated by the service. - **name** (string): Free-form thing name. - **key** (string (uuid)) (required): Auto-generated access key. - **metadata** (object) - **type** (string (device)) ("device") - **control_channel_id** (string (uuid)) - **event_channel_id** (string (uuid)) - **model** (string (uuid)): Model identifier assigned to this thing. - **status** (object) - **connected** (boolean): Whether the thing is currently connected. - **connected_at** (integer (int64)): Unix timestamp of the last connection event. - **disconnected_at** (integer (int64)): Unix timestamp of the last disconnection event. - **last_seen** (integer (int64)): Unix timestamp of the last time the thing was seen. - **last_message_at** (integer (int64)): Unix timestamp of the last message received. - **connect_count** (integer (int64)): Total number of connection events. - **disconnect_count** (integer (int64)): Total number of disconnection events. - **message_count** (integer (int64)): Total number of messages received. - **bytes_total** (integer (int64)): Total bytes received. - **total_connected_time** (integer (int64)): Total seconds the thing has been connected. - **total** (integer): Total number of items. - **offset** (integer): Number of items to skip during retrieval. - **limit** (integer): Maximum number of items to return in one page. #### 400 - Failed due to malformed query parameters. Failed due to malformed query parameters. #### 401 - Unauthorized. Unauthorized. #### 404 - Referenced entity does not exist. Referenced entity does not exist. #### 422 - Unprocessable entity. Unprocessable entity. #### 500 - response ### Example Usage ```bash curl -X GET "https://apis.connhex.com/iot/things?limit=10&offset=0&name=string&order=id&dir=desc&metadata=value" ``` ``` -------------------------------- ### GET /iot/things/{thingId} Source: https://connhex.com/api/core/latest/things/api.json Retrieves thing info. Required Permission: - Resource: ```core:things:{id}``` - Action: ```core:things:get``` ```markdown ### Parameters - **thingId** (string (uuid), path, required): Unique thing identifier. ### Responses #### 200 - response **ThingResSchema** - **id** (string (uuid)) (required): Unique thing identifier generated by the service. - **name** (string): Free-form thing name. - **key** (string (uuid)) (required): Auto-generated access key. - **metadata** (object) - **type** (string (device)) ("device") - **control_channel_id** (string (uuid)) - **event_channel_id** (string (uuid)) - **model** (string (uuid)): Model identifier assigned to this thing. - **status** (object) - **connected** (boolean): Whether the thing is currently connected. - **connected_at** (integer (int64)): Unix timestamp of the last connection event. - **disconnected_at** (integer (int64)): Unix timestamp of the last disconnection event. - **last_seen** (integer (int64)): Unix timestamp of the last time the thing was seen. - **last_message_at** (integer (int64)): Unix timestamp of the last message received. - **connect_count** (integer (int64)): Total number of connection events. - **disconnect_count** (integer (int64)): Total number of disconnection events. - **message_count** (integer (int64)): Total number of messages received. - **bytes_total** (integer (int64)): Total bytes received. - **total_connected_time** (integer (int64)): Total seconds the thing has been connected. #### 401 - Unauthorized. Unauthorized. #### 404 - Thing not found. Thing not found. #### 422 - Unprocessable entity. Unprocessable entity. #### 500 - response ### Example Usage ```bash curl -X GET "https://apis.connhex.com/iot/things/{thingId}" ``` ``` -------------------------------- ### GET /iot/models/{modelId} Source: https://connhex.com/api/core/latest/things/api.json Retrieves model info. Required Permission: - Resource: ```core:models:{modelId}``` - Action: ```core:models:get``` ```markdown ### Parameters - **modelId** (string (uuid), path, required): Unique model identifier. ### Responses #### 200 - response **Model** - **id** (string (uuid)): Unique model identifier. - **name** (string): Free-form model name. - **description** (string): Free-form model description. - **metadata** (object): Arbitrary, object-encoded model data. - **tags** (array (string)): List of tags associated with the model. - **tenants** (array (string)): List of tenants that can access this model. - **image** (string): URL to model image. - **created_at** (string (date-time)): Time when the model was created. - **updated_at** (string (date-time)): Time when the model was last updated. #### 400 - Failed due to malformed model ID. Failed due to malformed model ID. #### 401 - Missing or invalid access token provided. Missing or invalid access token provided. #### 404 - Model does not exist. Model does not exist. #### 500 - response ### Example Usage ```bash curl -X GET "https://apis.connhex.com/iot/models/{modelId}" ``` ``` -------------------------------- ### GET /iot/things/{thingId}/uptime Source: https://connhex.com/api/core/latest/things/api.json Returns total connected seconds for a device within the specified time range, along with the individual connect/disconnect events for session timeline visualization. Required Permission: - Resource: ```core:things:{id}``` - Action: ```core:things:get``` ```markdown ### Parameters - **thingId** (string (uuid), path, required): Unique thing identifier. - **from** (integer (int64), query, required): Start of time range (unix timestamp). - **to** (integer (int64), query, required): End of time range (unix timestamp). ### Responses #### 200 - Uptime result. **UptimeResponse** - **uptime_seconds** (number (double)): Total connected seconds in the requested time range. - **events** (array (UptimeEvent)): Connect/disconnect events in chronological order. Array items: - **time** (integer (int64)): Unix timestamp of the event. - **event** (string (connect|disconnect)): Event type. ("connect"|"disconnect") #### 400 - Invalid query parameters. Invalid query parameters. #### 401 - Unauthorized. Unauthorized. #### 500 - response ### Example Usage ```bash curl -X GET "https://apis.connhex.com/iot/things/{thingId}/uptime?from=0&to=0" ``` ``` -------------------------------- ### GET /iot/models/{modelId}/things Source: https://connhex.com/api/core/latest/things/api.json Retrieves list of things belonging to specified model with pagination metadata. Required Permission: - Resource: ```core:models:{modelId}``` - Action: ```core:models:getThings``` ```markdown ### Parameters - **modelId** (string (uuid), path, required): Unique model identifier. - **offset** (integer, query, optional): Number of items to skip during retrieval. - **limit** (integer, query, optional): Size of the subset to retrieve. - **order** (string (name|id), query, optional): Order type. - **dir** (string (asc|desc), query, optional): Order direction. ### Responses #### 200 - response **ThingsPage** - **things** (array (ThingResSchema)) Array items: - **id** (string (uuid)) (required): Unique thing identifier generated by the service. - **name** (string): Free-form thing name. - **key** (string (uuid)) (required): Auto-generated access key. - **metadata** (object) - **type** (string (device)) ("device") - **control_channel_id** (string (uuid)) - **event_channel_id** (string (uuid)) - **model** (string (uuid)): Model identifier assigned to this thing. - **status** (object) - **connected** (boolean): Whether the thing is currently connected. - **connected_at** (integer (int64)): Unix timestamp of the last connection event. - **disconnected_at** (integer (int64)): Unix timestamp of the last disconnection event. - **last_seen** (integer (int64)): Unix timestamp of the last time the thing was seen. - **last_message_at** (integer (int64)): Unix timestamp of the last message received. - **connect_count** (integer (int64)): Total number of connection events. - **disconnect_count** (integer (int64)): Total number of disconnection events. - **message_count** (integer (int64)): Total number of messages received. - **bytes_total** (integer (int64)): Total bytes received. - **total_connected_time** (integer (int64)): Total seconds the thing has been connected. - **total** (integer): Total number of items. - **offset** (integer): Number of items to skip during retrieval. - **limit** (integer): Maximum number of items to return in one page. #### 400 - Failed due to malformed query parameters. Failed due to malformed query parameters. #### 401 - Missing or invalid access token provided. Missing or invalid access token provided. #### 404 - Model does not exist. Model does not exist. #### 422 - Database can't process request. Database can't process request. #### 500 - response ### Example Usage ```bash curl -X GET "https://apis.connhex.com/iot/models/{modelId}/things?offset=0&limit=10&order=id&dir=desc" ``` ``` -------------------------------- ### GET /iot/things/status/summary Source: https://connhex.com/api/core/latest/things/api.json Returns aggregated connectivity counts across the fleet: online, offline, never connected, and recently active devices. Required Permission: - Resource: ```core:things``` - Action: ```core:things:statusSummary``` ```markdown ### Responses #### 200 - Fleet status summary. **StatusSummary** - **online** (integer (int64)): Number of currently connected devices. - **total** (integer (int64)): Total number of things. - **never_connected** (integer (int64)): Things that have never connected (total - known). - **active_last_hour** (integer (int64)): Devices seen in the last hour. - **offline** (integer (int64)): Devices that have connected before but are currently offline. #### 401 - Unauthorized. Unauthorized. #### 403 - Insufficient permissions. Insufficient permissions. #### 500 - response ### Example Usage ```bash curl -X GET "https://apis.connhex.com/iot/things/status/summary" ``` ``` -------------------------------- ### GET /iot/things/{thingId}/channels Source: https://connhex.com/api/core/latest/things/api.json Retrieves list of channels connected to a specified thing. Required Permission: - Resource: ```core:things:{id}``` - Action: ```core:things:getChannels``` ```markdown ### Parameters - **thingId** (string (uuid), path, required): Unique thing identifier. - **offset** (integer, query, optional): Number of items to skip during retrieval. - **limit** (integer, query, optional): Size of the subset to retrieve. - **connected** (boolean, query, optional): Connection state of the subset to retrieve. ### Responses #### 200 - response **ChannelsPage** - **channels** (array (ChannelResSchema)) Array items: - **id** (string) (required): Unique channel identifier generated by the service. - **name** (string): Free-form channel name. - **metadata** (object): Arbitrary, object-encoded channel's data. - **total** (integer): Total number of items. - **offset** (integer): Number of items to skip during retrieval. - **limit** (integer): Maximum number of items to return in one page. #### 400 - Bad request. Bad request. #### 401 - Unauthorized. Unauthorized. #### 404 - Thing not found. Thing not found. #### 422 - Unprocessable entity. Unprocessable entity. #### 500 - response ### Example Usage ```bash curl -X GET "https://apis.connhex.com/iot/things/{thingId}/channels?offset=0&limit=10&connected=true" ``` ``` -------------------------------- ### GET /iot/models Source: https://connhex.com/api/core/latest/things/api.json Retrieves a list of models. Due to performance concerns, data is retrieved in subsets. The API must ensure that the entire dataset is consumed either by making subsequent requests, or by increasing the subset size of the initial request. Required Permission: - Resource: ```core:models``` - Action: ```core:models:list``` ```markdown ### Parameters - **limit** (integer, query, optional): Size of the subset to retrieve. - **offset** (integer, query, optional): Number of items to skip during retrieval. - **name** (string, query, optional): Name filter. Filtering is performed as a case-insensitive partial match. - **order** (string (name|id), query, optional): Order type. - **dir** (string (asc|desc), query, optional): Order direction. - **metadata** (object, query, optional): Metadata filter. Filtering is performed matching the parameter with metadata on top level. Parameter is json. - **tag** (string, query, optional): Tag filter. Filtering is performed as a case-insensitive match. - **tenant** (string, query, optional): Tenant filter. Used to filter models by specific tenant. ### Responses #### 200 - response - **total** (integer) - **offset** (integer) - **limit** (integer) - **models** (array (Model)) Array items: - **id** (string (uuid)): Unique model identifier. - **name** (string): Free-form model name. - **description** (string): Free-form model description. - **metadata** (object): Arbitrary, object-encoded model data. - **tags** (array (string)): List of tags associated with the model. - **tenants** (array (string)): List of tenants that can access this model. - **image** (string): URL to model image. - **created_at** (string (date-time)): Time when the model was created. - **updated_at** (string (date-time)): Time when the model was last updated. #### 400 - Failed due to malformed query parameters. Failed due to malformed query parameters. #### 401 - Missing or invalid access token provided. Missing or invalid access token provided. #### 422 - Database can't process request. Database can't process request. #### 500 - response ### Example Usage ```bash curl -X GET "https://apis.connhex.com/iot/models?limit=10&offset=0&name=string&order=id&dir=desc&metadata=value&tag=string&tenant=string" ``` ``` -------------------------------- ### GET /iot/things/status/flapping Source: https://connhex.com/api/core/latest/things/api.json Returns devices that have reconnected more than a threshold number of times within a time window, ordered by reconnect count descending. Required Permission: - Resource: ```core:things:{id}``` (each) - Action: ```core:things:get``` ```markdown ### Parameters - **window** (string, query, optional): Time window to check for reconnections (e.g. "1h", "30m"). - **min** (integer, query, optional): Minimum reconnect count to include. - **limit** (integer, query, optional): Maximum number of results. ### Responses #### 200 - Flapping devices list. **FlappingResponse** - **things** (array (FlappingThing)) Array items: - **thing_id** (string): Thing identifier. - **reconnects** (integer (int64)): Number of connect events within the window. #### 400 - Invalid query parameters. Invalid query parameters. #### 401 - Unauthorized. Unauthorized. #### 500 - response ### Example Usage ```bash curl -X GET "https://apis.connhex.com/iot/things/status/flapping?window=1h&min=10&limit=100" ``` ``` -------------------------------- ### POST /iot/things/status Source: https://connhex.com/api/core/latest/things/api.json Returns connectivity statuses for the given thing IDs. IDs that do not exist or are not accessible are omitted from the response. Things that have never connected are also omitted. Required Permission: - Resource: ```core:things:{id}``` (each) - Action: ```core:things:get``` ```markdown ### Request Body **Content-Type:** application/json - **ids** (array (string (uuid))) (required): List of thing IDs to fetch statuses for. ### Responses #### 200 - response - **statuses** (object): Statuses keyed by thing ID. Things that have never connected are omitted. #### 400 - Failed due to malformed JSON or empty IDs list. Failed due to malformed JSON or empty IDs list. #### 401 - Unauthorized. Unauthorized. #### 415 - Missing or unsupported content type. Missing or unsupported content type. #### 500 - response ### Example Usage ```bash curl -X POST "https://apis.connhex.com/iot/things/status" \ -H "Content-Type: application/json" \ -d '{ "example": "data" }' ``` ``` -------------------------------- ### Security: $ref Source: https://connhex.com/api/core/latest/things/api.json Security scheme: $ref ```markdown ## Security: $ref **Description:** Security scheme: $ref **Type:** unknown ``` -------------------------------- ### POST /iot/models Source: https://connhex.com/api/core/latest/things/api.json Creates new model. User identified by the provided access token will be the model's owner. Required Permission: - Resource: ```core:models``` - Action: ```core:models:create``` ```markdown ### Request Body **Content-Type:** application/json - **id** (string (uuid)): Unique model identifier. - **name** (string): Free-form model name. - **description** (string): Free-form model description. - **metadata** (object): Arbitrary, object-encoded model data. - **tags** (array (string)): List of tags associated with the model. - **tenants** (array (string)): List of tenants that can access this model. - **image** (string): URL to model image. - **created_at** (string (date-time)): Time when the model was created. - **updated_at** (string (date-time)): Time when the model was last updated. ### Responses #### 201 - response Model created successfully. #### 400 - Failed due to malformed JSON. Failed due to malformed JSON. #### 401 - Missing or invalid access token provided. Missing or invalid access token provided. #### 409 - Entity already exist. Entity already exist. #### 415 - Missing or invalid content type. Missing or invalid content type. #### 500 - response ### Example Usage ```bash curl -X POST "https://apis.connhex.com/iot/models" \ -H "Content-Type: application/json" \ -d '{ "example": "data" }' ``` ``` -------------------------------- ### Schema: DeviceMetadata Source: https://connhex.com/api/core/latest/things/api.json Schema definition for DeviceMetadata ```markdown ## Schema: DeviceMetadata Schema definition for DeviceMetadata **Type:** object - **type** (string (device)) ("device") - **control_channel_id** (string (uuid)) - **event_channel_id** (string (uuid)) ``` -------------------------------- ### PUT /iot/models/{modelId}/tenants Source: https://connhex.com/api/core/latest/things/api.json Update model's tenant list. Required Permission: - Resource: ```core:models:{modelId}``` - Action: ```core:models:assignTenants``` ```markdown ### Parameters - **modelId** (string (uuid), path, required): Unique model identifier. ### Request Body **Content-Type:** application/json - **tenants** (array (string)) ### Responses #### 200 - response **Model** - **id** (string (uuid)): Unique model identifier. - **name** (string): Free-form model name. - **description** (string): Free-form model description. - **metadata** (object): Arbitrary, object-encoded model data. - **tags** (array (string)): List of tags associated with the model. - **tenants** (array (string)): List of tenants that can access this model. - **image** (string): URL to model image. - **created_at** (string (date-time)): Time when the model was created. - **updated_at** (string (date-time)): Time when the model was last updated. #### 400 - Failed due to malformed JSON. Failed due to malformed JSON. #### 401 - Missing or invalid access token provided. Missing or invalid access token provided. #### 404 - Model does not exist. Model does not exist. #### 415 - Missing or invalid content type. Missing or invalid content type. #### 500 - response ### Example Usage ```bash curl -X PUT "https://apis.connhex.com/iot/models/{modelId}/tenants" \ -H "Content-Type: application/json" \ -d '{ "example": "data" }' ``` ``` -------------------------------- ### Schema: Model Source: https://connhex.com/api/core/latest/things/api.json Schema definition for Model ```markdown ## Schema: Model Schema definition for Model **Type:** object - **id** (string (uuid)): Unique model identifier. - **name** (string): Free-form model name. - **description** (string): Free-form model description. - **metadata** (object): Arbitrary, object-encoded model data. - **tags** (array (string)): List of tags associated with the model. - **tenants** (array (string)): List of tenants that can access this model. - **image** (string): URL to model image. - **created_at** (string (date-time)): Time when the model was created. - **updated_at** (string (date-time)): Time when the model was last updated. ``` -------------------------------- ### Schema: Key Source: https://connhex.com/api/core/latest/things/api.json Thing key that is used for thing auth. If there is not one provided service will generate one in UUID format. ```markdown ## Schema: Key Thing key that is used for thing auth. If there is not one provided service will generate one in UUID format. **Type:** string ``` -------------------------------- ### Schema: ChannelResSchema Source: https://connhex.com/api/core/latest/things/api.json Schema definition for ChannelResSchema ```markdown ## Schema: ChannelResSchema Schema definition for ChannelResSchema **Type:** object - **id** (string) (required): Unique channel identifier generated by the service. - **name** (string): Free-form channel name. - **metadata** (object): Arbitrary, object-encoded channel's data. ``` -------------------------------- ### PUT /iot/channels/{chanId} Source: https://connhex.com/api/core/latest/things/api.json Update is performed by replacing the current resource data with values provided in a request payload. Note that the channel's ID will not be affected. Required Permission: - Resource: ```core:channels:{chanId}``` - Action: ```core:channels:update``` ```markdown ### Parameters - **chanId** (string (uuid), path, required): Unique channel identifier. ### Request Body **Content-Type:** application/json - **name** (string): Free-form channel name. - **metadata** (object): Arbitrary, object-encoded channel's data. ### Responses #### 200 - Channel updated. Empty response body #### 400 - Bad request. Bad request. #### 401 - Unauthorized. Unauthorized. #### 404 - Channel not found. Channel not found. #### 415 - Missing or unsupported content type. Missing or unsupported content type. #### 500 - response ### Example Usage ```bash curl -X PUT "https://apis.connhex.com/iot/channels/{chanId}" \ -H "Content-Type: application/json" \ -d '{ "example": "data" }' ``` ``` -------------------------------- ### Schema: ConnectionReqSchema Source: https://connhex.com/api/core/latest/things/api.json Schema definition for ConnectionReqSchema ```markdown ## Schema: ConnectionReqSchema Schema definition for ConnectionReqSchema **Type:** object - **channel_ids** (array (string)): Channel IDs. - **thing_ids** (array (string)): Thing IDs ``` -------------------------------- ### Schema: StatusSummary Source: https://connhex.com/api/core/latest/things/api.json Schema definition for StatusSummary ```markdown ## Schema: StatusSummary Schema definition for StatusSummary **Type:** object - **online** (integer (int64)): Number of currently connected devices. - **total** (integer (int64)): Total number of things. - **never_connected** (integer (int64)): Things that have never connected (total - known). - **active_last_hour** (integer (int64)): Devices seen in the last hour. - **offline** (integer (int64)): Devices that have connected before but are currently offline. ``` -------------------------------- ### API Overview: connhex-things Source: https://connhex.com/api/core/latest/things/api.json OpenAPI specification version 1.5.0 ```yaml # connhex-things # Version: 1.5.0 OpenAPI specification # Base URL: https://apis.connhex.com ``` -------------------------------- ### Schema: UptimeResponse Source: https://connhex.com/api/core/latest/things/api.json Schema definition for UptimeResponse ```markdown ## Schema: UptimeResponse Schema definition for UptimeResponse **Type:** object - **uptime_seconds** (number (double)): Total connected seconds in the requested time range. - **events** (array (UptimeEvent)): Connect/disconnect events in chronological order. Array items: - **time** (integer (int64)): Unix timestamp of the event. - **event** (string (connect|disconnect)): Event type. ("connect"|"disconnect") ``` -------------------------------- ### Schema: ChannelsPage Source: https://connhex.com/api/core/latest/things/api.json Schema definition for ChannelsPage ```markdown ## Schema: ChannelsPage Schema definition for ChannelsPage **Type:** object - **channels** (array (ChannelResSchema)) Array items: - **id** (string) (required): Unique channel identifier generated by the service. - **name** (string): Free-form channel name. - **metadata** (object): Arbitrary, object-encoded channel's data. - **total** (integer): Total number of items. - **offset** (integer): Number of items to skip during retrieval. - **limit** (integer): Maximum number of items to return in one page. ``` -------------------------------- ### PUT /iot/models/{modelId} Source: https://connhex.com/api/core/latest/things/api.json Updates model's name, description, and metadata. Required Permission: - Resource: ```core:models:{modelId}``` - Action: ```core:models:update``` ```markdown ### Parameters - **modelId** (string (uuid), path, required): Unique model identifier. ### Request Body **Content-Type:** application/json - **name** (string) - **description** (string) - **metadata** (object) - **image** (string) ### Responses #### 200 - response **Model** - **id** (string (uuid)): Unique model identifier. - **name** (string): Free-form model name. - **description** (string): Free-form model description. - **metadata** (object): Arbitrary, object-encoded model data. - **tags** (array (string)): List of tags associated with the model. - **tenants** (array (string)): List of tenants that can access this model. - **image** (string): URL to model image. - **created_at** (string (date-time)): Time when the model was created. - **updated_at** (string (date-time)): Time when the model was last updated. #### 400 - Failed due to malformed JSON. Failed due to malformed JSON. #### 401 - Missing or invalid access token provided. Missing or invalid access token provided. #### 404 - Model does not exist. Model does not exist. #### 415 - Missing or invalid content type. Missing or invalid content type. #### 500 - response ### Example Usage ```bash curl -X PUT "https://apis.connhex.com/iot/models/{modelId}" \ -H "Content-Type: application/json" \ -d '{ "example": "data" }' ``` ``` -------------------------------- ### Schema: ChannelReqSchema Source: https://connhex.com/api/core/latest/things/api.json Schema definition for ChannelReqSchema ```markdown ## Schema: ChannelReqSchema Schema definition for ChannelReqSchema **Type:** object - **name** (string): Free-form channel name. - **metadata** (object): Arbitrary, object-encoded channel's data. ``` -------------------------------- ### Schema: ThingResSchema Source: https://connhex.com/api/core/latest/things/api.json Schema definition for ThingResSchema ```markdown ## Schema: ThingResSchema Schema definition for ThingResSchema **Type:** object - **id** (string (uuid)) (required): Unique thing identifier generated by the service. - **name** (string): Free-form thing name. - **key** (string (uuid)) (required): Auto-generated access key. - **metadata** (object) - **type** (string (device)) ("device") - **control_channel_id** (string (uuid)) - **event_channel_id** (string (uuid)) - **model** (string (uuid)): Model identifier assigned to this thing. - **status** (object) - **connected** (boolean): Whether the thing is currently connected. - **connected_at** (integer (int64)): Unix timestamp of the last connection event. - **disconnected_at** (integer (int64)): Unix timestamp of the last disconnection event. - **last_seen** (integer (int64)): Unix timestamp of the last time the thing was seen. - **last_message_at** (integer (int64)): Unix timestamp of the last message received. - **connect_count** (integer (int64)): Total number of connection events. - **disconnect_count** (integer (int64)): Total number of disconnection events. - **message_count** (integer (int64)): Total number of messages received. - **bytes_total** (integer (int64)): Total bytes received. - **total_connected_time** (integer (int64)): Total seconds the thing has been connected. ``` -------------------------------- ### PUT /iot/models/{modelId}/tags Source: https://connhex.com/api/core/latest/things/api.json Update model's tags. Required Permission: - Resource: ```core:models:{modelId}``` - Action: ```core:models:update``` ```markdown ### Parameters - **modelId** (string (uuid), path, required): Unique model identifier. ### Request Body **Content-Type:** application/json - **tags** (array (string)) ### Responses #### 200 - response **Model** - **id** (string (uuid)): Unique model identifier. - **name** (string): Free-form model name. - **description** (string): Free-form model description. - **metadata** (object): Arbitrary, object-encoded model data. - **tags** (array (string)): List of tags associated with the model. - **tenants** (array (string)): List of tenants that can access this model. - **image** (string): URL to model image. - **created_at** (string (date-time)): Time when the model was created. - **updated_at** (string (date-time)): Time when the model was last updated. #### 400 - Failed due to malformed JSON. Failed due to malformed JSON. #### 401 - Missing or invalid access token provided. Missing or invalid access token provided. #### 404 - Model does not exist. Model does not exist. #### 415 - Missing or invalid content type. Missing or invalid content type. #### 500 - response ### Example Usage ```bash curl -X PUT "https://apis.connhex.com/iot/models/{modelId}/tags" \ -H "Content-Type: application/json" \ -d '{ "example": "data" }' ``` ``` -------------------------------- ### Schema: Identity Source: https://connhex.com/api/core/latest/things/api.json Schema definition for Identity ```markdown ## Schema: Identity Schema definition for Identity **Type:** object - **id** (string (uuid)): Thing unique identifier. This can be either provided by the user or left blank. If the user provides a UUID, it would be validated. If there is not one provided then the service will generate one in UUID format. ``` -------------------------------- ### Schema: FlappingResponse Source: https://connhex.com/api/core/latest/things/api.json Schema definition for FlappingResponse ```markdown ## Schema: FlappingResponse Schema definition for FlappingResponse **Type:** object - **things** (array (FlappingThing)) Array items: - **thing_id** (string): Thing identifier. - **reconnects** (integer (int64)): Number of connect events within the window. ``` -------------------------------- ### Schema: FlappingThing Source: https://connhex.com/api/core/latest/things/api.json Schema definition for FlappingThing ```markdown ## Schema: FlappingThing Schema definition for FlappingThing **Type:** object - **thing_id** (string): Thing identifier. - **reconnects** (integer (int64)): Number of connect events within the window. ``` -------------------------------- ### PUT /iot/things/{thingId} Source: https://connhex.com/api/core/latest/things/api.json Update is performed by replacing the current resource data with values provided in a request payload. Note that the thing's type and ID cannot be changed. Required Permission: - Resource: ```core:things:{id}``` - Action: ```core:things:update``` ```markdown ### Parameters - **thingId** (string (uuid), path, required): Unique thing identifier. ### Request Body **Content-Type:** application/json - **name** (string): Free-form thing name. - **metadata** (object) ### Responses #### 200 - Thing updated. Empty response body #### 400 - Bad request. Bad request. #### 401 - Unauthorized. Unauthorized. #### 404 - Thing not found. Thing not found. #### 415 - Missing or unsupported content type. Missing or unsupported content type. #### 500 - response ### Example Usage ```bash curl -X PUT "https://apis.connhex.com/iot/things/{thingId}" \ -H "Content-Type: application/json" \ -d '{ "example": "data" }' ``` ``` -------------------------------- ### Schema: UptimeEvent Source: https://connhex.com/api/core/latest/things/api.json Schema definition for UptimeEvent ```markdown ## Schema: UptimeEvent Schema definition for UptimeEvent **Type:** object - **time** (integer (int64)): Unix timestamp of the event. - **event** (string (connect|disconnect)): Event type. ("connect"|"disconnect") ``` -------------------------------- ### DELETE /iot/models/{modelId} Source: https://connhex.com/api/core/latest/things/api.json Removes a model. Required Permission: - Resource: ```core:models:{modelId}``` - Action: ```core:models:delete``` ```markdown ### Parameters - **modelId** (string (uuid), path, required): Unique model identifier. ### Responses #### 204 - Model removed. Empty response body #### 400 - Failed due to malformed model ID. Failed due to malformed model ID. #### 401 - Missing or invalid access token provided. Missing or invalid access token provided. #### 500 - response ### Example Usage ```bash curl -X DELETE "https://apis.connhex.com/iot/models/{modelId}" ``` ``` -------------------------------- ### Schema: ThingReqSchema Source: https://connhex.com/api/core/latest/things/api.json Schema definition for ThingReqSchema ```markdown ## Schema: ThingReqSchema Schema definition for ThingReqSchema **Type:** object - **key** (string (uuid)): Thing key that is used for thing auth. If there is not one provided service will generate one in UUID format. - **name** (string): Free-form thing name. - **metadata** (object): Arbitrary, object-encoded thing's data. ``` -------------------------------- ### Schema: ThingStatus Source: https://connhex.com/api/core/latest/things/api.json Schema definition for ThingStatus ```markdown ## Schema: ThingStatus Schema definition for ThingStatus **Type:** object - **connected** (boolean): Whether the thing is currently connected. - **connected_at** (integer (int64)): Unix timestamp of the last connection event. - **disconnected_at** (integer (int64)): Unix timestamp of the last disconnection event. - **last_seen** (integer (int64)): Unix timestamp of the last time the thing was seen. - **last_message_at** (integer (int64)): Unix timestamp of the last message received. - **connect_count** (integer (int64)): Total number of connection events. - **disconnect_count** (integer (int64)): Total number of disconnection events. - **message_count** (integer (int64)): Total number of messages received. - **bytes_total** (integer (int64)): Total bytes received. - **total_connected_time** (integer (int64)): Total seconds the thing has been connected. ``` -------------------------------- ### Schema: ThingsReqSchema Source: https://connhex.com/api/core/latest/things/api.json Schema definition for ThingsReqSchema ```markdown ## Schema: ThingsReqSchema Schema definition for ThingsReqSchema **Type:** object - **name** (string): Name filter. Filtering is performed as a case-insensitive partial match. - **metadata** (object): Metadata filter. Filtering is performed matching the parameter with metadata on top level. Parameter is json. - **total** (integer): Total number of items. - **offset** (integer): Number of items to skip during retrieval. - **limit** (integer): Size of the subset to retrieve. - **order** (string (name|id)): Order type. ("name"|"id") - **dir** (string (asc|desc)): Order direction. ("asc"|"desc") ``` -------------------------------- ### Schema: EdgeMetadata Source: https://connhex.com/api/core/latest/things/api.json Schema definition for EdgeMetadata ```markdown ## Schema: EdgeMetadata Schema definition for EdgeMetadata **Type:** object - **type** (string (edge)) ("edge") - **cfg_id** (string) - **init_id** (string) - **init_key** (string) - **control_channel_id** (string (uuid)) - **event_channel_id** (string (uuid)) - **description** (string) ``` -------------------------------- ### Schema: ThingsPage Source: https://connhex.com/api/core/latest/things/api.json Schema definition for ThingsPage ```markdown ## Schema: ThingsPage Schema definition for ThingsPage **Type:** object - **things** (array (ThingResSchema)) Array items: - **id** (string (uuid)) (required): Unique thing identifier generated by the service. - **name** (string): Free-form thing name. - **key** (string (uuid)) (required): Auto-generated access key. - **metadata** (object) - **type** (string (device)) ("device") - **control_channel_id** (string (uuid)) - **event_channel_id** (string (uuid)) - **model** (string (uuid)): Model identifier assigned to this thing. - **status** (object) - **connected** (boolean): Whether the thing is currently connected. - **connected_at** (integer (int64)): Unix timestamp of the last connection event. - **disconnected_at** (integer (int64)): Unix timestamp of the last disconnection event. - **last_seen** (integer (int64)): Unix timestamp of the last time the thing was seen. - **last_message_at** (integer (int64)): Unix timestamp of the last message received. - **connect_count** (integer (int64)): Total number of connection events. - **disconnect_count** (integer (int64)): Total number of disconnection events. - **message_count** (integer (int64)): Total number of messages received. - **bytes_total** (integer (int64)): Total bytes received. - **total_connected_time** (integer (int64)): Total seconds the thing has been connected. - **total** (integer): Total number of items. - **offset** (integer): Number of items to skip during retrieval. - **limit** (integer): Maximum number of items to return in one page. ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.