Download Monthly Reports Quick Guide

This guide will lead you through the process of creating and downloading your monthly print reports.

Prerequisite

You need an access token. Get one with the Authorization Code Flow.

Create Monthly Report

POST "https://api2.ezeep.com/reporting/reports"

Attribute Type Data Type Required Description
Authorization Header string yes Bearer {{Access Token}}
Content-Type Header string yes application/json
start body string/timestamp yes "2023-11-01" inclusive start of range
end body string/timestamp yes "2023-12-01" exclusive end of range
timestamp_offset body integer32 no 0 - difference from UTC in hours
csv_delimiter body enum/string no [ ‘,’ , ‘;’ ]
file_name_obfuscated body boolean no true
user_email_blank body boolean no true
user_name_blank body boolean no true

Example Request:

curl --location 'https://api2.ezeep.com/reporting/reports' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <access_token>' \
--data '{
    "csv_delimiter": ",",
    "end": "2023-12-01",
    "file_name_obfuscated": true,
    "start": "2023-11-01",
    "timestamp_offset": 0,
    "user_email_blank": true,
    "user_name_blank": true
}'

The response code 202 - Accepted contains a JSON object of report details:

Example Response:

{
    "report_id": "a4f213f3-ba3f-31d6-8a59-cfb342b27359",
    "created": "2023-12-04T22:02:13.0616137Z",
    "csv_delimiter": ",",
    "end": "2023-12-01",
    "file_name_obfuscated": true,
    "format": "csv",
    "start": "2023-11-01",
    "status": "pending",
    "timestamp_offset": 0,
    "user_email_blank": true,
    "user_id": "e69762f5-4156-41b3-cd62-f2394c7ac331",
    "user_name_blank": true
}

The report shall state status: pending, when created. Please continue to poll until the status is succeeded

Timestamps

Timestamps written to the report will be UTC by default unless you explicitly pass timestamp_offset (-12 to 14, e.g., 1 for Berlin in November).

timestamp_offset has no effect on which print jobs are included. To select a range in local time, pass start and end as UTC timestamps, for example November 2023 in Berlin (UTC+1):

Attribute Type Data Type Required Description
start body string/timestamp yes "2023-10-31T23:00:00Z"
end body string/timestamp yes "2023-11-30T23:00:00Z"

Check Report Status

GET "https://api2.ezeep.com/reporting/reports/<report_id>"

Attribute Type Data Type Required Description
Authorization Header string yes Bearer {{Access Token}}

Example Request:

curl --location 'https://api2.ezeep.com/reporting/reports/a4f213f3-ba3f-31d6-8a59-cfb342b27359' \
--header 'Authorization: Bearer <access_token>'

Status Code: 200 OK

Example Response:

{
    "report_id": "a4f213f3-ba3f-31d6-8a59-cfb342b27359",
    "created": "2023-12-04T22:02:13.0616137Z",
    "csv_delimiter": ",",
    "end": "2023-12-01",
    "file_name_obfuscated": true,
    "format": "csv",
    "start": "2023-11-01",
    "status": "succeeded",
    "timestamp_offset": 0,
    "user_email_blank": true,
    "user_id": "e69762f5-4156-41b3-cd62-f2394c7ac331",
    "user_name_blank": true
}

The status: "succeeded" state that report is now complete and ready to download.

The status: "failed" states that Report could not be generated due to an unexpected error. May delete and retry, or contact support. API Contact Form

Download Report

GET "https://api2.ezeep.com/reporting/reports/<report_id>/download"

Attribute Type Data Type Required Description
Authorization Header string yes Bearer {{Access Token}}

Example Request:

curl --location 'https://api2.ezeep.com/reporting/reports/a4f213f3-ba3f-31d6-8a59-cfb342b27359/download' \
--header 'Authorization: Bearer <access_token>'

Status Code: 200 OK

Example Response:

A successful response with Content-Type: text/csv shall output Columns and Rows of the report.