Skip to main content

Notifications

Notifications help users stay updated about important events and activities within the web app.

A user can access his notifications control panel by clicking in the bell icon on top of the web page.

There are three kinds of notifications:

  • Access Request: notify the user about an access request for a component of a Data Product. The user can choose to accept or reject the request.
  • Question: notify the user about a question relative to a data product. The user can respond to the question.
  • Informative: notify the user about an event.

We highlight its DB field along with their types:

# The Id of the notification. It is unique and incremental, starting from 1.
id: Serial
# The Kind of notification. It could be Informative, AccessRequest or Question.
kind: Text
# Json objects that give more information about the request. We will examine them later.
notification_request: Jsonb
notification_response: Jsonb
# The recipient and sender of the notification.
recipient: Text
sender: Text
# The hook_id is a UID used to link the notification to an action handler,
# which can perform operations on an update of the notification.
hook_id: Text
# Timestamps to note when the notification was created, the last time it was updated and the time it was read.
created_at: Timestamp
updated_at: Timestamp
read_at: Timestamp

Notification request and response

They are JSON objects that contain information about the request and, if present, the response. They vary depending on the kind of notification.

Access Request kind

This notification is sent following an access request to a component of a data product. We highlight the more important fields of the notification request:

# Which user issued the request.
requester: Text
# The identities for which the access is requested.
identities: Array[Text]
# The motivation that the issuer can specify.
motivation: Text
# Data about the output port and its data product.
outputport: Jsonb
dataproduct: Jsonb

The notification response contains:

# Status of the request.
status: Text
# Timestamp of when the response was sent.
timestamp: Timestamp
# Who authorized this request.
authorized_by: Text

Question Notification kind

This notification is sent following a question about a data product. The notification request contains:

# Who asked the question.
asked_by: Text
# The body of the question.
question: Text
# Information about the data product.
dataproduct: Jsonb
# The id of the instance of the data product.
id_dataproduct_instance: Numeric

The response contains:

# The body of the answer.
answer: Text
# The timestamp of when the question was answered.
timestamp: Timestamp
# The author of the answer.
answered_by: Text

Informative Notification kind

This notification communicates information to the user, for example when a new data product is released. The notification does not expect a response. The request looks like this:

# The text displayed in the notification. This is the only required field.
text: Text
# Optional fields to display more information about the subject of the notification. Rendered directly in the browser.
json: Jsonb
html: HTML