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

AI アプリのインスタンスの最新の結果を取得する

一覧の項目に加えて、エッジPC で動いているか(connected)と最新の結果(latest)を返します。スコープは data か data:write が要ります。

GET/ai-app-instances/{id}
Authorization
AuthorizationBearer token · headerrequired

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

Path parameters
idstringrequired

インスタンス ID

Responses
200

インスタンスの詳細

instanceAiAppInstanceDetailrequired
Show properties
idstringrequired
appIdstringrequired

AI アプリの ID(license-plate、object-detection など)

namestringrequired
notestring | nullrequired
edgePcIdstringrequired
edgePcNamestringrequired
cameraIdstring | nullrequired

映像を読むカメラのデバイス ID

cameraNamestring | nullrequired

そのカメラの名前

metricKeysstring[]required

結果を記録する計測項目のキー(object_count など)

createdAtstring<date-time>required
connectedbooleanrequired

エッジPC で動いているか

lastErrorstring | nullrequired
latestAiAppResult | nullrequired

最新の結果。まだ結果が無ければ null

Show properties
Any of:
AiAppResult
countinteger | nullrequired

検出した数(分類は 0 か 1)

topLabelstring | nullrequired

確信度が最も高いラベル

topConfidencenumber | nullrequired

そのラベルの確信度(0〜1)

valuenumber | nullrequired

メーターから読んだ値

unitstring | nullrequired
updatedAtstring<date-time> | nullrequired

値を読んだ時刻(メーター読み取りだけ)

null
null
401

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

errorstringrequired

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

403

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

errorstringrequired

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

404

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

errorstringrequired

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

Try it
Server
Authorization
Parameters
Request
curl -X GET 'https://api.thingsconnect.app/api/v1/ai-app-instances/string' \
  -H 'Authorization: Bearer YOUR_TOKEN'
Response
{
  "instance": {
    "id": "string",
    "appId": "string",
    "name": "string",
    "note": "string",
    "edgePcId": "string",
    "edgePcName": "string",
    "cameraId": "string",
    "cameraName": "string",
    "metricKeys": [
      "string"
    ],
    "createdAt": "2019-08-24T14:15:22Z",
    "connected": true,
    "lastError": "string",
    "latest": {
      "count": 0,
      "topLabel": "string",
      "topConfidence": 0,
      "value": 0,
      "unit": "string",
      "updatedAt": "2019-08-24T14:15:22Z"
    }
  }
}