Hi David,
in your example the @type=ServiceOrderCreateEvent describes the complete class of the event (notification).
So by that class description the event (payload) element contains the ServiceOrder (instance/resource) which was created.
The client can look into that part, if he knows the class of the ServiceOrder, which is described by the event.serviceOrder.@type element. (@type=ServiceOrder)
Below I copied an comlete ServiceOrder example as event payload.
and you can have access by EventAPI GET operation:
GET /tmf-api/event/v4/event?eventType=ServiceOrderCreateNotification& fileds=eventId,eventTime,eventType,event
Accept: application/json
Response 200
{
"eventId":"00001",
"eventTime":"2015-11-16T16:42:25-04:00",
"eventType":"ServiceOrderCreateEvent",
"event":
{
"serviceOrder": {
"id": "43",
"href": "http://serverlocation:port/serviceOrdering/v4/serviceOrder/43",
"externalId": "BSS747",
"priority": "1",
"description": "Service order description",
"category": "TMF resource illustration",
"state": "acknowledged",
"orderDate": "2018-01-12T09:37:40.508Z",
"requestedStartDate": "2018-01-15T09:37:40.508Z",
"requestedCompletionDate": "2018-01-15T09:37:40.508Z",
"expectedCompletionDate": "2018-01-15T09:37:40.508Z",
"startDate": "2018-01-12T09:37:40.508Z",
"@type": "ServiceOrder",
"note": [
{
"date": "2018-01-15T09:37:40.508Z",
"id": "1",
"author": "Harvey Poupon",
"text": "Some text"
}
],
"relatedParty": [
{
"id": "456",
"href": "http://serverlocation:port/partyManagement/v4/party/456",
"role": "requester",
"name": "Jean Pontus",
"@referredType": "Individual"
}
],
"serviceOrderItem": [
{
"id": "1",
"action": "add",
"state": "acknowledged",
"service": {
"@type": "Service",
"state": "active",
"serviceType": "CFS",
"serviceCharacteristic": [
{
"id": "452-gh6",
"name": "vCPE",
"valueType": "object",
"value": {
"@type": "JSONSpecification",
"@schemaLocation": "http://my.schemas/vCPE.schema.json",
"vCPE_IP": "193.218.236.21",
"MaxTxRate": 300,
"TransmitPower": "11 dBm",
"maxTream": "OFF"
}
}
],
"serviceSpecification": {
"@type": "ONAPServiceSpecification",
"@baseType": "ServiceSpecificationRef",
"@schemaLocation": "http://my.schema/ONAPServiceSpecification.json",
"id": "12",
"href": "http://.../serviceSpecification/12",
"name": "vCPE",
"version": "1",
"invariantUUID": "456-852-357",
"toscaModelURL": "http//...",
"targetServiceSchema": {
"@type": "onapJsonScheam",
"@schemaLocation": "http://nbi/api/v4/serviceSpecification/456-852-357/specificationInputSchema"
}
}
},
"@type": "ServiceOrderItem"
},
{
"id": "2",
"action": "modify",
"state": "acknowledged",
"service": {
"id": "456",
"@type": "Service",
"href": "http://serverlocation:port/serviceInventoryManagement/v4/service/456",
"state": "active",
"serviceType": "CFS",
"serviceCharacteristic": [
{
"id": "452-gh6",
"name": "InputPort",
"valueType": "string",
"value": "456/7"
}
],
"supportingResource": [
{
"id": "3456_DFG5-H690",
"href": "http://serverlocation:port/resourceInventoryManagement/v4/resource/3456_DFG5-H690",
"@referredType": "CloudResource"
}
]
},
"@type": "ServiceOrderItem"
},
{
"id": "3",
"action": "add",
"state": "acknowledged",
"service": {
"state": "active",
"serviceType": "CFS",
"@type": "Service",
"serviceRelationship": [
{
"relationshipType": "reliesOn",
"service": {
"href": "https://serverlocation:port/serviceManagement/v4/service/45",
"id": "45"
}
}
],
"serviceSpecification": {
"id": "48",
"href": "http//serverlocation:port/serviceCatalogManagement/v4/serviceSpecification/48",
"name": "genericDataService48",
"version": "2"
},
"feature": [
{
"id": "Feat1",
"isEnabled": true,
"name": "DataDownload",
"@type": "Feature",
"featureCharacteristic": [
{
"name": "VolumeCapped",
"value": true,
"id": "444",
"valueType": "boolean"
}
]
}
]
},
"@type": "ServiceOrderItem"
},
{
"id": "4",
"action": "modify",
"state": "acknowledged",
"service": {
"id": "12",
"href": "http://serverlocation:port/serviceInventoryManagement/v4/service/12",
"state": "inactive"
},
"@type": "ServiceOrderItem"
}
]
}
}
}
------------------------------
Thomas Braun
Deutsche Telekom AG
------------------------------
Original Message:
Sent: Jun 17, 2021 16:09
From: David Whitfield
Subject: TMF 688 Event API and Event resource in other APIs
Hi @Thomas Braun. I mean to say that the TMF688 spec says that everything which is published to your event streaming platform is wrapped in the TMF688 event header.
I am therefore presuming that if you wish to stream TMF641 events onto your event streaming platform for clients to subscribe to then they are written as a TMF688 and the event field of that TMF688 contains the entire TMF641 payload.
To be explicit (please see below)....
[
{
"@type": "ServiceOrderCreateEvent",
"@schemaLocation": "http://xx/Event.schema.json",
"@baseType": "event",
"id": "3e34689f-d4ae-44b7-bc97-d64eeaf2ba76",
"href": "http://www.tmforum.org/tmf-api/eventStreaming/Event/3e34689f-d4ae-44b7-bc97-d64eeaf2ba76",
"eventId": "256c42f0-7cae-4cfe-8b96-f5773796f8ff",
"eventTime": "2016-07-02T14:20:54",
"eventType": "ServiceOrderCreateNotification",
"correlationId": "238764827364827t367",
"domain": "domain-x",
"title": "Mail service not responding",
"description": "The mail service is no longer responding and sending mails", "timeOccurred": "2016-07-02T14:20:54",
"timeReceived": "2016-07-02T14:21:08",
"priority": "Normal",
"source":
{
"id": "12345",
"href": ".../relatedEntity/12345"
},
"reportingSystem":
{
"id": "34534",
"href": ".../reportingEntity/12345",
"name": "name"
},
"relatedParty":
[
{
"id": "12312",
"href": "http://.../party/12345",
"role": "Owner"
}
],
"event":
{
"serviceOrder":
{
{-- SEE ServiceOrder RESOURCE SAMPLE --}
}
}
]
However should that client look inside the "event" field of the TMF688 it would not find a full TMF641 event as is described by that document below it would only find the "serviceOrder" part.
{
"eventId":"00001",
"eventTime":"2015-11-16T16:42:25-04:00",
"eventType":"ServiceOrderCreateEvent",
"event":
{
"serviceOrder" : {-- SEE ServiceOrder RESOURCE SAMPLE --}
}
}
------------------------------
David Whitfield
TalkTalk Group
------------------------------
Original Message:
Sent: Jun 17, 2021 11:51
From: Thomas Braun
Subject: TMF 688 Event API and Event resource in other APIs
I do not understand your question, but in general all notification (events) can be received by the Event688 API (listener) for further processing.
Question: Does the fieldpath element belong to the notification event?
and the @type is the class discriminator for the event class.
If @type=ResourceCreateEvent then the event class is the ResourceCreateEvent with eventType=ResourceCreateNotification as notification type. This means that the payload of the event has a resource instance included , which was created.
In this example the ResourceInventory API sends a ResourceCreateNotification to the EventAPI (HUB) via POST (Callback) operation.
KR Thomas
------------------------------
Thomas Braun
Deutsche Telekom AG