Skip to content

Commit

Permalink
Update blocks and validator set endpoints (#463)
Browse files Browse the repository at this point in the history
* Update swagger endpoint

* Update api endpoints for blocks and validator sets
  • Loading branch information
emperorjm authored Mar 19, 2024
1 parent 354ea71 commit 1c8ac4f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions content/2.developers/2.developer-tools/5.swagger.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ Swagger is provided for both <a href="https://api.mainnet.archway.io" target="_b

To use this Swagger API documentation, you must first set up the necessary API calls from a tool or platform that supports RESTful HTTP requests. Here are the general steps you would follow:

1) Identify the API Endpoint: First, select the API endpoint you want to interact with. For instance, if you want to get the latest block's details for Archway mainnet, the endpoint would be **https://api.mainnet.archway.io/blocks/latest**.
1) Identify the API Endpoint: First, select the API endpoint you want to interact with. For instance, if you want to get the latest block's details for Archway mainnet, the endpoint would be **https://api.mainnet.archway.io/cosmos/base/tendermint/v1beta1/blocks/latest**.

2) Choose the HTTP Method: For all the endpoints in this specification, the HTTP method is GET.

3) Construct the API URL: This involves appending the API endpoint to the base URL of the API.

4) Include Query Parameters (if needed): Some endpoints require additional parameters that should be included in the request. For instance, the **/validatorsets** endpoint accepts a block height as a parameter: **https://api.mainnet.archway.io/validatorsets/18000**.
4) Include Query Parameters (if needed): Some endpoints require additional parameters that should be included in the request. For instance, the **/validatorsets** endpoint accepts a block height as a parameter: **https://api.mainnet.archway.io//cosmos/base/tendermint/v1beta1/validatorsets/18000**.

5) Send the Request: Use a tool, library, or software that can send HTTP requests. This could be a command-line tool like curl, a programming language with libraries for sending HTTP requests, or a complete API platform like Postman or Insomnia.

Expand All @@ -45,7 +45,7 @@ An example on how to query the information regarding the latest block, would be

```bash
curl -X 'GET' \
'https://api.mainnet.archway.io/blocks/latest' \
'https://api.mainnet.archway.io/cosmos/base/tendermint/v1beta1/blocks/latest' \
-H 'accept: application/json'
```

Expand Down

0 comments on commit 1c8ac4f

Please sign in to comment.