Skip to content

API TUTORIAL – REPORTS ​

Intro ​

The bulk_launch endpoint takes a list of report payloads and creates one report per payload. Each report belongs to a project: pass its project uuid, or a project_name (and super_project) to use an existing project with that name or create it.

The flow to obtain the report will be:

  1. Post the report payloads and receive the UUIDs of the created report objects.
  2. Check the status of each report every few seconds until it is ready.
  3. Once ready, use the presigned URL to download the file from Google Cloud Storage.

Post reports ​

The payload objects hold almost the same information the web interface sends when it creates a report. Each report type adds some information of its own to the meta field.

Parts reports (like BoMs, machine files for parts, ...) can be selected either by a list of assembly uuids in selected_assemblies, or by part batches: set meta.select_by_part_batches to true and list the part batch uuids in meta.part_batches.

Panel reports (like MOB2 files) have to be selected by the list of selected_assemblies.

Endpoint: https://back.produuz.it/api/v2/reports/bulk_launch/

  • Method: POST.
  • Request Body: List of payloads.
  • Response: 201 with the list of created report objects in reports.

Example Request Payload

json
[
  {
    "name": "my-test",
    "document_type": "panel_mob2",
    "project": "461f7d25-dea3-46b1-b908-5dd187e09ea0", // Direct project picking
    "project_name": "my_project_name", // If no uuid, you can provide a name for an existent or new project.
    "super_project": "my_project_folder", // If no uuid, you can provide a super_project name.
    "selected_assemblies": [
      "uuid-of-an-assembly"
      // ...
    ],
    "meta": {
      "production_line_uuid": "uuid-of-the-production-line", // Always needed for mob files
      "action_uuid": "uuid-of-the-mob-file-action", // Only needed for auto_mob2
      "fill_mob2_defaults": true, // For auto mob defaults filling
      "part_batches": []
    }
  },
  {
    //... another report payload
  },
  {
    //... another report payload
  }
]
[
  {
    "name": "my-test",
    "document_type": "panel_mob2",
    "project": "461f7d25-dea3-46b1-b908-5dd187e09ea0", // Direct project picking
    "project_name": "my_project_name", // If no uuid, you can provide a name for an existent or new project.
    "super_project": "my_project_folder", // If no uuid, you can provide a super_project name.
    "selected_assemblies": [
      "uuid-of-an-assembly"
      // ...
    ],
    "meta": {
      "production_line_uuid": "uuid-of-the-production-line", // Always needed for mob files
      "action_uuid": "uuid-of-the-mob-file-action", // Only needed for auto_mob2
      "fill_mob2_defaults": true, // For auto mob defaults filling
      "part_batches": []
    }
  },
  {
    //... another report payload
  },
  {
    //... another report payload
  }
]

Example Response Payload

json
{
  "status": "successfully_enqueued",
  "reports": [
    {
      "uuid": "aa29c0b0-eb1a-4861-b5cc-e6c86a3bd665",
      "created": "2025-08-19T12:34:13.783598Z",
      "modified": "2025-08-19T12:34:13.783609Z",
      "name": "my-test",
      "username": "dev_fede",
      "document_status": "waiting",
      "document_type": "panel_mob2",
      "project": "461f7d25-dea3-46b1-b908-5dd187e09ea0",
      "meta": {
        "part_batches": [],
        "dynamic_forms": {
          /// This is automatically filled in this case for mob2 files.
        },
        "fill_mob2_defaults": true,
        "production_line_uuid": "uuid-of-the-production-line"
      },
      "selected_assemblies": [
        "uuid-of-an-assembly"
        // ...
      ],
      "selected_assembly_designs": [],
      "selected_modules": [],
      "selected_module_designs": [],
      "files": [
        {
          "uuid": "4599a741-79d9-4b23-b53d-2c6e1ca82507",
          "created": "2025-08-19T12:34:14.703943Z",
          "name": "waiting",
          "short_name": "waiting",
          "meta": {
            "status": "waiting",
            "version": 0
          },
          "cloud_folder": "461f7d25-dea3-46b1-b908-5dd187e09ea0/reports/aa29c0b0-eb1a-4861-b5cc-e6c86a3bd665/versions/0",
          "presigned_url": "https://example.file",
          "hash": ""
        }
      ],
      "last_file": {
        "uuid": "4599a741-79d9-4b23-b53d-2c6e1ca82507",
        "created": "2025-08-19T12:34:14.703943Z",
        "name": "waiting",
        "short_name": "waiting",
        "meta": {
          "status": "waiting",
          "version": 0
        },
        "cloud_folder": "461f7d25-dea3-46b1-b908-5dd187e09ea0/reports/aa29c0b0-eb1a-4861-b5cc-e6c86a3bd665/versions/0",
        "presigned_url": "https://example.file",
        "hash": ""
      }
    },
    {}, // Another report object
    {} // Another report object
  ]
}
{
  "status": "successfully_enqueued",
  "reports": [
    {
      "uuid": "aa29c0b0-eb1a-4861-b5cc-e6c86a3bd665",
      "created": "2025-08-19T12:34:13.783598Z",
      "modified": "2025-08-19T12:34:13.783609Z",
      "name": "my-test",
      "username": "dev_fede",
      "document_status": "waiting",
      "document_type": "panel_mob2",
      "project": "461f7d25-dea3-46b1-b908-5dd187e09ea0",
      "meta": {
        "part_batches": [],
        "dynamic_forms": {
          /// This is automatically filled in this case for mob2 files.
        },
        "fill_mob2_defaults": true,
        "production_line_uuid": "uuid-of-the-production-line"
      },
      "selected_assemblies": [
        "uuid-of-an-assembly"
        // ...
      ],
      "selected_assembly_designs": [],
      "selected_modules": [],
      "selected_module_designs": [],
      "files": [
        {
          "uuid": "4599a741-79d9-4b23-b53d-2c6e1ca82507",
          "created": "2025-08-19T12:34:14.703943Z",
          "name": "waiting",
          "short_name": "waiting",
          "meta": {
            "status": "waiting",
            "version": 0
          },
          "cloud_folder": "461f7d25-dea3-46b1-b908-5dd187e09ea0/reports/aa29c0b0-eb1a-4861-b5cc-e6c86a3bd665/versions/0",
          "presigned_url": "https://example.file",
          "hash": ""
        }
      ],
      "last_file": {
        "uuid": "4599a741-79d9-4b23-b53d-2c6e1ca82507",
        "created": "2025-08-19T12:34:14.703943Z",
        "name": "waiting",
        "short_name": "waiting",
        "meta": {
          "status": "waiting",
          "version": 0
        },
        "cloud_folder": "461f7d25-dea3-46b1-b908-5dd187e09ea0/reports/aa29c0b0-eb1a-4861-b5cc-e6c86a3bd665/versions/0",
        "presigned_url": "https://example.file",
        "hash": ""
      }
    },
    {}, // Another report object
    {} // Another report object
  ]
}

Report types ("document_type" field) ​

You can select from a list of document types (BoMs, machine files, ...). Some of them need a production line (meta.production_line_uuid), others a machine (meta.machine_uuid). GET https://back.produuz.it/api/v2/reports/document_types/ returns the current list with its labels.

document_typeDescriptionNeeds PLNeeds machine
plates_bomPlates BoMNoNo
wood_bomWood BoMNoNo
designs_bomPer-Design BoMNoNo
accesories_bomAccesories BoMNoNo
custom_bomCustom BoMNoNo
qr_stickersQR StickersNoNo
rack_load_stickersRack Load StickersNoNo
production_excelProduction ExcelNoNo
quality_controlQuality Control ReportNoNo
worktime_excelWorktime ExcelNoNo
issuesIssues ReportNoNo
custom_woodcsvCustom Woods CSVNoNo
custom_platecsvCustom Plates CSVNoNo
custom_accesorycsvCustom Accesories CSVNoNo
wood_btlBTL File [Woods]NoYes
wood_btlxBTLx File [Woods]NoYes
wood_bvxBVX File [Hundegger][Woods]NoYes
generic_wood_csvGeneric Wood CSVNoYes
plates_xcsXCS Maestro File [Plates]NoYes
plates_ardisArdis File [Plates]NoYes
plates_dxfDXF File [Plates]NoYes
plates_ptxPTX File [Plates]NoYes
plates_cixCIX Biesse File [Plates]NoYes
frame_mtfMTF File [Roofs]NoYes
frame_nailer_csvFrame Nails CSVNoYes
sts_steel_frame_fileSTS Steel Frame FileNoYes
frame_btlBTL File [Frame]NoNo
steel_ncDSTV .nc FileNoNo
steel_wisconWISCON WeldingNoNo
panel_mob1MOB v1 Machine FileYesNo
panel_mob2MOB v2 Machine FileYesNo
auto_mob2AUTO MOB v2 Machine FileYesNo
panel_btlxBTLx Frame File [Panel]YesNo

For panel_mob2, set the flag fill_mob2_defaults in the meta field to load the defaults from your machine setups. Otherwise you need to copy the dynamic_forms field from a real report object.

Fetch report objects ​

Once a report is created, a job is enqueued to make the actual files.

Fetch each report object every few seconds until last_file.meta.status is ready. While the file is being made it reads waiting, then working_42 (42 % done); failed means the generation failed. Once it is ready, download the file directly from Google Cloud Storage through the presigned_url of last_file.

Endpoint: https://back.produuz.it/api/v2/reports/reports/uuid-of-the-report/

  • Method: GET.

INFO

Presigned URLs expire. They are refreshed automatically, so when one has expired, fetch the report object again.