mirror of
https://github.com/XRPLF/xrpl-dev-portal.git
synced 2025-11-04 20:05:50 +00:00
Fix API v2 links & revise API versioning section slightly
This commit is contained in:
@@ -14,8 +14,8 @@
|
||||
[AMMVoteトランザクション]: /@l10n/ja/docs/references/protocol/transactions/types/ammvote.md
|
||||
[AMMWithdraw]: /@l10n/ja/docs/references/protocol/transactions/types/ammwithdraw.md
|
||||
[AMMWithdrawトランザクション]: /@l10n/ja/docs/references/protocol/transactions/types/ammwithdraw.md
|
||||
[API v1]: /@l10n/ja/docs/references/http-websocket-apis/api-conventions/request-formatting.md#api-versioning
|
||||
[API v2]: /@l10n/ja/docs/references/http-websocket-apis/api-conventions/request-formatting.md#api-versioning
|
||||
[API v1]: /@l10n/ja/docs/references/http-websocket-apis/index.md
|
||||
[API v2]: /@l10n/ja/docs/references/http-websocket-apis/index.md
|
||||
[AccountDelete]: /@l10n/ja/docs/references/protocol/transactions/types/accountdelete.md
|
||||
[AccountDeleteトランザクション]: /@l10n/ja/docs/references/protocol/transactions/types/accountdelete.md
|
||||
[AccountRootエントリ]: /@l10n/ja/docs/references/protocol/ledger-data/ledger-entry-types/accountroot.md
|
||||
|
||||
@@ -81,7 +81,7 @@ rippled -- account_tx rLNaPoKeeBjZe2qs6x52yVPZpZ8td4dc6w -1 -1 2 0 binary descen
|
||||
| `marker` | [マーカー][] | 以前にページネーションされたレスポンスの値。そのレスポンスを停止した箇所からデータの取得を再開します。サーバが使用できるレジャーの範囲に変更があっても、この値は変わりません。 |
|
||||
|
||||
- リクエスト内で次の各フィールドのうち1つ以上を使用する必要があります: `ledger_index`、`ledger_hash`、`ledger_index_min`、または`ledger_index_max`。
|
||||
- [API v2]: `ledger_index`と`ledger_hash`のどちらかを指定した場合、`ledger_index_min`と`ledger_index_max`を含めると`invalidParams`エラーが返ります。
|
||||
- [API v2][]: `ledger_index`と`ledger_hash`のどちらかを指定した場合、`ledger_index_min`と`ledger_index_max`を含めると`invalidParams`エラーが返ります。
|
||||
|
||||
|
||||
### 照会されたデータの繰り返し
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
[AMMWithdraw transaction]: /docs/references/protocol/transactions/types/ammwithdraw.md
|
||||
[AMMWithdraw transactions]: /docs/references/protocol/transactions/types/ammwithdraw.md
|
||||
[AMMWithdraw]: /docs/references/protocol/transactions/types/ammwithdraw.md
|
||||
[API v1]: /docs/references/http-websocket-apis/api-conventions/request-formatting.md#api-versioning
|
||||
[API v2]: /docs/references/http-websocket-apis/api-conventions/request-formatting.md#api-versioning
|
||||
[API v1]: /docs/references/http-websocket-apis/index.md#api-versioning
|
||||
[API v2]: /docs/references/http-websocket-apis/index.md#api-versioning
|
||||
[AccountDelete transaction]: /docs/references/protocol/transactions/types/accountdelete.md
|
||||
[AccountDelete transactions]: /docs/references/protocol/transactions/types/accountdelete.md
|
||||
[AccountDelete]: /docs/references/protocol/transactions/types/accountdelete.md
|
||||
|
||||
168
docs/img/_sources/api-functionality-venn-diagram.uxf
Normal file
168
docs/img/_sources/api-functionality-venn-diagram.uxf
Normal file
@@ -0,0 +1,168 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<diagram program="umlet" version="14.2">
|
||||
<zoom_level>10</zoom_level>
|
||||
<element>
|
||||
<id>UMLUseCase</id>
|
||||
<coordinates>
|
||||
<x>230</x>
|
||||
<y>90</y>
|
||||
<w>400</w>
|
||||
<h>360</h>
|
||||
</coordinates>
|
||||
<panel_attributes/>
|
||||
<additional_attributes/>
|
||||
</element>
|
||||
<element>
|
||||
<id>UMLUseCase</id>
|
||||
<coordinates>
|
||||
<x>30</x>
|
||||
<y>90</y>
|
||||
<w>400</w>
|
||||
<h>360</h>
|
||||
</coordinates>
|
||||
<panel_attributes/>
|
||||
<additional_attributes/>
|
||||
</element>
|
||||
<element>
|
||||
<id>Text</id>
|
||||
<coordinates>
|
||||
<x>140</x>
|
||||
<y>50</y>
|
||||
<w>110</w>
|
||||
<h>30</h>
|
||||
</coordinates>
|
||||
<panel_attributes>*rippled Server*</panel_attributes>
|
||||
<additional_attributes/>
|
||||
</element>
|
||||
<element>
|
||||
<id>Text</id>
|
||||
<coordinates>
|
||||
<x>400</x>
|
||||
<y>50</y>
|
||||
<w>110</w>
|
||||
<h>30</h>
|
||||
</coordinates>
|
||||
<panel_attributes>*Clio Server*</panel_attributes>
|
||||
<additional_attributes/>
|
||||
</element>
|
||||
<element>
|
||||
<id>Text</id>
|
||||
<coordinates>
|
||||
<x>310</x>
|
||||
<y>70</y>
|
||||
<w>50</w>
|
||||
<h>30</h>
|
||||
</coordinates>
|
||||
<panel_attributes>*Both*</panel_attributes>
|
||||
<additional_attributes/>
|
||||
</element>
|
||||
<element>
|
||||
<id>Text</id>
|
||||
<coordinates>
|
||||
<x>290</x>
|
||||
<y>250</y>
|
||||
<w>100</w>
|
||||
<h>50</h>
|
||||
</coordinates>
|
||||
<panel_attributes>style=wordwrap
|
||||
• Serve most API methods</panel_attributes>
|
||||
<additional_attributes/>
|
||||
</element>
|
||||
<element>
|
||||
<id>Text</id>
|
||||
<coordinates>
|
||||
<x>430</x>
|
||||
<y>150</y>
|
||||
<w>140</w>
|
||||
<h>50</h>
|
||||
</coordinates>
|
||||
<panel_attributes>style=wordwrap
|
||||
• Scales efficiently to many requests</panel_attributes>
|
||||
<additional_attributes/>
|
||||
</element>
|
||||
<element>
|
||||
<id>Text</id>
|
||||
<coordinates>
|
||||
<x>30</x>
|
||||
<y>0</y>
|
||||
<w>490</w>
|
||||
<h>40</h>
|
||||
</coordinates>
|
||||
<panel_attributes>fontsize=20
|
||||
*API functionality provided by servers*</panel_attributes>
|
||||
<additional_attributes/>
|
||||
</element>
|
||||
<element>
|
||||
<id>Text</id>
|
||||
<coordinates>
|
||||
<x>90</x>
|
||||
<y>160</y>
|
||||
<w>150</w>
|
||||
<h>50</h>
|
||||
</coordinates>
|
||||
<panel_attributes>style=wordwrap
|
||||
• Provides Admin API methods</panel_attributes>
|
||||
<additional_attributes/>
|
||||
</element>
|
||||
<element>
|
||||
<id>Text</id>
|
||||
<coordinates>
|
||||
<x>70</x>
|
||||
<y>220</y>
|
||||
<w>150</w>
|
||||
<h>80</h>
|
||||
</coordinates>
|
||||
<panel_attributes>style=wordwrap
|
||||
• Provides pending / unvalidated data including transaction queue
|
||||
</panel_attributes>
|
||||
<additional_attributes/>
|
||||
</element>
|
||||
<element>
|
||||
<id>Text</id>
|
||||
<coordinates>
|
||||
<x>80</x>
|
||||
<y>300</y>
|
||||
<w>160</w>
|
||||
<h>70</h>
|
||||
</coordinates>
|
||||
<panel_attributes>style=wordwrap
|
||||
• Has a live view of consensus and peer-to-peer network</panel_attributes>
|
||||
<additional_attributes/>
|
||||
</element>
|
||||
<element>
|
||||
<id>Text</id>
|
||||
<coordinates>
|
||||
<x>440</x>
|
||||
<y>200</y>
|
||||
<w>180</w>
|
||||
<h>70</h>
|
||||
</coordinates>
|
||||
<panel_attributes>style=wordwrap
|
||||
• Provides NFT methods: nft_history, nft_info, nfts_by_issuer</panel_attributes>
|
||||
<additional_attributes/>
|
||||
</element>
|
||||
<element>
|
||||
<id>Text</id>
|
||||
<coordinates>
|
||||
<x>450</x>
|
||||
<y>270</y>
|
||||
<w>180</w>
|
||||
<h>50</h>
|
||||
</coordinates>
|
||||
<panel_attributes>style=wordwrap
|
||||
• Provides mpt_holders method</panel_attributes>
|
||||
<additional_attributes/>
|
||||
</element>
|
||||
<element>
|
||||
<id>Text</id>
|
||||
<coordinates>
|
||||
<x>430</x>
|
||||
<y>320</y>
|
||||
<w>140</w>
|
||||
<h>80</h>
|
||||
</coordinates>
|
||||
<panel_attributes>style=wordwrap
|
||||
• Serves rippled-exclusive API requests by forwarding</panel_attributes>
|
||||
<additional_attributes/>
|
||||
</element>
|
||||
</diagram>
|
||||
138
docs/img/api-functionality-venn-diagram.svg
Normal file
138
docs/img/api-functionality-venn-diagram.svg
Normal file
@@ -0,0 +1,138 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.0//EN'
|
||||
'http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd'>
|
||||
<svg fill-opacity="1" xmlns:xlink="http://www.w3.org/1999/xlink" color-rendering="auto" color-interpolation="auto" text-rendering="auto" stroke="black" stroke-linecap="square" width="640" stroke-miterlimit="10" shape-rendering="auto" stroke-opacity="1" fill="black" stroke-dasharray="none" font-weight="normal" stroke-width="1" viewBox="10 -20 640 490" height="490" xmlns="http://www.w3.org/2000/svg" font-family="'Dialog'" font-style="normal" stroke-linejoin="miter" font-size="12px" stroke-dashoffset="0" image-rendering="auto"
|
||||
><!--Generated by the Batik Graphics2D SVG Generator--><defs id="genericDefs"
|
||||
/><g
|
||||
><defs id="defs1"
|
||||
><clipPath clipPathUnits="userSpaceOnUse" id="clipPath1"
|
||||
><path d="M0 0 L2147483647 0 L2147483647 2147483647 L0 2147483647 L0 0 Z"
|
||||
/></clipPath
|
||||
><clipPath clipPathUnits="userSpaceOnUse" id="clipPath2"
|
||||
><path d="M0 0 L0 80 L140 80 L140 0 Z"
|
||||
/></clipPath
|
||||
><clipPath clipPathUnits="userSpaceOnUse" id="clipPath3"
|
||||
><path d="M0 0 L0 50 L180 50 L180 0 Z"
|
||||
/></clipPath
|
||||
><clipPath clipPathUnits="userSpaceOnUse" id="clipPath4"
|
||||
><path d="M0 0 L0 70 L180 70 L180 0 Z"
|
||||
/></clipPath
|
||||
><clipPath clipPathUnits="userSpaceOnUse" id="clipPath5"
|
||||
><path d="M0 0 L0 70 L160 70 L160 0 Z"
|
||||
/></clipPath
|
||||
><clipPath clipPathUnits="userSpaceOnUse" id="clipPath6"
|
||||
><path d="M0 0 L0 80 L150 80 L150 0 Z"
|
||||
/></clipPath
|
||||
><clipPath clipPathUnits="userSpaceOnUse" id="clipPath7"
|
||||
><path d="M0 0 L0 50 L150 50 L150 0 Z"
|
||||
/></clipPath
|
||||
><clipPath clipPathUnits="userSpaceOnUse" id="clipPath8"
|
||||
><path d="M0 0 L0 40 L490 40 L490 0 Z"
|
||||
/></clipPath
|
||||
><clipPath clipPathUnits="userSpaceOnUse" id="clipPath9"
|
||||
><path d="M0 0 L0 50 L140 50 L140 0 Z"
|
||||
/></clipPath
|
||||
><clipPath clipPathUnits="userSpaceOnUse" id="clipPath10"
|
||||
><path d="M0 0 L0 50 L100 50 L100 0 Z"
|
||||
/></clipPath
|
||||
><clipPath clipPathUnits="userSpaceOnUse" id="clipPath11"
|
||||
><path d="M0 0 L0 30 L50 30 L50 0 Z"
|
||||
/></clipPath
|
||||
><clipPath clipPathUnits="userSpaceOnUse" id="clipPath12"
|
||||
><path d="M0 0 L0 30 L110 30 L110 0 Z"
|
||||
/></clipPath
|
||||
><clipPath clipPathUnits="userSpaceOnUse" id="clipPath13"
|
||||
><path d="M0 0 L0 360 L400 360 L400 0 Z"
|
||||
/></clipPath
|
||||
></defs
|
||||
><g font-family="sans-serif" font-size="14px" transform="translate(430,320)"
|
||||
><text x="5" xml:space="preserve" y="18.3594" clip-path="url(#clipPath2)" stroke="none"
|
||||
>• Serves</text
|
||||
><text x="5" xml:space="preserve" y="34.7188" clip-path="url(#clipPath2)" stroke="none"
|
||||
>rippled-exclusive</text
|
||||
><text x="5" xml:space="preserve" y="51.0781" clip-path="url(#clipPath2)" stroke="none"
|
||||
>API requests by</text
|
||||
><text x="5" xml:space="preserve" y="67.4375" clip-path="url(#clipPath2)" stroke="none"
|
||||
>forwarding</text
|
||||
></g
|
||||
><g font-family="sans-serif" font-size="14px" transform="translate(450,270)"
|
||||
><text x="5" xml:space="preserve" y="18.3594" clip-path="url(#clipPath3)" stroke="none"
|
||||
>• Provides mpt_holders</text
|
||||
><text x="5" xml:space="preserve" y="34.7188" clip-path="url(#clipPath3)" stroke="none"
|
||||
>method</text
|
||||
></g
|
||||
><g font-family="sans-serif" font-size="14px" transform="translate(440,200)"
|
||||
><text x="5" xml:space="preserve" y="18.3594" clip-path="url(#clipPath4)" stroke="none"
|
||||
>• Provides NFT methods:</text
|
||||
><text x="5" xml:space="preserve" y="34.7188" clip-path="url(#clipPath4)" stroke="none"
|
||||
>nft_history, nft_info,</text
|
||||
><text x="5" xml:space="preserve" y="51.0781" clip-path="url(#clipPath4)" stroke="none"
|
||||
>nfts_by_issuer</text
|
||||
></g
|
||||
><g font-family="sans-serif" font-size="14px" transform="translate(80,300)"
|
||||
><text x="5" xml:space="preserve" y="18.3594" clip-path="url(#clipPath5)" stroke="none"
|
||||
>• Has a live view of</text
|
||||
><text x="5" xml:space="preserve" y="34.7188" clip-path="url(#clipPath5)" stroke="none"
|
||||
>consensus and</text
|
||||
><text x="5" xml:space="preserve" y="51.0781" clip-path="url(#clipPath5)" stroke="none"
|
||||
>peer-to-peer network</text
|
||||
></g
|
||||
><g font-family="sans-serif" font-size="14px" transform="translate(70,220)"
|
||||
><text x="5" xml:space="preserve" y="18.3594" clip-path="url(#clipPath6)" stroke="none"
|
||||
>• Provides pending /</text
|
||||
><text x="5" xml:space="preserve" y="34.7188" clip-path="url(#clipPath6)" stroke="none"
|
||||
>unvalidated data</text
|
||||
><text x="5" xml:space="preserve" y="51.0781" clip-path="url(#clipPath6)" stroke="none"
|
||||
>including</text
|
||||
><text x="5" xml:space="preserve" y="67.4375" clip-path="url(#clipPath6)" stroke="none"
|
||||
>transaction queue</text
|
||||
></g
|
||||
><g font-family="sans-serif" font-size="14px" transform="translate(90,160)"
|
||||
><text x="5" xml:space="preserve" y="18.3594" clip-path="url(#clipPath7)" stroke="none"
|
||||
>• Provides Admin</text
|
||||
><text x="5" xml:space="preserve" y="34.7188" clip-path="url(#clipPath7)" stroke="none"
|
||||
>API methods</text
|
||||
></g
|
||||
><g font-size="20px" font-weight="bold" font-family="sans-serif" transform="translate(30,0)"
|
||||
><text x="5" xml:space="preserve" y="24.0781" clip-path="url(#clipPath8)" stroke="none"
|
||||
>API functionality provided by servers</text
|
||||
></g
|
||||
><g font-family="sans-serif" font-size="14px" transform="translate(430,150)"
|
||||
><text x="5" xml:space="preserve" y="18.3594" clip-path="url(#clipPath9)" stroke="none"
|
||||
>• Scales efficiently</text
|
||||
><text x="5" xml:space="preserve" y="34.7188" clip-path="url(#clipPath9)" stroke="none"
|
||||
>to many requests</text
|
||||
></g
|
||||
><g font-family="sans-serif" font-size="14px" transform="translate(290,250)"
|
||||
><text x="5" xml:space="preserve" y="18.3594" clip-path="url(#clipPath10)" stroke="none"
|
||||
>• Serve most</text
|
||||
><text x="5" xml:space="preserve" y="34.7188" clip-path="url(#clipPath10)" stroke="none"
|
||||
>API methods</text
|
||||
></g
|
||||
><g font-size="14px" font-weight="bold" font-family="sans-serif" transform="translate(310,70)"
|
||||
><text x="5" xml:space="preserve" y="18.3594" clip-path="url(#clipPath11)" stroke="none"
|
||||
>Both</text
|
||||
></g
|
||||
><g font-size="14px" font-weight="bold" font-family="sans-serif" transform="translate(400,50)"
|
||||
><text x="5" xml:space="preserve" y="18.3594" clip-path="url(#clipPath12)" stroke="none"
|
||||
>Clio Server</text
|
||||
></g
|
||||
><g font-size="14px" font-weight="bold" font-family="sans-serif" transform="translate(140,50)"
|
||||
><text x="5" xml:space="preserve" y="18.3594" clip-path="url(#clipPath12)" stroke="none"
|
||||
>rippled Server</text
|
||||
></g
|
||||
><g fill="rgb(255,255,255)" fill-opacity="0" transform="translate(30,90)" stroke-opacity="0" stroke="rgb(255,255,255)"
|
||||
><ellipse rx="199.25" ry="179.25" clip-path="url(#clipPath13)" cx="199.75" cy="179.75" stroke="none"
|
||||
/></g
|
||||
><g transform="translate(30,90)"
|
||||
><ellipse rx="199.25" fill="none" ry="179.25" clip-path="url(#clipPath13)" cx="199.75" cy="179.75"
|
||||
/></g
|
||||
><g fill="rgb(255,255,255)" fill-opacity="0" transform="translate(230,90)" stroke-opacity="0" stroke="rgb(255,255,255)"
|
||||
><ellipse rx="199.25" ry="179.25" clip-path="url(#clipPath13)" cx="199.75" cy="179.75" stroke="none"
|
||||
/></g
|
||||
><g transform="translate(230,90)"
|
||||
><ellipse rx="199.25" fill="none" ry="179.25" clip-path="url(#clipPath13)" cx="199.75" cy="179.75"
|
||||
/></g
|
||||
></g
|
||||
></svg
|
||||
>
|
||||
|
After Width: | Height: | Size: 7.5 KiB |
@@ -1,6 +1,4 @@
|
||||
---
|
||||
html: request-formatting.html
|
||||
parent: api-conventions.html
|
||||
seo:
|
||||
description: Standard request format, with examples, for the WebSocket, JSON-RPC, and Commandline interfaces.
|
||||
---
|
||||
@@ -13,12 +11,11 @@ seo:
|
||||
{% tab label="WebSocket" %}
|
||||
```json
|
||||
{
|
||||
"id": 2,
|
||||
"id": "example_ws_request_1",
|
||||
"command": "account_info",
|
||||
"account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
|
||||
"strict": true,
|
||||
"ledger_index": "validated",
|
||||
"api_version": 1
|
||||
"api_version": 2
|
||||
}
|
||||
```
|
||||
{% /tab %}
|
||||
@@ -33,9 +30,8 @@ Content-Type: application/json
|
||||
"params": [
|
||||
{
|
||||
"account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
|
||||
"strict": true,
|
||||
"ledger_index": "validated",
|
||||
"api_version": 1
|
||||
"api_version": 2
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -44,7 +40,7 @@ Content-Type: application/json
|
||||
|
||||
{% tab label="Commandline" %}
|
||||
```sh
|
||||
rippled account_info r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59 validated strict
|
||||
rippled account_info r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59 validated
|
||||
```
|
||||
{% /tab %}
|
||||
|
||||
@@ -59,7 +55,7 @@ After you open a WebSocket to the `rippled` server, you can send commands as a [
|
||||
|:--------------------|:----------|:-------------------------------------------|
|
||||
| `command` | String | The name of the [API method](../public-api-methods/index.md). |
|
||||
| `id` | (Various) | _(Optional)_ A unique value to identify this request. The response to this request uses the same `id` field. This way, even if responses arrive out of order, you know which request prompted which response. |
|
||||
| `api_version` | Number | _(Optional)_ The API version to use. If omitted, uses version 1. For details, see [API Versioning](#api-versioning). |
|
||||
| `api_version` | Number | _(Optional)_ The API version to use. For details, see [API Versioning](../index.md#api-versioning). |
|
||||
| (Method Parameters) | (Various) | Provide any parameters to the method at the top level. |
|
||||
|
||||
See [Response Formatting](response-formatting.md) for the response from the server.
|
||||
@@ -84,7 +80,7 @@ The object inside the `params` array can contain the following fields:
|
||||
|
||||
| Field | Type | Description |
|
||||
|:--------------------|:----------|:-------------------------------------------|
|
||||
| `api_version` | Number | _(Optional)_ The API version to use. If omitted, uses version `1`. For details, see [API Versioning](#api-versioning). |
|
||||
| `api_version` | Number | _(Optional)_ The API version to use. For details, see [API Versioning](#api-versioning). |
|
||||
| (Method Parameters) | (Various) | Provide any parameters to the method here. |
|
||||
|
||||
See [Response Formatting](response-formatting.md) for the response from the server.
|
||||
@@ -95,7 +91,7 @@ Put the API method name after any normal (dash-prefaced) commandline options, fo
|
||||
|
||||
The commandline calls JSON-RPC, so its responses always match the JSON-RPC [response format](response-formatting.md).
|
||||
|
||||
The commandline always uses the latest [API version](#api-versioning).
|
||||
The commandline always uses the latest [API version](./index.md#api-versioning).
|
||||
|
||||
{% admonition type="warning" name="Caution" %}The commandline interface is intended for administrative purposes only and is _not a supported API_. New versions of `rippled` may introduce breaking changes to the commandline API without warning!{% /admonition %}
|
||||
|
||||
|
||||
@@ -6,37 +6,38 @@ metadata:
|
||||
---
|
||||
# HTTP / WebSocket APIs
|
||||
|
||||
You can communicate with the XRP Ledger through the `rippled` servers' publicly available APIs.
|
||||
You can communicate directly with the XRP Ledger through HTTP-based APIs provided by the core `rippled` server as well as the Clio server. Both types of server provide JSON-RPC and WebSocket APIs with mostly the same functionality. JSON-RPC uses a strict request-response paradigm similar to a REST API, but WebSocket uses a single persistent connection where the server can push messages to the client asynchronously. For more information, see [Get Started Using HTTP / WebSocket APIs](../../tutorials/http-websocket-apis/build-apps/get-started.md).
|
||||
|
||||
[{% inline-svg file="/docs/img/api-functionality-venn-diagram.svg" /%}](/docs/img/api-functionality-venn-diagram.svg "Diagram: Most API methods are provided by both rippled and Clio servers. The rippled server provides admin methods, provides pending/unvalidated data including transaction queue, and has a live view of consensus and peer-to-peer network. The Clio server scales efficiently, provides additional methods nft_history, nft_info, nfts_by_issuer, and mpt_holders, and serves rippled-exclusive API requests by forwarding.")
|
||||
|
||||
## API Versioning
|
||||
|
||||
Currently, there are two API versions: `1` and `2` {% badge href="https://github.com/XRPLF/rippled/releases/tag/2.0.0" %}New in: rippled 2.0.0{% /badge %}. The server reports the range of supported API versions in the [`version` API method](public-api-methods/server-info-methods/version.md); you can specify which version to use in your API requests.
|
||||
|
||||
Separate API requests can use different API versions even on the same persistent connection. For example, if you connect through WebSocket to a server that supports API versions 1 and 2, you can make an `account_tx` request using API version 2 and then make another `account_tx` request using API version 1 from the same connection.
|
||||
|
||||
- For a full list of the differences between API versions, see [API-CHANGELOG on GitHub](https://github.com/xrplf/rippled/blob/develop/API-CHANGELOG.md).
|
||||
- For a full list of the differences between API versions, see [API-CHANGELOG on GitHub](https://github.com/XRPLF/rippled/blob/develop/API-CHANGELOG.md).
|
||||
- To stay up-to-date with API changes, join the [ripple server mailing list](https://groups.google.com/g/ripple-server).
|
||||
|
||||
### Specifying a Version
|
||||
|
||||
## Default API Versions
|
||||
Use the `api_version` field of the request to specify which API version to use. See [Request Formatting](./api-conventions/request-formatting.md) for example requests.
|
||||
|
||||
The table below shows which version of the `rippled` API is used if you don't specify it in the request:
|
||||
Separate API requests can use different API versions even on the same persistent connection. For example, if you connect through WebSocket to a server that supports API versions 1 and 2, you can make an `account_tx` request using API version 2 and then make another `account_tx` request using API version 1 from the same connection.
|
||||
|
||||
| Request Method | API Version | Additional Notes |
|
||||
|----------------|-------------|------------------|
|
||||
| Websocket | 1 | |
|
||||
| JSON-RPC | 1 | |
|
||||
| Commandline | 2 | The commandline only uses the latest API version. |
|
||||
| [xrpl.js](https://github.com/XRPLF/xrpl.js) | 2 | Defaults to [API v2][] starting in v4.0.0. |
|
||||
| [xrpl-py](https://github.com/XRPLF/xrpl-py) | 2 | Defaults to [API v2][] starting in v3.0.0. |
|
||||
### Default API Versions
|
||||
|
||||
{% admonition type="info" name="Note" %}
|
||||
Clio behaves the same as `rippled`.
|
||||
{% /admonition %}
|
||||
If you do not specify an API version when making a request directly to the server, the server uses API v1. However, some [client libraries](../client-libraries.md) automatically use a different API version if you do not specify one. The following table shows which API version each library uses when you don't specify which API version to use:
|
||||
|
||||
| Client Library | API Version | Additional Notes |
|
||||
|-----------------------------------------------|-------------|------------------|
|
||||
| None - direct WebSocket / JSON-RPC connection | 1 | |
|
||||
| None - `rippled` Commandline | 2 | The commandline only uses the latest API version. |
|
||||
| [xrpl.js](https://github.com/XRPLF/xrpl.js) | 2 | Versions 3.x and older use API v1 by default. |
|
||||
| [xrpl-py](https://github.com/XRPLF/xrpl-py) | 2 | Versions 2.x and older use API v1 by default. |
|
||||
|
||||
Future versions of `rippled` that introduce breaking changes will introduce a new API version 3.
|
||||
|
||||
### Breaking Changes
|
||||
|
||||
The following types of changes are **breaking changes**:
|
||||
New API versions can introduce breaking changes. The following types of changes are **breaking changes**:
|
||||
|
||||
- Removing or renaming a field of a request or response.
|
||||
- Changing the type of a field of a request or response.
|
||||
@@ -44,16 +45,10 @@ The following types of changes are **breaking changes**:
|
||||
- Changing the order of positional parameters, or adding a new field before other positional parameters.
|
||||
- Removing or renaming an API method.
|
||||
- Changing the behavior of an API function visible to existing clients.
|
||||
- The following types of breaking changes only apply to the gRPC API:
|
||||
- Changing a `proto` field number.
|
||||
- Removing or renaming an enum or enum value.
|
||||
- Adding or removing fields from a `oneof`.
|
||||
- Splitting or merging a `oneof`.
|
||||
- Changing whether a message field is `optional`, `repeated`, or `required`.
|
||||
- Changing the stream value of a request or response.
|
||||
- Deleting or renaming a package or service.
|
||||
|
||||
Any time a full release introduces a breaking change, it introduces a new API version number. Pre-release, beta, and development versions may introduce breaking changes to the same API version number.
|
||||
Any time a full release introduces a breaking change, it introduces a new API version number.
|
||||
|
||||
API versions are subject to change until they are included in a stable release of the server. New API versions are expected to experience multiple breaking changes across development, beta, and pre-release software.
|
||||
|
||||
### Non-Breaking Changes
|
||||
|
||||
@@ -61,7 +56,11 @@ The following types of changes are **non-breaking changes** and may occur withou
|
||||
|
||||
- Adding a new field to a request or response, not including positional parameters.
|
||||
- Adding a new API method.
|
||||
- Fixing a bug so that the API matches prior documentation and behavior.
|
||||
|
||||
{% raw-partial file="/docs/_snippets/common-links.md" /%}
|
||||
## API Method References
|
||||
|
||||
{% child-pages /%}
|
||||
|
||||
|
||||
{% raw-partial file="/docs/_snippets/common-links.md" /%}
|
||||
|
||||
Reference in New Issue
Block a user