Added notificaiton model

This commit is contained in:
Nedim
2023-10-09 18:23:44 +02:00
parent 00d15ebe7e
commit abe79e5556
8 changed files with 249 additions and 10 deletions

View File

@@ -610,6 +610,95 @@
}
]
},
{
"name": "Get Notifications",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{URL}}/notifications?user_id=1&time=1656192796",
"host": [
"{{URL}}"
],
"path": [
"notifications"
],
"query": [
{
"key": "user_id",
"value": "1"
},
{
"key": "time",
"value": "1656192796"
}
]
}
},
"response": [
{
"name": "Get Notifications",
"originalRequest": {
"method": "GET",
"header": [],
"url": {
"raw": "{{URL}}/notifications?user_id=1&time=1656192796",
"host": [
"{{URL}}"
],
"path": [
"notifications"
],
"query": [
{
"key": "user_id",
"value": "1"
},
{
"key": "time",
"value": "1656192796"
}
]
}
},
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Access-Control-Allow-Credentials",
"value": "true"
},
{
"key": "Access-Control-Allow-Headers",
"value": "Content-Type, Content-Length, Accept-Encoding, X-CSRF-Token, Authorization, accept, origin, Cache-Control, X-Requested-With"
},
{
"key": "Access-Control-Allow-Methods",
"value": "POST, OPTIONS, GET, PUT"
},
{
"key": "Access-Control-Allow-Origin",
"value": "*"
},
{
"key": "Content-Type",
"value": "application/json; charset=utf-8"
},
{
"key": "Date",
"value": "Mon, 16 Oct 2023 11:10:37 GMT"
},
{
"key": "Content-Length",
"value": "554"
}
],
"cookie": [],
"body": "{\n \"data\": [\n {\n \"type\": \"warning\",\n \"title\": \"Contract 4587347502\",\n \"message\": \"Temperature anomaly detected\",\n \"datetime\": \"2023-09-13T08:36:41.742294+02:00\"\n },\n {\n \"type\": \"warning\",\n \"title\": \"Contract 4587347502\",\n \"message\": \"Temperature anomaly detected\",\n \"datetime\": \"2023-09-13T08:36:41.742294+02:00\"\n },\n {\n \"type\": \"warning\",\n \"title\": \"Contract 4587347502\",\n \"message\": \"Temperature anomaly detected\",\n \"datetime\": \"2023-09-13T08:36:41.742294+02:00\"\n },\n {\n \"type\": \"warning\",\n \"title\": \"Contract 4587347502\",\n \"message\": \"Temperature anomaly detected\",\n \"datetime\": \"2022-09-13T08:36:41.742294+02:00\"\n }\n ]\n}"
}
]
},
{
"name": "Save device info",
"request": {