Rename API method categories

This commit is contained in:
mDuo13
2022-06-28 04:09:37 -07:00
parent 42117756c6
commit 3458809228
160 changed files with 279 additions and 257 deletions

View File

@@ -0,0 +1,109 @@
---
html: connect.html
parent: peer-management-methods.html
blurb: 特定のピアrippledサーバーに強制的に接続します。
labels:
- コアサーバー
---
# connect
[[ソース]](https://github.com/ripple/rippled/blob/a61ffab3f9010d8accfaa98aa3cacc7d38e74121/src/ripple/rpc/handlers/Connect.cpp "Source")
`connect`コマンドは、`rippled`サーバーを特定のピア`rippled`サーバーに強制的に接続します。
*`connect`要求は、権限のないユーザーは実行できない[管理メソッド](admin-api-methods.html)です。*
### 要求フォーマット
要求フォーマットの例:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```json
{
"command": "connect",
"ip": "192.170.145.88",
"port": 51235
}
```
*JSON-RPC*
```json
{
"method": "connect",
"params": [
{
"ip": "192.170.145.88",
"port": 51235
}
]
}
```
*コマンドライン*
```sh
#Syntax: connect ip [port]
rippled connect 192.170.145.88 51235
```
<!-- MULTICODE_BLOCK_END -->
要求には以下のパラメーターが含まれます。
| `Field` | 型 | 説明 |
|:--------|:-------|:----------------------------------------------------------|
| `ip` | 文字列 | 接続するサーバーのIPアドレス。 |
| `port` | 数値 | _省略可_ 接続時に使用するポート番号。デフォルトでは**2459**です。 [新規: rippled 1.6.0][] |
### 応答フォーマット
処理が成功した応答の例:
<!-- MULTICODE_BLOCK_START -->
*JSON-RPC*
```json
{
"result" : {
"message" : "connecting",
"status" : "success"
}
}
```
*コマンドライン*
```json
Loading: "/etc/rippled.cfg"
Connecting to 127.0.0.1:5005
{
"result" : {
"message" : "connecting",
"status" : "success"
}
}
```
<!-- MULTICODE_BLOCK_END -->
この応答は[標準フォーマット][]に従っており、正常に完了した場合は結果に次のフィールドが含まれています。
| `Field` | 型 | 説明 |
|:----------|:-------|:-------------------------------------------------------|
| `message` | 文字列 | コマンドが成功した場合の値は`connecting`。 |
### 考えられるエラー
* [汎用エラータイプ][]のすべて。
* `invalidParams` - 1つ以上のフィールドの指定が正しくないか、1つ以上の必須フィールドが指定されていません。
* スタンドアロンモードでは接続できません - スタンドアロンモードではネットワーク関連のコマンドが無効にされています。
<!--{# common link defs #}-->
{% include '_snippets/rippled-api-links.md' %}
{% include '_snippets/tx-type-links.md' %}
{% include '_snippets/rippled_versions.md' %}

View File

@@ -0,0 +1,110 @@
---
html: connect.html
parent: peer-management-methods.html
blurb: Force the rippled server to connect to a specific peer.
labels:
- Core Server
---
# connect
[[Source]](https://github.com/ripple/rippled/blob/a61ffab3f9010d8accfaa98aa3cacc7d38e74121/src/ripple/rpc/handlers/Connect.cpp "Source")
The `connect` command forces the `rippled` server to connect to a specific peer `rippled` server.
*The `connect` method is an [admin method](admin-api-methods.html) that cannot be run by unprivileged users!*
### Request Format
An example of the request format:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```json
{
"command": "connect",
"ip": "192.170.145.88",
"port": 51235
}
```
*JSON-RPC*
```json
{
"method": "connect",
"params": [
{
"ip": "192.170.145.88",
"port": 51235
}
]
}
```
*Commandline*
```sh
#Syntax: connect ip [port]
rippled connect 192.170.145.88 51235
```
<!-- MULTICODE_BLOCK_END -->
The request includes the following parameters:
| `Field` | Type | Description |
|:--------|:-------|:----------------------------------------------------------|
| `ip` | String | IP address of the server to connect to |
| `port` | Number | _(Optional)_ Port number to use when connecting. The default is **2459**. [Updated in: rippled 1.6.0][] |
### Response Format
An example of a successful response:
<!-- MULTICODE_BLOCK_START -->
*JSON-RPC*
```json
{
"result" : {
"message" : "connecting",
"status" : "success"
}
}
```
*Commandline*
```json
Loading: "/etc/rippled.cfg"
Connecting to 127.0.0.1:5005
{
"result" : {
"message" : "connecting",
"status" : "success"
}
}
```
<!-- MULTICODE_BLOCK_END -->
The response follows the [standard format][], with a successful result containing the following fields:
| `Field` | Type | Description |
|:----------|:-------|:-------------------------------------------------------|
| `message` | String | The value `connecting`, if the command was successful. |
### Possible Errors
- Any of the [universal error types][].
- `invalidParams` - One or more fields are specified incorrectly, or one or more required fields are missing.
- Cannot connect in standalone mode - Network-related commands are disabled in stand-alone mode.
- `reportingUnsupported` - ([Reporting Mode][] servers only) This method is not available in Reporting Mode.
<!--{# common link defs #}-->
{% include '_snippets/rippled-api-links.md' %}
{% include '_snippets/tx-type-links.md' %}
{% include '_snippets/rippled_versions.md' %}

View File

@@ -0,0 +1,143 @@
---
html: peer_reservations_add.html
parent: peer-management-methods.html
blurb: 特定のピアサーバー用の予約済みスロットを追加します。
labels:
- コアサーバー
---
# peer_reservations_add
[[ソース]](https://github.com/ripple/rippled/blob/4a1148eb2849513dd1e7ae080288fd47ab57a376/src/ripple/rpc/handlers/Reservations.cpp#L36 "Source")
この`{{currentpage.name}}`メソッドは、XRP Ledger[ピアツーピアネットワーク](peer-protocol.html)内の特定のピアサーバーの予約済みスロットを追加または更新します。[新規: rippled 1.4.0][]
_`{{currentpage.name}}`メソッドは、権限のないユーザーは実行できない[管理メソッド](admin-api-methods.html)です。_
### 要求フォーマット
要求フォーマットの例:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```json
{
"id": "peer_reservations_add_example_1",
"command": "{{currentpage.name}}",
"public_key": "n9Jt8awsPzWLjBCNKVEEDQnw4bQEPjezfcQ4gttD1UzbLT1FoG99",
"description": "Ripple s1 server 'WOOL'"
}
```
*JSON-RPC*
```json
{
"method": "{{currentpage.name}}",
"params": [{
"public_key": "n9Jt8awsPzWLjBCNKVEEDQnw4bQEPjezfcQ4gttD1UzbLT1FoG99",
"description": "Ripple s1 server 'WOOL'"
}]
}
```
*コマンドライン*
```sh
#Syntax: {{currentpage.name}} <public_key> [<description>]
rippled {{currentpage.name}} n9Jt8awsPzWLjBCNKVEEDQnw4bQEPjezfcQ4gttD1UzbLT1FoG99 "Ripple s1 server 'WOOL'"
```
<!-- MULTICODE_BLOCK_END -->
要求には以下のパラメーターが含まれます。
| `Field` | 型 | 説明 |
|:--------------|:-------|:----------------------------------------------------|
| `public_key` | 文字列 | [base58][]での予約を追加するピアリザベーションの[ノード公開鍵][] 。 |
| `description` | 文字列 | _(省略可)_ ピアリザベーションに関するカスタムの説明。64文字を超える部分は、再起動時にサーバーによって切り捨てられます。 |
### 応答フォーマット
処理が成功した応答の例:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```json
{
"id": "peer_reservations_add_example_1",
"result": {
"previous": {
"description": "Maecenas atavis edite regibus, O et praesidium et dulce decus meum, Sunt quos curriculo pulverem Olympicum Collegisse iuvat metaque fervidis Evitata rotis palmaque nobilis Terrarum dominos evehit ad deos; Hunc, si mobilium turba Quiritium Certat tergeminis tollere honoribus; Illum, si proprio condidit horreo, Quidquid de Libycis verritur areis.",
"node": "n9Jt8awsPzWLjBCNKVEEDQnw4bQEPjezfcQ4gttD1UzbLT1FoG99"
}
},
"status": "success",
"type": "response"
}
```
*JSON-RPC*
```json
{
"result": {
"previous": {
"description": "Maecenas atavis edite regibus, O et praesidium et dulce decus meum, Sunt quos curriculo pulverem Olympicum Collegisse iuvat metaque fervidis Evitata rotis palmaque nobilis Terrarum dominos evehit ad deos; Hunc, si mobilium turba Quiritium Certat tergeminis tollere honoribus; Illum, si proprio condidit horreo, Quidquid de Libycis verritur areis.",
"node": "n9Jt8awsPzWLjBCNKVEEDQnw4bQEPjezfcQ4gttD1UzbLT1FoG99"
},
"status": "success"
}
}
```
*コマンドライン*
```json
Loading: "/etc/rippled.cfg"
Connecting to 127.0.0.1:5005
{
"result": {
"previous": {
"description": "Maecenas atavis edite regibus, O et praesidium et dulce decus meum, Sunt quos curriculo pulverem Olympicum Collegisse iuvat metaque fervidis Evitata rotis palmaque nobilis Terrarum dominos evehit ad deos; Hunc, si mobilium turba Quiritium Certat tergeminis tollere honoribus; Illum, si proprio condidit horreo, Quidquid de Libycis verritur areis.",
"node": "n9Jt8awsPzWLjBCNKVEEDQnw4bQEPjezfcQ4gttD1UzbLT1FoG99"
},
"status": "success"
}
}
```
<!-- MULTICODE_BLOCK_END -->
この応答は[標準フォーマット][]に従っており、正常に完了した場合は結果に次のフィールドが含まれます。
| `Field` | 型 | 説明 |
|:-----------|:-------|:-------------------------------------------------------|
| `previous` | オブジェクト | _省略される場合があります_ 同じ[ノード公開鍵][]の以前のエントリ(同じノード公開鍵を使用した予約がすでに存在する場合)。以下で説明するように、このオブジェクトは、**ピアリザベーションオブジェクト**というフォーマットになります。 |
同じ[ノード公開鍵][]に以前のエントリがなかった場合、`result`オブジェクトは空です。
#### ピアリザベーションオブジェクト
`previous`フィールドが指定されている場合は、このピアリザベーションの以前のステータスが次のフィールドとともに表示されます。
{% include '_snippets/peer_reservation_object.ja.md' %}
<!--_ -->
### 考えられるエラー
- いずれかの[汎用エラータイプ][]。
- `invalidParams` - 1つ以上のフィールドの指定が正しくないか、1つ以上の必須フィールドが指定されていません。
- `publicMalformed` - 要求の`public_key`フィールドが無効です。[base58][]フォーマットの有効なノード公開鍵である必要があります。
<!--{# common link defs #}-->
{% include '_snippets/rippled-api-links.md' %}
{% include '_snippets/tx-type-links.md' %}
{% include '_snippets/rippled_versions.md' %}

View File

@@ -0,0 +1,144 @@
---
html: peer_reservations_add.html
parent: peer-management-methods.html
blurb: Add a reserved slot for a specific peer server.
labels:
- Core Server
---
# peer_reservations_add
[[Source]](https://github.com/ripple/rippled/blob/4a1148eb2849513dd1e7ae080288fd47ab57a376/src/ripple/rpc/handlers/Reservations.cpp#L36 "Source")
The `{{currentpage.name}}` method adds or updates a reserved slot for a specific peer server in the XRP Ledger [peer-to-peer network](peer-protocol.html). [New in: rippled 1.4.0][]
_The `{{currentpage.name}}` method is an [admin method](admin-api-methods.html) that cannot be run by unprivileged users._
### Request Format
An example of the request format:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```json
{
"id": "peer_reservations_add_example_1",
"command": "{{currentpage.name}}",
"public_key": "n9Jt8awsPzWLjBCNKVEEDQnw4bQEPjezfcQ4gttD1UzbLT1FoG99",
"description": "Ripple s1 server 'WOOL'"
}
```
*JSON-RPC*
```json
{
"method": "{{currentpage.name}}",
"params": [{
"public_key": "n9Jt8awsPzWLjBCNKVEEDQnw4bQEPjezfcQ4gttD1UzbLT1FoG99",
"description": "Ripple s1 server 'WOOL'"
}]
}
```
*Commandline*
```sh
#Syntax: {{currentpage.name}} <public_key> [<description>]
rippled {{currentpage.name}} n9Jt8awsPzWLjBCNKVEEDQnw4bQEPjezfcQ4gttD1UzbLT1FoG99 "Ripple s1 server 'WOOL'"
```
<!-- MULTICODE_BLOCK_END -->
The request includes the following parameters:
| `Field` | Type | Description |
|:--------------|:-------|:----------------------------------------------------|
| `public_key` | String | The [node public key][] of the peer reservation to add a reservation for, in [base58][]. |
| `description` | String | _(Optional)_ A custom description for the peer reservation. The server truncates descriptions longer than 64 characters when it restarts. |
### Response Format
An example of a successful response:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```json
{
"id": "peer_reservations_add_example_1",
"result": {
"previous": {
"description": "Maecenas atavis edite regibus, O et praesidium et dulce decus meum, Sunt quos curriculo pulverem Olympicum Collegisse iuvat metaque fervidis Evitata rotis palmaque nobilis Terrarum dominos evehit ad deos; Hunc, si mobilium turba Quiritium Certat tergeminis tollere honoribus; Illum, si proprio condidit horreo, Quidquid de Libycis verritur areis.",
"node": "n9Jt8awsPzWLjBCNKVEEDQnw4bQEPjezfcQ4gttD1UzbLT1FoG99"
}
},
"status": "success",
"type": "response"
}
```
*JSON-RPC*
```json
{
"result": {
"previous": {
"description": "Maecenas atavis edite regibus, O et praesidium et dulce decus meum, Sunt quos curriculo pulverem Olympicum Collegisse iuvat metaque fervidis Evitata rotis palmaque nobilis Terrarum dominos evehit ad deos; Hunc, si mobilium turba Quiritium Certat tergeminis tollere honoribus; Illum, si proprio condidit horreo, Quidquid de Libycis verritur areis.",
"node": "n9Jt8awsPzWLjBCNKVEEDQnw4bQEPjezfcQ4gttD1UzbLT1FoG99"
},
"status": "success"
}
}
```
*Commandline*
```json
Loading: "/etc/rippled.cfg"
Connecting to 127.0.0.1:5005
{
"result": {
"previous": {
"description": "Maecenas atavis edite regibus, O et praesidium et dulce decus meum, Sunt quos curriculo pulverem Olympicum Collegisse iuvat metaque fervidis Evitata rotis palmaque nobilis Terrarum dominos evehit ad deos; Hunc, si mobilium turba Quiritium Certat tergeminis tollere honoribus; Illum, si proprio condidit horreo, Quidquid de Libycis verritur areis.",
"node": "n9Jt8awsPzWLjBCNKVEEDQnw4bQEPjezfcQ4gttD1UzbLT1FoG99"
},
"status": "success"
}
}
```
<!-- MULTICODE_BLOCK_END -->
The response follows the [standard format][], with a successful result containing the following fields:
| `Field` | Type | Description |
|:-----------|:-------|:-------------------------------------------------------|
| `previous` | Object | _(May be omitted)_ The previous entry for the same [node public key][], if there was already a reservation with the same node public key. This object is formatted as a **Peer Reservation Object**, as described below. |
If there was not a previous entry for the same [node public key][], the `result` object is empty.
#### Peer Reservation Object
If the `previous` field is provided, it shows the previous status of this peer reservation, with the following fields:
{% include '_snippets/peer_reservation_object.md' %}
<!--_ -->
### Possible Errors
- Any of the [universal error types][].
- `invalidParams` - One or more fields are specified incorrectly, or one or more required fields are missing.
- `publicMalformed` - The `public_key` field of the request is not valid. It must be a valid node public key in [base58][] format.
- `reportingUnsupported` - ([Reporting Mode][] servers only) This method is not available in Reporting Mode.
<!--{# common link defs #}-->
{% include '_snippets/rippled-api-links.md' %}
{% include '_snippets/tx-type-links.md' %}
{% include '_snippets/rippled_versions.md' %}

View File

@@ -0,0 +1,140 @@
---
html: peer_reservations_del.html
parent: peer-management-methods.html
blurb: 特定のピアサーバー用の予約済みスロットを削除します。
labels:
- コアサーバー
---
# peer_reservations_del
[[ソース]](https://github.com/ripple/rippled/blob/4a1148eb2849513dd1e7ae080288fd47ab57a376/src/ripple/rpc/handlers/Reservations.cpp#L89 "Source")
`{{currentpage.name}}`メソッドは、特定の[ピアリザベーション][]を削除します(存在する場合)。[新規: rippled 1.4.0][]
_`{{currentpage.name}}`メソッドは、権限のないユーザーは実行できない[管理メソッド](admin-api-methods.html)です。_
**注記:** ピアリザベーションを削除しても、対応するピアが接続されている場合、そのピアは自動的に切断されません。
### 要求フォーマット
要求フォーマットの例:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```json
{
"id": "peer_reservations_del_example_1",
"command": "{{currentpage.name}}",
"public_key": "n9Jt8awsPzWLjBCNKVEEDQnw4bQEPjezfcQ4gttD1UzbLT1FoG99"
}
```
*JSON-RPC*
```json
{
"method": "{{currentpage.name}}",
"params": [{
"public_key": "n9Jt8awsPzWLjBCNKVEEDQnw4bQEPjezfcQ4gttD1UzbLT1FoG99"
}]
}
```
*コマンドライン*
```sh
#Syntax: {{currentpage.name}} <public_key>
rippled {{currentpage.name}} n9Jt8awsPzWLjBCNKVEEDQnw4bQEPjezfcQ4gttD1UzbLT1FoG99
```
<!-- MULTICODE_BLOCK_END -->
要求には以下のパラメーターが含まれます。
| `Field` | 型 | 説明 |
|:------------|:--------------------------|:-----------------------------------|
| `public_key` | 文字列 | 削除する[ピアリザベーション][]の[ノード公開鍵][][base58][]フォーマット) |
### 応答フォーマット
処理が成功した応答の例:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```json
{
"id": "peer_reservations_del_example_1",
"result": {
"previous": {
"description": "Ripple s1 server 'WOOL'",
"node": "n9Jt8awsPzWLjBCNKVEEDQnw4bQEPjezfcQ4gttD1UzbLT1FoG99"
}
},
"status": "success",
"type": "response"
}
```
*JSON-RPC*
```json
{
"result" : {
"previous" : {
"description" : "Ripple s1 server 'WOOL'",
"node" : "n9Jt8awsPzWLjBCNKVEEDQnw4bQEPjezfcQ4gttD1UzbLT1FoG99"
},
"status" : "success"
}
}
```
*コマンドライン*
```json
Loading: "/etc/rippled.cfg"
Connecting to 127.0.0.1:5005
{
"result" : {
"previous" : {
"description" : "Ripple s1 server 'WOOL'",
"node" : "n9Jt8awsPzWLjBCNKVEEDQnw4bQEPjezfcQ4gttD1UzbLT1FoG99"
},
"status" : "success"
}
}
```
<!-- MULTICODE_BLOCK_END -->
この応答は[標準フォーマット][]に従っており、正常に完了した場合は結果に次のフィールドが含まれます。
| `Field` | 型 | 説明 |
|:--------|:-------|:----------------------------------------------------------|
| `previous` | オブジェクト | _省略される場合があります_ 削除する前のピアリザベーションの最後のステータスを伴った、**ピアリザベーションオブジェクト**。このフィールドは、ピアリザベーションが正常に削除された場合、必ず表示されます。 |
**注記:** 指定された予約が存在しなかった場合は、このコマンドによって、成功を示す空の結果オブジェクトが返されます。この場合、`previous`フィールドは省略されます。
#### ピアリザベーションオブジェクト
`previous`フィールドが指定されている場合は、このピアリザベーションの以前のステータスが次のフィールドとともに表示されます。
{% include '_snippets/peer_reservation_object.ja.md' %}
<!--_ -->
### 考えられるエラー
- いずれかの[汎用エラータイプ][]。
- `invalidParams` - 1つ以上のフィールドの指定が正しくないか、1つ以上の必須フィールドが指定されていません。
- `publicMalformed` - 要求の`public_key`フィールドが無効です。[base58][]フォーマットの有効なノード公開鍵である必要があります。
<!--{# common link defs #}-->
{% include '_snippets/rippled-api-links.md' %}
{% include '_snippets/tx-type-links.md' %}
{% include '_snippets/rippled_versions.md' %}

View File

@@ -0,0 +1,140 @@
---
html: peer_reservations_del.html
parent: peer-management-methods.html
blurb: Remove a reserved slot for a specific peer server.
labels:
- Core Server
---
# peer_reservations_del
[[Source]](https://github.com/ripple/rippled/blob/4a1148eb2849513dd1e7ae080288fd47ab57a376/src/ripple/rpc/handlers/Reservations.cpp#L89 "Source")
The `{{currentpage.name}}` method removes a specific [peer reservation][], if one exists. [New in: rippled 1.4.0][]
_The `{{currentpage.name}}` method is an [admin method](admin-api-methods.html) that cannot be run by unprivileged users._
**Note:** Removing a peer reservation does not automatically disconnect the corresponding peer, if that peer is connected.
### Request Format
An example of the request format:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```json
{
"id": "peer_reservations_del_example_1",
"command": "{{currentpage.name}}",
"public_key": "n9Jt8awsPzWLjBCNKVEEDQnw4bQEPjezfcQ4gttD1UzbLT1FoG99"
}
```
*JSON-RPC*
```json
{
"method": "{{currentpage.name}}",
"params": [{
"public_key": "n9Jt8awsPzWLjBCNKVEEDQnw4bQEPjezfcQ4gttD1UzbLT1FoG99"
}]
}
```
*Commandline*
```sh
#Syntax: {{currentpage.name}} <public_key>
rippled {{currentpage.name}} n9Jt8awsPzWLjBCNKVEEDQnw4bQEPjezfcQ4gttD1UzbLT1FoG99
```
<!-- MULTICODE_BLOCK_END -->
The request includes the following parameter:
| `Field` | Type | Description |
|:------------|:--------------------------|:-----------------------------------|
| `public_key` | String | The [node public key][] of the [peer reservation][] to remove, in [base58][] format. |
### Response Format
An example of a successful response:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```json
{
"id": "peer_reservations_del_example_1",
"result": {
"previous": {
"description": "Ripple s1 server 'WOOL'",
"node": "n9Jt8awsPzWLjBCNKVEEDQnw4bQEPjezfcQ4gttD1UzbLT1FoG99"
}
},
"status": "success",
"type": "response"
}
```
*JSON-RPC*
```json
{
"result" : {
"previous" : {
"description" : "Ripple s1 server 'WOOL'",
"node" : "n9Jt8awsPzWLjBCNKVEEDQnw4bQEPjezfcQ4gttD1UzbLT1FoG99"
},
"status" : "success"
}
}
```
*Commandline*
```json
Loading: "/etc/rippled.cfg"
Connecting to 127.0.0.1:5005
{
"result" : {
"previous" : {
"description" : "Ripple s1 server 'WOOL'",
"node" : "n9Jt8awsPzWLjBCNKVEEDQnw4bQEPjezfcQ4gttD1UzbLT1FoG99"
},
"status" : "success"
}
}
```
<!-- MULTICODE_BLOCK_END -->
The response follows the [standard format][], with a successful result containing the following fields:
| `Field` | Type | Description |
|:--------|:-------|:----------------------------------------------------------|
| `previous` | Object | _(May be omitted)_ A **peer reservation object** with the last state of the peer reservation before deleting it. This field is always provided if a peer reservation was successfully deleted. |
**Note:** If the specified reservation did not exist, this command returns success with an empty result object. In this case, the `previous` field is omitted.
#### Peer Reservation Object
If the `previous` field is provided, it shows the previous status of this peer reservation, with the following fields:
{% include '_snippets/peer_reservation_object.md' %}
<!--_ -->
### Possible Errors
- Any of the [universal error types][].
- `invalidParams` - One or more fields are specified incorrectly, or one or more required fields are missing.
- `publicMalformed` - The `public_key` field of the request is not valid. It must be a valid node public key in [base58][] format.
- `reportingUnsupported` - ([Reporting Mode][] servers only) This method is not available in Reporting Mode.
<!--{# common link defs #}-->
{% include '_snippets/rippled-api-links.md' %}
{% include '_snippets/tx-type-links.md' %}
{% include '_snippets/rippled_versions.md' %}

View File

@@ -0,0 +1,141 @@
---
html: peer_reservations_list.html
parent: peer-management-methods.html
blurb: 特定のピアサーバー用の予約済みスロットをリスト表示します。
labels:
- コアサーバー
---
# peer_reservations_list
[[ソース]](https://github.com/ripple/rippled/blob/4a1148eb2849513dd1e7ae080288fd47ab57a376/src/ripple/rpc/handlers/Reservations.cpp#L116 "Source")
`{{currentpage.name}}`メソッドは、[ピアリザベーション][]を一覧表示します。[新規: rippled 1.4.0][]
_`{{currentpage.name}}`メソッドは、権限のないユーザーは実行できない[管理メソッド](admin-api-methods.html)です。_
### 要求フォーマット
要求フォーマットの例:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```json
{
"id": "peer_reservations_list_example_1",
"command": "{{currentpage.name}}"
}
```
*JSON-RPC*
```json
{
"method": "{{currentpage.name}}"
}
```
*コマンドライン*
```sh
#Syntax: {{currentpage.name}}
rippled {{currentpage.name}}
```
<!-- MULTICODE_BLOCK_END -->
この要求にはパラメーターは含まれません。
### 応答フォーマット
処理が成功した応答の例:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```json
{
"id": "peer_reservations_list_example_1",
"result": {
"reservations": [
{
"description": "Ripple s1 server 'WOOL'",
"node": "n9Jt8awsPzWLjBCNKVEEDQnw4bQEPjezfcQ4gttD1UzbLT1FoG99"
},
{
"node": "n9MZRo92mzYjjsa5XcqnPC7GFYAnENo9VfJzKmpcS9EFZvw5fgwz"
}
]
},
"status": "success",
"type": "response"
}
```
*JSON-RPC*
```json
{
"result" : {
"reservations" : [
{
"description" : "Ripple s1 server 'WOOL'",
"node" : "n9Jt8awsPzWLjBCNKVEEDQnw4bQEPjezfcQ4gttD1UzbLT1FoG99"
},
{
"node" : "n9MZRo92mzYjjsa5XcqnPC7GFYAnENo9VfJzKmpcS9EFZvw5fgwz"
}
],
"status" : "success"
}
}
```
*コマンドライン*
```json
Loading: "/etc/rippled.cfg"
2019-Dec-27 21:56:07.253260422 HTTPClient:NFO Connecting to 127.0.0.1:5005
{
"result" : {
"reservations" : [
{
"description" : "Ripple s1 server 'WOOL'",
"node" : "n9Jt8awsPzWLjBCNKVEEDQnw4bQEPjezfcQ4gttD1UzbLT1FoG99"
},
{
"node" : "n9MZRo92mzYjjsa5XcqnPC7GFYAnENo9VfJzKmpcS9EFZvw5fgwz"
}
],
"status" : "success"
}
}
```
<!-- MULTICODE_BLOCK_END -->
この応答は[標準フォーマット][]に従っており、正常に完了した場合は結果に次のフィールドが含まれます。
| `Field` | 型 | 説明 |
|:---------------|:------|:----------------------------------------------------|
| `reservations` | 配列 | 既存の[ピアリザベーション][]のリスト。各メンバーはピアリザベーションオブジェクトです。詳細は以下のとおりです。 |
#### ピアリザベーションオブジェクト
`reservations`配列の各メンバーは、1つの[ピアリザベーション][]を表すJSONオブジェクトです。このオブジェクトのフィールドを次に示します。
{% include '_snippets/peer_reservation_object.ja.md' %}
<!--_ -->
### 考えられるエラー
- いずれかの[汎用エラータイプ][]。
<!--{# common link defs #}-->
{% include '_snippets/rippled-api-links.md' %}
{% include '_snippets/tx-type-links.md' %}
{% include '_snippets/rippled_versions.md' %}

View File

@@ -0,0 +1,142 @@
---
html: peer_reservations_list.html
parent: peer-management-methods.html
blurb: List reserved slots for specific peer servers.
labels:
- Core Server
---
# peer_reservations_list
[[Source]](https://github.com/ripple/rippled/blob/4a1148eb2849513dd1e7ae080288fd47ab57a376/src/ripple/rpc/handlers/Reservations.cpp#L116 "Source")
The `{{currentpage.name}}` method lists [peer reservations][]. [New in: rippled 1.4.0][]
_The `{{currentpage.name}}` method is an [admin method](admin-api-methods.html) that cannot be run by unprivileged users._
### Request Format
An example of the request format:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```json
{
"id": "peer_reservations_list_example_1",
"command": "{{currentpage.name}}"
}
```
*JSON-RPC*
```json
{
"method": "{{currentpage.name}}"
}
```
*Commandline*
```sh
#Syntax: {{currentpage.name}}
rippled {{currentpage.name}}
```
<!-- MULTICODE_BLOCK_END -->
This request does not take any parameters.
### Response Format
An example of a successful response:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```json
{
"id": "peer_reservations_list_example_1",
"result": {
"reservations": [
{
"description": "Ripple s1 server 'WOOL'",
"node": "n9Jt8awsPzWLjBCNKVEEDQnw4bQEPjezfcQ4gttD1UzbLT1FoG99"
},
{
"node": "n9MZRo92mzYjjsa5XcqnPC7GFYAnENo9VfJzKmpcS9EFZvw5fgwz"
}
]
},
"status": "success",
"type": "response"
}
```
*JSON-RPC*
```json
{
"result" : {
"reservations" : [
{
"description" : "Ripple s1 server 'WOOL'",
"node" : "n9Jt8awsPzWLjBCNKVEEDQnw4bQEPjezfcQ4gttD1UzbLT1FoG99"
},
{
"node" : "n9MZRo92mzYjjsa5XcqnPC7GFYAnENo9VfJzKmpcS9EFZvw5fgwz"
}
],
"status" : "success"
}
}
```
*Commandline*
```json
Loading: "/etc/rippled.cfg"
2019-Dec-27 21:56:07.253260422 HTTPClient:NFO Connecting to 127.0.0.1:5005
{
"result" : {
"reservations" : [
{
"description" : "Ripple s1 server 'WOOL'",
"node" : "n9Jt8awsPzWLjBCNKVEEDQnw4bQEPjezfcQ4gttD1UzbLT1FoG99"
},
{
"node" : "n9MZRo92mzYjjsa5XcqnPC7GFYAnENo9VfJzKmpcS9EFZvw5fgwz"
}
],
"status" : "success"
}
}
```
<!-- MULTICODE_BLOCK_END -->
The response follows the [standard format][], with a successful result containing the following fields:
| `Field` | Type | Description |
|:---------------|:------|:----------------------------------------------------|
| `reservations` | Array | List of existing [peer reservations][]. Each member is a peer reservation object, as described below. |
#### Peer Reservation Object
Each member of the `reservations` array is a JSON object describing one [peer reservation][]. This object has the following fields:
{% include '_snippets/peer_reservation_object.md' %}
<!--_ -->
### Possible Errors
- Any of the [universal error types][].
- `reportingUnsupported` - ([Reporting Mode][] servers only) This method is not available in Reporting Mode.
<!--{# common link defs #}-->
{% include '_snippets/rippled-api-links.md' %}
{% include '_snippets/tx-type-links.md' %}
{% include '_snippets/rippled_versions.md' %}

View File

@@ -0,0 +1,422 @@
---
html: peers.html
parent: peer-management-methods.html
blurb: ピアプロトコルでこのサーバーに現在接続されているその他のすべてのrippledサーバーのリストを返します。
labels:
- コアサーバー
---
# peers
[[ソース]](https://github.com/ripple/rippled/blob/52f298f150fc1530d201d3140c80d3eaf781cb5f/src/ripple/rpc/handlers/Peers.cpp "Source")
`peers`コマンドは、[ピアプロトコル](peer-protocol.html)でこのサーバーに現在接続されているその他のすべての`rippled`サーバーのリスト(各サーバーの接続状況と同期状況を含む)を返します。
*`peers`要求は、権限のないユーザーは実行できない[管理メソッド](admin-api-methods.html)です。*
### 要求フォーマット
要求フォーマットの例:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```json
{
"id": 2,
"command": "peers"
}
```
*コマンドライン*
```
rippled peers
```
<!-- MULTICODE_BLOCK_END -->
この要求には追加パラメーターはありません。
### 応答フォーマット
処理が成功した応答の例:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```json
{
"id": 2,
"status": "success",
"type": "response",
"result": {
"cluster": {},
"peers": [
{
"address": "184.172.237.226:51235",
"complete_ledgers": "14534883 - 18828973",
"latency": 117,
"ledger": "50A2577CE6EB8A92847C443BDA45F5C5F0A22B9C6F4B47DBA0C12BDA75001D01",
"load": 54,
"public_key": "n9KNYm52mgcUQ7R2RA4kyw9Nk1yc6S35PaiuyqjYsy6UjhCXpw12",
"uptime": 55036,
"version": "rippled-0.30.0-hf1"
},
{
"address": "54.186.248.91:51235",
"complete_ledgers": "18827949 - 18828973",
"latency": 91,
"ledger": "50A2577CE6EB8A92847C443BDA45F5C5F0A22B9C6F4B47DBA0C12BDA75001D01",
"load": 62,
"public_key": "n9MT5EjnV912KGuBUqPs4tpdhzMPGcnDBrTuWkD9sWQHJ1kDcUcz",
"uptime": 83814,
"version": "rippled-0.30.1"
},
{
"address": "54.84.21.230:51235",
"complete_ledgers": "18827949 - 18828973",
"latency": 202,
"ledger": "50A2577CE6EB8A92847C443BDA45F5C5F0A22B9C6F4B47DBA0C12BDA75001D01",
"load": 60,
"public_key": "n9KJb7NMxGySRcjCqh69xEPMUhwJx22qntYYXsnUqYgjsJhNoW7g",
"uptime": 99625,
"version": "rippled-0.30.1"
},
{
"address": "72.251.233.162:51235",
"complete_ledgers": "18827949 - 18828973",
"latency": 36,
"ledger": "50A2577CE6EB8A92847C443BDA45F5C5F0A22B9C6F4B47DBA0C12BDA75001D01",
"load": 66,
"public_key": "n9M8RSk6hrvXZKFQ6CxPbJsjt73xW1xsnjn7G69VAMbE2j4sBQNQ",
"uptime": 99619,
"version": "rippled-0.30.1"
},
{
"address": "162.217.98.136:51235",
"complete_ledgers": "32570 - 18828973",
"latency": 118,
"ledger": "50A2577CE6EB8A92847C443BDA45F5C5F0A22B9C6F4B47DBA0C12BDA75001D01",
"load": 69,
"public_key": "n944PcXEoZaiEHnwFD92xA4bxsS7jjYb27WcdDQwkHYyk1MWTEsX",
"uptime": 99625,
"version": "rippled-0.30.1"
},
{
"address": "72.251.233.163:51235",
"complete_ledgers": "18827949 - 18828973",
"latency": 51,
"ledger": "50A2577CE6EB8A92847C443BDA45F5C5F0A22B9C6F4B47DBA0C12BDA75001D01",
"load": 61,
"public_key": "n94ne2Z5dX8qcJNa8cPtAbtn21gEaCoEduS8TwdGAhi1iLfCUMDm",
"uptime": 99625,
"version": "rippled-0.30.1"
},
{
"address": "54.186.73.52:51235",
"complete_ledgers": "18827949 - 18828973",
"latency": 72,
"ledger": "50A2577CE6EB8A92847C443BDA45F5C5F0A22B9C6F4B47DBA0C12BDA75001D01",
"load": 60,
"public_key": "n9JySgyBVcQKvyDoeRKg7s2Mm6ZcFHk22vUZb3o1HSosWxcj9xPt",
"uptime": 99625,
"version": "rippled-0.30.1"
},
{
"address": "72.251.233.165:51235",
"complete_ledgers": "18827949 - 18828973",
"latency": 40,
"ledger": "50A2577CE6EB8A92847C443BDA45F5C5F0A22B9C6F4B47DBA0C12BDA75001D01",
"load": 63,
"public_key": "n9M77Uc9CSaSFZqt5V7sxPR4kFwbha7hwUFBD5v5kZt2SQjBeoDs",
"uptime": 99625,
"version": "rippled-0.30.1"
},
{
"address": "72.251.232.173:51235",
"complete_ledgers": "32570 - 18828973",
"latency": 40,
"ledger": "50A2577CE6EB8A92847C443BDA45F5C5F0A22B9C6F4B47DBA0C12BDA75001D01",
"load": 71,
"public_key": "n9JveA1hHDGjZECaYC7KM4JP8NXXzNXAxixbzcLTGnrsFZsA9AD1",
"uptime": 99625,
"version": "rippled-0.31.0-b6"
},
{
"address": "98.167.120.212:51235",
"complete_ledgers": "18828845 - 18828973",
"latency": 99,
"ledger": "50A2577CE6EB8A92847C443BDA45F5C5F0A22B9C6F4B47DBA0C12BDA75001D01",
"load": 60,
"public_key": "n9LDBRoqPYY7RdkNXbX1dqZXVtUKcSqzs2CZPhTH7ymA9X7Xzmpj",
"uptime": 99625,
"version": "rippled-0.30.1-rc4"
}
]
}
}
```
*JSON-RPC*
```json
{
"result" : {
"cluster" : {},
"peers" : [
{
"address" : "184.172.237.226:51235",
"complete_ledgers" : "14535005 - 18828957",
"latency" : 114,
"ledger" : "80FCB89BC5B90D2B9C2CE33786738809796F04FB9CB1E5EEE768DD9A9C399FB0",
"load" : 47,
"public_key" : "n9KNYm52mgcUQ7R2RA4kyw9Nk1yc6S35PaiuyqjYsy6UjhCXpw12",
"uptime" : 54976,
"version" : "rippled-0.30.0-hf1"
},
{
"address" : "54.186.248.91:51235",
"complete_ledgers" : "18827934 - 18828958",
"latency" : 68,
"ledger" : "9447480E351221123B1A454356435A66C188D9794B0197A060637E19F074B421",
"load" : 56,
"public_key" : "n9MT5EjnV912KGuBUqPs4tpdhzMPGcnDBrTuWkD9sWQHJ1kDcUcz",
"uptime" : 83754,
"version" : "rippled-0.30.1"
},
{
"address" : "54.84.21.230:51235",
"complete_ledgers" : "18827934 - 18828958",
"latency" : 135,
"ledger" : "9447480E351221123B1A454356435A66C188D9794B0197A060637E19F074B421",
"load" : 54,
"public_key" : "n9KJb7NMxGySRcjCqh69xEPMUhwJx22qntYYXsnUqYgjsJhNoW7g",
"uptime" : 99565,
"version" : "rippled-0.30.1"
},
{
"address" : "72.251.233.162:51235",
"complete_ledgers" : "18827934 - 18828958",
"latency" : 24,
"ledger" : "9447480E351221123B1A454356435A66C188D9794B0197A060637E19F074B421",
"load" : 61,
"public_key" : "n9M8RSk6hrvXZKFQ6CxPbJsjt73xW1xsnjn7G69VAMbE2j4sBQNQ",
"uptime" : 99560,
"version" : "rippled-0.30.1"
},
{
"address" : "162.217.98.136:51235",
"complete_ledgers" : "32570 - 18828958",
"latency" : 88,
"ledger" : "9447480E351221123B1A454356435A66C188D9794B0197A060637E19F074B421",
"load" : 55,
"public_key" : "n944PcXEoZaiEHnwFD92xA4bxsS7jjYb27WcdDQwkHYyk1MWTEsX",
"uptime" : 99566,
"version" : "rippled-0.30.1"
},
{
"address" : "72.251.233.163:51235",
"complete_ledgers" : "18827934 - 18828958",
"latency" : 24,
"ledger" : "9447480E351221123B1A454356435A66C188D9794B0197A060637E19F074B421",
"load" : 56,
"public_key" : "n94ne2Z5dX8qcJNa8cPtAbtn21gEaCoEduS8TwdGAhi1iLfCUMDm",
"uptime" : 99566,
"version" : "rippled-0.30.1"
},
{
"address" : "54.186.73.52:51235",
"complete_ledgers" : "18827934 - 18828958",
"latency" : 51,
"ledger" : "9447480E351221123B1A454356435A66C188D9794B0197A060637E19F074B421",
"load" : 56,
"public_key" : "n9JySgyBVcQKvyDoeRKg7s2Mm6ZcFHk22vUZb3o1HSosWxcj9xPt",
"uptime" : 99566,
"version" : "rippled-0.30.1"
},
{
"address" : "72.251.233.165:51235",
"complete_ledgers" : "18827934 - 18828958",
"latency" : 25,
"ledger" : "9447480E351221123B1A454356435A66C188D9794B0197A060637E19F074B421",
"load" : 56,
"public_key" : "n9M77Uc9CSaSFZqt5V7sxPR4kFwbha7hwUFBD5v5kZt2SQjBeoDs",
"uptime" : 99566,
"version" : "rippled-0.30.1"
},
{
"address" : "72.251.232.173:51235",
"complete_ledgers" : "32570 - 18828958",
"latency" : 24,
"ledger" : "9447480E351221123B1A454356435A66C188D9794B0197A060637E19F074B421",
"load" : 81,
"public_key" : "n9JveA1hHDGjZECaYC7KM4JP8NXXzNXAxixbzcLTGnrsFZsA9AD1",
"uptime" : 99566,
"version" : "rippled-0.31.0-b6"
},
{
"address" : "98.167.120.212:51235",
"complete_ledgers" : "18828830 - 18828957",
"latency" : 137,
"ledger" : "9447480E351221123B1A454356435A66C188D9794B0197A060637E19F074B421",
"load" : 54,
"public_key" : "n9LDBRoqPYY7RdkNXbX1dqZXVtUKcSqzs2CZPhTH7ymA9X7Xzmpj",
"uptime" : 99566,
"version" : "rippled-0.30.1-rc4"
}
],
"status" : "success"
}
}
```
*コマンドライン*
```json
Loading: "/etc/rippled.cfg"
Connecting to 127.0.0.1:5005
{
"result" : {
"cluster" : {},
"peers" : [
{
"address" : "72.251.232.173:51235",
"complete_ledgers" : "32570 - 18851276",
"latency" : 22,
"ledger" : "592C723DDBB1C5119F0D8288894060C83C8C2975A061D7C9971427D6798098F5",
"load" : 20,
"public_key" : "n9JveA1hHDGjZECaYC7KM4JP8NXXzNXAxixbzcLTGnrsFZsA9AD1",
"uptime" : 26,
"version" : "rippled-0.31.0-b6"
},
{
"address" : "169.53.155.36:51235",
"complete_ledgers" : "12920801 - 18851275",
"latency" : 127,
"load" : 16,
"public_key" : "n9L42gouyppsmsMXXUdByXnVDUZv1eu6KLZUWUkNHsukzv3pr7po",
"uptime" : 18,
"version" : "rippled-0.30.0-hf1"
},
{
"address" : "169.53.155.44:51235",
"complete_ledgers" : "12920779 - 18851276",
"latency" : 20,
"ledger" : "592C723DDBB1C5119F0D8288894060C83C8C2975A061D7C9971427D6798098F5",
"load" : 49,
"public_key" : "n94BpoEqEf1PxpAv3Bmyy2WoKHyeMpHPH4tcj6P9NW98zdzEyRhi",
"uptime" : 50,
"version" : "rippled-0.30.0-hf1"
},
{
"address" : "192.170.145.77:51235",
"complete_ledgers" : "32570 - 18851277",
"latency" : 145,
"ledger" : "592C723DDBB1C5119F0D8288894060C83C8C2975A061D7C9971427D6798098F5",
"load" : 29,
"public_key" : "n9LwcmtjDAJQz4u8DZCMGQ9GXHuMEV4Cf8KpPL9NgqAV2puxdYc2",
"uptime" : 51,
"version" : "rippled-0.30.1"
},
{
"address" : "162.217.98.136:51235",
"complete_ledgers" : "32570 - 18851277",
"latency" : 83,
"ledger" : "592C723DDBB1C5119F0D8288894060C83C8C2975A061D7C9971427D6798098F5",
"load" : 30,
"public_key" : "n944PcXEoZaiEHnwFD92xA4bxsS7jjYb27WcdDQwkHYyk1MWTEsX",
"uptime" : 50,
"version" : "rippled-0.30.1"
},
{
"address" : "184.172.237.241:51235",
"complete_ledgers" : "14153089 - 18851277",
"latency" : 104,
"ledger" : "592C723DDBB1C5119F0D8288894060C83C8C2975A061D7C9971427D6798098F5",
"load" : 29,
"public_key" : "n9L3LdCTVYUhCKtQtxiHrQ5ocNXVqZFiEJpF5pX9DXahYLrvi5R7",
"uptime" : 51,
"version" : "rippled-0.30.0-hf1"
},
{
"address" : "99.110.49.91:51301",
"complete_ledgers" : "32570 - 18851277",
"latency" : 152,
"ledger" : "592C723DDBB1C5119F0D8288894060C83C8C2975A061D7C9971427D6798098F5",
"load" : 55,
"public_key" : "n9LGv3xKVqhxq6vcTfmJZhxyhjywsZbvJvpFbZRXzzz5uQ64xTLy",
"uptime" : 51,
"version" : "rippled-0.31.0-b6"
},
{
"address" : "169.53.155.45:51235",
"complete_ledgers" : "12920779 - 18851277",
"latency" : 15,
"ledger" : "592C723DDBB1C5119F0D8288894060C83C8C2975A061D7C9971427D6798098F5",
"load" : 30,
"public_key" : "n9MRiHyMk43YpqATWeT8Zyu4HJq1btb5oNKmnHTkLJKQg9LQQq3v",
"uptime" : 51,
"version" : "rippled-0.30.0-hf1"
},
{
"address" : "54.186.248.91:51235",
"complete_ledgers" : "18850253 - 18851277",
"latency" : 63,
"ledger" : "592C723DDBB1C5119F0D8288894060C83C8C2975A061D7C9971427D6798098F5",
"load" : 36,
"public_key" : "n9MT5EjnV912KGuBUqPs4tpdhzMPGcnDBrTuWkD9sWQHJ1kDcUcz",
"uptime" : 51,
"version" : "rippled-0.30.1"
}
],
"status" : "success"
}
}
```
<!-- MULTICODE_BLOCK_END -->
応答は[標準フォーマット][]に従っており、正常に完了した場合は結果に次のフィールドからなるJSONオブジェクトが含まれます。
| `Field` | 型 | 説明 |
|:----------|:-------|:--------------------------------------------------------|
| `cluster` | オブジェクト | [クラスターとして構成されている](clustering.html)場合は、同じクラスター内の他の`rippled`サーバーの概要。[新規: rippled 0.30.1][] |
| `peers` | 配列 | peerオブジェクトからなる配列。 |
`cluster`オブジェクトの各フィールドは、該当する`rippled`サーバーの識別用キーペアの公開鍵です。(これは、[server_infoメソッド][]で当該サーバーから`pubkey_node`として返される値と同じです。)そのフィールドの内容は、以下のフィールドを持つオブジェクトです。
| `Field` | 型 | 説明 |
|:--------|:-------|:----------------------------------------------------------|
| `tag` | 文字列 | 構成ファイルで定義されているこのクラスターメンバーの表示名。 |
| `fee` | 数値 | (省略される場合があります)このクラスターメンバーが[トランザクションコスト](transaction-cost.html)に適用する負荷乗数。 |
| `age` | 数値 | このクラスターメンバーからの最終クラスターレポート以降の経過秒数。 |
`peers`配列の各メンバーは、以下のフィールドを持つpeerオブジェクトです。
| `Field` | 型 | 説明 |
|:-------------------|:--------|:----------------------------------------------|
| `address` | 文字列 | このピアが接続しているIPアドレスとポート。 |
| `cluster` | ブール値 | (省略される場合があります)`true`の場合、現在のサーバーとピアサーバーは同じ`rippled`クラスターに含まれています。 |
| `name` | 文字列 | (省略される場合があります)ピアが同じクラスターに含まれている場合、この名前は構成ファイルで定義されているそのピアサーバーの表示名です。 |
| `complete_ledgers` | 文字列 | ピア`rippled`で利用可能なレジャーバージョンのシーケンス番号を示す範囲式 |
| `inbound` | ブール値 | (省略される場合があります)`true`の場合は、ピアはローカルサーバーに接続しています。 |
| `latency` | 数値 | ピアへのネットワーク遅延(ミリ秒単位) |
| `ledger` | 文字列 | 最後に閉鎖されたピアのレジャーのハッシュ。 |
| `load` | 数値 | ピアサーバーによるローカルサーバーへの負荷の測定値。この数値が大きいほど負荷が高くなります。(負荷の測定単位は正式には定義されていません。) |
| `protocol` | 文字列 | (省略される場合があります)ピアが使用しているプロトコルバージョン(ローカルサーバーのプロトコルバージョンと異なる場合)。 |
| `public_key` | 文字列 | (省略される場合があります)ピアのメッセージの整合性の検証に使用できる公開鍵。これは、検証に使用する公開鍵とは異なりますが、フォーマットは同じです。 |
| `sanity` | 文字列 | (省略される場合があります)このピアが現行サーバーと同じルールとレジャーシーケンスに従っているかどうか。値が`insane`の場合、ピアは並列ネットワークの一部である可能性があります。値が`unknown`の場合、現行サーバーはピアに互換性があるかどうかを把握していません。 <!-- STYLE_OVERRIDE: insane --> |
| `status` | 文字列 | (省略される場合があります)ピアからの最新のステータスメッセージ。`connecting``connected``monitoring``validating``shutting`のいずれかです。 |
| `uptime` | 数値 | `rippled`サーバーがこのピアに継続して接続していた秒数。[新規: rippled 0.30.1][] |
| `version` | 文字列 | (省略される場合があります)ピアサーバーの`rippled`バージョン番号 |
### 考えられるエラー
* [汎用エラータイプ][]のすべて。
<!--{# common link defs #}-->
{% include '_snippets/rippled-api-links.md' %}
{% include '_snippets/tx-type-links.md' %}
{% include '_snippets/rippled_versions.md' %}

View File

@@ -0,0 +1,424 @@
---
html: peers.html
parent: peer-management-methods.html
blurb: Get information about the peer servers connected.
labels:
- Core Server
---
# peers
[[Source]](https://github.com/ripple/rippled/blob/52f298f150fc1530d201d3140c80d3eaf781cb5f/src/ripple/rpc/handlers/Peers.cpp "Source")
The `peers` command returns a list of all other `rippled` servers currently connected to this one over the [Peer Protocol](peer-protocol.html), including information on their connection and sync status.
*The `peers` method is an [admin method](admin-api-methods.html) that cannot be run by unprivileged users!*
### Request Format
An example of the request format:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```json
{
"id": 2,
"command": "peers"
}
```
*Commandline*
```
rippled peers
```
<!-- MULTICODE_BLOCK_END -->
The request includes no additional parameters.
### Response Format
An example of a successful response:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```json
{
"id": "peers_example",
"result": {
"cluster": {},
"peers": [
{
"address": "5.189.239.203:51235",
"complete_ledgers": "51813132 - 51815132",
"ledger": "99A1E29C9F235DCCBB087F85F11756BECA606A756C22AB826AB1F319C470C3E3",
"load": 157,
"metrics": {
"avg_bps_recv": "10255",
"avg_bps_sent": "2015",
"total_bytes_recv": "356809",
"total_bytes_sent": "74208"
},
"public_key": "n94ht2A9aBoARRhk1rwypZNVXJDiMN4qzs1Bd5KsQaSnN3WVy8Tw",
"uptime": 2,
"version": "rippled-1.4.0"
},
{
"address": "[::ffff:50.22.123.222]:51235",
"complete_ledgers": "32570 - 51815131",
"ledger": "99A1E29C9F235DCCBB087F85F11756BECA606A756C22AB826AB1F319C470C3E3",
"load": 219,
"metrics": {
"avg_bps_recv": "7223",
"avg_bps_sent": "6742",
"total_bytes_recv": "593148",
"total_bytes_sent": "204540"
},
"public_key": "n9LbkoB9ReSbaA9SGL317fm6CvjLcFG8hGoierLYfwiCDsEXHcP3",
"uptime": 3,
"version": "rippled-1.3.1"
},
{
"address": "51.89.153.154:51235",
"complete_ledgers": "51814130 - 51815130",
"ledger": "808800914218F5622ED5F639BC0EEDF9530E47C6F81CD1EB3866FA1496F62B9C",
"load": 27,
"metrics": {
"avg_bps_recv": "172748",
"avg_bps_sent": "7355",
"total_bytes_recv": "5455031",
"total_bytes_sent": "234276"
},
"public_key": "n944vHEtDhPm4Bd9rPowZMJduR9XrpxKS9AKHFfcJtKRVAdhfFfD",
"uptime": 8,
"version": "rippled-1.4.0"
},
{
"address": "192.151.157.20:51235",
"complete_ledgers": "51813128 - 51815128",
"latency": 8000,
"load": 70,
"metrics": {
"avg_bps_recv": "463258",
"avg_bps_sent": "21954",
"total_bytes_recv": "13910029",
"total_bytes_sent": "678908"
},
"public_key": "n9JbUWaFZDi1UxFexJXf1D9dRpn8UK6pTNwRxBCjEvLEwQa384uP",
"uptime": 19,
"version": "rippled-1.3.1"
},
{
"address": "[::ffff:94.237.45.66]:51235",
"complete_ledgers": "51815004 - 51815131",
"ledger": "99A1E29C9F235DCCBB087F85F11756BECA606A756C22AB826AB1F319C470C3E3",
"load": 202,
"metrics": {
"avg_bps_recv": "18258",
"avg_bps_sent": "1903",
"total_bytes_recv": "1184272",
"total_bytes_sent": "65101"
},
"public_key": "n9Lg83FYh8YDivG9TcgXhq5Y3PwunmRqVfvibd19Ko9uu3DtqLBM",
"uptime": 2,
"version": "rippled-1.3.1"
},
{
"address": "[::ffff:149.56.21.37]:51235",
"complete_ledgers": "51478129 - 51815129",
"ledger": "462FA0B34723C12EBE4DC9974B397D6A21D4F1770DE3CD584D4E33DBC83FC247",
"load": 182,
"metrics": {
"avg_bps_recv": "132648",
"avg_bps_sent": "13935",
"total_bytes_recv": "3983628",
"total_bytes_sent": "433757"
},
"public_key": "n94Dutms7xoSgWjbjYftDJGXvc5jaeYZq3J7o1Jwo35dZAyuzNWT",
"uptime": 14,
"version": "rippled-1.3.1"
},
{
"address": "77.117.40.191:51235",
"complete_ledgers": "51812267 - 51815071",
"latency": 30555,
"ledger": "0562C7A1898196FDC60B8DB1838961BFBA6B9304B1510E6030B32A4FB38400FB",
"load": 3783,
"metrics": {
"avg_bps_recv": "495673",
"avg_bps_sent": "57527",
"total_bytes_recv": "17137378",
"total_bytes_sent": "4140188"
},
"public_key": "n9LELaTdzKwfzhvHZKKrD3ZEJtWABSg4ocAT4dz5Vg5JgAVGwVdd",
"uptime": 73,
"version": "rippled-1.4.0"
},
{
"address": "[::ffff:94.237.49.50]:51235",
"complete_ledgers": "51815002 - 51815130",
"latency": 8000,
"ledger": "C6030B52471F8076F88A90C6FC2B2998794B32023FAC69FF573437D6D1470961",
"load": 1563,
"metrics": {
"avg_bps_recv": "215539",
"avg_bps_sent": "25705",
"total_bytes_recv": "23134383",
"total_bytes_sent": "2738880"
},
"public_key": "n9MLzBWq7WNM2sdpRKY2Tr3EJfxwSwsnDEpxU3auGJHgvq3Bit6S",
"uptime": 112,
"version": "rippled-1.3.1"
}
]
},
"status": "success",
"type": "response"
}
```
*JSON-RPC*
```json
{
"result" : {
"cluster" : {},
"peers" : [
{
"address" : "50.22.123.222:51235",
"complete_ledgers" : "32570 - 51815097",
"ledger" : "223DB74FE021AB1A4AA9E1CC588E0DBCC3FC7C080B93C01C30C246D89F951EA2",
"load" : 7,
"metrics" : {
"avg_bps_recv" : "1152",
"avg_bps_sent" : "332",
"total_bytes_recv" : "96601",
"total_bytes_sent" : "45322"
},
"public_key" : "n9LbkoB9ReSbaA9SGL317fm6CvjLcFG8hGoierLYfwiCDsEXHcP3",
"uptime" : 1,
"version" : "rippled-1.3.1"
},
{
"address" : "212.83.147.67:51235",
"complete_ledgers" : "51815014 - 51815040",
"ledger" : "223DB74FE021AB1A4AA9E1CC588E0DBCC3FC7C080B93C01C30C246D89F951EA2",
"load" : 1,
"metrics" : {
"avg_bps_recv" : "0",
"avg_bps_sent" : "1490",
"total_bytes_recv" : "18348",
"total_bytes_sent" : "46013"
},
"public_key" : "n94s5V53w1g4HdEdHdUU1FVrqHTVDbcb7bt44ib9JcM3c281LoDr",
"sanity" : "unknown",
"uptime" : 2,
"version" : "rippled-1.3.1"
},
{
"address" : "158.69.24.50:51235",
"complete_ledgers" : "51478098 - 51815098",
"ledger" : "223DB74FE021AB1A4AA9E1CC588E0DBCC3FC7C080B93C01C30C246D89F951EA2",
"load" : 55,
"metrics" : {
"avg_bps_recv" : "88080",
"avg_bps_sent" : "2703",
"total_bytes_recv" : "2786780",
"total_bytes_sent" : "89368"
},
"public_key" : "n9KfEhmmdxmjJdpbpRHGJ9ezoNzdyUepA11cT71jmq1fMDsZAcSh",
"uptime" : 3,
"version" : "rippled-1.3.1"
},
{
"address" : "[::ffff:174.64.99.193]:51235",
"complete_ledgers" : "51813091 - 51815091",
"latency" : 16000,
"ledger" : "CF72319DC762355C92BDD29E4CE066CEB03FF2A077A511D586B9FD7B74F55D94",
"load" : 325,
"metrics" : {
"avg_bps_recv" : "19012",
"avg_bps_sent" : "52053",
"total_bytes_recv" : "586809",
"total_bytes_sent" : "1678192"
},
"public_key" : "n9MH4Xu8FYPPoUFs679NQp7F6epFznM7x6bF4sAJWQvKkPBUHgd3",
"uptime" : 26,
"version" : "rippled-1.4.0-b8"
},
{
"address" : "[::ffff:94.237.45.66]:51235",
"complete_ledgers" : "51814966 - 51815093",
"latency" : 8773,
"ledger" : "61CF015A709122917B001367EE81E5E0D56E485A0BCAB53785A1CB830E0F9589",
"load" : 3522,
"metrics" : {
"avg_bps_recv" : "368875",
"avg_bps_sent" : "59308",
"total_bytes_recv" : "11558753",
"total_bytes_sent" : "2257872"
},
"public_key" : "n9Lg83FYh8YDivG9TcgXhq5Y3PwunmRqVfvibd19Ko9uu3DtqLBM",
"uptime" : 37,
"version" : "rippled-1.3.1"
}
],
"status" : "success"
}
}
```
*Commandline*
```json
Loading: "/etc/rippled.cfg"
Connecting to 127.0.0.1:5005
{
"result" : {
"cluster" : {},
"peers" : [
{
"address" : "50.22.123.222:51235",
"complete_ledgers" : "32570 - 51815097",
"ledger" : "223DB74FE021AB1A4AA9E1CC588E0DBCC3FC7C080B93C01C30C246D89F951EA2",
"load" : 7,
"metrics" : {
"avg_bps_recv" : "1152",
"avg_bps_sent" : "332",
"total_bytes_recv" : "96601",
"total_bytes_sent" : "45322"
},
"public_key" : "n9LbkoB9ReSbaA9SGL317fm6CvjLcFG8hGoierLYfwiCDsEXHcP3",
"uptime" : 1,
"version" : "rippled-1.3.1"
},
{
"address" : "212.83.147.67:51235",
"complete_ledgers" : "51815014 - 51815040",
"ledger" : "223DB74FE021AB1A4AA9E1CC588E0DBCC3FC7C080B93C01C30C246D89F951EA2",
"load" : 1,
"metrics" : {
"avg_bps_recv" : "0",
"avg_bps_sent" : "1490",
"total_bytes_recv" : "18348",
"total_bytes_sent" : "46013"
},
"public_key" : "n94s5V53w1g4HdEdHdUU1FVrqHTVDbcb7bt44ib9JcM3c281LoDr",
"sanity" : "unknown",
"uptime" : 2,
"version" : "rippled-1.3.1"
},
{
"address" : "158.69.24.50:51235",
"complete_ledgers" : "51478098 - 51815098",
"ledger" : "223DB74FE021AB1A4AA9E1CC588E0DBCC3FC7C080B93C01C30C246D89F951EA2",
"load" : 55,
"metrics" : {
"avg_bps_recv" : "88080",
"avg_bps_sent" : "2703",
"total_bytes_recv" : "2786780",
"total_bytes_sent" : "89368"
},
"public_key" : "n9KfEhmmdxmjJdpbpRHGJ9ezoNzdyUepA11cT71jmq1fMDsZAcSh",
"uptime" : 3,
"version" : "rippled-1.3.1"
},
{
"address" : "[::ffff:174.64.99.193]:51235",
"complete_ledgers" : "51813091 - 51815091",
"latency" : 16000,
"ledger" : "CF72319DC762355C92BDD29E4CE066CEB03FF2A077A511D586B9FD7B74F55D94",
"load" : 325,
"metrics" : {
"avg_bps_recv" : "19012",
"avg_bps_sent" : "52053",
"total_bytes_recv" : "586809",
"total_bytes_sent" : "1678192"
},
"public_key" : "n9MH4Xu8FYPPoUFs679NQp7F6epFznM7x6bF4sAJWQvKkPBUHgd3",
"uptime" : 26,
"version" : "rippled-1.4.0-b8"
},
{
"address" : "[::ffff:94.237.45.66]:51235",
"complete_ledgers" : "51814966 - 51815093",
"latency" : 8773,
"ledger" : "61CF015A709122917B001367EE81E5E0D56E485A0BCAB53785A1CB830E0F9589",
"load" : 3522,
"metrics" : {
"avg_bps_recv" : "368875",
"avg_bps_sent" : "59308",
"total_bytes_recv" : "11558753",
"total_bytes_sent" : "2257872"
},
"public_key" : "n9Lg83FYh8YDivG9TcgXhq5Y3PwunmRqVfvibd19Ko9uu3DtqLBM",
"uptime" : 37,
"version" : "rippled-1.3.1"
}
],
"status" : "success"
}
}
```
<!-- MULTICODE_BLOCK_END -->
The response follows the [standard format][], with a successful result containing a JSON object with the following fields:
| `Field` | Type | Description |
|:----------|:-------|:--------------------------------------------------------|
| `cluster` | Object | Summary of other `rippled` servers in the same cluster, if [configured as a cluster](clustering.html). [New in: rippled 0.30.1][] |
| `peers` | Array | Array of peer objects. |
Each field of the `cluster` object is the public key of that `rippled` server's identifying key pair. (This is the same value that that server returns as `pubkey_node` in the [server_info method][].) The contents of that field are an object with the following fields:
| `Field` | Type | Description |
|:--------|:-------|:----------------------------------------------------------|
| `tag` | String | The display name for this cluster member as defined in the config file. |
| `fee` | Number | _(May be omitted)_ The load multiplier this cluster member is applying to the [transaction cost](transaction-cost.html) |
| `age` | Number | The number of seconds since the last cluster report from this cluster member. |
Each member of the `peers` array is a peer object with the following fields:
| `Field` | Type | Description |
|:-------------------|:--------|:----------------------------------------------|
| `address` | String | The IP address and port where this peer is connected |
| `cluster` | Boolean | _(May be omitted)_ If `true`, the current server and the peer server are part of the same `rippled` cluster. |
| `name` | String | _(May be omitted)_ If the peer is part of the same cluster, this is the display name for that server as defined in the config file. |
| `complete_ledgers` | String | Range expression indicating the [ledger indexes][ledger index] of the ledger versions the peer `rippled` server has available |
| `inbound` | Boolean | _(May be omitted)_ If `true`, the peer is connecting to the local server. |
| `latency` | Number | The network latency to the peer (in milliseconds) |
| `ledger` | String | The identifying [hash][Hash] of the peer's most recently closed ledger |
| `load` | Number | A measure of the amount of load the peer server is putting on the local server. Larger numbers indicate more load. (The units by which load is measured are not formally defined.) |
| `protocol` | String | _(May be omitted)_ The protocol version that the peer is using, if not the same as the local server. |
| `metrics` | Object | Details on the amount of data sent to and received from this peer. See the description of the `metrics` object below for details. [New in: rippled 1.4.0][] |
| `public_key` | String | _(May be omitted)_ A public key that can be used to verify the integrity of the peer's messages. This is not the same key that is used for validations, but it follows the same format. |
| `sanity` | String | _(May be omitted)_ Whether this peer is following the same rules and ledger history as the current server. A value of `insane` probably indicates that the peer is part of a [parallel network](parallel-networks.html). The value `unknown` indicates that the current server is unsure whether the peer is compatible. <!-- STYLE_OVERRIDE: insane --> |
| `status` | String | _(May be omitted)_ The most recent status message from the peer. Could be `connecting`, `connected`, `monitoring`, `validating`, or `shutting`. |
| `uptime` | Number | The number of seconds that your `rippled` server has been continuously connected to this peer. [New in: rippled 0.30.1][] |
| `version` | string | _(May be omitted)_ The `rippled` version number of the peer server |
The `metrics` object contains the following fields:
| `Field` | Type | Description |
|:-------------------|:--------|:----------------------------------------------|
| `avg_bps_recv` | String | The average bytes per second of data received from this peer. |
| `avg_bps_sent` | String | The average bytes per second of data sent to this peer. |
| `total_bytes_recv` | String | The total number of bytes of data received from this peer. |
| `total_bytes_sent` | String | The total number of bytes of data sent to this peer. |
**Note:** All of the fields in the `metrics` object are 64-bit unsigned integers serialized to string format so that they do not lose precision in JSON encoding/decoding.
### Possible Errors
- Any of the [universal error types][].
- `reportingUnsupported` - ([Reporting Mode][] servers only) This method is not available in Reporting Mode.
<!--{# common link defs #}-->
{% include '_snippets/rippled-api-links.md' %}
{% include '_snippets/tx-type-links.md' %}
{% include '_snippets/rippled_versions.md' %}