--- title: "Use case: Export the production protocol" slug: "datenaustausch-connect-api-uc-pm-protokoll" updated: 2026-12-02T08:12:43Z published: 2026-12-02T08:12:43Z canonical: "docs.homag.cloud/datenaustausch-connect-api-uc-pm-protokoll" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.homag.cloud/llms.txt > Use this file to discover all available pages before exploring further. # Use case: Export the production protocol **For:** Customers · Partners · Integrators The production protocol records every processed item for each workstation. Exported to your own systems, it forms the basis for production reports, audits, and detailed production analyses. ## Challenge Summary figures show how much was produced, but not exactly what happened: which program ran on which part, which board was cut, or which parts were processed again as rework. These details are needed for quality issues, audits, and process improvement, and must be retained longer than the production system keeps them. ## Solution Your integration reads each workstation's production protocol for a time window and stores it, for example in a data warehouse or BI tool. Each entry describes a processed item with its timestamp, workstation, item type, category, quantity, and associated order. Depending on the workstation, entries include additional details such as dimensions, material, or the CNC program. ## Workflow 1. Read the workstations to get their IDs. 2. For each workstation, read the production protocol for the time window since the last export. 3. Retrieve large results in pages using `take` and `skip`. 4. Store the entries and remember the end of the time window for the next export. **C#** ```csharp var from = lastExportEnd; var to = DateTime.UtcNow; const int take = 9999; var workstations = await productionManager.GetWorkstations(); foreach (var workstation in workstations ?? []) {    var skip = 0;    while (true)    {        var entries = (await productionManager.GetProductionProtocol(            workstation.Id.ToString(), from, to, take: take, skip: skip, filter: (string?)null))?.ToList() ?? [];        warehouse.Store(entries);        if (entries.Count < take) break;        skip += take;    } } lastExportEnd = to; ``` **REST** ```http # 1. Read the workstations GET /api/productionManager/workstations # 2. Read a workstation's production protocol GET /api/productionManager/workstations/19b73fda-c7b0-4394-b091-6b871b1c7c67/productionprotocol?from=2026-11-18T00:00:00Z&to=2026-11-19T00:00:00Z&take=9999&skip=0 200 OK Content-Type: application/json [  {    "type": "ProcessedPartCnc",    "workstationId": "19b73fda-c7b0-4394-b091-6b871b1c7c67",    "from": "Operator",    "timestamp": "2026-11-18T08:30:00+01:00",    "itemType": "Part",    "category": "Planned",    "identifier": "31032021091141520",    "description": "Horizontal panel",    "quantity": 1,    "orderName": "Kitchen Block A",    "orderNumber": "10003086",    "customerName": "Sample Customer",    "length": 603.4,    "width": 583.4,    "thickness": 19.0,    "material": "P2_White_19",    "programName": "Cabinet\\Horiz_s1_3.mpr",    "completedAt": "2026-11-18T08:30:00+01:00"  } ] ``` ## Understand the entries - `type` depends on the workstation and process, for example `ProcessedPartDividing`, `ProcessedPartEdgebanding`, `ProcessedPartCnc`, `ProcessedPosition`, or `ProcessedAssemblyGroup`. Each type has its own additional properties. Store unknown properties instead of discarding them. - `category` indicates whether the item was processed as `Planned`, `Rework`, or `Unplanned`. This lets you distinguish regular production from rework. - `orderNumber`, `orderName`, and `customerName` link each entry to its order without additional requests. - Sort on the server using `orderby`, for example `orderby=timestamp desc`. `filter` and `orderby` support a subset of OData syntax. ## Typical analyses - **Production report:** All items processed at each workstation during a time window, for example by day. productionManager has no shift model. For a report by shift, use the shift start and end from your own shift schedule as `from` and `to`. - **Rework rate:** Share of entries with the `Rework` category by workstation. - **CNC programs:** Number of processed parts by CNC program (`programName`). - **Audit trail:** Long-term storage of production history in your own system. ## Integration architecture Run the export as a scheduled job, for example hourly or daily, using consecutive time windows without gaps. If no time window is provided, the endpoint returns the last 14 days. Use either `daysBack` or `from`/`to`. Combining both returns `400 Bad Request`. The maximum value for `take` is `9999`. Use the technical format for exports and `format=localized` only for direct use in Excel or Power BI. ## Benefits - Complete, detailed production history in your own systems. - Rework can be analyzed separately from regular production. - A basis for audits, quality analyses, and process optimization. > **API reference:** See Endpoints → HOMAG Connect productionManager → Querying Workstations and Production Protocol ([API reference](https://connect.homag.cloud/productionmanager/#v1/tag/b11-querying-workstations-and-production-protocol)): [Get workstations](https://docs.homag.cloud/apidocs/getproductionmanagerworkstations) ([`GET /api/productionManager/workstations`](https://connect.homag.cloud/productionmanager/#v1/tag/b11-querying-workstations-and-production-protocol/GET/api/productionManager/workstations)) and [Get production protocol](https://docs.homag.cloud/apidocs/getproductionprotocol) ([`GET /api/productionManager/workstations/{workstationId}/productionprotocol`](https://connect.homag.cloud/productionmanager/#v1/tag/b11-querying-workstations-and-production-protocol/GET/api/productionManager/workstations/{workstationId}/productionprotocol)).