Skip to main content
European CommissionEBSI European Blockchain
Select the Environment you want to work withEnvironment:

JSON-RPC API

POST 

https://api-conformance.ebsi.eu/trusted-schemas-registry/v3/jsonrpc

Authorization: http

name: bearerAuthtype: httpscheme: bearerbearerFormat: JWT

The JSON-RPC API provides methods assisting the construction of blockchain transactions and interaction with the ledger.

Request

Bodyrequired

The body follows the JSON-RPC 2.0 specification.

It requires the following fields:

  • jsonrpc: must be exactly "2.0"
  • method: method to be invoked
  • params: method parameters
  • id: identifier established by the client

API Methods

insertSchema

Requires an access token with tsr_write scope and having the required attributes assigned in Trusted Policies Registry.

Call to build an unsigned transaction to insert a new schema.

Parameters:

  • from: Ethereum address of the signer
  • schemaId: schema ID converted into hex string
  • schema: Content. This field must be a JSON stringified and converted into hex string
  • metadata: Metadata of the first version. This field must be a JSON stringified and converted into hex string

updateSchema

Requires an access token with tsr_write scope and having the required attributes assigned in Trusted Policies Registry.

Call to build an unsigned transaction to update an schema.

Parameters:

  • from: Ethereum address of the signer
  • schemaId: Schema ID
  • schema: Content. This field must be a JSON stringified and converted into hex string
  • metadata: Metadata. This field must be a JSON stringified and converted into hex string

updateMetadata

Requires an access token with tsr_write scope and having the required attributes assigned in Trusted Policies Registry.

Call to build an unsigned transaction to update the metadata of a schema revision.

Parameters:

  • from: Ethereum address of the signer
  • schemaRevisionId: Schema revision ID
  • metadata: Metadata. This field must be a JSON stringified and converted into hex string

sendSignedTransaction

Requires an access token with tsr_write scope.

Sends a signed transaction to the blockchain and returns the hash of the transaction.

Warning: the transaction is not immediately processed. Make sure to check that the transaction has been successfully included in a block before moving on.

You can get the receipt of the transaction by calling the eth_getTransactionReceipt method of Ledger API's Besu endpoint.

Receipts for pending transactions are not available, therefore you will have to wait until the transaction has been processed — usually a few seconds. We recommend you to poll the eth_getTransactionReceipt method until the receipt is available.

Once the receipt is available, you can check the status field to know if the transaction succeeded (0x1) or failed (0x0). If the transaction failed, the revertReason field will give you insights about the reason for the failure. You can learn more about the format of the revert reason in Besu's documentation.

    jsonrpc stringrequired

    Must be exactly "2.0"

    method stringrequired

    Method that needs to be invoked

    params object[]required

    Array of parameters

    id integerrequired

    Identifier established by the client

Responses

Response

Schema
    jsonrpc string

    Must be exactly "2.0"

    id integer

    Same identifier established by the client in the call

    result object

    Result of the call

    oneOf
    string
Request Collapse all
Base URL
https://api-conformance.ebsi.eu
Auth
Body required
{
"jsonrpc": "string",
"method": "string",
"params": [
{}
],
"id": 1
}
ResponseClear

Click the Send API Request button above and see the response here!

curl -L 'https://api-conformance.ebsi.eu/trusted-schemas-registry/v3/jsonrpc' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
-d '{
"jsonrpc": "string",
"method": "string",
"params": [
{}
],
"id": 1
}'