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

This API is being released as part of an upcoming version.

The upcoming version is not backward compatible with the current stable version. You can find the details of the upcoming release and affected endpoints in the change log. Please contact eu-ebsi@ec.europa.eu if this upcoming release might cause a high impact on either an ongoing development or a piloting demonstration.

JSON-RPC API

Last updated on
POST 

/trusted-policies-registry/v3/jsonrpc

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

Request

Body

required

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

insertPolicy

Call to build an unsigned transaction to insert a policy in the registry. This method requires OPERATOR ROLE in the Trusted Policies Registry.

Parameters:

  • from: Ethereum address of the administrator
  • opType: operation type. 0 = "AND", 1 = "OR"
  • policyName: name of the policy.
  • description: description.
  • policyConditions: array of condition objects:
    • name: name of the condition
    • attributeName: name of the attribute on which it applies
    • value: value to compare to
    • typeOfValue: value type. 0 = "UINT256", 1 = "BYTES", 2 = "ADDRESS", 3= "BYTES32", 4 = "STRING", 5 = "BOOLEAN"
    • attributeOperation: operation to apply. 0 = "EQUAL"

updatePolicy

Call to build an unsigned transaction to update a policy. This method requires OPERATOR ROLE in the Trusted Policies Registry.

Parameters:

  • from: Ethereum address of the administrator
  • policyId: Policy ID
  • policyName: Policy Name
  • opType: operation type. 0 = "AND", 1 = "OR"
  • description: description.

Use either policyId OR policyName to identify the policy, but not both.

addPolicyConditions

Call to build an unsigned transaction to add conditions to an existing policy in the registry. This method requires OPERATOR ROLE in the Trusted Policies Registry.

Parameters:

  • from: Ethereum address of the administrator
  • policyId: Policy ID
  • policyName: Policy Name
  • policyConditions: array of condition objects:
    • name: name of the condition
    • attributeName: name of the attribute on which it applies
    • value: value to compare to
    • typeOfValue: value type. 0 = "UINT256", 1 = "BYTES", 2 = "ADDRESS", 3= "BYTES32", 4 = "STRING", 5 = "BOOLEAN"
    • attributeOperation: operation to apply. 0 = "EQUAL"

Use either policyId OR policyName to identify the policy, but not both.

deletePolicyCondition

Call to build an unsigned transaction to delete a condition from an existing policy in the registry. This method requires OPERATOR ROLE in the Trusted Policies Registry.

Parameters:

  • from: Ethereum address of the administrator
  • policyId: Policy ID
  • policyName: Policy Name
  • policyConditionId:: ID of the policy condition to remove

Use either policyId OR policyName to identify the policy, but not both.

deactivatePolicy

Call to build an unsigned transaction to deactivate a policy in the registry. This method requires OPERATOR ROLE in the Trusted Policies Registry.

Parameters:

  • from: Ethereum address of the administrator
  • policyId: ID of the policy to deactivate
  • policyName: Policy Name

Use either policyId OR policyName to identify the policy, but not both.

activatePolicy

Call to build an unsigned transaction to activate a policy in the registry. This method requires OPERATOR ROLE in the Trusted Policies Registry.

Parameters:

  • from: Ethereum address of the administrator
  • policyId: ID of the policy to activate
  • policyName: Policy Name

Use either policyId OR policyName to identify the policy, but not both.

insertUserAttributes

Call to build an unsigned transaction to insert user attributes in the registry. This method requires OPERATOR ROLE in the Trusted Policies Registry.

Parameters:

  • from: Ethereum address of the administrator
  • address: user address
  • attributeNames: attribute names
  • attributeValues: attribute values

updateUserAttribute

Call to build an unsigned transaction to update an user attribute in the registry. This method requires OPERATOR ROLE in the Trusted Policies Registry.

Parameters:

  • from: Ethereum address of the administrator
  • address: user address
  • attributeName: attribute name
  • attributeValue: attribute value

deleteUserAttribute

Call to build an unsigned transaction to delete an user attribute in the registry. This method requires OPERATOR ROLE in the Trusted Policies Registry.

Parameters:

  • from: Ethereum address of the administrator
  • address: user address
  • attributeName: attribute name

sendSignedTransaction

Call to send a signed transaction to the blockchain.

    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
Loading...