IDSCP2 Application Layer
The following document describes the serialization of IDS Messages, consisting of header and payload. In many cases, this IDSCP2 Application Layer protocol it is run on top of the IDSCP2 Transport Layer, but the application layer protocol is agnostic to the concrete implementation of the transport layer.
Context
IDS messages consist of header and payload.
The header typically contains the "actual IDS message" as a JSON-LD serialization of a Message class as defined in the IDS Infomodel.
The payload of an IDS message contains data structures or arbitrary other data, textual or binary, whose semantics depend on the type of the message as defined by the header contents. Typical examples are serializations of contract offers, contract agreements, or data artifacts.
Implementation in Protobuf
A well-known framework that supports all of these criteria is the open source solution protobuf. It has been developed and is currently maintained by Google, but also supported by a large community.
Protobuf defines a message-format for platform-independent definition of message formats, which can be used to serialize common data fields like strings (as UTF-8), binary data, various kinds of fixed size or variable size integers, floating point values etc. into plain byte arrays that can be sent/received via any reliable binary communication protocol. More information is found in the official documentation: https://developers.google.com/protocol-buffers
A message definition for IDS messages looks as follows:
IDSCP2 Message Types
Clearing House Interactions
Creating a Processes
Additional Headers
ch-ids-pid
string
true
The unique identifier of the process that will be used for logging all information connected to the process
Content-Type
string
true
The Clearing House expects the content type "application/json"
Expected Response
Created
The unique identifier has been created and is sent back as the payload.
Error
An error occurred. The payload contains an HTTP error code.
Logging messages
Additional Headers
ch-ids-pid
string
true
The unique identifier of the process under which the data should be logged
Expected Response
Created
The payload contains the signed receipt of the logged data in form of a JWT.
Error
An error occurred. The payload contains an HTTP error code.
Query multiple messages of a process
Additional Headers
ch-ids-pid
string
true
The unique identifier of the process under which the log entry was created
ch-ids-page
string
false
The requested result page. Defaults to 1
ch-ids-size
string
false
The size of the requested result page. Defaults to 100
ch-ids-sort
string
false
The order of the requested results. Defaults to "desc"
ch-ids-date_to
string
false
Only results before given date. Date format: YYYY-MM-DD
ch-ids-date_from
string
false
Only results after given date. Date format: YYYY-MM-DD
Content-Type
string
true
The Clearing House expects the content type "application/json"
Expected Response
Ok
Error
An error occurred. The payload contains an HTTP error code.
The following example illustrates the payload sent by the Clearing House as an answer to a QueryMessage for multiple log entries:
Query a single message of a process
Additional Headers
ch-ids-pid
string
true
The unique identifier of the process under which the log entry was created
ch-ids-id
string
true
The unique identifier of the log entry requested
Content-Type
string
true
The Clearing House expects the content type "application/json"
Expected Response
Ok
Error
An error occurred. The payload contains an HTTP error code.
Last updated