Skip to content

Commit

Permalink
Add ogmios endpoints and bump v1.0.11rc to v1.1.0rc
Browse files Browse the repository at this point in the history
  • Loading branch information
rdlrt committed Oct 6, 2023
1 parent 4e0b702 commit a7c67a4
Show file tree
Hide file tree
Showing 9 changed files with 207 additions and 18 deletions.
20 changes: 12 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,30 @@
# Koios Artifacts Repository

Various Artifacts related to [Koios project](https://www.koios.rest) management and assets that are used for website, monitoring services as well as public-facing topology files.
Various Artifacts related to [Koios project](https://www.koios.rest) management and assets that are used for website - look at repository map below for further info.
Provisioning scripts to run an instance are part of [guild-operators repo](https://cardano-community.github.io/guild-operators/Build/grest/) alongwith Koios SPO tools

## Repository Map

```
.
├── grafana-dashboards/ # Grafana dashboards used for monitoring Koios nodes
├── html/ # HTML Page(s) used for https://api.koios.rest website
├── images/ # Images (logos, Design diagram, etc) used for Koios
├── images/ # Images used for website (incl. projects building on Koios)
├── specs/ # Files used for creation of API Specs with examples
├── tests/ # Test suites for Koios nodes
├── topology/ # Topology files of public Koios nodes
├── topology-guild.json
├── topology-mainnet.json
└── topology-testnet.json
├── LICENSE # License for use of artifacts within this repository
├── README.md # This file
└── projects.json # List of projects (in JSON format) that are using Koios
└── topology-preprod.json
└── topology-preview.json
├── LICENSE # License for use of artifacts within this repository
├── README.md # This file
└── projects.json # List of projects (in JSON format) that are using Koios
```

## Project Management

Koios team operates gRest layer in a transparent manner and progress/millestones can be accessed at any time (accessible [here](https://github.com/orgs/cardano-community/projects/1))
Koios team operates gRest layer in a transparent manner and progress/millestones can be accessed at any time (accessible [here](https://github.com/orgs/cardano-community/projects/1/views/2))

## API Specs

Expand All @@ -35,4 +39,4 @@ The specs can be browsed for each network using below:

## Further discussions

You can connect and discuss with Koios teams on [Telegram](https://t.me/+zE4Lce_QUepiY2U1), or feel free to contribute to any of the repositories.
You can connect and discuss with Koios teams on [Telegram](https://t.me/CardanoKoios/1), or feel free to contribute to any of the repositories.
39 changes: 38 additions & 1 deletion specs/results/koiosapi-guild.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
openapi: 3.0.2
info:
title: Koios API
version: v1.0.11rc
version: v1.1.0rc
description: |
Koios is best described as a Decentralized and Elastic RESTful query layer for exploring data on Cardano blockchain to consume within applications/wallets/explorers/etc. This page not only provides an OpenAPI Spec for live implementation, but also ability to execute live demo from client browser against each endpoint with pre-filled examples.
Expand Down Expand Up @@ -1606,6 +1606,43 @@ paths:
$ref: "#/components/responses/NotFound"
summary: Datum Information
description: List of datum information for given datum hashes
/ogmios/?EvaluateTransaction: #ogmios-api
post:
tags:
- Ogmios
x-code-samples:
- lang: "Shell"
source: |
# Assuming ${data} contains EvaluateTransaction payload as documented on Ogmios v6 site.
curl -X POST \
--header "Content-Type: application/cbor" \
--data-binary ${data} https://api.koios.rest/api/ogmios/?EvaluateTransaction
responses:
"200":
description: OK
"400":
description: An error occured while submitting transaction.
summary: Evaluate Transaction
description: Evaluate execution units of scripts in a well-formed transaction. Please refer to Ogmios documentation [here](https://ogmios.dev/api/#operation-publish-/?EvaluateTransaction) for complete spec
/ogmios/?SubmitTransaction: #ogmios-api
post:
tags:
- Ogmios
x-code-samples:
- lang: "Shell"
source: |
# Assuming ${data} is a raw binary serialized transaction on the file-system.
# 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/ogmios/?EvaluateTransaction
responses:
"200":
description: OK
"400":
description: An error occured while querying transaction.
summary: Submit Transaction
description: Submit a signed and serialized transaction to the network.

components:
parameters:
Expand Down
39 changes: 38 additions & 1 deletion specs/results/koiosapi-mainnet.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
openapi: 3.0.2
info:
title: Koios API
version: v1.0.11rc
version: v1.1.0rc
description: |
Koios is best described as a Decentralized and Elastic RESTful query layer for exploring data on Cardano blockchain to consume within applications/wallets/explorers/etc. This page not only provides an OpenAPI Spec for live implementation, but also ability to execute live demo from client browser against each endpoint with pre-filled examples.
Expand Down Expand Up @@ -1606,6 +1606,43 @@ paths:
$ref: "#/components/responses/NotFound"
summary: Datum Information
description: List of datum information for given datum hashes
/ogmios/?EvaluateTransaction: #ogmios-api
post:
tags:
- Ogmios
x-code-samples:
- lang: "Shell"
source: |
# Assuming ${data} contains EvaluateTransaction payload as documented on Ogmios v6 site.
curl -X POST \
--header "Content-Type: application/cbor" \
--data-binary ${data} https://api.koios.rest/api/ogmios/?EvaluateTransaction
responses:
"200":
description: OK
"400":
description: An error occured while submitting transaction.
summary: Evaluate Transaction
description: Evaluate execution units of scripts in a well-formed transaction. Please refer to Ogmios documentation [here](https://ogmios.dev/api/#operation-publish-/?EvaluateTransaction) for complete spec
/ogmios/?SubmitTransaction: #ogmios-api
post:
tags:
- Ogmios
x-code-samples:
- lang: "Shell"
source: |
# Assuming ${data} is a raw binary serialized transaction on the file-system.
# 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/ogmios/?EvaluateTransaction
responses:
"200":
description: OK
"400":
description: An error occured while querying transaction.
summary: Submit Transaction
description: Submit a signed and serialized transaction to the network.

components:
parameters:
Expand Down
39 changes: 38 additions & 1 deletion specs/results/koiosapi-preprod.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
openapi: 3.0.2
info:
title: Koios API
version: v1.0.11rc
version: v1.1.0rc
description: |
Koios is best described as a Decentralized and Elastic RESTful query layer for exploring data on Cardano blockchain to consume within applications/wallets/explorers/etc. This page not only provides an OpenAPI Spec for live implementation, but also ability to execute live demo from client browser against each endpoint with pre-filled examples.
Expand Down Expand Up @@ -1606,6 +1606,43 @@ paths:
$ref: "#/components/responses/NotFound"
summary: Datum Information
description: List of datum information for given datum hashes
/ogmios/?EvaluateTransaction: #ogmios-api
post:
tags:
- Ogmios
x-code-samples:
- lang: "Shell"
source: |
# Assuming ${data} contains EvaluateTransaction payload as documented on Ogmios v6 site.
curl -X POST \
--header "Content-Type: application/cbor" \
--data-binary ${data} https://api.koios.rest/api/ogmios/?EvaluateTransaction
responses:
"200":
description: OK
"400":
description: An error occured while submitting transaction.
summary: Evaluate Transaction
description: Evaluate execution units of scripts in a well-formed transaction. Please refer to Ogmios documentation [here](https://ogmios.dev/api/#operation-publish-/?EvaluateTransaction) for complete spec
/ogmios/?SubmitTransaction: #ogmios-api
post:
tags:
- Ogmios
x-code-samples:
- lang: "Shell"
source: |
# Assuming ${data} is a raw binary serialized transaction on the file-system.
# 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/ogmios/?EvaluateTransaction
responses:
"200":
description: OK
"400":
description: An error occured while querying transaction.
summary: Submit Transaction
description: Submit a signed and serialized transaction to the network.

components:
parameters:
Expand Down
39 changes: 38 additions & 1 deletion specs/results/koiosapi-preview.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
openapi: 3.0.2
info:
title: Koios API
version: v1.0.11rc
version: v1.1.0rc
description: |
Koios is best described as a Decentralized and Elastic RESTful query layer for exploring data on Cardano blockchain to consume within applications/wallets/explorers/etc. This page not only provides an OpenAPI Spec for live implementation, but also ability to execute live demo from client browser against each endpoint with pre-filled examples.
Expand Down Expand Up @@ -1606,6 +1606,43 @@ paths:
$ref: "#/components/responses/NotFound"
summary: Datum Information
description: List of datum information for given datum hashes
/ogmios/?EvaluateTransaction: #ogmios-api
post:
tags:
- Ogmios
x-code-samples:
- lang: "Shell"
source: |
# Assuming ${data} contains EvaluateTransaction payload as documented on Ogmios v6 site.
curl -X POST \
--header "Content-Type: application/cbor" \
--data-binary ${data} https://api.koios.rest/api/ogmios/?EvaluateTransaction
responses:
"200":
description: OK
"400":
description: An error occured while submitting transaction.
summary: Evaluate Transaction
description: Evaluate execution units of scripts in a well-formed transaction. Please refer to Ogmios documentation [here](https://ogmios.dev/api/#operation-publish-/?EvaluateTransaction) for complete spec
/ogmios/?SubmitTransaction: #ogmios-api
post:
tags:
- Ogmios
x-code-samples:
- lang: "Shell"
source: |
# Assuming ${data} is a raw binary serialized transaction on the file-system.
# 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/ogmios/?EvaluateTransaction
responses:
"200":
description: OK
"400":
description: An error occured while querying transaction.
summary: Submit Transaction
description: Submit a signed and serialized transaction to the network.

components:
parameters:
Expand Down
2 changes: 1 addition & 1 deletion specs/templates/1-api-info.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
info:
title: Koios API
version: v1.0.11rc
version: v1.1.0rc
description: |
Koios is best described as a Decentralized and Elastic RESTful query layer for exploring data on Cardano blockchain to consume within applications/wallets/explorers/etc. This page not only provides an OpenAPI Spec for live implementation, but also ability to execute live demo from client browser against each endpoint with pre-filled examples.
Expand Down
37 changes: 37 additions & 0 deletions specs/templates/api-main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1461,6 +1461,43 @@ paths:
$ref: "#/components/responses/NotFound"
summary: Datum Information
description: List of datum information for given datum hashes
/ogmios/?EvaluateTransaction: #ogmios-api
post:
tags:
- Ogmios
x-code-samples:
- lang: "Shell"
source: |
# Assuming ${data} contains EvaluateTransaction payload as documented on Ogmios v6 site.
curl -X POST \
--header "Content-Type: application/cbor" \
--data-binary ${data} https://api.koios.rest/api/ogmios/?EvaluateTransaction
responses:
"200":
description: OK
"400":
description: An error occured while submitting transaction.
summary: Evaluate Transaction
description: Evaluate execution units of scripts in a well-formed transaction. Please refer to Ogmios documentation [here](https://ogmios.dev/api/#operation-publish-/?EvaluateTransaction) for complete spec
/ogmios/?SubmitTransaction: #ogmios-api
post:
tags:
- Ogmios
x-code-samples:
- lang: "Shell"
source: |
# Assuming ${data} is a raw binary serialized transaction on the file-system.
# 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/ogmios/?EvaluateTransaction
responses:
"200":
description: OK
"400":
description: An error occured while querying transaction.
summary: Submit Transaction
description: Submit a signed and serialized transaction to the network.

components:
#!params!#
Expand Down
4 changes: 2 additions & 2 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@

def pytest_addoption(parser):
parser.addoption(
"--local-url", action="store", default="http://127.0.0.1:8053/api/v0"
"--local-url", action="store", default="http://127.0.0.1:8053/api/v1"
)
parser.addoption(
"--compare-url", action="store", default="https://guild.koios.rest/api/v0"
"--compare-url", action="store", default="https://guild.koios.rest/api/v1"
)
parser.addoption(
"--api-schema-file",
Expand Down
6 changes: 3 additions & 3 deletions tests/setup-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ cat <<-EOF
To run the endpoint validation tests, use the below:
schemathesis --pre-run not_empty_response run --request-timeout 5000 https://guild.koios.rest/koiosapi.yaml --hypothesis-phases=explicit \\
--hypothesis-verbosity quiet -b http://127.0.0.1:8053/api/v0 -c all --validate-schema=true -H "Content-Type: application/json"
--hypothesis-verbosity quiet -b http://127.0.0.1:8053/api/v1 -c all --validate-schema=true -H "Content-Type: application/json"
where http://127.0.0.1:8053/api/v0 is the URL of instance you want to test, and guild.koios.rest is the target enviornment for testing.
where http://127.0.0.1:8053/api/v1 is the URL of instance you want to test, and guild.koios.rest is the target enviornment for testing.
To run the data validations tests, use the below:
pytest --local-url http://127.0.0.1:8053/api/v0 --compare-url https://guild.koios.rest/api/v0 --api-schema-file ../specs/results/koiosapi-guild.yaml -x -v
pytest --local-url http://127.0.0.1:8053/api/v1 --compare-url https://guild.koios.rest/api/v1 --api-schema-file ../specs/results/koiosapi-guild.yaml -x -v
Arguments:
local-run : URL of instance you want to test"
Expand Down

0 comments on commit a7c67a4

Please sign in to comment.