From 90b84b06f71932b0b4626853f2de7f7c24ddc913 Mon Sep 17 00:00:00 2001 From: rdlrt <3169068+rdlrt@users.noreply.github.com> Date: Mon, 25 Sep 2023 02:13:03 +0000 Subject: [PATCH] Bump v0 to v1 in specs --- specs/results/koiosapi-guild.yaml | 30 ++++++++++++++--------------- specs/results/koiosapi-mainnet.yaml | 28 +++++++++++++-------------- specs/results/koiosapi-preprod.yaml | 28 +++++++++++++-------------- specs/results/koiosapi-preview.yaml | 28 +++++++++++++-------------- specs/templates/1-api-info.yaml | 18 ++++++++--------- specs/templates/api-main.yaml | 10 +++++----- specs/templates/example-map.json | 2 +- 7 files changed, 72 insertions(+), 72 deletions(-) diff --git a/specs/results/koiosapi-guild.yaml b/specs/results/koiosapi-guild.yaml index 45e95819..b2015a81 100644 --- a/specs/results/koiosapi-guild.yaml +++ b/specs/results/koiosapi-guild.yaml @@ -14,11 +14,11 @@ info: Instead of returning entire row, you can elect which rows you would like to fetch from the endpoint by using the `select` parameter with corresponding columns separated by commas. See example below (first is complete information for tip, while second command gives us 3 columns we are interested in):

``` bash - curl "https://api.koios.rest/api/v0/tip" + curl "https://api.koios.rest/api/v1/tip" # [{"hash":"4d44c8a453e677f933c3df42ebcf2fe45987c41268b9cfc9b42ae305e8c3d99a","epoch":317,"abs_slot":51700871,"epoch_slot":120071,"block_height":6806994,"block_time":1643267162}] - curl "https://api.koios.rest/api/v0/blocks?select=epoch,epoch_slot,block_height" + curl "https://api.koios.rest/api/v1/blocks?select=epoch,epoch_slot,block_height" # [{"epoch":317,"epoch_slot":120071,"block_height":6806994}] ``` @@ -27,7 +27,7 @@ info: You can filter the returned output based on specific conditions using operators against a column within returned result. Consider an example where you would want to query blocks minted in first 3 minutes of epoch 250 (i.e. epoch_slot was less than 180). To do so your query would look like below:

``` bash - curl "https://api.koios.rest/api/v0/blocks?epoch=eq.250&epoch_slot=lt.180" + curl "https://api.koios.rest/api/v1/blocks?epoch=eq.250&epoch_slot=lt.180" # [{"hash":"8fad2808ac6b37064a0fa69f6fe065807703d5235a57442647bbcdba1c02faf8","epoch":250,"abs_slot":22636942,"epoch_slot":142,"block_height":5385757,"block_time":1614203233,"tx_count":65,"vrf_key":"vrf_vk14y9pjprzlsjvjt66mv5u7w7292sxp3kn4ewhss45ayjga5vurgaqhqknuu","pool":null,"op_cert_counter":2}, # {"hash":"9d33b02badaedc0dedd0d59f3e0411e5fb4ac94217fb5ee86719e8463c570e16","epoch":250,"abs_slot":22636800,"epoch_slot":0,"block_height":5385756,"block_time":1614203091,"tx_count":10,"vrf_key":"vrf_vk1dkfsejw3h2k7tnguwrauqfwnxa7wj3nkp3yw2yw3400c4nlkluwqzwvka6","pool":null,"op_cert_counter":2}] @@ -62,7 +62,7 @@ info: Consider a simple case where I want query `blocks` endpoint for `block_height` column and focus on `content-range` header to monitor the rows we discussed above.

``` bash - curl -s "https://api.koios.rest/api/v0/blocks?select=block_height" -I | grep -i content-range + curl -s "https://api.koios.rest/api/v1/blocks?select=block_height" -I | grep -i content-range # content-range: 0-999/* @@ -71,7 +71,7 @@ info: As we can see above, the number of observations returned was 1000 (range being 0-999), but the total size was not queried to avoid wait times. Now, let's modify this default behaviour to query rows beyond the first 999, but this time - also add another clause to limit results by 500. We can do this using `offset=1000` and `limit=500` as below:

``` bash - curl -s "https://api.koios.rest/api/v0/blocks?select=block_height&offset=1000&limit=500" -I | grep -i content-range + curl -s "https://api.koios.rest/api/v1/blocks?select=block_height&offset=1000&limit=500" -I | grep -i content-range # content-range: 1000-1499/* @@ -80,7 +80,7 @@ info: For GET endpoints, there is also another method to achieve the above, instead of adding parameters to the URL itself, you can specify a `Range` header as below to achieve something similar:

``` bash - curl -s "https://api.koios.rest/api/v0/blocks?select=block_height" -H "Range: 1000-1499" -I | grep -i content-range + curl -s "https://api.koios.rest/api/v1/blocks?select=block_height" -H "Range: 1000-1499" -I | grep -i content-range # content-range: 1000-1499/* @@ -94,7 +94,7 @@ info: Consider example where you want to check `epoch` and `epoch_slot` for the first 5 blocks created by a particular pool, i.e. you can set order to ascending based on block_height column and add horizontal filter for that pool ID as below:

``` bash - curl -s "https://api.koios.rest/api/v0/blocks?pool=eq.pool155efqn9xpcf73pphkk88cmlkdwx4ulkg606tne970qswczg3asc&order=block_height.asc&limit=5" + curl -s "https://api.koios.rest/api/v1/blocks?pool=eq.pool155efqn9xpcf73pphkk88cmlkdwx4ulkg606tne970qswczg3asc&order=block_height.asc&limit=5" # [{"hash":"610b4c7bbebeeb212bd002885048cc33154ba29f39919d62a3d96de05d315706","epoch":236,"abs_slot":16594295,"epoch_slot":5495,"block_height":5086774,"block_time":1608160586,"tx_count":1,"vrf_key":"vrf_vk18x0e7dx8j37gdxftnn8ru6jcxs7n6acdazc4ykeda2ygjwg9a7ls7ns699","pool":"pool155efqn9xpcf73pphkk88cmlkdwx4ulkg606tne970qswczg3asc","op_cert_counter":1}, # {"hash":"d93d1db5275329ab695d30c06a35124038d8d9af64fc2b0aa082b8aa43da4164","epoch":236,"abs_slot":16597729,"epoch_slot":8929,"block_height":5086944,"block_time":1608164020,"tx_count":7,"vrf_key":"vrf_vk18x0e7dx8j37gdxftnn8ru6jcxs7n6acdazc4ykeda2ygjwg9a7ls7ns699","pool":"pool155efqn9xpcf73pphkk88cmlkdwx4ulkg606tne970qswczg3asc","op_cert_counter":1}, @@ -109,13 +109,13 @@ info: Below is an example of JSON/CSV output making use of above to print first in JSON (default), and then override response format to CSV.

``` bash - curl -s "https://api.koios.rest/api/v0/blocks?select=epoch,epoch_slot,block_time&limit=3" + curl -s "https://api.koios.rest/api/v1/blocks?select=epoch,epoch_slot,block_time&limit=3" # [{"epoch":318,"epoch_slot":27867,"block_time":1643606958}, # {"epoch":318,"epoch_slot":27841,"block_time":1643606932}, # {"epoch":318,"epoch_slot":27839,"block_time":1643606930}] - curl -s "https://api.koios.rest/api/v0/blocks?select=epoch,epoch_slot,block_time&limit=3" -H "Accept: text/csv" + curl -s "https://api.koios.rest/api/v1/blocks?select=epoch,epoch_slot,block_time&limit=3" -H "Accept: text/csv" # epoch,epoch_slot,block_time # 318,28491,1643607582 @@ -146,10 +146,10 @@ info: x-logo: url: "https://api.koios.rest/images/koios.png" servers: - - url: https://api.koios.rest/api/v0 - - url: https://guild.koios.rest/api/v0 - - url: https://preview.koios.rest/api/v0 - - url: https://preprod.koios.rest/api/v0 + - url: https://api.koios.rest/api/v1 + - url: https://guild.koios.rest/api/v1 + - url: https://preview.koios.rest/api/v1 + - url: https://preprod.koios.rest/api/v1 paths: /tip: #RPC @@ -496,7 +496,7 @@ paths: # If using a CLI-generated tx file, please ensure to deserialise (using `xxd -p -r <<< $(jq .cborHex ${tx.signed}) > ${data}`) first before submitting. curl -X POST \ --header "Content-Type: application/cbor" \ - --data-binary ${data} https://api.koios.rest/api/v0/submittx + --data-binary ${data} https://api.koios.rest/api/v1/submittx responses: "202": description: OK @@ -1686,7 +1686,7 @@ components: description: Epoch Number to fetch details for schema: type: string - example: 1950 + example: 6219 in: query required: false allowEmptyValue: true diff --git a/specs/results/koiosapi-mainnet.yaml b/specs/results/koiosapi-mainnet.yaml index 867a1ce0..d41c78a4 100644 --- a/specs/results/koiosapi-mainnet.yaml +++ b/specs/results/koiosapi-mainnet.yaml @@ -14,11 +14,11 @@ info: Instead of returning entire row, you can elect which rows you would like to fetch from the endpoint by using the `select` parameter with corresponding columns separated by commas. See example below (first is complete information for tip, while second command gives us 3 columns we are interested in):

``` bash - curl "https://api.koios.rest/api/v0/tip" + curl "https://api.koios.rest/api/v1/tip" # [{"hash":"4d44c8a453e677f933c3df42ebcf2fe45987c41268b9cfc9b42ae305e8c3d99a","epoch":317,"abs_slot":51700871,"epoch_slot":120071,"block_height":6806994,"block_time":1643267162}] - curl "https://api.koios.rest/api/v0/blocks?select=epoch,epoch_slot,block_height" + curl "https://api.koios.rest/api/v1/blocks?select=epoch,epoch_slot,block_height" # [{"epoch":317,"epoch_slot":120071,"block_height":6806994}] ``` @@ -27,7 +27,7 @@ info: You can filter the returned output based on specific conditions using operators against a column within returned result. Consider an example where you would want to query blocks minted in first 3 minutes of epoch 250 (i.e. epoch_slot was less than 180). To do so your query would look like below:

``` bash - curl "https://api.koios.rest/api/v0/blocks?epoch=eq.250&epoch_slot=lt.180" + curl "https://api.koios.rest/api/v1/blocks?epoch=eq.250&epoch_slot=lt.180" # [{"hash":"8fad2808ac6b37064a0fa69f6fe065807703d5235a57442647bbcdba1c02faf8","epoch":250,"abs_slot":22636942,"epoch_slot":142,"block_height":5385757,"block_time":1614203233,"tx_count":65,"vrf_key":"vrf_vk14y9pjprzlsjvjt66mv5u7w7292sxp3kn4ewhss45ayjga5vurgaqhqknuu","pool":null,"op_cert_counter":2}, # {"hash":"9d33b02badaedc0dedd0d59f3e0411e5fb4ac94217fb5ee86719e8463c570e16","epoch":250,"abs_slot":22636800,"epoch_slot":0,"block_height":5385756,"block_time":1614203091,"tx_count":10,"vrf_key":"vrf_vk1dkfsejw3h2k7tnguwrauqfwnxa7wj3nkp3yw2yw3400c4nlkluwqzwvka6","pool":null,"op_cert_counter":2}] @@ -62,7 +62,7 @@ info: Consider a simple case where I want query `blocks` endpoint for `block_height` column and focus on `content-range` header to monitor the rows we discussed above.

``` bash - curl -s "https://api.koios.rest/api/v0/blocks?select=block_height" -I | grep -i content-range + curl -s "https://api.koios.rest/api/v1/blocks?select=block_height" -I | grep -i content-range # content-range: 0-999/* @@ -71,7 +71,7 @@ info: As we can see above, the number of observations returned was 1000 (range being 0-999), but the total size was not queried to avoid wait times. Now, let's modify this default behaviour to query rows beyond the first 999, but this time - also add another clause to limit results by 500. We can do this using `offset=1000` and `limit=500` as below:

``` bash - curl -s "https://api.koios.rest/api/v0/blocks?select=block_height&offset=1000&limit=500" -I | grep -i content-range + curl -s "https://api.koios.rest/api/v1/blocks?select=block_height&offset=1000&limit=500" -I | grep -i content-range # content-range: 1000-1499/* @@ -80,7 +80,7 @@ info: For GET endpoints, there is also another method to achieve the above, instead of adding parameters to the URL itself, you can specify a `Range` header as below to achieve something similar:

``` bash - curl -s "https://api.koios.rest/api/v0/blocks?select=block_height" -H "Range: 1000-1499" -I | grep -i content-range + curl -s "https://api.koios.rest/api/v1/blocks?select=block_height" -H "Range: 1000-1499" -I | grep -i content-range # content-range: 1000-1499/* @@ -94,7 +94,7 @@ info: Consider example where you want to check `epoch` and `epoch_slot` for the first 5 blocks created by a particular pool, i.e. you can set order to ascending based on block_height column and add horizontal filter for that pool ID as below:

``` bash - curl -s "https://api.koios.rest/api/v0/blocks?pool=eq.pool155efqn9xpcf73pphkk88cmlkdwx4ulkg606tne970qswczg3asc&order=block_height.asc&limit=5" + curl -s "https://api.koios.rest/api/v1/blocks?pool=eq.pool155efqn9xpcf73pphkk88cmlkdwx4ulkg606tne970qswczg3asc&order=block_height.asc&limit=5" # [{"hash":"610b4c7bbebeeb212bd002885048cc33154ba29f39919d62a3d96de05d315706","epoch":236,"abs_slot":16594295,"epoch_slot":5495,"block_height":5086774,"block_time":1608160586,"tx_count":1,"vrf_key":"vrf_vk18x0e7dx8j37gdxftnn8ru6jcxs7n6acdazc4ykeda2ygjwg9a7ls7ns699","pool":"pool155efqn9xpcf73pphkk88cmlkdwx4ulkg606tne970qswczg3asc","op_cert_counter":1}, # {"hash":"d93d1db5275329ab695d30c06a35124038d8d9af64fc2b0aa082b8aa43da4164","epoch":236,"abs_slot":16597729,"epoch_slot":8929,"block_height":5086944,"block_time":1608164020,"tx_count":7,"vrf_key":"vrf_vk18x0e7dx8j37gdxftnn8ru6jcxs7n6acdazc4ykeda2ygjwg9a7ls7ns699","pool":"pool155efqn9xpcf73pphkk88cmlkdwx4ulkg606tne970qswczg3asc","op_cert_counter":1}, @@ -109,13 +109,13 @@ info: Below is an example of JSON/CSV output making use of above to print first in JSON (default), and then override response format to CSV.

``` bash - curl -s "https://api.koios.rest/api/v0/blocks?select=epoch,epoch_slot,block_time&limit=3" + curl -s "https://api.koios.rest/api/v1/blocks?select=epoch,epoch_slot,block_time&limit=3" # [{"epoch":318,"epoch_slot":27867,"block_time":1643606958}, # {"epoch":318,"epoch_slot":27841,"block_time":1643606932}, # {"epoch":318,"epoch_slot":27839,"block_time":1643606930}] - curl -s "https://api.koios.rest/api/v0/blocks?select=epoch,epoch_slot,block_time&limit=3" -H "Accept: text/csv" + curl -s "https://api.koios.rest/api/v1/blocks?select=epoch,epoch_slot,block_time&limit=3" -H "Accept: text/csv" # epoch,epoch_slot,block_time # 318,28491,1643607582 @@ -146,10 +146,10 @@ info: x-logo: url: "https://api.koios.rest/images/koios.png" servers: - - url: https://api.koios.rest/api/v0 - - url: https://guild.koios.rest/api/v0 - - url: https://preview.koios.rest/api/v0 - - url: https://preprod.koios.rest/api/v0 + - url: https://api.koios.rest/api/v1 + - url: https://guild.koios.rest/api/v1 + - url: https://preview.koios.rest/api/v1 + - url: https://preprod.koios.rest/api/v1 paths: /tip: #RPC @@ -496,7 +496,7 @@ paths: # If using a CLI-generated tx file, please ensure to deserialise (using `xxd -p -r <<< $(jq .cborHex ${tx.signed}) > ${data}`) first before submitting. curl -X POST \ --header "Content-Type: application/cbor" \ - --data-binary ${data} https://api.koios.rest/api/v0/submittx + --data-binary ${data} https://api.koios.rest/api/v1/submittx responses: "202": description: OK diff --git a/specs/results/koiosapi-preprod.yaml b/specs/results/koiosapi-preprod.yaml index 1eb430c4..37269117 100644 --- a/specs/results/koiosapi-preprod.yaml +++ b/specs/results/koiosapi-preprod.yaml @@ -14,11 +14,11 @@ info: Instead of returning entire row, you can elect which rows you would like to fetch from the endpoint by using the `select` parameter with corresponding columns separated by commas. See example below (first is complete information for tip, while second command gives us 3 columns we are interested in):

``` bash - curl "https://api.koios.rest/api/v0/tip" + curl "https://api.koios.rest/api/v1/tip" # [{"hash":"4d44c8a453e677f933c3df42ebcf2fe45987c41268b9cfc9b42ae305e8c3d99a","epoch":317,"abs_slot":51700871,"epoch_slot":120071,"block_height":6806994,"block_time":1643267162}] - curl "https://api.koios.rest/api/v0/blocks?select=epoch,epoch_slot,block_height" + curl "https://api.koios.rest/api/v1/blocks?select=epoch,epoch_slot,block_height" # [{"epoch":317,"epoch_slot":120071,"block_height":6806994}] ``` @@ -27,7 +27,7 @@ info: You can filter the returned output based on specific conditions using operators against a column within returned result. Consider an example where you would want to query blocks minted in first 3 minutes of epoch 250 (i.e. epoch_slot was less than 180). To do so your query would look like below:

``` bash - curl "https://api.koios.rest/api/v0/blocks?epoch=eq.250&epoch_slot=lt.180" + curl "https://api.koios.rest/api/v1/blocks?epoch=eq.250&epoch_slot=lt.180" # [{"hash":"8fad2808ac6b37064a0fa69f6fe065807703d5235a57442647bbcdba1c02faf8","epoch":250,"abs_slot":22636942,"epoch_slot":142,"block_height":5385757,"block_time":1614203233,"tx_count":65,"vrf_key":"vrf_vk14y9pjprzlsjvjt66mv5u7w7292sxp3kn4ewhss45ayjga5vurgaqhqknuu","pool":null,"op_cert_counter":2}, # {"hash":"9d33b02badaedc0dedd0d59f3e0411e5fb4ac94217fb5ee86719e8463c570e16","epoch":250,"abs_slot":22636800,"epoch_slot":0,"block_height":5385756,"block_time":1614203091,"tx_count":10,"vrf_key":"vrf_vk1dkfsejw3h2k7tnguwrauqfwnxa7wj3nkp3yw2yw3400c4nlkluwqzwvka6","pool":null,"op_cert_counter":2}] @@ -62,7 +62,7 @@ info: Consider a simple case where I want query `blocks` endpoint for `block_height` column and focus on `content-range` header to monitor the rows we discussed above.

``` bash - curl -s "https://api.koios.rest/api/v0/blocks?select=block_height" -I | grep -i content-range + curl -s "https://api.koios.rest/api/v1/blocks?select=block_height" -I | grep -i content-range # content-range: 0-999/* @@ -71,7 +71,7 @@ info: As we can see above, the number of observations returned was 1000 (range being 0-999), but the total size was not queried to avoid wait times. Now, let's modify this default behaviour to query rows beyond the first 999, but this time - also add another clause to limit results by 500. We can do this using `offset=1000` and `limit=500` as below:

``` bash - curl -s "https://api.koios.rest/api/v0/blocks?select=block_height&offset=1000&limit=500" -I | grep -i content-range + curl -s "https://api.koios.rest/api/v1/blocks?select=block_height&offset=1000&limit=500" -I | grep -i content-range # content-range: 1000-1499/* @@ -80,7 +80,7 @@ info: For GET endpoints, there is also another method to achieve the above, instead of adding parameters to the URL itself, you can specify a `Range` header as below to achieve something similar:

``` bash - curl -s "https://api.koios.rest/api/v0/blocks?select=block_height" -H "Range: 1000-1499" -I | grep -i content-range + curl -s "https://api.koios.rest/api/v1/blocks?select=block_height" -H "Range: 1000-1499" -I | grep -i content-range # content-range: 1000-1499/* @@ -94,7 +94,7 @@ info: Consider example where you want to check `epoch` and `epoch_slot` for the first 5 blocks created by a particular pool, i.e. you can set order to ascending based on block_height column and add horizontal filter for that pool ID as below:

``` bash - curl -s "https://api.koios.rest/api/v0/blocks?pool=eq.pool155efqn9xpcf73pphkk88cmlkdwx4ulkg606tne970qswczg3asc&order=block_height.asc&limit=5" + curl -s "https://api.koios.rest/api/v1/blocks?pool=eq.pool155efqn9xpcf73pphkk88cmlkdwx4ulkg606tne970qswczg3asc&order=block_height.asc&limit=5" # [{"hash":"610b4c7bbebeeb212bd002885048cc33154ba29f39919d62a3d96de05d315706","epoch":236,"abs_slot":16594295,"epoch_slot":5495,"block_height":5086774,"block_time":1608160586,"tx_count":1,"vrf_key":"vrf_vk18x0e7dx8j37gdxftnn8ru6jcxs7n6acdazc4ykeda2ygjwg9a7ls7ns699","pool":"pool155efqn9xpcf73pphkk88cmlkdwx4ulkg606tne970qswczg3asc","op_cert_counter":1}, # {"hash":"d93d1db5275329ab695d30c06a35124038d8d9af64fc2b0aa082b8aa43da4164","epoch":236,"abs_slot":16597729,"epoch_slot":8929,"block_height":5086944,"block_time":1608164020,"tx_count":7,"vrf_key":"vrf_vk18x0e7dx8j37gdxftnn8ru6jcxs7n6acdazc4ykeda2ygjwg9a7ls7ns699","pool":"pool155efqn9xpcf73pphkk88cmlkdwx4ulkg606tne970qswczg3asc","op_cert_counter":1}, @@ -109,13 +109,13 @@ info: Below is an example of JSON/CSV output making use of above to print first in JSON (default), and then override response format to CSV.

``` bash - curl -s "https://api.koios.rest/api/v0/blocks?select=epoch,epoch_slot,block_time&limit=3" + curl -s "https://api.koios.rest/api/v1/blocks?select=epoch,epoch_slot,block_time&limit=3" # [{"epoch":318,"epoch_slot":27867,"block_time":1643606958}, # {"epoch":318,"epoch_slot":27841,"block_time":1643606932}, # {"epoch":318,"epoch_slot":27839,"block_time":1643606930}] - curl -s "https://api.koios.rest/api/v0/blocks?select=epoch,epoch_slot,block_time&limit=3" -H "Accept: text/csv" + curl -s "https://api.koios.rest/api/v1/blocks?select=epoch,epoch_slot,block_time&limit=3" -H "Accept: text/csv" # epoch,epoch_slot,block_time # 318,28491,1643607582 @@ -146,10 +146,10 @@ info: x-logo: url: "https://api.koios.rest/images/koios.png" servers: - - url: https://api.koios.rest/api/v0 - - url: https://guild.koios.rest/api/v0 - - url: https://preview.koios.rest/api/v0 - - url: https://preprod.koios.rest/api/v0 + - url: https://api.koios.rest/api/v1 + - url: https://guild.koios.rest/api/v1 + - url: https://preview.koios.rest/api/v1 + - url: https://preprod.koios.rest/api/v1 paths: /tip: #RPC @@ -496,7 +496,7 @@ paths: # If using a CLI-generated tx file, please ensure to deserialise (using `xxd -p -r <<< $(jq .cborHex ${tx.signed}) > ${data}`) first before submitting. curl -X POST \ --header "Content-Type: application/cbor" \ - --data-binary ${data} https://api.koios.rest/api/v0/submittx + --data-binary ${data} https://api.koios.rest/api/v1/submittx responses: "202": description: OK diff --git a/specs/results/koiosapi-preview.yaml b/specs/results/koiosapi-preview.yaml index bbbd5055..c0916eff 100644 --- a/specs/results/koiosapi-preview.yaml +++ b/specs/results/koiosapi-preview.yaml @@ -14,11 +14,11 @@ info: Instead of returning entire row, you can elect which rows you would like to fetch from the endpoint by using the `select` parameter with corresponding columns separated by commas. See example below (first is complete information for tip, while second command gives us 3 columns we are interested in):

``` bash - curl "https://api.koios.rest/api/v0/tip" + curl "https://api.koios.rest/api/v1/tip" # [{"hash":"4d44c8a453e677f933c3df42ebcf2fe45987c41268b9cfc9b42ae305e8c3d99a","epoch":317,"abs_slot":51700871,"epoch_slot":120071,"block_height":6806994,"block_time":1643267162}] - curl "https://api.koios.rest/api/v0/blocks?select=epoch,epoch_slot,block_height" + curl "https://api.koios.rest/api/v1/blocks?select=epoch,epoch_slot,block_height" # [{"epoch":317,"epoch_slot":120071,"block_height":6806994}] ``` @@ -27,7 +27,7 @@ info: You can filter the returned output based on specific conditions using operators against a column within returned result. Consider an example where you would want to query blocks minted in first 3 minutes of epoch 250 (i.e. epoch_slot was less than 180). To do so your query would look like below:

``` bash - curl "https://api.koios.rest/api/v0/blocks?epoch=eq.250&epoch_slot=lt.180" + curl "https://api.koios.rest/api/v1/blocks?epoch=eq.250&epoch_slot=lt.180" # [{"hash":"8fad2808ac6b37064a0fa69f6fe065807703d5235a57442647bbcdba1c02faf8","epoch":250,"abs_slot":22636942,"epoch_slot":142,"block_height":5385757,"block_time":1614203233,"tx_count":65,"vrf_key":"vrf_vk14y9pjprzlsjvjt66mv5u7w7292sxp3kn4ewhss45ayjga5vurgaqhqknuu","pool":null,"op_cert_counter":2}, # {"hash":"9d33b02badaedc0dedd0d59f3e0411e5fb4ac94217fb5ee86719e8463c570e16","epoch":250,"abs_slot":22636800,"epoch_slot":0,"block_height":5385756,"block_time":1614203091,"tx_count":10,"vrf_key":"vrf_vk1dkfsejw3h2k7tnguwrauqfwnxa7wj3nkp3yw2yw3400c4nlkluwqzwvka6","pool":null,"op_cert_counter":2}] @@ -62,7 +62,7 @@ info: Consider a simple case where I want query `blocks` endpoint for `block_height` column and focus on `content-range` header to monitor the rows we discussed above.

``` bash - curl -s "https://api.koios.rest/api/v0/blocks?select=block_height" -I | grep -i content-range + curl -s "https://api.koios.rest/api/v1/blocks?select=block_height" -I | grep -i content-range # content-range: 0-999/* @@ -71,7 +71,7 @@ info: As we can see above, the number of observations returned was 1000 (range being 0-999), but the total size was not queried to avoid wait times. Now, let's modify this default behaviour to query rows beyond the first 999, but this time - also add another clause to limit results by 500. We can do this using `offset=1000` and `limit=500` as below:

``` bash - curl -s "https://api.koios.rest/api/v0/blocks?select=block_height&offset=1000&limit=500" -I | grep -i content-range + curl -s "https://api.koios.rest/api/v1/blocks?select=block_height&offset=1000&limit=500" -I | grep -i content-range # content-range: 1000-1499/* @@ -80,7 +80,7 @@ info: For GET endpoints, there is also another method to achieve the above, instead of adding parameters to the URL itself, you can specify a `Range` header as below to achieve something similar:

``` bash - curl -s "https://api.koios.rest/api/v0/blocks?select=block_height" -H "Range: 1000-1499" -I | grep -i content-range + curl -s "https://api.koios.rest/api/v1/blocks?select=block_height" -H "Range: 1000-1499" -I | grep -i content-range # content-range: 1000-1499/* @@ -94,7 +94,7 @@ info: Consider example where you want to check `epoch` and `epoch_slot` for the first 5 blocks created by a particular pool, i.e. you can set order to ascending based on block_height column and add horizontal filter for that pool ID as below:

``` bash - curl -s "https://api.koios.rest/api/v0/blocks?pool=eq.pool155efqn9xpcf73pphkk88cmlkdwx4ulkg606tne970qswczg3asc&order=block_height.asc&limit=5" + curl -s "https://api.koios.rest/api/v1/blocks?pool=eq.pool155efqn9xpcf73pphkk88cmlkdwx4ulkg606tne970qswczg3asc&order=block_height.asc&limit=5" # [{"hash":"610b4c7bbebeeb212bd002885048cc33154ba29f39919d62a3d96de05d315706","epoch":236,"abs_slot":16594295,"epoch_slot":5495,"block_height":5086774,"block_time":1608160586,"tx_count":1,"vrf_key":"vrf_vk18x0e7dx8j37gdxftnn8ru6jcxs7n6acdazc4ykeda2ygjwg9a7ls7ns699","pool":"pool155efqn9xpcf73pphkk88cmlkdwx4ulkg606tne970qswczg3asc","op_cert_counter":1}, # {"hash":"d93d1db5275329ab695d30c06a35124038d8d9af64fc2b0aa082b8aa43da4164","epoch":236,"abs_slot":16597729,"epoch_slot":8929,"block_height":5086944,"block_time":1608164020,"tx_count":7,"vrf_key":"vrf_vk18x0e7dx8j37gdxftnn8ru6jcxs7n6acdazc4ykeda2ygjwg9a7ls7ns699","pool":"pool155efqn9xpcf73pphkk88cmlkdwx4ulkg606tne970qswczg3asc","op_cert_counter":1}, @@ -109,13 +109,13 @@ info: Below is an example of JSON/CSV output making use of above to print first in JSON (default), and then override response format to CSV.

``` bash - curl -s "https://api.koios.rest/api/v0/blocks?select=epoch,epoch_slot,block_time&limit=3" + curl -s "https://api.koios.rest/api/v1/blocks?select=epoch,epoch_slot,block_time&limit=3" # [{"epoch":318,"epoch_slot":27867,"block_time":1643606958}, # {"epoch":318,"epoch_slot":27841,"block_time":1643606932}, # {"epoch":318,"epoch_slot":27839,"block_time":1643606930}] - curl -s "https://api.koios.rest/api/v0/blocks?select=epoch,epoch_slot,block_time&limit=3" -H "Accept: text/csv" + curl -s "https://api.koios.rest/api/v1/blocks?select=epoch,epoch_slot,block_time&limit=3" -H "Accept: text/csv" # epoch,epoch_slot,block_time # 318,28491,1643607582 @@ -146,10 +146,10 @@ info: x-logo: url: "https://api.koios.rest/images/koios.png" servers: - - url: https://api.koios.rest/api/v0 - - url: https://guild.koios.rest/api/v0 - - url: https://preview.koios.rest/api/v0 - - url: https://preprod.koios.rest/api/v0 + - url: https://api.koios.rest/api/v1 + - url: https://guild.koios.rest/api/v1 + - url: https://preview.koios.rest/api/v1 + - url: https://preprod.koios.rest/api/v1 paths: /tip: #RPC @@ -496,7 +496,7 @@ paths: # If using a CLI-generated tx file, please ensure to deserialise (using `xxd -p -r <<< $(jq .cborHex ${tx.signed}) > ${data}`) first before submitting. curl -X POST \ --header "Content-Type: application/cbor" \ - --data-binary ${data} https://api.koios.rest/api/v0/submittx + --data-binary ${data} https://api.koios.rest/api/v1/submittx responses: "202": description: OK diff --git a/specs/templates/1-api-info.yaml b/specs/templates/1-api-info.yaml index 2d741b0c..a1dbd00d 100644 --- a/specs/templates/1-api-info.yaml +++ b/specs/templates/1-api-info.yaml @@ -13,11 +13,11 @@ info: Instead of returning entire row, you can elect which rows you would like to fetch from the endpoint by using the `select` parameter with corresponding columns separated by commas. See example below (first is complete information for tip, while second command gives us 3 columns we are interested in):

``` bash - curl "https://api.koios.rest/api/v0/tip" + curl "https://api.koios.rest/api/v1/tip" # [{"hash":"4d44c8a453e677f933c3df42ebcf2fe45987c41268b9cfc9b42ae305e8c3d99a","epoch":317,"abs_slot":51700871,"epoch_slot":120071,"block_height":6806994,"block_time":1643267162}] - curl "https://api.koios.rest/api/v0/blocks?select=epoch,epoch_slot,block_height" + curl "https://api.koios.rest/api/v1/blocks?select=epoch,epoch_slot,block_height" # [{"epoch":317,"epoch_slot":120071,"block_height":6806994}] ``` @@ -26,7 +26,7 @@ info: You can filter the returned output based on specific conditions using operators against a column within returned result. Consider an example where you would want to query blocks minted in first 3 minutes of epoch 250 (i.e. epoch_slot was less than 180). To do so your query would look like below:

``` bash - curl "https://api.koios.rest/api/v0/blocks?epoch=eq.250&epoch_slot=lt.180" + curl "https://api.koios.rest/api/v1/blocks?epoch=eq.250&epoch_slot=lt.180" # [{"hash":"8fad2808ac6b37064a0fa69f6fe065807703d5235a57442647bbcdba1c02faf8","epoch":250,"abs_slot":22636942,"epoch_slot":142,"block_height":5385757,"block_time":1614203233,"tx_count":65,"vrf_key":"vrf_vk14y9pjprzlsjvjt66mv5u7w7292sxp3kn4ewhss45ayjga5vurgaqhqknuu","pool":null,"op_cert_counter":2}, # {"hash":"9d33b02badaedc0dedd0d59f3e0411e5fb4ac94217fb5ee86719e8463c570e16","epoch":250,"abs_slot":22636800,"epoch_slot":0,"block_height":5385756,"block_time":1614203091,"tx_count":10,"vrf_key":"vrf_vk1dkfsejw3h2k7tnguwrauqfwnxa7wj3nkp3yw2yw3400c4nlkluwqzwvka6","pool":null,"op_cert_counter":2}] @@ -61,7 +61,7 @@ info: Consider a simple case where I want query `blocks` endpoint for `block_height` column and focus on `content-range` header to monitor the rows we discussed above.

``` bash - curl -s "https://api.koios.rest/api/v0/blocks?select=block_height" -I | grep -i content-range + curl -s "https://api.koios.rest/api/v1/blocks?select=block_height" -I | grep -i content-range # content-range: 0-999/* @@ -70,7 +70,7 @@ info: As we can see above, the number of observations returned was 1000 (range being 0-999), but the total size was not queried to avoid wait times. Now, let's modify this default behaviour to query rows beyond the first 999, but this time - also add another clause to limit results by 500. We can do this using `offset=1000` and `limit=500` as below:

``` bash - curl -s "https://api.koios.rest/api/v0/blocks?select=block_height&offset=1000&limit=500" -I | grep -i content-range + curl -s "https://api.koios.rest/api/v1/blocks?select=block_height&offset=1000&limit=500" -I | grep -i content-range # content-range: 1000-1499/* @@ -79,7 +79,7 @@ info: For GET endpoints, there is also another method to achieve the above, instead of adding parameters to the URL itself, you can specify a `Range` header as below to achieve something similar:

``` bash - curl -s "https://api.koios.rest/api/v0/blocks?select=block_height" -H "Range: 1000-1499" -I | grep -i content-range + curl -s "https://api.koios.rest/api/v1/blocks?select=block_height" -H "Range: 1000-1499" -I | grep -i content-range # content-range: 1000-1499/* @@ -93,7 +93,7 @@ info: Consider example where you want to check `epoch` and `epoch_slot` for the first 5 blocks created by a particular pool, i.e. you can set order to ascending based on block_height column and add horizontal filter for that pool ID as below:

``` bash - curl -s "https://api.koios.rest/api/v0/blocks?pool=eq.pool155efqn9xpcf73pphkk88cmlkdwx4ulkg606tne970qswczg3asc&order=block_height.asc&limit=5" + curl -s "https://api.koios.rest/api/v1/blocks?pool=eq.pool155efqn9xpcf73pphkk88cmlkdwx4ulkg606tne970qswczg3asc&order=block_height.asc&limit=5" # [{"hash":"610b4c7bbebeeb212bd002885048cc33154ba29f39919d62a3d96de05d315706","epoch":236,"abs_slot":16594295,"epoch_slot":5495,"block_height":5086774,"block_time":1608160586,"tx_count":1,"vrf_key":"vrf_vk18x0e7dx8j37gdxftnn8ru6jcxs7n6acdazc4ykeda2ygjwg9a7ls7ns699","pool":"pool155efqn9xpcf73pphkk88cmlkdwx4ulkg606tne970qswczg3asc","op_cert_counter":1}, # {"hash":"d93d1db5275329ab695d30c06a35124038d8d9af64fc2b0aa082b8aa43da4164","epoch":236,"abs_slot":16597729,"epoch_slot":8929,"block_height":5086944,"block_time":1608164020,"tx_count":7,"vrf_key":"vrf_vk18x0e7dx8j37gdxftnn8ru6jcxs7n6acdazc4ykeda2ygjwg9a7ls7ns699","pool":"pool155efqn9xpcf73pphkk88cmlkdwx4ulkg606tne970qswczg3asc","op_cert_counter":1}, @@ -108,13 +108,13 @@ info: Below is an example of JSON/CSV output making use of above to print first in JSON (default), and then override response format to CSV.

``` bash - curl -s "https://api.koios.rest/api/v0/blocks?select=epoch,epoch_slot,block_time&limit=3" + curl -s "https://api.koios.rest/api/v1/blocks?select=epoch,epoch_slot,block_time&limit=3" # [{"epoch":318,"epoch_slot":27867,"block_time":1643606958}, # {"epoch":318,"epoch_slot":27841,"block_time":1643606932}, # {"epoch":318,"epoch_slot":27839,"block_time":1643606930}] - curl -s "https://api.koios.rest/api/v0/blocks?select=epoch,epoch_slot,block_time&limit=3" -H "Accept: text/csv" + curl -s "https://api.koios.rest/api/v1/blocks?select=epoch,epoch_slot,block_time&limit=3" -H "Accept: text/csv" # epoch,epoch_slot,block_time # 318,28491,1643607582 diff --git a/specs/templates/api-main.yaml b/specs/templates/api-main.yaml index 2a0eccbb..b2970565 100644 --- a/specs/templates/api-main.yaml +++ b/specs/templates/api-main.yaml @@ -1,10 +1,10 @@ openapi: 3.0.2 #!info!# servers: - - url: https://api.koios.rest/api/v0 - - url: https://guild.koios.rest/api/v0 - - url: https://preview.koios.rest/api/v0 - - url: https://preprod.koios.rest/api/v0 + - url: https://api.koios.rest/api/v1 + - url: https://guild.koios.rest/api/v1 + - url: https://preview.koios.rest/api/v1 + - url: https://preprod.koios.rest/api/v1 paths: /tip: #RPC @@ -351,7 +351,7 @@ paths: # If using a CLI-generated tx file, please ensure to deserialise (using `xxd -p -r <<< $(jq .cborHex ${tx.signed}) > ${data}`) first before submitting. curl -X POST \ --header "Content-Type: application/cbor" \ - --data-binary ${data} https://api.koios.rest/api/v0/submittx + --data-binary ${data} https://api.koios.rest/api/v1/submittx responses: "202": description: OK diff --git a/specs/templates/example-map.json b/specs/templates/example-map.json index e67131cf..889aa45e 100644 --- a/specs/templates/example-map.json +++ b/specs/templates/example-map.json @@ -8,7 +8,7 @@ }, "_epoch_no": { "m": "320", - "g": "1950", + "g": "6219", "pv": "12", "pp": "31" },