web-notifications

Web notifications is the resource representing a user's notification

Endpoints

Skip to section
GET/web-notifications
GET/web-notifications/{notificationId}
PATCH/web-notifications/{notificationId}
DELETE/web-notifications/{notificationId}
PATCH/web-notifications/all
DELETE/web-notifications/all

Retrieve notifications matching the query.

Query Parameters GET /web-notifications

read
optional
boolean

Read status of the notification

limit
optional, default=10, maximum=100
number

The number of notification entries to retrieved.

page
optional, default=1
number

Page number

sort
optional, default='-created'
string

The field to sort by, with +/- prefix indicating sort order

Enum:

+createdAt

-createdAt

+updatedAt

-updatedAt

Responses GET /web-notifications

200
application/json

An array of notification objects

400
application/json

Invalid request parameters for querying users.

401
application/json

Unauthorized request.

500
application/json

Internal server error

GET/web-notifications

curl "https://your-tenant.us.qlikcloud.com/api/v1/web-notifications" \
 -H "Authorization: Bearer <API-key>"

Response GET /web-notifications

{
  "data": [
    {
      "id": "string",
      "userId": "string",
      "tenantId": "string",
      "spaceId": "string",
      "resourceId": "string",
      "resourceType": "string",
      "action": "string",
      "read": true,
      "body": "string",
      "createdAt": "2021-10-25T14:54:54.244Z",
      "updatedAt": "2021-10-25T14:54:54.244Z"
    }
  ],
  "meta": {
    "unreadCount": 0
  },
  "links": {
    "self": {
      "href": "string"
    },
    "next": {
      "href": "string"
    },
    "prev": {
      "href": "string"
    }
  }
}

Retrieve a single notification by Id.

Path Parameters GET /web-notifications/{notificationId}

notificationId
string<uid>

The id of the notification to retrieve.

Responses GET /web-notifications/{notificationId}

200
application/json

Successfully got notification.

401
application/json

Unauthorized request.

404
application/json

Not found when user tries to get notification they do not own.

500
application/json

Internal server error

GET/web-notifications/{notificationId}

curl "https://your-tenant.us.qlikcloud.com/api/v1/web-notifications/{notificationId}" \
 -H "Authorization: Bearer <API-key>"

Response GET /web-notifications/{notificationId}

{
  "id": "string",
  "userId": "string",
  "tenantId": "string",
  "spaceId": "string",
  "resourceId": "string",
  "resourceType": "string",
  "action": "string",
  "read": true,
  "body": "string",
  "createdAt": "2021-10-25T14:54:54.244Z",
  "updatedAt": "2021-10-25T14:54:54.244Z"
}

Patch a notification.

Path Parameters PATCH /web-notifications/{notificationId}

notificationId
string<uid>

The id of the notification to update.

Request Body PATCH /web-notifications/{notificationId}

application/json

No description

Responses PATCH /web-notifications/{notificationId}

204
application/json

Successfully patched marked notification.

400
application/json

Unsupported patch request.

401
application/json

Unauthorized request.

404
application/json

Notification not found.

500
application/json

Internal server error

PATCH/web-notifications/{notificationId}

curl "https://your-tenant.us.qlikcloud.com/api/v1/web-notifications/{notificationId}" \
 -X PATCH \
 -H "Authorization: Bearer <API-key>" \
 -H "Content-type: application/json" \
 -d '[{"op":"replace","path":"/read","value":true}]'

Request PATCH /web-notifications/{notificationId}

[
  {
    "op": "replace",
    "path": "/read",
    "value": true
  }
]

Response PATCH /web-notifications/{notificationId}

{
  "unreadCount": 0
}

Delete a notification.

Path Parameters DELETE /web-notifications/{notificationId}

notificationId
string<uid>

The id of the notification to delete.

Responses DELETE /web-notifications/{notificationId}

204
application/json

Successfully deleted notification.

401
application/json

Unauthorized request.

404
application/json

Notification not found.

500
application/json

Internal server error

DELETE/web-notifications/{notificationId}

curl "https://your-tenant.us.qlikcloud.com/api/v1/web-notifications/{notificationId}" \
 -X DELETE \
 -H "Authorization: Bearer <API-key>"

Response DELETE /web-notifications/{notificationId}

{
  "unreadCount": 0
}

Patch all notifications.

Request Body PATCH /web-notifications/all

application/json

No description

Responses PATCH /web-notifications/all

204
application/json

Successfully marked all notification.

400
application/json

Unsupported patch request.

401
application/json

Unauthorized request.

500
application/json

Internal server error

PATCH/web-notifications/all

curl "https://your-tenant.us.qlikcloud.com/api/v1/web-notifications/all" \
 -X PATCH \
 -H "Authorization: Bearer <API-key>" \
 -H "Content-type: application/json" \
 -d '[{"op":"replace","path":"/read","value":true}]'

Request PATCH /web-notifications/all

[
  {
    "op": "replace",
    "path": "/read",
    "value": true
  }
]

Response PATCH /web-notifications/all

{
  "unreadCount": 0
}

Delete all notifications.

Responses DELETE /web-notifications/all

204
application/json

Successfully deleted notification.

401
application/json

Unauthorized request.

500
application/json

Internal server error

DELETE/web-notifications/all

curl "https://your-tenant.us.qlikcloud.com/api/v1/web-notifications/all" \
 -X DELETE \
 -H "Authorization: Bearer <API-key>"

Response DELETE /web-notifications/all

{
  "unreadCount": 0
}

Notifications

object

Properties

data

No description

meta

Notifications meta data

links

Notifications links

Notification

object

Properties

id
string<uid>

No description

userId
string<uid>

No description

tenantId
optional
string<uid>

No description

spaceId
optional
string<uid>

No description

resourceId
optional
string<string>

No description

resourceType
optional
string<string>

No description

action
optional
string<string>

No description

read
boolean

No description

body
string

No description

createdAt
string<date>

No description

updatedAt
string<date>

No description

NotificationPatch

object

A JSON Patch document as defined in http://tools.ietf.org/html/rfc6902.

Properties

op
string

The operation to be performed.

Enum:

replace

path
string

The path for the given resource field to patch.

Enum:

/description

value
string

The value to be used for this operation.

NotificationPatchSchema

Array<NotificationPatch>

An array of JSON Patch documents

Properties

op
string

The operation to be performed.

Enum:

replace

path
string

The path for the given resource field to patch.

Enum:

/description

value
string

The value to be used for this operation.

Errors

object

A representation of the errors encountered from the HTTP request.

Properties

errors

No description

Error

object

An error object.

Properties

code
string

The error code.

title
string

Summary of the problem.

status
optional
integer

The HTTP status code.

message
optional
string

A human-readable explanation specific to this occurrence of the problem.

Meta

object

Notifications meta data

Properties

unreadCount
minimum=0, maximum=500
number

The total number of unread notification.

v4.0.0
Was this page helpful?