Rippled API Overview
Business servers interact with the Ripple network by sending JSON formatted messages to their local rippled server. In reply rippled sends back JSON formatted responses.
There are two broad categories of JSON messages.
- Queries which return information about the current state of the server or the ledger.
- Transactions which change the state of the server or ledger.
All JSON messages are documented on this wiki page: JSON Messages
JSON data formatting rules are specified here: JSON format
The current state of every account, trust line and market offer is represented in the Ripple ledger. The ledger format is documented here: Ledger Format
Transaction types and formats are listed here: Transactions
Websockets vs RPC
Messages can be passed either by making individual RPC calls to the rippled server, or by opening a persistent websocket connection and submitting JSON requests over that channel. The individual JSON requests and responses use the same data format no matter which communication channel you chose to use.
The choice of communication channel is up to the integrator. The choice often depends on the language the existing business server is written in and the skills of the development team. Websockets is a more modern interface and is more suitable to high volume businesses. It is also allows user interfaces to update dynamically. RPC’s synchronous nature makes it easy for quick experimentation. https://ripple.com/wiki/Websocket_API#Websocket_vs_RPC
Higher level interfaces
The rippled executable also provides a command line interface that simplifies sending RPC requests to your server. Command Line Agent