Web notifications

Web notifications is the resource representing a user's notification

Retrieve notifications matching the query.

Facts

Rate limit Tier 1 (1000 requests per minute)

Query Parameters

  • limit number

    The number of notification entries to retrieved.

  • page number

    Page number

  • read boolean

    Read status of the notification

  • resourceType string

    Filter by resource types. If passing more than 1 resource type, use comma seperated string.

  • sort string

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

    Can be one of: "+createdAt""-createdAt""+updatedAt""-updatedAt"

Responses

200

An array of notification objects

  • application/json object
    Show application/json properties
    • data array of objects
      Show data properties
      • id string
        Required
      • body string
        Required
      • meta object
        Required
      • read boolean
        Required
      • action string
      • userId string
        Required
      • spaceId string
      • tenantId string
      • createdAt string
        Required
      • spaceType string
      • updatedAt string
        Required
      • resourceId string
      • resourceType string
      • subResourceType string
    • meta object

      Notifications meta data

      Show meta properties
      • unreadCount number

        The total number of unread notification.

    • links object

      Notifications links

      Show links properties
      • next object
        Show next properties
        • href string
      • prev object
        Show prev properties
        • href string
      • self object
        Show self properties
        • href string

400

Invalid request parameters for querying users.

  • application/json object

    A representation of the errors encountered from the HTTP request.

    Show application/json properties
    • errors array of objects

      An error object.

      Show errors properties
      • code string
        Required

        The error code.

      • title string
        Required

        Summary of the problem.

      • status integer

        The HTTP status code.

      • message string

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

401

Unauthorized request.

  • application/json object

    A representation of the errors encountered from the HTTP request.

    Show application/json properties
    • errors array of objects

      An error object.

      Show errors properties
      • code string
        Required

        The error code.

      • title string
        Required

        Summary of the problem.

      • status integer

        The HTTP status code.

      • message string

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

500

Internal server error

  • application/json object

    A representation of the errors encountered from the HTTP request.

    Show application/json properties
    • errors array of objects

      An error object.

      Show errors properties
      • code string
        Required

        The error code.

      • title string
        Required

        Summary of the problem.

      • status integer

        The HTTP status code.

      • message string

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

GET /api/v1/web-notifications
import { createQlikApi } from '@qlik/api'
const qlik = createQlikApi({
hostConfig: {
host: 'https://{tenant}.{region}.qlikcloud.com',
apiKey: '<access-token>',
},
})
await qlik.webNotifications.getNotifications({})
qlik web-notification ls
curl "https://{tenant}.{region}.qlikcloud.com/api/v1/web-notifications" \
-H "Authorization: Bearer <access_token>"

Example Response

{
"data": [
{
"id": "TiQ8GPVr8qI714Lp5ChAAFFaU24MJy69",
"body": "string",
"meta": {},
"read": true,
"action": "string",
"userId": "TiQ8GPVr8qI714Lp5ChAAFFaU24MJy69",
"spaceId": "TiQ8GPVr8qI714Lp5ChAAFFaU24MJy69",
"tenantId": "TiQ8GPVr8qI714Lp5ChAAFFaU24MJy69",
"createdAt": "string",
"spaceType": "string",
"updatedAt": "string",
"resourceId": "string",
"resourceType": "string",
"subResourceType": "string"
}
],
"meta": {
"unreadCount": 0
},
"links": {
"next": {
"href": "string"
},
"prev": {
"href": "string"
},
"self": {
"href": "string"
}
}
}

Retrieve a single notification by Id.

Facts

Rate limit Tier 1 (1000 requests per minute)

Path Parameters

  • notificationId string
    Required

    The id of the notification to retrieve.

Responses

200

Successfully got notification.

  • application/json object
    Show application/json properties
    • id string
      Required
    • body string
      Required
    • meta object
      Required
    • read boolean
      Required
    • action string
    • userId string
      Required
    • spaceId string
    • tenantId string
    • createdAt string
      Required
    • spaceType string
    • updatedAt string
      Required
    • resourceId string
    • resourceType string
    • subResourceType string

401

Unauthorized request.

  • application/json object

    A representation of the errors encountered from the HTTP request.

    Show application/json properties
    • errors array of objects

      An error object.

      Show errors properties
      • code string
        Required

        The error code.

      • title string
        Required

        Summary of the problem.

      • status integer

        The HTTP status code.

      • message string

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

404

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

  • application/json object

    A representation of the errors encountered from the HTTP request.

    Show application/json properties
    • errors array of objects

      An error object.

      Show errors properties
      • code string
        Required

        The error code.

      • title string
        Required

        Summary of the problem.

      • status integer

        The HTTP status code.

      • message string

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

500

Internal server error

  • application/json object

    A representation of the errors encountered from the HTTP request.

    Show application/json properties
    • errors array of objects

      An error object.

      Show errors properties
      • code string
        Required

        The error code.

      • title string
        Required

        Summary of the problem.

      • status integer

        The HTTP status code.

      • message string

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

GET /api/v1/web-notifications/{notificationId}
import { createQlikApi } from '@qlik/api'
const qlik = createQlikApi({
hostConfig: {
host: 'https://{tenant}.{region}.qlikcloud.com',
apiKey: '<access-token>',
},
})
await qlik.webNotifications.getNotification(
'TiQ8GPVr8qI714Lp5ChAAFFaU24MJy69',
)
qlik web-notification get 'TiQ8GPVr8qI714Lp5ChAAFFaU24MJy69'
curl "https://{tenant}.{region}.qlikcloud.com/api/v1/web-notifications/{notificationId}" \
-H "Authorization: Bearer <access_token>"

Example Response

{
"id": "TiQ8GPVr8qI714Lp5ChAAFFaU24MJy69",
"body": "string",
"meta": {},
"read": true,
"action": "string",
"userId": "TiQ8GPVr8qI714Lp5ChAAFFaU24MJy69",
"spaceId": "TiQ8GPVr8qI714Lp5ChAAFFaU24MJy69",
"tenantId": "TiQ8GPVr8qI714Lp5ChAAFFaU24MJy69",
"createdAt": "string",
"spaceType": "string",
"updatedAt": "string",
"resourceId": "string",
"resourceType": "string",
"subResourceType": "string"
}

Patch a notification.

Facts

Rate limit Tier 2 (100 requests per minute)

Path Parameters

  • notificationId string
    Required

    The id of the notification to update.

Request Body

Required
  • application/json array of objects

    An array of JSON Patch documents

    Show application/json properties
    • op string
      Required

      The operation to be performed.

      Can be one of: "replace"

    • path string
      Required

      The path for the given resource field to patch.

      Can be one of: "/read"

    • value string
      Required

      The value to be used for this operation.

Responses

204

Successfully patched marked notification.

  • application/json object

    Notifications meta data

    Show application/json properties
    • unreadCount number

      The total number of unread notification.

400

Unsupported patch request.

  • application/json object

    A representation of the errors encountered from the HTTP request.

    Show application/json properties
    • errors array of objects

      An error object.

      Show errors properties
      • code string
        Required

        The error code.

      • title string
        Required

        Summary of the problem.

      • status integer

        The HTTP status code.

      • message string

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

401

Unauthorized request.

  • application/json object

    A representation of the errors encountered from the HTTP request.

    Show application/json properties
    • errors array of objects

      An error object.

      Show errors properties
      • code string
        Required

        The error code.

      • title string
        Required

        Summary of the problem.

      • status integer

        The HTTP status code.

      • message string

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

404

Notification not found.

  • application/json object

    A representation of the errors encountered from the HTTP request.

    Show application/json properties
    • errors array of objects

      An error object.

      Show errors properties
      • code string
        Required

        The error code.

      • title string
        Required

        Summary of the problem.

      • status integer

        The HTTP status code.

      • message string

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

500

Internal server error

  • application/json object

    A representation of the errors encountered from the HTTP request.

    Show application/json properties
    • errors array of objects

      An error object.

      Show errors properties
      • code string
        Required

        The error code.

      • title string
        Required

        Summary of the problem.

      • status integer

        The HTTP status code.

      • message string

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

PATCH /api/v1/web-notifications/{notificationId}
import { createQlikApi } from '@qlik/api'
const qlik = createQlikApi({
hostConfig: {
host: 'https://{tenant}.{region}.qlikcloud.com',
apiKey: '<access-token>',
},
})
await qlik.webNotifications.patchNotification(
'TiQ8GPVr8qI714Lp5ChAAFFaU24MJy69',
[
{
op: 'replace',
path: '/read',
value: 'true',
},
],
)
qlik web-notification patch 'TiQ8GPVr8qI714Lp5ChAAFFaU24MJy69' \
--op 'replace' \
--path '/read' \
--value 'true'
curl "https://{tenant}.{region}.qlikcloud.com/api/v1/web-notifications/{notificationId}" \
-X PATCH \
-H "Content-type: application/json" \
-H "Authorization: Bearer <access_token>" \
-d '[{"op":"replace","path":"/read","value":true}]'

Example Response

{
"unreadCount": 0
}

Delete a notification.

Facts

Rate limit Tier 2 (100 requests per minute)

Path Parameters

  • notificationId string
    Required

    The id of the notification to delete.

Responses

204

Successfully deleted notification.

  • application/json object

    Notifications meta data

    Show application/json properties
    • unreadCount number

      The total number of unread notification.

401

Unauthorized request.

  • application/json object

    A representation of the errors encountered from the HTTP request.

    Show application/json properties
    • errors array of objects

      An error object.

      Show errors properties
      • code string
        Required

        The error code.

      • title string
        Required

        Summary of the problem.

      • status integer

        The HTTP status code.

      • message string

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

404

Notification not found.

  • application/json object

    A representation of the errors encountered from the HTTP request.

    Show application/json properties
    • errors array of objects

      An error object.

      Show errors properties
      • code string
        Required

        The error code.

      • title string
        Required

        Summary of the problem.

      • status integer

        The HTTP status code.

      • message string

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

500

Internal server error

  • application/json object

    A representation of the errors encountered from the HTTP request.

    Show application/json properties
    • errors array of objects

      An error object.

      Show errors properties
      • code string
        Required

        The error code.

      • title string
        Required

        Summary of the problem.

      • status integer

        The HTTP status code.

      • message string

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

DELETE /api/v1/web-notifications/{notificationId}
import { createQlikApi } from '@qlik/api'
const qlik = createQlikApi({
hostConfig: {
host: 'https://{tenant}.{region}.qlikcloud.com',
apiKey: '<access-token>',
},
})
await qlik.webNotifications.deleteNotification(
'TiQ8GPVr8qI714Lp5ChAAFFaU24MJy69',
)
qlik web-notification rm 'TiQ8GPVr8qI714Lp5ChAAFFaU24MJy69'
curl "https://{tenant}.{region}.qlikcloud.com/api/v1/web-notifications/{notificationId}" \
-X DELETE \
-H "Authorization: Bearer <access_token>"

Example Response

{
"unreadCount": 0
}

Patch all notifications.

Facts

Rate limit Tier 2 (100 requests per minute)

Request Body

Required
  • application/json array of objects

    An array of JSON Patch documents

    Show application/json properties
    • op string
      Required

      The operation to be performed.

      Can be one of: "replace"

    • path string
      Required

      The path for the given resource field to patch.

      Can be one of: "/read"

    • value string
      Required

      The value to be used for this operation.

Responses

204

Successfully marked all notification.

  • application/json object

    Notifications meta data

    Show application/json properties
    • unreadCount number

      The total number of unread notification.

400

Unsupported patch request.

  • application/json object

    A representation of the errors encountered from the HTTP request.

    Show application/json properties
    • errors array of objects

      An error object.

      Show errors properties
      • code string
        Required

        The error code.

      • title string
        Required

        Summary of the problem.

      • status integer

        The HTTP status code.

      • message string

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

401

Unauthorized request.

  • application/json object

    A representation of the errors encountered from the HTTP request.

    Show application/json properties
    • errors array of objects

      An error object.

      Show errors properties
      • code string
        Required

        The error code.

      • title string
        Required

        Summary of the problem.

      • status integer

        The HTTP status code.

      • message string

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

500

Internal server error

  • application/json object

    A representation of the errors encountered from the HTTP request.

    Show application/json properties
    • errors array of objects

      An error object.

      Show errors properties
      • code string
        Required

        The error code.

      • title string
        Required

        Summary of the problem.

      • status integer

        The HTTP status code.

      • message string

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

PATCH /api/v1/web-notifications/all
import { createQlikApi } from '@qlik/api'
const qlik = createQlikApi({
hostConfig: {
host: 'https://{tenant}.{region}.qlikcloud.com',
apiKey: '<access-token>',
},
})
await qlik.webNotifications.patchNotifications([
{ op: 'replace', path: '/read', value: 'true' },
])
qlik web-notification patch-all \
--op 'replace' \
--path '/read' \
--value 'true'
curl "https://{tenant}.{region}.qlikcloud.com/api/v1/web-notifications/all" \
-X PATCH \
-H "Content-type: application/json" \
-H "Authorization: Bearer <access_token>" \
-d '[{"op":"replace","path":"/read","value":true}]'

Example Response

{
"unreadCount": 0
}

Delete all notifications.

Facts

Rate limit Tier 2 (100 requests per minute)

Responses

204

Successfully deleted notification.

  • application/json object

    Notifications meta data

    Show application/json properties
    • unreadCount number

      The total number of unread notification.

401

Unauthorized request.

  • application/json object

    A representation of the errors encountered from the HTTP request.

    Show application/json properties
    • errors array of objects

      An error object.

      Show errors properties
      • code string
        Required

        The error code.

      • title string
        Required

        Summary of the problem.

      • status integer

        The HTTP status code.

      • message string

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

500

Internal server error

  • application/json object

    A representation of the errors encountered from the HTTP request.

    Show application/json properties
    • errors array of objects

      An error object.

      Show errors properties
      • code string
        Required

        The error code.

      • title string
        Required

        Summary of the problem.

      • status integer

        The HTTP status code.

      • message string

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

DELETE /api/v1/web-notifications/all
import { createQlikApi } from '@qlik/api'
const qlik = createQlikApi({
hostConfig: {
host: 'https://{tenant}.{region}.qlikcloud.com',
apiKey: '<access-token>',
},
})
await qlik.webNotifications.deleteNotifications()
qlik web-notification delete-all
curl "https://{tenant}.{region}.qlikcloud.com/api/v1/web-notifications/all" \
-X DELETE \
-H "Authorization: Bearer <access_token>"

Example Response

{
"unreadCount": 0
}