ユーザーインターフェースAPI
ユーザーインターフェースAPIは、JWT認証でクライアントのリクエストを検証します。
ユーザー認証
ログイン
POST /web/api/login
{
"loginName": "sys",
"password": "manager"
}トークンの更新
POST /web/api/relogin
{
"refreshToken": "login時に発行されたリフレッシュトークン"
}ログアウト
POST /web/api/logout
LogoutReq:
{
"refreshToken": "login時に発行されたリフレッシュトークン"
}状態の確認
GET /web/api/check
現在のトークンの状態を検証します。
LoginCheckRsp
{
"success": true,
"reason": "string",
"elapse": "string",
"experimentMode": false,
"server": {"version":"v1.2.3"},
"shells": [{"ShellDefinition"}]
}ShellDefinition
{
"id": "シェル定義ID(uuid)",
"type": "種類",
"icon": "アイコン名",
"label": "表示名",
"theme": "テーマ名",
"command": "ターミナル シェルコマンド",
"attributes": [
{ "removable": true },
{ "cloneable": true },
{ "editable": true }
]
}- 種類
| 型 | 説明 |
|---|---|
| sql | SQLエディター |
| tql | TQLエディター |
| wrk | ワークスペースエディター |
| taz | タグアナライザー |
| term | ターミナル |
データベース
SQLの実行
GET, POST /web/machbase
/db/query APIと同じ動作ですが、認証方式が異なります。
/db/queryはクライアントアプリケーションをAPIトークンで認証し、
/web/machbaseはユーザー操作用にJWTを検証します。
テーブル一覧の取得
GET /web/api/tables?showall=false&name=pattern
テーブル一覧を返します。
showallをtrueにすると、非表示のテーブルもすべて含めます。nameはテーブル名の絞り込みパターンです。?や*を含むglob式、または特殊文字を含まない接頭辞を指定できます。
{
"success": true,
"reason": "成功状態またはメッセージ",
"elapse": "文字列形式の経過時間",
"data": {
"columns": ["ROWNUM", "DB", "USER", "NAME", "TYPE"],
"types": ["int32", "string", "string", "string", "string"],
"rows":[
[1, "MACHBASE", "SYS", "TABLENAME", "TAG TABLE"],
]
}
}タグ一覧の取得
GET /web/api/tables/:table/tags?name=prefix
指定テーブルのタグ一覧を返します。
nameを指定すると、その接頭辞で始まるタグだけを返します。
{
"success": true,
"reason": "成功状態またはメッセージ",
"elapse": "文字列形式の経過時間",
"data": {
"columns": ["ROWNUM", "NAME"],
"types": ["int32", "string"],
"rows":[
[1, "temperature"],
]
}
}タグ統計
GET /web/api/tables/:table/tags/:tag/stat
指定テーブルのタグ統計を返します。
{
"success": true,
"reason": "成功状態またはメッセージ",
"elapse": "文字列形式の経過時間",
"data": {
"columns": ["ROWNUM", "NAME", "ROW_COUNT", "MIN_TIME", "MAX_TIME",
"MIN_VALUE", "MIN_VALUE_TIME", "MAX_VALUE", "MAX_VALUE_TIME", "RECENT_ROW_TIME"],
"types": ["int32", "string", "int64", "datetime", "datetime","double",
"datetime", "double", , "datetime",, "datetime"],
"rows":[
["...omit...."],
]
}
}シェルとターミナル
データチャネル
ws://{server_address}/web/api/term/:term_id/data
ターミナル用のWebSocketです。
ウィンドウサイズ
POST /web/api/term/:term_id/windowsize
ターミナルのサイズを変更します。
TerminalSize
{ "rows": 24, "cols": 80 }シェル定義の取得
GET /web/api/shell/:id
指定IDのShellDefinitionを返します。
シェル定義の変更
POST /web/api/shell/:id
指定IDのShellDefinitionを更新します。
シェルの複製
GET /web/api/shell/:id/copy
指定IDのシェルを複製し、新しいShellDefinitionを返します。
シェル定義の削除
DELETE /web/api/shell/:id
指定IDのシェルを削除します。
{
"success": true,
"reason": "成功またはエラーメッセージ",
"elapse": "文字列形式の時間"
}サーバーイベント
イベントチャネル
ws://127.0.0.1:5654/web/api/console/{console_id}/data?token={jwt_token}
双方向メッセージ用のWebSocketです。
- メッセージの種類
{
"type": "下表を参照",
"ping": {
"tick": 1234
},
"log": {
"level": "INFO",
"message": "ログメッセージ"
}
}| 型 | フィールド | 説明 |
|---|---|---|
ping | pingメッセージ | |
ping.tick | 任意の整数。サーバーは、クライアントが送信した数値をそのまま返します。 | |
log | log.level | ログレベル:TRACE、DEBUG、INFO、WARN、ERROR |
log.message | ログメッセージ | |
log.repeat | 同じメッセージが連続して2回以上繰り返された場合の回数 |
TQLとワークスペース
TQLのコンテンツタイプ
ヘッダーContent-Type | ヘッダーX-Chart-Type | 内容 |
|---|---|---|
| text/html | “echart”, “geomap” | 完全なHTML。 例: <iframe>内に埋め込む |
| text/html | - | 完全なHTML。 例: <iframe>内に埋め込む |
| text/csv | - | CSV |
| text/markdown | - | Markdown |
| application/json | “echart”, “geomap” | JSON(echartまたはgeomapのデータ) |
| application/json | - | JSON |
| application/xhtml+xml | - | HTML要素。例:<div>...</div> |
TQLファイルの実行
GET /web/api/tql/*path
指定パスのTQLを実行します。応答形式は、前述の「TQLのコンテンツタイプ」表を参照してください。
POST /web/api/tql/*path
指定パスのTQLを実行します。応答形式は、前述の「TQLのコンテンツタイプ」表を参照してください。
TQLスクリプトの実行
POST /web/api/tql
ボディにTQLスクリプトを送信すると、サーバーが実行結果を返します。 応答形式は、「TQLのコンテンツタイプ」表を参照してください。
リクエストに$クエリパラメーターがある場合は、その値をTQLスクリプトとして扱い、
ボディをデータとして処理します。$パラメーターは、v8.0.17以降で使用できます。
Markdownのレンダリング
POST /web/api/md
ボディにMarkdownを送信すると、サーバーがXHTML形式のレンダリング結果を返します。
ファイル管理
Content-Type
ファイルの種類とContent-Typeの対応です。
| ファイルの種類 | Content-Type |
|---|---|
| .sql | text/plain |
| .tql | text/plain |
| .taz | application/json |
| .wrk | application/json |
| unknown | application/octet-stream |
ファイルの読み取り
GET /web/api/files/*path
パスがファイルを指す場合は、その内容を返します。
パスがディレクトリを指す場合は、エントリの一覧を返します。
Entry
{
"isDir": true,
"name": "name",
"content": "ファイルの場合のバイト配列",
"children": [{"ディレクトリの場合のSubEntry"}],
}SubEntry
{
"isDir": true,
"name": "name",
"type": "type",
"size": 1234,
"lastModifiedUnixMillis": 169384757
}ファイルの書き込み
POST /web/api/files/*path
pathがファイルを指す場合は、ボディの内容をそのファイルに書き込みます。pathがディレクトリでボディが空の場合は、空のディレクトリを作成し、そのEntryを返します。pathがディレクトリでボディがGitCloneReqJSONの場合は、リモートGitリポジトリをそのパスにクローンし、ディレクトリのEntryを返します。
GitCloneReq
{
"command": "clone",
"url": "https://github.com/machbase/neo-samples.git"
}command:clone,pull
ファイルの名前変更・移動
PUT /web/api/files/*path
ファイルまたはディレクトリの名前を変更するか、移動します。
RenameReq
{
"destination": "target path",
}操作が正常に完了すると、APIは200 OKを返します。
ファイルの削除
DELETE /web/api/files/*path
pathのファイルを削除します。パスが空でないディレクトリを指す場合は、エラーを返します。
キー管理
キー一覧の取得
GET /web/api/keys
キー情報を返します。
レスポンス
{
"success": true,
"reason": "success",
"data": [
{
"idx": 0,
"id": "eleven",
"notBefore": 1713171461,
"notAfter": 2028531461
}
],
"elapse": "131.9µs"
}キーの生成
POST /web/api/keys
キーを生成します。
nameは必須です。notAfterは有効期限です。
{
"name": "eleven",
"notBefore": 0,
"notAfter": 0
}キーの削除
DELETE /web/api/keys/:id
指定IDのキーを削除します。
レスポンス
{
"success": true,
"reason": "success",
"elapse": "112.8µs"
}SSHキー
SSHキー一覧の取得
GET /web/api/sshkeys
SSHキー情報を返します。
レスポンス
{
"data": [
{
"keyType": "ssh-rsa",
"fingerprint": "f08h89fhf0dkv0v0v9c9x0cx9v9",
"comment": "example@machbase.com"
}
],
"elapse": "67.6µs",
"reason": "success",
"success": true
}SSHキーの生成
POST /web/api/sshkeys
SSH公開鍵認証の使用
machbase-neoサーバーに公開鍵を登録すると、パスワードを入力せずにmachbase-neo shellコマンドを実行できます。
{
"key": "your publickey"
}SSHキーの削除
DELETE /web/api/sshkeys/:fingerprint
指定したフィンガープリントのSSHキーを削除します。
レスポンス
{
"elapse": "198.8µs",
"reason": "success",
"success": true
}タイマー
タイマーの取得
GET /web/api/timers/:name
タイマー情報を返します。
- 状態値:
RUNNING,STARTING,STOP,STOPPING,FAILED,UNKNOWN
レスポンス
{
"success": true,
"reason": "success",
"data": [
{
"name": "ELEVEN",
"type": "TIMER",
"state": "STOP",
"task": "timer.tql",
"schedule": "0 30 * * * *"
}
],
"elapse": "92.1µs"
}タイマー一覧
GET /web/api/timers
タイマー情報の一覧を返します。
- 状態値:
RUNNING,STARTING,STOP,STOPPING,FAILED,UNKNOWN
レスポンス
{
"success": true,
"reason": "success",
"data": [
{
"name": "ELEVEN",
"type": "TIMER",
"state": "STOP",
"task": "timer.tql",
"schedule": "0 30 * * * *"
},
{
"name": "TWELVE",
"type": "TIMER",
"state": "RUNNING",
"task": "timer2.tql",
"schedule": "1 30 * * * *"
}
],
"elapse": "92.1µs"
}タイマーの追加
POST /web/api/timers
タイマーを追加します。
name、autoStart、schedule、pathは必須です。
タイマーのscheduleの例
0 30 * * * *毎時30分@every 1h30m1時間30分間隔@daily毎日
{
"name":"eleven",
"autoStart":false,
"schedule":"@every 10s",
"path":"timer.tql"
}タイマーの開始
POST /web/api/timers/:name/state
タイマーを開始します。
state値が必要です。
{
"state":"start",
}タイマーの停止
POST /web/api/timers/:name/state
タイマーを停止します。
state値が必要です。
{
"state":"stop",
}タイマーの変更
PUT /web/api/timers/:name
タイマー設定を変更します。
autoStart、schedule、pathを指定できます。
{
"audoStart" : true,
"schedule":"@every 5s",
"path":"timer.tql"
}タイマーの削除
DELETE /web/api/timers/:name
タイマーを削除します。
レスポンス
{
"success": true,
"reason": "success",
"elapse": "4.8664ms"
}ブリッジ
ブリッジ一覧
GET /web/api/bridges
ブリッジ情報を返します。
レスポンス
{
"success": true,
"reason": "success",
"data": [
{
"name": "pg",
"type": "postgres",
"path": "host=127.0.0.1 port=5432 user=postgres password=1234 dbname=bridgedb sslmode=disable"
}
],
"elapse": "1.328301ms"
}ブリッジの追加
POST /web/api/bridges
ブリッジを追加します。
name、type、pathは必須です。- 対応するブリッジは、
SQLite、PostgreSql、Mysql、MSSQL、MQTT、NATSです。
{
"name":"pg",
"type":"postgres", // sqlite、postgres、mysql、mssql、mqtt、natsから選択
"path":"host=127.0.0.1 port=5432 user=postgres password=1234 dbname=bridgedb sslmode=disable"
}ブリッジの実行
POST /web/api/bridges/:name/state
ブリッジでコマンドを実行します。
stateとcommandが必要です。
{
"state":"exec",
"command":"CREATE TABLE IF NOT EXISTS pg_example(id SERIAL PRIMARY KEY,company VARCHAR(50) UNIQUE NOT NULL,employee INT,discount REAL,plan FLOAT(8),code UUID,valid BOOL, memo TEXT, created_on TIMESTAMP NOT NULL)"
}ブリッジのクエリ
POST /web/api/bridges/:name/state
ブリッジでクエリを実行します。
stateとcommandが必要です。
{
"state":"query",
"command":"select * from pg_example"
}ブリッジのテスト
POST /web/api/bridges/:name/state
ブリッジをテストします。
{
"state":"test",
}ブリッジの削除
DELETE /web/api/bridges/:name
指定名のブリッジを削除します。
レスポンス
{
"success": true,
"reason": "success",
"elapse": "112.8µs"
}サブスクライバー
サブスクライバーの取得
GET /web/api/subscribers/:name
サブスクライバー情報を返します。
- 状態値:
RUNNING,STARTING,STOP,STOPPING,FAILED,UNKNOWN autoStart、queue、QoSフィールドは、値がない場合は省略されます。
レスポンス
{
"data": [
{
"name": "NATS_SUBR",
"type": "SUBSCRIBER",
"autoStart": true, // 値がなければ省略
"state": "RUNNING",
"task": "db/append/EXAMPLE:csv",
"bridge": "my_nats",
"topic": "iot.sensor",
"queue":"", // 値がなければ省略
"QoS":0 // 値がなければ省略
}
],
"elapse": "253.4µs",
"reason": "success",
"success": true
}サブスクライバー一覧
GET /web/api/subscribers
サブスクライバー情報の一覧を返します。
- 状態値:
RUNNING,STARTING,STOP,STOPPING,FAILED,UNKNOWN autoStart、queue、QoSフィールドは、値がない場合は省略されます。
レスポンス
{
"data": [
{
"name": "NATS_SUBR",
"type": "SUBSCRIBER",
"autoStart": true, // 値がなければ省略
"state": "RUNNING",
"task": "db/append/EXAMPLE:csv",
"bridge": "my_nats",
"topic": "iot.sensor",
"queue":"", // 値がなければ省略
"QoS":0 // 値がなければ省略
},
{
"name": "NATS_SUBR2",
"type": "SUBSCRIBER",
"autoStart": true, // 値がなければ省略
"state": "STARTING",
"task": "db/insert/EXAMPLE2:csv",
"bridge": "my_nats2",
"topic": "iot.sensor2",
"queue":"", // 値がなければ省略
"QoS":0 // 値がなければ省略
}
],
"elapse": "253.4µs",
"reason": "success",
"success": true
}サブスクライバーの追加
POST /web/api/subscribers
サブスクライバーを追加します。
autoStart:trueにすると、machbase-neoとともに起動します。省略またはfalseの場合は、手動で開始・停止できます。name: 例:nats_subr。サブスクライバー名です。bridge: 例:my_nats。サブスクライバーが使用するブリッジ名です。topic: 例:iot.sensor。購読対象で、NATSのサブジェクト構文に従います。task: 例:db/append/EXAMPLE:csv。データ形式と書き込みモードを指定し、CSVデータをEXAMPLEテーブルにappendモードで取り込むことを表します。autoStartがfalseの場合は、subscriber start <name>、subscriber stop <name>コマンドで手動操作できます。QoSint: MQTTブリッジの場合、トピック購読のQoSを指定します。0または1を使用でき、既定値は0です。ququestring:NATSブリッジのキューグループを指定します。現在のリクエストのJSONキーはququeです。レスポンスではqueueを使用します。
設定の詳細は、NATSブリッジを参照してください。
{
"name":"nats_subr",
"autoStart":true,
"bridge":"my_nats",
"topic":"iot.sensor",
"task":"db/append/EXAMPLE:csv",
"QoS": 0, // MQTTブリッジオプション:0または1(既定値0)
"quque": "" // NATSブリッジオプション
}サブスクライバーの開始
POST /web/api/subscribers/:name/state
state値が必要です。
{
"state":"start",
}サブスクライバーの停止
POST /web/api/subscribers/:name/state
state値が必要です。
{
"state":"stop",
}サブスクライバーの削除
DELETE /web/api/subscribers/:name
指定名のサブスクライバーを削除します。
レスポンス
{
"elapse": "77.1µs",
"reason": "success",
"success": true
}バックアップ
バックアップの取得
GET /web/api/backup/archives
バックアップ一覧を返します。
- 既定のバックアップディレクトリは、machbase-neo実行ファイルのディレクトリ配下の
backupsです。 - 保存先を変更するには、
--backup-dir={path}オプションを指定して起動します。既定値を使う場合、この指定は不要です。
レスポンス
{
"data": [
{
"path": "example_backup1",
"isMount": true,
"mountName": "backup1"
},
{
"path": "example_backup2",
"isMount": false
}
],
"elapse": "6.562299ms",
"reason": "success",
"success": true
}DBのバックアップ
POST /web/api/backup/archive
データベースをバックアップします。
- 完全バックアップ:全データをバックアップします。
- 増分バックアップ:完全バックアップまたは前回の増分バックアップ以降に追加されたデータだけをバックアップします。
- 期間バックアップ:指定期間のデータをバックアップします。
リクエスト
{
"type":"database", // databaseまたはtable
"tableName":"",
"duration":{
"type":"full",
"after":"",
"from":"",
"to":""
},
"path":"example_backup1"
// "path":"/home/neo/backups/example_backup1" // 絶対パスの例
}レスポンス
{
"success": true,
"reason": "success",
"elapse": "231.3µs"
}バックアップ状態
GET /web/api/backup/archive/status
バックアップ状態を返します。
レスポンス
{
"data": {
"type": "database",
"tableName": "",
"duration": {
"type": "full",
"after": "",
"from": "",
"to": ""
},
"path": "/home/neo/neo-server/tmp/machbase_home/dbs/example_backup1",
},
"elapse": "1.1µs",
"reason": "success",
"success": true
}マウント
マウント一覧
GET /web/api/backup/mounts
マウント一覧を返します。
レスポンス
{
"data": [
{
"name": "machbase_backup_19700101090000_20240726104832_15",
"path": "backup1",
"tbsid": 23,
"scn": 15,
"mountdb": "MOUNT_BACKUP1",
"dbBeginTime": "1970-01-01 09:00:00",
"dbEndTime": "2024-07-26 10:48:32",
"backupBeginTime": "2024-07-26 10:48:32",
"backupEndTime": "2024-07-26 10:48:34",
"flag": 0
}
],
"elapse": "424.3µs",
"reason": "success",
"success": true
}DBのマウント
POST /web/api/backup/mounts/:name
データベースをマウントします。
:name: マウント名path: バックアップデータベースのパス(絶対パスと相対パスの両方を使用可能)
{
"path":"example_backup1" // 相対パス
// "path":"/home/machbase/machbase_home/dbs/example_backup1" // 絶対パス
}DBのアンマウント
DELETE /web/api/backup/mounts/:name
データベースをアンマウントします。
:name: アンマウントする名前
レスポンス
{
"elapse": "46.8694ms",
"reason": "success",
"success": true
}パッケージ
検索
GET /web/api/pkgs/search?name=pkg_name&possibles=10
クエリパラメーター
name: 検索するパッケージ名。空の場合は、インストール済みとおすすめのパッケージを返します。possibles: 類似するパッケージ候補の件数。possibles=0の場合は、指定した名前との完全一致だけを検索します。
レスポンス
{
"success": true,
"reason": "success",
"data":{},
"elapse": "547.1µs"
}同期
GET /web/api/pkgs/sync
パッケージ情報を同期します。
レスポンス
{
"success": true,
"reason": "success",
"elapse": "30.9144ms"
}インストール
GET /web/api/pkgs/install/:name
:name: インストールするパッケージ名。必須
レスポンス
{
"success": true,
"reason": "success",
"data":{}, // 値がなければ省略
"log":"",
"elapse": "23.1491ms"
}削除
GET /web/api/pkgs/uninstall/:name
:name: 削除するパッケージ名。必須
レスポンス
{
"success": true,
"reason": "success",
"data":{}, // 値がなければ省略
"log":"",
"elapse": "88.4133ms"
}その他
参考資料
GET /web/api/refs/*path
ReferenceGroup
{
"label": "グループ名",
"items":[{"ReferenceItem"}]
}ReferenceItem
{
"type": "type",
"title": "表示タイトル",
"address": "URLアドレス",
"target": "ブラウザーのリンク先"
}- type:
url,wrk,tql,sql - address:
serverfile://<path>接頭辞がある場合は、サーバー上のファイルを指し、 それ以外は、https://で始まる外部Web URLです。
SQL文の分割
POST /web/api/splitter/sql
{
"success": true,
"reason": "成功またはエラーの理由",
"elapse": "経過時間",
"data": {
"statements": [
{
"text": "-- env: bridge=sqlite",
"beginLine": 1,
"endLine": 1,
"isComment": true,
"env": {
"bridge": "sqlite",
"error": "`-- env: bridge=database`に構文エラーがある場合"
}
},
{
"text": "select * from table",
"beginLine": 2,
"endLine": 2,
"isComment": false,
"env": {
"bridge": "sqlite",
"error": "`-- env: bridge=database`に構文エラーがある場合"
}
},
{
"text": "-- comment",
"beginLine": 3,
"endLine": 3,
"isComment": true,
"env": {}
}
]
}
}ライセンス情報
GET /web/api/license
{
"success": true,
"reason": "成功またはエラーの理由",
"elapse": "経過時間",
"data": {
"id": "ライセンスID",
"type": "種類",
"customer": "顧客",
"project": "プロジェクト",
"countryCode": "国コード",
"installDate": "インストール日",
"issueDate": "ライセンス発行日"
}
}ライセンスのインストール
POST /web/api/license
ライセンスファイルをインストールします。
WebSocket
ws://127.0.0.1:5654/web/ui/console/{console_id}/data?token={jwt_token}console_idには、セッションを正しく管理するため、クライアントアプリケーションが生成した一意の識別子を指定します。
このエンドポイントでは、HTTPのAuthorizationヘッダーではなく、クエリパラメーター(token={jwt_token})でJWTトークンを渡します。
このエンドポイントでは、サーバーとクライアントがJSONオブジェクトを交換し、構造化された安全な形式で通信します。
PING
クライアントは、現在時刻をUNIXエポック形式で含むPINGメッセージを送信できます。 サーバーは同じペイロードを返すため、往復遅延時間を正確に測定できます。 この仕組みは、接続を維持し、アイドルタイムアウトを防ぐためにも役立ちます。
- 方向: C -> S
{
"type": "ping",
"ping": {
"tick": 1759127437000
}
}LOG
サーバーは、ユーザー向けのメッセージで状態更新やエラーを通知します。 状態、問題、対処方法を明確に伝え、操作や問題解決を支援します。
- 方向: S -> C
{
"type": "log",
"log": {
"timestamp": 1759127437000000000,
"level": "INFO",
"task": "task-name",
"message": "Fail to convert from string to number",
"repeat": 10
}
}- timestamp: ログの発生時刻。ナノ秒単位のUNIXエポック時刻です。
- level: ログの重要度。
"TRACE"、"DEBUG"、"INFO"、"WARN"、"ERROR"のいずれかです。 - task (省略可能): 関連する処理の名前。
- message: 説明メッセージ。
- repeat (省略可能): 同じログメッセージが連続して繰り返された回数。重複出力を減らすために使用します。
JSON-RPC
この節では、JSON-RPC仕様に従うWebSocketベースのリモートプロシージャ呼び出し(RPC)を説明します。 RPCでは、クライアントがサーバー側メソッドを呼び出して構造化された応答を受信でき、 クライアントアプリケーションとサーバーの通信・連携を容易にします。
Web UIは、管理機能用のJSON-RPCエンドポイントを提供します。
- HTTP POSTエンドポイント:
/web/api/rpc - WebSocketエンドポイント:
/web/api/console/:console_id/data?token={jwt_token}
単純なリクエスト・レスポンス形式の呼び出しには、/web/api/rpcを推奨します。
コンソールセッションとともに双方向メッセージを処理する場合は、/web/api/console/:console_id/data?token={jwt_token}を使用できます。
HTTP JSON-RPCのリクエスト形式
POST /web/api/rpc
リクエストの例:
{
"jsonrpc": "2.0",
"id": 1,
"method": "shell.list",
"params": []
}成功レスポンスの例:
{
"jsonrpc": "2.0",
"id": 1,
"result": []
}エラーレスポンスの例:
{
"jsonrpc": "2.0",
"id": 1,
"error": {
"code": -32000,
"message": "error message"
}
}注意:
- 応答のHTTPステータスは、通常は
200 OKです。 - 成功したかどうかは、HTTPステータスではなく
errorフィールドの有無で判断してください。
WebSocket JSON-RPCのリクエスト形式
ws://{server_address}/web/api/console/:console_id/data?token={jwt_token}
WebSocketでは、rpc_reqとrpc_rspイベントを使用します。
sessionフィールドは、UIクライアントが応答を関連付けるタブやビューを識別するための値です。
リクエスト
- 方向: C -> S
{
"type": "rpc_req",
"session": "{\"view\":\"shell-tab-2\",\"requestId\":\"req-001\"}",
"rpc": {
"jsonrpc": "2.0",
"id": 1234,
"method": "add",
"params": [1, 2]
}
}レスポンス
- 方向: S -> C
成功
{
"type": "rpc_rsp",
"session": "{\"view\":\"shell-tab-2\",\"requestId\":\"req-001\"}",
"rpc": {
"jsonrpc": "2.0",
"id": 1234,
"result": 3
}
}エラー
{
"type": "rpc_rsp",
"session": "{\"view\":\"shell-tab-2\",\"requestId\":\"req-001\"}",
"rpc": {
"jsonrpc": "2.0",
"id": 1234,
"error": {
"code": -32000,
"message": "some error message"
}
}
}Markdown
markdown.render
markdown.render(markdown, darkMode, referer)
パラメーター
markdownstringdarkModeboolrefererstring - 参照元URL
戻り値
string|error
リクエスト・レスポンスのJSON
リクエスト
{
"type": "rpc_req",
"session": "client-session-#1",
"rpc": {
"jsonrpc": "2.0",
"id": 20,
"method": "markdown.render",
"params": [
"string",
false,
"string"
]
}
}レスポンス
{
"type": "rpc_rsp",
"session": "client-session-#1",
"rpc": {
"jsonrpc": "2.0",
"id": 20,
"result": "string"
}
}server.info.statz
server.info.statz(names)
パラメーター
namesarray- メトリクス名
戻り値
object<ServerStatzResponse>|error- 名前ごとにグループ化した可視化仕様
リクエスト・レスポンスのJSON
リクエスト
{
"type": "rpc_req",
"session": "client-session-#1",
"rpc": {
"jsonrpc": "2.0",
"id": 20,
"method": "server.info.statz",
"params": [
[]
]
}
}レスポンス
{
"type": "rpc_rsp",
"session": "client-session-#1",
"rpc": {
"jsonrpc": "2.0",
"id": 20,
"result": {}
}
}server.info.query
server.info.query(maxRows, pattern)
パラメーター
maxRowsint - 最大行数patternarray- メトリクスキーのワイルドカードフィルター
戻り値
object<StatzQueryResult>|error- 表形式のメトリクスクエリ結果
リクエスト・レスポンスのJSON
リクエスト
{
"type": "rpc_req",
"session": "client-session-#1",
"rpc": {
"jsonrpc": "2.0",
"id": 20,
"method": "server.info.query",
"params": [
0,
[]
]
}
}レスポンス
{
"type": "rpc_rsp",
"session": "client-session-#1",
"rpc": {
"jsonrpc": "2.0",
"id": 20,
"result": {}
}
}server.info.keys
server.info.keys(pattern)
パラメーター
patternarray- メトリクスキーのワイルドカードフィルター
戻り値
array<string>|error- ソート済みのメトリクスキー名
リクエスト・レスポンスのJSON
リクエスト
{
"type": "rpc_req",
"session": "client-session-#1",
"rpc": {
"jsonrpc": "2.0",
"id": 20,
"method": "server.info.keys",
"params": [
[]
]
}
}レスポンス
{
"type": "rpc_rsp",
"session": "client-session-#1",
"rpc": {
"jsonrpc": "2.0",
"id": 20,
"result": []
}
}Vizspec
vizspec.render
vizspec.render(vizspec)
パラメーター
vizspecobject
戻り値
object|error
リクエスト・レスポンスのJSON
リクエスト
{
"type": "rpc_req",
"session": "client-session-#1",
"rpc": {
"jsonrpc": "2.0",
"id": 20,
"method": "vizspec.render",
"params": [
{}
]
}
}レスポンス
{
"type": "rpc_rsp",
"session": "client-session-#1",
"rpc": {
"jsonrpc": "2.0",
"id": 20,
"result": {}
}
}vizspec.export
vizspec.export(vizspec, format)
パラメーター
vizspecobjectformatstring
戻り値
object|error
リクエスト・レスポンスのJSON
リクエスト
{
"type": "rpc_req",
"session": "client-session-#1",
"rpc": {
"jsonrpc": "2.0",
"id": 20,
"method": "vizspec.export",
"params": [
{},
"string"
]
}
}レスポンス
{
"type": "rpc_rsp",
"session": "client-session-#1",
"rpc": {
"jsonrpc": "2.0",
"id": 20,
"result": {}
}
}サーバー
server.info.get
server.info.get()
パラメーター
- なし
戻り値
object<ServerInfoResponse>|error
リクエスト・レスポンスのJSON
リクエスト
{
"type": "rpc_req",
"session": "client-session-#1",
"rpc": {
"jsonrpc": "2.0",
"id": 20,
"method": "server.info.get",
"params": []
}
}レスポンス
{
"type": "rpc_rsp",
"session": "client-session-#1",
"rpc": {
"jsonrpc": "2.0",
"id": 20,
"result": {}
}
}server.certificate.get
server.certificate.get()
パラメーター
- なし
戻り値
string|error
リクエスト・レスポンスのJSON
リクエスト
{
"type": "rpc_req",
"session": "client-session-#1",
"rpc": {
"jsonrpc": "2.0",
"id": 20,
"method": "server.certificate.get",
"params": []
}
}レスポンス
{
"type": "rpc_rsp",
"session": "client-session-#1",
"rpc": {
"jsonrpc": "2.0",
"id": 20,
"result": "string"
}
}server.shutdown
管理サーバーが実装します。
server.shutdown()
パラメーター
- なし
戻り値
object<ShutdownResponse>|error
リクエスト・レスポンスのJSON
リクエスト
{
"type": "rpc_req",
"session": "client-session-#1",
"rpc": {
"jsonrpc": "2.0",
"id": 20,
"method": "server.shutdown",
"params": []
}
}レスポンス
{
"type": "rpc_rsp",
"session": "client-session-#1",
"rpc": {
"jsonrpc": "2.0",
"id": 20,
"result": {}
}
}サービス
service.port.list
service.port.list(svc)
パラメーター
svcstring
戻り値
array<object<model.ServicePort>>|error
リクエスト・レスポンスのJSON
リクエスト
{
"type": "rpc_req",
"session": "client-session-#1",
"rpc": {
"jsonrpc": "2.0",
"id": 20,
"method": "service.port.list",
"params": [
"string"
]
}
}レスポンス
{
"type": "rpc_rsp",
"session": "client-session-#1",
"rpc": {
"jsonrpc": "2.0",
"id": 20,
"result": []
}
}プロキシ
proxy.register
proxy.register(req)
パラメーター
reqobject
戻り値
object<ProxyEntrySnapshot>|error
リクエスト・レスポンスのJSON
リクエスト
{
"type": "rpc_req",
"session": "client-session-#1",
"rpc": {
"jsonrpc": "2.0",
"id": 20,
"method": "proxy.register",
"params": [
{}
]
}
}レスポンス
{
"type": "rpc_rsp",
"session": "client-session-#1",
"rpc": {
"jsonrpc": "2.0",
"id": 20,
"result": {}
}
}proxy.unregister
proxy.unregister(req)
パラメーター
reqobject
戻り値
array<object<ProxyEntrySnapshot>>|error
リクエスト・レスポンスのJSON
リクエスト
{
"type": "rpc_req",
"session": "client-session-#1",
"rpc": {
"jsonrpc": "2.0",
"id": 20,
"method": "proxy.unregister",
"params": [
{}
]
}
}レスポンス
{
"type": "rpc_rsp",
"session": "client-session-#1",
"rpc": {
"jsonrpc": "2.0",
"id": 20,
"result": []
}
}proxy.list
proxy.list(service)
パラメーター
servicestring
戻り値
array<object<ProxyEntrySnapshot>>|error
リクエスト・レスポンスのJSON
リクエスト
{
"type": "rpc_req",
"session": "client-session-#1",
"rpc": {
"jsonrpc": "2.0",
"id": 20,
"method": "proxy.list",
"params": [
"string"
]
}
}レスポンス
{
"type": "rpc_rsp",
"session": "client-session-#1",
"rpc": {
"jsonrpc": "2.0",
"id": 20,
"result": []
}
}proxy.get
proxy.get(req)
パラメーター
reqobject
戻り値
object<ProxyEntrySnapshot>|error
リクエスト・レスポンスのJSON
リクエスト
{
"type": "rpc_req",
"session": "client-session-#1",
"rpc": {
"jsonrpc": "2.0",
"id": 20,
"method": "proxy.get",
"params": [
{}
]
}
}レスポンス
{
"type": "rpc_rsp",
"session": "client-session-#1",
"rpc": {
"jsonrpc": "2.0",
"id": 20,
"result": {}
}
}シェル
shell.list
shell.list()
パラメーター
- なし
戻り値
array<object<model.ShellDefinition>>|error
リクエスト・レスポンスのJSON
リクエスト
{
"type": "rpc_req",
"session": "client-session-#1",
"rpc": {
"jsonrpc": "2.0",
"id": 20,
"method": "shell.list",
"params": []
}
}レスポンス
{
"type": "rpc_rsp",
"session": "client-session-#1",
"rpc": {
"jsonrpc": "2.0",
"id": 20,
"result": []
}
}shell.add
shell.add(name, command)
パラメーター
namestringcommandstring
戻り値
string|error
リクエスト・レスポンスのJSON
リクエスト
{
"type": "rpc_req",
"session": "client-session-#1",
"rpc": {
"jsonrpc": "2.0",
"id": 20,
"method": "shell.add",
"params": [
"string",
"string"
]
}
}レスポンス
{
"type": "rpc_rsp",
"session": "client-session-#1",
"rpc": {
"jsonrpc": "2.0",
"id": 20,
"result": "string"
}
}shell.delete
shell.delete(id)
パラメーター
idstring
戻り値
null|error
リクエスト・レスポンスのJSON
リクエスト
{
"type": "rpc_req",
"session": "client-session-#1",
"rpc": {
"jsonrpc": "2.0",
"id": 20,
"method": "shell.delete",
"params": [
"string"
]
}
}レスポンス
{
"type": "rpc_rsp",
"session": "client-session-#1",
"rpc": {
"jsonrpc": "2.0",
"id": 20,
"result": null
}
}ブリッジ
bridge.list
bridge.list()
パラメーター
- なし
戻り値
array<object<bridge.BridgeInfo>>|error
リクエスト・レスポンスのJSON
リクエスト
{
"type": "rpc_req",
"session": "client-session-#1",
"rpc": {
"jsonrpc": "2.0",
"id": 20,
"method": "bridge.list",
"params": []
}
}レスポンス
{
"type": "rpc_rsp",
"session": "client-session-#1",
"rpc": {
"jsonrpc": "2.0",
"id": 20,
"result": []
}
}bridge.get
bridge.get(name)
パラメーター
namestring
戻り値
object<bridge.BridgeInfo>|error
リクエスト・レスポンスのJSON
リクエスト
{
"type": "rpc_req",
"session": "client-session-#1",
"rpc": {
"jsonrpc": "2.0",
"id": 20,
"method": "bridge.get",
"params": [
"string"
]
}
}レスポンス
{
"type": "rpc_rsp",
"session": "client-session-#1",
"rpc": {
"jsonrpc": "2.0",
"id": 20,
"result": {}
}
}bridge.add
bridge.add(name, typ, conn)
パラメーター
namestringtypstringconnstring
戻り値
null|error
リクエスト・レスポンスのJSON
リクエスト
{
"type": "rpc_req",
"session": "client-session-#1",
"rpc": {
"jsonrpc": "2.0",
"id": 20,
"method": "bridge.add",
"params": [
"string",
"string",
"string"
]
}
}レスポンス
{
"type": "rpc_rsp",
"session": "client-session-#1",
"rpc": {
"jsonrpc": "2.0",
"id": 20,
"result": null
}
}bridge.delete
bridge.delete(name)
パラメーター
namestring
戻り値
null|error
リクエスト・レスポンスのJSON
リクエスト
{
"type": "rpc_req",
"session": "client-session-#1",
"rpc": {
"jsonrpc": "2.0",
"id": 20,
"method": "bridge.delete",
"params": [
"string"
]
}
}レスポンス
{
"type": "rpc_rsp",
"session": "client-session-#1",
"rpc": {
"jsonrpc": "2.0",
"id": 20,
"result": null
}
}bridge.test
bridge.test(name)
パラメーター
namestring
戻り値
bool|error
リクエスト・レスポンスのJSON
リクエスト
{
"type": "rpc_req",
"session": "client-session-#1",
"rpc": {
"jsonrpc": "2.0",
"id": 20,
"method": "bridge.test",
"params": [
"string"
]
}
}レスポンス
{
"type": "rpc_rsp",
"session": "client-session-#1",
"rpc": {
"jsonrpc": "2.0",
"id": 20,
"result": false
}
}bridge.stats
bridge.stats(name)
パラメーター
namestring
戻り値
object<BridgeStats>|error
リクエスト・レスポンスのJSON
リクエスト
{
"type": "rpc_req",
"session": "client-session-#1",
"rpc": {
"jsonrpc": "2.0",
"id": 20,
"method": "bridge.stats",
"params": [
"string"
]
}
}レスポンス
{
"type": "rpc_rsp",
"session": "client-session-#1",
"rpc": {
"jsonrpc": "2.0",
"id": 20,
"result": {}
}
}bridge.exec
bridge.exec(name, command)
パラメーター
namestringcommandstring
戻り値
object<BridgeExecResult>|error
リクエスト・レスポンスのJSON
リクエスト
{
"type": "rpc_req",
"session": "client-session-#1",
"rpc": {
"jsonrpc": "2.0",
"id": 20,
"method": "bridge.exec",
"params": [
"string",
"string"
]
}
}レスポンス
{
"type": "rpc_rsp",
"session": "client-session-#1",
"rpc": {
"jsonrpc": "2.0",
"id": 20,
"result": {}
}
}bridge.query
bridge.query(name, query)
パラメーター
namestringquerystring
戻り値
object<BridgeQueryResult>|error
リクエスト・レスポンスのJSON
リクエスト
{
"type": "rpc_req",
"session": "client-session-#1",
"rpc": {
"jsonrpc": "2.0",
"id": 20,
"method": "bridge.query",
"params": [
"string",
"string"
]
}
}レスポンス
{
"type": "rpc_rsp",
"session": "client-session-#1",
"rpc": {
"jsonrpc": "2.0",
"id": 20,
"result": {}
}
}bridge.result.fetch
bridge.result.fetch(handle)
パラメーター
handlestring
戻り値
object<BridgeQueryRow>|error
リクエスト・レスポンスのJSON
リクエスト
{
"type": "rpc_req",
"session": "client-session-#1",
"rpc": {
"jsonrpc": "2.0",
"id": 20,
"method": "bridge.result.fetch",
"params": [
"string"
]
}
}レスポンス
{
"type": "rpc_rsp",
"session": "client-session-#1",
"rpc": {
"jsonrpc": "2.0",
"id": 20,
"result": {}
}
}bridge.result.close
bridge.result.close(handle)
パラメーター
handlestring
戻り値
null|error
リクエスト・レスポンスのJSON
リクエスト
{
"type": "rpc_req",
"session": "client-session-#1",
"rpc": {
"jsonrpc": "2.0",
"id": 20,
"method": "bridge.result.close",
"params": [
"string"
]
}
}レスポンス
{
"type": "rpc_rsp",
"session": "client-session-#1",
"rpc": {
"jsonrpc": "2.0",
"id": 20,
"result": null
}
}SSHキー
sshkey.list
sshkey.list()
パラメーター
- なし
戻り値
array<object<AuthorizedSshKey>>|error
リクエスト・レスポンスのJSON
リクエスト
{
"type": "rpc_req",
"session": "client-session-#1",
"rpc": {
"jsonrpc": "2.0",
"id": 20,
"method": "sshkey.list",
"params": []
}
}レスポンス
{
"type": "rpc_rsp",
"session": "client-session-#1",
"rpc": {
"jsonrpc": "2.0",
"id": 20,
"result": []
}
}sshkey.add
sshkey.add(keyType, key, comment)
パラメーター
keyTypestringkeystringcommentstring
戻り値
null|error
リクエスト・レスポンスのJSON
リクエスト
{
"type": "rpc_req",
"session": "client-session-#1",
"rpc": {
"jsonrpc": "2.0",
"id": 20,
"method": "sshkey.add",
"params": [
"string",
"string",
"string"
]
}
}レスポンス
{
"type": "rpc_rsp",
"session": "client-session-#1",
"rpc": {
"jsonrpc": "2.0",
"id": 20,
"result": null
}
}sshkey.delete
sshkey.delete(key)
パラメーター
keystring
戻り値
null|error
リクエスト・レスポンスのJSON
リクエスト
{
"type": "rpc_req",
"session": "client-session-#1",
"rpc": {
"jsonrpc": "2.0",
"id": 20,
"method": "sshkey.delete",
"params": [
"string"
]
}
}レスポンス
{
"type": "rpc_rsp",
"session": "client-session-#1",
"rpc": {
"jsonrpc": "2.0",
"id": 20,
"result": null
}
}キー
key.list
key.list()
パラメーター
- なし
戻り値
array<object<KeyInfo>>|error
リクエスト・レスポンスのJSON
リクエスト
{
"type": "rpc_req",
"session": "client-session-#1",
"rpc": {
"jsonrpc": "2.0",
"id": 20,
"method": "key.list",
"params": []
}
}レスポンス
{
"type": "rpc_rsp",
"session": "client-session-#1",
"rpc": {
"jsonrpc": "2.0",
"id": 20,
"result": []
}
}key.generate
key.generate(id, typ, notBefore, notAfter, store)
パラメーター
idstringtypstring - 生成するキーの種類。RSAまたはECDSAが必要notBeforeint64 - キーの有効期間の開始時刻(Unixタイムスタンプ、秒) 省略または0の場合は、現在時刻を使用しますnotAfterint64 - キーの有効期間の終了時刻(Unixタイムスタンプ、秒) 省略または0の場合は、既定の10年間を使用しますstorebool - キーペアをサーバーのキーストアに保存するかどうか
戻り値
any|error- 生成したキー情報id: キーペアの識別子certificate: キーペアの証明書key: キーペアの秘密鍵token: キーペアに関連付けられたトークンserverKey: サーバー証明書(storeがtrueの場合)zip: キーペアとサーバー証明書を含むZIPアーカイブ(storeがtrueの場合)
リクエスト・レスポンスのJSON
リクエスト
{
"type": "rpc_req",
"session": "client-session-#1",
"rpc": {
"jsonrpc": "2.0",
"id": 20,
"method": "key.generate",
"params": [
"string",
"string",
0,
0,
false
]
}
}レスポンス
{
"type": "rpc_rsp",
"session": "client-session-#1",
"rpc": {
"jsonrpc": "2.0",
"id": 20,
"result": {}
}
}key.delete
key.delete(id)
パラメーター
idstring
戻り値
null|error
リクエスト・レスポンスのJSON
リクエスト
{
"type": "rpc_req",
"session": "client-session-#1",
"rpc": {
"jsonrpc": "2.0",
"id": 20,
"method": "key.delete",
"params": [
"string"
]
}
}レスポンス
{
"type": "rpc_rsp",
"session": "client-session-#1",
"rpc": {
"jsonrpc": "2.0",
"id": 20,
"result": null
}
}スケジュール
schedule.list
schedule.list()
パラメーター
- なし
戻り値
array<object<scheduler.Schedule>>|error
リクエスト・レスポンスのJSON
リクエスト
{
"type": "rpc_req",
"session": "client-session-#1",
"rpc": {
"jsonrpc": "2.0",
"id": 20,
"method": "schedule.list",
"params": []
}
}レスポンス
{
"type": "rpc_rsp",
"session": "client-session-#1",
"rpc": {
"jsonrpc": "2.0",
"id": 20,
"result": []
}
}schedule.timer.add
schedule.timer.add(name, spec, command, autoStart)
パラメーター
namestringspecstringcommandstringautoStartbool
戻り値
null|error
リクエスト・レスポンスのJSON
リクエスト
{
"type": "rpc_req",
"session": "client-session-#1",
"rpc": {
"jsonrpc": "2.0",
"id": 20,
"method": "schedule.timer.add",
"params": [
"string",
"string",
"string",
false
]
}
}レスポンス
{
"type": "rpc_rsp",
"session": "client-session-#1",
"rpc": {
"jsonrpc": "2.0",
"id": 20,
"result": null
}
}schedule.subscriber.add
schedule.subscriber.add(name, bridge, command, autoStart, topic, qos)
パラメーター
namestringbridgestringcommandstringautoStartbooltopicstringqosint
戻り値
null|error
リクエスト・レスポンスのJSON
リクエスト
{
"type": "rpc_req",
"session": "client-session-#1",
"rpc": {
"jsonrpc": "2.0",
"id": 20,
"method": "schedule.subscriber.add",
"params": [
"string",
"string",
"string",
false,
"string",
0
]
}
}レスポンス
{
"type": "rpc_rsp",
"session": "client-session-#1",
"rpc": {
"jsonrpc": "2.0",
"id": 20,
"result": null
}
}schedule.delete
schedule.delete(name)
パラメーター
namestring
戻り値
null|error
リクエスト・レスポンスのJSON
リクエスト
{
"type": "rpc_req",
"session": "client-session-#1",
"rpc": {
"jsonrpc": "2.0",
"id": 20,
"method": "schedule.delete",
"params": [
"string"
]
}
}レスポンス
{
"type": "rpc_rsp",
"session": "client-session-#1",
"rpc": {
"jsonrpc": "2.0",
"id": 20,
"result": null
}
}schedule.start
schedule.start(name)
パラメーター
namestring
戻り値
null|error
リクエスト・レスポンスのJSON
リクエスト
{
"type": "rpc_req",
"session": "client-session-#1",
"rpc": {
"jsonrpc": "2.0",
"id": 20,
"method": "schedule.start",
"params": [
"string"
]
}
}レスポンス
{
"type": "rpc_rsp",
"session": "client-session-#1",
"rpc": {
"jsonrpc": "2.0",
"id": 20,
"result": null
}
}schedule.stop
schedule.stop(name)
パラメーター
namestring
戻り値
null|error
リクエスト・レスポンスのJSON
リクエスト
{
"type": "rpc_req",
"session": "client-session-#1",
"rpc": {
"jsonrpc": "2.0",
"id": 20,
"method": "schedule.stop",
"params": [
"string"
]
}
}レスポンス
{
"type": "rpc_rsp",
"session": "client-session-#1",
"rpc": {
"jsonrpc": "2.0",
"id": 20,
"result": null
}
}HTTP
http.debug.set
http.debug.set(m)
パラメーター
mobject - enableとlogLatencyキーを持つデバッグ設定マップ
戻り値
object|error
リクエスト・レスポンスのJSON
リクエスト
{
"type": "rpc_req",
"session": "client-session-#1",
"rpc": {
"jsonrpc": "2.0",
"id": 20,
"method": "http.debug.set",
"params": [
{}
]
}
}レスポンス
{
"type": "rpc_rsp",
"session": "client-session-#1",
"rpc": {
"jsonrpc": "2.0",
"id": 20,
"result": {}
}
}http.split
http.split(content)
パラメーター
contentstring - HTTPスクリプトのテキスト
戻り値
array<object<util.HttpStatement>>|error- 解析したHTTP文の配列
リクエスト・レスポンスのJSON
リクエスト
{
"type": "rpc_req",
"session": "client-session-#1",
"rpc": {
"jsonrpc": "2.0",
"id": 20,
"method": "http.split",
"params": [
"string"
]
}
}レスポンス
{
"type": "rpc_rsp",
"session": "client-session-#1",
"rpc": {
"jsonrpc": "2.0",
"id": 20,
"result": []
}
}セッション
session.list
session.list()
パラメーター
- なし
戻り値
array<object<Session>>|error
リクエスト・レスポンスのJSON
リクエスト
{
"type": "rpc_req",
"session": "client-session-#1",
"rpc": {
"jsonrpc": "2.0",
"id": 20,
"method": "session.list",
"params": []
}
}レスポンス
{
"type": "rpc_rsp",
"session": "client-session-#1",
"rpc": {
"jsonrpc": "2.0",
"id": 20,
"result": []
}
}session.kill
session.kill(id, force)
パラメーター
idstringforcebool
戻り値
null|error
リクエスト・レスポンスのJSON
リクエスト
{
"type": "rpc_req",
"session": "client-session-#1",
"rpc": {
"jsonrpc": "2.0",
"id": 20,
"method": "session.kill",
"params": [
"string",
false
]
}
}レスポンス
{
"type": "rpc_rsp",
"session": "client-session-#1",
"rpc": {
"jsonrpc": "2.0",
"id": 20,
"result": null
}
}session.stat
session.stat(reset)
パラメーター
resetbool
戻り値
object<server_api.Statz>|error
リクエスト・レスポンスのJSON
リクエスト
{
"type": "rpc_req",
"session": "client-session-#1",
"rpc": {
"jsonrpc": "2.0",
"id": 20,
"method": "session.stat",
"params": [
false
]
}
}レスポンス
{
"type": "rpc_rsp",
"session": "client-session-#1",
"rpc": {
"jsonrpc": "2.0",
"id": 20,
"result": {}
}
}session.limit.get
session.limit.get()
パラメーター
- なし
戻り値
object<SessionLimit>|error
リクエスト・レスポンスのJSON
リクエスト
{
"type": "rpc_req",
"session": "client-session-#1",
"rpc": {
"jsonrpc": "2.0",
"id": 20,
"method": "session.limit.get",
"params": []
}
}レスポンス
{
"type": "rpc_rsp",
"session": "client-session-#1",
"rpc": {
"jsonrpc": "2.0",
"id": 20,
"result": {}
}
}session.limit.set
session.limit.set(m)
パラメーター
mobject
戻り値
null|error
リクエスト・レスポンスのJSON
リクエスト
{
"type": "rpc_req",
"session": "client-session-#1",
"rpc": {
"jsonrpc": "2.0",
"id": 20,
"method": "session.limit.set",
"params": [
{}
]
}
}レスポンス
{
"type": "rpc_rsp",
"session": "client-session-#1",
"rpc": {
"jsonrpc": "2.0",
"id": 20,
"result": null
}
}SQL
sql.split
sql.split(content)
パラメーター
contentstring
戻り値
array<object<util.SqlStatement>>|error
リクエスト・レスポンスのJSON
リクエスト
{
"type": "rpc_req",
"session": "client-session-#1",
"rpc": {
"jsonrpc": "2.0",
"id": 20,
"method": "sql.split",
"params": [
"string"
]
}
}レスポンス
{
"type": "rpc_rsp",
"session": "client-session-#1",
"rpc": {
"jsonrpc": "2.0",
"id": 20,
"result": []
}
}LSP
lsp.diagnostics
lsp.diagnostics(req)
パラメーター
reqobject
戻り値
object|error
リクエスト・レスポンスのJSON
リクエスト
{
"type": "rpc_req",
"session": "client-session-#1",
"rpc": {
"jsonrpc": "2.0",
"id": 20,
"method": "lsp.diagnostics",
"params": [
{}
]
}
}レスポンス
{
"type": "rpc_rsp",
"session": "client-session-#1",
"rpc": {
"jsonrpc": "2.0",
"id": 20,
"result": {}
}
}lsp.completion
lsp.completion(req)
パラメーター
reqobject
戻り値
object|error
リクエスト・レスポンスのJSON
リクエスト
{
"type": "rpc_req",
"session": "client-session-#1",
"rpc": {
"jsonrpc": "2.0",
"id": 20,
"method": "lsp.completion",
"params": [
{}
]
}
}レスポンス
{
"type": "rpc_rsp",
"session": "client-session-#1",
"rpc": {
"jsonrpc": "2.0",
"id": 20,
"result": {}
}
}lsp.hover
lsp.hover(req)
パラメーター
reqobject
戻り値
object|error
リクエスト・レスポンスのJSON
リクエスト
{
"type": "rpc_req",
"session": "client-session-#1",
"rpc": {
"jsonrpc": "2.0",
"id": 20,
"method": "lsp.hover",
"params": [
{}
]
}
}レスポンス
{
"type": "rpc_rsp",
"session": "client-session-#1",
"rpc": {
"jsonrpc": "2.0",
"id": 20,
"result": {}
}
}lsp.signature
lsp.signature(req)
パラメーター
reqobject
戻り値
object|error
リクエスト・レスポンスのJSON
リクエスト
{
"type": "rpc_req",
"session": "client-session-#1",
"rpc": {
"jsonrpc": "2.0",
"id": 20,
"method": "lsp.signature",
"params": [
{}
]
}
}レスポンス
{
"type": "rpc_rsp",
"session": "client-session-#1",
"rpc": {
"jsonrpc": "2.0",
"id": 20,
"result": {}
}
}lsp.metadata
lsp.metadata(req)
パラメーター
reqobject
戻り値
object|error
リクエスト・レスポンスのJSON
リクエスト
{
"type": "rpc_req",
"session": "client-session-#1",
"rpc": {
"jsonrpc": "2.0",
"id": 20,
"method": "lsp.metadata",
"params": [
{}
]
}
}レスポンス
{
"type": "rpc_rsp",
"session": "client-session-#1",
"rpc": {
"jsonrpc": "2.0",
"id": 20,
"result": {}
}
}