Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Api documentation fixes #2646

Merged
merged 2 commits into from
Mar 11, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions api/src/handlers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,16 +103,19 @@ pub fn build_router(
) -> Result<Router, RouterError> {
let route_list = vec![
"get blocks".to_string(),
"get headers".to_string(),
"get chain".to_string(),
"post chain/compact".to_string(),
"post chain/validate".to_string(),
"get chain/outputs".to_string(),
"get chain/validate".to_string(),
"get chain/outputs/byids?id=xxx,yyy,zzz".to_string(),
"get chain/outputs/byheight?start_height=101&end_height=200".to_string(),
"get status".to_string(),
"get txhashset/roots".to_string(),
"get txhashset/lastoutputs?n=10".to_string(),
"get txhashset/lastrangeproofs".to_string(),
"get txhashset/lastkernels".to_string(),
"get txhashset/outputs?start_index=1&max=100".to_string(),
"get txhashset/merkleproof?n=1".to_string(),
"get pool".to_string(),
"post pool/push".to_string(),
"post peers/a.b.c.d:p/ban".to_string(),
Expand Down
8 changes: 4 additions & 4 deletions doc/api/node_api.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
1. [Chain Endpoint](#chain-endpoint)
1. [GET Chain](#get-chain)
1. [POST Chain Compact](#post-chain-compact)
1. [POST Chain Validate](#post-chain-validate)
1. [GET Chain Validate](#get-chain-validate)
1. [GET Chain Outputs by IDs](#get-chain-outputs-by-ids)
1. [GET Chain Outputs by Height](#get-chain-outputs-by-height)
1. [Status Endpoint](#status-endpoint)
Expand Down Expand Up @@ -282,7 +282,7 @@ Trigger a compaction of the chain state to regain storage space.
});
```

### POST Chain Validate
### GET Chain Validate

Trigger a validation of the chain state.

Expand All @@ -292,7 +292,7 @@ Trigger a validation of the chain state.

* **Method:**

`POST`
`GET`

* **URL Params**

Expand All @@ -316,7 +316,7 @@ Trigger a validation of the chain state.
$.ajax({
url: "/v1/chain/validate",
dataType: "json",
type : "POST",
type : "GET",
success : function(r) {
console.log(r);
}
Expand Down