Print Job Event
Job events are related to print job activity, they can be used to be notified when a device begins handling a job from the print queue, and when it has printed or in case an error occurs.
Printing Started "requested"
The requested
sub-type is used to let you know when a device has requested a print job from the service for printing. Usually this will be followed shortly by a completed
event when the print job has successfully finished printing the job.
Example JSON event data:
{
"EventType": "job",
"SubType": "requested",
"DeviceGroup": {
"Path": "dgrp",
"Name": "Demo Group"
},
"Device": {
"Mac": "001C62030846",
"Name": "Demonstration mC-Print2",
"AppID": "e9442f5f"
},
"EventData": {
"JobName": "Welcome",
"RequestedMediaType": "application/vnd.star.starprnt"
}
}
Field | Description |
---|---|
JobName | Is the name of the print job, if one has been assigned, which you can specify when sending the job to the service. |
RequestedMediaType | Is the print job format that the CloudPRNT device requested for the print job. The starprinter.online service will manage conversion of the print job from the source data format, to the format requested by the printer. |
Printing Completed "completed"
When a printer has completed printing a job successfully, then a job
type event with completed
sub-type will be issued.
Example JSON event data:
{
"EventType": "job",
"SubType": "completed",
"DeviceGroup": {
"Path": "dgrp",
"Name": "Demo Group"
},
"Device": {
"Mac": "001C62030846",
"Name": "Demonstration mC-Print2",
"AppID": "e9442f5f"
},
"EventData": {
"Code": 200,
"CodeDescription": "OK",
"JobName": "Welcome"
}
}
Field | Description |
---|---|
Code | The CloudPRNT job completion code. Refer to the CloudPRNT specification for details of status codes. |
CodeDescription | A description of the code meaning, useful for logging. |
JobName | Is the name of the print job, if one has been assigned, which you can specify when sending the job to the service. |
Printing Unable to Complete "failed"
When a printer has attempted to print a job, but was unable to complete it, then a job
type event with failed
sub-type will be issued. This follows the same structure as a completed
event.
Note that most CloudPRNT devices will retry to print a job in case of non-fatal errors, such as the cover being opened. In this case it will not report "failure" to the service, but will issue another requested
event to resume printing after the non-fatal event has cleared.
Example JSON event data:
{
"EventType": "job",
"SubType": "completed",
"DeviceGroup": {
"Path": "dgrp",
"Name": "Demo Group"
},
"Device": {
"Mac": "001C62030846",
"Name": "Demonstration mC-Print2",
"AppID": "e9442f5f"
},
"EventData": {
"Code": 520,
"CodeDescription": "Timeout",
"JobName": "Welcome"
}
}
Field | Description |
---|---|
Code | The CloudPRNT job completion code. Refer to the CloudPRNT specification for details of status codes. |
CodeDescription | A description of the code meaning, useful for logging. |
JobName | Is the name of the print job, if one has been assigned, which you can specify when sending the job to the service. |