5. REST API

The Configuration and Usage sections explained how to configure the Web Integration Service server to load a base scenario. This section focuses on Web Integration Service’s REST API, which enables client applications to participate as first-class citizens in the DDS Global Data Space.

In particular, this section describes:

5.1. API Overview

5.1.1. Common Operations

Web Integration Service’s REST API defines a common set of CRUD-like operations to manipulate DDS entities using HTTP requests. Additionally, Web Integration Service provides operations for sending and receiving data samples using DDS.

Unlike in the common CRUD-like operations, where only XML format is supported, write and read operations can use both XML and JSON format to represent data samples.

5.1.1.1. Create Operations

All DDS entities can be dynamically created given the name of their parent entities and XML representations. Create operations translate to HTTP POST requests, where:

  • The URL identifies the parent entity (e.g., if we are creating a new Publisher, the URL identifies the DomainParticipant it belongs to).

  • The XML representation of the entity to be created. That is, the specific tag from that defines the entity to be created (e.g., the <publisher> tag if we are creating a new Publisher). For more information on entity tags, see Section 4.5.

5.1.1.2. Delete Operations

All DDS entities can be dynamically deleted given their name. Delete operations translate to DELETE HTTP requests, where:

  • The URL identifies the entity to be deleted (e.g., the URL identifying the Publisher we want to delete).

  • The body of the HTTP request is empty.

5.1.1.3. List Operations

This operation returns a list of all the DDS entities under a specific parent. List operations translate to GET HTTP requests, where:

  • The URL identifies the entities to be listed (e.g., all the Publishers under a specific DomainParticipant).

  • The body of the HTTP request is empty.

The subsequent HTTP response returns the list of entities in its body.

5.1.1.4. Enable Operation

DDS DomainParticipants, Topics, Publishers, Subscribers, DataWriters, and DataReaders can be marked as disabled upon creation. This operation enables a given entity and all of its contained entities. The enable operation is idempotent, so enable operations on already enabled entities will have no effect. Enable operations translate to PUT HTTP requests, where:

  • The URL identifies the entity to be enabled (e.g., the URL identifying a Publisher to be enabled).

  • The body of the HTTP request is empty.

5.1.1.5. Write Operation

DataWriters provide an extra operation that allows users to send data samples represented in XML or JSON format. The write operation translates to a POST HTTP request, where:

  • The URL identifies the DataWriter that is going to write the sample.

  • The body of the HTTP request contains the XML or JSON representation of the sample to be sent.

5.1.1.6. Read Operation

DataReaders provide an extra operation that allows users to receive sequences of data samples in the corresponding DDS DataReader’s cache. The read operation translates to an HTTP GET operation, where:

  • The URL identifies the DataReader that performs the read operation.

  • Different query strings are used to customize the read operation.

  • The body of the HTTP request is empty.

The body of the subsequent HTTP response contains a sequence of data samples read by the DDS DataReader.

5.1.2. HTTP Requests

Table 5.1 lists all the HTTP headers required in HTTP requests. The body of the different HTTP requests that realize the operations defined by the REST API are described in Section 5.2 and Section 5.3.

Table 5.1 HTTP Request Headers

Header

Description

Required/Optional

Content-Type

Identifies the content type of the body of the HTTP request. Valid values are application/dds-web+xml and application/dds-web+json.

Required (must be application/dds-web+xml for operations other than write and read).

Cache-Control

Must be set to none.

Required.

Content-Length

Length of the body of the HTTP request.

Required (except for the GET and DELETE requests)

OMG-DDS-API-Key

Key that authorizes the client application for the operation being performed.

Required (if authentication is enabled).

5.1.3. HTTP Responses

Table 5.2 lists the common HTTP response headers. These can be found in every response generated by Web Integration Service, regardless of the success or failure of the operation.

Table 5.2 HTTP Response Headers

Header

Description

Content-Type

Identifies the content type of the body of the HTTP response. Valid values are: application/dds-web+xml and application/dds-web+json.

Cache-Control

Must be set to none.

Content-Length

Length of the body of the HTTP response.

Date

Timestamp of the HTTP response.

Table 5.3 describes the HTTP status codes and response bodies for all the common operations in case of success, whereas Table 5.4 describes the HTTP responses in case of failure. Note that every response will include a short Reason Phrase indicating the success or failure of the operation.

Table 5.3 HTTP Status Code and Response Body for Successful Operations

Operation

Status Code

Response Body

Create

204

Empty body

Delete

204

Empty body

List

200

XML object representation of the requested listing.

Enable

204

Empty body

Write

204

Empty body

Read

200

XML or JSON object representation of the samples read.

Table 5.4 HTTP Status Code and Response Body for Failed Operations

Error Kind

Status Code

Response Body

Invalid Input

422

For application/dds-web+xml requests:
<error>
    <code>INVALID_INPUT</code>
    <messsage>Error message</message>
</error>
For application/dds-web+json requests:
{
    "code": "INVALID_INPUT",
    "messsage": "Error message"
}

DDS Error/Generic Server Error

500

For application/dds-web+xml requests:
<error>
    <code>GENERIC_SERVER_ERROR</code>
    <messsage>Error message</message>
</error>
For application/dds-web+json requests:
{
    "code": "GENERIC_SERVER_ERROR",
    "messsage": "Error message"
}

5.2. Creating, Deleting, Listing, and Updating DDS Entities

Section 5.1 provided a high-level overview of the different operations that Web Integration Service’s REST API provides. This section describes the complete set of operations that can be performed on each DDS entity.

The list of supported DDS entities is divided into two categories: Resource Entities and Application Entities.

5.2.1. Resource Entities

We use the term resource entities for DDS entities within a Web Integration Service scenario that can be shared across applications. For example, DomainParticipants from different applications can be created with the same QoS Profile. Therefore, resource entities can be treated as templates that can be used in the instantiation of applications and their contained entities.

The list of resource entities includes Types (Table 5.5), QoS Libraries (Table 5.6), QoS Profiles (Table 5.7), and Domain Libraries (Table 5.8).

5.2.1.1. Types

The <types> tag represents a library of types. That is, it is a collection of data types specified in XML that can be used across applications.

Table 5.5 Type Operations

Operation

Configuration

Create a new type

HTTP Verb

POST

URL

http://<host>[:<port>]/dds/rest1/types

Content-Type

application/dds-web+xml

Example Body
<types>
    <const name="MAX_COLOR_LEN" type="long" value="128"/>
    <struct name="ShapeType">
        <member name="color" type="string"
                stringMaxLength="128" key="true"/>
        <member name="x" type="long"/>
        <member name="y" type="long"/>
        <member name="shapesize" type="long"/>
    </struct>
</types>
Preconditions

There cannot be any Types with the same name in the system.

List all available types

HTTP Verb

GET

URL

http://<host>[:<port>]/dds/rest1/types

Preconditions

None.

Delete a type

HTTP Verb

DELETE

URL

http://<host>[:<port>]/dds/rest1/types/<tn>

Preconditions

The Type must exist.

5.2.1.2. QoS Libraries and QoS Profiles

A QoS Library is a collection of QoS profiles and/or QoS settings—specified in XML format—that can be used across applications.

Table 5.6 QoS Library Operations

Operation

Configuration

Create a new QoS Library

HTTP Verb

POST

URL

http://<host>[:<port>]/dds/rest1/qos_libraries

Content-Type

application/dds-web+xml

Example Body
<qos_library name="qosLibrary">
    <qos_profile name="defaultProfile" is_default_qos="true">
        <domain_participant_qos>
            <resource_limits>
                <type_code_max_serialized_length>
                  32000
                </type_code_max_serialized_length>
                <type_object_max_serialized_length>
                 32000
                </type_object_max_serialized_length>
            </resource_limits>
        </domain_participant_qos>
    </qos_profile>
</qos_library>
Preconditions

There cannot be any QoS library with the same name in the system.

List QoS Libraries

HTTP Verb

GET

URL

http://<host>[:<port>]/dds/rest1/qos_libraries

Preconditions

None.

Delete a QoS Library

HTTP Verb

DELETE

URL

http://<host>[:<port>]/dds/rest1/qos_libraries/<ql>

Preconditions

The QoS Library to be deleted must exist.

Table 5.7 QoS Profile Operations

Operation

Configuration

Create a new QoS Profile

HTTP Verb

POST

URL

http://<host>[:<port>]/dds/rest1/qos_libraries/<ql>/qos_profiles

Content-Type

application/dds-web+xml

Example Body
<qos_profile name="defaultProfile" is_default_qos="true">
    <domain_participant_qos>
        <resource_limits>
            <type_code_max_serialized_length>
              32000
            </type_code_max_serialized_length>
            <type_object_max_serialized_length>
             32000
            </type_object_max_serialized_length>
        </resource_limits>
    </domain_participant_qos>
</qos_profile>
Preconditions
  • The QoS Library to which the QoS Profile will be added must exist.

  • There cannot be another QoS profile with the same name within the given QoS library.

List QoS Profiles

HTTP Verb

GET

URL

http://<host>[:<port>]/dds/rest1/qos_libraries/<ql>/qos_profiles

Preconditions

The QoS library from which we want to extract the list of contained QoS profiles must exist.

Delete a QoS Profile

HTTP Verb

DELETE

URL

http://<host>[:<port>]/dds/rest1/qos_libraries/<ql>/qos_profiles/<qp>

Preconditions
  • The QoS library containing the QoS profile to be deleted must exist.

  • The QoS profile to be deleted must exist.

5.2.1.3. Domain Libraries

Domain Libraries provide a way to organize a set of domains that belong to the same system. Domain Libraries can be shared across applications.

Table 5.8 Domain Library Operations

Operation

Configuration

Create a new Domain Library

HTTP Verb

POST

URL

http://<host>[:<port>]/dds/rest1/domain_libraries

Content-Type

application/dds-web+xml

Example Body
<domain_library name="MyDomainLibrary">
  <domain name="ShapeDomain" domain_id="0">
      <register_type name="ShapeType" type_ref="ShapeType"/>
      <topic name="Square" register_type_ref="ShapeType" />
      <topic name="Circle" register_type_ref="ShapeType" />
      <topic name="Triangle" register_type_ref="ShapeType" />
  </domain>
</domain_library>
Preconditions

There cannot be another Domain Library with the same name in the system.

List Domain Libraries

HTTP Verb

GET

URL

http://<host>[:<port>]/dds/rest1/domain_libraries

Preconditions

None.

Delete a Domain Library

HTTP Verb

DELETE

URL

http://<host>[:<port>]/dds/rest1/domain_libraries/<dl>

Preconditions

The Domain Library to be deleted must exist.

5.2.2. Application Entities

We use the term application entities for all the DDS entities that are instantiated within the context of an Application. For example, in Web Integration Service, DomainParticipants are application entities, since they belong to a specific Application and are instantiated upon creation.

The list of application entities includes Applications (Table 5.9), DomainParticipants (Table 5.10), Topics (Table 5.11), Register Types (Table 5.12), Publishers (Table 5.13), Subscribers (Table 5.14), DataWriters (Table 5.15), and DataReaders (Table 5.16).

5.2.2.1. Applications

Table 5.9 Application Operations

Operation

Configuration

Create a new Application

HTTP Verb

POST

URL

http://<host>[:<port>]/dds/rest1/applications

Content-Type

application/dds-web+xml

Example Body
<application name="ShapesDemo">
    <domain_participant name="ShapesDomainParticipant"
            domain_id="0">
        <register_type name="ShapeType" type_ref="ShapeType" />
        <topic name="Square" register_type_ref="ShapeType" />
        <publisher name="ShapesPublisher"/>
    </domain_participant>
</application>
Preconditions

There cannot be another Application with the same name in the system.

List all Applications

HTTP Verb

GET

URL

http://<host>[:<port>]/dds/rest1/applications

Preconditions

None.

Delete an Application (and its contained entities)

HTTP Verb

DELETE

URL

http://<host>[:<port>]/dds/rest1/applications/<a>

Preconditions

The Application to be deleted must exist.

5.2.2.2. DomainParticipants

Table 5.10 DomainParticipant Operations

Operation

Configuration

Create a new DomainParticipant

HTTP Verb

POST

URL

http://<host>[:<port>]/dds/rest1/applications/<a>/domain_participants

Content-Type

application/dds-web+xml

Example Body
<domain_participant name="ShapesDomainParticipant"
        domain_id="0">
    <register_type name="ShapeType" type_ref="ShapeType" />
    <topic name="Square" register_type_ref="ShapeType" />
    <publisher name="ShapesPublisher"/>
</domain_participant>
Preconditions
  • The Application must exist.

  • There cannot be another DomainParticipant with the same name within the given Application.

List all DomainParticipants

HTTP Verb

GET

URL

http://<host>[:<port>]/dds/rest1/applications/<a>/domain_participants

Preconditions

The Application from which we want to retrieve the list of contained DomainParticipants must exist.

Enable a DomainParticipant

HTTP Verb

PUT

URL

http://<host>[:<port>]/dds/rest1/applications/<a>/domain_participants/<dp>

Preconditions
  • The Application containing the DomainParticipant must exist.

  • The DomainParticipant to be enabled must exist.

Delete a DomainParticipant (and its contained entities)

HTTP Verb

DELETE

URL

http://<host>[:<port>]/dds/rest1/applications/<a>/domain_participants/<dp>

Preconditions
  • The Application from which we want to delete the DomainParticipant must exist.

  • The DomainParticipant to be deleted must exist.

5.2.2.3. Topics

Table 5.11 Topic Operations

Operation

Configuration

Create a new Topic

HTTP Verb

POST

URL

http://<host>:[:<port>]/dds/rest1/applications/<a>/domain_participants/<dp>/topics

Content-Type

application/dds-web+xml

Example Body
<topic name="Square" register_type_ref="ShapeType"/>
Preconditions
  • The Application must exist.

  • The DomainParticipant must exist.

  • There cannot be another Topic registered with the same name in within the given DomainParticipant.

List all Topics

HTTP Verb

GET

URL

http://<host>[:<port>]/dds/rest1/applications/<a>/domain_participants/<dp>/topics

Preconditions
  • The Application must exist.

  • The DomainParticipant from which we want to retrieve the list of contained Topics must exist.

Enable a Topic

HTTP Verb

PUT

URL

http://<host>[:<port>]/dds/rest1/applications/<a>/domain_participants/<dp>/topics/<t>

Preconditions
  • The Application must exist.

  • The DomainParticipant must exist and must be enabled.

  • The Topic to be enabled must exist.

Delete a Topic

HTTP Verb

DELETE

URL

http://<host>[:<port>]/dds/rest1/applications/<a>/domain_participants/<dp>/topics/<t>

Preconditions
  • The Application must exist.

  • The DomainParticipant must exist.

  • The Topic must exist.

5.2.2.4. Register Types

Table 5.12 Register Type Operations

Operation

Configuration

Register a new Type

HTTP Verb

POST

URL

http://<host>:[:<port>]/dds/rest1/applications/<a>/domain_participants/<dp>/registered_types

Content-Type

application/dds-web+xml

Example Body
<register_type name="ShapeType" type_ref="ShapeType" />
Preconditions
  • The Application must exist.

  • The DomainParticipant must exist.

  • There cannot be another type registered with the same name in within the given DomainParticipant.

List all Registered Types

HTTP Verb

GET

URL

http://<host>[:<port>]/dds/rest1/applications/<a>/domain_participants/<dp>/registered_types

Preconditions
  • The Application must exist.

  • The DomainParticipant from which we want to retrieve the list of Registered Types must exist.

Unregister a type

HTTP Verb

DELETE

URL

http://<host>[:<port>]/dds/rest1/applications/<a>/domain_participants/<dp>/registered_types/<rt>

Preconditions
  • The Application must exist.

  • The DomainParticipant must exist.

  • The Registered Type must exist.

5.2.2.5. Publishers

Table 5.13 Publisher Operations

Operation

Configuration

Create a new Publisher

HTTP Verb

POST

URL

http://<host>[:<port>]/dds/rest1/applications/<a>/domain_participants/<dp>/publishers

Content-Type

application/dds-web+xml

Example Body
<publisher name="publisherName"/>
Preconditions
  • The Application must exist.

  • The DomainParticipant must exist.

  • There cannot be another Publisher with the same name within the given DomainParticipant.

List all Publishers

HTTP Verb

GET

URL

http://<host>[:<port>]/dds/rest1/applications/<a>/domain_participants/<dp>/publishers

Preconditions
  • The Application must exist.

  • The DomainParticipant from which we want to retrieve the list of Publishers must exist

Enable a Publisher

HTTP Verb

PUT

URL

http://<host>[:<port>]/dds/rest1/applications/<a>/domain_participants/<dp>/publishers/<p>

Preconditions
  • The Application must exist.

  • The DomainParticipant must exist.

  • The Publisher to be enabled must exist.

Delete a Publisher (and its contained entities)

HTTP Verb

DELETE

URL

http://<host>[:<port>]/dds/rest1/applications/<a>/domain_participants/<dp>/publishers/<p>

Preconditions
  • The Application must exist.

  • The DomainParticipant must exist.

  • The Publisher to be deleted must exist.

5.2.2.6. Subscribers

Table 5.14 Subscriber Operations

Operation

Configuration

Create a new Subscriber

HTTP Verb

POST

URL

http://<host>[:<port>]/dds/rest1/applications/<a>/domain_participants/<dp>/subscribers

Content-Type

application/dds-web+xml

Example Body
<subscriber name="subscriberName"/>
Preconditions
  • The Application must exist.

  • The DomainParticipant must exist.

  • There cannot be another Subscriber with the same name within the given DomainParticipant.

List all Subscribers

HTTP Verb

GET

URL

http://<host>[:<port>]/dds/rest1/applications/<a>/domain_participants/<dp>/subscribers

Preconditions
  • The Application must exist.

  • The DomainParticipant from which we want to retrieve the list of Subscribers must exist

Enable a Subscriber

HTTP Verb

PUT

URL

http://<host>[:<port>]/dds/rest1/applications/<a>/domain_participants/<dp>/subscribers/<s>

Preconditions
  • The Application must exist.

  • The DomainParticipant must exist.

  • The Subscriber to be enabled must exist.

Delete a Subscriber (and its contained entities)

HTTP Verb

DELETE

URL

http://<host>[:<port>]/dds/rest1/applications/<a>/domain_participants/<dp>/subscribers/<s>

Preconditions
  • The Application must exist.

  • The DomainParticipant must exist.

  • The Subscriber to be deleted must exist.

5.2.2.7. DataWriters

Table 5.15 DataWriter Operations

Operation

Configuration

Create a new DataWriter

HTTP Verb

POST

URL

http://<host>[:<port>]/dds/rest1/applications/<a>/domain_participants/<dp>/publishers/<p> /data_writers

Content-Type

application/dds-web+xml

Example Body
<data_writer name="SquareWriter" topic_ref="Square"/>
Preconditions
  • The Application must exist.

  • The DomainParticipant must exist.

  • The Publisher must exist.

  • There cannot be another DataWriter with the same name within the given Publisher.

List all DataWriters

HTTP Verb

GET

URL

http://<host>[:<port>]/dds/rest1/applications/<a>/domain_participants/<dp>/publishers/<p> /data_writers

Preconditions
  • The Application must exist.

  • The DomainParticipant must exist.

  • The Publisher from which we want to retrieve the list of DataWriters must exist

Enable a DataWriter

HTTP Verb

PUT

URL

http://<host>[:<port>]/dds/rest1/applications/<a>/domain_participants/<dp>/publishers/<p> /data_writers/<dw>

Preconditions
  • The Application must exist.

  • The DomainParticipant must exist.

  • The Publisher must exist.

  • The DataWriter to be enabled must exist.

Delete a DataWriter

HTTP Verb

DELETE

URL

http://<host>[:<port>]/dds/rest1/applications/<a>/domain_participants/<dp>/publishers/<p> /data_writers/<dw>

Preconditions
  • The Application must exist.

  • The DomainParticipant must exist.

  • The Publisher must exist.

  • The DataWriter to be deleted must exist.

5.2.2.8. DataReaders

Table 5.16 DataReader Operations

Operation

Configuration

Create a new DataReader

HTTP Verb

POST

URL

http://<host>[:<port>]/dds/rest1/applications/<a>/domain_participants/<dp>/subscribers/<s> /data_readers

Content-Type

application/dds-web+xml

Example Body
<data_reader name="SquareReader" topic_ref="Square"/>
Preconditions
  • The Application must exist.

  • The DomainParticipant must exist.

  • The Subscriber must exist.

  • There cannot be another DataReader with the same name within the given Subscriber.

List all DataReaders

HTTP Verb

GET

URL

http://<host>[:<port>]/dds/rest1/applications/<a>/domain_participants/<dp>/subscribers<s> /data_readers

Preconditions
  • The Application must exist.

  • The DomainParticipant must exist.

  • The Subscriber from which we want to retrieve the list of DataReaders must exist

Enable a DataReader

HTTP Verb

PUT

URL

http://<host>[:<port>]/dds/rest1/applications/<a>/domain_participants/<dp>/subscribers/<s> /data_readers/<dr>

Preconditions
  • The Application must exist.

  • The DomainParticipant must exist.

  • The Subscriber must exist.

  • The DataReader to be enabled must exist.

Delete a DataReader

HTTP Verb

DELETE

URL

http://<host>[:<port>]/dds/rest1/applications/<a>/domain_participants/<dp>/subscribers/<s> /data_readers/<dr>

Preconditions
  • The Application must exist.

  • The DomainParticipant must exist.

  • The Subscriber must exist.

  • The DataReader to be deleted must exist.

5.3. Writing and Reading Data

Section 5.2 described all the CRUD-like operations that Web Integration Service’s REST API provides. This section focuses on the write and read operations.

5.3.1. Writing Data

5.3.1.1. Write Operation

Table 5.17 describes the write operation of the DataWriter class.

Table 5.17 Write Operation

Operation

Configuration

Write

HTTP Verb

POST

URL

http://<host>[:<port>]/dds/rest1/applications/<a>/domain_participants/<dp>/publishers/<p> /data_writers/<dw>

Content-Type

application/dds-web+xml or application/dds-web+json

Example Body

For Content-Type: application/dds-web+xml

<data>
    <aString>This is a string!</aString>
    <aLong>-123456789</aLong>
    <aShort>125</aShort>
    <anOctet>255</anOctet>
    <aUnsignedShort>5</aUnsignedShort>
    <aUnsignedLong>123456789</aUnsignedLong>
</data>

For Content-Type: application/dds-web+json

{
  "aString": "This is a string!",
  "aLong": -123456789,
  "aShort": 125,
  "anOctet": 255,
  "aUnsignedShort": 5,
  "aUnsignedLong": 123456789
}
Preconditions
  • The Application must exist.

  • The DomainParticipant must exist.

  • The Publisher must exist.

  • The DataWriter must exist.

5.3.1.2. XML and JSON Sample Representation

As described in Table 5.17, the write operation requires sending an XML or JSON representation of the sample in the body of the POST request. This sample representation is an instantiation of the data type associated with the topic the DataWriter sends. Table 5.18 describes the representation of a simple ShapeType sample in both XML and JSON format.

Table 5.18 ShapeType Sample Representation

Type Definition

XML Representation

JSON Representation

<struct name="ShapeType">
  <member name="color" key="true"
    type="string"/>
  <member name="x" type="long" />
  <member name="y" type="long" />
  <member name="shapesize" type="long" />
</struct>
<data>
  <color>BLUE</color>
  <x>20</x>
  <y>30</y>
  <shapesize>
    3
  </shapesize>
</data>
{
  "color": "BLUE",
  "x": 20,
  "y": 30,
  "shapesize": 3
}

All the different XML tags and JSON members are named after the members they represent. In XML, the value assigned becomes a child of the appropriate XM tag. In JSON, the value is assigned to the member using JSON’s native syntax. Table 5.19 shows the representation of all the supported data types.

Table 5.19 Sample Representation of Supported Data Types in XML and JSON

Type Definition

XML Representation

JSON Representation

Structs (top level)

<data>
  <aLong>1</aLong>
  <aBoolean>true</aBoolean>
</data>
{
  "aLong": 1,
  "aBoolean":  true
}

Structs (nested)

<data>
  <anotherStruct>
    <aLong>1</aLong>
    <aBoolean>true</aBoolean>
  </anotherStruct>
</data>
{
  "anotherStruct" : {
      "aLong": 1,
      "aBoolean":  true
  }
}

Union (top level)

<data>
  <aLong>1</aLong>
</data>
{
  "aLong":1
}

Union (nested)

<data>
  <aBoolean>true</aBoolean>
  <aUnion>
    <aLong>1</aLong>
  </aUnion>
</data>
{
  "aBoolean": true,
  "aUnion":{
    "aLong":1
  }
}

Arrays (simple members)

<data>
  <anArrayOfLongs>
    <item>1</item>
    <item>2</item>
  </anArrayOfLongs>
</data>
{
  "anArrayOfLongs" : [
    1,
    2
  ]
}

Arrays (complex members)

<data>
  <anArrayOfStructs>
    <item>
      <aFloat>
        0.0
      </aFloat>
    </item>
    <item>
      <aFloat>
        1.0
      </aFloat>
    </item>
  </anArrayOfStructs>
</data>
{
  "anArrayOfStructs": [
    {
      "aFloat": 0.0
    },
    {
      "aFloat": 1.0
    }
  ]
}

Sequences (simple members)

<data>
  <aSequenceOfDoubles>
    <item>1.1</item>
    <item>1.2</item>
  </aSequenceOfDoubles>
</data>
{
  "aSequenceOfDoubles" : [
    1.1,
    1.2
  ]
}

Sequences (complex members)

<data>
  <aSequenceOfStructs>
    <item>
      <aFloat>
        0.0
      </aFloat>
    </item>
    <item>
      <aFloat>
        1.0
      </aFloat>
    </item>
  </aSequenceOfStructs>
</data>
{
  "aSequenceOfStructs": [
    {
      "aFloat": 0.0
    },
    {
      "aFloat": 1.0
    }
  ]
}

Shorts

<data>
  <aShort>3</aShort>
</data>
{
  "aShort": 3
}

Unsigned Shorts

<data>
  <aUShort>2</aUShort>
</data>
{
  "aUShort": 2
}

Enums

<data>
  <anEnum>ACE</anEnum>
</data>
{
  "anEnum": "ACE"
}

Enums (Using enumsAsIntegers option)

<data>
  <anEnum>1</anEnum>
</data>
{
  "anEnum": 1
}

Longs

<data>
  <aLong>2452</aLong>
</data>
{
  "aLong": 2452
}

Unsigned Longs

<data>
  <aULong>245</aULong>
</data>
{
  "aULong": 245
}

Long Longs

<data>
  <aLongLong>
    23121
  </aLongLong>
</data>
{
  "aLongLong": 23121
}

Unsigned Long Longs

<data>
  <aULongLong>
    2345212
  </aULongLong>
</data>
{
  "aULongLong": 2345212
}

Floats

<data>
  <aFloat>
    2.3
  </aFloat>
</data>
{
  "aFloat": 2.3
}

Doubles

<data>
  <aDouble>
    3.75
  </aDouble>
</data>
{
  "aDouble": 3.75
}

Booleans

<data>
  <aBoolean>
    false
  </aBoolean>
  <anotherBoolean>
    true
  </anotherBoolean>
</data>
{
  "aBoolean": false,
  "anotherBoolean": true
}

Strings

<data>
  <aString>
    A string!
  </aString>
  <anotherString>
    El r&#x00ED;o mi&#x00F1;o
  </anotherString>
</data>
{
  "aString": "A string!",
  "anotherString": "El r\u00EDo mi\u00F1o"
}

Octets

<data>
  <anOctet>
    255
  </anOctet>
</data>
{
    "anOctet": 255
}

Chars

<data>
  <aChar>
    a
  </aChar>
</data>
{
  "aChar": "a"
}

WChars

<data>
  <aWchar>
    &#007E;
  </aWchar>
  <anotherWchar>
    a
  </anotherWchar>
</data>
{
  "aWchar": "\u007E",
  "anotherWchar": "a"
}

WStrings

<data>
  <aWstring>
    A string!
  </aWstring>
  <anotherWstring>
    El r&#x00ED;o mi&#x00F1;o
  </anotherWstring>
</data>
{
  "aWstring": "A string!",
  "anotherWstring": "El r\u00EDo mi\u00F1o"
}

Long Doubles

Unsupported

Unsupported

In XML, the parser ignores the root tag’s name. As a convention, we use the <data> tag to name it, but users may choose a different convention (e.g., they can choose to name the top-level tag after the data type that is being set). In JSON, the top-level tag is an object that may contain objects, arrays, and other members.

Unset members are automatically set to zero. As a result, DataReaders will receive a complete sample with all the unset members set to zero. In contrast, invalid members will cause a parsing error, which will trigger the cancellation of the write operation and an error HTTP response.

5.3.2. Reading Data

5.3.2.1. Read Operation

Table 5.20 describes the read operation of the DataReader class.

Table 5.20 Read Operation

Operation

Configuration

Read

HTTP Verb

GET

URL

http://<host>[:<port>]/dds/rest1/applications/<a>/domain_participants/<dp>/subscribers/<s> /data_readers/<dr>

URL Query Parameters
  • sampleFormat—Optional query parameter to indicate what format should be used to represent the read samples. The sampleFormat parameter can be set to either "xml" or "json". If unspecified, it defaults to "xml".

  • prettyPrint—Optional query parameter to indicate whether the response should contain indentations and line breaks. If unspecified, it defaults to false.

  • enumsAsIntegers—Optional query parameter to indicate whether the response should represent enumeration literals as integers. If unspecified, it defaults to false.

  • removeFromReaderCache—Optional query parameter indicating whether the samples should be removed from the DataReader’s cache (equivalent to DDS’ take operation) or left in the cache (equivalent to DDS’ read operation). The removeFromReaderCache parameter can be set to "true" or "false". If unspecified, it defaults to "true", meaning that the samples are removed from the DataReader’s cache.

  • maxSamples—Optional query parameter indicating the maximum number of samples to retrieve. It unspecified, it defaults to unlimited.

  • maxWait—Optional query parameter indicating the willingness of the caller to wait a certain number of seconds until the conditions to read data are met. If unspecified, it defaults to zero seconds (i.e., maxWait=0).

  • filterExpression—Optional query parameter indicating a DDS SQL filter expression that is used to create a DDS QueryCondition. When used along with the read and take operations, this QueryCondition allows us to generate a list of samples that match it.

  • instanceStateMask—Optional query parameter to obtain samples that match the desired instance states. The values that can be used in the mask are: "ALIVE", "NOT_ALIVE_DISPOSED", and "NOT_ALIVE_NO_WRITERS". For example, a valid instanceStateMask would be "ALIVE|NOT_ALIVE_DISPOSED".

  • sampleStateMask—Optional query parameter to obtain samples that match the desired sample states. The values that can be used in the mask are "READ" and "NOT_READ".

  • viewStateMask—Optional query parameter to obtain samples that match the desired view states. The values that can be used in the mask are "NEW" or "NOT_NEW".

Preconditions
  • The Application must exist.

  • The DomainParticipant must exist.

  • The Subscriber must exist.

  • The DataReader must exist.

Example Request
GET /dds/rest1/applications/<a>/domain_participants/<dp>/subscribers/<s>
/data_readers/<dr>?sampleFormat="json"&removeFromReaderCache="false" HTTP/1.1
Host: <host>[:<port>]
HTTP Response

The body of the HTTP response includes a sequence of samples read in the requested format. For example:

  • Content-Type: application/dds-web+xml
    <read_sample_seq>
        <sample>
            <read_sample_info>
                <source_timestamp>
                    <sec>1456957176</sec>
                    <nanosec>207723000</nanosec>
                </source_timestamp>
                <valid_data>true</valid_data>
                <instance_handle>
                  00000000000000000000000000000000
                </instance_handle>
                <instance_state>
                  ALIVE
                </instance_state>
                <sample_state>
                  NOT_READ
                </sample_state>
                <view_state>NEW</view_state>
            </read_sample_info>
            <data>
                <aString>This is a string!</aString>
                <aLong>-123456789</aLong>
                <aShort>125</aShort>
                <anOctet>255</anOctet>
                <aUnsignedShort>5</aUnsignedShort>
                <aUnsignedLong>123456789</aUnsignedLong>
            </data>
        </sample>
    </read_sample_seq>
    
  • Content-Type: application/dds-web+json

    [
        {
            "read_sample_info":{
              "source_timestamp":{
                "sec":1456962954,
                "nanosec":150101000
              },
              "valid_data":true,
              "Instance_handle":
                  "00000000000000000000000000000000",
              "instance_state":"ALIVE",
              "sample_state":"NOT_READ",
              "view_state":"NEW"
            },
            "data":{
              "aString":"This is a string!",
              "aUnion":{
                "aLongUnion":10
              },
              "aLong":-123456789,
              "aShort":125,
              "anOctet":255,
              "aUnsignedShort":5,
              "aUnsignedLong":123456789
            }
        }
    ]
    

5.3.2.2. XML and JSON Sample Representation

A successful read operation generates a response that includes a sequence of samples read in its body. The sequence is represented in XML or JSON format, depending on the value of the sampleFormat query parameter (if set). Table 5.20 shows example responses both in XML and JSON format.

Every sample contains a metadata section (i.e., the read sample info) and data section (i.e., the sample data itself). The data section contains the sample itself following the same syntax depicted in Table 5.19. The metadata section contains the following information for the sample that has been read:

  • source_timestamp—Shows the timestamp when the sample was written by a DataWriter.

  • valid_data—Indicates whether the data sample contains data or if it is only used to communicate a change in the instance_state of the instance.

  • instance_handle—Identifies locally the corresponding instance.

  • instance_state—Indicates whether or not the samples are from a live DataWriter.

  • sample_state—Indicates whether or not a sample has ever been read.

  • view_state—Indicates whether or not an instance is new.

5.4. Builtin Topics

This section focuses on Web Integration Service’s Builtin Topics API, which enables client applications to retrieve discovery information through the REST API.

In particular, this section describes:

  • An API overview.

5.4.1. Enable the builtin Topics

Builtin entities are different from regular entities. For that reason, they have to be treated differently in order to use them correctly.

To enable the builtin Topics in Web Integration Service, we need to perform these steps:

  • Launch Web Integration Service with the extra flag -enableBuiltinTopics.

  • Provide an XML file that creates disabled DomainParticipants.

  • Enable the builtin Subscriber.

  • Enable the builtin DataReaders.

  • Enable the DomainParticipant.

Once all these steps are done, you can retrieve discovery information by doing a GET for each builtin DataReader.

5.4.2. Builtin Subscribers operations

Table 5.21 lists the available operations for the builtin Subscribers.

Table 5.21 Builtin Subscriber Operations

Operation

Configuration

List all builtin Subscribers

HTTP Verb

GET

URL

http://<host>[:<port>]/dds/rest1/applications/<a>/domain_participants/<dp>/ builtin_subscribers

Preconditions
  • The Application must exist.

  • The DomainParticipant from which we want to retrieve the list of builtin Subscribers must exist

Enable a builtin Subscriber

HTTP Verb

PUT

URL

http://<host>[:<port>]/dds/rest1/applications/<a>/domain_participants/<dp>/ builtin_subscribers/<bs>

Preconditions
  • The Application must exist.

  • The DomainParticipant must exist.

  • The builtin Subscriber to be enabled must exist.

Currently, only one builtin Subscriber exists for every DomainParticipant, but this API is more flexible in case that changes in the future.

5.4.3. Builtin DataReaders operations

Table 5.22 lists the available operations for the builtin DataReaders.

Table 5.22 Builtin DataReader Operations

Operation

Configuration

List all builtin DataReaders

HTTP Verb

GET

URL

http://<host>[:<port>]/dds/rest1/applications/<a>/domain_participants/<dp>/ builtin_subscribers/<bs>/builtin_data_readers

Preconditions
  • The Application must exist.

  • The DomainParticipant must exist.

  • The builtin Subscriber from which we want to retrieve the list of builtin DataReaders must exist

Enable a builtin DataReader

HTTP Verb

PUT

URL

http://<host>[:<port>]/dds/rest1/applications/<a>/domain_participants/<dp>/ builtin_subscribers/<bs>/builtin_data_readers/<bdr>

Preconditions
  • The Application must exist.

  • The DomainParticipant must exist.

  • The builtin Subscriber must exist.

  • The builtin DataReader to be enabled must exist.

Three builtin DataReaders are available through the REST API: - Participant builtin Topic data. - Publication builtin Topic data. - Subscription builtin Topic data.

5.4.4. Reading data

Table 5.23 describes the read operation for builtin DataReaders.

Table 5.23 Builtin DataReader Read Operation

Operation

Configuration

Read

HTTP Verb

GET

URL

http://<host>[:<port>]/dds/rest1/applications/<a>/domain_participants/<dp>/builtin_subscribers/<s> /builtin_data_readers/<dr>

URL Query Parameters
  • sampleFormat—Optional query parameter to indicate what format should be used to represent the read samples. The sampleFormat parameter can be set to either "xml" or "json". If unspecified, it defaults to "xml".

  • prettyPrint—Optional query parameter to indicate whether the response should contain indentations and line breaks. If unspecified, it defaults to false.

  • enumsAsIntegers—Optional query parameter to indicate whether the response should represent enumeration literals as integers. If unspecified, it defaults to false.

  • removeFromReaderCache—Optional query parameter indicating whether the samples should be removed from the DataReader’s cache (equivalent to DDS’ take operation) or left in the cache (equivalent to DDS’ read operation). The removeFromReaderCache parameter can be set to "true" or "false". If unspecified, it defaults to "true", meaning that the samples are removed from the builtin DataReader’s cache.

  • maxSamples—Optional query parameter indicating the maximum number of samples to retrieve. If unspecified, it defaults to unlimited.

  • maxWait—Optional query parameter indicating the willingness of the caller to wait a certain number of seconds until the conditions to read data are met. If unspecified, it defaults to zero seconds (i.e., maxWait=0).

  • filterExpression—Optional query parameter indicating a DDS SQL filter expression that is used to create a DDS QueryCondition. When used along with the read and take operations, this QueryCondition allows us to generate a list of samples that match it.

  • instanceStateMask—Optional query parameter to obtain samples that match the desired instance states. The values that can be used in the mask are: "ALIVE", "NOT_ALIVE_DISPOSED", and "NOT_ALIVE_NO_WRITERS". For example, a valid instanceStateMask would be "ALIVE|NOT_ALIVE_DISPOSED".

  • sampleStateMask—Optional query parameter to obtain samples that match the desired sample states. The values that can be used in the mask are "READ" and "NOT_READ".

  • viewStateMask—Optional query parameter to obtain samples that match the desired view states. The values that can be used in the mask are "NEW" or "NOT_NEW".

Preconditions
  • The Application must exist.

  • The DomainParticipant must exist.

  • The builtin Subscriber must exist.

  • The builtin DataReader must exist.

Example Request
GET /dds/rest1/applications/<a>/domain_participants/<dp>/builtin_subscribers/<bs>
/builtin_data_readers/<bdr>?sampleFormat="json"&removeFromReaderCache="false" HTTP/1.1
Host: <host>[:<port>]
HTTP Response

The body of the HTTP response includes a sequence of samples read in the requested format. This is an example with participant data:

  • Content-Type: application/dds-web+xml
    <read_sample_seq>
      <sample>
        <read_sample_info>
          <source_timestamp>
            <sec>1456957176</sec>
            <nanosec>207723000</nanosec>
          </source_timestamp>
          <valid_data>true</valid_data>
          <instance_handle>00000000000000000000000000000000</instance_handle>
          <instance_state>ALIVE</instance_state>
          <sample_state>NOT_READ</sample_state>
          <view_state>NEW</view_state>
        </read_sample_info>
        <data>
          <key>
            <value>
              <item>16869094</item>
              <item>174727750</item>
              <item>3283168865</item>
              <item>449</item>
            </value>
          </key>
          <user_data>
            <value>
            </value>
          </user_data>
            <property>
              <value>
                <item>
                  <name>dds.sys_info.hostname</name>
                  <value>RTI-00000</value>
                  <propagate>true</propagate>
                </item>
                <item>
                  <name>dds.sys_info.process_id</name>
                  <value>11275</value>
                  <propagate>true</propagate>
                </item>
                <item>
                  <name>dds.sys_info.username</name>
                  <value>username</value>
                  <propagate>true</propagate>
                </item>
                <item>
                  <name>dds.sys_info.executable_filepath</name>
                  <value>/path/to/executable</value>
                  <propagate>true</propagate>
                </item>
                <item>
                  <name>dds.sys_info.target</name>
                  <value>x64Linux2.6gcc4.4.5</value>
                  <propagate>true</propagate>
                </item>
                <item>
                  <name>dds.sys_info.creation_timestamp</name>
                  <value>2021-03-9 16:18:33Z</value>
                  <propagate>true</propagate>
                </item>
                <item>
                  <name>dds.sys_info.execution_timestamp</name>
                  <value>2021-06-23 12:04:08Z</value>
                  <propagate>true</propagate>
                </item>
              </value>
          </property>
          <rtps_protocol_version>
              <major>2</major>
              <minor>3</minor>
          </rtps_protocol_version>
          <rtps_vendor_id>
            <vendorId>
              <item>1</item>
              <item>1</item>
            </vendorId>
          </rtps_vendor_id>
          <dds_builtin_endpoints>3135</dds_builtin_endpoints>
          <default_unicast_locators>
            <item>
              <kind>IPv4</kind>
              <port>32661</port>
              <address>192.168.1.8</address>
            </item>
            <item>
              <kind>IPv4</kind>
              <port>32661</port>
              <address>10.2.190.37</address>
            </item>
            <item>
              <kind>IPv6</kind>
              <port>32661</port>
              <address>4C86:164D:99A5:7A37:F243:12CE:0000:0000</address>
            </item>
          </default_unicast_locators>
          <product_version>
            <major>6</major>
            <minor>0</minor>
            <release>1</release>
            <revision>0</revision>
          </product_version>
          <participant_name>
            <name>RTI Shapes Demo</name>
            <role_name></role_name>
          </participant_name>
          <domain_id>101</domain_id>
          <transport_info>
            <item>
              <class_id>1</class_id>
              <message_size_max>65507</message_size_max>
            </item>
            <item>
              <class_id>16777216</class_id>
              <message_size_max>65536</message_size_max>
            </item>
          </transport_info>
          <reachability_lease_duration>
            <sec>2147483647</sec>
            <nanosec>2147483647</nanosec>
          </reachability_lease_duration>
        </data>
      </sample>
    </read_sample_seq>
    
  • Content-Type: application/dds-web+json

    [
      {
        "read_sample_info":{
          "source_timestamp":{
            "sec":1456962954,
            "nanosec":150101000
          },
          "valid_data":true,
          "instance_handle":"00000000000000000000000000000000",
          "instance_state":"ALIVE",
          "sample_state":"NOT_READ",
          "view_state":"NEW"
        },
        "data":{
          "key":{
            "value":[16862963,2600599664,479217962,449]
          },
          "user_data":{
            "value":[]
          },
          "property":{
            "value":[
              {
                "name":"dds.sys_info.hostname",
                "value":"RTI-00000",
                "propagate":true
              },
              {
                "name":"dds.sys_info.process_id",
                "value":"8223",
                "propagate":true
              },
              {
                "name":"dds.sys_info.username",
                "value":"username",
                "propagate":true
              },
              {
                "name":"dds.sys_info.executable_filepath",
                "value":"/path/to/exectuable",
                "propagate":true
              },
              {
                "name":"dds.sys_info.target",
                "value":"x64Linux2.6gcc4.4.5",
                "propagate":true
              },
              {
                "name":"dds.sys_info.creation_timestamp",
                "value":"2021-03-9 16:18:33Z",
                "propagate":true
              },
              {
                "name":"dds.sys_info.execution_timestamp",
                "value":"2021-06-23 12:04:08Z",
                "propagate":true
              }]
          },
          "rtps_protocol_version":{
            "major":2,
            "minor":3
          },
          "rtps_vendor_id":{
            "vendorId":[1,1]
          },
          "dds_builtin_endpoints":3135,
          "default_unicast_locators":[
            {
              "kind":"IPv4",
              "port":32661,
              "address":"192.168.1.8"
            },
            {
              "kind":"IPv4",
              "port":32661,
              "address":"10.2.190.37"
            },
            {
              "kind":"IPv6",
              "port":32661,
              "address":"4C86:164D:99A5:7A37:F243:12CE:0000:0000"
            }],
          "product_version":{
            "major":6,
            "minor":0,
            "release":1,
            "revision":0
          },
          "participant_name":{
            "name":"RTI Shapes Demo",
            "role_name":""
          },
          "domain_id":101,
          "transport_info":[
            {
              "class_id":1,
              "message_size_max":65507
            },
            {
              "class_id":16777216,
              "message_size_max":65536
            }],
          "reachability_lease_duration":{
            "sec":2147483647,
            "nanosec":2147483647
          }
        }
      }
    ]
    

5.4.5. Example samples

Table 5.24 describes the structure of the samples recieved in discovery via the builtin DataReaders.

Table 5.24 Sample Representation of builtin Topics in XML and JSON

Type Definition

XML Representation

JSON Representation

Participant data

<sample>
    <read_sample_info>
        <source_timestamp>
            <sec>1456957176</sec>
            <nanosec>207723000</nanosec>
        </source_timestamp>
        <valid_data>true</valid_data>
        <instance_handle>00000000000000000000000000000000</instance_handle>
        <instance_state>ALIVE</instance_state>
        <sample_state>NOT_READ</sample_state>
    <view_state>NEW</view_state>
    </read_sample_info>
    <data>
        <key>
            <value>
                <item>16869094</item>
                <item>174727750</item>
                <item>3283168865</item>
                <item>449</item>
            </value>
        </key>
        <user_data>
            <value>
            </value>
        </user_data>
        <property>
            <value>
                <item>
                    <name>dds.sys_info.hostname</name>
                    <value>RTI-00000</value>
                    <propagate>true</propagate>
                </item>
                <item>
                    <name>dds.sys_info.process_id</name>
                    <value>11275</value>
                    <propagate>true</propagate>
                </item>
                <item>
                    <name>dds.sys_info.username</name>
                    <value>username</value>
                    <propagate>true</propagate>
                </item>
                <item>
                    <name>dds.sys_info.executable_filepath</name>
                    <value>/path/to/executable</value>
                    <propagate>true</propagate>
                </item>
                <item>
                    <name>dds.sys_info.target</name>
                    <value>x64Linux2.6gcc4.4.5</value>
                    <propagate>true</propagate>
                </item>
                <item>
                    <name>dds.sys_info.creation_timestamp</name>
                    <value>2021-03-9 16:18:33Z</value>
                    <propagate>true</propagate>
                </item>
                <item>
                    <name>dds.sys_info.execution_timestamp</name>
                    <value>2021-06-23 12:04:08Z</value>
                    <propagate>true</propagate>
                </item>
            </value>
        </property>
        <rtps_protocol_version>
            <major>2</major>
            <minor>3</minor>
        </rtps_protocol_version>
        <rtps_vendor_id>
            <vendorId>
                <item>1</item>
                <item>1</item>
            </vendorId>
        </rtps_vendor_id>
        <dds_builtin_endpoints>3135</dds_builtin_endpoints>
        <default_unicast_locators>
            <item>
                <kind>IPv4</kind>
                <port>32661</port>
                <address>192.168.1.8</address>
            </item>
            <item>
                <kind>IPv4</kind>
                <port>32661</port>
                <address>10.2.190.37</address>
            </item>
            <item>
                <kind>IPv6</kind>
                <port>32661</port>
                <address>4C86:164D:99A5:7A37:F243:12CE:0000:0000</address>
            </item>
        </default_unicast_locators>
        <product_version>
            <major>6</major>
            <minor>0</minor>
            <release>1</release>
            <revision>0</revision>
        </product_version>
        <participant_name>
            <name>RTI Shapes Demo</name>
            <role_name></role_name>
        </participant_name>
        <domain_id>101</domain_id>
        <transport_info>
            <item>
                <class_id>1</class_id>
                <message_size_max>65507</message_size_max>
            </item>
            <item>
                <class_id>16777216</class_id>
                <message_size_max>65536</message_size_max>
            </item>
        </transport_info>
        <reachability_lease_duration>
            <sec>2147483647</sec>
            <nanosec>2147483647</nanosec>
        </reachability_lease_duration>
    </data>
</sample>
{
    "read_sample_info":{
        "source_timestamp":{
            "sec":1456962954,
            "nanosec":150101000
        },
        "valid_data":true,
        "Instance_handle":"00000000000000000000000000000000",
        "instance_state":"ALIVE",
        "sample_state":"NOT_READ",
        "view_state":"NEW"
    },
    "data":{
        "key":{
            "value":[16862963,2600599664,479217962,449]
        },
        "user_data":{
            "value":[]
        },
        "property":{
            "value":[
                {
                    "name":"dds.sys_info.hostname",
                    "value":"RTI-00000",
                    "propagate":true
                },
                {
                    "name":"dds.sys_info.process_id",
                    "value":"8223",
                    "propagate":true
                },
                {
                    "name":"dds.sys_info.username",
                    "value":"username",
                    "propagate":true
                },
                {
                    "name":"dds.sys_info.executable_filepath",
                    "value":"/path/to/executable",
                    "propagate":true
                },
                {
                    "name":"dds.sys_info.target",
                    "value":"x64Linux2.6gcc4.4.5",
                    "propagate":true
                },
                {
                    "name":"dds.sys_info.creation_timestamp",
                    "value":"2021-03-9 16:18:33Z",
                    "propagate":true
                },
                {
                    "name":"dds.sys_info.execution_timestamp",
                    "value":"2021-06-23 12:04:08Z",
                    "propagate":true
                }]
        },
        "rtps_protocol_version":{
            "major":2,
            "minor":3
        },
        "rtps_vendor_id":{
            "vendorId":[1,1]
        },
        "dds_builtin_endpoints":3135,
        "default_unicast_locators":[
            {
                "kind":"IPv4",
                "port":32661,
                "address":"192.168.1.8"
            },
            {
                "kind":"IPv4",
                "port":32661,
                "address":"10.2.190.37"
            },
            {
                "kind":"IPv6",
                "port":32661,
                "address":"4C86:164D:99A5:7A37:F243:12CE:0000:0000"
            }],
        "product_version":{
            "major":6,
            "minor":0,
            "release":1,
            "revision":0
        },
        "participant_name":{
            "name":"RTI Shapes Demo",
            "role_name":""
        },
        "domain_id":101,
        "transport_info":[
            {
                "class_id":1,
                "message_size_max":65507
            },
            {
                "class_id":16777216,
                "message_size_max":65536
            }],
        "reachability_lease_duration":{
            "sec":2147483647,
            "nanosec":2147483647
        }
    }
}

Publication data

<sample>
    <read_sample_info>
        <source_timestamp>
            <sec>1456957176</sec>
            <nanosec>207723000</nanosec>
        </source_timestamp>
        <valid_data>true</valid_data>
        <instance_handle>00000000000000000000000000000000</instance_handle>
        <instance_state>ALIVE</instance_state>
        <sample_state>NOT_READ</sample_state>
    <view_state>NEW</view_state>
    </read_sample_info>
    <data>
        <key>
            <value>
                <item>16869094</item>
                <item>174727750</item>
                <item>3283168865</item>
                <item>2147483650</item>
            </value>
        </key>
        <participant_key>
            <value>
                <item>16869094</item>
                <item>174727750</item>
                <item>3283168865</item>
                <item>449</item>
            </value>
        </participant_key>
        <topic_name>Square</topic_name>
        <type_name>ShapeType</type_name>
        <durability>
            <kind>VOLATILE</kind>
            <direct_communication>true</direct_communication>
        </durability>
        <durability_service>
            <service_cleanup_delay>
                <sec>0</sec>
                <nanosec>0</nanosec>
            </service_cleanup_delay>
            <history_kind>KEEP_LAST</history_kind>
            <history_depth>1</history_depth>
            <max_samples>-1</max_samples>
            <max_instances>-1</max_instances>
            <max_samples_per_instance>-1</max_samples_per_instance>
        </durability_service>
        <deadline>
            <period>
                <sec>2147483647</sec>
                <nanosec>2147483647</nanosec>
            </period>
        </deadline>
        <latency_budget>
            <duration>
                <sec>0</sec>
                <nanosec>0</nanosec>
            </duration>
        </latency_budget>
        <liveliness>
            <kind>AUTOMATIC</kind>
            <lease_duration>
                <sec>2147483647</sec>
                <nanosec>2147483647</nanosec>
            </lease_duration>
            <assertions_per_lease_duration>3</assertions_per_lease_duration>
        </liveliness>
        <reliability>
            <kind>RELIABLE</kind>
            <max_blocking_time>
                <sec>0</sec>
                <nanosec>100000000</nanosec>
            </max_blocking_time>
            <acknowledgment_kind>PROTOCOL</acknowledgment_kind>
        </reliability>
        <lifespan>
            <duration>
                <sec>2147483647</sec>
                <nanosec>2147483647</nanosec>
            </duration>
        </lifespan>
        <user_data>
            <value>
            </value>
        </user_data>
        <ownership>
            <kind>SHARED</kind>
        </ownership>
        <ownership_strength>
            <value>0</value>
        </ownership_strength>
        <destination_order>
            <kind>BY_RECEPTION_TIMESTAMP</kind>
            <scope>INSTANCE_SCOPE</scope>
            <source_timestamp_tolerance>
                <sec>0</sec>
                <nanosec>100000000</nanosec>
            </source_timestamp_tolerance>
        </destination_order>
        <presentation>
            <access_scope>INSTANCE</access_scope>
            <coherent_access>false</coherent_access>
            <ordered_access>false</ordered_access>
        </presentation>
        <partition>
            <name>
            </name>
        </partition>
        <topic_data>
            <value>
            </value>
        </topic_data>
        <group_data>
            <value>
            </value>
        </group_data>
        <representation>
            <value>
            </value>
        </representation>
        <data_tags>
            <tags>
            </tags>
        </data_tags>
        <publisher_key>
            <value>
                <item>16869094</item>
                <item>174727750</item>
                <item>3283168865</item>
                <item>2147483656</item>
            </value>
        </publisher_key>
        <property>
            <value>
            </value>
        </property>
        <unicast_locators>
        </unicast_locators>
        <virtual_guid>
            <value>
                <item>1</item>
                <item>1</item>
                <item>102</item>
                <item>230</item>
                <item>10</item>
                <item>106</item>
                <item>34</item>
                <item>70</item>
                <item>195</item>
                <item>177</item>
                <item>46</item>
                <item>97</item>
                <item>128</item>
                <item>0</item>
                <item>0</item>
                <item>2</item>
            </value>
        </virtual_guid>
        <service>
            <kind>NO_SERVICE</kind>
        </service>
        <rtps_protocol_version>
            <major>2</major>
            <minor>3</minor>
        </rtps_protocol_version>
        <rtps_vendor_id>
            <vendorId>
                <item>1</item>
                <item>1</item>
            </vendorId>
        </rtps_vendor_id>
        <product_version>
            <major>6</major>
            <minor>0</minor>
            <release>1</release>
            <revision>0</revision>
        </product_version>
        <locator_filter>
            <locator_filters>
            </locator_filters>
            <filter_name></filter_name>
        </locator_filter>
        <disable_positive_acks>false</disable_positive_acks>
        <publication_name>
            <name></name>
            <role_name></role_name>
        </publication_name>
    </data>
</sample>
{
    "read_sample_info":{
        "source_timestamp":{
            "sec":1456962954,
            "nanosec":150101000
        },
        "valid_data":true,
        "Instance_handle":"00000000000000000000000000000000",
        "instance_state":"ALIVE",
        "sample_state":"NOT_READ",
        "view_state":"NEW"
    },
    "data":{
        "key":{
            "value":[16869094,174727750,3283168865,2147483650]
        },
        "participant_key":{
            "value":[16869094,174727750,3283168865,449]
        },
        "topic_name":"Square",
        "type_name":"ShapeType",
        "durability":{
            "kind":"VOLATILE",
            "direct_communication":true
        },
        "durability_service":{
            "service_cleanup_delay":{
                "sec":0,
                "nanosec":0
            },
            "history_kind":"KEEP_LAST",
            "history_depth":1,
            "max_samples":-1,
            "max_instances":-1,
            "max_samples_per_instance":-1
        },
        "deadline":{
            "period":{
                "sec":2147483647,
                "nanosec":2147483647
            }
        },
        "latency_budget":{
            "duration":{
                "sec":0,
                "nanosec":0
            }
        },
        "liveliness":{
            "kind":"AUTOMATIC",
            "lease_duration":{
                "sec":2147483647,
                "nanosec":2147483647
            },
            "assertions_per_lease_duration":3
        },
        "reliability":{
            "kind":"RELIABLE",
            "max_blocking_time":{
                "sec":0,
                "nanosec":100000000
            },
            "acknowledgment_kind":"PROTOCOL"
        },
        "lifespan":{
            "duration":{
                "sec":2147483647,
                "nanosec":2147483647
            }
        },
        "user_data":{
            "value":[]
        },
        "ownership":{
            "kind":"SHARED"
        },
        "ownership_strength":{
            "value":0
        },
        "destination_order":{
            "kind":"BY_RECEPTION_TIMESTAMP",
            "scope":"INSTANCE_SCOPE",
            "source_timestamp_tolerance":{
                "sec":0,
                "nanosec":100000000
            }
        },
        "presentation":{
            "access_scope":"INSTANCE",
            "coherent_access":false,
            "ordered_access":false
        },
        "partition":{
            "name":[]
        },
        "topic_data":{
            "value":[]
        },
        "group_data":{
            "value":[]
        },
        "representation":{
            "value":[]
        },
        "data_tags":{
            "tags":[]
        },
        "publisher_key":{
            "value":[16869094,174727750,3283168865,2147483656]
        },
        "property":{
            "value":[]
        },
        "unicast_locators":[],
        "virtual_guid":{
            "value":[1,1,102,230,10,106,34,70,195,177,46,97,128,0,0,2]
        },
        "service":{
            "kind":"NO_SERVICE"
        },
        "rtps_protocol_version":{
            "major":2,
            "minor":3
        },
        "rtps_vendor_id":{
            "vendorId":[1,1]
        },
        "product_version":{
            "major":6,
            "minor":0,
            "release":1,
            "revision":0
        },
        "locator_filter":{
            "locator_filters":[],
            "filter_name":""
        },
        "disable_positive_acks":false,
        "publication_name":{
            "name":"",
            "role_name":""
        }
    }
}

Subscription data

<sample>
    <read_sample_info>
        <source_timestamp>
            <sec>1456957176</sec>
            <nanosec>207723000</nanosec>
        </source_timestamp>
        <valid_data>true</valid_data>
        <instance_handle>00000000000000000000000000000000</instance_handle>
        <instance_state>ALIVE</instance_state>
        <sample_state>NOT_READ</sample_state>
    <view_state>NEW</view_state>
    </read_sample_info>
    <data>
        <key>
            <value>
                <item>16869094</item>
                <item>174727750</item>
                <item>3283168865</item>
                <item>2147483655</item>
            </value>
        </key>
        <participant_key>
            <value>
                <item>16869094</item>
                <item>174727750</item>
                <item>3283168865</item>
                <item>449</item>
            </value>
        </participant_key>
        <topic_name>Square</topic_name>
        <type_name>ShapeType</type_name>
        <durability>
            <kind>VOLATILE</kind>
            <direct_communication>true</direct_communication>
        </durability>
        <deadline>
            <period>
                <sec>2147483647</sec>
                <nanosec>2147483647</nanosec>
            </period>
        </deadline>
        <latency_budget>
            <duration>
                <sec>0</sec>
                <nanosec>0</nanosec>
            </duration>
        </latency_budget>
        <liveliness>
            <kind>AUTOMATIC</kind>
            <lease_duration>
                <sec>2147483647</sec>
                <nanosec>2147483647</nanosec>
            </lease_duration>
            <assertions_per_lease_duration>3</assertions_per_lease_duration>
        </liveliness>
        <reliability>
            <kind>BEST_EFFORT</kind>
            <max_blocking_time>
                <sec>0</sec>
                <nanosec>100000000</nanosec>
            </max_blocking_time>
            <acknowledgment_kind>PROTOCOL</acknowledgment_kind>
        </reliability>
        <ownership>
            <kind>SHARED</kind>
        </ownership>
        <destination_order>
            <kind>BY_RECEPTION_TIMESTAMP</kind>
            <scope>INSTANCE_SCOPE</scope>
            <source_timestamp_tolerance>
                <sec>30</sec>
                <nanosec>0</nanosec>
            </source_timestamp_tolerance>
        </destination_order>
        <user_data>
            <value>
            </value>
        </user_data>
        <time_based_filter>
            <minimum_separation>
                <sec>0</sec>
                <nanosec>0</nanosec>
            </minimum_separation>
        </time_based_filter>
        <presentation>
            <access_scope>INSTANCE</access_scope>
            <coherent_access>false</coherent_access>
            <ordered_access>false</ordered_access>
        </presentation>
        <partition>
            <name>
            </name>
        </partition>
        <topic_data>
            <value>
            </value>
        </topic_data>
        <group_data>
            <value>
            </value>
        </group_data>
        <type_consistency>
            <kind>ALLOW_TYPE_COERCION</kind>
            <ignore_sequence_bounds>false</ignore_sequence_bounds>
            <ignore_string_bounds>false</ignore_string_bounds>
            <ignore_member_names>false</ignore_member_names>
            <prevent_type_widening>false</prevent_type_widening>
            <force_type_validation>false</force_type_validation>
            <ignore_enum_literal_names>false</ignore_enum_literal_names>
        </type_consistency>
        <representation>
            <value>
            </value>
        </representation>
        <data_tags>
            <tags>
            </tags>
        </data_tags>
        <subscriber_key>
            <value>
                <item>16869094</item>
                <item>174727750</item>
                <item>3283168865</item>
                <item>2147483657</item>
            </value>
        </subscriber_key>
        <property>
            <value>
            </value>
        </property>
        <unicast_locators>
        </unicast_locators>
        <multicast_locators>
        </multicast_locators>
        <content_filter_property>
            <content_filter_topic_name></content_filter_topic_name>
            <related_topic_name></related_topic_name>
            <filter_class_name></filter_class_name>
            <filter_expression></filter_expression>
            <expression_parameters>
            </expression_parameters>
        </content_filter_property>
        <virtual_guid>
            <value>
                <item>1</item>
                <item>1</item>
                <item>102</item>
                <item>230</item>
                <item>10</item>
                <item>106</item>
                <item>34</item>
                <item>70</item>
                <item>195</item>
                <item>177</item>
                <item>46</item>
                <item>97</item>
                <item>128</item>
                <item>0</item>
                <item>0</item>
                <item>7</item>
            </value>
        </virtual_guid>
        <service>
            <kind>NO_SERVICE</kind>
        </service>
        <rtps_protocol_version>
            <major>2</major>
            <minor>3</minor>
        </rtps_protocol_version>
        <rtps_vendor_id>
            <vendorId>
                <item>1</item>
                <item>1</item>
            </vendorId>
        </rtps_vendor_id>
        <product_version>
            <major>6</major>
            <minor>0</minor>
            <release>1</release>
            <revision>0</revision>
        </product_version>
        <disable_positive_acks>false</disable_positive_acks>
        <subscription_name>
            <name></name>
            <role_name></role_name>
        </subscription_name>
    </data>
</sample>
{
    "read_sample_info":{
        "source_timestamp":{
            "sec":1456962954,
            "nanosec":150101000
        },
        "valid_data":true,
        "Instance_handle":"00000000000000000000000000000000",
        "instance_state":"ALIVE",
        "sample_state":"NOT_READ",
        "view_state":"NEW"
    },
    "data":{
        "key":{
            "value":[16869094,174727750,3283168865,2147483655]
        },
        "participant_key":{
            "value":[16869094,174727750,3283168865,449]
        },
        "topic_name":"Square",
        "type_name":"ShapeType",
        "durability":{
            "kind":"VOLATILE",
            "direct_communication":true
        },
        "deadline":{
            "period":{
                "sec":2147483647,
                "nanosec":2147483647
            }
        },
        "latency_budget":{
            "duration":{
                "sec":0,
                "nanosec":0
            }
        },
        "liveliness":{
            "kind":"AUTOMATIC",
            "lease_duration":{
                "sec":2147483647,
                "nanosec":2147483647
            },
            "assertions_per_lease_duration":3
        },
        "reliability":{
            "kind":"BEST_EFFORT",
            "max_blocking_time":{
                "sec":0,
                "nanosec":100000000
            },
            "acknowledgment_kind":"PROTOCOL"
        },
        "ownership":{
            "kind":"SHARED"
        },
        "destination_order":{
            "kind":"BY_RECEPTION_TIMESTAMP",
            "scope":"INSTANCE_SCOPE",
            "source_timestamp_tolerance":{
                "sec":30,
                "nanosec":0
            }
        },
        "user_data":{
            "value":[]
        },
        "time_based_filter":{
            "minimum_separation":{
                "sec":0,
                "nanosec":0
            }
        },
        "presentation":{
            "access_scope":"INSTANCE",
            "coherent_access":false,
            "ordered_access":false
        },
        "partition":{
            "name":[]
        },
        "topic_data":{
            "value":[]
        },
        "group_data":{
            "value":[]
        },
        "type_consistency":{
            "kind":"ALLOW_TYPE_COERCION",
            "ignore_sequence_bounds":false,
            "ignore_string_bounds":false,
            "ignore_member_names":false,
            "prevent_type_widening":false,
            "force_type_validation":false,
            "ignore_enum_literal_names":false
        },
        "representation":{
            "value":[]
        },
        "data_tags":{
            "tags":[]
        },
        "subscriber_key":{
            "value":[16869094,174727750,3283168865,2147483657]
        },
        "property":{
            "value":[]
        },
        "unicast_locators":[],
        "multicast_locators":[],
        "content_filter_property":{
            "content_filter_topic_name":"",
            "related_topic_name":"",
            "filter_class_name":"",
            "filter_expression":"",
            "expression_parameters":[]
        },
        "virtual_guid":{
            "value":[1,1,102,230,10,106,34,70,195,177,46,97,128,0,0,7]
        },
        "service":{
            "kind":"NO_SERVICE"
        },
        "rtps_protocol_version":{
            "major":2,
            "minor":3
        },
        "rtps_vendor_id":{
            "vendorId":[1,1]
        },
        "product_version":{
            "major":6,
            "minor":0,
            "release":1,
            "revision":0
        },
        "disable_positive_acks":false,
        "subscription_name":{
            "name":"",
            "role_name":""
        }
    }
}