Skip to content

Commit

Permalink
update rest endpoints
Browse files Browse the repository at this point in the history
  • Loading branch information
zklimaleo committed Nov 22, 2024
1 parent c00c235 commit 3790001
Show file tree
Hide file tree
Showing 26 changed files with 25 additions and 91 deletions.
2 changes: 1 addition & 1 deletion documentation/references/apis/00_latest_height.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ sidebar_label: Latest Height
---

```bash title=ENDPOINT
GET /testnet/latest/height
GET /{network}/block/height/latest
```

Returns the latest block height.
Expand Down
2 changes: 1 addition & 1 deletion documentation/references/apis/01_latest_hash.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ sidebar_label: Latest Hash
---

```bash title=ENDPOINT
GET /testnet/latest/hash
GET /{network}/block/hash/latest
```

Returns the latest block hash.
Expand Down
2 changes: 1 addition & 1 deletion documentation/references/apis/02_latest_block.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ sidebar_label: Latest Block
---

```bash title=ENDPOINT
GET /testnet/latest/block
GET /{network}/block/latest
```

Returns the latest block.
Expand Down
2 changes: 1 addition & 1 deletion documentation/references/apis/03_latest_state_root.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ sidebar_label: Latest State Root
---

```bash title=ENDPOINT
GET /testnet/latest/stateRoot
GET /{network}/stateRoot/latest
```

Returns the latest state root.
Expand Down
2 changes: 1 addition & 1 deletion documentation/references/apis/04_get_block.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ sidebar_label: Get Block
---

```bash title=ENDPOINT
GET /testnet/block/{height_or_hash}
GET /{network}/block/{height_or_hash}
```

Returns the block for the given block height or block hash.
Expand Down
2 changes: 1 addition & 1 deletion documentation/references/apis/05_get_blocks.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ sidebar_label: Get Blocks
---

```javascript title=ENDPOINT
GET /testnet/blocks?start={start_height}&end={end_height}
GET /{network}/blocks
```

Returns the blocks for the given block range.
Expand Down
2 changes: 1 addition & 1 deletion documentation/references/apis/06_get_height.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ sidebar_label: Get Height
---

```bash title=ENDPOINT
GET /testnet/height/{blockHash}
GET /{network}/height/{blockHash}
```

Returns the height for the given block hash.
Expand Down
4 changes: 2 additions & 2 deletions documentation/references/apis/07_get_block_transactions.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ sidebar_label: Get Block Transactions
---

```bash title=ENDPOINT
GET /testnet/block/{height}/transactions
GET /{network}/block/{height_or_hash}/transactions
```

Returns the transactions for the given block height.
Expand All @@ -14,7 +14,7 @@ Returns the transactions for the given block height.

| Parameter | Type | Required | Description |
|:----------|:----:|:--------:|:------------------------------------------------|
| `height` | u32 | Yes | The block height of the requested transactions. |
| `height` or `hash` | u32 or string | Yes | The block height or hash of the requested block |

### Response

Expand Down
2 changes: 1 addition & 1 deletion documentation/references/apis/08_get_transaction.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ sidebar_label: Get Transaction
---

```bash title=ENDPOINT
GET /testnet/transaction/{transactionID}
GET /{network}/transaction/{transactionID}
```

Returns the transaction for the given transaction ID.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ sidebar_label: Get Memory Pool Transactions
---

```bash title=ENDPOINT
GET /testnet/memoryPool/transactions
GET /{network}/memoryPool/transactions
```

Returns the transactions in the memory pool.
Expand Down
2 changes: 1 addition & 1 deletion documentation/references/apis/10_get_program.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ sidebar_label: Get Program
---

```bash title=ENDPOINT
GET /testnet/program/{programID}
GET /{network}/program/{programID}
```

Returns the program for the given program ID.
Expand Down
2 changes: 1 addition & 1 deletion documentation/references/apis/11_get_mapping_names.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ sidebar_label: Get Mapping Names
---

```bash title=ENDPOINT
GET /testnet/program/{programID}/mappings
GET /{network}/program/{programID}/mappings
```

Returns the names of the mappings in a program for the given program ID.
Expand Down
2 changes: 1 addition & 1 deletion documentation/references/apis/12_get_mapping_value.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ sidebar_label: Get Mapping Value
---

```bash title=ENDPOINT
GET /testnet/program/{programID}/mapping/{mappingName}/{mappingKey}
GET /{network}/program/{programID}/mapping/{mappingName}/{mappingKey}
```

Returns the value in a key-value mapping corresponding to the supplied mappingKey.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ sidebar_label: Get State Path For Commitment
---

```bash title=ENDPOINT
GET /testnet/statePath/{commitment}
GET /{network}/statePath/{commitment}
```

Returns the state path for the given commitment.
Expand Down
21 changes: 0 additions & 21 deletions documentation/references/apis/14_get_beacons.md

This file was deleted.

2 changes: 1 addition & 1 deletion documentation/references/apis/14_get_committee.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ sidebar_label: Get Committee
---

```bash title=ENDPOINT
GET /testnet/latest/committee
GET /{network}/committee/latest
```

Returns the list of current committee members and their stake.
Expand Down
2 changes: 1 addition & 1 deletion documentation/references/apis/15_get_peers_count.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ sidebar_label: Get Peers Count
---

```bash title=ENDPOINT
GET /testnet/peers/count
GET /{network}/peers/count
```

Returns the number of peers connected to the node.
Expand Down
2 changes: 1 addition & 1 deletion documentation/references/apis/16_get_peers_all.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ sidebar_label: Get Peers All
---

```bash title=ENDPOINT
GET /testnet/peers/all
GET /{network}/peers/all
```

Returns the peers connected to the node.
Expand Down
2 changes: 1 addition & 1 deletion documentation/references/apis/17_get_peers_all_metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ sidebar_label: Get Peers All Metrics
---

```bash title=ENDPOINT
GET /testnet/peers/all/metrics
GET /{network}/peers/all/metrics
```

Returns the peers and their types connected to the node.
Expand Down
2 changes: 1 addition & 1 deletion documentation/references/apis/18_get_node_address.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ sidebar_label: Get Node Address
---

```bash title=ENDPOINT
GET /testnet/node/address
GET /{network}/node/address
```

Returns the address of the node.
Expand Down
2 changes: 1 addition & 1 deletion documentation/references/apis/19_find_block_hash.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ sidebar_label: Find Block Hash
---

```bash title=ENDPOINT
GET /testnet/find/blockHash/{transactionID}
GET /{network}/find/blockHash/{transactionID}
```

Returns the block hash of the block containing the given transaction ID.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ sidebar_label: Find Transaction ID from Program ID
---

```bash title=ENDPOINT
GET /testnet/find/transactionID/deployment/{programID}
GET /{network}/find/transactionID/deployment/{programID}
```

Returns the transaction ID of the transaction containing the given program ID.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ sidebar_label: Find Transaction ID from Transition ID
---

```bash title=ENDPOINT
GET /testnet/find/transactionID/{transitionID}
GET /{network}/find/transactionID/{transitionID}
```

Returns the transaction ID of the transaction containing the given transition ID.
Expand All @@ -14,7 +14,7 @@ Returns the transaction ID of the transaction containing the given transition ID

| Parameter | Type | Description |
|:---------:|:------:|:-----------------:|
| `result` | String | The transition ID |
| `transitionID` | String | The transition ID |

### Response

Expand Down
2 changes: 1 addition & 1 deletion documentation/references/apis/22_find_transition_id.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ sidebar_label: Find Transition ID
---

```bash title=ENDPOINT
GET /testnet/find/transitionID/{inputOrOutputID}
GET /{network}/find/transitionID/{inputOrOutputID}
```

Returns the transition ID of the transition corresponding to the ID of the input or output.
Expand Down
22 changes: 0 additions & 22 deletions documentation/references/apis/23_get_env_info.md

This file was deleted.

23 changes: 0 additions & 23 deletions documentation/references/apis/24_transaction_broadcast.md

This file was deleted.

0 comments on commit 3790001

Please sign in to comment.