Omniplex Docs

Alerts

These API endpoints are related to user alerts on IBL

Get User Alerts

GET
/users/{id}/alerts

Gets a users alerts.

All alerts are also sent via push notifications if the user has subscribed to them.

Authorization

User
headerUser-Auth<token>

Requires a user token. Should be prefixed with User in Authorization header.

Path Parameters

id*string

User ID

Query Parameters

page?string

The page number

Response Body

Success

application/json
  1. response
count?integer
Range0 <= value <= 18446744073709552000
per_page?integer
Range0 <= value <= 18446744073709552000
results?
Example Request
curl -X GET 'https://spider.omniplex.gg/users/string/alerts'
Example Response
{  "count": 0,  "per_page": 0,  "results": {    "alerts": [      {        "acked": true,        "alert_data": {          "property1": null,          "property2": null        },        "category": "string",        "created_at": "2019-08-24T14:15:22Z",        "icon": "string",        "itag": "6b5f8e7b-1e8c-4611-b693-ee8faa950c62",        "message": "string",        "priority": "1",        "title": "string",        "type": "success",        "url": "string"      }    ],    "unacked_count": 0  }}

Patch User Alerts

PATCH
/users/{id}/alerts

Updates a set of user alerts with a given 'patch' to apply to the alert. Returns 204 on success

Authorization

User
headerUser-Auth<token>

Requires a user token. Should be prefixed with User in Authorization header.

Path Parameters

id*string

User ID

Request Body

application/json
  1. body
patches?array<>

List of patches to apply to alerts

Response Body

Success

application/json
  1. response
context?

Context of the error. Usually used for validation error contexts

message?string

Message of the error

Example Request
curl -X PATCH 'https://spider.omniplex.gg/users/string/alerts' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "context": {    "property1": "string",    "property2": "string"  },  "message": "string"}

Delete All User Alerts

DELETE
/users/{id}/alerts

Deletes all user alerts. Returns 204 on success

Authorization

User
headerUser-Auth<token>

Requires a user token. Should be prefixed with User in Authorization header.

Path Parameters

id*string

User ID

Response Body

Success

application/json
  1. response
context?

Context of the error. Usually used for validation error contexts

message?string

Message of the error

Example Request
curl -X DELETE 'https://spider.omniplex.gg/users/string/alerts'
Example Response
{  "context": {    "property1": "string",    "property2": "string"  },  "message": "string"}
GET
/users/{id}/alerts/@featured

Gets the featured user alerts of the user.

Authorization

User
headerUser-Auth<token>

Requires a user token. Should be prefixed with User in Authorization header.

Path Parameters

id*string

User ID

Query Parameters

acked_count*string

The number of alerts to return that have been acknowledged.

unacked_count*string

The number of alerts to return that have not been acknowledged.

Response Body

Success

application/json
  1. response
acked?array<>

List of featured acknowledged alerts

unacked?array<>

List of featured unacknowledged alerts

unacked_count?integer

The number of unacknowledged alerts

Range0 <= value <= 18446744073709552000
Example Request
curl -X GET 'https://spider.omniplex.gg/users/string/alerts/@featured?acked_count=string&unacked_count=string'
Example Response
{  "acked": [    {      "acked": true,      "alert_data": {        "property1": null,        "property2": null      },      "category": "string",      "created_at": "2019-08-24T14:15:22Z",      "icon": "string",      "itag": "6b5f8e7b-1e8c-4611-b693-ee8faa950c62",      "message": "string",      "priority": "1",      "title": "string",      "type": "success",      "url": "string"    }  ],  "unacked": [    {      "acked": true,      "alert_data": {        "property1": null,        "property2": null      },      "category": "string",      "created_at": "2019-08-24T14:15:22Z",      "icon": "string",      "itag": "6b5f8e7b-1e8c-4611-b693-ee8faa950c62",      "message": "string",      "priority": "1",      "title": "string",      "type": "success",      "url": "string"    }  ],  "unacked_count": 0}

Get User Alert By Itag

GET
/users/{id}/alerts/{itag}

Gets a single user alert based on its itag. This returns an alertlist to aid with consistency.

Authorization

User
headerUser-Auth<token>

Requires a user token. Should be prefixed with User in Authorization header.

Path Parameters

id*string

User ID

itag*string

The itag of the alert

Response Body

Success

application/json
  1. response
alerts?array<>

List of alerts

unacked_count?integer

The number of unacknowledged alerts

Range0 <= value <= 18446744073709552000
Example Request
curl -X GET 'https://spider.omniplex.gg/users/string/alerts/string'
Example Response
{  "alerts": [    {      "acked": true,      "alert_data": {        "property1": null,        "property2": null      },      "category": "string",      "created_at": "2019-08-24T14:15:22Z",      "icon": "string",      "itag": "6b5f8e7b-1e8c-4611-b693-ee8faa950c62",      "message": "string",      "priority": "1",      "title": "string",      "type": "success",      "url": "string"    }  ],  "unacked_count": 0}