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

管理項目の一覧を取得する

組織設定の「管理項目」で作った項目を、画面と同じ並び順で返します。エッジPC とデバイスの attributes のキーは、ここで返す項目の ID です。スコープは data か data:write が要ります。

GET/custom-fields
Authorization
AuthorizationBearer token · headerrequired

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

Query parameters
targetstring

edge_pc(エッジPC)か device(デバイス)に絞る。省略すると両方

Allowed:edge_pcdevice
Responses
200

管理項目の一覧

customFieldsCustomField[]required
Show properties
Array of CustomField
idstringrequired
targetstringrequired

どちらの項目か(edge_pc はエッジPC、device はデバイス)

Allowed:edge_pcdevice
namestringrequired

項目名

typestringrequired

値の種類。date は YYYY-MM-DD の文字列、number は数値、text と select は文字列

Allowed:textdatenumberselect
optionsstring[]required

選べる値(select だけ)

400

入力の検証エラー、または対象の種類が合わない

errorstringrequired

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

401

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

errorstringrequired

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

403

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

errorstringrequired

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

Try it
Server
Authorization
Parameters
Request
curl -X GET 'https://api.thingsconnect.app/api/v1/custom-fields' \
  -H 'Authorization: Bearer YOUR_TOKEN'
Response
{
  "customFields": [
    {
      "id": "string",
      "target": "edge_pc",
      "name": "string",
      "type": "text",
      "options": [
        "string"
      ]
    }
  ]
}