diff options
Diffstat (limited to 'docs/content')
-rw-r--r-- | docs/content/design.rst | 36 | ||||
-rw-r--r-- | docs/content/modeling.rst | 32 |
2 files changed, 61 insertions, 7 deletions
diff --git a/docs/content/design.rst b/docs/content/design.rst index 7a6590d..c414e6d 100644 --- a/docs/content/design.rst +++ b/docs/content/design.rst @@ -8,13 +8,37 @@ CPS Temporal Design =================== -.. warning:: Draft +Exposed APIs +============ -* REST API +CPS Temporal is providing a REST HTTP API to query historical CPS data. +Its OPEN API Specification can be found either: - * Specification - * Postman Collection +* In :download:`openapi.yml <../_static/openapi/swagger/openapi.yml>` + file +* At ``https://<cps-temporal-host>:<cps-temporal-port>/swagger/openapi.yml`` + endpoint available on CPS Temporal running instance -* Event Schema +Swagger UI is also available at: - * Json Schema +* ``https://<cps-temporal-host>:<cps-temporal-port>/swagger-ui.html`` + +And following Postman collection can be used to send requests to any running +instance: + +* :download:`CPS Temporal Postman Collection <../_static/postman-collections/cps-temporal-postman-collection.json>` + +Event Integration +================= + +CPS Core and CPS Temporal are integrated with an event driven architecture. +Integration between these two components is event notification based. + +For each data modification handled by CPS Core, + +* CPS Core is publishing, to a dedicated Kafka topic, an event representing + the data configuration or state. +* CPS Temporal is listening to the same topic for the event and is responsible + to keep track of all data over time. + +Refer to :doc:`modeling` for more details on the event structure. diff --git a/docs/content/modeling.rst b/docs/content/modeling.rst index b8bf91e..8871a81 100644 --- a/docs/content/modeling.rst +++ b/docs/content/modeling.rst @@ -8,4 +8,34 @@ CPS Temporal Modeling ===================== -.. warning:: Draft +Event Structure +=============== + +Data manipulated by both CPS Core and CPS Temporal to represent a Data Updated +Event is a JSON structure that is defined by following Json Schema: + +* :download:`cps-data-updated-event-schema.json <../_static/event-schema/cps-data-updated-event-schema-v1.json>` + +And following is an example of an event compliant with this schema: + +.. code:: json + + { + "schema": "urn:cps:org.onap.cps:data-updated-event-schema:v1", + "id": "38aa6cc6-264d-4ede-b534-18f5c1f403ea", + "source": "urn:cps:org.onap.cps", + "type": "org.onap.cps.data-updated-event", + "content": { + "observedTimestamp": "2021-06-09T13:00:00.123-0400", + "dataspaceName": "my-dataspace", + "schemaSetName": "my-schema-set", + "anchorName": "my-anchor", + "data": { + "interface": { + "name": "itf-1", + "status": "up" + } + } + } + } + |