Tier0 技術ガイド

はじめに

最適な製品を選ぶ

Edge、Cloud、Enterprise から適切な Tier0 エディションを選びます。

各製品の詳しい機能は料金ページで確認し、用途に合うエディションを選んでください。

はじめに

インストール

エディション別に Tier0 をインストールします。

Tier0 には 3 つのエディションがあります。

  • Edge - オープンソースのデプロイ版で、Docker を使ってローカルで実行します。
  • Cloud - マネージド SaaS で、インフラの準備は不要です。
  • Enterprise - エンタープライズ環境向けのプライベートデプロイ版です。

要件に最も合うエディションを選ぶには、最適なバージョンを選ぶ を参照してください。

Tier0 Cloud を試す前に、トライアルアカウントを申請してください。

  1. Tier0 の登録 でアカウントを登録します。
  2. メールで届いた確認コードで認証し、登録したアカウントでログインします。
  3. Workspace を作成し、トライアルを開始します。

最適なバージョンを選ぶ

Tier0 の使い方

工場データ基盤

Unified Namespace モデル:Metric、State、Action、および UNS が工場データを保存する方法。

Tier0 では、工場データは UNS(Unified Namespace)の考え方に基づき、明確なツリー構造のモデルとして整理され、統一されたデータ基盤を形成します。

  • Broker は model topic を通じてデータを受信、送信します。
  %%{init: {"flowchart": {"defaultRenderer": "elk", "nodeSpacing": 32, "rankSpacing": 48, "diagramPadding": 8}}}%%
  flowchart TB
  source["データソース / コンシューマー"]
  subgraph UNS["Unified Namespace"]
      direction LR
      Model["Model<br/>path、topic、payload を定義"]
      Broker["Broker<br/>データ交換を処理"]
      Storage["ストレージ<br/>データを永続化"]
      Model <--> Broker
      Broker --> Storage
  end
  source <-- "MQTT / API" --> UNS
  classDef broker fill:#F7FAF2,stroke:#D8E6B8,stroke-width:1px,color:#2A2A2A,stroke-dasharray:5 5
  class Broker broker
  • Model は Metric、State、Action の 3 種類に分類されます。
  • データは model type に応じて異なるデータベースに保存されます。
    • Action/State: JSONB (PostgreSQL)
    • Metric: リアルタイムデータ(TSDB)
    %%{init: {
      "themeVariables": {
        "fontSize": "14pt"
      },
      "flowchart": {
        "defaultRenderer": "elk",
        "nodeSpacing": 40,
        "rankSpacing": 56,
        "diagramPadding": 8
      }
    }}%%
    flowchart LR
    subgraph Model["モデルタイプ"]
        direction TB
        metric["Metric<br/>高頻度の数値データ"]
        state["State<br/>現在の事実または状態"]
        action["Action<br/>コマンドまたは要求操作"]
    end
    subgraph Storage["ストレージ"]
        direction TB
        tsdb["TSDB<br/>Metric 履歴の時系列ストレージ"]
        jsonb["JSONB<br/>State と Action のドキュメントストレージ"]
    end
    metric --> tsdb
    state --> jsonb
    action --> jsonb

UNS broker は、データモデルに基づいて MQTT または OpenAPI 経由でデータを受信、送信するプラットフォームコンポーネントです。

  • MQTT の場合:model tree 内の各 node の完全な path が topic address として機能し、message payload を渡します。
  • OpenAPI の場合:HTTP request を通じて data model に対する CRUD コマンドを実行します。

産業データは変化頻度と用途が異なるため、Tier0 は UNS model を 3 つの固定 type に分けます。

Type Object Example
METRIC 継続的に収集され、時系列保存が必要な高頻度データ向けに設計されています。 Machine temperature/pressure/voltage
STATE 変化頻度が比較的低く、object の現在状態または事実を表すデータ向けに設計されています。 Machine operational status
ACTION 外部システムまたは operator が実行すべき内容を記録する低頻度の command data 向けに設計されています。 Start batch, stop machine

各 UNS model には path、topic、payload が含まれます。これらが一緒になって、business context を持ち産業データを運ぶ tree 構造を形成します。

  • Path/Topic:path はデータの所属を表し、topic は message payload を運びます。これらが model address を定義します。
  • Payload:topic が保持する message payload です。key-value 形式の JSON で、model data を定義します。

たとえば、UNS 内の model は次のような tree になります。

Terminal window
Factory_A
└── Site_01
└── SMT_Line_1
└── Metric
└── Machine_001
  • Path: Factory_A/Site_01/SMT_Line_1/Metric
  • Topic: /Machine_001.
  • Payload
    Terminal window
    {
    "temperature": 85,
    "vibration": 2.8
    }

Tier0 は PostgreSQL を使ってデータを保存します。データ type によって変化速度と保存要件が異なります。

Data Type Storage Description
METRIC TSDB 温度や圧力などの高頻度測定値に最適化されています。各 topic には default field として timestamp と quality が含まれます。
STATE PostgreSQL machine または system state を柔軟な JSONB 形式で保存します。
ACTION PostgreSQL command または action を柔軟な JSONB 形式で保存します。
Tier0 の使い方

データ基盤の準備

アプリ向けの外部データを接続し、Tier0 でモデル化・統合します。

Tier0 はカスタムアプリのデータ基盤を作ります。アプリから業務データを受け取り、既存のシステムやデバイスに接続し、アプリで使える統一モデルにデータを統合します。

すべてのデータは Namespace 配下の Tables にモデル化され、データ型に応じて整理されます。

  • 主に業務システムからのリレーショナルデータは Record テーブルに保存します。
  • 主にデバイスからの時系列データは Sample テーブルに保存します。
flowchart TB
  namespace["Namespace"] --> table["Table"]
  table --> record["Record テーブル<br/>リレーショナルデータ"]
  table --> sample["Sample テーブル<br/>時系列データ"]
  classDef t0accent fill:#B2ED1D,stroke:#73B200,color:#171717
  class table t0accent

業務データはアプリの利用または外部システムから取得します。時系列データは主に接続したデバイスから取得します。

flowchart LR
  app["アプリ"] -->|"業務データ"| record["Record"]
  stream["Stream"] -->|"デバイスデータ"| sample["Sample"]
  classDef t0accent fill:#B2ED1D,stroke:#73B200,color:#171717
  class record,sample t0accent
  • Source: 外部データサーバーに接続します。認証が必要な場合が多くあります。
  • Stream: サーバーからデータを収集・処理し、Namespace のモデルに保存します。
flowchart LR
  source["Source<br/>サーバーに接続"] --> stream["Stream<br/>収集と処理"]
  classDef t0accent fill:#B2ED1D,stroke:#73B200,color:#171717
  class source,stream t0accent
  1. Builder でアプリを構築し、Agent に Namespace の業務データモデルを用意させます。プロンプトで明示しない限り、Agent が業務ロジックからモデルを自動生成します。

    プロンプトで明示しない限り、Agent がアプリの業務ロジックからデータモデルを自動生成します。

  2. Connect > Source で必要なデータソースに接続し、認証を設定します。
  3. Agent に Stream を作成させ、接続済み Source のデータを収集・処理して、アプリ用に生成された Namespace モデルへ保存します。
Tier0 の使い方

センターからエッジのデータを管理する

センターノードから、接続されたエッジノード上のデータをシームレスに管理します。

Tier0 のエッジとセンターの連携により、エッジデバイスでデータを収集し、センタープラットフォームで管理できます。

  • エッジデバイス:エッジノード上の Tier0 Edge または Tier0 Enterprise。
  • センタープラットフォーム:センターノード上の Tier0 Cloud または Tier0 Enterprise。

エッジノードをセンターノードに接続する

Section titled “エッジノードをセンターノードに接続する”
  1. まず、センターノードで Fleet ノードを作成します。

  2. センターノードで生成されたトークンを使用して、各エッジノードを接続します。

エッジとセンターの間でデータを同期する

Section titled “エッジとセンターの間でデータを同期する”
  • Namespace Table はエッジノードからセンターノードへ一方向にのみ選択・同期できます。同期した Table の履歴データとリアルタイムデータは、どちらもセンターノードで利用できます。
  • センターノードからエッジノードにユーザーまたはユーザーグループを割り当て、ノードを管理できます。
Tier0 の使い方

工場データを扱う

MQTT と API で UNS データを操作し、API リファレンスを参照します。

MQTT と API を通じて UNS データを操作できます。

Tier0 で生成した認証情報を使って MQTT クライアントを UNS broker に接続できます。

Connect > Source > MQTT Device で MQTT 認証情報を生成し、記録します。

  1. MQTTX をインストールして開きます。
  2. UNS broker の情報と生成した認証情報で接続を追加します。
    Terminal window
    {
    "Host": "mqtt.tier0.dev",
    "Port": 1883,
    "Client ID": "<generated client ID>",
    "Username": "<generated username>",
    "Password": "<generated password>"
    }
  1. クライアントの状態が正常であることを確認します。
  2. UNS モデルの Topic をコピーし、クライアントからメッセージを配信します。
  • Base URL: https://<your-tier0-host>/openapi/v2
  • Authentication: Tier0 で取得した API キーを x-api-key ヘッダーに指定します。
  • POST /uns/metadata:find — Tables を一覧表示して Table ID を取得

    Terminal window
    const base = "https://your-tier0-host/openapi/v2";
    const response = await fetch(`${base}/uns/metadata:find`, {
    method: "POST",
    headers: { "content-type": "application/json", "x-api-key": "your-api-key" },
    body: JSON.stringify({"kind": "collection", "filter": {}, "page": {"mode": "offset", "page": 1, "size": 20}}),
    });
    const result = await response.json();
    if (!response.ok || result.code !== 0) throw new Error(result.error?.code || result.msg);
    console.log(result.data.items);
  • POST /uns/collections/{collectionId}/records:find — Records を一覧表示して Record ID を取得

    Terminal window
    const base = "https://your-tier0-host/openapi/v2";
    const collectionId = "your-collection-id";
    const response = await fetch(`${base}/uns/collections/${encodeURIComponent(collectionId)}/records:find`, {
    method: "POST",
    headers: { "content-type": "application/json", "x-api-key": "your-api-key" },
    body: JSON.stringify({"limit": 20}),
    });
    const result = await response.json();
    if (!response.ok || result.code !== 0) throw new Error(result.error?.code || result.msg);
    console.log(result.data);
  • POST /uns/collections/{collectionId}/samples:latest — Record の最新 Sample を取得

    Terminal window
    const base = "https://your-tier0-host/openapi/v2";
    const collectionId = "your-collection-id";
    const response = await fetch(`${base}/uns/collections/${encodeURIComponent(collectionId)}/samples:latest`, {
    method: "POST",
    headers: { "content-type": "application/json", "x-api-key": "your-api-key" },
    body: JSON.stringify({"recordIds": ["record_123"]}),
    });
    const result = await response.json();
    if (!response.ok || result.code !== 0) throw new Error(result.error?.code || result.msg);
    console.log(result.data);
  • POST /uns/collections/{collectionId}/samples:find — 指定期間の Samples を取得

    Terminal window
    const base = "https://your-tier0-host/openapi/v2";
    const collectionId = "your-collection-id";
    const response = await fetch(`${base}/uns/collections/${encodeURIComponent(collectionId)}/samples:find`, {
    method: "POST",
    headers: { "content-type": "application/json", "x-api-key": "your-api-key" },
    body: JSON.stringify({"recordIds": ["record_123"], "from": 1792454400000, "to": 1792540800000, "filter": {"temperature": {"$gt": 20}}, "limit": 20}),
    });
    const result = await response.json();
    if (!response.ok || result.code !== 0) throw new Error(result.error?.code || result.msg);
    console.log(result.data);
Tier0 の使い方

アプリの構築

AI との対話でカスタム産業アプリを構築します。

AI との対話でカスタム産業アプリを構築します。アプリは工場データを利用でき、ロールによるアクセス制御、バージョン管理、外部へのデプロイ機能を備えます。

  • フォルダーはアプリの分類にのみ使用します。
  • プロンプトに応じてテンプレートが自動的に選ばれ、開発時間を短縮します。
  • 設備管理、生産監視、エネルギー管理などの一般的な産業アプリにはテンプレートプロンプトがあります。

アプリの目的、機能、外部データが必要かどうかを示します。

  • アプリの目的:何のためのアプリですか?
Terminal window
工場技術者向けの設備保全アプリを作成してください。
  • アプリの機能:何を行うアプリですか?
Terminal window
設備の状態監視、保全依頼、修理状況の追跡を可能にしてください。
  • アプリのデータ:外部データが必要ですか?
Terminal window
xxx table のアラーム記録と保全履歴を使ってください。

アプリはロールベースアクセス制御(RBAC)でメンバーのアクセスと操作を管理します。

  • 明示されない場合、Agent が業務ロジックからロールを生成します。責務が合う既存ロールも再利用できます。
  • アプリのロールは Workspace メンバーにのみ割り当てられます。
  • ロール不要とプロンプトで明示したアプリは、すべてのメンバーに開放されます。
  • 未公開: アプリの最新状態。デプロイ前の変更は他のバージョンに影響しません。
  • スナップショット: 保存時点の状態。デプロイすると現在の公開バージョンに代わります。
  • 公開済み: 現在オンラインのバージョン。

完成したアプリは Preview ページから外部環境や Tier0 Enterprise 向けにエクスポートできます。

  • ソースコードをダウンロード: 二次開発向け。
  • Bundle をエクスポート: Tier0 Enterprise でのローカルインポート向け。

デジタルツインの構築 — 工場データを運用状況の可視化に活用します。

Tier0 の使い方

Digital Twin を構築する

ライブ UNS データを 3D モデルにバインドし、完全な工場シーンとして組み立てて Digital Twin 可視化を行います。

Tier0 に接続された工場データは、リアルな動きと環境を持つ Digital Twin として可視化できます。流れは、データを 3D モデルへマッピングし、その後モデルを組み合わせて完全な工場シーンを構築する形です。

データを 3D モデルにマッピングする

Section titled “データを 3D モデルにマッピングする”
  1. Model にモデルをアップロードしたあと、UNS データでリアルタイム動作を制御するノードを選択します。
  2. 同じモデルに異なる UNS データを持つインスタンスを追加し、複数の機械をシミュレートします。
  3. データをモデルにバインドし、Preview でデータの変化に合わせて移動や回転が行われるか確認します。
    • Position: モデルは選択した座標方向へ移動します。
    • Rotation: モデルは座標の原点を中心に回転します。
  4. Data Tagging を使用して、静的情報表示用のタグを追加します。
  1. Instance Library から、シーン内に存在すべきインスタンスを追加します。
  2. 上部のツールを使ってモデルを移動、拡大縮小、回転させ、シーンに合わせます。視点と座標位置も調整できます。
  3. 右側の Object でモデル位置を確認できます。ここにはバインドされた UNS データが表示されます。
  4. ビューポートとライティングは環境の詳細を調整するために使用します。

共有できるのはインスタンスのみで、モデル単位またはシーン単位で共有できます。

  • Share Model: リアルタイム UNS データ付きのモデルを表示する Tier0 プラットフォームリンクを生成します。
  • Share Scene: リアルタイム UNS データと環境設定を含むモデルおよびシーンを表示する Tier0 プラットフォームリンクを生成します。
Tier0 の使い方

Agent で Tier0 を操作する

MCP を介して AI Agent を Tier0 に接続します。

MCP を介して AI Agent を Tier0 に接続します。Agent は付与された権限の範囲でプラットフォーム API を検索して使用できます。

好みの AI agent で Tier0 を操作します。
Claude Code
Codex
Gemini CLI
Cursor
GitHub Copilot
WorkBuddy
  1. 設定 > Plugin > MCP で Tier0 から取得した URL を使って MCP サーバーを追加します。
  2. Tier0 の 設定 > API Keys > Personal Keys で必要な権限の個人 API キーを作成します。
  3. Codex の MCP サーバーに個人 API キーを入力します。
    Terminal window
    { "Authorization": "Bearer <your-personal-api-key>" }
  4. Agent に whoami を実行させ、接続を確認します。
MCP ツール 用途
whoami ID と権限を確認します。
docs API ドキュメントを読みます。
search API 操作を探します。
execute API 操作を呼び出します。

まず docs と search で操作を探し、次に execute で呼び出します。例:

Terminal window
Workspace の `Plant/Line1/Metric/Temperature` の現在値を読み取ってください。

工場データの操作 — Tier0 が工場データを整理、提供する方法を確認します。

ベストプラクティス

工場データをモデリングする

Demo UNS の設計:topic explosion の回避と payload structure のベストプラクティス。

物理的な場所を持つ機械や設備の産業データは、通常 ISA-95 標準に基づいてモデル化します。

Terminal window
Enterprise (Level 4)
└── Site (Level 3/4)
└── Area (Level 3)
└── Work Center / Process Cell (Level 2/3)
└── Equipment / Unit (Level 1/2)
└── Control Module / Device (Level 0/1)

ERP の生産注文や作業指示計画など、業務計画やプロセスオブジェクトについては、業務コンテキストに沿ってデータをモデル化します。

Terminal window
Factory / Business Domain / Business Object / Topic Type / Topic
  • Business Domain:データが属する業務プロセスまたはシステムを確認します。

    Terminal window
    ERP
    MES
    WMS
    QMS
    EAM
    LIMS
    Planning
    Inventory
    Maintenance
    Quality
    Logistics
    ...
  • Business Object:業務ドメインで管理される中心オブジェクトです。

    Terminal window
    ProductionOrders
    WorkOrderPlan
    MaterialInventory
    QualityInspection
    MaintenanceOrders
    PurchaseOrders
    Shipments
    ...
  • Topic Type:Metric、Action、State からデータタイプを選択します。

    Topic Type Used for Examples
    STATE 現在の状態または現在の事実 作業指示の状態、注文状態、設備状態
    METRIC 継続的に変化する数値 温度、速度、生産量、OEE、エネルギー消費
    ACTION 外部実行者へのコマンド 設備起動、設備停止、アラームリセット、作業指示の払い出し要求
Terminal window
DemoFactory
└── ERP
├── ProductionOrders
│ └── State
│ ├── UpsertProductionOrder
│ └── OrderList
└── WorkOrderPlan
├── Metric
│ └── SplitCount
└── State
├── PlanStatus
└── WorkOrderList

topic payload を設計するときは、消費されるデータと書き戻されるデータの両方を考慮します。

  • Action

    Action payload には、データが Tier0 データベースに保存された時刻を記録する _timestamp が自動的に含まれます。

    Terminal window
    {
    "light_turn_on": true,
    "height_adjust": 12.5,
    "_timestamp": "2026-07-10T10:00:00Z"
    }
  • Metric

    Metric payload には、Tier0 データベースへの保存時刻を記録する _timestamp と、データ品質を表す _quality が自動的に含まれます。

    Terminal window
    {
    "production_order_id": "PO-20260710-001",
    "plan_id": "PLAN-001",
    "plan_number": "WOP-20260710-001",
    "split_count": 3,
    "updated_at": "2026-07-10T10:00:00Z",
    "_timestamp": "2026-07-10T10:00:00Z",
    "_quality": "Good"
    }
  • State

    State payload には、データが Tier0 データベースに保存された時刻を記録する _timestamp が自動的に含まれます。

    Terminal window
    {
    "event_id": "EVT-001",
    "event_type": "UPSERT",
    "source": "ERP",
    "production_order_id": "PO-20260710-001",
    "order_number": "PO-001",
    "product_code": "SKU-1001",
    "planned_qty": 1200,
    "unit": "pcs",
    "status": "Released",
    "due_date": "2026-07-12T00:00:00Z",
    "updated_at": "2026-07-10T10:00:00Z",
    "_timestamp": "2026-07-10T10:00:00Z"
    }

Tier0 は、topic の増えすぎを防ぐために Metric、Action、State の 3 種類を使用します。

  • 高頻度リアルタイムデータには Metric を使う

    高頻度の測定値やテレメトリは、各信号の詳細ごとに namespace を広げるのではなく Metric に配置します。

    Terminal window
    Factory_A
    └── SMT_Line_1
    └── Machine_001
    ├── Temperature_Value
    ├── Temperature_Unit
    ├── Temperature_Status
    └── Speed_Value
  • 低頻度ステータスデータには State を使う

    低頻度の状態、スナップショット、現在の業務状態は State に配置します。ジョブ、バッチ、注文などの変化するエンティティごとに新しい topic を作らないようにします。

    Terminal window
    Factory_A
    └── SMT_Line_1
    └── State
    ├── Job_001
    ├── Job_002
    └── Job_003
  • 低頻度アクションデータには Action を使う

    コマンド、リクエスト、オペレーター操作は Action に配置します。action の入力はパラメータごとに topic を作るのではなく、topic のフィールドとして保持します。

    Terminal window
    Factory_A
    └── SMT_Line_1
    └── Machine_001
    ├── Start_Command
    ├── Target_Height
    └── Light_On
ベストプラクティス

データソースの接続

Tier0 は OPC UA、Modbus、MQTT など、さまざまな産業用プロトコルへの接続に対応しています。

  • サーバーアドレスを入力すると、セキュリティ設定がサーバーから自動取得されます。
  • ユーザー名とパスワード、または証明書による認証に対応しています。
Terminal window
{
"name": "ua",
"description": "",
"protocol": "opcua",
"endpoint": "opc.tcp://220.184.175.73:4841/demo/",
"runtimeLocation": "local",
"opcua": {
"securityMode": "None",
"securityPolicy": "None"
}
}

サーバーアドレスとユニット ID のみが必要です。

Terminal window
{
"name": "modbus",
"description": "",
"protocol": "modbus-tcp",
"endpoint": "tcp://220.184.175.73:1502",
"runtimeLocation": "local",
"modbus": {
"unitId": 1
}
}

Tier0 は、デバイスからデータを受信する MQTT Broker としても、外部 MQTT Broker に接続するクライアントとしても使用できます。

  • Broker として:

    1. MQTT Device の接続時に、クライアント ID、ユーザー名、パスワードなどの接続認証情報が生成されます。
    2. サードパーティーのクライアントは、接続パネルに表示される公開トピックを使ってメッセージを公開する必要があります。
    3. 公開トピックを入力とする Stream を Agent に作成させ、指定した Namespace にデータを送信します。
  • クライアントとして:サードパーティーの Broker に接続します。

    Terminal window
    {
    "name": "111",
    "description": "",
    "protocol": "mqtt",
    "endpoint": "mqtt://220.184.175.73:1883",
    "runtimeLocation": "local",
    "mqtt": {
    "clientId": "tier0UxxxxxxxxuwQVfi"
    }
    }

Tier0 は、外部からアクセスできる HTTP サーバーとしても、他の HTTP サーバーの API を呼び出すクライアントとしても使用できます。

  • サーバーとして:

    1. Tier0 に HTTP サーバーを追加し、情報パネルから完全なアドレスを取得します。
    2. データと後続のルーティングを定義する Stream を Agent に作成させ、API を構成します。
    3. サードパーティーは、そのアドレスと設定したルートを使って API を呼び出し、データを取得します。
  • クライアントとして:サードパーティーの HTTP サーバーに接続します。

Terminal window
{
"name": "222",
"description": "",
"protocol": "http-api",
"endpoint": "http://220.184.175.73:8088/api/telemetry",
"runtimeLocation": "local",
"role": "client",
"http": {
"authentication": "none"
}
}
  • データベースアドレスには、ポートとデータベース名の両方を含める必要があります。
  • 最初に実行するクエリが必要です。
  • データベースが匿名接続を許可する場合は、認証を省略できます。
Terminal window
{
"name": "eee",
"description": "",
"protocol": "edge-sql",
"endpoint": "mysql://hzoffice.tier0.dev:3307/demo_factory",
"runtimeLocation": "local",
"sql": {
"queries": {
"query1": "SELECT * FROM telemetry ORDER BY id DESC LIMIT 5"
},
"tlsMode": "verify-full"
},
"credentialRef": "ref_9ce47b8778xxxxxxxx7dad49a86dbad"
}
  1. OAuth を使って Tier0 Github に接続します。
  2. データソースの情報パネルで、この組織のリソースを確認します。
  3. 必要なデータを取得する Stream を Agent に作成させます。

データソースからデータを取得する

Section titled “データソースからデータを取得する”
  1. 接続したデータソースからデータを取得する Stream を Agent に作成させます。
  2. Modbus レジスタ、データベースクエリ、UA 名前空間 URI、MQTT トピックなど、必要な情報をプロンプトに含めます。
ベストプラクティス

セキュリティとレジリエンス

Tier0 の ID、データアクセス、デプロイの可用性、復旧に関する制御の概要。

Tier0 は、次の 2 つの側面からデータの安全性を確保します。

  • セキュリティ:プラットフォーム、アプリケーション、データにアクセスできるユーザーを制御します。
  • レジリエンス:障害発生後のサービス継続とデータ復旧に対応します。

エディションごとのセキュリティ範囲

Section titled “エディションごとのセキュリティ範囲”
エディション セキュリティの範囲
Cloud プラットフォームへのアクセス制御と、認証が必要な MQTT および API へのアクセスを提供します。
Enterprise プラットフォームとデータへのアクセス制御に加え、プライベート環境向けのデプロイの可用性、バックアップ、復旧を提供します。
Edge(オープンソース) ローカルでのデータ接続とモデリングに使用します。内蔵 MQTT ブローカーは認証なしのサブスクリプションを許可します。

各エディションの位置付けについては、最適な製品の選択を参照してください。

対象 Tier0 の仕組み 詳細
プラットフォームへのアクセス
  • Cloud は Workspace のメンバー資格でアクセスを制御します。
  • Enterprise はユーザーアカウントでアクセスを制御します。
ユーザー管理
Agent のアクセス Agent は MCP を介して接続し、付与された権限の範囲でプラットフォームを操作します。 Agent を接続する
アプリケーションへのアクセス Tier0 は RBAC を使用してアプリケーションへのアクセスを制御します。 アクセス制御
アクセス方法 Tier0 の仕組み 詳細
MQTT
  • クライアントは Tier0 が生成した認証情報で認証します。
  • TLS とセキュア WebSocket が転送中のデータを暗号化します。
MQTT 認証情報と接続
REST API データへのアクセスには Tier0 が生成したキーが必要です。 API リファレンス

Enterprise は現在、センターノード向けに 2 つのデプロイ計画を提供しています。

計画 可用性の境界 詳細
標準デプロイ
  • データベースのプライマリ/スタンバイのフェイルオーバーに対応します。
  • Enterprise アプリケーションと EMQX は単一障害点として残ります。
標準デプロイ計画
高可用デプロイ
  • Enterprise のアクティブ/スタンバイノードを追加し、データベース、キャッシュ、オブジェクトストレージ、管理対象のランタイムファイルのフェイルオーバー動作を定義します。
  • 無停止やデータ損失ゼロを保証するものではありません。
高可用デプロイ計画

Enterprise はデータベースのバックアップと復旧を提供します。復旧後はデプロイ状態を確認し、基本機能を検証して、プラットフォームにサインインできることを確認してください。

ベストプラクティス

Agent で製造現場のワークフローを構築する

UNS Agent を使い、データモデリング、データ接続、データイベントを含むワークフローを構築します。

データモデル、接続、イベントを複数のモジュールで順番に作る代わりに、UNS Agent が会話を通じてワークフローを処理します。

混合タンクは材料を混ぜながら加熱します。データモデルを構築し、温度、水位、ヒーター状態を収集して、タンクの過熱を判定しアラームを発生させます。

flowchart RL
  source["Source Flow<br/>(データソース接続)"]
  event["Event Flow<br/>(イベントロジックとアラーム)"]
  uns["UNS<br/>(モデリング)"]

  source -->|"混合タンクデータ"| uns
  event -->|"アラームデータ"| uns

  classDef t0accent fill:#EFFFD2,stroke:#8AC926,stroke-width:1px,color:#18230B
  classDef t0node fill:#F8FAFC,stroke:#CBD5E1,stroke-width:1px,color:#111827
  class uns t0accent
  class source,event t0node
  1. UNS で full_access を指定して UNS Agent との会話を開始します。

  2. UNS モデルを構築するためのプロンプトを入力します。

    Terminal window
    混合タンクの温度、水位、ヒーター状態を表すデータモデルを作成します。温度と水位は 1 つの metric topic に、ヒーター状態は 1 つの state topic に配置してください。
  3. モデルが完成したことを確認したら、対応するデータをモデルに接続するプロンプトを入力します。

    Terminal window
    この 2 つの topic にデータを送信する Source Flow を作成し、妥当なデータをシミュレートしてください。
  4. 次のロジックでイベントを作成するプロンプトを入力します。

    • 低水位警告:水位が 20% 未満でヒーターがオンの場合に発生します。
    • 空焚きアラーム:水位が 15% 未満、温度が 90°C を超え、ヒーターがオンの場合に発生します。
    Terminal window
    次のアラームロジックの Event Flow を作成してください:
    - Warning:level < 20 かつ heater_status = true のときに発生。
    - Critical:level < 15、temperature > 90、heater_status = true のときに発生。
    - level > 25 または heater_status = false のとき、アクティブなアラームをクリア。
    既存の UNS モデル配下にアラーム結果を受け取る新しい topic を作成してください。出力にはアラームレベル、メッセージ、アクティブ状態、タイムスタンプを含めます。
  5. UNS で結果を確認します。

ベストプラクティス

Digital Twin でデータを表示する

UNS データを 3D モデルとシーンでリアルタイムに表示します。

Tier0 のデジタルツイン機能では、リアルな 3D シーンとモデルで UNS のライブデータを表示できます。 この例では、次の設備を含む作業場を再現します。

  • 旋盤 2 台
  • 旋盤の間で作業するロボットアーム 1 台
  • 入荷用バッファステーションと出荷用バッファ各 1 台
  • 品質検査機 1 台
  • 統合制御システム 1 台
  • 原材料棚 2 台と製品棚 2 台
  • AGV 1 台

機械の動作を制御するデータ、機械の状態や作業場の環境を示すデータを含め、すべてを UNS に収集します。

  1. UNS にデータモデルを構築します。

    UNS モデルの JSON を表示
    Terminal window
    {
    "namespace": [
    {
    "name": "Metric",
    "alias": "metric_151a7edd68bf4269a229",
    "type": "PATH",
    "children": [
    {
    "name": "RobotArm",
    "alias": "Robot_0_9d5dc450dc1f4c0c9a86",
    "type": "TOPIC",
    "topicType": "METRIC",
    "extendProperties": {
    "J0_Cur": "0"
    },
    "fields": [
    {
    "name": "J1_Cur",
    "type": "FLOAT"
    },
    {
    "name": "J1_Init",
    "type": "FLOAT"
    },
    {
    "name": "J2_Cur",
    "type": "FLOAT"
    },
    {
    "name": "J2_Init",
    "type": "FLOAT"
    },
    {
    "name": "J3_Cur",
    "type": "FLOAT"
    },
    {
    "name": "J3_Init",
    "type": "FLOAT"
    },
    {
    "name": "J4_Cur",
    "type": "FLOAT"
    },
    {
    "name": "J4_Init",
    "type": "FLOAT"
    },
    {
    "name": "J5_Cur",
    "type": "FLOAT"
    },
    {
    "name": "J5_Init",
    "type": "FLOAT"
    },
    {
    "name": "J6_Cur",
    "type": "FLOAT"
    },
    {
    "name": "J6_Init",
    "type": "FLOAT"
    },
    {
    "name": "Model_Name",
    "type": "STRING"
    },
    {
    "name": "Max_Payload_kg",
    "type": "FLOAT"
    },
    {
    "name": "Reach_Radius_mm",
    "type": "FLOAT"
    },
    {
    "name": "Gripper_Force_N",
    "type": "FLOAT"
    }
    ],
    "enableHistory": "TRUE",
    "mockData": "FALSE"
    },
    {
    "name": "ProLathe-01",
    "alias": "ProLathe_ef325e0a9db047d6abac",
    "type": "TOPIC",
    "topicType": "METRIC",
    "fields": [
    {
    "name": "J_Changer_Cur",
    "type": "FLOAT"
    },
    {
    "name": "J_Door_Cur",
    "type": "FLOAT"
    },
    {
    "name": "J_Finger_Cur",
    "type": "FLOAT"
    },
    {
    "name": "J_Spindle_Cur",
    "type": "FLOAT"
    },
    {
    "name": "J_TailStock_Cur",
    "type": "FLOAT"
    },
    {
    "name": "J_X_Cur",
    "type": "FLOAT"
    },
    {
    "name": "J_Y_Cur",
    "type": "FLOAT"
    },
    {
    "name": "J_Z_Cur",
    "type": "FLOAT"
    },
    {
    "name": "Model_Name",
    "type": "STRING"
    },
    {
    "name": "Max_Placement_Rate_cph",
    "type": "INTEGER"
    },
    {
    "name": "Placement_Speed_cph",
    "type": "INTEGER"
    },
    {
    "name": "Feeder_Usage_pct",
    "type": "INTEGER"
    },
    {
    "name": "Machine_State_code",
    "type": "INTEGER"
    }
    ],
    "enableHistory": "FALSE",
    "mockData": "FALSE"
    },
    {
    "name": "ProLathe-02",
    "alias": "ProLathe2_ef325e0a9db047d6abac",
    "type": "TOPIC",
    "topicType": "METRIC",
    "fields": [
    {
    "name": "J_Changer_Cur",
    "type": "FLOAT"
    },
    {
    "name": "J_Door_Cur",
    "type": "FLOAT"
    },
    {
    "name": "J_Finger_Cur",
    "type": "FLOAT"
    },
    {
    "name": "J_Spindle_Cur",
    "type": "FLOAT"
    },
    {
    "name": "J_TailStock_Cur",
    "type": "FLOAT"
    },
    {
    "name": "J_X_Cur",
    "type": "FLOAT"
    },
    {
    "name": "J_Y_Cur",
    "type": "FLOAT"
    },
    {
    "name": "J_Z_Cur",
    "type": "FLOAT"
    },
    {
    "name": "Model_Name",
    "type": "STRING"
    },
    {
    "name": "Max_Placement_Rate_cph",
    "type": "INTEGER"
    },
    {
    "name": "Placement_Speed_cph",
    "type": "INTEGER"
    },
    {
    "name": "Feeder_Usage_pct",
    "type": "INTEGER"
    },
    {
    "name": "Machine_State_code",
    "type": "INTEGER"
    }
    ],
    "enableHistory": "FALSE",
    "mockData": "FALSE"
    },
    {
    "name": "AGV",
    "alias": "AGV_7eddee0054a0",
    "type": "TOPIC",
    "topicType": "METRIC",
    "fields": [
    {
    "name": "Position_X_Cur",
    "type": "FLOAT"
    },
    {
    "name": "Position_X_Init",
    "type": "FLOAT"
    },
    {
    "name": "Position_Y_Cur",
    "type": "FLOAT"
    },
    {
    "name": "Position_Y_Init",
    "type": "FLOAT"
    },
    {
    "name": "Rotation_Y_Cur",
    "type": "FLOAT"
    },
    {
    "name": "Rotation_Y_Init",
    "type": "FLOAT"
    },
    {
    "name": "Tray_Height_Cur",
    "type": "FLOAT"
    },
    {
    "name": "Tray_Height_Init",
    "type": "FLOAT"
    },
    {
    "name": "State_Cur",
    "type": "STRING"
    },
    {
    "name": "State_Init",
    "type": "STRING"
    },
    {
    "name": "Position_Z_Cur",
    "type": "FLOAT"
    },
    {
    "name": "Position_Z_Init",
    "type": "FLOAT"
    },
    {
    "name": "Model_Name",
    "type": "STRING"
    },
    {
    "name": "Max_Load_kg",
    "type": "FLOAT"
    },
    {
    "name": "Task_Progress_pct",
    "type": "INTEGER"
    },
    {
    "name": "Remaining_Distance_m",
    "type": "FLOAT"
    },
    {
    "name": "AGV_State_code",
    "type": "INTEGER"
    }
    ],
    "enableHistory": "FALSE",
    "mockData": "FALSE"
    },
    {
    "name": "RobotArm-1",
    "alias": "RobotArm_1_b9f06e21346d",
    "type": "TOPIC",
    "topicType": "METRIC",
    "fields": [
    {
    "name": "J1_Cur",
    "type": "FLOAT"
    },
    {
    "name": "J1_Init",
    "type": "FLOAT"
    },
    {
    "name": "J2_Cur",
    "type": "FLOAT"
    },
    {
    "name": "J2_Init",
    "type": "FLOAT"
    },
    {
    "name": "J3_Cur",
    "type": "FLOAT"
    },
    {
    "name": "J3_Init",
    "type": "FLOAT"
    },
    {
    "name": "J4_Cur",
    "type": "FLOAT"
    },
    {
    "name": "J4_Init",
    "type": "FLOAT"
    },
    {
    "name": "J5_Cur",
    "type": "FLOAT"
    },
    {
    "name": "J5_Init",
    "type": "FLOAT"
    },
    {
    "name": "J6_Cur",
    "type": "FLOAT"
    },
    {
    "name": "J6_Init",
    "type": "FLOAT"
    }
    ],
    "enableHistory": "TRUE",
    "mockData": "FALSE"
    }
    ]
    },
    {
    "name": "State",
    "alias": "state_3912d0df3fee",
    "type": "PATH",
    "children": [
    {
    "name": "RawMaterialStorage",
    "alias": "RawMaterialS_c3307f680405",
    "type": "TOPIC",
    "topicType": "STATE",
    "fields": [
    {
    "name": "StockAmount",
    "type": "INTEGER"
    }
    ],
    "enableHistory": "FALSE",
    "mockData": "FALSE"
    },
    {
    "name": "ProductStorage",
    "alias": "ProductStora_3c145f140bd9",
    "type": "TOPIC",
    "topicType": "STATE",
    "fields": [
    {
    "name": "StockAmount",
    "type": "INTEGER"
    }
    ],
    "enableHistory": "FALSE",
    "mockData": "FALSE"
    },
    {
    "name": "InboundBuffer",
    "alias": "LoaderBuffer_9feece9b3231",
    "type": "TOPIC",
    "topicType": "STATE",
    "fields": [
    {
    "name": "Amount",
    "type": "INTEGER"
    }
    ],
    "enableHistory": "FALSE",
    "mockData": "FALSE"
    },
    {
    "name": "OutboundBuffer",
    "alias": "OutboundBuff_75433b98fde6",
    "type": "TOPIC",
    "topicType": "STATE",
    "fields": [
    {
    "name": "Amount",
    "type": "INTEGER"
    }
    ],
    "enableHistory": "FALSE",
    "mockData": "FALSE"
    }
    ]
    }
    ]
    }
  2. Source Flow でデータソースを UNS モデルに接続します。

    • ロボットアーム
    ロボットアームの Flow JSON を表示
    Terminal window
    [
    {
    "id": "03933a7eb1a7b992",
    "type": "function",
    "z": "8daeb61ebd9e5f52",
    "name": "Cache Data",
    "func": "const CONFIG = {\n fields: ['Joint_1', 'Joint_2', 'Joint_3', 'Joint_4', 'Joint_5', 'Joint_6'],\n payloadFields: {\n value: 'CurrentValue',\n initialValue: 'InitialValue',\n name: 'Name',\n timeStamp: 'timeStamp',\n time_stamp: 'time_stamp',\n quality: 'quality'\n }\n};\n\nlet cache = flow.get('dataCache') || { instant: {}, metadata: {} };\n\nconst topicParts = msg.topic.split('/');\nconst fieldName = topicParts[topicParts.length - 1];\n\nlet payload = msg.payload;\nif (typeof payload === 'string') {\n try {\n payload = JSON.parse(payload);\n } catch (e) {\n return null;\n }\n}\n\nlet value = payload[CONFIG.payloadFields.value];\nif (value === undefined) return null;\n\nconst metadata = {\n timeStamp: payload[CONFIG.payloadFields.timeStamp],\n time_stamp: payload[CONFIG.payloadFields.time_stamp],\n quality: payload[CONFIG.payloadFields.quality],\n name: payload[CONFIG.payloadFields.name],\n initialValue: payload[CONFIG.payloadFields.initialValue]\n};\n\nif (CONFIG.fields.includes(fieldName)) {\n cache.instant[fieldName] = value;\n cache.metadata[fieldName] = metadata;\n} else {\n return null;\n}\n\nflow.set('dataCache', cache);\nreturn null;",
    "outputs": 0,
    "timeout": "",
    "noerr": 0,
    "initialize": "",
    "finalize": "",
    "libs": [],
    "x": 880,
    "y": 500,
    "wires": []
    },
    {
    "id": "0c4dbdcbe5e3db92",
    "type": "mqtt in",
    "z": "8daeb61ebd9e5f52",
    "name": "Subscribe Joint_1~6",
    "topic": "FactorySim_Supos/Flow_Group__1/MechEquips/Transporter_Kawasaki_BX100N/Motor_Joints/+",
    "qos": "1",
    "datatype": "auto",
    "broker": "c11decb07a68083d",
    "nl": false,
    "rap": true,
    "rh": 0,
    "inputs": 0,
    "x": 610,
    "y": 480,
    "wires": [
    [
    "03933a7eb1a7b992"
    ]
    ]
    },
    {
    "id": "ba42bca5aa9dc561",
    "type": "inject",
    "z": "8daeb61ebd9e5f52",
    "name": "100ms Timer",
    "props": [
    {
    "p": "payload"
    },
    {
    "vt": "str",
    "p": "topic"
    }
    ],
    "repeat": "0.1",
    "crontab": "",
    "once": true,
    "onceDelay": "0.1",
    "topic": "",
    "payload": "",
    "payloadType": "date",
    "x": 520,
    "y": 600,
    "wires": [
    [
    "0fc94449c377ad9a"
    ]
    ]
    },
    {
    "id": "0fc94449c377ad9a",
    "type": "function",
    "z": "8daeb61ebd9e5f52",
    "name": "Aggregate & Publish (Flat)",
    "func": "const CONFIG = {\n fieldMapping: {\n 'Joint_1': 'J1',\n 'Joint_2': 'J2',\n 'Joint_3': 'J3',\n 'Joint_4': 'J4',\n 'Joint_5': 'J5',\n 'Joint_6': 'J6'\n },\n missingStrategy: 'lastValue',\n outputTopic: 'robot/state',\n windowMs: 100\n};\n\nconst FIELDS = Object.keys(CONFIG.fieldMapping);\n\nlet cache = flow.get('dataCache') || { instant: {}, metadata: {} };\nlet lastValues = flow.get('lastValues') || {};\nlet lastMetadata = flow.get('lastMetadata') || {};\n\nlet output = {\n timestamp: new Date().toISOString()\n};\n\nfor (const field of FIELDS) {\n const shortName = CONFIG.fieldMapping[field];\n \n if (cache.instant[field] !== undefined) {\n output[shortName + '_Cur'] = cache.instant[field];\n output[shortName + '_Init'] = cache.metadata[field] ? cache.metadata[field].initialValue : 0;\n output[shortName + '_Qly'] = cache.metadata[field] ? cache.metadata[field].quality : 0;\n \n lastValues[field] = cache.instant[field];\n lastMetadata[field] = cache.metadata[field];\n } else {\n let fallbackValue = CONFIG.missingStrategy === 'lastValue' \n ? (lastValues[field] !== undefined ? lastValues[field] : 0) \n : 0;\n \n output[shortName + '_Cur'] = fallbackValue;\n output[shortName + '_Init'] = lastMetadata[field] ? lastMetadata[field].initialValue : 0;\n output[shortName + '_Qly'] = -1;\n }\n}\n\nmsg.payload = output;\nmsg.topic = CONFIG.outputTopic;\n\nflow.set('dataCache', { instant: {}, metadata: {} });\nflow.set('lastValues', lastValues);\nflow.set('lastMetadata', lastMetadata);\n\nreturn msg;",
    "outputs": 1,
    "timeout": "",
    "noerr": 0,
    "initialize": "",
    "finalize": "",
    "libs": [],
    "x": 760,
    "y": 600,
    "wires": [
    [
    "c9eee2264fe78846",
    "a685279629e73d9a",
    "4ce075fda1d3d993",
    "8e8779918eab6f89"
    ]
    ]
    },
    {
    "id": "c9eee2264fe78846",
    "type": "mqtt out",
    "z": "8daeb61ebd9e5f52",
    "name": "Publish robot/state",
    "topic": "Metric/RobotArm",
    "qos": "1",
    "retain": "false",
    "respTopic": "",
    "contentType": "",
    "userProps": "",
    "correl": "",
    "expiry": "",
    "broker": "9836929a70c74929",
    "x": 1070,
    "y": 540,
    "wires": []
    },
    {
    "id": "c11decb07a68083d",
    "type": "mqtt-broker",
    "name": "supos-demo.supos.app",
    "broker": "supos-demo.supos.app",
    "port": 1883,
    "clientid": "",
    "autoConnect": true,
    "usetls": false,
    "protocolVersion": 4,
    "keepalive": 60,
    "cleansession": true,
    "autoUnsubscribe": true,
    "birthTopic": "",
    "birthQos": "0",
    "birthRetain": "false",
    "birthPayload": "",
    "birthMsg": {},
    "closeTopic": "",
    "closeQos": "0",
    "closeRetain": "false",
    "closePayload": "",
    "closeMsg": {},
    "willTopic": "",
    "willQos": "0",
    "willRetain": "false",
    "willPayload": "",
    "willMsg": {},
    "userProps": "",
    "sessionExpiry": ""
    },
    {
    "id": "9836929a70c74929",
    "type": "mqtt-broker",
    "z": "8daeb61ebd9e5f52",
    "name": "emqx",
    "broker": "mqtt.pre.tier0.dev",
    "port": "1883",
    "clientid": "336462685553088&336463047745872",
    "autoConnect": true,
    "usetls": false,
    "protocolVersion": "4",
    "keepalive": "60",
    "cleansession": true,
    "autoUnsubscribe": true,
    "birthTopic": "",
    "birthQos": "0",
    "birthRetain": "false",
    "birthPayload": "",
    "birthMsg": {},
    "closeTopic": "",
    "closeQos": "0",
    "closeRetain": "false",
    "closePayload": "",
    "closeMsg": {},
    "willTopic": "",
    "willQos": "0",
    "willRetain": "false",
    "willPayload": "",
    "willMsg": {},
    "userProps": "",
    "sessionExpiry": ""
    }
    ]
    • AGV
    AGV の Flow JSON を表示
    Terminal window
    [
    {
    "id": "fa46cf31be8d751e",
    "type": "tab",
    "label": "Metric/AGV",
    "disabled": false,
    "info": ""
    },
    {
    "id": "1f0e9d8c7b6a5a41",
    "type": "mqtt in",
    "z": "fa46cf31be8d751e",
    "name": "Subscribe AGV telemetry",
    "topic": "FactorySim_Supos/Flow_Group__1/MechEquips/AGV_zOnron/Motor_Joints/+",
    "qos": "1",
    "datatype": "auto",
    "broker": "c11decb07a68083d",
    "nl": false,
    "rap": true,
    "rh": 0,
    "inputs": 0,
    "x": 190,
    "y": 380,
    "wires": [
    [
    "2a1b3c4d5e6f7081"
    ]
    ]
    },
    {
    "id": "2a1b3c4d5e6f7081",
    "type": "function",
    "z": "fa46cf31be8d751e",
    "name": "Cache AGV telemetry",
    "func": "const CONFIG = {\n fields: [\n 'Position_X',\n 'Position_Y',\n 'Position_Z',\n 'Rotation_Y',\n 'Tray_Height',\n 'State'\n ],\n payloadFields: {\n value: 'CurrentValue',\n initialValue: 'InitialValue',\n name: 'Name',\n timeStamp: 'timeStamp',\n timeStampAlt: 'time_stamp'\n }\n};\n\nlet cache = flow.get('agvDataCache') || { instant: {}, metadata: {} };\n\nconst topicParts = (msg.topic || '').split('/');\nconst fieldName = topicParts[topicParts.length - 1];\nif (!CONFIG.fields.includes(fieldName)) {\n return null;\n}\n\nlet payload = msg.payload;\nif (typeof payload === 'string') {\n try {\n payload = JSON.parse(payload);\n } catch (error) {\n return null;\n }\n}\n\nif (typeof payload !== 'object' || payload === null) {\n return null;\n}\n\nconst currentValue = payload[CONFIG.payloadFields.value];\nif (currentValue === undefined) {\n return null;\n}\n\ncache.instant[fieldName] = currentValue;\ncache.metadata[fieldName] = {\n name: payload[CONFIG.payloadFields.name] || fieldName,\n initialValue: payload[CONFIG.payloadFields.initialValue],\n timeStamp: payload[CONFIG.payloadFields.timeStampAlt] ?? payload[CONFIG.payloadFields.timeStamp] ?? 0\n};\n\nflow.set('agvDataCache', cache);\nreturn null;",
    "outputs": 0,
    "timeout": "",
    "noerr": 0,
    "initialize": "",
    "finalize": "",
    "libs": [],
    "x": 470,
    "y": 380,
    "wires": []
    },
    {
    "id": "3b2c1d0e9f8a7b61",
    "type": "inject",
    "z": "fa46cf31be8d751e",
    "name": "100ms Timer",
    "props": [
    {
    "p": "payload"
    },
    {
    "p": "topic",
    "vt": "str"
    }
    ],
    "repeat": "0.1",
    "crontab": "",
    "once": true,
    "onceDelay": "0.1",
    "topic": "",
    "payload": "",
    "payloadType": "date",
    "x": 150,
    "y": 500,
    "wires": [
    [
    "4c3d2e1f0a9b8c71"
    ]
    ]
    },
    {
    "id": "4c3d2e1f0a9b8c71",
    "type": "function",
    "z": "fa46cf31be8d751e",
    "name": "Aggregate AGV UNS payload",
    "func": "const CONFIG = {\n fields: [\n 'Position_X',\n 'Position_Y',\n 'Position_Z',\n 'Rotation_Y',\n 'Tray_Height',\n 'State'\n ],\n outputTopic: 'Metric/AGV',\n defaultNumeric: 0,\n defaultString: ''\n};\n\nlet cache = flow.get('agvDataCache') || { instant: {}, metadata: {} };\nlet lastValues = flow.get('agvLastValues') || {};\nlet lastMetadata = flow.get('agvLastMetadata') || {};\nlet lastTimestamp = flow.get('agvLastTimestamp') || 0;\n\nlet output = {};\nlet candidateTimestamps = [];\n\nfor (const field of CONFIG.fields) {\n const hasCurrentFrameValue = Object.prototype.hasOwnProperty.call(cache.instant, field);\n const metadata = hasCurrentFrameValue ? cache.metadata[field] : lastMetadata[field];\n const currentValue = hasCurrentFrameValue ? cache.instant[field] : lastValues[field];\n const isStringField = field === 'State';\n\n output[field + '_Cur'] = currentValue !== undefined\n ? currentValue\n : (isStringField ? CONFIG.defaultString : CONFIG.defaultNumeric);\n output[field + '_Init'] = metadata && metadata.initialValue !== undefined\n ? metadata.initialValue\n : (isStringField ? CONFIG.defaultString : CONFIG.defaultNumeric);\n\n if (hasCurrentFrameValue) {\n lastValues[field] = cache.instant[field];\n lastMetadata[field] = cache.metadata[field];\n\n const rawTime = cache.metadata[field] ? Number(cache.metadata[field].timeStamp) : NaN;\n if (!Number.isNaN(rawTime)) {\n candidateTimestamps.push(rawTime);\n }\n }\n}\n\nif (candidateTimestamps.length > 0) {\n lastTimestamp = Math.max(...candidateTimestamps);\n}\n\noutput.timestamp = lastTimestamp;\n\nmsg.topic = CONFIG.outputTopic;\nmsg.payload = output;\n\nflow.set('agvDataCache', { instant: {}, metadata: {} });\nflow.set('agvLastValues', lastValues);\nflow.set('agvLastMetadata', lastMetadata);\nflow.set('agvLastTimestamp', lastTimestamp);\n\nreturn msg;",
    "outputs": 1,
    "timeout": "",
    "noerr": 0,
    "initialize": "",
    "finalize": "",
    "libs": [],
    "x": 460,
    "y": 500,
    "wires": [
    [
    "6d5e4f3a2b1c0d91",
    "7c6b5a4d3e2f1098"
    ]
    ]
    },
    {
    "id": "6d5e4f3a2b1c0d91",
    "type": "mqtt out",
    "z": "fa46cf31be8d751e",
    "name": "Publish Metric/AGV",
    "topic": "Metric/AGV",
    "qos": "1",
    "retain": "false",
    "respTopic": "",
    "contentType": "",
    "userProps": "",
    "correl": "",
    "expiry": "",
    "broker": "f2d431c2d2264341",
    "x": 710,
    "y": 400,
    "wires": []
    },
    {
    "id": "7c6b5a4d3e2f1098",
    "type": "debug",
    "z": "fa46cf31be8d751e",
    "name": "Debug AGV payload",
    "active": true,
    "tosidebar": true,
    "console": false,
    "complete": "payload",
    "targetType": "msg",
    "statusVal": "",
    "statusType": "auto",
    "x": 740,
    "y": 580,
    "wires": []
    },
    {
    "id": "c11decb07a68083d",
    "type": "mqtt-broker",
    "name": "supos-demo.supos.app",
    "broker": "supos-demo.supos.app",
    "port": 1883,
    "clientid": "",
    "autoConnect": true,
    "usetls": false,
    "protocolVersion": 4,
    "keepalive": 60,
    "cleansession": true,
    "autoUnsubscribe": true,
    "birthTopic": "",
    "birthQos": "0",
    "birthRetain": "false",
    "birthPayload": "",
    "birthMsg": {},
    "closeTopic": "",
    "closeQos": "0",
    "closeRetain": "false",
    "closePayload": "",
    "closeMsg": {},
    "willTopic": "",
    "willQos": "0",
    "willRetain": "false",
    "willPayload": "",
    "willMsg": {},
    "userProps": "",
    "sessionExpiry": ""
    },
    {
    "id": "f2d431c2d2264341",
    "type": "mqtt-broker",
    "z": "fa46cf31be8d751e",
    "name": "emqx",
    "broker": "mqtt.pre.tier0.dev",
    "port": "1883",
    "clientid": "336462685553088&341668146888752",
    "autoConnect": true,
    "usetls": false,
    "protocolVersion": "4",
    "keepalive": "60",
    "cleansession": true,
    "autoUnsubscribe": true,
    "birthTopic": "",
    "birthQos": "0",
    "birthRetain": "false",
    "birthPayload": "",
    "birthMsg": {},
    "closeTopic": "",
    "closeQos": "0",
    "closeRetain": "false",
    "closePayload": "",
    "closeMsg": {},
    "willTopic": "",
    "willQos": "0",
    "willRetain": "false",
    "willPayload": "",
    "willMsg": {},
    "userProps": "",
    "sessionExpiry": ""
    }
    ]
    • 旋盤 1
    旋盤 1 の Flow JSON を表示
    Terminal window
    [
    {
    "id": "88fed08889390f28",
    "type": "tab",
    "label": "Metric/ProLathe-01",
    "disabled": false,
    "info": ""
    },
    {
    "id": "f2bae08de3b55bb0",
    "type": "mqtt in",
    "z": "88fed08889390f28",
    "name": "Subscribe ProLathe joints",
    "topic": "FactorySim_Supos/Flow_Group__1/MechEquips/porcess_prolathe_gs_260ms_1/Motor_Joints/+",
    "qos": "1",
    "datatype": "auto",
    "broker": "6f8ade8021b85933",
    "nl": false,
    "rap": true,
    "rh": 0,
    "inputs": 0,
    "x": 590,
    "y": 340,
    "wires": [
    [
    "ac84eab3cf5bb664",
    "8a8a5572465dac5b"
    ]
    ]
    },
    {
    "id": "ac84eab3cf5bb664",
    "type": "function",
    "z": "88fed08889390f28",
    "name": "Cache Data",
    "func": "const CONFIG = {\n fields: [\"JointChanger\", \"JointDoors\", \"JointFinger\", \"JointSpindle\", \"JointTailStock\", \"Joint_X\", \"Joint_Y\", \"Joint_Z\"],\n payloadFields: {\n value: 'CurrentValue',\n initialValue: 'InitialValue',\n name: 'Name',\n timeStamp: 'timeStamp',\n time_stamp: 'time_stamp',\n quality: 'quality'\n }\n};\n\nlet cache = flow.get('dataCache') || { instant: {}, metadata: {} };\n\nconst topicParts = msg.topic.split('/');\nconst fieldName = topicParts[topicParts.length - 1];\n\nlet payload = msg.payload;\nif (typeof payload === 'string') {\n try {\n payload = JSON.parse(payload);\n } catch (e) {\n return null;\n }\n}\n\nlet value = payload[CONFIG.payloadFields.value];\nif (value === undefined) return null;\n\nconst metadata = {\n timeStamp: payload[CONFIG.payloadFields.timeStamp],\n time_stamp: payload[CONFIG.payloadFields.time_stamp],\n quality: payload[CONFIG.payloadFields.quality],\n name: payload[CONFIG.payloadFields.name],\n initialValue: payload[CONFIG.payloadFields.initialValue]\n};\n\nif (CONFIG.fields.includes(fieldName)) {\n cache.instant[fieldName] = value;\n cache.metadata[fieldName] = metadata;\n} else {\n return null;\n}\n\nflow.set('dataCache', cache);\nreturn null;",
    "outputs": 0,
    "timeout": "",
    "noerr": 0,
    "initialize": "",
    "finalize": "",
    "libs": [],
    "x": 860,
    "y": 360,
    "wires": []
    },
    {
    "id": "ca4b6b2146df5093",
    "type": "inject",
    "z": "88fed08889390f28",
    "name": "100ms Timer",
    "props": [
    {
    "p": "payload"
    },
    {
    "vt": "str",
    "p": "topic"
    }
    ],
    "repeat": "0.1",
    "crontab": "",
    "once": true,
    "onceDelay": "0.1",
    "topic": "",
    "payload": "",
    "payloadType": "date",
    "x": 500,
    "y": 460,
    "wires": [
    [
    "e47cbdc7b7dae23f"
    ]
    ]
    },
    {
    "id": "e47cbdc7b7dae23f",
    "type": "function",
    "z": "88fed08889390f28",
    "name": "Aggregate & Publish (Flat)",
    "func": "const CONFIG = {\n fieldMapping: {\n \"JointChanger\": \"J_Changer\",\n \"JointDoors\": \"J_Door\",\n \"JointFinger\": \"J_Finger\",\n \"JointSpindle\": \"J_Spindle\",\n \"JointTailStock\": \"J_TailStock\",\n \"Joint_X\": \"J_X\",\n \"Joint_Y\": \"J_Y\",\n \"Joint_Z\": \"J_Z\"\n},\n missingStrategy: 'lastValue',\n outputTopic: \"Metric/porcess_prolathe_gs_260ms_1\",\n windowMs: 100\n};\n\nconst FIELDS = Object.keys(CONFIG.fieldMapping);\n\nlet cache = flow.get('dataCache') || { instant: {}, metadata: {} };\nlet lastValues = flow.get('lastValues') || {};\nlet lastMetadata = flow.get('lastMetadata') || {};\nlet output = {};\n\noutput.timestamp = new Date().toISOString();\n\nfor (const field of FIELDS) {\n const shortName = CONFIG.fieldMapping[field];\n\n if (cache.instant[field] !== undefined) {\n output[shortName + '_Cur'] = Number(cache.instant[field]);\n output[shortName + '_Init'] = cache.metadata[field] && cache.metadata[field].initialValue !== undefined\n ? Number(cache.metadata[field].initialValue)\n : 0;\n lastValues[field] = cache.instant[field];\n lastMetadata[field] = cache.metadata[field] || {};\n } else {\n let fallbackValue = CONFIG.missingStrategy === 'lastValue'\n ? (lastValues[field] !== undefined ? lastValues[field] : 0)\n : 0;\n output[shortName + '_Cur'] = Number(fallbackValue);\n output[shortName + '_Init'] = lastMetadata[field] && lastMetadata[field].initialValue !== undefined\n ? Number(lastMetadata[field].initialValue)\n : 0;\n }\n}\n\nmsg.payload = output;\nmsg.topic = CONFIG.outputTopic;\n\nflow.set('dataCache', { instant: {}, metadata: {} });\nflow.set('lastValues', lastValues);\nflow.set('lastMetadata', lastMetadata);\n\nreturn msg;",
    "outputs": 1,
    "timeout": "",
    "noerr": 0,
    "initialize": "",
    "finalize": "",
    "libs": [],
    "x": 740,
    "y": 460,
    "wires": [
    [
    "ad22bd2f8b228324"
    ]
    ]
    },
    {
    "id": "ad22bd2f8b228324",
    "type": "mqtt out",
    "z": "88fed08889390f28",
    "name": "Metric/Prolathe",
    "topic": "Metric/ProLathe-01",
    "qos": "1",
    "retain": "false",
    "respTopic": "",
    "contentType": "",
    "userProps": "",
    "correl": "",
    "expiry": "",
    "broker": "c14ef68b0e3b48ac",
    "x": 1060,
    "y": 360,
    "wires": []
    },
    {
    "id": "8a8a5572465dac5b",
    "type": "debug",
    "z": "88fed08889390f28",
    "name": "Debug Output",
    "active": true,
    "tosidebar": true,
    "console": false,
    "complete": "payload",
    "statusVal": "",
    "statusType": "auto",
    "x": 980,
    "y": 540,
    "wires": []
    },
    {
    "id": "6f8ade8021b85933",
    "type": "mqtt-broker",
    "name": "supos-demo.supos.app",
    "broker": "supos-demo.supos.app",
    "port": 1883,
    "clientid": "",
    "autoConnect": true,
    "usetls": false,
    "protocolVersion": 4,
    "keepalive": 60,
    "cleansession": true,
    "autoUnsubscribe": true,
    "birthTopic": "",
    "birthQos": "0",
    "birthRetain": "false",
    "birthPayload": "",
    "birthMsg": {},
    "closeTopic": "",
    "closeQos": "0",
    "closeRetain": "false",
    "closePayload": "",
    "closeMsg": {},
    "willTopic": "",
    "willQos": "0",
    "willRetain": "false",
    "willPayload": "",
    "willMsg": {},
    "userProps": "",
    "sessionExpiry": ""
    },
    {
    "id": "c14ef68b0e3b48ac",
    "type": "mqtt-broker",
    "z": "88fed08889390f28",
    "name": "emqx",
    "broker": "mqtt.pre.tier0.dev",
    "port": "1883",
    "clientid": "336462685553088&337035452420768",
    "autoConnect": true,
    "usetls": false,
    "protocolVersion": "4",
    "keepalive": "60",
    "cleansession": true,
    "autoUnsubscribe": true,
    "birthTopic": "",
    "birthQos": "0",
    "birthRetain": "false",
    "birthPayload": "",
    "birthMsg": {},
    "closeTopic": "",
    "closeQos": "0",
    "closeRetain": "false",
    "closePayload": "",
    "closeMsg": {},
    "willTopic": "",
    "willQos": "0",
    "willRetain": "false",
    "willPayload": "",
    "willMsg": {},
    "userProps": "",
    "sessionExpiry": ""
    }
    ]
    • 旋盤 2
    旋盤 2 の Flow JSON を表示
    Terminal window
    [
    {
    "id": "c974bfc5fbc79b0e",
    "type": "tab",
    "label": "Metric/ProLathe-02",
    "disabled": false,
    "info": ""
    },
    {
    "id": "2ff367f08cbe470f",
    "type": "mqtt in",
    "z": "c974bfc5fbc79b0e",
    "name": "Subscribe ProLathe joints",
    "topic": "FactorySim_Supos/Flow_Group__1/MechEquips/porcess_prolathe_gs_260ms_2/Motor_Joints/+",
    "qos": "1",
    "datatype": "auto",
    "broker": "6f8ade8021b85933",
    "nl": false,
    "rap": true,
    "rh": 0,
    "inputs": 0,
    "x": 590,
    "y": 340,
    "wires": [
    [
    "7c54f7852fb5430e"
    ]
    ]
    },
    {
    "id": "7c54f7852fb5430e",
    "type": "function",
    "z": "c974bfc5fbc79b0e",
    "name": "Cache Data",
    "func": "const CONFIG = {\n fields: [\"JointChanger\", \"JointDoors\", \"JointFinger\", \"JointSpindle\", \"JointTailStock\", \"Joint_X\", \"Joint_Y\", \"Joint_Z\"],\n payloadFields: {\n value: 'CurrentValue',\n initialValue: 'InitialValue',\n name: 'Name',\n timeStamp: 'timeStamp',\n time_stamp: 'time_stamp',\n quality: 'quality'\n }\n};\n\nlet cache = flow.get('dataCache') || { instant: {}, metadata: {} };\n\nconst topicParts = msg.topic.split('/');\nconst fieldName = topicParts[topicParts.length - 1];\n\nlet payload = msg.payload;\nif (typeof payload === 'string') {\n try {\n payload = JSON.parse(payload);\n } catch (e) {\n return null;\n }\n}\n\nlet value = payload[CONFIG.payloadFields.value];\nif (value === undefined) return null;\n\nconst metadata = {\n timeStamp: payload[CONFIG.payloadFields.timeStamp],\n time_stamp: payload[CONFIG.payloadFields.time_stamp],\n quality: payload[CONFIG.payloadFields.quality],\n name: payload[CONFIG.payloadFields.name],\n initialValue: payload[CONFIG.payloadFields.initialValue]\n};\n\nif (CONFIG.fields.includes(fieldName)) {\n cache.instant[fieldName] = value;\n cache.metadata[fieldName] = metadata;\n} else {\n return null;\n}\n\nflow.set('dataCache', cache);\nreturn null;",
    "outputs": 0,
    "timeout": "",
    "noerr": 0,
    "initialize": "",
    "finalize": "",
    "libs": [],
    "x": 860,
    "y": 360,
    "wires": []
    },
    {
    "id": "a69b0f994c614213",
    "type": "inject",
    "z": "c974bfc5fbc79b0e",
    "name": "100ms Timer",
    "props": [
    {
    "p": "payload"
    },
    {
    "vt": "str",
    "p": "topic"
    }
    ],
    "repeat": "0.1",
    "crontab": "",
    "once": true,
    "onceDelay": "0.1",
    "topic": "",
    "payload": "",
    "payloadType": "date",
    "x": 500,
    "y": 460,
    "wires": [
    [
    "a182dc40725e4801"
    ]
    ]
    },
    {
    "id": "a182dc40725e4801",
    "type": "function",
    "z": "c974bfc5fbc79b0e",
    "name": "Aggregate & Publish (Flat)",
    "func": "const CONFIG = {\n fieldMapping: {\n \"JointChanger\": \"J_Changer\",\n \"JointDoors\": \"J_Door\",\n \"JointFinger\": \"J_Finger\",\n \"JointSpindle\": \"J_Spindle\",\n \"JointTailStock\": \"J_TailStock\",\n \"Joint_X\": \"J_X\",\n \"Joint_Y\": \"J_Y\",\n \"Joint_Z\": \"J_Z\"\n},\n missingStrategy: 'lastValue',\n outputTopic: \"Metric/porcess_prolathe_gs_260ms_2\",\n windowMs: 100\n};\n\nconst FIELDS = Object.keys(CONFIG.fieldMapping);\n\nlet cache = flow.get('dataCache') || { instant: {}, metadata: {} };\nlet lastValues = flow.get('lastValues') || {};\nlet lastMetadata = flow.get('lastMetadata') || {};\nlet output = {};\n\noutput.timestamp = new Date().toISOString();\n\nfor (const field of FIELDS) {\n const shortName = CONFIG.fieldMapping[field];\n\n if (cache.instant[field] !== undefined) {\n output[shortName + '_Cur'] = Number(cache.instant[field]);\n output[shortName + '_Init'] = cache.metadata[field] && cache.metadata[field].initialValue !== undefined\n ? Number(cache.metadata[field].initialValue)\n : 0;\n lastValues[field] = cache.instant[field];\n lastMetadata[field] = cache.metadata[field] || {};\n } else {\n let fallbackValue = CONFIG.missingStrategy === 'lastValue'\n ? (lastValues[field] !== undefined ? lastValues[field] : 0)\n : 0;\n output[shortName + '_Cur'] = Number(fallbackValue);\n output[shortName + '_Init'] = lastMetadata[field] && lastMetadata[field].initialValue !== undefined\n ? Number(lastMetadata[field].initialValue)\n : 0;\n }\n}\n\nmsg.payload = output;\n\nmsg.payload.Model_Name = \"Turbo\";\nmsg.payload.Max_Carry_Weight_kg = 15.0;\n\nmsg.topic = CONFIG.outputTopic;\n\nflow.set('dataCache', { instant: {}, metadata: {} });\nflow.set('lastValues', lastValues);\nflow.set('lastMetadata', lastMetadata);\n\nreturn msg;",
    "outputs": 1,
    "timeout": "",
    "noerr": 0,
    "initialize": "",
    "finalize": "",
    "libs": [],
    "x": 740,
    "y": 460,
    "wires": [
    [
    "b4e1817aa3744ab9",
    "84c88149d8d24eae"
    ]
    ]
    },
    {
    "id": "b4e1817aa3744ab9",
    "type": "mqtt out",
    "z": "c974bfc5fbc79b0e",
    "name": "Metric/Prolathe2",
    "topic": "Metric/ProLathe-02",
    "qos": "1",
    "retain": "false",
    "respTopic": "",
    "contentType": "",
    "userProps": "",
    "correl": "",
    "expiry": "",
    "broker": "6befe0f78bf64759",
    "x": 1060,
    "y": 360,
    "wires": []
    },
    {
    "id": "84c88149d8d24eae",
    "type": "debug",
    "z": "c974bfc5fbc79b0e",
    "name": "Debug Output",
    "active": true,
    "tosidebar": true,
    "console": false,
    "complete": "payload",
    "statusVal": "",
    "statusType": "auto",
    "x": 980,
    "y": 540,
    "wires": []
    },
    {
    "id": "6f8ade8021b85933",
    "type": "mqtt-broker",
    "name": "supos-demo.supos.app",
    "broker": "supos-demo.supos.app",
    "port": 1883,
    "clientid": "",
    "autoConnect": true,
    "usetls": false,
    "protocolVersion": 4,
    "keepalive": 60,
    "cleansession": true,
    "autoUnsubscribe": true,
    "birthTopic": "",
    "birthQos": "0",
    "birthRetain": "false",
    "birthPayload": "",
    "birthMsg": {},
    "closeTopic": "",
    "closeQos": "0",
    "closeRetain": "false",
    "closePayload": "",
    "closeMsg": {},
    "willTopic": "",
    "willQos": "0",
    "willRetain": "false",
    "willPayload": "",
    "willMsg": {},
    "userProps": "",
    "sessionExpiry": ""
    },
    {
    "id": "6befe0f78bf64759",
    "type": "mqtt-broker",
    "z": "c974bfc5fbc79b0e",
    "name": "emqx",
    "broker": "mqtt.pre.tier0.dev",
    "port": "1883",
    "clientid": "336462685553088&338098843755632",
    "autoConnect": true,
    "usetls": false,
    "protocolVersion": "4",
    "keepalive": "60",
    "cleansession": true,
    "autoUnsubscribe": true,
    "birthTopic": "",
    "birthQos": "0",
    "birthRetain": "false",
    "birthPayload": "",
    "birthMsg": {},
    "closeTopic": "",
    "closeQos": "0",
    "closeRetain": "false",
    "closePayload": "",
    "closeMsg": {},
    "willTopic": "",
    "willQos": "0",
    "willRetain": "false",
    "willPayload": "",
    "willMsg": {},
    "userProps": "",
    "sessionExpiry": ""
    }
    ]
  1. Model で作業場のモデルをインポートし、UNS データを対応付けてインスタンスを作成します。
  2. Scene で Instance Library から作業場のインスタンスをシーンに追加します。
  3. モデルを作業場の位置に配置し、照明などの環境設定を調整します。

リファレンス

API リファレンス

Tier0 API への接続、応答の確認、安全な書き込み再試行。

  • ベース URL: https://<your-tier0-host>/openapi/v2
  • 認証: x-api-key リクエストヘッダーに Tier0 API キーを指定します。
  • /uns/ リクエストでは HTTP ステータスと応答本文の両方を確認します。成功時は 2xx かつ code: 0 で、結果は data にあります。
  • 失敗時は error.code を確認し、調査用に requestId を保存します。
  • バッチでは HTTP 200 でも各項目を確認します。一部の項目だけ失敗する場合があります。
  • error.execution を確認し、未開始、ロールバック済み、コミット済み、結果不明のいずれかを判断します。
  • error.retry.safe が true の場合に限り、同じ冪等キーで同一リクエストを再試行します。待機時間が示された場合は、error.retry.afterMs または Retry-After ヘッダー以上待ちます。
  • バッチの一部がコミットされた場合、成功項目を確認してから残りを送信します。結果不明で安全な再試行が確認できない場合は、再送前に書き込みの反映を確認します。
リファレンス

CLI コマンドリファレンス

CLI と Agent Skill のコマンドリファレンス。

グローバルフラグこれらのフラグは任意の tier0 コマンドで使用できます。
--json生の JSON を出力--debugHTTP リクエスト/レスポンス詳細を出力

基本操作

tier0 doctorローカル Tier0 CLI の接続と認証を診断

使用方法

Terminal window
tier0 doctor

注記

  • ローカル設定、OpenAPI 接続、API key の有無、API key の識別情報を確認します。

例

Terminal window
tier0 doctor
tier0 config設定を表示または更新

使用方法

Terminal window
tier0 config

フラグ

--base-url
プラットフォームの base URL を設定
--api-key
API key を設定(tier0 login の代替)
--lang
非推奨の互換フラグ。CLI 出力は英語のみです非推奨

例

Terminal window
tier0 config
Terminal window
tier0 config --base-url https://tier0.dev
Terminal window
tier0 config --api-key sk-per-xxxxxx
tier0 loginDevice Flow で認証

使用方法

Terminal window
tier0 login

フラグ

--no-wait
認証 URL を出力し、ポーリングせずに終了
--setup-code
新規作成せず既存の setup code をポーリング
--base-url
プラットフォームの base URL を上書き

注記

  • --no-wait を指定しない場合、CLI は最大 10 分間、5 秒ごとにポーリングします。
  • --no-wait --json を指定すると、CLI は verification_url、setup_code、expires_in を返します。

例

Terminal window
tier0 login
Terminal window
tier0 login --no-wait --json
Terminal window
tier0 login --setup-code <setup_code>
tier0 apiAPI endpoint を直接呼び出す

使用方法

Terminal window
tier0 api <endpoint>

フラグ

--body
リクエストボディの JSON 文字列
--body-file
ファイルからリクエストボディを読み込む
--method
HTTP メソッド(GET|POST|PUT|DELETE)デフォルト: POST
--dry-run
実行せずにリクエストをプレビュー

注記

  • --body と --body-file は同時に指定できません。

例

Terminal window
tier0 api /openapi/v1/uns/browse --body '{"path":"/"}'
Terminal window
tier0 api /openapi/v1/uns/read --body '{"topics":["demo"]}'
Terminal window
tier0 api /openapi/v1/uns/write --body-file body.json
tier0 upgradeCLI を最新バージョンにアップグレード

使用方法

Terminal window
tier0 upgrade

フラグ

--dry-run
インストールせず更新を確認
-v, --version
指定バージョンへアップグレード(デフォルト: latest)

例

Terminal window
tier0 upgrade
Terminal window
tier0 upgrade --dry-run
tier0 uninstalltier0 CLI をアンインストール

使用方法

Terminal window
tier0 uninstall

フラグ

--purge
設定ファイル(認証情報)も削除
--remove-skills
検出された AI agents から Tier0 Skill も削除
--keep-skills
agent skills を保持(非推奨。現在はこれがデフォルトです)非推奨

注記

  • Agent Skills と設定はデフォルトで保持されます。
  • CLI のアンインストール時に、ローカルの内蔵 skills ディレクトリは削除されます。

例

Terminal window
tier0 uninstall
Terminal window
tier0 uninstall --purge
Terminal window
tier0 uninstall --remove-skills
Terminal window
tier0 uninstall --purge --remove-skills
tier0 versionバージョンを表示

使用方法

Terminal window
tier0 version

例

Terminal window
tier0 version

スキル

tier0 skills installCLI に内蔵された Skill をインストールまたは修復

使用方法

Terminal window
tier0 skills install

フラグ

--force
有効な Skill を内蔵ベースラインで置き換える
--no-sync
検出された AI agents に同期せず、ローカルのみにインストール

例

Terminal window
tier0 skills install
Terminal window
tier0 skills install --force
tier0 skills listインストール済み skills を一覧表示エイリアス: ls

使用方法

Terminal window
tier0 skills list

例

Terminal window
tier0 skills list
tier0 skills updateskills を最新バージョンに更新エイリアス: upgrade

使用方法

Terminal window
tier0 skills update

フラグ

--dry-run
インストールせず更新を確認

例

Terminal window
tier0 skills update
Terminal window
tier0 skills update --dry-run
tier0 skills versionskills のバージョン情報を表示エイリアス: ver

使用方法

Terminal window
tier0 skills version

例

Terminal window
tier0 skills version
tier0 skills status有効な Skill と内蔵 Skill の状態を表示

使用方法

Terminal window
tier0 skills status

例

Terminal window
tier0 skills status
tier0 skills sync有効な Skill を検出された AI agents に同期

使用方法

Terminal window
tier0 skills sync

例

Terminal window
tier0 skills sync

認証

tier0 auth whoami現在の API key の識別情報を表示

使用方法

Terminal window
tier0 auth whoami

注記

  • ユーザー、workspace、key 名、key タイプ、ロール、権限を表示します。

例

Terminal window
tier0 auth whoami
Terminal window
tier0 auth whoami --json

UNS

tier0 uns browseUNS namespace ツリーを参照

使用方法

Terminal window
tier0 uns browse

フラグ

-p, --path
UNS ツリーで参照するパスデフォルト: /
-d, --max-depth
最大再帰深度(0 = 無制限)デフォルト: 1
--include-metadata
ノードメタデータを含める
--include-leaf-value
リーフノードの値を含める

例

Terminal window
tier0 uns browse
Terminal window
tier0 uns browse --path /devices
Terminal window
tier0 uns browse --path / --max-depth 2
tier0 uns searchUNS topics を検索

使用方法

Terminal window
tier0 uns search

フラグ

-k, --keyword
名前キーワードで検索
--path-prefix
パス接頭辞でフィルタデフォルト: /
--topic-type
topic type でフィルタ
--page
ページ番号デフォルト: 1
-l, --size
ページサイズ(最大件数)デフォルト: 20
--include-metadata
ノードメタデータを含める
--include-leaf-value
リーフノードの値を含める

例

Terminal window
tier0 uns search --keyword temp
Terminal window
tier0 uns search --path-prefix /devices --size 50
Terminal window
tier0 uns search --keyword temp --include-metadata
tier0 uns readUNS topics の現在値を読み取る

使用方法

Terminal window
tier0 uns read [topic...]
Terminal window
tier0 uns read --topic <topic>

フラグ

-t, --topic
読み取る topic 名(繰り返し可。位置引数も使用できます)繰り返し可
--include-metadata
topic メタデータ(topicType、fields、description)を含める
--include-leaf-value
リーフノードの値を含める

注記

  • 位置引数または --topic で少なくとも 1 つの topic が必要です。

例

Terminal window
tier0 uns read demo
Terminal window
tier0 uns read --topic demo
Terminal window
tier0 uns read temp humidity
Terminal window
tier0 uns read --topic sensor1 --include-metadata
tier0 uns writeUNS topic に値を書き込む

使用方法

Terminal window
tier0 uns write

フラグ

-t, --topic
書き込み先 topic 名(必須)必須
-v, --value
JSON 値文字列(--file と同時指定不可)
-f, --file
ファイルから値を読み込む(--value と同時指定不可)
--qos
MQTT QoS レベル(0/1/2)デフォルト: 0
--retain
MQTT retain フラグを設定
--dry-run
実行せずにリクエストをプレビュー

注記

  • --value と --file は同時に指定できません。
  • 値は topic fields に一致する有効な JSON object である必要があります。

例

Terminal window
tier0 uns write --topic demo --value '{"temp":25}'
Terminal window
tier0 uns write --topic demo --file payload.json
Terminal window
tier0 uns write --topic sensor1 --value '{"on":true}' --qos 1 --retain
tier0 uns historytopics の履歴データを照会

使用方法

Terminal window
tier0 uns history

フラグ

-t, --topic
topic 名(繰り返し可、必須)必須繰り返し可
--start
開始時刻: 相対指定(-1h/-30m/-7d)、ISO 8601、または 'now'(必須)必須
--end
終了時刻: 相対指定、ISO 8601、または 'now'(デフォルト: now)デフォルト: now
--page
ページ番号デフォルト: 1
-l, --size
ページサイズ(最大データポイント数)デフォルト: 100
--interval
集計間隔(例: 1m、1h、1d)
--fn
集計関数(avg/max/min/sum/count)
--field
集計フィールド名

例

Terminal window
tier0 uns history -t demo --start -1h
Terminal window
tier0 uns history -t demo --start -24h --end now --fn avg --interval 1h
Terminal window
tier0 uns history -t demo --start 2026-01-01T00:00:00Z --end 2026-01-02T00:00:00Z
tier0 uns createUNS namespace ノードを作成

使用方法

Terminal window
tier0 uns create

フラグ

-t, --topic
topic パスまたはリーフ名(--file を使用しない場合は必須)
--parent
親パス接頭辞(任意。--topic と組み合わせます)
--type
ノードタイプ: 'path'(フォルダー)または 'topic'(データポイント)
-d, --display-name
表示名
--description
説明
--alias
エイリアス
-f, --file
JSON ファイルから namespace 定義を読み込む({"namespace":[]} または配列のみ)
--topic-type
非推奨: topic type は現在、パス(リーフ直前の Metric/Action/State フォルダー)から推定されます非推奨
--fields
schema fields の JSON 配列
--fields-file
ファイルから schema fields の JSON 配列を読み込む
--dry-run
実行せずにリクエストをプレビュー

注記

  • --file を使用しない場合、--topic と --type が必要です。
  • --fields と --fields-file は同時に指定できません。
  • topic ノードでは、リーフ直前のパス要素が Metric、Action、または State である必要があります。

例

Terminal window
tier0 uns create --topic Plant/Line1/Metric/Temperature --type topic
Terminal window
tier0 uns create --parent Factory1/Line1/Station1 --topic Metric/ProductionCount --type topic
Terminal window
tier0 uns create --topic Plant/Line1 --type path --display-name 'Line 1'
Terminal window
tier0 uns create --file namespace.json
tier0 uns updateUNS topic のメタデータを更新

使用方法

Terminal window
tier0 uns update

フラグ

-p, --path
更新する topic パス(必須)必須
-n, --name
新しい名前
--alias
新しいエイリアス
--description
新しい説明
--clear-description
空の shell 引数に依存せず説明をクリアする
-d, --display-name
新しい表示名
--extend-properties
拡張プロパティ JSON object
--fields
schema fields の JSON 配列
--fields-file
ファイルから schema fields の JSON 配列を読み込む
--update-mask
更新するフィールド(繰り返し可。例: name、description、fields)繰り返し可
--dry-run
実行せずにリクエストをプレビュー

注記

  • --description と --clear-description は同時に指定できません。
  • --fields と --fields-file は同時に指定できません。
  • 更新するフィールドを少なくとも 1 つ指定する必要があります。

例

Terminal window
tier0 uns update --path Plant/Line1/Metric/Temperature --display-name 'Line 1 Temp'
Terminal window
tier0 uns update --path Plant/Line1 --description 'Production line 1' --update-mask description
Terminal window
tier0 uns update --path Plant/Line1/Metric/Temperature --fields '[{"name":"temp","type":"float","unit":"C"}]' --update-mask fields
tier0 uns deleteUNS ノードを削除

使用方法

Terminal window
tier0 uns delete

フラグ

-p, --path
削除するノードパス(繰り返し可、必須)必須繰り返し可
--hard
ハード削除(元に戻せません)
-y, --yes
高リスク操作を確認(必須)必須
--dry-run
実行せずにリクエストをプレビュー

注記

  • デフォルトはソフト削除で、復元できます。
  • --hard は元に戻せません。
  • --dry-run を使用しない限り、高リスク操作には --yes が必要です。

例

Terminal window
tier0 uns delete --path factory/line1/sensor/temp --yes
Terminal window
tier0 uns delete --path factory/line1/sensor/temp --path factory/line1/sensor/humi --yes
Terminal window
tier0 uns delete --path factory/line1/sensor/temp --hard --yes
tier0 uns restore履歴から topic を復元

使用方法

Terminal window
tier0 uns restore

フラグ

-p, --path
復元する topic パス(必須)必須
-y, --yes
高リスク操作を確認(必須)必須
--dry-run
実行せずにリクエストをプレビュー

注記

  • --dry-run を使用しない限り、高リスク操作には --yes が必要です。

例

Terminal window
tier0 uns restore --path Plant/Line1/Metric/Temperature --yes

Node-RED フロー

tier0 flow listflows を一覧表示エイリアス: ls

使用方法

Terminal window
tier0 flow list

フラグ

-k, --keyword
名前キーワードでフィルタ
-t, --type
タイプでフィルタ(SourceFlow/EventFlow)
--source
SourceFlow のみ表示
--event
EventFlow のみ表示

注記

  • --source と --event は同時に指定できません。
  • --type は --source または --event と同時に指定できません。

例

Terminal window
tier0 flow list
Terminal window
tier0 flow list --source --json
tier0 flow getflow の詳細を取得

使用方法

Terminal window
tier0 flow get --id <id>
Terminal window
tier0 flow get <id>

フラグ

--id
Flow IDデフォルト: 0

注記

  • --id または位置引数で正の Flow ID を指定する必要があります。

例

Terminal window
tier0 flow get --id 1 --json
Terminal window
tier0 flow get 1 --json
tier0 flow create新しい flow を作成

使用方法

Terminal window
tier0 flow create

フラグ

-n, --name
Flow 名(必須)必須
-t, --type
Flow タイプ: SourceFlow | EventFlow(必須)必須
--source
タイプを SourceFlow に設定
--event
タイプを EventFlow に設定
--desc
説明
--template
初期テンプレート JSON 文字列
--template-file
ファイルから初期テンプレートを読み込む
--dry-run
実行せずにリクエストをプレビュー

注記

  • Flow タイプの選択には --type、--source、--event のいずれか 1 つだけを使用してください。
  • --template と --template-file は同時に指定できません。

例

Terminal window
tier0 flow create --name "modbus-collector" --source --desc "Modbus TCP collector"
Terminal window
tier0 flow create --name "alert-handler" --event --desc "Temperature alarm processor"
tier0 flow updateflow メタデータを更新

使用方法

Terminal window
tier0 flow update --id <id>
Terminal window
tier0 flow update <id>

フラグ

--id
Flow ID(必須)デフォルト: 0
-n, --name
新しい名前
--desc
新しい説明
--template
新しいテンプレート JSON 文字列
--template-file
ファイルから新しいテンプレートを読み込む
--favorite
お気に入りに追加
--unfavorite
お気に入りから削除
--dry-run
実行せずにリクエストをプレビュー

注記

  • --id または位置引数で正の Flow ID を指定する必要があります。
  • --template と --template-file は同時に指定できません。
  • --favorite と --unfavorite は同時に指定できません。
  • 更新するフィールドを少なくとも 1 つ指定する必要があります。

例

Terminal window
tier0 flow update --id 1 --name "line1-collector"
Terminal window
tier0 flow update --id 1 --favorite
tier0 flow dataNode-RED canvas JSON を取得

使用方法

Terminal window
tier0 flow data --id <id>
Terminal window
tier0 flow data <id>

フラグ

--id
Flow IDデフォルト: 0
-o, --out
出力をファイルに保存

注記

  • --id または位置引数で正の Flow ID を指定する必要があります。

例

Terminal window
tier0 flow data --id 1 --out flows.json
tier0 flow deployNode-RED canvas JSON をデプロイ

使用方法

Terminal window
tier0 flow deploy --id <id>
Terminal window
tier0 flow deploy <id>

フラグ

--id
Flow ID(必須)デフォルト: 0
--flows-json
Node-RED canvas JSON 文字列
-f, --flows-file
ファイルから Node-RED canvas JSON を読み込む(推奨)
-y, --yes
高リスク操作を確認(必須)必須
--dry-run
実行せずにリクエストをプレビュー

注記

  • --id または位置引数で正の Flow ID を指定する必要があります。
  • --flows-json と --flows-file は同時に指定できません。
  • デプロイすると、この Flow 内の既存の Node-RED ノードがすべて置き換えられます。
  • --dry-run を使用しない限り、高リスク操作には --yes が必要です。

例

Terminal window
tier0 flow deploy --id 1 -f flows.json --dry-run --json
Terminal window
tier0 flow deploy --id 1 -f flows.json --yes
tier0 flow deleteflow を削除エイリアス: del, rm

使用方法

Terminal window
tier0 flow delete --id <id>
Terminal window
tier0 flow delete <id>[,<id>...]

フラグ

--id
削除する Flow ID(繰り返し可)繰り返し可
-y, --yes
高リスク操作を確認(必須)必須
--dry-run
実行せずにリクエストをプレビュー

注記

  • 位置引数にはカンマ区切りの Flow ID を含められます。
  • 削除すると Node-RED コンテナーが停止し、元に戻せません。
  • --dry-run を使用しない限り、高リスク操作には --yes が必要です。

例

Terminal window
tier0 flow delete --id 1 --yes
tier0 flow nodes利用可能な Node-RED ノードタイプを一覧表示

使用方法

Terminal window
tier0 flow nodes [source|event]
Terminal window
tier0 flow nodes --type <SourceFlow|EventFlow>
Terminal window
tier0 flow nodes --source
Terminal window
tier0 flow nodes --event

フラグ

-t, --type
Flow タイプ(SourceFlow/EventFlow)
--source
SourceFlow ノードを表示
--event
EventFlow ノードを表示

注記

  • 位置引数の Flow タイプは最大 1 つまで指定できます。
  • --source と --event は同時に指定できません。
  • 位置引数/タイプ入力を --source または --event と併用しないでください。

例

Terminal window
tier0 flow nodes source --json
Terminal window
tier0 flow nodes --source --json
Terminal window
tier0 flow nodes --event --json

ファイル

tier0 assets uploadTier0 object storage にファイルをアップロード

使用方法

Terminal window
tier0 assets upload <local-file>

フラグ

--business
業務シーンデフォルト: attachment
--use-by
使用範囲: user|workspace|platformデフォルト: workspace
--visibility
可視性: public|privateデフォルト: private
--app-instance-id
AI アプリインスタンス ID
--session-id
AI セッション ID
--multipart-size
マルチパートのパートサイズ(例: 10MB、最小 5MB)デフォルト: CLI-defined default
--concurrency
マルチパートアップロードの同時実行数(並列パート数)デフォルト: 4
--resume
中断されたマルチパートアップロードを再開
--abort
中断されたマルチパートアップロードを中止し、状態をクリーンアップ

注記

  • ローカルファイル引数を 1 つだけ指定する必要があります。
  • 100MB を超えるファイルは自動的にマルチパートアップロードを使用します。
  • CLI は厳密な最大ファイルサイズを強制しません。サーバー側でプラン/クォータ制限が適用されます。

例

Terminal window
tier0 assets upload ./report.csv
Terminal window
tier0 assets upload ./report.csv --visibility public --business attachment
Terminal window
tier0 assets upload ./report.csv --use-by workspace --visibility private
Terminal window
tier0 assets upload ./large-backup.tar.gz
Terminal window
tier0 assets upload ./large-backup.tar.gz --resume
Terminal window
tier0 assets upload ./large-backup.tar.gz --abort
Terminal window
tier0 assets upload ./large-backup.tar.gz --multipart-size 20MB --concurrency 8
tier0 assets downloadTier0 object storage からファイルをダウンロード

使用方法

Terminal window
tier0 assets download

フラグ

--file-path
アップロードで返されたファイルパス必須
-o, --output
出力ファイルパス(デフォルト: stdout)
--content-disposition
カスタム Content-Disposition

例

Terminal window
tier0 assets download --file-path workspace/.../report.csv -o ./report.csv
Terminal window
tier0 assets download --file-path workspace/.../report.csv
tier0 assets urlTier0 object storage のファイルアクセス URL を取得

使用方法

Terminal window
tier0 assets url

フラグ

--file-path
アップロードで返されたファイルパス必須
--expired-sec
署名付き URL の有効期限(秒)デフォルト: 3600
--content-disposition
カスタム Content-Disposition

例

Terminal window
tier0 assets url --file-path workspace/.../report.csv
Terminal window
tier0 assets url --file-path workspace/.../report.csv --expired-sec 300
tier0 assets deleteTier0 object storage のファイルを削除

使用方法

Terminal window
tier0 assets delete

フラグ

--file-path
アップロードで返されたファイルパス必須
-y, --yes
高リスク操作を確認(必須)必須
--dry-run
実行せずにリクエストをプレビュー

注記

  • 削除は元に戻せません。
  • --dry-run を使用しない限り、高リスク操作には --yes が必要です。

例

Terminal window
tier0 assets delete --file-path workspace/.../report.csv --dry-run --json
Terminal window
tier0 assets delete --file-path workspace/.../report.csv --yes
リファレンス

組み込み Builder Skills

Tier0 Builder に組み込まれた AI Skills のリファレンス。

Tier0 Builder Skills リポジトリの feature/cloud-new-architecture-migration ブランチには現在、要件、アプリ構築、プラットフォーム整合、ブラウザー機能、レスポンシブ設計、プレビュー障害に対応する 6 つの Skill があります。

産業向けアプリの要件定義の入口です。依頼から SRS を作成し、PRD を変換し、既存の SRS を改訂します。業務上の役割、ワークフロー、状態、検証、例外を整理し、初回リリースの範囲を定め、既定で specs/spec.md に保存します。要件だけが求められた場合や確認が必要な場合を除き、新規アプリは app-builder に引き継ぎます。

Terminal window
$app-srs を使って自動車部品工場の品質異常管理システムを設計してください。

要件または specs/spec.md から動作する初回アプリを構築するか、既存アプリに大きな業務機能を追加します。必要なら先に app-srs で SRS を作成します。通常のフィールド、文言、スタイル、局所的な UI 修正には完全な Builder ワークフローは不要です。

機能の入口と操作経路、実データと状態変更、検証とロール権限、ビルド・プレビュー・対話操作を確認します。適切な一覧ページでは対象スキャフォールドの MetaListPage を実際のサービスと権限に接続します。

Terminal window
$app-builder を使って specs/spec.md から初回バージョンを構築してください。

インポートしたアプリを Tier0 スキャフォールドへ移行するか、既存アプリを現在の契約に合わせます。古い Tier0 アプリ、独自 SQL データベースやブラウザー保存を使うアプリ、全面更新または限定的なプラットフォーム修正が必要なアプリが対象です。

クラウドアーキテクチャのスキャフォールドの正確なコミットと比較し、業務動作を保ちながらランタイム、ルーティング、Gateway ロール、プラットフォーム契約を合わせます。クラウドへの全面移行では、アプリ独自の永続レコードを @tier0/sdk-v2 で Tier0 UNS tables に移します。元のデータベースにある履歴レコードが必要なら、UNS 側へ別途インポートします。ビルドと実行時の動作を検証してから package.json にスキャフォールドのバージョンを記録します。

Terminal window
$align-platform-app を使い、業務コードを維持して最新の Tier0 スキャフォールドに合わせてください。

QR/バーコード読み取り、写真撮影、位置情報、録音、ファイル読み取り、クリップボードを扱います。対象デバイスに適したブラウザー API と代替手段を選び、安全なコンテキスト、権限、iframe/WebView の制約を確認します。キャンセルや失敗時にはフォーム入力を保持し、代替データがライブ取得と異なる場合はその違いを明示します。成功、拒否、再試行、後片付けを検証します。

Terminal window
$browser-platform-capabilities を使って点検フォームに写真撮影とファイルアップロードの代替手段を追加してください。

複雑なブレークポイント、連動する固定・スクロール領域、複数画面幅での監査とプレビューを扱います。単純なはみ出しや切れた操作部品は直接修正できます。audit は既存レイアウトの監査と修正、build は新規構築、preview は複数幅のライブプレビューです。

Terminal window
$responsive-craft audit を使ってダッシュボードのモバイルレイアウトを修正してください。
Terminal window
$responsive-craft preview で 375、768、1024、1440 px を表示してください。

管理されたプレビューのインストール、起動、準備状態、ロール、ポート、HMR の障害を診断します。業務機能は構築しません。依存関係・ロックファイルのエラー(npm ERESOLVE を含む)、Vite/TanStack Start の起動、5173 の競合、/api/health、プレビューのロール、artifact.toml、HMR の全ページ再読み込みなどが対象です。最初の関連エラーを読み、確認できた原因を修正し、必要な場合だけ再起動して、元の障害、ヘルスチェック、対象ルートを検証します。

Terminal window
$preview-runtime-stability を使って「Preview loading timed out」を調査してください。
  • 要件の作成・改訂:app-srs。新規アプリは通常 app-builder に引き継ぎます。
  • 初回リリース・大きな業務機能追加:app-builder。
  • 移行・スキャフォールド整合:align-platform-app。
  • 6 種類のブラウザー機能:browser-platform-capabilities。
  • 複雑なレスポンシブ設計:responsive-craft。管理されたプレビューの障害:preview-runtime-stability。
リファレンス

ユーザー管理

Tier0 はメンバー資格、ライセンス、カスタムユーザーアカウントを通じて、お客様によるプラットフォームへのアクセスとユーザー権限の管理を可能にします。

Tier0 では、エディションごとに異なる方法でユーザー権限とアクセスを管理します。

  • Cloud では、Workspace へのメンバー招待によって、誰が Workspace にアクセスできるかを管理します。
  • Enterprise では、管理者がユーザーアカウントとロールを割り当て、アクセスできる機能を決定します。
  • Workspace のオーナーまたは既存のメンバーは、電話番号またはメールアドレスを使って新しいメンバーを招待できます。

  • 新しいメンバーは、招待コードまたは招待リンクを受け取った後、アカウントを登録して Workspace に参加します。

  • 招待時に新しいメンバーのシート種別(Operator または Builder)を設定し、利用できる機能の範囲を決めます。

    • Builder:オーナー専用機能を除くワークスペース機能を利用できます。
    • Operator:Launchpad でアクセス権のあるアプリを利用できます。
  • アカウント登録には 2 段階の確認が必要です。

操作 実行できるユーザー 説明
シート種別の変更 作成者 / Builder
  • 作成者はすべてのメンバーのシート種別を変更できます。
  • Builder は Operator のシート種別のみ変更できます。
Workspace の削除 作成者 Workspace を削除すると、すべてのデータが直ちに消去され、復元できません。
Workspace の移譲 作成者 —
メンバーの削除 作成者 / Builder
  • 作成者はすべてのメンバーを削除できます。
  • Builder は Operator のみ削除できます。
アカウントの削除 すべてのメンバー
  • 作成者は先に Workspace を削除するか、ほかのメンバーに移譲する必要があります。
  • メンバーのアカウントは直ちにすべての Workspace から退出します。
  • アカウントデータは直ちに消去され、復元できません。
リファレンス

Tier0 Cloud のネットワークとデータのセキュリティに関する説明

Tier0 Cloud の本番 SaaS サービスにおけるネットワーク境界、テナント分離、データ保護、セキュリティ運用について説明します。

適用範囲: AWS シンガポールリージョンにデプロイされた Tier0 Cloud の本番 SaaS サービス。
文書日付: 2026 年 10 月 22 日

Tier0 Cloud は、ネットワークアクセス制御、テナント分離、ID とアクセスの管理、データ暗号化、バックアップと復旧によって、ネットワーク攻撃や不正アクセスのリスクを低減します。本書では、プラットフォームのセキュリティ対策と、セキュリティインシデントが他のテナント、プラットフォーム内部のサービス、お客様のネットワークへ波及することを抑える制御の境界について説明します。

1 ネットワーク境界とアクセス制御

Section titled “1 ネットワーク境界とアクセス制御”

Tier0 Cloud の公開 Web および API へのアクセスは TLS で暗号化され、統一されたエッジ入口とアプリケーションゲートウェイを経由します。主要サービスの入口ではオリジンへのアクセスを検証し、検証要件を満たさない直接アクセスを拒否することで、エッジ入口を迂回したオリジンへのアクセスリスクを低減します。

本番環境は、クラウドアカウント、ネットワーク、クラスター、データベースの各層で開発環境およびステージング環境から分離され、アクセス認証情報も個別に管理されます。本番環境への管理アクセスには、認証済みの専用ネットワーク経路を使用します。

2 テナント分離とインシデントの波及防止

Section titled “2 テナント分離とインシデントの波及防止”

テナントのワークロードは個別の Kubernetes 名前空間で実行され、専用ノードプールとスケジューリング制約によって、プラットフォームのサービスおよび管理コンポーネントから分離されます。この仕組みは、テナントのアプリケーションとプラットフォームのコンポーネントが直接接触する範囲を制限し、あるアプリケーションでセキュリティインシデントが発生した場合の他のサービスへの影響を低減します。

テナントの名前空間に対する受信・送信通信には、デフォルトで拒否し、明示的なルールでのみ許可するネットワークポリシーを適用します。プラットフォームがポリシーを自動的に設定・同期し、クラスターのネットワークコンポーネントが適用します。

受信通信は、同一テナントのワークロードと、必要な業務機能を担うプラットフォームサービスからの通信に限定されます。送信通信は、クラスター内の DNS 名前解決、同一テナントのサービス、指定されたプラットフォームゲートウェイ、メッセージングサービス、割り当てられたデータベースエンドポイントに対して、ルールに従って許可されます。パブリックインターネットへのアクセスもネットワークポリシーの制約を受けます。明示的に許可された業務上の依存先を除き、プライベートネットワークアドレスへのアクセスを制限し、クラウドインスタンスのメタデータアドレスへの直接アクセスを遮断します。

これらの対策は、許可されていないテナント間接続や、テナントのワークロードからプラットフォーム内部ネットワークへのラテラルムーブメントを制限します。あるテナントのアプリケーションでセキュリティインシデントが発生しても、それだけで他のテナントやプラットフォームの管理コンポーネントへのアクセス権限が付与されることはありません。許可済みの業務接続にも、対応するネットワークルールと ID・アクセス制御が適用されます。

テナントのアプリケーションデータは、データベース層で論理的に分離されます。個別のデータベース単位が割り当てられる場合は、ネットワークアクセスルールによって接続元も制限されます。

プラットフォームはサービスの役割に応じてアクセス権限を設定し、各ワークロードがアクセスできるリソースを必要な機能の範囲に限定します。ネットワーク分離と ID に基づく認可を組み合わせることで、影響を受けたワークロードがアクセスできるリソースの範囲を制限します。

2.4 お客様のネットワークへの接続境界

Section titled “2.4 お客様のネットワークへの接続境界”

本節のテナント分離対策は、Tier0 Cloud のプラットフォーム内部に適用されます。お客様がコネクター、ゲートウェイ、その他の連携方式で内部システムを接続する場合、お客様のネットワークへのアクセス境界は、実際の接続方式、ルーティング、ファイアウォールルール、使用する認証情報に付与された権限にも依存します。

接続時には、業務に必要な宛先アドレス、ポート、アカウント権限だけを許可し、接続コンポーネントと他の内部システムをネットワーク上で分離してください。プラットフォーム内部の分離は、お客様側のネットワークアクセス制御を代替するものではありません。双方が具体的な接続構成に基づいてアクセス範囲を決定・検証し、許可済みの接続を経由して他の内部システムへ影響が波及するリスクを抑える必要があります。

プラットフォームは、データの転送、保存、アクセスに対して次の保護対策を実施します。

  • 公開 Web および API の通信と、マネージドデータベースおよびキャッシュへのアクセスに TLS 暗号化を使用します。
  • マネージドデータベース、キャッシュ、オブジェクトストレージでは保存時の暗号化を有効にします。
  • オブジェクトストレージではパブリックアクセスをブロックし、暗号化要件、HTTPS 接続要件、リソース権限によってデータアクセスを制限します。
  • テナントデータへのアクセスには、データベース分離と ID・アクセス制御の両方を適用します。

Tier0 Cloud は、本番データベースと、バックアップ対象に含まれるサービス単位のデータベースをバックアップします。バックアップデータはアクセスが制限された専用のオブジェクトストレージに保存され、対応する保持ポリシーに従って管理されます。

バックアップジョブには専用の ID を使用し、指定された保存先で必要な読み取り・書き込み操作だけを許可します。バックアップオブジェクトの削除権限は付与しません。保持期限が切れたバックアップはストレージのライフサイクルルールで削除し、バックアップ用の認証情報が漏えいした場合に復旧用データが削除されるリスクを低減します。

バックアップ完了後は整合性を確認し、分離された環境でのリストア検証によってバックアップが利用可能であることを確認します。アプリケーション設定はバージョン管理し、ビルド成果物は非公開のコンテナーイメージレジストリに保存することで、サービスの復旧とバージョンのロールバックを支援します。

5 管理アクセスと本番環境の変更

Section titled “5 管理アクセスと本番環境の変更”

本番環境への管理アクセスには、個人ごとに割り当てられた ID を使用し、最小権限の原則に従って権限を付与します。機密性の高い操作を行うコンソールの ID には、多要素認証を必須とします。

日常点検には、ワークロードの状態、ログ、イベントを参照できる制限付きの読み取り専用 ID を使用します。この ID では、機密性の高い認証情報の読み取り、リソースの変更、リモートコマンドの実行はできません。本番環境の変更には、個別に認可された ID と手順を使用します。

インフラストラクチャ設定、デプロイマニフェスト、運用スクリプトはバージョン管理します。本番環境の変更では、目的、影響範囲、検証手順、ロールバック計画を明確にし、実行者の ID、設定差分、検証結果を記録して、追跡と復旧を可能にします。

6 監視とセキュリティインシデント対応

Section titled “6 監視とセキュリティインシデント対応”

プラットフォームは、本番環境の稼働メトリクス、ログ、健全性情報を集約し、異常アラートを運用対応チャネルへ送信します。監視対象には、サービスの可用性、エラー率、データベースの健全性、証明書の有効期限、バックアップジョブの状態、クラスターの稼働状態が含まれます。

セキュリティインシデントが発生した場合は、影響範囲の封じ込めを優先し、関連するログ、設定、発生から対応までの時系列記録を保全します。必要な隔離と調査を完了した後にサービスを復旧し、その後、振り返りと是正措置の進捗管理を行います。インシデント対応中の本番環境の変更も、所定の手順に従って認可・記録します。

7 セキュリティに関するお問い合わせ

Section titled “7 セキュリティに関するお問い合わせ”

セキュリティ評価、お客様によるデューデリジェンス、脆弱性の疑いについては、Tier0 の担当者またはセキュリティチームにお問い合わせください。非公開のアーキテクチャや制御の詳細は、適切な秘密保持の取り決めの下で提供できる場合があります。初回のお問い合わせには、アクセス認証情報、秘密鍵、お客様の機密データを含めないでください。

リファレンス

ISA-95 設備階層

ISA-95 で物理資産と制御システムをモデル化するための参照階層。

ISA-95 の設備階層は、組織内の物理資産と制御システムがどのように構造化されるかを示します。

次の階層に分かれます:

  • Enterprise:最上位の階層で、組織全体を表します。全体の業務プロセスや意思決定主体を含み、通常は ERP システムに支えられます。
  • Site:特定の地理的な拠点または施設を表します。各 site は独自の管理システムとローカルな生産制御を持つことができます。
  • Area:site 内の運用区分で、包装、組立、倉庫などの機能エリアを表すことが多いです。
  • Process Cell:area 内の製造の基本単位です。特定の製品を生産したり特定の機能を実行したりするために必要な設備を含みます。
  • Unit:process cell 内の独立した部分で、混合、加熱、組立などの特定機能を担当します。
  • Equipment Module:unit 内で特定タスクを実行するモジュール型設備です。たとえば混合 unit では、加熱要素が equipment module になります。
  • Control Module:最下位の階層で、センサー、ポンプ、アクチュエーター、PID 制御ループなど、物理プロセスを直接制御する個別デバイスやコントローラーを表します。
リファレンス

標準デプロイ計画

Tier0 Enterprise の 4 台の仮想マシンによる標準デプロイの参考構成。

簡易構成では Docker Swarm を使用せず、単一の enterprise アプリケーションノードを配置します。仮想マシンは合計 4 台です。

  • 1 台の enterprise ノードで tier0-enterprise + EMQX を実行します。
  • 2 台のデータベースノードで PostgreSQL + TimescaleDB のプライマリ/スタンバイクラスターを構成します。
  • 1 台の Witness ノードがデータベースの監視、クォーラム判定、フェイルオーバーに参加します。

簡易構成はデプロイの複雑さを低減します。一方、アプリケーション層と EMQX は単一障害点となります。DB VIP + Witness による高可用性を維持するのはデータベース層のみです。

以下の IP アドレスは計画用のプレースホルダーです。実装前に現場の実際のネットワークに合わせて置き換えてください。

種別 名前 計画 IP 説明
アプリケーションノード ent-enterprise-01 10.60.10.11 tier0-enterprise + EMQX を実行する単一の enterprise ノード
論理エンドポイント DB VIP 10.60.20.10 現在のプライマリのみを指す共通データベースエンドポイント
データベースノード ent-db-01 10.60.20.11 PostgreSQL + TimescaleDB のプライマリ候補
データベースノード ent-db-02 10.60.20.12 PostgreSQL + TimescaleDB のスタンバイ候補
クォーラムノード ent-db-witness-01 10.60.20.13 repmgr witness/データベースのクォーラム監視

主要な経路:

  • 業務経路:クライアント/現場システム → ent-enterprise-01 → DB VIP → 現在のプライマリデータベース。
  • tier0-enterprise と EMQX は、どちらも ent-enterprise-01 上で実行します。
  • データベースへのアクセスには必ず DB VIP を使用し、アプリケーションから ent-db-01/02 への直接アクセスは禁止します。
  • Witness はデータベースのクォーラム判定、昇格、健全性確認のみに参加し、業務経路には含まれません。

データベースの監視とフェイルオーバー

Section titled “データベースの監視とフェイルオーバー”
フェーズ 経路 説明
通常のアクセス ent-enterprise-01 -> DB VIP -> current primary アプリケーションは常に 10.60.20.10:5432 に接続します
通常のレプリケーション current primary -> current standby PostgreSQL WAL ストリーミングレプリケーション
通常の監視 DB-01/DB-02 -> Witness repmgrd が状態を報告し、Witness がクォーラム判定に参加します
プライマリ障害 standby -> Witness スタンバイがクォーラム確認を要求し、スプリットブレインを防止します
スタンバイの昇格 standby promote Witness の確認後にスタンバイを昇格させます
VIP の移動 DB VIP -> new primary 10.60.20.10 を新しいプライマリに割り当てます
アプリケーションの復旧 ent-enterprise-01 -> DB VIP -> new primary 接続プールの再接続後にアプリケーションが復旧します
ノード 役割 vCPU メモリー ストレージ システムディスクの推奨構成 データディスクの推奨構成 主要コンポーネント
ent-enterprise-01 単一の enterprise ノード 8 32G 100G 単一の / システムディスク、100G 個別のデータディスクなし tier0-enterprise、EMQX、任意で Nginx/HAProxy
ent-db-01 PostgreSQL/TSDB のプライマリ候補 4 8G 500G / 80G /pgdata 360G、/pgwal 40G、/backup-staging 20G PostgreSQL、TimescaleDB、repmgr、keepalived
ent-db-02 PostgreSQL/TSDB のスタンバイ候補 4 8G 500G / 80G /pgdata 360G、/pgwal 40G、/backup-staging 20G PostgreSQL、TimescaleDB、repmgr、keepalived
ent-db-witness-01 Witness/クォーラム監視 2 4G 40G / 40G 個別の割り当てなし repmgr witness、監視エージェント、監査ログ
分類 台数 ノードごとの仕様 vCPU 小計 メモリー小計 ストレージ小計
enterprise アプリケーションノード 1 8C / 32G / 100G 8C 32G 100G
PostgreSQL + TimescaleDB ノード 2 4C / 8G / 500G 8C 16G 1000G
Witness ノード 1 2C / 4G / 40G 2C 4G 40G
合計 4 - 18C 52G 1140G

合計値:

  • 仮想マシン:4 台
  • vCPU:18
  • メモリー:52G
  • ストレージ:1.14T
対象 方法 ポート 説明
すべての仮想マシン ssh -i ~/.ssh/chen-rsa ops@<IP> 22/TCP 共通の鍵認証による SSH を実装後に使用します。それまでは現場のアカウントを使用します
ent-enterprise-01 https://10.60.10.11 443/TCP 業務用エンドポイント
DB VIP psql -h 10.60.20.10 -p 5432 5432/TCP enterprise ノードと運用の許可リストのみ許可します

アプリケーションと EMQX のポート

Section titled “アプリケーションと EMQX のポート”
接続元 接続先 ポート 用途
ユーザー/現場システム ent-enterprise-01 80/TCP HTTP 入口または HTTPS リダイレクト、任意
ユーザー/現場システム ent-enterprise-01 443/TCP HTTPS の業務用入口
デバイス/現場システム ent-enterprise-01 1883/TCP EMQX MQTT 平文通信、任意
デバイス/現場システム ent-enterprise-01 8883/TCP EMQX MQTT TLS、推奨
デバイス/現場システム ent-enterprise-01 8083/TCP MQTT WebSocket、任意
デバイス/現場システム ent-enterprise-01 8084/TCP MQTT WebSocket TLS、任意
運用ネットワーク ent-enterprise-01 18083/TCP EMQX Dashboard、運用の許可リストのみ
ent-enterprise-01 DB VIP 5432/TCP PostgreSQL の業務アクセス
接続元 接続先 ポート 用途
ent-db-01 ent-db-02 5432/TCP PostgreSQL WAL ストリーミングレプリケーション
ent-db-02 ent-db-01 5432/TCP 復旧後の逆方向レプリケーション
ent-db-01/02 ent-db-witness-01 5432/TCP repmgr メタデータ/Witness 通信
ent-db-01 ent-db-02 VRRP DB VIP の移動。プロトコル 112 を許可します

enterprise アプリケーションノード

Section titled “enterprise アプリケーションノード”
  • Docker Swarm はデプロイしません。
  • tier0-enterprise と EMQX を同一の ent-enterprise-01 ノードにデプロイします。
  • ent-enterprise-01 はアプリケーション層の単一障害点です。障害時は手動で復旧するか、バックアップから再構築します。
  • このノードには 100G のシステムディスクが 1 台しかないため、業務データの長期保存には適しません。
  • tier0-enterprise の業務データは PostgreSQL/TimescaleDB に保存する必要があります。
  • アップロード、インポート/エクスポート、レポートのファイルはローカルに保存してバックアップできます。後で標準構成へ移行する場合は、これらのファイルを NFS/NAS またはオブジェクトストレージへ移行してください。
  • 簡易構成の EMQX は、単一ノードのステートフルサービスです。
  • データディレクトリを ent-enterprise-01 上に固定します。例:/data/emqx。
  • 設定、証明書、プラグイン、ルールエンジンの設定をバックアップします。
  • メッセージ層の高可用性は提供しません。これが要件を満たさない場合は、3 ノードの EMQX クラスターを持つ標準構成を使用してください。
  • PostgreSQL:16 または現場で検証済みのバージョン。
  • TimescaleDB:選択した PostgreSQL のメジャーバージョンと互換性のある安定版。
  • レプリケーション:物理ストリーミングレプリケーション。
  • フェイルオーバー:repmgrd + witness。
  • データベースの入口:DB VIP。
  • 接続プール:ent-enterprise-01 上で PgBouncer を実行し、データベースへの接続負荷を低減できます。
  • Witness は repmgr witness のメタデータと監視ロジックのみを保持します。
  • Witness は業務 SQL を処理しません。
  • Witness の障害で現在のプライマリは停止しませんが、自動フェイルオーバーの信頼性は低下します。

ポートとファイアウォールの基準

Section titled “ポートとファイアウォールの基準”
ポート/プロトコル 許可範囲 用途
22/TCP 運用ネットワークから 4 台の仮想マシン SSH
80/TCP ユーザーネットワークから ent-enterprise-01 HTTP リダイレクトまたは内部の平文通信入口
443/TCP ユーザーネットワークから ent-enterprise-01 HTTPS の業務用入口
1883/TCP デバイス/現場システムから ent-enterprise-01 EMQX MQTT 平文通信、任意
8883/TCP デバイス/現場システムから ent-enterprise-01 EMQX MQTT TLS、推奨
8083/TCP デバイス/現場システムから ent-enterprise-01 EMQX WebSocket、任意
8084/TCP デバイス/現場システムから ent-enterprise-01 EMQX WebSocket TLS、任意
18083/TCP 運用ネットワークから ent-enterprise-01 EMQX Dashboard、許可リストのみ
5432/TCP enterprise から DB VIP、DB/Witness 内部 PostgreSQL/repmgr
112/VRRP データベースノード間 DB VIP の移動
9100/TCP 監視システムから 4 台の仮想マシン node exporter、任意
障害シナリオ 想定される動作 業務への影響
ent-enterprise-01 の障害 アプリケーションと EMQX が停止し、手動復旧またはバックアップからの再構築が必要です アプリケーション層が全面停止します
現在の DB プライマリの障害 Witness のクォーラム確認後にスタンバイが昇格し、DB VIP が移動します 数秒から数分の書き込み中断。アプリケーションの再接続が必要です
DB スタンバイの障害 プライマリは稼働を継続し、レプリケーションのアラートが発生します 直接の業務停止はありませんが、DB のホットスタンバイを失います
Witness の障害 現在のプライマリは稼働を継続しますが、自動フェイルオーバーの信頼性が低下します 直接の業務停止はありません。Witness を優先して復旧します
DB VIP の移動失敗 新しいプライマリが存在しても、共通の入口に到達できない場合があります 業務が停止します。VIP の手動割り当てが必要です
確認項目 合格基準
4 台の仮想マシンのホスト名が固定されている hostnamectl が計画と一致します
共通の SSH 接続が利用できる 運用端末から鍵認証で 4 台すべてにアクセスできます
時刻同期 4 台間の時刻差が 1s 未満です
ファイアウォールが許可されている 第 9 節のポートが定められた範囲で許可されています
enterprise サービスが正常である tier0-enterprise のヘルスチェックに合格します
EMQX の状態が検証されている EMQX ノード、待ち受けポート、永続化ディレクトリが正常です
enterprise のディスク使用率が安全な範囲にある / の使用率が 70% 未満で、ログとキャッシュのクリーンアップが設定されています
DB のプライマリ/スタンバイが正常である repmgr cluster show でプライマリ、スタンバイ、Witness が正常です
DB VIP が利用できる enterprise ノードから 10.60.20.10:5432 に接続できます
DB プライマリのフェイルオーバー訓練 スタンバイの昇格と DB VIP の移動ができます
バックアップのリストア訓練 テスト用データベースへバックアップをリストアできます
  1. 4 台の仮想マシンを作成し、ホスト名、IP、時刻同期、SSH を設定します。
  2. OS の基本設定、ファイアウォール、マウント、カーネルパラメーターを初期化します。
  3. ent-enterprise-01 に tier0-enterprise をデプロイします。
  4. ent-enterprise-01 に単一ノードの EMQX をデプロイします。
  5. PostgreSQL + TimescaleDB のプライマリ/スタンバイをデプロイします。
  6. repmgr witness、repmgrd、DB VIP 移動スクリプトをデプロイします。
  7. 接続、EMQX の復旧、データベースのフェイルオーバー、バックアップのリストア、日常点検を検証します。
  8. 運用 Runbook、認証情報の保管、日常点検タスクを整備します。
  • 簡易構成にはアプリケーション層の単一障害点があります。ent-enterprise-01 が停止すると、業務サービス全体が利用できなくなります。
  • EMQX は単一ノードであり、メッセージ層の高可用性を提供しません。
  • ent-enterprise-01 のシステムディスクは 100G の 1 台のみです。ログ、キャッシュ、添付ファイル、一時ファイルの使用量を管理する必要があります。
  • 後でアプリケーション層または EMQX の高可用性が必要になった場合は、標準構成へ移行します。
  • データベースの RPO/RTO は未確定です。このプライマリ/スタンバイ構成はデータ損失ゼロを保証しません。
  • DB VIP 移動スクリプトは現場での検証が必要です。特に、仮想化/ネットワーク基盤が VRRP を許可していることを確認してください。
リファレンス

高可用性デプロイ計画

Tier0 Enterprise の高可用性環境向けリファレンスデプロイ計画。

この V2 計画は、オフラインまたはプライベート環境に論理的な Tier0 Enterprise Fleet Center をデプロイするためのものです。6 台のマシンが、業務、ミドルウェア、データベース、ストレージ、Agent の役割を分担します。ユーザーと Enterprise 内部サービスは常に固定 VIP アドレスに接続します。1 台のマシンまたは 1 つのプロキシに障害が発生した場合、Keepalived、HAProxy、repmgr、RustFS、Fleet Agent がそれぞれのレイヤーで引き継ぎます。

この計画は、同一ネットワークセグメント内の単一マシン障害からの復旧を対象にしています。これは Active/Standby の災害復旧設計であり、複数データセンター、合意ベースの選出、またはデータ損失ゼロを保証する厳密な高可用性クラスターではありません。

設計目標は次のとおりです。

  • 現在の業務ノードに障害が発生した後、Fleet Center の入口を健全な Standby ノードへ移動できる。
  • PostgreSQL、Redis、RustFS は固定 VIP アドレスを使用し、バックエンドの役割が変わっても Enterprise の .env を変更しない。
  • App、Flow、Marimo、License などのローカル業務ファイルを Active から Standby へ同期できる。
  • 1 つの Cluster License は 1 つの論理インストールに対応し、Enterprise が別ノードに切り替わっても再アクティベーションしない。
  • 独立した deployer が 6 台の初期化、ロール割り当て、デプロイ、状態監視、フェイルオーバー検証を行う。
  • VIP フェイルオーバー、ファイル同期、独立 Redis インスタンス、データベースレプリケーション、オブジェクトストレージ冗長性を明確に分離する。

この計画は Fleet Center のみに適用されます。Branch Enterprise ノードは通常の単一マシンデプロイとしてインストールされ、この 6 台 Active/Standby 設計には参加しません。

Tier0 Enterprise 全体トポロジー

主要なリクエスト経路は次のとおりです。

Terminal window
クライアント / 現場システム
-> Business VIP :8088
-> 現在の Active Enterprise (D / E / F)
|-- PostgreSQL VIP :5432 -> D/E HAProxy -> A/B の現在の書き込み可能 Primary
|-- Redis VIP :6379 -> C または F の独立 Redis
`-- RustFS VIP :19000 -> A/B HAProxy -> C/D/E/F RustFS クラスター

4 つの VIP は業務設定内の固定入口です。Enterprise がノードを切り替えたり、ミドルウェアのバックエンドロールが変わったりしても、クライアントと Enterprise は接続アドレスを変更しません。

次のアドレスは例です。実装前に、現場の同一 IPv4 サブネット内の実アドレスに置き換えてください。4 つの VIP は DHCP、静的ホスト、または他の VRRP インスタンスで使用されていてはいけません。

名前 例 IP 説明
deployer-controller 10.60.10.20 独立 deployer。6 台の業務マシンには含めない
ent-ha-01 / A 10.60.10.11 PostgreSQL Primary と関連ロール
ent-ha-02 / B 10.60.10.12 PostgreSQL Standby と関連ロール
ent-ha-03 / C 10.60.10.13 Witness、Redis-1、RustFS-1
ent-ha-04 / D 10.60.10.14 初期 Active Enterprise と関連ロール
ent-ha-05 / E 10.60.10.15 Enterprise Standby と関連ロール
ent-ha-06 / F 10.60.10.16 Enterprise Standby と関連ロール
Business VIP 10.60.10.101 Enterprise 統一入口、デフォルト 8088
PostgreSQL VIP 10.60.10.102 データベース統一入口、デフォルト 5432
Redis VIP 10.60.10.103 Redis 統一入口、デフォルト 6379
RustFS VIP 10.60.10.104 S3 統一入口、デフォルト 19000

実装前に、業務 NIC 名、IPv4 プレフィックス、ゲートウェイ、DNS、NTP、ホスト名、SSH ユーザー、ディスクマウントポイント、ファイアウォール許可リストを確認してください。VIP、ノード IP、NIC をスクリプトで推測して本番に直接使用してはいけません。

Tier0 Enterprise 6 台 Active/Standby 構成
マシン デフォルトでデプロイするコンポーネント 主な責務
A PostgreSQL Primary、RustFS HAProxy、Keepalived 初期データベース Primary、1 番目の RustFS プロキシ候補
B PostgreSQL Standby、RustFS HAProxy、Keepalived ストリーミング Standby、2 番目の RustFS プロキシ候補
C PostgreSQL Witness、Redis-1、RustFS-1 データベース Witness/状態記録、Redis と RustFS のデータノード
D PG HAProxy、Keepalived、RustFS-2、Enterprise、Fleet Agent、rsync 初期業務 Active、1 番目の PostgreSQL プロキシ候補
E PG HAProxy、Keepalived、RustFS-3、Enterprise、Fleet Agent、rsync 業務 Standby、2 番目の PostgreSQL プロキシ候補
F Redis-2、RustFS-4、Enterprise、Fleet Agent、rsync 業務 Standby、2 番目の Redis インスタンス

この割り当ては単一マシン障害への耐性と、6 台全体のリソースバランスを目的としています。deployer はホスト名/IP アドレスの自然順でマシンを A-F に対応付け、デフォルトロールを選択しますが、最終割り当ては現場のディスク構成と障害ドメインに照らして確認する必要があります。

Enterprise 業務レイヤーは Single Active/Standby です。任意の時点で、Business VIP を保持するノードだけが業務リクエストを処理します。業務レイヤーの拡張は、1 台の業務ノードの CPU、メモリ、ディスクを増強する垂直拡張で行います。Enterprise ノード数を掛け算して同時処理能力を見積もらないでください。

マシン ノード種別 vCPU メモリ 基本ストレージ ディスク推奨
A PostgreSQL Primary ノード 8C 16G 1T / は約 80G、残りは PostgreSQL データ、WAL、バックアップ staging 用
B PostgreSQL Standby ノード 8C 16G 1T / は約 80G、残りは PostgreSQL データ、WAL、バックアップ staging 用
C Witness / ミドルウェアノード 4C 8G 500G システム、Redis、RustFS データ用の固定マウントポイントを割り当てる
D 初期 Active Enterprise ノード 8C 32G 500G システム、コンテナ、Enterprise 同期ファイル、RustFS データ用の固定マウントポイントを割り当てる
E Standby Enterprise ノード 8C 32G 500G D と同じ
F Standby Enterprise ノード 8C 32G 500G D と同じ
カテゴリー 台数 1 台あたり仕様 vCPU 小計 メモリ小計 ストレージ小計
PostgreSQL データベースノード 2 8C / 16G / 1T 16C 32G 2T
Witness / ミドルウェアノード 1 4C / 8G / 500G 4C 8G 500G
Enterprise 業務ノード 3 8C / 32G / 500G 24C 96G 1.5T
合計 6 - 44C 136G 4T

D、E、F は同じ Enterprise 構成を保持します。

依存先 構成方針
PostgreSQL A/B ノード IP ではなく PostgreSQL VIP に接続する
Redis C/F ノード IP ではなく Redis VIP に接続する
File storage FILESTORE_DRIVER=s3 を使用し、S3 endpoint を RustFS VIP に向ける
Fleet identity 3 ノードが 1 つの論理 installationId を共有し、各ノードは独自の memberId を持つ
Fleet Agent 各 Enterprise ノードで 1 つのプロセスレベル Fleet Agent を実行する
License Business VIP 経由で 1 回だけアクティベートし、Bundle を HA fileset に含める

installationId と memberId はインストールプロセスで生成、永続化されます。運用者が手動で作成したり、マシン間で memberId をコピーしたりしないでください。

VIP 候補ノード ヘルス判定 引き継ぎ結果
Business VIP D, E, F Fleet Agent readiness、業務コンテナ状態、同期 generation Owner だけが Enterprise HA 業務グループを起動する
PostgreSQL VIP D, E HAProxy/Keepalived 状態。HAProxy は書き込み可能 Primary のみにルーティングする Enterprise は同じデータベースアドレスを使い続ける
Redis VIP C, F Redis PING とローカルサービス状態 もう一方の独立インスタンスへ切り替わる。キャッシュ/セッションは失われる可能性がある
RustFS VIP A, B HAProxy と RustFS backend のヘルス S3 アドレスを変えずにプロキシ入口だけが移動する
  • D、E、F は同じ完全な Enterprise オフライン ZIP をインストールする。
  • Fleet Agent はホストレベルのプロセスサービスであり、業務コンテナではない。
  • Keepalived は Business VIP を管理し、Fleet Agent readiness endpoint を呼び出してローカルノードが VIP を保持できるか判断する。
  • Business VIP Owner だけが業務グループを実行し、他の 2 台は Standby にとどまる。
  • VIP を失ったノードは業務グループを停止しなければならない。復旧したノードはまず Standby として再参加する。
  • EMQX は Single Active 業務グループの一部として実行する。Agent 制御外で再起動したり、3 台間で別の選出機構を作ったりしない。

PostgreSQL Primary/Standby、Witness、統一入口

Section titled “PostgreSQL Primary/Standby、Witness、統一入口”
  • A は Primary、B は Streaming Standby、C は repmgr Witness として開始する。
  • Witness はクラスター状態を記録し、障害判断に参加する。完全な業務データは保存せず、読み書きも処理しない。
  • Primary に障害が発生した場合、repmgr は健全な Standby を新しい Primary に昇格させる。
  • D/E HAProxy は 5432 トラフィックを現在の書き込み可能 Primary のみにルーティングする。
  • PostgreSQL VIP は D/E プロキシノード間を移動する。プロキシフェイルオーバーとデータベース Primary/Standby フェイルオーバーは分離されている。
  • 受け入れでは「書き込み可能 Primary が 1 つだけであること」と「Standby が streaming を再開すること」の両方を証明する必要がある。
  • C と F はそれぞれ 1 つの standalone Redis インスタンスを実行する。
  • 2 つの Redis は Sentinel、Cluster、Primary/Replica レプリケーションを構成しない。
  • Redis VIP は接続入口だけを切り替える。現在のインスタンスに障害が発生すると、VIP はもう一方の健全なインスタンスへ移動する。
  • Redis には失われてもよい、または再構築できるデータだけを保存する。切り替え後の空キャッシュや再ログインは設計境界内である。
  • 将来 Redis が破棄できない状態を保存する場合は、独立インスタンス前提を維持せず、レプリケーション/仲裁設計へアップグレードする。
  • C、D、E、F は 4 ノードの分散 RustFS オブジェクトストレージクラスターを構成する。
  • A と B の HAProxy は健全な RustFS backend へプロキシする。
  • RustFS VIP は A と B の間を移動する。Enterprise は常にこの VIP 経由で S3 にアクセスする。
  • 単一 RustFS ノード障害はクラスター機構で処理し、単一プロキシ障害は VIP フェイルオーバーで処理する。
  • オブジェクトデータを rsync、ホットコピー、または RustFS マウントディレクトリの直接編集で同期しない。
  • RustFS のノード数、ディスク数、erasure coding の可用性境界は、デプロイされたバージョンのクラスター検査結果に従う。

App、Flow、Marimo、License ファイル同期

Section titled “App、Flow、Marimo、License ファイル同期”

Fleet Agent は、PostgreSQL/RustFS に直接置けないが、新しい Active ノードに存在する必要があるローカル業務ファイルだけを同期します。

  • App runtime ディレクトリと node_modules
  • Flow、Marimo、Notebook、および関連するローカル runtime ファイル
  • License Bundle
  • 現在の実装で明示的に登録されたその他の HA fileset

同期は、deployer が管理する業務ノード間の SSH trust 上で system rsync を使用します。各リリースは完全な generation/manifest を作成します。Standby ノードは generation が完全であることを確認してからのみ引き継げます。PostgreSQL データディレクトリ、Redis データディレクトリ、RustFS データディレクトリはこの同期範囲に含まれません。

Source Target Purpose
ユーザー / 現場システム Business VIP Web/API 業務アクセス
D/E/F Enterprise PostgreSQL VIP 業務データベースの読み書き
D/E/F Enterprise Redis VIP キャッシュとセッション
D/E/F Enterprise RustFS VIP S3 オブジェクトの読み書き
Deployer controller A-F SSH、デプロイ、状態収集、運用
D/E/F D/E/F rsync/SSH ファイル同期
A/B/C A/B/C PostgreSQL streaming replication、repmgr、Witness 通信
RustFS members/proxies C/D/E/F RustFS クラスターと S3 backend 通信
同じ VIP を共有するノード 対応する候補ノード VRRP advertisement と VIP 移動

ポートは、必要最小限の source-to-target 関係で許可してください。すべての管理ポートをユーザーネットワークへ直接公開しないでください。

Port / protocol 推奨許可範囲 用途
22/TCP Deployer -> A-F; D/E/F 相互同期 SSH、デプロイ、rsync
8088/TCP ユーザーネットワーク -> Business VIP Enterprise 業務入口
5432/TCP D/E/F -> PostgreSQL VIP; PG/proxy 内部アクセス PostgreSQL、streaming replication、proxy
6379/TCP D/E/F -> Redis VIP; health-check nodes -> C/F Redis アクセスとヘルスチェック
19000/TCP D/E/F -> RustFS VIP Enterprise 固定 S3 入口
9000/TCP A/B -> C/D/E/F; RustFS members RustFS S3 backend/cluster 通信。バージョンごとに確認
9001/TCP 管理対象運用ネットワーク -> RustFS admin entry 任意の RustFS admin endpoint。ユーザーネットワークへ公開しない
19731/TCP Localhost / Keepalived / 管理対象運用ネットワーク Fleet Agent HTTP health/control interface
18080/TCP 運用ネットワーク -> deployer controller Deployer HTTPS UI
112/VRRP 各 VIP の候補ノード Keepalived VIP 移動。TCP/UDP ではなく IP プロトコル番号
1883/8883 現場デバイスネットワーク -> 業務入口。製品設定に従う MQTT/MQTTS
障害シナリオ 期待される動作 境界
D Active 業務ノード障害 Business VIP が E または F に移動し、正常な Standby が fileset generation を確認してから業務グループを起動する 最後の正常な同期後に未同期のファイルは失われる可能性がある
Fleet Agent 障害 readiness が失敗し、旧業務グループが停止して Business VIP が移動する Agent を迂回して手動でコンテナーを起動しない
PostgreSQL A Primary 障害 B が昇格し、HAProxy が新 Primary にルーティングする。PostgreSQL VIP は変わらない 切り替え中は接続が一時的に失敗する。後で新しい Standby を復旧する
PostgreSQL HAProxy 1 台の障害 PostgreSQL VIP がもう一方の proxy へ移動する データベースの役割は変わらない
現在の Redis ノード障害 Redis VIP がもう一方の独立 Redis インスタンスへ移動する キャッシュが失われ、セッションが無効になる可能性がある
RustFS データノード 1 台の障害 残りのクラスターノードがサービスを継続する 許容範囲は実際の erasure coding とディスクの状態に依存する
RustFS HAProxy 1 台の障害 RustFS VIP がもう一方の proxy へ移動する S3 アドレスは変わらず、既存の接続は再接続が必要になる場合がある
deployer controller 障害 稼働中のデータプレーンは継続する デプロイ、集中監視、運用が一時的に利用できず、controller 自体には自動 Standby がない
ネットワーク分断 安全な自動リーダー選出は保証されない VIP Owner または Active が二重になる可能性があり、障害側を隔離して手動で復旧する
任意の 2 台が同時に障害 一律の可用性保証はない 結果は 2 台の役割の組み合わせに依存し、シナリオごとの検証が必要

ネットワーク分断、複数ノード同時障害、誤った VRRP priority、ディスク満杯、時刻ずれ、deployer 外の手動変更は通常の自動復旧保証の範囲外であり、運用手順で扱う必要があります。

  • PostgreSQL は独立した論理または物理バックアップとリストア検証が必要です。
  • RustFS は容量、ディスク、クラスターのヘルス監視が必要です。
  • Redis は将来のレプリケーション設計が導入されるまではキャッシュ/セッションとして扱う必要があります。
  • D/E/F の Fleet Agent と Keepalived 状態を監視する必要があります。
  • rsync generation lag を監視する必要があります。古い generation の Standby は業務トラフィックを引き継いではいけません。
  • 定期フェイルオーバードリルには、Business VIP、PostgreSQL 昇格、Redis VIP 切り替え、RustFS proxy 切り替え、バックアップからの復元を含める必要があります。
確認項目 合格基準
マシンと役割 6 台の業務マシン A~F が計画と一致し、deployer は分離されている。
SSH と sudo deployer が管理されたアカウントで A~F に対話なしでアクセスでき、ホストキーを確認済み。
ネットワークと時刻 6 台は計画されたサブネットにあり、4 つの VIP は未使用。NIC、プレフィックス、時刻同期が要件を満たす。
Docker/Compose 6 台すべて初期化済みで、古いコンテナー、ポート、ネットワーク、データディレクトリとの競合がない。
ディスク PostgreSQL、RustFS、Enterprise fileset が計画されたマウントポイントを使用し、容量と inode に問題がない。
PostgreSQL Primary が 1 台、Standby は streaming 中、Witness は稼働中で、PostgreSQL VIP 経由で読み書きできる。
Redis C/F のインスタンスが正常で、Redis VIP 経由の PING に成功し、切り替え後にデータが複製されない境界を了承済み。
RustFS 4 ノードが正常で、RustFS VIP 経由でオブジェクトを書き込み、読み取り、削除できる。
Enterprise D/E/F のバージョンが一致し、Business VIP の所有者だけが業務グループを実行する。
Fleet Agent 3 台の Agent が稼働し、readiness、同期履歴、generation の状態を確認できる。
License Cluster License が Business VIP 経由で 1 回だけ有効化され、切り替え後も有効。
App 同期 node_modules を含むインポート済み App が同期と切り替え後も動作する。
ファイアウォール この計画で必要な送信元、宛先、プロトコルのみ許可されている。
バックアップ PostgreSQL、RustFS、deployer のバックアップ計画があり、少なくとも 1 回の復元テストを完了している。
  1. 独立した deployer controller、6 台の業務マシン、4 つの VIP、NIC、ディスク構成を準備する。
  2. 完全な納品パッケージと Enterprise オフライン ZIP の SHA256 を検証する。
  3. deployer を起動し、SSH 認証情報と 6 台のマシンを登録して接続を確認する。
  4. 6 台すべてで Docker/Compose とオフラインイメージ環境を初期化する。
  5. 標準デプロイを作成し、A~F の役割と 4 つの VIP を確認する。
  6. PostgreSQL、Redis、RustFS、HAProxy、Keepalived を順にデプロイする。
  7. D/E/F 間に専用 rsync アカウントと SSH 信頼関係を設定する。
  8. D/E/F に Enterprise と Fleet Agent をデプロイし、初期 Active が D のみであることを確認する。
  9. Business VIP 経由で License を 1 回有効化し、同期完了を待つ。
  10. テスト App をインポートし、App、node_modules、Flow/Marimo、License fileset の同期を検証する。
  11. Enterprise、PostgreSQL、Redis、RustFS の単一ノード障害を個別に演習する。
  12. ノードを復旧し、VIP Owner、Active、Primary がそれぞれ 1 つで、同期が完了していることを確認する。
  13. バックアップ復元演習、運用引き継ぎ、現場パラメーターの記録を完了する。
  • ユーザーは Business VIP 経由で Enterprise にアクセスできる。
  • Enterprise は PostgreSQL VIP 経由でのみ PostgreSQL を読み書きする。
  • Enterprise は Redis VIP 経由でのみ Redis を使用する。
  • Enterprise は RustFS VIP 経由でのみ RustFS を使用する。
  • フェイルオーバー後、App、Flow、Marimo、Notebook、License ファイルが Active ノードに存在する。
  • Branch Enterprise は引き続き独立してインストールでき、この 6 台 HA グループには参加しない。

フェイルオーバードリル受け入れ

Section titled “フェイルオーバードリル受け入れ”
  • Active 業務ノードを停止する: Business VIP が健全な Standby に移動し、業務グループはそこだけで起動する。
  • PostgreSQL Primary を停止する: Standby が昇格し、PostgreSQL VIP は書き込み可能 Primary を指し続ける。
  • Redis VIP owner を停止する: Redis VIP がもう一方のインスタンスへ移動し、キャッシュ/セッション損失を許容する。
  • RustFS proxy owner を停止する: RustFS VIP がもう一方の proxy へ移動する。
  • RustFS データノードを 1 台停止する: オブジェクトアクセスは実際の RustFS 冗長性境界内で維持される。
  • 障害ノードを復旧する: Standby または健全な member として復帰し、新しいデータやファイルを上書きしない。
  • 4 つの VIP が 6 台のマシンで共有できる同じレイヤー 2 ネットワークにあるか。
  • ネットワーク機器が VRRP/GARP を許可し、セキュリティポリシーが VIP の移動を妨げないか。
  • 現場が完全にオフラインか。deployer は Harbor への到達性を確認するため、事前に経路または proxy を検証する。
  • PostgreSQL、RustFS、Enterprise fileset の容量、増加率、RPO/RTO 目標が要件を満たすか。
  • Redis に失われてはならないデータがあるか。その場合、独立した 2 インスタンスでは要件を満たさない。
  • App/Flow/Marimo のファイル量、変更量、許容同期遅延が要件を満たすか。
  • サブネット間、データセンター間、ネットワーク分断、または任意の 2 台同時障害への可用性が必須か。
  • 本番証明書、ドメイン、パスワード、License、SSH キー、監査記録の管理責任者は誰か。
  • deployer controller の復旧方法、バックアップ周期、代替運用経路は何か。

これらが変わると VIP、役割、ストレージ、障害時の境界に影響する可能性があるため、実装前に計画を更新してください。

現在の計画は、6 台のマシン、4 つの固定 VIP、Single Active Enterprise を中心にしています。業務入口、データベース入口、キャッシュ入口、オブジェクトストレージ入口を分離します。同一ネットワークセグメント内で一般的な単一マシン障害をカバーでき、フェイルオーバー後に接続構成を変更したり、License を再アクティベートしたり、App ファイルを手動コピーしたりする作業を大幅に減らします。

同時に、3 つの境界を受け入れる必要があります。Redis はデータをレプリケートせず、業務 fileset は非同期で同期され、ネットワーク分断には合意仲裁がありません。したがって、この計画は Fleet Center 6 台 Single Active Active/Standby 災害復旧計画 として定義するのが適切です。ゼロ中断、ゼロデータ損失、またはデータセンター間の厳密な高可用性を外部に約束してはいけません。

リファレンス

SLA と高可用性の境界

標準 Tier0 Enterprise デプロイの SLA 推奨、高可用性境界、受け入れ条件、訓練、強化項目です。

このドキュメントは、3 台のアプリケーション / Swarm ノード、2 台の PostgreSQL HA ノード、1 台の witness ノードで構成される 6 VM 完全オフラインデプロイに適用されます。

レイヤー 現在の設計 高可用性の境界
アプリケーションランタイム Enterprise New compose は固定の tier0_app_active_node 上で実行されます。 backend、redis、EMQX、SourceFlow、EventFlow、Marimo、OPC UA Server はまだ自動マルチレプリカサービスではありません。
HTTP 入口 3 台のアプリケーションノードで keepalived APP VIP + HAProxy を実行します。 VIP は浮動できます。HAProxy はアクティブノードの 8088/TCP に転送し、/healthz を確認します。
MQTT / OPC UA EMQX は 1883/8883/8083/8084、OPC UA は 4840 を使用します。 これらはアクティブノードへ直接接続します。TCP VIP プロキシには含まれないため、プロトコル入口の HA は保証されません。
データベース PostgreSQL / TimescaleDB ストリーミングレプリケーション + repmgr + witness + DB VIP。 primary 障害時に standby を自動昇格できます。非同期レプリケーションは厳密なゼロ RPO を保証できません。
バックアップと復元 backup-db.sh / restore-db.sh。 復旧性を提供しますが、オンライン HA と同じではありません。
サービス対象 推奨表現 制約
プラットフォーム HTTP 入口 月間可用性 99.5% から開始します。 VIP フェイルオーバーはアクティブアプリケーションノードの自動移行と同じではありません。
データベースアクセス 運用目標:RTO <= 2 minutes。 RPO はレプリケーション遅延に依存します。同じアーキテクチャでの過去フェイルオーバーテストは約 59-64 秒でした。
MQTT / OPC UA 現在の設計では HA SLA を約束しません。 先に HAProxy TCP proxy、専用 VIP、またはサービスクラスタリングを追加する必要があります。
バックアップと復元 毎日バックアップ。大きな変更前は必須。 復元時間はデータ量と現地 I/O に依存します。

99.9% 以上を主張する前に、アプリケーションの自動移行またはマルチレプリカデプロイ、プロトコル入口の HA、監視アラート、復旧訓練を完了してください。計画中の機能を納品済み機能として記述しないでください。

各デプロイまたはアップグレードでは、少なくとも以下を満たす必要があります。

  • verify-materials.sh が成功し、デリバリーパッケージの SHA256 チェックが通る。
  • 3 台の Swarm ノードが Ready である。
  • APP VIP /healthz と /readyz が 200 を返し、ホームページと /uns にアクセスできる。
  • アクティブノード上の 7 つの compose サービスが実行中である。
  • DB VIP:5432 にアクセスでき、primary、standby、witness の topology が正常である。
  • デフォルトアカウントで実際にログインできる。ポート、コンテナ、HTTP 200 応答だけで IAM 初期化成功を判断しない。
  • HTTP、EMQX ポート、WebSocket/WSS、OPC UA TCP の smoke check が通る。

毎日以下を実行します。

Terminal window
./bin/verify.sh --site config/site.conf
./bin/smoke-business-emqx.sh --site config/site.conf

少なくとも以下のアラートを設定します。

  • APP VIP /healthz または /readyz の失敗。
  • DB VIP 到達不可、primary 不在、split-brain リスク、レプリケーション中断、またはしきい値超過の遅延。
  • keepalived、HAProxy、PostgreSQL、repmgrd の異常状態。
  • backend、redis、EMQX などの重要コンテナの終了または頻繁な再起動。
  • データディスク使用率が 80% / 90% を超過。
  • 最新バックアップが失敗、または生成されていない。
訓練 頻度 検証基準
APP VIP failover デリバリー前および四半期ごと。 現在の VIP ノードで keepalived を停止した後、/healthz と /readyz が復旧する。
DB primary 障害 デリバリー前および半年ごと。 standby が昇格し、DB VIP が復旧し、旧 primary が standby として再構築される。
データベース復元 毎月のサンプル確認、および大きな変更前。 バックアップが復元可能であること。復元後に verify、スモークチェック、ログイン検証が通過すること。
資材検証 すべてのパッケージビルド。 source material、package SHA、展開検証が通る。
  1. まず影響範囲を確認します。HTTP、MQTT、OPC UA、database、単一ノード影響を確認します。
  2. VIP、HAProxy、アクティブアプリケーション、database primary の復旧を優先します。
  3. ログ、データディレクトリ、バックアップを保全します。インシデント現場を直接削除または上書きしないでください。
  4. データベースインシデントでは、まず現在の primary を特定し、その後フェイルオーバー、再参加、復元のいずれを行うか判断します。
  5. 復旧後、verify、smoke check、実ログイン検証を実行します。
  • アプリケーションを multi-replica 化するか、アクティブノードの検証可能な自動移行プロセスを確立します。
  • EMQX をクラスタ化するか、専用 VIP と HAProxy TCP / TLS でルーティングします。
  • HAProxy TCP、専用 VIP、またはサービスクラスタリングで OPC UA の高可用入口を提供します。
  • PostgreSQL 同期レプリケーションを使用するか、許容できる replication lag と RPO を明確に定義します。
  • バックアップスケジュール、オフサイトレプリケーション、定期復元訓練を自動化します。
  • コンテナ、ホスト、データベース、ログ、black-box probe を統一アラートに接続します。

関連手順: 運用 Runbook と 標準ポート一覧。

リファレンス

標準ポート一覧

標準的な 6 VM オフライン Tier0 Enterprise デプロイ向けのファイアウォールポート一覧。

次の表は Enterprise New の 6 VM オフラインデプロイを前提にしています。顧客側ファイアウォールでは、必要最小限の送信元範囲からの通信のみを許可してください。これらのポートを公開インターネットへ直接公開しないでください。

送信元 宛先 ポート プロトコル 用途
制御ホスト 6 台の対象 VM 22 TCP SSH / Ansible
3 台のアプリケーションノード相互 3 台のアプリケーションノード 2377 TCP Docker Swarm 管理プレーン
3 台のアプリケーションノード相互 3 台のアプリケーションノード 7946 TCP/UDP Swarm ノード検出
3 台のアプリケーションノード相互 3 台のアプリケーションノード 4789 UDP Swarm overlay
3 台のアプリケーションノード アクティブなアプリケーションノード 8088 TCP HAProxy から Enterprise New バックエンドへ。アプリケーションネットワークセグメントのみ
ビジネスネットワークセグメント APP VIP 80 TCP プラットフォーム HTTP 入口、/healthz、/readyz
ビジネスネットワークセグメント APP VIP / アクティブなアプリケーションノード 1883 TCP MQTT
ビジネスネットワークセグメント APP VIP / アクティブなアプリケーションノード 8883 TCP MQTT TLS
ビジネスネットワークセグメント APP VIP / アクティブなアプリケーションノード 8083 TCP MQTT WebSocket
ビジネスネットワークセグメント APP VIP / アクティブなアプリケーションノード 8084 TCP MQTT WebSocket TLS
ビジネスネットワークセグメント APP VIP / アクティブなアプリケーションノード 4840 TCP OPC UA Server
制御されたアプリケーションネットワークセグメント アクティブなアプリケーションノード 8089 TCP Launchpad
動的アプリケーションアクセスネットワークセグメント アクティブなアプリケーションノード 30000-30199 TCP App Gateway / 動的アプリケーションのホストポート
アプリケーションノード、DB ノード、Witness DB VIP / DB ノード 5432 TCP PostgreSQL / TimescaleDB
DB1、DB2、Witness DB1、DB2、Witness 5432 TCP Streaming replication / repmgr
アプリケーションノード NFS server 2049 TCP/UDP NFS_ENABLED=true の場合に使用

現在の compose デプロイでは、Redis、SourceFlow、EventFlow、Marimo、EMQX Dashboard は外部に公開されません。これらのサービスは Docker runtime ネットワーク内の backend からのみ呼び出されます。

リファレンス

運用 Runbook

標準 Tier0 Enterprise deployment の daily inspection、failover、backup、restore、cleanup、troubleshooting 手順。

この document は Enterprise New offline application を前提にしています。

  1. deployment package の root directory で次の commands を実行します。
    Terminal window
    ./bin/verify.sh --site config/site.conf
    ./bin/smoke-business-emqx.sh --site config/site.conf
  2. 次の項目を確認します。
    • 3 台の Swarm nodes が Ready である。
    • APP VIP /healthz と /readyz が 200 を返す。
    • DB VIP:5432 にアクセスできる。
    • PostgreSQL primary、standby、witness topology が正常である。
    • backend、redis、emqx、sourceflow、eventflow、marimo、opcua-server が active application node ですべて running である。
  1. active application node で次の commands を実行します。

    Terminal window
    cd /opt/tier0-enterprise/tier0-deploy
    bash bin/compose.sh ps
    bash bin/compose.sh logs --tail=200 backend
    curl -fsS http://127.0.0.1:8088/healthz
    curl -fsS http://127.0.0.1:8088/readyz
  2. Health-check の見方:

    • healthz failure: まず backend process、image、container logs を確認します。
    • readyz failure: DB VIP、Redis、database migration logs も確認します。
    • Home page に到達できるが login できない場合: .env の ADMIN_INITIAL_PASSWORD を確認し、その後 backend IAM migration logs と user tables を確認します。HTTP port だけで deployment success を判断しないでください。
Terminal window
nc -vz <APP_VIP> 1883
nc -vz <APP_VIP> 8883
nc -vz <APP_VIP> 8083
nc -vz <APP_VIP> 8084
nc -vz <APP_VIP> 4840

Database nodes で次を実行します。

Terminal window
systemctl status tier0-postgresql
systemctl status tier0-repmgrd
sudo -iu postgres psql -Atqc 'select pg_is_in_recovery();'
sudo -iu postgres /usr/local/bin/repmgr -f /etc/repmgr.conf cluster show
  • pg_is_in_recovery=false は primary を意味します。
  • pg_is_in_recovery=true は standby を意味します。
  • DB VIP は current primary のみに配置されている必要があります。
  • standby replication が interrupted した場合、または witness が upstream errors を報告した場合は、まず site を保全してください。full deployment を直接再実行しないでください。
  1. test 前に、現在 VIP を保持している node を記録し、次を確認します。

    Terminal window
    curl -fsS http://<APP_VIP>/healthz
    curl -fsS http://<APP_VIP>/readyz
  2. 現在の VIP node で keepalived を停止した後、別の application node への VIP takeover を確認し、両方の URLs を再テストします。HAProxy backend は active application node の 8088/TCP を指すため、3 台すべての application nodes が active node の port 8088 に到達できる必要があります。

  3. keepalived を復旧した後、verify.sh と smoke checks を再実行します。drill 中に active application containers を停止しないでください。

Failure drill の前に backup を作成し、replication が healthy であることを確認します。

Terminal window
./bin/backup-db.sh --site config/site.conf

現在の primary で tier0-postgresql を停止した後、repmgr が standby を promote し、DB VIP takeover することを確認します。target RTO は 2 分以内です。同じ architecture での過去の tests は約 59-64 秒でした。

  • Backup:

    Terminal window
    ./bin/backup-db.sh --site config/site.conf
  • Restore:

    Terminal window
    ./bin/restore-db.sh --site config/site.conf --restore-file /backup/tier0-db/postgres-YYYYmmddTHHMMSS.dump
Terminal window
./full-cleanup.sh --env install.env --yes
./install.sh --auto --yes
Terminal window
cd /opt/tier0-enterprise/tier0-deploy
bash bin/compose.sh logs --tail=300 backend
bash bin/compose.sh ps
Terminal window
cd /opt/tier0-enterprise/tier0-deploy
bash bin/compose.sh logs --tail=200 emqx
Terminal window
systemctl status tier0-repmgrd
tail -100 /var/log/repmgr/repmgr.log
sudo -iu postgres psql -Atqc 'show shared_preload_libraries;'
Terminal window
./bin/verify-materials.sh
リファレンス

OpenAPI リファレンス付録

Tier0 OpenAPI v1 · 操作: 36 · スキーマ: 85

操作

API のフィールド名、例、元の説明は、同梱の英語版 OpenAPI 仕様に従います。

UNS

Unified Namespace のデータの読み取り、書き込み、管理。

POST/uns/attachments

Upload a UNS attachment

Uploads a multipart attachment for a UNS node. Supply a file and at least one of unsId or topic; a valid unsId takes precedence.

リクエストボディ
curl --request POST 'https://<tier0-host>/openapi/v1/uns/attachments' \
  --header 'x-api-key: <api-key>'

multipart/form-data

フィールド型必須説明
unsIdinteger (int64)いいえNumeric owner node ID. Supply unsId or topic; a valid unsId takes precedence.
topicstringいいえFull owner node path, used when a valid unsId is not supplied.
fileNamestringいいえOriginal file name.
sha256stringいいえSHA-256 checksum of the file contents.
filestring (binary)はいBinary file contents. The multipart field name must be file.
レスポンス
200400401403404409413500
成功レスポンスの例

200 · application/json

{
  "code": 0,
  "msg": "string",
  "data": {
    "unsId": 0,
    "fileName": "string",
    "filePath": "string",
    "fileUrl": "string",
    "contentType": "string"
  }
}
成功レスポンスのフィールド

200 · application/json

フィールド型必須説明
codeintegerいいえResponse code
msgstringいいえResponse message
dataobjectいいえUnsAttachmentUploadResp. スキーマの章で参照先のスキーマを確認してください。
レスポンスステータスの意味
ステータス意味メディアタイプ
200A successful response.application/json
400Correct the request parameters or Content-Type before retrying.application/json
401Authentication middleware returns plain-text unauthorized. Check API key validity, scope, and owner roles.text/plain
403Authentication middleware returns plain-text forbidden. Check API key validity, scope, and owner roles.text/plain
404Resource not found. Verify paths, IDs, and current resource state.—
409Resource state conflict. Verify paths, IDs, and current resource state.—
413Request too large. Reduce the request before retrying.—
500Service error. Investigate the service and confirm the outcome before retrying.—

POST/uns/attachments/list

List UNS attachments

Lists attachments for a UNS node or topic. Temporary file URLs can expire and must then be requested again.

リクエストボディ
curl --request POST 'https://<tier0-host>/openapi/v1/uns/attachments/list' \
  --header 'x-api-key: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '{"unsId":0,"topic":"string","page":0,"size":0,"includeFileUrl":false}'

application/json

フィールド型必須説明
unsIdinteger (int64)いいえNumeric UNS node ID.
topicstringいいえFull UNS topic path.
pageinteger (int64)いいえPage number, starting at 1.
sizeinteger (int64)いいえNumber of attachments per page.
includeFileUrlboolean (boolean)いいえWhether to return temporary file URLs. Defaults to true.
レスポンス
200400401403404409413500
成功レスポンスの例

200 · application/json

{
  "code": 0,
  "msg": "string",
  "data": {
    "unsId": 0,
    "list": [
      "value"
    ],
    "total": 0,
    "page": 0,
    "size": 0
  }
}
成功レスポンスのフィールド

200 · application/json

フィールド型必須説明
codeintegerいいえResponse code
msgstringいいえResponse message
dataobjectいいえUnsAttachmentListResp. スキーマの章で参照先のスキーマを確認してください。
レスポンスステータスの意味
ステータス意味メディアタイプ
200A successful response.application/json
400Correct the request parameters or Content-Type before retrying.application/json
401Authentication middleware returns plain-text unauthorized. Check API key validity, scope, and owner roles.text/plain
403Authentication middleware returns plain-text forbidden. Check API key validity, scope, and owner roles.text/plain
404Resource not found. Verify paths, IDs, and current resource state.—
409Resource state conflict. Verify paths, IDs, and current resource state.—
413Request too large. Reduce the request before retrying.—
500Service error. Investigate the service and confirm the outcome before retrying.—

POST/uns/browse

Browse the UNS tree

Returns a UNS subtree. Use an empty path for the workspace root.

リクエストボディ
curl --request POST 'https://<tier0-host>/openapi/v1/uns/browse' \
  --header 'x-api-key: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '{"path":"string","max_depth":0,"include_metadata":false,"include_leaf_value":false}'

application/json

フィールド型必須説明
pathstringいいえRoot UNS path. Empty means the workspace root.
max_depthinteger (int64)いいえMaximum tree depth. Omit or use 0 for the server default.
include_metadataboolean (boolean)いいえWhether returned nodes should include metadata.
include_leaf_valueboolean (boolean)いいえWhether returned leaf nodes should include their latest payload.
レスポンス
200400401403404409413500
成功レスポンスの例

200 · application/json

{
  "code": 0,
  "msg": "string",
  "data": {
    "tree": [
      "value"
    ]
  }
}
成功レスポンスのフィールド

200 · application/json

フィールド型必須説明
codeintegerいいえResponse code
msgstringいいえResponse message
dataobjectいいえBrowseResp. スキーマの章で参照先のスキーマを確認してください。
レスポンスステータスの意味
ステータス意味メディアタイプ
200A successful response.application/json
400Correct the request parameters or Content-Type before retrying.application/json
401Authentication middleware returns plain-text unauthorized. Check API key validity, scope, and owner roles.text/plain
403Authentication middleware returns plain-text forbidden. Check API key validity, scope, and owner roles.text/plain
404Resource not found. Verify paths, IDs, and current resource state.—
409Resource state conflict. Verify paths, IDs, and current resource state.—
413Request too large. Reduce the request before retrying.—
500Service error. Investigate the service and confirm the outcome before retrying.—

POST/uns/create

Create UNS nodes

Creates UNS nodes and nested subtrees. Check each item result and use the returned topic in subsequent calls.

リクエストボディ
curl --request POST 'https://<tier0-host>/openapi/v1/uns/create' \
  --header 'x-api-key: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '{"namespace":[{"name":"value","type":"value","children":"value","topicType":"value","fields":"value"}]}'

application/json

フィールド型必須説明
namespacearray<object>はいUNS nodes to create. Nest children to create a subtree.
レスポンス
200400401403404409413500
成功レスポンスの例

200 · application/json

{
  "code": 0,
  "msg": "string",
  "data": {
    "success": false,
    "results": [
      "value"
    ]
  }
}
成功レスポンスのフィールド

200 · application/json

フィールド型必須説明
codeintegerいいえResponse code
msgstringいいえResponse message
dataobjectいいえCreateResp. スキーマの章で参照先のスキーマを確認してください。
レスポンスステータスの意味
ステータス意味メディアタイプ
200A successful response.application/json
400Correct the request parameters or Content-Type before retrying.application/json
401Authentication middleware returns plain-text unauthorized. Check API key validity, scope, and owner roles.text/plain
403Authentication middleware returns plain-text forbidden. Check API key validity, scope, and owner roles.text/plain
404Resource not found. Verify paths, IDs, and current resource state.—
409Resource state conflict. Verify paths, IDs, and current resource state.—
413Request too large. Reduce the request before retrying.—
500Service error. Investigate the service and confirm the outcome before retrying.—

POST/uns/delete

Delete UNS nodes

Deletes the listed nodes sequentially. By default this is a soft delete; the batch is not rolled back when a later item fails.

リクエストボディ
curl --request POST 'https://<tier0-host>/openapi/v1/uns/delete' \
  --header 'x-api-key: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '{"topics":["string"],"hard_delete":false}'

application/json

フィールド型必須説明
topicsarray<string>はいUNS topic or path node paths to delete.
hard_deleteboolean (boolean)いいえPermanently delete instead of moving nodes to the recycle state.
レスポンス
200400401403404409413500
成功レスポンスの例

200 · application/json

{
  "code": 0,
  "msg": "string",
  "data": {
    "success": false
  }
}
成功レスポンスのフィールド

200 · application/json

フィールド型必須説明
codeintegerいいえResponse code
msgstringいいえResponse message
dataobjectいいえOpenapiEmptyResp. スキーマの章で参照先のスキーマを確認してください。
レスポンスステータスの意味
ステータス意味メディアタイプ
200A successful response.application/json
400Correct the request parameters or Content-Type before retrying.application/json
401Authentication middleware returns plain-text unauthorized. Check API key validity, scope, and owner roles.text/plain
403Authentication middleware returns plain-text forbidden. Check API key validity, scope, and owner roles.text/plain
404Resource not found. Verify paths, IDs, and current resource state.—
409Resource state conflict. Verify paths, IDs, and current resource state.—
413Request too large. Reduce the request before retrying.—
500Service error. Investigate the service and confirm the outcome before retrying.—

POST/uns/history

Query UNS history

Queries historical topic values over an inclusive RFC 3339 time range. Results can be aggregated or sampled.

リクエストボディ
curl --request POST 'https://<tier0-host>/openapi/v1/uns/history' \
  --header 'x-api-key: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '{"topics":["string"],"start_time":"string","end_time":"string","aggregation":{"interval":"string","function":"string","field":"string","fields":["value"]},"page":0}'

application/json

フィールド型必須説明
topicsarray<string>はいUNS topic paths whose history should be queried.
start_timestringはいInclusive query start in RFC 3339 format.
end_timestringはいInclusive query end in RFC 3339 format.
aggregationobjectいいえHistoryAggregation. スキーマの章で参照先のスキーマを確認してください。
pageinteger (int64)いいえPage number, starting from 1.
sizeinteger (int64)いいえPage size; values above the server maximum are capped.
レスポンス
200400401403404409413500
成功レスポンスの例

200 · application/json

{
  "code": 0,
  "msg": "string",
  "data": {
    "success": false,
    "results": [
      "value"
    ],
    "page": 0,
    "size": 0,
    "total": 0
  }
}
成功レスポンスのフィールド

200 · application/json

フィールド型必須説明
codeintegerいいえResponse code
msgstringいいえResponse message
dataobjectいいえHistoryResp. スキーマの章で参照先のスキーマを確認してください。
レスポンスステータスの意味
ステータス意味メディアタイプ
200A successful response.application/json
400Correct the request parameters or Content-Type before retrying.application/json
401Authentication middleware returns plain-text unauthorized. Check API key validity, scope, and owner roles.text/plain
403Authentication middleware returns plain-text forbidden. Check API key validity, scope, and owner roles.text/plain
404Resource not found. Verify paths, IDs, and current resource state.—
409Resource state conflict. Verify paths, IDs, and current resource state.—
413Request too large. Reduce the request before retrying.—
500Service error. Investigate the service and confirm the outcome before retrying.—

POST/uns/read

Read UNS values

Returns value, quality, and timeStamp (VQT) for each requested topic. A failed topic does not discard successful items in the same batch.

リクエストボディ
curl --request POST 'https://<tier0-host>/openapi/v1/uns/read' \
  --header 'x-api-key: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '{"topics":["string"],"include_metadata":false,"include_leaf_value":false}'

application/json

フィールド型必須説明
topicsarray<string>はいUNS topic paths to read.
include_metadataboolean (boolean)いいえWhether each result should include UNS node metadata.
include_leaf_valueboolean (boolean)いいえWhether leaf nodes should include their latest payload.
レスポンス
200400401403404409413500
成功レスポンスの例

200 · application/json

{
  "code": 0,
  "msg": "string",
  "data": {
    "success": false,
    "results": [
      "value"
    ]
  }
}
成功レスポンスのフィールド

200 · application/json

フィールド型必須説明
codeintegerいいえResponse code
msgstringいいえResponse message
dataobjectいいえReadResp. スキーマの章で参照先のスキーマを確認してください。
レスポンスステータスの意味
ステータス意味メディアタイプ
200A successful response.application/json
400Correct the request parameters or Content-Type before retrying.application/json
401Authentication middleware returns plain-text unauthorized. Check API key validity, scope, and owner roles.text/plain
403Authentication middleware returns plain-text forbidden. Check API key validity, scope, and owner roles.text/plain
404Resource not found. Verify paths, IDs, and current resource state.—
409Resource state conflict. Verify paths, IDs, and current resource state.—
413Request too large. Reduce the request before retrying.—
500Service error. Investigate the service and confirm the outcome before retrying.—

POST/uns/restore

Restore a deleted UNS node

Restores a soft-deleted UNS node. Permanently deleted nodes cannot be restored.

リクエストボディ
curl --request POST 'https://<tier0-host>/openapi/v1/uns/restore' \
  --header 'x-api-key: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '{"path":"string"}'

application/json

フィールド型必須説明
pathstringはいFull UNS path of the node to restore. Use its path before deletion, not a node ID or HTTP URL.
レスポンス
200400401403404409413500
成功レスポンスの例

200 · application/json

{
  "code": 0,
  "msg": "string",
  "data": {
    "success": false
  }
}
成功レスポンスのフィールド

200 · application/json

フィールド型必須説明
codeintegerいいえResponse code
msgstringいいえResponse message
dataobjectいいえOpenapiEmptyResp. スキーマの章で参照先のスキーマを確認してください。
レスポンスステータスの意味
ステータス意味メディアタイプ
200A successful response.application/json
400Correct the request parameters or Content-Type before retrying.application/json
401Authentication middleware returns plain-text unauthorized. Check API key validity, scope, and owner roles.text/plain
403Authentication middleware returns plain-text forbidden. Check API key validity, scope, and owner roles.text/plain
404Resource not found. Verify paths, IDs, and current resource state.—
409Resource state conflict. Verify paths, IDs, and current resource state.—
413Request too large. Reduce the request before retrying.—
500Service error. Investigate the service and confirm the outcome before retrying.—

POST/uns/search

Search UNS nodes

Searches UNS node names, aliases, and paths, with optional type and path filters.

リクエストボディ
curl --request POST 'https://<tier0-host>/openapi/v1/uns/search' \
  --header 'x-api-key: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '{"keyword":"string","topicType":"string","path_prefix":"string","include_metadata":false,"include_leaf_value":false}'

application/json

フィールド型必須説明
keywordstringいいえKeyword matched against UNS node names, aliases, and paths.
topicTypestringいいえTopic data category filter: STATE, ACTION, or METRIC.
path_prefixstringいいえOnly return nodes under this UNS path prefix.
include_metadataboolean (boolean)いいえWhether returned nodes should include metadata.
include_leaf_valueboolean (boolean)いいえWhether returned leaf nodes should include their latest payload.
pageinteger (int64)いいえPage number, starting from 1.
sizeinteger (int64)いいえPage size.
レスポンス
200400401403404409413500
成功レスポンスの例

200 · application/json

{
  "code": 0,
  "msg": "string",
  "data": {
    "objects": [
      "value"
    ],
    "page": 0,
    "size": 0,
    "total": 0
  }
}
成功レスポンスのフィールド

200 · application/json

フィールド型必須説明
codeintegerいいえResponse code
msgstringいいえResponse message
dataobjectいいえSearchResp. スキーマの章で参照先のスキーマを確認してください。
レスポンスステータスの意味
ステータス意味メディアタイプ
200A successful response.application/json
400Correct the request parameters or Content-Type before retrying.application/json
401Authentication middleware returns plain-text unauthorized. Check API key validity, scope, and owner roles.text/plain
403Authentication middleware returns plain-text forbidden. Check API key validity, scope, and owner roles.text/plain
404Resource not found. Verify paths, IDs, and current resource state.—
409Resource state conflict. Verify paths, IDs, and current resource state.—
413Request too large. Reduce the request before retrying.—
500Service error. Investigate the service and confirm the outcome before retrying.—

POST/uns/unsBindFlow

Bind a flow to a UNS node

Binds a flow ID to a UNS node ID.

リクエストボディ
curl --request POST 'https://<tier0-host>/openapi/v1/uns/unsBindFlow' \
  --header 'x-api-key: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '{"unsId":0,"flowId":0}'

application/json

フィールド型必須説明
unsIdinteger (int64)はいUNS node ID to bind.
flowIdinteger (int64)はいFlow ID to bind.
レスポンス
200400401403404409413500
成功レスポンスの例

200 · application/json

{
  "code": 0,
  "msg": "string",
  "data": {
    "success": false,
    "unsId": 0,
    "flowId": 0
  }
}
成功レスポンスのフィールド

200 · application/json

フィールド型必須説明
codeintegerいいえResponse code
msgstringいいえResponse message
dataobjectいいえUnsBindFlowResp. スキーマの章で参照先のスキーマを確認してください。
レスポンスステータスの意味
ステータス意味メディアタイプ
200A successful response.application/json
400Correct the request parameters or Content-Type before retrying.application/json
401Authentication middleware returns plain-text unauthorized. Check API key validity, scope, and owner roles.text/plain
403Authentication middleware returns plain-text forbidden. Check API key validity, scope, and owner roles.text/plain
404Resource not found. Verify paths, IDs, and current resource state.—
409Resource state conflict. Verify paths, IDs, and current resource state.—
413Request too large. Reduce the request before retrying.—
500Service error. Investigate the service and confirm the outcome before retrying.—

POST/uns/update

Update a UNS node

Updates an existing UNS node. Empty strings, an empty fields array, and an empty extendProperties object retain existing values.

リクエストボディ
curl --request POST 'https://<tier0-host>/openapi/v1/uns/update' \
  --header 'x-api-key: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '{"path":"string","name":"string","description":"string","displayName":"string","extendProperties":{}}'

application/json

フィールド型必須説明
pathstringはいExisting UNS topic or path node to update.
namestringいいえNew node name.
descriptionstringいいえUpdated node description.
displayNamestringいいえUpdated display name.
extendPropertiesobjectいいえUpdated custom metadata key-value pairs.
fieldsarray<object>いいえUpdated payload schema fields.
aliasstringいいえUpdated topic alias.
enableHistoryboolean (boolean)いいえSupply true or false to change history storage. Omit to keep the existing setting.
updateMaskarray<string>いいえCompatibility field ignored by the current Enterprise implementation. It cannot be used to clear fields.
レスポンス
200400401403404409413500
成功レスポンスの例

200 · application/json

{
  "code": 0,
  "msg": "string",
  "data": {
    "success": false
  }
}
成功レスポンスのフィールド

200 · application/json

フィールド型必須説明
codeintegerいいえResponse code
msgstringいいえResponse message
dataobjectいいえOpenapiEmptyResp. スキーマの章で参照先のスキーマを確認してください。
レスポンスステータスの意味
ステータス意味メディアタイプ
200A successful response.application/json
400Correct the request parameters or Content-Type before retrying.application/json
401Authentication middleware returns plain-text unauthorized. Check API key validity, scope, and owner roles.text/plain
403Authentication middleware returns plain-text forbidden. Check API key validity, scope, and owner roles.text/plain
404Resource not found. Verify paths, IDs, and current resource state.—
409Resource state conflict. Verify paths, IDs, and current resource state.—
413Request too large. Reduce the request before retrying.—
500Service error. Investigate the service and confirm the outcome before retrying.—

POST/uns/write

Write UNS values

Writes values to existing TOPIC nodes; wildcards are not supported. `value` must match the node payload schema. **Batch results:** check each `data.results` item, not only HTTP 200. **Retry:** confirm the outcome before retrying a write.

リクエストボディ
curl --request POST 'https://<tier0-host>/openapi/v1/uns/write' \
  --header 'x-api-key: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '{"writes":[{"topic":"value","value":"value","timeStamp":"value"}],"qos":0,"retain":false}'

application/json

フィールド型必須説明
writesarray<object>はいWrite operations to apply.
qosinteger (int64)いいえMQTT QoS: 0, 1, or 2.
retainboolean (boolean)いいえWhether the MQTT message should be retained.
レスポンス
200400401403404409413500
成功レスポンスの例

200 · application/json

{
  "code": 0,
  "msg": "string",
  "data": {
    "success": false,
    "results": [
      "value"
    ]
  }
}
成功レスポンスのフィールド

200 · application/json

フィールド型必須説明
codeintegerいいえResponse code
msgstringいいえResponse message
dataobjectいいえWriteResp. スキーマの章で参照先のスキーマを確認してください。
レスポンスステータスの意味
ステータス意味メディアタイプ
200Inspect the success flag of each `data.results` item. HTTP 200 alone does not confirm that every write succeeded.application/json
400Correct the request parameters or Content-Type before retrying.application/json
401Authentication middleware returns plain-text unauthorized. Check API key validity, scope, and owner roles.text/plain
403Authentication middleware returns plain-text forbidden. Check API key validity, scope, and owner roles.text/plain
404Resource not found. Verify paths, IDs, and current resource state.—
409Resource state conflict. Verify paths, IDs, and current resource state.—
413Request too large. Reduce the request before retrying.—
500Service error. Investigate the service and confirm the outcome before retrying.—

ファイルリソース

保存されたファイルのアップロード、ダウンロード、管理。

POST/assets/files

Create a direct-upload form

Issues an object-store upload form; it does not transfer file contents. Submit every returned post field unchanged with the file.

リクエストボディ
curl --request POST 'https://<tier0-host>/openapi/v1/assets/files' \
  --header 'x-api-key: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '{"fileName":"string","contentType":"string","size":0,"business":"string","useBy":"string"}'

application/json

フィールド型必須説明
fileNamestringはいOriginal file name.
contentTypestringいいえMIME content type.
sizeinteger (int64)はいFile size in bytes. Business validation requires a value greater than 0 and at most 1 GiB.
businessstringいいえBusiness domain or feature associated with the file.
useBystringいいえOptional usage category: user, workspace, or platform.
visibilitystringいいえFile visibility, such as private or public.
appInstanceIdstringいいえAssociated application instance ID.
sessionIdstringいいえCaller session ID.
レスポンス
200400401403404409413500
成功レスポンスの例

200 · application/json

{
  "code": 0,
  "data": {
    "fileId": 0,
    "filePath": "string",
    "fileUrl": "string",
    "uploadUrl": "string",
    "expiresAt": 0
  },
  "msg": "string"
}
成功レスポンスのフィールド

200 · application/json

フィールド型必須説明
codeintegerいいえResponse code
dataobjectいいえAssetFileUploadResp. スキーマの章で参照先のスキーマを確認してください。
msgstringいいえResponse message
レスポンスステータスの意味
ステータス意味メディアタイプ
200A successful response.application/json
400Correct the request parameters or Content-Type before retrying.application/json
401Authentication middleware returns plain-text unauthorized. Check API key validity, scope, and owner roles.text/plain
403Authentication middleware returns plain-text forbidden. Check API key validity, scope, and owner roles.text/plain
404Resource not found. Verify paths, IDs, and current resource state.—
409Resource state conflict. Verify paths, IDs, and current resource state.—
413Request too large. Reduce the request before retrying.—
500Service error. Investigate the service and confirm the outcome before retrying.—

POST/assets/files/delete

Delete a file

Deletes a file identified by its server-issued storage path.

リクエストボディ
curl --request POST 'https://<tier0-host>/openapi/v1/assets/files/delete' \
  --header 'x-api-key: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '{"filePath":"string"}'

application/json

フィールド型必須説明
filePathstringはいServer-issued storage path returned by an upload API.
レスポンス
200400401403404409413500
成功レスポンスの例

200 · application/json

{
  "code": 0,
  "data": {
    "deleted": false
  },
  "msg": "string"
}
成功レスポンスのフィールド

200 · application/json

フィールド型必須説明
codeintegerいいえResponse code
dataobjectいいえAssetFileDeleteResp. スキーマの章で参照先のスキーマを確認してください。
msgstringいいえResponse message
レスポンスステータスの意味
ステータス意味メディアタイプ
200A successful response.application/json
400Correct the request parameters or Content-Type before retrying.application/json
401Authentication middleware returns plain-text unauthorized. Check API key validity, scope, and owner roles.text/plain
403Authentication middleware returns plain-text forbidden. Check API key validity, scope, and owner roles.text/plain
404Resource not found. Verify paths, IDs, and current resource state.—
409Resource state conflict. Verify paths, IDs, and current resource state.—
413Request too large. Reduce the request before retrying.—
500Service error. Investigate the service and confirm the outcome before retrying.—

GET/assets/files/download

Download a private file

Returns file bytes directly. Do not forward x-api-key or other credentials when a client follows a redirect to a cross-origin storage URL.

リクエストパラメーター
名前場所型必須説明
filePathquerystringはいServer-issued storage path returned by an upload API.
responseContentDispositionquerystringいいえOptional Content-Disposition value for the download response.
レスポンス
302400401403404409413500
レスポンスステータスの意味
ステータス意味メディアタイプ
302Redirect to the final download URL.—
400Correct the request parameters or Content-Type before retrying.application/json
401Authentication middleware returns plain-text unauthorized. Check API key validity, scope, and owner roles.text/plain
403Authentication middleware returns plain-text forbidden. Check API key validity, scope, and owner roles.text/plain
404Resource not found. Verify paths, IDs, and current resource state.—
409Resource state conflict. Verify paths, IDs, and current resource state.—
413Request too large. Reduce the request before retrying.—
500Service error. Investigate the service and confirm the outcome before retrying.—

POST/assets/files/multipart/abort

Abort a multipart upload

Cancels a multipart upload session.

リクエストボディ
curl --request POST 'https://<tier0-host>/openapi/v1/assets/files/multipart/abort' \
  --header 'x-api-key: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '{"fileKey":"string","uploadId":"string"}'

application/json

フィールド型必須説明
fileKeystringはいObject-store key used for the multipart upload.
uploadIdstringはいObject-store multipart upload session ID.
レスポンス
200400401403404409413500
成功レスポンスの例

200 · application/json

{
  "code": 0,
  "data": {
    "aborted": 1
  },
  "msg": "string"
}
成功レスポンスのフィールド

200 · application/json

フィールド型必須説明
codeintegerいいえResponse code
dataobjectいいえAssetFileMultipartAbortResp. スキーマの章で参照先のスキーマを確認してください。
msgstringいいえResponse message
レスポンスステータスの意味
ステータス意味メディアタイプ
200A successful response.application/json
400Correct the request parameters or Content-Type before retrying.application/json
401Authentication middleware returns plain-text unauthorized. Check API key validity, scope, and owner roles.text/plain
403Authentication middleware returns plain-text forbidden. Check API key validity, scope, and owner roles.text/plain
404Resource not found. Verify paths, IDs, and current resource state.—
409Resource state conflict. Verify paths, IDs, and current resource state.—
413Request too large. Reduce the request before retrying.—
500Service error. Investigate the service and confirm the outcome before retrying.—

POST/assets/files/multipart/complete

Complete a multipart upload

Completes a multipart upload after every uploaded part number and ETag have been supplied.

リクエストボディ
curl --request POST 'https://<tier0-host>/openapi/v1/assets/files/multipart/complete' \
  --header 'x-api-key: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '{"fileKey":"string","uploadId":"string","parts":[{"partNumber":"value","etag":"value"}]}'

application/json

フィールド型必須説明
fileKeystringはいObject-store key used for the multipart upload.
uploadIdstringはいObject-store multipart upload session ID.
partsarray<object>はいUploaded part numbers and their ETags.
レスポンス
200400401403404409413500
成功レスポンスの例

200 · application/json

{
  "code": 0,
  "data": {
    "filePath": "string",
    "fileUrl": "string",
    "sizeBytes": 0,
    "expiresAt": 0
  },
  "msg": "string"
}
成功レスポンスのフィールド

200 · application/json

フィールド型必須説明
codeintegerいいえResponse code
dataobjectいいえAssetFileMultipartCompleteResp. スキーマの章で参照先のスキーマを確認してください。
msgstringいいえResponse message
レスポンスステータスの意味
ステータス意味メディアタイプ
200A successful response.application/json
400Correct the request parameters or Content-Type before retrying.application/json
401Authentication middleware returns plain-text unauthorized. Check API key validity, scope, and owner roles.text/plain
403Authentication middleware returns plain-text forbidden. Check API key validity, scope, and owner roles.text/plain
404Resource not found. Verify paths, IDs, and current resource state.—
409Resource state conflict. Verify paths, IDs, and current resource state.—
413Request too large. Reduce the request before retrying.—
500Service error. Investigate the service and confirm the outcome before retrying.—

POST/assets/files/multipart/init

Initialize a multipart upload

Creates a multipart upload session and returns its ID, part size, and part count.

リクエストボディ
curl --request POST 'https://<tier0-host>/openapi/v1/assets/files/multipart/init' \
  --header 'x-api-key: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '{"fileName":"string","contentType":"string","size":0,"partSize":0,"business":"string"}'

application/json

フィールド型必須説明
fileNamestringはいOriginal file name.
contentTypestringいいえFile MIME type, for example application/octet-stream.
sizeinteger (int64)はいTotal file size in bytes, greater than 0 and at most 1 GiB.
partSizeinteger (int64)いいえPreferred part size in bytes. The server may normalize it.
businessstringいいえBusiness domain or feature associated with the file.
useBystringいいえOptional usage category: user, workspace, or platform.
visibilitystringいいえFile visibility: private or public.
appInstanceIdstringいいえAssociated application instance ID.
sessionIdstringいいえCaller session ID.
bizIdstringいいえAssociated business identifier.
レスポンス
200400401403404409413500
成功レスポンスの例

200 · application/json

{
  "code": 0,
  "data": {
    "fileKey": "string",
    "filePath": "string",
    "uploadId": "string",
    "partSize": 0,
    "partCount": 0
  },
  "msg": "string"
}
成功レスポンスのフィールド

200 · application/json

フィールド型必須説明
codeintegerいいえResponse code
dataobjectいいえAssetFileMultipartInitResp. スキーマの章で参照先のスキーマを確認してください。
msgstringいいえResponse message
レスポンスステータスの意味
ステータス意味メディアタイプ
200A successful response.application/json
400Correct the request parameters or Content-Type before retrying.application/json
401Authentication middleware returns plain-text unauthorized. Check API key validity, scope, and owner roles.text/plain
403Authentication middleware returns plain-text forbidden. Check API key validity, scope, and owner roles.text/plain
404Resource not found. Verify paths, IDs, and current resource state.—
409Resource state conflict. Verify paths, IDs, and current resource state.—
413Request too large. Reduce the request before retrying.—
500Service error. Investigate the service and confirm the outcome before retrying.—

POST/assets/files/multipart/part-urls

Create multipart upload URLs

Returns presigned PUT URLs for the requested one-based part numbers.

リクエストボディ
curl --request POST 'https://<tier0-host>/openapi/v1/assets/files/multipart/part-urls' \
  --header 'x-api-key: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '{"fileKey":"string","uploadId":"string","partNumbers":[0]}'

application/json

フィールド型必須説明
fileKeystringはいObject-store key used for the multipart upload.
uploadIdstringはいObject-store multipart upload session ID.
partNumbersarray<integer (int32)>はいOne-based part numbers to sign.
レスポンス
200400401403404409413500
成功レスポンスの例

200 · application/json

{
  "code": 0,
  "data": {
    "partUrls": [
      "value"
    ]
  },
  "msg": "string"
}
成功レスポンスのフィールド

200 · application/json

フィールド型必須説明
codeintegerいいえResponse code
dataobjectいいえAssetFileMultipartPartUrlsResp. スキーマの章で参照先のスキーマを確認してください。
msgstringいいえResponse message
レスポンスステータスの意味
ステータス意味メディアタイプ
200A successful response.application/json
400Correct the request parameters or Content-Type before retrying.application/json
401Authentication middleware returns plain-text unauthorized. Check API key validity, scope, and owner roles.text/plain
403Authentication middleware returns plain-text forbidden. Check API key validity, scope, and owner roles.text/plain
404Resource not found. Verify paths, IDs, and current resource state.—
409Resource state conflict. Verify paths, IDs, and current resource state.—
413Request too large. Reduce the request before retrying.—
500Service error. Investigate the service and confirm the outcome before retrying.—

GET/assets/files/public

Download a public file

Downloads bytes for a file explicitly marked public. An unguessable path is not authorization; do not mark sensitive files public.

リクエストパラメーター
名前場所型必須説明
filePathquerystringはいServer-issued storage path returned by an upload API.
responseContentDispositionquerystringいいえOptional Content-Disposition value for the download response.
レスポンス
200400404409413500
レスポンスステータスの意味
ステータス意味メディアタイプ
200Returns file bytes directly. Content-Type depends on the file type; no JSON envelope is used.—
400Correct the request parameters or Content-Type before retrying.application/json
404Resource not found. Verify paths, IDs, and current resource state.—
409Resource state conflict. Verify paths, IDs, and current resource state.—
413Request too large. Reduce the request before retrying.—
500Service error. Investigate the service and confirm the outcome before retrying.—

GET/assets/files/url

Create a temporary file URL

Creates a temporary URL for a file.

リクエストパラメーター
名前場所型必須説明
filePathquerystringはいServer-issued storage path returned by an upload API.
expiredSecqueryinteger (int64)いいえRequested temporary URL lifetime in seconds.
レスポンス
200400401403404409413500
成功レスポンスの例

200 · application/json

{
  "code": 0,
  "data": {
    "fileUrl": "string",
    "expiresAt": 0
  },
  "msg": "string"
}
成功レスポンスのフィールド

200 · application/json

フィールド型必須説明
codeintegerいいえResponse code
dataobjectいいえAssetFileUrlResp. スキーマの章で参照先のスキーマを確認してください。
msgstringいいえResponse message
レスポンスステータスの意味
ステータス意味メディアタイプ
200A successful response.application/json
400Correct the request parameters or Content-Type before retrying.application/json
401Authentication middleware returns plain-text unauthorized. Check API key validity, scope, and owner roles.text/plain
403Authentication middleware returns plain-text forbidden. Check API key validity, scope, and owner roles.text/plain
404Resource not found. Verify paths, IDs, and current resource state.—
409Resource state conflict. Verify paths, IDs, and current resource state.—
413Request too large. Reduce the request before retrying.—
500Service error. Investigate the service and confirm the outcome before retrying.—

POST/assets/upload

Create a legacy asset upload URL

Legacy compatibility endpoint. The current Enterprise implementation returns an empty uploadUrl; use /assets/files for new integrations.

リクエストボディ
curl --request POST 'https://<tier0-host>/openapi/v1/assets/upload' \
  --header 'x-api-key: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '{"fileName":"string","sizeBytes":0,"contentType":"string","size":0,"sha256":"string"}'

application/json

フィールド型必須説明
fileNamestringはいOriginal file name.
sizeBytesinteger (int64)はいFile size in bytes.
contentTypestringいいえFile MIME type, for example application/octet-stream.
sizeinteger (int64)いいえFile size in bytes.
sha256stringいいえOptional SHA-256 checksum of the file content.
storageKeystringいいえOptional object-store key. Omit it to let the server generate one.
isPublicboolean (boolean)いいえWhether the file should be accessible through the public download endpoint.
businessstringいいえBusiness domain or feature that owns the uploaded file.
useBystringいいえUsage scenario or owner category for the uploaded file.
レスポンス
200400401403404409413500
成功レスポンスの例

200 · application/json

{
  "code": 0,
  "msg": "string",
  "data": {
    "uploadUrl": "string",
    "filePath": "string",
    "fileUrl": "string"
  }
}
成功レスポンスのフィールド

200 · application/json

フィールド型必須説明
codeintegerいいえResponse code
msgstringいいえResponse message
dataobjectいいえAssetUploadResp. スキーマの章で参照先のスキーマを確認してください。
レスポンスステータスの意味
ステータス意味メディアタイプ
200Legacy upload response. The current Enterprise implementation returns an empty uploadUrl; use /assets/files for new integrations.application/json
400Correct the request parameters or Content-Type before retrying.application/json
401Authentication middleware returns plain-text unauthorized. Check API key validity, scope, and owner roles.text/plain
403Authentication middleware returns plain-text forbidden. Check API key validity, scope, and owner roles.text/plain
404Resource not found. Verify paths, IDs, and current resource state.—
409Resource state conflict. Verify paths, IDs, and current resource state.—
413Request too large. Reduce the request before retrying.—
500Service error. Investigate the service and confirm the outcome before retrying.—

認証

現在の OpenAPI の ID と権限の確認。

POST/auth/whoami

Inspect the current API key identity

Returns the current API-key identity and its effective permissions. Call this before integration work to verify access.

レスポンス
200400401403404409413500
成功レスポンスの例

200 · application/json

{
  "code": 0,
  "data": {
    "userID": 0,
    "userName": "string",
    "email": "string",
    "workspaceID": 0,
    "workspaceName": "string"
  },
  "msg": "string"
}
成功レスポンスのフィールド

200 · application/json

フィールド型必須説明
codeintegerいいえResponse code
dataobjectいいえAuthWhoamiResp. スキーマの章で参照先のスキーマを確認してください。
msgstringいいえResponse message
レスポンスステータスの意味
ステータス意味メディアタイプ
200A successful response.application/json
400Correct the request parameters or Content-Type before retrying.application/json
401Authentication middleware returns plain-text unauthorized. Check API key validity, scope, and owner roles.text/plain
403Authentication middleware returns plain-text forbidden. Check API key validity, scope, and owner roles.text/plain
404Resource not found. Verify paths, IDs, and current resource state.—
409Resource state conflict. Verify paths, IDs, and current resource state.—
413Request too large. Reduce the request before retrying.—
500Service error. Investigate the service and confirm the outcome before retrying.—

Flow

Source Flow と Event Flow の定義の管理。

POST/flow/create

Create a flow

Creates a SourceFlow or EventFlow and returns its numeric resource ID.

リクエストボディ
curl --request POST 'https://<tier0-host>/openapi/v1/flow/create' \
  --header 'x-api-key: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '{"flowName":"string","flowType":"string","description":"string","template":"string"}'

application/json

フィールド型必須説明
flowNamestringはいFlow name, up to 63 Unicode characters.
flowTypestringはいFlow category: SourceFlow or EventFlow.
descriptionstringいいえFlow description.
templatestringいいえOptional flow template JSON.
レスポンス
200400401403404409413500
成功レスポンスの例

200 · application/json

{
  "code": 0,
  "data": {
    "id": 0,
    "brokerID": "string"
  },
  "msg": "string"
}
成功レスポンスのフィールド

200 · application/json

フィールド型必須説明
codeintegerいいえResponse code
dataobjectいいえFlowCreateResp. スキーマの章で参照先のスキーマを確認してください。
msgstringいいえResponse message
レスポンスステータスの意味
ステータス意味メディアタイプ
200A successful response.application/json
400Correct the request parameters or Content-Type before retrying.application/json
401Authentication middleware returns plain-text unauthorized. Check API key validity, scope, and owner roles.text/plain
403Authentication middleware returns plain-text forbidden. Check API key validity, scope, and owner roles.text/plain
404Resource not found. Verify paths, IDs, and current resource state.—
409Resource state conflict. Verify paths, IDs, and current resource state.—
413Request too large. Reduce the request before retrying.—
500Service error. Investigate the service and confirm the outcome before retrying.—

POST/flow/delete

Delete flows

Deletes the listed flows sequentially; earlier deletions are not rolled back when a later item fails.

リクエストボディ
curl --request POST 'https://<tier0-host>/openapi/v1/flow/delete' \
  --header 'x-api-key: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '{"ids":[0]}'

application/json

フィールド型必須説明
idsarray<integer (int64)>はいFlow IDs to delete.
レスポンス
200400401403404409413500
成功レスポンスの例

200 · application/json

{
  "code": 0,
  "data": {
    "success": false
  },
  "msg": "string"
}
成功レスポンスのフィールド

200 · application/json

フィールド型必須説明
codeintegerいいえResponse code
dataobjectいいえFlowEmptyResp. スキーマの章で参照先のスキーマを確認してください。
msgstringいいえResponse message
レスポンスステータスの意味
ステータス意味メディアタイプ
200A successful response.application/json
400Correct the request parameters or Content-Type before retrying.application/json
401Authentication middleware returns plain-text unauthorized. Check API key validity, scope, and owner roles.text/plain
403Authentication middleware returns plain-text forbidden. Check API key validity, scope, and owner roles.text/plain
404Resource not found. Verify paths, IDs, and current resource state.—
409Resource state conflict. Verify paths, IDs, and current resource state.—
413Request too large. Reduce the request before retrying.—
500Service error. Investigate the service and confirm the outcome before retrying.—

POST/flow/deploy

Deploy a flow

Deploys a complete Node-RED canvas JSON string to a flow.

リクエストボディ
curl --request POST 'https://<tier0-host>/openapi/v1/flow/deploy' \
  --header 'x-api-key: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '{"id":0,"flowsJson":"string"}'

application/json

フィールド型必須説明
idinteger (int64)はいFlow ID to deploy.
flowsJsonstringはいNode-RED canvas JSON to deploy.
レスポンス
200400401403404409413500
成功レスポンスの例

200 · application/json

{
  "code": 0,
  "data": {
    "flowId": "string"
  },
  "msg": "string"
}
成功レスポンスのフィールド

200 · application/json

フィールド型必須説明
codeintegerいいえResponse code
dataobjectいいえFlowDeployResp. スキーマの章で参照先のスキーマを確認してください。
msgstringいいえResponse message
レスポンスステータスの意味
ステータス意味メディアタイプ
200A successful response.application/json
400Correct the request parameters or Content-Type before retrying.application/json
401Authentication middleware returns plain-text unauthorized. Check API key validity, scope, and owner roles.text/plain
403Authentication middleware returns plain-text forbidden. Check API key validity, scope, and owner roles.text/plain
404Resource not found. Verify paths, IDs, and current resource state.—
409Resource state conflict. Verify paths, IDs, and current resource state.—
413Request too large. Reduce the request before retrying.—
500Service error. Investigate the service and confirm the outcome before retrying.—

POST/flow/flowdata

Get flow canvas data

Returns the Node-RED canvas revision and node objects for a flow.

リクエストボディ
curl --request POST 'https://<tier0-host>/openapi/v1/flow/flowdata' \
  --header 'x-api-key: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '{"id":0}'

application/json

フィールド型必須説明
idinteger (int64)はいFlow ID.
レスポンス
200400401403404409413500
成功レスポンスの例

200 · application/json

{
  "code": 0,
  "data": {
    "rev": "string",
    "flows": [
      "value"
    ]
  },
  "msg": "string"
}
成功レスポンスのフィールド

200 · application/json

フィールド型必須説明
codeintegerいいえResponse code
dataobjectいいえFlowDataResp. スキーマの章で参照先のスキーマを確認してください。
msgstringいいえResponse message
レスポンスステータスの意味
ステータス意味メディアタイプ
200A successful response.application/json
400Correct the request parameters or Content-Type before retrying.application/json
401Authentication middleware returns plain-text unauthorized. Check API key validity, scope, and owner roles.text/plain
403Authentication middleware returns plain-text forbidden. Check API key validity, scope, and owner roles.text/plain
404Resource not found. Verify paths, IDs, and current resource state.—
409Resource state conflict. Verify paths, IDs, and current resource state.—
413Request too large. Reduce the request before retrying.—
500Service error. Investigate the service and confirm the outcome before retrying.—

POST/flow/get

Get a flow

Returns flow metadata for a numeric flow ID.

リクエストボディ
curl --request POST 'https://<tier0-host>/openapi/v1/flow/get' \
  --header 'x-api-key: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '{"id":0}'

application/json

フィールド型必須説明
idinteger (int64)はいFlow ID.
レスポンス
200400401403404409413500
成功レスポンスの例

200 · application/json

{
  "code": 0,
  "data": {
    "id": 0,
    "flowId": "string",
    "flowName": "string",
    "flowType": "string",
    "flowStatus": "string"
  },
  "msg": "string"
}
成功レスポンスのフィールド

200 · application/json

フィールド型必須説明
codeintegerいいえResponse code
dataobjectいいえFlowInfo. スキーマの章で参照先のスキーマを確認してください。
msgstringいいえResponse message
レスポンスステータスの意味
ステータス意味メディアタイプ
200A successful response.application/json
400Correct the request parameters or Content-Type before retrying.application/json
401Authentication middleware returns plain-text unauthorized. Check API key validity, scope, and owner roles.text/plain
403Authentication middleware returns plain-text forbidden. Check API key validity, scope, and owner roles.text/plain
404Resource not found. Verify paths, IDs, and current resource state.—
409Resource state conflict. Verify paths, IDs, and current resource state.—
413Request too large. Reduce the request before retrying.—
500Service error. Investigate the service and confirm the outcome before retrying.—

POST/flow/list

List flows

Lists flows, optionally filtered by a keyword or flow category.

リクエストボディ
curl --request POST 'https://<tier0-host>/openapi/v1/flow/list' \
  --header 'x-api-key: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '{"keyword":"string","flowType":"string"}'

application/json

フィールド型必須説明
keywordstringいいえKeyword matched against flow names and descriptions.
flowTypestringいいえFlow category filter: SourceFlow or EventFlow.
レスポンス
200400401403404409413500
成功レスポンスの例

200 · application/json

{
  "code": 200,
  "msg": "success",
  "data": {
    "list": [
      {
        "id": 101,
        "flowId": "flow-101",
        "flowName": "Line 1 collector",
        "flowType": "source",
        "flowStatus": "draft",
        "template": "[]",
        "description": "Collects line telemetry",
        "isFavorite": 2,
        "currentVersionId": 0,
        "currentVersionName": "",
        "currentVersionType": "",
        "createdTime": 1788134400000,
        "updatedTime": 1788134400000
      }
    ]
  }
}
成功レスポンスのフィールド

200 · application/json

フィールド型必須説明
codeintegerいいえResponse code
dataobjectいいえFlowListResp. スキーマの章で参照先のスキーマを確認してください。
msgstringいいえResponse message
レスポンスステータスの意味
ステータス意味メディアタイプ
200A successful response.application/json
400Correct the request parameters or Content-Type before retrying.application/json
401Authentication middleware returns plain-text unauthorized. Check API key validity, scope, and owner roles.text/plain
403Authentication middleware returns plain-text forbidden. Check API key validity, scope, and owner roles.text/plain
404Resource not found. Verify paths, IDs, and current resource state.—
409Resource state conflict. Verify paths, IDs, and current resource state.—
413Request too large. Reduce the request before retrying.—
500Service error. Investigate the service and confirm the outcome before retrying.—

POST/flow/nodes

List available flow node types

Returns the Node-RED node sets available for a flow category.

リクエストボディ
curl --request POST 'https://<tier0-host>/openapi/v1/flow/nodes' \
  --header 'x-api-key: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '{"flowType":"string"}'

application/json

フィールド型必須説明
flowTypestringはいFlow category whose Node-RED node catalog should be returned.
レスポンス
200400401403404409413500
成功レスポンスの例

200 · application/json

{
  "code": 0,
  "data": {
    "nodes": [
      "value"
    ]
  },
  "msg": "string"
}
成功レスポンスのフィールド

200 · application/json

フィールド型必須説明
codeintegerいいえResponse code
dataobjectいいえFlowNodesResp. スキーマの章で参照先のスキーマを確認してください。
msgstringいいえResponse message
レスポンスステータスの意味
ステータス意味メディアタイプ
200A successful response.application/json
400Correct the request parameters or Content-Type before retrying.application/json
401Authentication middleware returns plain-text unauthorized. Check API key validity, scope, and owner roles.text/plain
403Authentication middleware returns plain-text forbidden. Check API key validity, scope, and owner roles.text/plain
404Resource not found. Verify paths, IDs, and current resource state.—
409Resource state conflict. Verify paths, IDs, and current resource state.—
413Request too large. Reduce the request before retrying.—
500Service error. Investigate the service and confirm the outcome before retrying.—

POST/flow/update

Update a flow

Updates flow metadata and settings for a numeric flow ID.

リクエストボディ
curl --request POST 'https://<tier0-host>/openapi/v1/flow/update' \
  --header 'x-api-key: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '{"id":0,"flowName":"string","description":"string","template":"string","isFavorite":0}'

application/json

フィールド型必須説明
idinteger (int64)はいFlow ID to update.
flowNamestringいいえUpdated flow name.
descriptionstringいいえUpdated flow description.
templatestringいいえUpdated flow template JSON.
isFavoriteinteger (int64)いいえFavorite state: 1 for favorite, 2 for not favorite.
レスポンス
200400401403404409413500
成功レスポンスの例

200 · application/json

{
  "code": 0,
  "data": {
    "success": false
  },
  "msg": "string"
}
成功レスポンスのフィールド

200 · application/json

フィールド型必須説明
codeintegerいいえResponse code
dataobjectいいえFlowEmptyResp. スキーマの章で参照先のスキーマを確認してください。
msgstringいいえResponse message
レスポンスステータスの意味
ステータス意味メディアタイプ
200A successful response.application/json
400Correct the request parameters or Content-Type before retrying.application/json
401Authentication middleware returns plain-text unauthorized. Check API key validity, scope, and owner roles.text/plain
403Authentication middleware returns plain-text forbidden. Check API key validity, scope, and owner roles.text/plain
404Resource not found. Verify paths, IDs, and current resource state.—
409Resource state conflict. Verify paths, IDs, and current resource state.—
413Request too large. Reduce the request before retrying.—
500Service error. Investigate the service and confirm the outcome before retrying.—

プラットフォームとプロジェクト

プラットフォーム情報の読み取りとプロジェクトの管理。

POST/info

Get service information

Returns the service name, version, reported capabilities, and configured MQTT broker.

リクエストボディ
curl --request POST 'https://<tier0-host>/openapi/v1/info' \
  --header 'x-api-key: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '{}'

application/json

OpenAPI では、このリクエストボディのオブジェクトフィールドが宣言されていません。

レスポンス
200400401403404409413500
レスポンスステータスの意味
ステータス意味メディアタイプ
200A successful response.—
400Correct the request parameters or Content-Type before retrying.application/json
401Authentication middleware returns plain-text unauthorized. Check API key validity, scope, and owner roles.text/plain
403Authentication middleware returns plain-text forbidden. Check API key validity, scope, and owner roles.text/plain
404Resource not found. Verify paths, IDs, and current resource state.—
409Resource state conflict. Verify paths, IDs, and current resource state.—
413Request too large. Reduce the request before retrying.—
500Service error. Investigate the service and confirm the outcome before retrying.—

POST/launchpad/{projectName}/getMembers

List project members

Lists Launchpad project members. URL-encode projectName when it contains special characters.

リクエストパラメーター
名前場所型必須説明
projectNamepathstringはいProject name in the Launchpad URL. URL-encode special characters.
リクエストボディ
curl --request POST 'https://<tier0-host>/openapi/v1/launchpad/{projectName}/getMembers' \
  --header 'x-api-key: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '{"roleKey":"string","roles":["string"],"updatedAtStart":"string","updatedAtEnd":"string","page":0}'

application/json

フィールド型必須説明
roleKeystringいいえRole key filter.
rolesarray<string>いいえRole filters or the returned role list, depending on the model.
updatedAtStartstringいいえInclusive update-time lower bound in RFC 3339 format.
updatedAtEndstringいいえInclusive update-time upper bound in RFC 3339 format.
pageinteger (int64)いいえPage number, starting at 1.
sizeinteger (int64)いいえNumber of members per page.
レスポンス
200400401403404409413500
成功レスポンスの例

200 · application/json

{
  "code": 0,
  "data": {
    "list": [
      "value"
    ],
    "total": 0,
    "page": 0,
    "size": 0
  },
  "msg": "string"
}
成功レスポンスのフィールド

200 · application/json

フィールド型必須説明
codeintegerいいえResponse code
dataobjectいいえLaunchpadMembersResp. スキーマの章で参照先のスキーマを確認してください。
msgstringいいえResponse message
レスポンスステータスの意味
ステータス意味メディアタイプ
200A successful response.application/json
400Correct the request parameters or Content-Type before retrying.application/json
401Authentication middleware returns plain-text unauthorized. Check API key validity, scope, and owner roles.text/plain
403Authentication middleware returns plain-text forbidden. Check API key validity, scope, and owner roles.text/plain
404Resource not found. Verify paths, IDs, and current resource state.—
409Resource state conflict. Verify paths, IDs, and current resource state.—
413Request too large. Reduce the request before retrying.—
500Service error. Investigate the service and confirm the outcome before retrying.—

POST/platform/getMembers

List platform members

Lists platform members with optional keyword, role, status, and update-time filters.

リクエストボディ
curl --request POST 'https://<tier0-host>/openapi/v1/platform/getMembers' \
  --header 'x-api-key: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '{"keyword":"string","roleKey":"string","roles":["string"],"statuses":["string"],"updatedAtStart":"string"}'

application/json

フィールド型必須説明
keywordstringいいえSearch keyword.
roleKeystringいいえRole key filter.
rolesarray<string>いいえRole filters or the returned role list, depending on the model.
statusesarray<string>いいえMember status filters: active or disabled.
updatedAtStartstringいいえInclusive update-time lower bound in RFC 3339 format.
updatedAtEndstringいいえInclusive update-time upper bound in RFC 3339 format.
pageinteger (int64)いいえPage number, starting at 1.
sizeinteger (int64)いいえNumber of members per page.
レスポンス
200400401403404409413500
成功レスポンスの例

200 · application/json

{
  "code": 0,
  "data": {
    "list": [
      "value"
    ],
    "total": 0,
    "page": 0,
    "size": 0
  },
  "msg": "string"
}
成功レスポンスのフィールド

200 · application/json

フィールド型必須説明
codeintegerいいえResponse code
dataobjectいいえPlatformMembersResp. スキーマの章で参照先のスキーマを確認してください。
msgstringいいえResponse message
レスポンスステータスの意味
ステータス意味メディアタイプ
200A successful response.application/json
400Correct the request parameters or Content-Type before retrying.application/json
401Authentication middleware returns plain-text unauthorized. Check API key validity, scope, and owner roles.text/plain
403Authentication middleware returns plain-text forbidden. Check API key validity, scope, and owner roles.text/plain
404Resource not found. Verify paths, IDs, and current resource state.—
409Resource state conflict. Verify paths, IDs, and current resource state.—
413Request too large. Reduce the request before retrying.—
500Service error. Investigate the service and confirm the outcome before retrying.—

MQTT 認証

MQTT 認証情報の作成と削除。

POST/mqtt-auth/create

Create an MQTT credential

Creates a normal MQTT credential. The returned password is available only once and must be stored securely immediately.

リクエストボディ
curl --request POST 'https://<tier0-host>/openapi/v1/mqtt-auth/create' \
  --header 'x-api-key: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '{"name":"string","description":"string","clientIDRandomSuffixEnabled":false}'

application/json

フィールド型必須説明
namestringはいMQTT credential name.
descriptionstringいいえDescription of the MQTT credential.
clientIDRandomSuffixEnabledbooleanいいえWhether to append a random suffix to the MQTT client ID.
レスポンス
200400401403404409413500
成功レスポンスの例

200 · application/json

{
  "code": 0,
  "data": {
    "id": 0,
    "name": "string",
    "clientID": "string",
    "username": "string",
    "password": "string"
  },
  "msg": "string"
}
成功レスポンスのフィールド

200 · application/json

フィールド型必須説明
codeintegerいいえResponse code
dataobjectいいえMqttAuthCreateResp. スキーマの章で参照先のスキーマを確認してください。
msgstringいいえResponse message
レスポンスステータスの意味
ステータス意味メディアタイプ
200A successful response.application/json
400Correct the request parameters or Content-Type before retrying.application/json
401Authentication middleware returns plain-text unauthorized. Check API key validity, scope, and owner roles.text/plain
403Authentication middleware returns plain-text forbidden. Check API key validity, scope, and owner roles.text/plain
404Resource not found. Verify paths, IDs, and current resource state.—
409Resource state conflict. Verify paths, IDs, and current resource state.—
413Request too large. Reduce the request before retrying.—
500Service error. Investigate the service and confirm the outcome before retrying.—

POST/mqtt-auth/delete

Delete an MQTT credential

Idempotently deletes a normal MQTT credential. System credentials are not deleted.

リクエストボディ
curl --request POST 'https://<tier0-host>/openapi/v1/mqtt-auth/delete' \
  --header 'x-api-key: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '{"id":0}'

application/json

フィールド型必須説明
idinteger (int64)はいResource ID.
レスポンス
200400401403404409413500
成功レスポンスの例

200 · application/json

{
  "code": 0,
  "data": {
    "success": false
  },
  "msg": "string"
}
成功レスポンスのフィールド

200 · application/json

フィールド型必須説明
codeintegerいいえResponse code
dataobjectいいえMqttAuthDeleteResp. スキーマの章で参照先のスキーマを確認してください。
msgstringいいえResponse message
レスポンスステータスの意味
ステータス意味メディアタイプ
200A successful response.application/json
400Correct the request parameters or Content-Type before retrying.application/json
401Authentication middleware returns plain-text unauthorized. Check API key validity, scope, and owner roles.text/plain
403Authentication middleware returns plain-text forbidden. Check API key validity, scope, and owner roles.text/plain
404Resource not found. Verify paths, IDs, and current resource state.—
409Resource state conflict. Verify paths, IDs, and current resource state.—
413Request too large. Reduce the request before retrying.—
500Service error. Investigate the service and confirm the outcome before retrying.—

スキーマ

API のフィールド名、例、元の説明は、同梱の英語版 OpenAPI 仕様に従います。

AssetFileDeleteReq

フィールド型必須説明
filePathstringはいServer-issued storage path returned by an upload API.

AssetFileDeleteResp

フィールド型必須説明
deletedbooleanはいWhether the file was deleted.

AssetFileMultipartAbortReq

フィールド型必須説明
fileKeystringはいObject-store key used for the multipart upload.
uploadIdstringはいObject-store multipart upload session ID.

AssetFileMultipartAbortResp

フィールド型必須説明
abortedinteger (int32)はいAbort result: 1 = aborted (including idempotent replay success), 2 = not aborted.

AssetFileMultipartCompleteReq

フィールド型必須説明
fileKeystringはいObject-store key used for the multipart upload.
uploadIdstringはいObject-store multipart upload session ID.
partsarray<object>はいUploaded part numbers and their ETags.

AssetFileMultipartCompleteResp

フィールド型必須説明
filePathstringはいServer-issued storage path returned by an upload API.
fileUrlstringいいえFile access URL.
sizeBytesinteger (int64)はいFile size in bytes.
expiresAtinteger (int64)いいえExpiration time, in Unix milliseconds.

AssetFileMultipartInitReq

フィールド型必須説明
fileNamestringはいOriginal file name.
contentTypestringいいえFile MIME type, for example application/octet-stream.
sizeinteger (int64)はいTotal file size in bytes, greater than 0 and at most 1 GiB.
partSizeinteger (int64)いいえPreferred part size in bytes. The server may normalize it.
businessstringいいえBusiness domain or feature associated with the file.
useBystringいいえOptional usage category: user, workspace, or platform.
visibilitystringいいえFile visibility: private or public.
appInstanceIdstringいいえAssociated application instance ID.
sessionIdstringいいえCaller session ID.
bizIdstringいいえAssociated business identifier.

AssetFileMultipartInitResp

フィールド型必須説明
fileKeystringはいObject-store key used for the multipart upload.
filePathstringはいServer-issued storage path returned by an upload API.
uploadIdstringはいObject-store multipart upload session ID.
partSizeinteger (int64)はいPart size in bytes; the server may normalize it.
partCountinteger (int64)はいTotal number of upload parts.
expiresAtinteger (int64)はいExpiration time, in Unix milliseconds.

AssetFileMultipartPart

フィールド型必須説明
partNumberinteger (int32)はいPart number, starting at 1.
etagstringはいETag returned after uploading this part.

AssetFileMultipartPartUrl

フィールド型必須説明
partNumberinteger (int32)はいPart number, starting at 1.
urlstringはいPresigned PUT URL for this part.
expiresAtinteger (int64)はいExpiration time, in Unix milliseconds.

AssetFileMultipartPartUrlsReq

フィールド型必須説明
fileKeystringはいObject-store key used for the multipart upload.
uploadIdstringはいObject-store multipart upload session ID.
partNumbersarray<integer (int32)>はいOne-based part numbers to sign.

AssetFileMultipartPartUrlsResp

フィールド型必須説明
partUrlsarray<object>はいPresigned URLs for the requested parts.

AssetFileUploadReq

フィールド型必須説明
fileNamestringはいOriginal file name.
contentTypestringいいえMIME content type.
sizeinteger (int64)はいFile size in bytes. Business validation requires a value greater than 0 and at most 1 GiB.
businessstringいいえBusiness domain or feature associated with the file.
useBystringいいえOptional usage category: user, workspace, or platform.
visibilitystringいいえFile visibility, such as private or public.
appInstanceIdstringいいえAssociated application instance ID.
sessionIdstringいいえCaller session ID.

AssetFileUploadResp

フィールド型必須説明
fileIdinteger (int64)いいえFile ID.
filePathstringはいServer-issued storage path returned by an upload API.
fileUrlstringいいえFile access URL.
uploadUrlstringはいUpload URL; the legacy Enterprise endpoint currently returns an empty string.
expiresAtinteger (int64)いいえExpiration time, in Unix milliseconds.

AssetFileUrlResp

フィールド型必須説明
fileUrlstringはいFile access URL.
expiresAtinteger (int64)いいえExpiration time, in Unix milliseconds.

AssetUploadReq

AssetUploadReq

フィールド型必須説明
fileNamestringはいOriginal file name.
sizeBytesinteger (int64)はいFile size in bytes.
contentTypestringいいえFile MIME type, for example application/octet-stream.
sizeinteger (int64)いいえFile size in bytes.
sha256stringいいえOptional SHA-256 checksum of the file content.
storageKeystringいいえOptional object-store key. Omit it to let the server generate one.
isPublicboolean (boolean)いいえWhether the file should be accessible through the public download endpoint.
businessstringいいえBusiness domain or feature that owns the uploaded file.
useBystringいいえUsage scenario or owner category for the uploaded file.

AssetUploadResp

AssetUploadResp

フィールド型必須説明
uploadUrlstringはいUpload URL; the legacy Enterprise endpoint currently returns an empty string.
filePathstringはいServer-issued storage path returned by an upload API.
fileUrlstringいいえFile access URL.

AuthWhoamiResp

フィールド型必須説明
userIDinteger (int64)はいNumeric ID of the API key owner.
userNamestringはいUser name.
emailstringはいEmail address.
workspaceIDinteger (int64)はいPlatform workspace ID.
workspaceNamestringはいWorkspace name; may be empty in Enterprise.
apiKeyNamestringはいName of the current API key.
keyPrefixstringはいAPI key prefix.
permissionsarray<string>はいEffective permissions of the current identity.
rolesarray<string>はいRole filters or the returned role list, depending on the model.
keyTypestringはいAPI key ownership type, for example personal.

BrowseReq

BrowseReq

フィールド型必須説明
pathstringいいえRoot UNS path. Empty means the workspace root.
max_depthinteger (int64)いいえMaximum tree depth. Omit or use 0 for the server default.
include_metadataboolean (boolean)いいえWhether returned nodes should include metadata.
include_leaf_valueboolean (boolean)いいえWhether returned leaf nodes should include their latest payload.

BrowseResp

BrowseResp

フィールド型必須説明
treearray<object>はいUNS node tree.

CreateResp

CreateResp

フィールド型必須説明
successboolean (boolean)はいWhether the operation succeeded.
resultsarray<object>はいPer-item results. Check success and error for each item.

FlowCreateReq

フィールド型必須説明
flowNamestringはいFlow name, up to 63 Unicode characters.
flowTypestringはいFlow category: SourceFlow or EventFlow.
descriptionstringいいえFlow description.
templatestringいいえOptional flow template JSON.

FlowCreateResp

フィールド型必須説明
idinteger (int64)はいResource ID.
brokerIDstringはいID of the MQTT broker configuration node injected when the flow is created.

FlowDataResp

フィールド型必須説明
revstringはいNode-RED canvas revision; may be an empty string.
flowsarray<object>はいArray of Node-RED canvas node objects.

FlowDeleteReq

フィールド型必須説明
idsarray<integer (int64)>はいFlow IDs to delete.

FlowDeployReq

フィールド型必須説明
idinteger (int64)はいFlow ID to deploy.
flowsJsonstringはいNode-RED canvas JSON to deploy.

FlowDeployResp

フィールド型必須説明
flowIdstringはいFlow identifier.

FlowEmptyResp

フィールド型必須説明
successbooleanはいWhether the operation succeeded.

FlowGetReq

フィールド型必須説明
idinteger (int64)はいFlow ID.

FlowInfo

フィールド型必須説明
idinteger (int64)はいResource ID.
flowIdstringはいFlow identifier.
flowNamestringはいFlow name.
flowTypestringはいResponse flow type: source or event.
flowStatusstringはいCurrent flow status, for example draft.
templatestringはいFlow template JSON, encoded as a string.
descriptionstringはいDescription.
isFavoriteinteger (int64)はいFavorite state: 1 for favorite, 2 for not favorite.
currentVersionIdinteger (int64)はいCurrent version ID; 0 if unset.
currentVersionNamestringはいCurrent version name; empty if unset.
currentVersionTypestringはいCurrent version type; empty if unset.
createdTimeinteger (int64)はいCreation time, in Unix milliseconds.
updatedTimeinteger (int64)はいLast update time, in Unix milliseconds.

FlowListReq

フィールド型必須説明
keywordstringいいえKeyword matched against flow names and descriptions.
flowTypestringいいえFlow category filter: SourceFlow or EventFlow.

FlowListResp

フィールド型必須説明
listarray<object>はいResult list.

FlowNodesReq

フィールド型必須説明
flowTypestringはいFlow category whose Node-RED node catalog should be returned.

FlowNodesResp

フィールド型必須説明
nodesarray<object>はいAvailable Node-RED node sets.

FlowUpdateReq

フィールド型必須説明
idinteger (int64)はいFlow ID to update.
flowNamestringいいえUpdated flow name.
descriptionstringいいえUpdated flow description.
templatestringいいえUpdated flow template JSON.
isFavoriteinteger (int64)いいえFavorite state: 1 for favorite, 2 for not favorite.

HistoryAggregation

HistoryAggregation

フィールド型必須説明
intervalstringはいPositive aggregation window, such as 1m, 5m, 1h, or 1d.
functionstringいいえAggregation function: avg, min, max, sum, count, first, or last.
fieldstringいいえFirst-level payload field to aggregate.
fieldsarray<object>いいえPer-field aggregation settings.

HistoryAggregationField

HistoryAggregationField

フィールド型必須説明
namestringはいPayload field to aggregate.
functionstringいいえFunction for this field; defaults to the outer aggregation function.

HistoryQueryMeta

HistoryQueryMeta

フィールド型必須説明
aggregatedboolean (boolean)はいWhether the result was aggregated.
sampledboolean (boolean)はいWhether the result was sampled.
rawTotalinteger (int64)はいTotal number of raw records.
returnedTotalinteger (int64)はいNumber of records returned in this response.
requestedIntervalMsinteger (int64)いいえRequested aggregation interval in milliseconds.
actualIntervalMsinteger (int64)いいえActual aggregation interval in milliseconds.
strategystringいいえProcessing strategy used for the query.

HistoryReq

HistoryReq

フィールド型必須説明
topicsarray<string>はいUNS topic paths whose history should be queried.
start_timestringはいInclusive query start in RFC 3339 format.
end_timestringはいInclusive query end in RFC 3339 format.
aggregationobjectいいえHistoryAggregation. スキーマの章で参照先のスキーマを確認してください。
pageinteger (int64)いいえPage number, starting from 1.
sizeinteger (int64)いいえPage size; values above the server maximum are capped.

HistoryResp

HistoryResp

フィールド型必須説明
successboolean (boolean)はいWhether the operation succeeded.
resultsarray<object>はいPer-item results. Check success and error for each item.
pageinteger (int64)はいPage number, starting at 1.
sizeinteger (int64)はいFile size in bytes.
totalinteger (int64)はいTotal number of matching records.

InfoReq

{
  "type": "object",
  "properties": {}
}

LaunchpadGetMembersReq

フィールド型必須説明
roleKeystringいいえRole key filter.
rolesarray<string>いいえRole filters or the returned role list, depending on the model.
updatedAtStartstringいいえInclusive update-time lower bound in RFC 3339 format.
updatedAtEndstringいいえInclusive update-time upper bound in RFC 3339 format.
pageinteger (int64)いいえPage number, starting at 1.
sizeinteger (int64)いいえNumber of members per page.

LaunchpadMemberResp

フィールド型必須説明
memberIdstringはいMember identifier.
userIdstringはいUser ID.
userNamestringいいえUser name.
emailstringいいえEmail address.
rolesarray<object>はいRole filters or the returned role list, depending on the model.
updatedAtstringいいえLast update time.

LaunchpadMemberRoleAppResp

フィールド型必須説明
appIdstringはいApplication ID, represented as a string.
appNamestringはいApplication name.

LaunchpadMemberRoleResp

フィールド型必須説明
roleIdstringはいRole ID, represented as a string.
roleKeystringはいRole key filter.
roleNamestringいいえRole display name.
descriptionstringいいえDescription.
memberCountinteger (int64)はいNumber of members assigned to the role.
appsarray<object>いいえApplications associated with the role.

LaunchpadMembersResp

フィールド型必須説明
listarray<object>はいResult list.
totalinteger (int64)はいTotal number of matching records.
pageinteger (int64)はいPage number, starting at 1.
sizeinteger (int64)はいFile size in bytes.

MqttAuthCreateReq

フィールド型必須説明
namestringはいMQTT credential name.
descriptionstringいいえDescription of the MQTT credential.
clientIDRandomSuffixEnabledbooleanいいえWhether to append a random suffix to the MQTT client ID.

MqttAuthCreateResp

フィールド型必須説明
idinteger (int64)はいResource ID.
namestringはいName.
clientIDstringはいMQTT client ID.
usernamestringはいMQTT user name.
passwordstringはいPlaintext password. Save it now; it cannot be retrieved again.
clientIDRandomSuffixEnabledbooleanはいWhether to append a random suffix to the MQTT client ID.

MqttAuthDeleteReq

フィールド型必須説明
idinteger (int64)はいResource ID.

MqttAuthDeleteResp

フィールド型必須説明
successbooleanはいWhether the operation succeeded.

NamespaceNode

NamespaceNode

フィールド型必須説明
namestringはいNode name, up to 63 Unicode characters. In a nested request, this is the name under its parent.
typestringいいえNode type: PATH or TOPIC.
childrenarray<object>いいえChild nodes to create under this node.
topicTypestringいいえTopic data category: STATE, ACTION, or METRIC.
fieldsarray<object>いいえPayload schema fields for TOPIC nodes.
descriptionstringいいえNode description, up to 512 Unicode characters.
displayNamestringいいえDisplay name shown in clients.
extendPropertiesobjectいいえCustom metadata key-value pairs.
aliasstringいいえOptional topic alias.
enableHistoryboolean (boolean)いいえWhether history storage is enabled for this topic.

NodeCreateReq

NodeCreateReq

フィールド型必須説明
namespacearray<object>はいUNS nodes to create. Nest children to create a subtree.

NodeDeleteReq

NodeDeleteReq

フィールド型必須説明
topicsarray<string>はいUNS topic or path node paths to delete.
hard_deleteboolean (boolean)いいえPermanently delete instead of moving nodes to the recycle state.

NodeRedNodeSet

フィールド型必須説明
idstringはいResource ID.
namestringはいName.
typesarray<string>はいNode-RED node types provided by the node set.
enabledbooleanはいWhether the node set is enabled.
modulestringはいNode-RED module name.
versionstringはいService or node module version.

NodeRestoreReq

NodeRestoreReq

フィールド型必須説明
pathstringはいFull UNS path of the node to restore. Use its path before deletion, not a node ID or HTTP URL.

NodeUpdateReq

NodeUpdateReq

フィールド型必須説明
pathstringはいExisting UNS topic or path node to update.
namestringいいえNew node name.
descriptionstringいいえUpdated node description.
displayNamestringいいえUpdated display name.
extendPropertiesobjectいいえUpdated custom metadata key-value pairs.
fieldsarray<object>いいえUpdated payload schema fields.
aliasstringいいえUpdated topic alias.
enableHistoryboolean (boolean)いいえSupply true or false to change history storage. Omit to keep the existing setting.
updateMaskarray<string>いいえCompatibility field ignored by the current Enterprise implementation. It cannot be used to clear fields.

OpenapiCreateResult

OpenapiCreateResult

フィールド型必須説明
successboolean (boolean)はいWhether the operation succeeded.
topicstringはいFull UNS topic path.
errorobjectいいえOpenapiItemError. スキーマの章で参照先のスキーマを確認してください。

OpenapiEmptyResp

OpenapiEmptyResp

フィールド型必須説明
successboolean (boolean)はいWhether the operation succeeded.

OpenapiHistoryItem

OpenapiHistoryItem

フィールド型必須説明
successboolean (boolean)はいWhether the operation succeeded.
topicstringはいFull UNS topic path.
resultobjectいいえOpenapiHistoryResult. スキーマの章で参照先のスキーマを確認してください。
errorobjectいいえOpenapiItemError. スキーマの章で参照先のスキーマを確認してください。

OpenapiHistoryResult

OpenapiHistoryResult

フィールド型必須説明
valuesarray<object>はいHistorical VQT records.
metaobjectいいえHistoryQueryMeta. スキーマの章で参照先のスキーマを確認してください。

OpenapiHistoryValue

OpenapiHistoryValue

フィールド型必須説明
valueobjectいいえPayload value.
qualitystringはいData quality: Good, GoodNoData, Uncertain, or Bad.
timeStampinteger (int64)はいUnix timestamp in milliseconds. Writes use server time when omitted.

OpenapiItemError

OpenapiItemError

フィールド型必須説明
codeinteger (int64)はいStatus code; in an item error, identifies the failure.
messagestringはいItem-level error message.

OpenapiNodeInfo

OpenapiNodeInfo

フィールド型必須説明
idinteger (int64)はいResource ID.
pathstringはいFull UNS node path.
namestringはいName.
typestringはいNode type: PATH or TOPIC.
topicTypestringはいTopic category: STATE, ACTION, or METRIC.
descriptionstringいいえDescription.
displayNamestringいいえDisplay name.
extendPropertiesobjectいいえCustom node metadata as key-value pairs.
fieldsarray<object>いいえPayload field definitions.
childrenarray<object>いいえChild nodes under this node.
aliasstringいいえNode alias.
enableHistoryboolean (boolean)いいえWhether history storage is enabled.
bindFlowIDinteger (int64)いいえBound Source Flow ID. 0 means no Source Flow is bound.
bindEventFlowIDinteger (int64)いいえBound Event Flow ID. 0 means no Event Flow is bound.
payloadobjectいいえOpenapiVQT. スキーマの章で参照先のスキーマを確認してください。

OpenapiReadItem

OpenapiReadItem

フィールド型必須説明
successboolean (boolean)はいWhether the operation succeeded.
topicstringはいFull UNS topic path.
resultobjectいいえOpenapiVQT. スキーマの章で参照先のスキーマを確認してください。
errorobjectいいえOpenapiItemError. スキーマの章で参照先のスキーマを確認してください。
metadataobjectいいえOpenapiNodeInfo. スキーマの章で参照先のスキーマを確認してください。

OpenapiVQT

OpenapiVQT

フィールド型必須説明
valueobjectいいえPayload value.
qualitystringはいData quality: Good, GoodNoData, Uncertain, or Bad.
timeStampinteger (int64)はいUnix timestamp in milliseconds. Writes use server time when omitted.

OpenapiWriteResult

OpenapiWriteResult

フィールド型必須説明
successboolean (boolean)はいWhether the operation succeeded.
topicstringはいFull UNS topic path.
errorobjectいいえOpenapiItemError. スキーマの章で参照先のスキーマを確認してください。

PlatformGetMembersReq

フィールド型必須説明
keywordstringいいえSearch keyword.
roleKeystringいいえRole key filter.
rolesarray<string>いいえRole filters or the returned role list, depending on the model.
statusesarray<string>いいえMember status filters: active or disabled.
updatedAtStartstringいいえInclusive update-time lower bound in RFC 3339 format.
updatedAtEndstringいいえInclusive update-time upper bound in RFC 3339 format.
pageinteger (int64)いいえPage number, starting at 1.
sizeinteger (int64)いいえNumber of members per page.

PlatformMemberResp

フィールド型必須説明
userIdstringはいUser ID.
userNamestringいいえUser name.
nickNamestringいいえUser nickname.
emailstringいいえEmail address.
statusstringはいPlatform member status: active or disabled.
rolesarray<object>はいRole filters or the returned role list, depending on the model.
updatedAtstringはいLast update time.

PlatformMemberRoleResp

フィールド型必須説明
roleIdstringはいRole ID, represented as a string.
roleKeystringはいRole key filter.
roleNamestringいいえRole display name.
descriptionstringいいえDescription.

PlatformMembersResp

フィールド型必須説明
listarray<object>はいResult list.
totalinteger (int64)はいTotal number of matching records.
pageinteger (int64)はいPage number, starting at 1.
sizeinteger (int64)はいFile size in bytes.

ReadReq

ReadReq

フィールド型必須説明
topicsarray<string>はいUNS topic paths to read.
include_metadataboolean (boolean)いいえWhether each result should include UNS node metadata.
include_leaf_valueboolean (boolean)いいえWhether leaf nodes should include their latest payload.

ReadResp

ReadResp

フィールド型必須説明
successboolean (boolean)はいWhether the operation succeeded.
resultsarray<object>はいPer-item results. Check success and error for each item.

SchemaField

SchemaField

フィールド型必須説明
namestringはいPayload field name.
typestringはいPayload field type: INTEGER, LONG, DOUBLE, FLOAT, STRING, BOOLEAN, or DATETIME.
unitstringいいえOptional engineering unit.

SearchReq

SearchReq

フィールド型必須説明
keywordstringいいえKeyword matched against UNS node names, aliases, and paths.
topicTypestringいいえTopic data category filter: STATE, ACTION, or METRIC.
path_prefixstringいいえOnly return nodes under this UNS path prefix.
include_metadataboolean (boolean)いいえWhether returned nodes should include metadata.
include_leaf_valueboolean (boolean)いいえWhether returned leaf nodes should include their latest payload.
pageinteger (int64)いいえPage number, starting from 1.
sizeinteger (int64)いいえPage size.

SearchResp

SearchResp

フィールド型必須説明
objectsarray<object>はいMatching UNS nodes.
pageinteger (int64)はいPage number, starting at 1.
sizeinteger (int64)はいFile size in bytes.
totalinteger (int64)はいTotal number of matching records.

UnsAttachmentInfo

UnsAttachmentInfo

フィールド型必須説明
unsIdinteger (int64)はいNumeric UNS node ID.
fileNamestringいいえOriginal file name.
filePathstringはいServer-issued storage path returned by an upload API.
fileUrlstringいいえFile access URL.
contentTypestringいいえFile MIME type, for example application/octet-stream.
sizeinteger (int64)いいえFile size in bytes.
sha256stringいいえSHA-256 checksum of the file contents.
createdAtinteger (int64)いいえCreation time, in Unix milliseconds.
fileUrlExpiresAtinteger (int64)いいえFile URL expiration time, in Unix milliseconds.

UnsAttachmentListReq

UnsAttachmentListReq

フィールド型必須説明
unsIdinteger (int64)いいえNumeric UNS node ID.
topicstringいいえFull UNS topic path.
pageinteger (int64)いいえPage number, starting at 1.
sizeinteger (int64)いいえNumber of attachments per page.
includeFileUrlboolean (boolean)いいえWhether to return temporary file URLs. Defaults to true.

UnsAttachmentListResp

UnsAttachmentListResp

フィールド型必須説明
unsIdinteger (int64)はいNumeric UNS node ID.
listarray<object>はいResult list.
totalinteger (int64)はいTotal number of matching records.
pageinteger (int64)はいPage number, starting at 1.
sizeinteger (int64)はいFile size in bytes.

UnsAttachmentUploadReq

UnsAttachmentUploadReq

フィールド型必須説明
unsIdinteger (int64)いいえNumeric owner node ID. Supply unsId or topic; a valid unsId takes precedence.
topicstringいいえFull owner node path, used when a valid unsId is not supplied.
fileNamestringいいえOriginal file name.
sha256stringいいえSHA-256 checksum of the file contents.
filestring (binary)はいBinary file contents. The multipart field name must be file.

UnsAttachmentUploadResp

UnsAttachmentUploadResp

フィールド型必須説明
unsIdinteger (int64)はいNumeric UNS node ID.
fileNamestringいいえOriginal file name.
filePathstringはいServer-issued storage path returned by an upload API.
fileUrlstringいいえFile access URL.
contentTypestringいいえFile MIME type, for example application/octet-stream.
sizeinteger (int64)いいえFile size in bytes.
sha256stringいいえSHA-256 checksum of the file contents.
createdAtinteger (int64)いいえCreation time, in Unix milliseconds.
fileUrlExpiresAtinteger (int64)いいえFile URL expiration time, in Unix milliseconds.

UnsBindFlowReq

UnsBindFlowReq

フィールド型必須説明
unsIdinteger (int64)はいUNS node ID to bind.
flowIdinteger (int64)はいFlow ID to bind.

UnsBindFlowResp

UnsBindFlowResp

フィールド型必須説明
successboolean (boolean)はいWhether the operation succeeded.
unsIdinteger (int64)はいNumeric UNS node ID.
flowIdinteger (int64)はいFlow identifier.

WriteItem

WriteItem

フィールド型必須説明
topicstringはいUNS topic path to write.
valueobjectいいえPayload value to write.
timeStampinteger (int64)いいえOptional Unix timestamp in milliseconds. Omit it to use server time.

WriteReq

WriteReq

フィールド型必須説明
writesarray<object>はいWrite operations to apply.
qosinteger (int64)いいえMQTT QoS: 0, 1, or 2.
retainboolean (boolean)いいえWhether the MQTT message should be retained.

WriteResp

WriteResp

フィールド型必須説明
successboolean (boolean)はいWhether the operation succeeded.
resultsarray<object>はいPer-item results. Check success and error for each item.