Print Beat API - Jobs context

The Documentation below provides a list of Print Beat API - Jobs context endpoint and their capabilities. 

PrintOS Connector Role:

Jobs Enquiries - Access Job Print Attempts for supported devices

Markers and paging through data:

When polling for data across all existing jobs you will commonly receive more data than what is allowed in the current response size. In this case, you will need to "page" through data by making additional API calls with a startMarker query string.

PrintOS Print Beat Jobs sorts jobs from "oldest" to "newest" based on a marker value that was assigned to that record.  The marker of a record can be passed to the API as an anchor to get the next page of records after (or before) that marker.  When paging through the results, the marker value in the last record returned by the previous call should be used as the 'startMarker' parameter in the next request.  

To search from "newest" to "oldest" set the direction query parameter to "backward".  

The maximum number of items returned in the response is 100. This sets the "page" size of each response.

 

Method for calling Jobs data:

To keep an up to date view of the current jobs in your environment the following steps are recommended for maintaining a near-real time view of the current state of jobs.

  1. Identify the data you are interested in, and make the appropriate query through the API.  If the job data you are asking for is more than can be returned in a single call (The current limit is 100 jobs), you will need to make multiple queries.  It will be necessary to make multiple calls (effectively paging through the job data) until all of the data requested is received.
    • When the last "page" of data is retrieved (number of records returned is less than limit size), the largest marker value should be saved for additional queries
  2. Once you have made the initial set of calls to retrieve the job data, you will need to make regular poling calls to retrieve any updates or newer job data
    • This will be the same API call but with a startMarker query value set to the previously stored marker value.  This ensures that you are only getting jobs that have been updated since your last query.
    • Regular poling update intervals should be kept relatively infrequent (~ every 1 minute).  Due to the Jobs service design you will not gain much benefit to querying more frequently and you could run into limits on call rates.
    • Based on interval time and number of jobs being processed you will typically not need more than one "page" of data to find updates, but it may be necessary to send additional calls for high volume updates.
    • Again, save off the last marker value from this query to use as the startMarker for the next query.

 

Times in the Jobs API 

Times Reported by Devices: 

Data is supplied through an event channel originating from the press.  All data sources will report times (submit time, complete time, print start time, print end time, etc.) in an ISO-8601 standard format, but without a time zone.  The date and time represents the device's local time.

Job Example:
        {
            "pressSerialNumber": "60000000",
            "jobName": "Job 52493187",
            "siteName": null,
            "copies": 103,
            "impressions": 618,
            "printedSheets": 103,
            "jobSubmitTime": "2023-07-01T03:32:54.000+00:00",
            "jobCompleteTime": "2023-07-01T03:35:25.000+00:00",
            "epmImpressions": 618,
            "width": 640,
            "useOfVDP": "No",
            "printedJobId": "60000000_5191561_1688166144000_1688166144000",
            "height": 450.0,
            "deviceId": "35e3ab74-8d30-4fff-91c9-b64487cfa7b1",
            "marker": 33247014,
            "repeatLength": 0,
            "impressionsType": "B2",
            "duplex": true,
            "oneShotImpressions": 0,
            "impressions1Color": 0,
            "impressions2Colors": 0,
            "impressionsNColors": 0,
            "inkUnits": "IMPRESSIONS",
            "jobElapseTime": 151,
            "jobProgress": "PRINTED",
            "jobCollation": null,
            "substrateUnits": {
                "value": "103",
                "unit": "SHEETS"
            },
            "substrates": [
                {
                    "name": "350 Silk SRA2",
                    "amountUsed": 103
                }
            ],
            "inks": [
                {
                    "color": "Yellow",
                    "amountUsed": 206,
                    "inkSerialNumber": "EGY2Y384534.750275"
                },
                {
                    "color": "Cyan",
                    "amountUsed": 206,
                    "inkSerialNumber": "EGC2X354034.750330"
                },
                {
                    "color": "Magenta",
                    "amountUsed": 206,
                    "inkSerialNumber": "EGM2Y370034.750271"
                }
            ]
        },