コンテンツにスキップ
α(一般提供前)のサービスです。一般提供はしておらず、仕様変更・機能の追加削除・データの削除が予告なく発生する場合があります。
ThingsConnectThingsConnect ドキュメント
Esc
↑↓移動↵開く⌘Jプレビュー

デバイスの詳細を取得する

一覧の項目に加えて、センサの現在値(sensor)と、カメラの RTMP 配信の状態(streaming)を返します。どちらも該当しないデバイスでは null です。スコープは data か data:write が要ります。

GET/devices/{id}
Authorization
AuthorizationBearer token · headerrequired

組織設定の「API・MCP」タブで発行した API トークン(tcn_ で始まる)。

Path parameters
idstringrequired

デバイス ID(<エッジPC の Thing 名>__<UUID>)

Responses
200

デバイスの詳細

deviceDeviceDetailrequired
Show properties
idstringrequired
edgePcIdstringrequired
edgePcNamestringrequired
namestringrequired
notestring | nullrequired
manufacturerstring | nullrequired
modelstring | nullrequired
serialNumberstring | nullrequired

実機のシリアル番号

macAddressstring | nullrequired

控えた MAC アドレス(小文字のコロン区切り)。IP で繋ぐ機器は、エッジPC から初めて見えたときに自動で控えます

attributesobjectrequired

管理項目の値。キーは項目の ID で、未入力の項目は含みません

typestringrequired

カメラかセンサか

Allowed:camerasensor
cameraKindstring | nullrequired

カメラのつなぎ方。カメラ以外は null

Allowed:rtspusbcsihttpnull
sensorKindstring | nullrequired

センサの種類。センサ以外は null

Allowed:linescalethermometerpower_metermodbusgaugenull
sourceDeviceIdstring | nullrequired

映像を読むカメラ(カメラで読むセンサだけ)

latitudenumber | nullrequired

設置位置。null はエッジPC と同じ位置

longitudenumber | nullrequired
createdAtstring<date-time>required
sensorSensorReading | nullrequired

センサの現在値。センサ以外は null

Show properties
Any of:
SensorReading
metricKeystring | nullrequired
displayNamestring | nullrequired

計測項目の表示名

unitstringrequired

単位。未定義なら空文字

valuenumber | nullrequired
connectedbooleanrequired

計測器とつながっているか

updatedAtstring<date-time> | nullrequired

値を読んだ時刻

lastErrorstring | nullrequired
null
null
streamingStreaming | nullrequired

RTMP 配信の状態。カメラ以外は null

Show properties
Any of:
Streaming
enabledbooleanrequired

配信を指示しているか

activebooleanrequired

エッジPC で実際に配信しているか

rtmpUrlstring | nullrequired
resolutionstring | nullrequired
Allowed:480p720p1080pnull
lastErrorstring | nullrequired
null
null
401

トークンが無い、または無効

errorstringrequired

人が読めるエラーメッセージ

403

スコープが足りない、または操作が許可されていない

errorstringrequired

人が読めるエラーメッセージ

404

対象が無い(他の組織のものを含む)

errorstringrequired

人が読めるエラーメッセージ

Try it
Server
Authorization
Parameters
Request
curl -X GET 'https://api.thingsconnect.app/api/v1/devices/string' \
  -H 'Authorization: Bearer YOUR_TOKEN'
Response
{
  "device": {
    "id": "string",
    "edgePcId": "string",
    "edgePcName": "string",
    "name": "string",
    "note": "string",
    "manufacturer": "string",
    "model": "string",
    "serialNumber": "string",
    "macAddress": "string",
    "attributes": {},
    "type": "camera",
    "cameraKind": "rtsp",
    "sensorKind": "line",
    "sourceDeviceId": "string",
    "latitude": 0,
    "longitude": 0,
    "createdAt": "2019-08-24T14:15:22Z",
    "sensor": {
      "metricKey": "string",
      "displayName": "string",
      "unit": "string",
      "value": 0,
      "connected": true,
      "updatedAt": "2019-08-24T14:15:22Z",
      "lastError": "string"
    },
    "streaming": {
      "enabled": true,
      "active": true,
      "rtmpUrl": "string",
      "resolution": "480p",
      "lastError": "string"
    }
  }
}