Files
xrpl-dev-portal/@i18n/ja/docs/references/http-websocket-apis/public-api-methods/clio-methods/version.md
2024-10-28 14:58:24 +09:00

2.6 KiB

seo, labels
seo labels
description
APIバージョン情報を取得します。
コアサーバ

version

[ソース]

versionコマンドは、ClioサーバのAPIバージョン情報を取得します。rippledサーバーの場合は、代わりにversion (rippled)をご覧ください。{% badge href="https://github.com/XRPLF/clio/releases/tag/1.0.0" %}新規: Clio v2.0.0{% /badge %}

リクエストのフォーマット

リクエストフォーマットの例:

{% tabs %}

{% tab label="WebSocket" %}

{
    "command": "version"
}

{% /tab %}

{% tab label="JSON-RPC" %}

{
    "method": "version",
    "params": [
        {}
    ]
}

{% /tab %}

{% /tabs %}

リクエストはパラメーターを必要としません。

レスポンスのフォーマット

成功したレスポンスの例:

{% tabs %}

{% tab label="WebSocket" %}

{
  "result": {
    "version": {
      "first": 1,
      "last": 2,
      "good": 1
    }
  },
  "status": "success",
  "type": "response",
  "warnings": [
    {
      "id": 2001,
      "message": "This is a clio server. clio only serves validated data. If you want to talk to rippled, include 'ledger_index':'current' in your request"
    }
  ]
}

{% /tab %}

{% tab label="JSON-RPC" %}

200 OK

{
    "result": {
      "version": {
        "first": 1,
        "last": 2,
        "good": 1
      }
    },
    "status": "success",
    "type": "response",
    "warnings": [
        {
            "id":2001,
            "message":"This is a clio server. clio only serves validated data. If you want to talk to rippled, include 'ledger_index':'current' in your request"
        }
    ]
}

{% /tab %}

{% /tabs %}

レスポンスは[標準フォーマット][]に従い、成功した結果はinfoオブジェクトのみを含むものとなります。

versionオブジェクトは、次のフィールドのいずれかを返します。

フィールド 説明
first 文字列 サポートされる最低のAPIリリース
last 文字列 サポートされる最高のAPIリリース
good 文字列 指定されていない場合のデフォルトのAPI

考えられるエラー

  • [汎用エラータイプ][]のいずれか。

{% raw-partial file="/docs/_snippets/common-links.md" /%}