AlphaAlpha Docs

Notification

API calls concerning notifications

Create notification

POST
/notifications
AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "http://localhost:18080/api/v1/notifications" \  -H "Content-Type: application/json" \  -d '{    "body": "string",    "category": "ERP",    "notificationType": "ALERT",    "sender": "string",    "title": "string",    "username": "string"  }'
{
  "actionUrl": "string",
  "body": "string",
  "category": "ERP",
  "created": "2019-08-24T14:15:22Z",
  "emailSent": true,
  "emailSentAt": "2019-08-24T14:15:22Z",
  "id": "string",
  "isRead": true,
  "metadata": {
    "property1": null,
    "property2": null
  },
  "notificationType": "ALERT",
  "read": true,
  "scope": "string",
  "sender": "string",
  "tenantId": "string",
  "title": "string",
  "updated": "2019-08-24T14:15:22Z",
  "updatedBy": "string",
  "userId": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}

Delete by list of ids in current tenant

DELETE
/notifications
AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

curl -X DELETE "http://localhost:18080/api/v1/notifications" \  -H "Content-Type: application/json" \  -d '[    "string"  ]'
Empty
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}

Find by list of ids in current tenant

GET
/notifications/find
AuthorizationBearer <token>

In: header

Query Parameters

ids*array<>

Response Body

application/json

application/json

application/json

application/json

curl -X GET "http://localhost:18080/api/v1/notifications/find?ids=string"
[
  {
    "actionUrl": "string",
    "body": "string",
    "category": "ERP",
    "created": "2019-08-24T14:15:22Z",
    "emailSent": true,
    "emailSentAt": "2019-08-24T14:15:22Z",
    "id": "string",
    "isRead": true,
    "metadata": {
      "property1": null,
      "property2": null
    },
    "notificationType": "ALERT",
    "read": true,
    "scope": "string",
    "sender": "string",
    "tenantId": "string",
    "title": "string",
    "updated": "2019-08-24T14:15:22Z",
    "updatedBy": "string",
    "userId": "string"
  }
]
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}

Find all for current tenant

GET
/notifications/find-all
AuthorizationBearer <token>

In: header

Response Body

application/json

application/json

application/json

application/json

curl -X GET "http://localhost:18080/api/v1/notifications/find-all"
[
  {
    "actionUrl": "string",
    "body": "string",
    "category": "ERP",
    "created": "2019-08-24T14:15:22Z",
    "emailSent": true,
    "emailSentAt": "2019-08-24T14:15:22Z",
    "id": "string",
    "isRead": true,
    "metadata": {
      "property1": null,
      "property2": null
    },
    "notificationType": "ALERT",
    "read": true,
    "scope": "string",
    "sender": "string",
    "tenantId": "string",
    "title": "string",
    "updated": "2019-08-24T14:15:22Z",
    "updatedBy": "string",
    "userId": "string"
  }
]
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}

Find by id in current tenant

GET
/notifications/find/{id}
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Response Body

application/json

application/json

application/json

application/json

curl -X GET "http://localhost:18080/api/v1/notifications/find/string"
{
  "actionUrl": "string",
  "body": "string",
  "category": "ERP",
  "created": "2019-08-24T14:15:22Z",
  "emailSent": true,
  "emailSentAt": "2019-08-24T14:15:22Z",
  "id": "string",
  "isRead": true,
  "metadata": {
    "property1": null,
    "property2": null
  },
  "notificationType": "ALERT",
  "read": true,
  "scope": "string",
  "sender": "string",
  "tenantId": "string",
  "title": "string",
  "updated": "2019-08-24T14:15:22Z",
  "updatedBy": "string",
  "userId": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}

Mark all notifications as read

POST
/notifications/mark-all-read
AuthorizationBearer <token>

In: header

Response Body

application/json

application/json

application/json

application/json

curl -X POST "http://localhost:18080/api/v1/notifications/mark-all-read"
{
  "property1": 0,
  "property2": 0
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}

Mark notifications as read

POST
/notifications/mark-read
AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "http://localhost:18080/api/v1/notifications/mark-read" \  -H "Content-Type: application/json" \  -d '[    "string"  ]'
[
  {
    "actionUrl": "string",
    "body": "string",
    "category": "ERP",
    "created": "2019-08-24T14:15:22Z",
    "emailSent": true,
    "emailSentAt": "2019-08-24T14:15:22Z",
    "id": "string",
    "isRead": true,
    "metadata": {
      "property1": null,
      "property2": null
    },
    "notificationType": "ALERT",
    "read": true,
    "scope": "string",
    "sender": "string",
    "tenantId": "string",
    "title": "string",
    "updated": "2019-08-24T14:15:22Z",
    "updatedBy": "string",
    "userId": "string"
  }
]
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}

Get notifications

GET
/notifications/me
AuthorizationBearer <token>

In: header

Query Parameters

pageNumber?integer
Formatint32
pageSize?integer
Formatint32
category?string
Value in"ERP" | "CRM" | "HR" | "SYSTEM"

Response Body

application/json

application/json

application/json

application/json

curl -X GET "http://localhost:18080/api/v1/notifications/me"
{
  "content": [
    {
      "actionUrl": "string",
      "body": "string",
      "category": "ERP",
      "created": "2019-08-24T14:15:22Z",
      "emailSent": true,
      "emailSentAt": "2019-08-24T14:15:22Z",
      "id": "string",
      "isRead": true,
      "metadata": {
        "property1": null,
        "property2": null
      },
      "notificationType": "ALERT",
      "read": true,
      "scope": "string",
      "sender": "string",
      "tenantId": "string",
      "title": "string",
      "updated": "2019-08-24T14:15:22Z",
      "updatedBy": "string",
      "userId": "string"
    }
  ],
  "empty": true,
  "first": true,
  "last": true,
  "number": 0,
  "numberOfElements": 0,
  "pageable": {
    "offset": 0,
    "pageNumber": 0,
    "pageSize": 0,
    "paged": true,
    "sort": {
      "empty": true,
      "sorted": true,
      "unsorted": true
    },
    "unpaged": true
  },
  "size": 0,
  "sort": {
    "empty": true,
    "sorted": true,
    "unsorted": true
  },
  "totalElements": 0,
  "totalPages": 0
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}

Get page by page number and size with optional sorting based on field to sortBy and direction

GET
/notifications/page
AuthorizationBearer <token>

In: header

Query Parameters

pageNumber?integer
Formatint32
pageSize?integer
Formatint32
sortBy?string
direction?string
Value in"ASC" | "DESC"
search?string

Response Body

application/json

application/json

application/json

application/json

curl -X GET "http://localhost:18080/api/v1/notifications/page"
{
  "content": [
    {
      "actionUrl": "string",
      "body": "string",
      "category": "ERP",
      "created": "2019-08-24T14:15:22Z",
      "emailSent": true,
      "emailSentAt": "2019-08-24T14:15:22Z",
      "id": "string",
      "isRead": true,
      "metadata": {
        "property1": null,
        "property2": null
      },
      "notificationType": "ALERT",
      "read": true,
      "scope": "string",
      "sender": "string",
      "tenantId": "string",
      "title": "string",
      "updated": "2019-08-24T14:15:22Z",
      "updatedBy": "string",
      "userId": "string"
    }
  ],
  "empty": true,
  "first": true,
  "last": true,
  "number": 0,
  "numberOfElements": 0,
  "pageable": {
    "offset": 0,
    "pageNumber": 0,
    "pageSize": 0,
    "paged": true,
    "sort": {
      "empty": true,
      "sorted": true,
      "unsorted": true
    },
    "unpaged": true
  },
  "size": 0,
  "sort": {
    "empty": true,
    "sorted": true,
    "unsorted": true
  },
  "totalElements": 0,
  "totalPages": 0
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}

Get unread count

GET
/notifications/unread-count
AuthorizationBearer <token>

In: header

Response Body

application/json

application/json

application/json

application/json

curl -X GET "http://localhost:18080/api/v1/notifications/unread-count"
{
  "count": 0
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}

Delete by id in current tenant

DELETE
/notifications/{id}
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Response Body

application/json

application/json

application/json

curl -X DELETE "http://localhost:18080/api/v1/notifications/string"
Empty
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}