Skip to content

Commit

Permalink
[json-rpc] add api-change log md
Browse files Browse the repository at this point in the history
Closes: diem#5505
  • Loading branch information
Xiao Li authored and bors-libra committed Aug 7, 2020
1 parent 3d4b90c commit fdb1a1c
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
18 changes: 18 additions & 0 deletions json-rpc/API-CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
## API CHANGELOG

All noteable API changes may affect client (breaking, non-breaking changes) should be documented in this file.

Please add the API change in the following format:

```
## <date> (add "breaking change" to title following the date if a change will break client
- <describle one change of API>, please <PR link> if this log is added after the PR is merged.
- <describle another change of the API>
```

## Before 2020-08-05

Please refer to [JSON-RPC SPEC before 2020-08-05](https://github.com/libra/libra/blob/888e6cd688a8c9b5805978ab509acdc3c35025ab/json-rpc/json-rpc-spec.md) document for the API spec snapshot.
8 changes: 7 additions & 1 deletion json-rpc/json-rpc-spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ JSON-RPC is a stateless, light-weight remote procedure call (RPC) protocol. Refe
JSON-RPC response object is extended with the following fields:

| field | type | meaning |
|----------------------------|---------------------------------------------------------------|
|----------------------------|----------------|----------------------------------------------|
| libra_chain_id | unsigned int8 | network chain id, e.g. testnet chain id is 2 |
| libra_ledger_version | unsigned int64 | server side latest ledger version number |
| libra_ledger_timestampusec | unsigned int64 | server side latest ledger timestampusec |
Expand Down Expand Up @@ -70,3 +70,9 @@ For any invalid request or parameters request, standard Error code and message w
| -32604 | invalid format |

Unless specifically mentioned below, Libra JSON-RPC will return the default error code - 32000 for generic server-side errors. More information may be returned in the ‘message’ and the ‘data’ fields, but this is not guaranteed.

## Versioning

We use URI versioning to version our API, current version is v1.
For example, to hit testnet, the server url is: https://client.testnet.libra.org/v1.
You may check [API-CHANGELOG.md] and learn more about our API changes.

0 comments on commit fdb1a1c

Please sign in to comment.