Notification

Get notifications by name - json

Notifications are generated by the system after certain types of events, such as errors or the generation of new faces. They are generated to notify the user about the processing status. Notifications are automatically deleted after 600 seconds from their creation.

Notification after errors:

name = "error"
data = {
'tasks':"activity where the error occured",
'msg':"error message"
}

Notifications after new generations:

name = "new_generation"
data = {
'task':'gen_v3', # Internal string to identify the type of task performed (string)
'msg':'done', # Message for the user. Useful to read error messages. (string)
'id_image': '100055d5nAgtDCOP2ZUrBChe1aGyZ5UAmqsrJb229WU5tRewRFybYGnYa9iiRJ8OUsooPa', # Identifies the code of the processed image (string)
'address': '100055d5nAgtDCOP2ZUrBChe1aGyZ5UAmqsrJb229WU5tRewRFybYGnYa9iiRJ8OUsooPa', # Same content as in id_image
'face_list':[0], # Represent a list, with inside the index of the face (list of integer numbers)
'f':0,  # Represent the index of the processed face (integer number)
'g':0 # index of the generated face (integer number) --> Represent the index of the face generated (integer number)
'link':'https://...' # Represent the link to the generated image (string)
}

Notifications after upscaling:

name = "superid"
data = {
'id_image': 'XGRX', # Identifies the code of the processed image (string)
'id_project': 'XYZ', # Identifies the code of the project (string)
'link':'https://...' # Represent the link to the generated image (string)
}
POST
/api/notification_by_name_json
AuthorizationBearer <token>

In: header

name_list?string
id_image?string
id_task?string

Response Body

Examples

curl -X POST "https://api.piktid.com/api/notification_by_name_json" \
  -H "Content-Type: application/json" \
  -d '{}'
{
  "notifications_list": [
    {
      "id": 0,
      "name": "string",
      "timestamp": 0,
      "data": {
        "property1": null,
        "property2": null
      }
    }
  ]
}
Empty
Empty
Empty