Resource Service

This service groups the requests associated with remote Resource access and verification.

service ResourceService { rpc Get(SignedGetRequest) returns (SignedGetResponse) {} rpc Share (SignedResourceMetadataRequest) returns (SignedShareResourceResponse) {} rpc Verify(SignedVerifyRequest) return (SignedVerifyResponse) {} }

Get Resource

The Get Resource task is a request to read (Get) a resource data from a remote Router. The requested resource is identified in the params field. A resource includes a version field which correspond to the version of the resource data, every change in the content of the data will increment the resource version.

Request Message

The message identify the resource this Router is requesting information for. Multiple resources can be requested from the same Organization. If an Organization receives a request to Get resource it does not manage, it ignores them returning only resource information it manages. Once can request a specific version of the resource or leave the version blank to receive the latest version.

message SignedGetResourceRequest { GetResourceRequest request = 1; common.Signature signature = 2; } message GetResourceRequest { common.Envelope envelope = 1; common.ResourceID resourceId = 2; string acceptType = 3; uint32 version = 4; }
Response Message

The response includes the requested data for each resource. If any of the requested resources cannot be retrieved, an error message is returned with a status code and status message

message SignedGetResourceResponse { GetResourceResponse response = 1; common.Signature signature = 2; } message GetResourceResponse { common.Envelope envelope = 1; common.ResourceID resourceId = 2; string acceptType = 3; bytes resource = 4; uint32 version = 5; }

Share Resource

An Organization can Share / Push resources updates to other Organizations. This is an another method which the Organization can use to distribute its resources information.

Request Message

The message includes the resource ID and resource payload in the default content-type

Response Message

The response code reflects if the recipient got the Resource Payload or if there was an error.

Verify Resource

To verify that a resource data received its authentic and current, an Organization can send a Broadcast request to receive the current hash of resource ID. The sender will then verify the received hashes from the responders with its own calculated hash. The verification algorithm is not specified, but an Organization is expected to store a hash of the current resource data into its cluster underlying DLT.

Request Message
Response Message

The response is collected from all the members of the cluster.

Â