ODM Platform Product Plane Notification Service API Reference (0.9.0)

Download OpenAPI specification:Download

ODM Platform Team: odm.info@quantyca.it License: Apache 2.0

This page describe tha API exposed by the Notification Service Server of the Product Plane of the Open Data Mesh Platform.

Overview

The Notification Module of the Open Data Mesh platform manages the lifecycle of Observers and the dispatch of Notification to them.An Observer is an Adapter of the Notification API service in the Utility Plane. In addition to this, it also keeps track of every dispatched Notification and their status.

Observers

Endpoints associated to Observers lifecycle

Get an Observer

Get the Observer identified by the given ID

path Parameters
id
required
integer <int64>

ID of the desired Observer

Responses

Response samples

Content type
{
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "id": 0,
  • "name": "string",
  • "displayName": "string",
  • "observerServerBaseUrl": "string"
}

Update an Observer

Update a specific listening Notification Adapter

path Parameters
id
required
integer <int64>

ID of the Observer to update

Request Body schema:

An Observer JSON object

createdAt
string <date-time>

The creation timestamp. Automatically handled by the API: can not be modified.

updatedAt
string <date-time>

The last update timestamp. Automatically handled by the API: can not be modified.

id
integer <int64>

Auto-generated ID of the Policy

name
string

Unique name of the listening Notification Adapter

displayName
string

Human readable display name of the listening Notification Adapter

observerServerBaseUrl
string

Observer server base URL (i.e., protocol, hostname and port) to reach the listening Notification Adapter

Responses

Request samples

Content type

Example of a listening Notification Adapter

{}

Response samples

Content type
application/json

engine1

{}

Remove an Observer

Remove a single listening Notification Adapter given its ID

path Parameters
id
required
integer <int64>

ID of the Observer to delete

Responses

Response samples

Content type
application/json
{
  • "status": 0,
  • "code": "string",
  • "description": "string",
  • "message": "string",
  • "path": "string",
  • "timestamp": 0
}

Get all Observers

Get all the registered Observers paginated

query Parameters
required
object (Pageable)
searchOptions
required
object (ObserverSearchOptions)

Responses

Response samples

Content type
[
  • {
    }
]

Add an Observer

Add a single listening Notification Adapter (i.e., an Observer)

Request Body schema:

An Observer JSON object

createdAt
string <date-time>

The creation timestamp. Automatically handled by the API: can not be modified.

updatedAt
string <date-time>

The last update timestamp. Automatically handled by the API: can not be modified.

id
integer <int64>

Auto-generated ID of the Policy

name
string

Unique name of the listening Notification Adapter

displayName
string

Human readable display name of the listening Notification Adapter

observerServerBaseUrl
string

Observer server base URL (i.e., protocol, hostname and port) to reach the listening Notification Adapter

Responses

Request samples

Content type

Example of a listening Notification Adapter

"{\n \"name\": \"custom-observer\",\n \"displayName\": \"Custom Observer\",\n \"observerServerAddress\": \"http://localhost:9009/api/v1/up/notification-service\",\n}"

Response samples

Content type
application/json

observer

{}

Notifications

Endpoints associated to Notifications lifecycle

Update an Notification

Update a specific Notification

path Parameters
id
required
integer <int64>

ID of the Notification to update

Request Body schema:

A Notification JSON object

id
integer <int64>

Auto generated ID of the Notification

required
object (EventResource)
status
string
Enum: "UNPROCESSABLE" "PROCESSING" "PROCESSED" "PROCESS_ERROR"

Status of the Notification

processingOutput
string

Output of the Notification processing phase

object (ObserverResource)

Observer that handle this specific notification

receivedAt
string <date-time>

Timestamp of the Notification reception

processedAt
string <date-time>

Timestamp of the Notification processing phase

Responses

Request samples

Content type
{
  • "id": 0,
  • "event": {
    },
  • "status": "UNPROCESSABLE",
  • "processingOutput": "string",
  • "observer": {
    },
  • "receivedAt": "2019-08-24T14:15:22Z",
  • "processedAt": "2019-08-24T14:15:22Z"
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "event": {
    },
  • "status": "UNPROCESSABLE",
  • "processingOutput": "string",
  • "observer": {
    },
  • "receivedAt": "2019-08-24T14:15:22Z",
  • "processedAt": "2019-08-24T14:15:22Z"
}

Get all Notifications

Get all the registered Notifications paginated and, eventually, filtered

query Parameters
required
object (Pageable)
required
object (EventNotificationSearchOptions)

Responses

Response samples

Content type
[
  • {
    }
]

Get a Notification

Get the Notification identified by the given ID

path Parameters
notificationId
required
integer <int64>

ID of the desired Notification

Responses

Response samples

Content type
{
  • "id": 0,
  • "event": {
    },
  • "status": "UNPROCESSABLE",
  • "processingOutput": "string",
  • "observer": {
    },
  • "receivedAt": "2019-08-24T14:15:22Z",
  • "processedAt": "2019-08-24T14:15:22Z"
}

Events

Endpoints associated to Events info

Get all Events

Get all the registered Events paginated

query Parameters
required
object (Pageable)
searchOptions
required
object (EventSearchOptions)

Responses

Response samples

Content type
[
  • {
    }
]

Get an Event

Get the Event identified by the given ID

path Parameters
eventId
required
integer <int64>

ID of the desired Event

Responses

Response samples

Content type
{
  • "id": 0,
  • "type": "string",
  • "entityId": "string",
  • "beforeState": "string",
  • "afterState": "string",
  • "time": "2019-08-24T14:15:22Z"
}

Dispatch

Endpoints associated to dispatching of events to Observers

Dispatch an Event

Dispatch an Event to all registered Observers

Request Body schema:

An Event JSON object

id
integer <int64>

Auto generated ID of the Event

type
required
string

Event type

entityId
required
string

ID of the Entity subject of the Event

beforeState
string

Entity state before the Event

afterState
string

Entity state after the Event

time
required
string <date-time>

Event timestamp

Responses

Request samples

Content type

Example of a dispatchable Event

"{\n \"type\": \"DATA_PRODUCT_CREATED\",\n \"entityId\": \"abc123\",\n \"beforeState\": null,\n \"beforeState\": \"{\"id\":1, \"name\": \"DP abc 123\"}\",\n \"time\": \"2024-03-21T12:04:11.000+00:00\"\n}"

Response samples

Content type
application/json
{
  • "status": 0,
  • "code": "string",
  • "description": "string",
  • "message": "string",
  • "path": "string",
  • "timestamp": 0
}