{
  "info": {
    "name": "Oskon DataHub API",
    "description": "REST API for the Oskon DataHub industrial data platform.\n\nUsage:\n1. Set the `baseUrl` collection variable (default http://localhost:4400).\n2. Run `Auth / Login` first — it stores the JWT into the `token` variable automatically.\n3. All other requests use `{{token}}` as a Bearer token.\n\nInteractive docs (Swagger UI): {{baseUrl}}/api/docs\nOpenAPI JSON: {{baseUrl}}/api/docs-json\n\nRoles: ADMIN (everything), OPERATOR (create/update), VIEWER (read-only).",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "variable": [
    {
      "key": "baseUrl",
      "value": "http://localhost:4400"
    },
    {
      "key": "token",
      "value": ""
    }
  ],
  "auth": {
    "type": "bearer",
    "bearer": [
      {
        "key": "token",
        "value": "{{token}}",
        "type": "string"
      }
    ]
  },
  "item": [
    {
      "name": "Auth",
      "item": [
        {
          "name": "Login",
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  "const json = pm.response.json();",
                  "if (json.token) {",
                  "  pm.collectionVariables.set('token', json.token);",
                  "  pm.test('token stored', () => pm.expect(json.token).to.be.a('string'));",
                  "}"
                ],
                "type": "text/javascript"
              }
            }
          ],
          "request": {
            "auth": {
              "type": "noauth"
            },
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/auth/login",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "auth",
                "login"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"username\": \"admin\",\n  \"password\": \"admin123\"\n}"
            }
          }
        },
        {
          "name": "Me",
          "request": {
            "method": "GET",
            "url": {
              "raw": "{{baseUrl}}/api/auth/me",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "auth",
                "me"
              ]
            }
          }
        }
      ]
    },
    {
      "name": "Users (ADMIN)",
      "item": [
        {
          "name": "List Users",
          "request": {
            "method": "GET",
            "url": {
              "raw": "{{baseUrl}}/api/users",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "users"
              ]
            }
          }
        },
        {
          "name": "Create User",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/users",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "users"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"username\": \"operator1\",\n  \"password\": \"secret123\",\n  \"fullName\": \"Line Operator\",\n  \"role\": \"OPERATOR\"\n}"
            }
          }
        },
        {
          "name": "Update User",
          "request": {
            "method": "PATCH",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/users/2",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "users",
                "2"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"role\": \"VIEWER\",\n  \"isActive\": true\n}"
            }
          }
        },
        {
          "name": "Delete User",
          "request": {
            "method": "DELETE",
            "url": {
              "raw": "{{baseUrl}}/api/users/2",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "users",
                "2"
              ]
            }
          }
        }
      ]
    },
    {
      "name": "Plants",
      "item": [
        {
          "name": "List Plants",
          "request": {
            "method": "GET",
            "url": {
              "raw": "{{baseUrl}}/api/plants",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "plants"
              ]
            }
          }
        },
        {
          "name": "Get Plant",
          "request": {
            "method": "GET",
            "url": {
              "raw": "{{baseUrl}}/api/plants/1",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "plants",
                "1"
              ]
            }
          }
        },
        {
          "name": "Create Plant",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/plants",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "plants"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"code\": \"ankara\",\n  \"name\": \"Ankara Plant\",\n  \"description\": \"Second production site\",\n  \"timezone\": \"Europe/Istanbul\"\n}"
            }
          }
        },
        {
          "name": "Update Plant",
          "request": {
            "method": "PATCH",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/plants/1",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "plants",
                "1"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"name\": \"Gebze Plant (renamed)\"\n}"
            }
          }
        },
        {
          "name": "Delete Plant",
          "request": {
            "method": "DELETE",
            "url": {
              "raw": "{{baseUrl}}/api/plants/2",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "plants",
                "2"
              ]
            }
          }
        }
      ]
    },
    {
      "name": "Machines",
      "item": [
        {
          "name": "List Machines",
          "request": {
            "method": "GET",
            "url": {
              "raw": "{{baseUrl}}/api/machines?plantId=1",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "machines"
              ],
              "query": [
                {
                  "key": "plantId",
                  "value": "1"
                }
              ]
            }
          }
        },
        {
          "name": "Get Machine",
          "request": {
            "method": "GET",
            "url": {
              "raw": "{{baseUrl}}/api/machines/1",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "machines",
                "1"
              ]
            }
          }
        },
        {
          "name": "Create Machine",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/machines",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "machines"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"plantId\": 1,\n  \"code\": \"line-02\",\n  \"name\": \"Line 02\",\n  \"machineType\": \"PRODUCTION_LINE\"\n}"
            }
          }
        },
        {
          "name": "Update Machine",
          "request": {
            "method": "PATCH",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/machines/1",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "machines",
                "1"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"name\": \"Press Line 01A\"\n}"
            }
          }
        },
        {
          "name": "Delete Machine",
          "request": {
            "method": "DELETE",
            "url": {
              "raw": "{{baseUrl}}/api/machines/2",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "machines",
                "2"
              ]
            }
          }
        }
      ]
    },
    {
      "name": "Devices",
      "item": [
        {
          "name": "List Devices (with live status)",
          "request": {
            "method": "GET",
            "url": {
              "raw": "{{baseUrl}}/api/devices",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "devices"
              ]
            }
          }
        },
        {
          "name": "Get Device (incl. adapter runtime status)",
          "request": {
            "method": "GET",
            "url": {
              "raw": "{{baseUrl}}/api/devices/1",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "devices",
                "1"
              ]
            }
          }
        },
        {
          "name": "Create Device (simulator)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/devices",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "devices"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"machineId\": 1,\n  \"code\": \"sim-plc-02\",\n  \"name\": \"Simulated PLC 02\",\n  \"deviceType\": \"PLC\",\n  \"adapterType\": \"SIMULATOR\",\n  \"pollIntervalMs\": 1000\n}"
            }
          }
        },
        {
          "name": "Create Device (Siemens S7)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/devices",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "devices"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"machineId\": 1,\n  \"code\": \"s7-1200-01\",\n  \"name\": \"Packaging PLC (S7-1200)\",\n  \"deviceType\": \"PLC\",\n  \"adapterType\": \"SIEMENS_S7\",\n  \"pollIntervalMs\": 1000,\n  \"connectionConfig\": {\n    \"host\": \"192.168.0.10\",\n    \"rack\": 0,\n    \"slot\": 1,\n    \"port\": 102\n  }\n}"
            }
          }
        },
        {
          "name": "Test Connection (lifecheck, without saving)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/devices/test-connection",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "devices",
                "test-connection"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"adapterType\": \"SIEMENS_S7\",\n  \"connectionConfig\": {\n    \"host\": \"192.168.0.10\",\n    \"rack\": 0,\n    \"slot\": 1\n  }\n}"
            }
          }
        },
        {
          "name": "Scan Tags (discover)",
          "request": {
            "method": "POST",
            "url": {
              "raw": "{{baseUrl}}/api/devices/1/scan-tags",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "devices",
                "1",
                "scan-tags"
              ]
            }
          }
        },
        {
          "name": "Create Device (MQTT ingest)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/devices",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "devices"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"machineId\": 1,\n  \"code\": \"mqtt-sensor-01\",\n  \"name\": \"MQTT Sensor Bridge\",\n  \"deviceType\": \"MQTT_SOURCE\",\n  \"adapterType\": \"MQTT\",\n  \"connectionConfig\": {\n    \"url\": \"mqtt://broker:1883\",\n    \"username\": \"\",\n    \"password\": \"\"\n  }\n}"
            }
          }
        },
        {
          "name": "Update Device",
          "request": {
            "method": "PATCH",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/devices/1",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "devices",
                "1"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"pollIntervalMs\": 2000\n}"
            }
          }
        },
        {
          "name": "Delete Device",
          "request": {
            "method": "DELETE",
            "url": {
              "raw": "{{baseUrl}}/api/devices/3",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "devices",
                "3"
              ]
            }
          }
        }
      ]
    },
    {
      "name": "Tags",
      "item": [
        {
          "name": "List Tags",
          "request": {
            "method": "GET",
            "url": {
              "raw": "{{baseUrl}}/api/tags?deviceId=1",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "tags"
              ],
              "query": [
                {
                  "key": "deviceId",
                  "value": "1"
                }
              ]
            }
          }
        },
        {
          "name": "Create Tag",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/tags",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "tags"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"deviceId\": 1,\n  \"code\": \"motor.rpm\",\n  \"name\": \"Motor RPM\",\n  \"unit\": \"rpm\",\n  \"address\": \"DB1420.DBD32\",\n  \"dataType\": \"DOUBLE\"\n}"
            }
          }
        },
        {
          "name": "Update Tag",
          "request": {
            "method": "PATCH",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/tags/1",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "tags",
                "1"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"unit\": \"A\"\n}"
            }
          }
        },
        {
          "name": "Delete Tag",
          "request": {
            "method": "DELETE",
            "url": {
              "raw": "{{baseUrl}}/api/tags/5",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "tags",
                "5"
              ]
            }
          }
        }
      ]
    },
    {
      "name": "Hierarchy",
      "item": [
        {
          "name": "Full ISA-95 Tree",
          "request": {
            "method": "GET",
            "url": {
              "raw": "{{baseUrl}}/api/hierarchy",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "hierarchy"
              ]
            }
          }
        }
      ]
    },
    {
      "name": "Rules",
      "item": [
        {
          "name": "List Rules",
          "request": {
            "method": "GET",
            "url": {
              "raw": "{{baseUrl}}/api/rules",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "rules"
              ]
            }
          }
        },
        {
          "name": "Get Rule",
          "request": {
            "method": "GET",
            "url": {
              "raw": "{{baseUrl}}/api/rules/1",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "rules",
                "1"
              ]
            }
          }
        },
        {
          "name": "Create Rule",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/rules",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "rules"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"code\": \"MOTOR_HIGH_TEMP\",\n  \"name\": \"Motor temperature above 70°C\",\n  \"tagPath\": \"gebze/press-line-01/s7-1500-01/motor.temperature\",\n  \"conditionExpression\": \"value > 70\",\n  \"durationMs\": 10000,\n  \"severity\": \"CRITICAL\",\n  \"channelIds\": [1]\n}"
            }
          }
        },
        {
          "name": "Update Rule",
          "request": {
            "method": "PATCH",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/rules/1",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "rules",
                "1"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"conditionExpression\": \"value > 22\",\n  \"durationMs\": 3000\n}"
            }
          }
        },
        {
          "name": "Disable Rule",
          "request": {
            "method": "PATCH",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/rules/1",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "rules",
                "1"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"isActive\": false\n}"
            }
          }
        },
        {
          "name": "Delete Rule",
          "request": {
            "method": "DELETE",
            "url": {
              "raw": "{{baseUrl}}/api/rules/2",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "rules",
                "2"
              ]
            }
          }
        }
      ]
    },
    {
      "name": "Notification Channels",
      "item": [
        {
          "name": "List Channels",
          "request": {
            "method": "GET",
            "url": {
              "raw": "{{baseUrl}}/api/channels",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "channels"
              ]
            }
          }
        },
        {
          "name": "Create Channel (Slack)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/channels",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "channels"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"name\": \"Slack #maintenance\",\n  \"channelType\": \"SLACK\",\n  \"config\": { \"webhookUrl\": \"https://hooks.slack.com/services/XXX/YYY/ZZZ\" },\n  \"description\": \"Maintenance team alerts\"\n}"
            }
          }
        },
        {
          "name": "Create Channel (HTTP POST)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/channels",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "channels"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"name\": \"ERP Webhook\",\n  \"channelType\": \"HTTP_POST\",\n  \"config\": { \"url\": \"http://api:4000/api/webhooks/test\" }\n}"
            }
          }
        },
        {
          "name": "Update Channel",
          "request": {
            "method": "PATCH",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/channels/1",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "channels",
                "1"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"isActive\": true\n}"
            }
          }
        },
        {
          "name": "Delete Channel",
          "request": {
            "method": "DELETE",
            "url": {
              "raw": "{{baseUrl}}/api/channels/5",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "channels",
                "5"
              ]
            }
          }
        }
      ]
    },
    {
      "name": "Alarms",
      "item": [
        {
          "name": "List Alarms",
          "request": {
            "method": "GET",
            "url": {
              "raw": "{{baseUrl}}/api/alarms?status=ACTIVE&limit=50",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "alarms"
              ],
              "query": [
                {
                  "key": "status",
                  "value": "ACTIVE",
                  "description": "ACTIVE | ACKNOWLEDGED | RECOVERED"
                },
                {
                  "key": "limit",
                  "value": "50"
                }
              ]
            }
          }
        },
        {
          "name": "Acknowledge Alarm",
          "request": {
            "method": "POST",
            "url": {
              "raw": "{{baseUrl}}/api/alarms/1/acknowledge",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "alarms",
                "1",
                "acknowledge"
              ]
            }
          }
        }
      ]
    },
    {
      "name": "Telemetry",
      "item": [
        {
          "name": "Latest Values",
          "request": {
            "method": "GET",
            "url": {
              "raw": "{{baseUrl}}/api/telemetry/latest?prefix=gebze",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "telemetry",
                "latest"
              ],
              "query": [
                {
                  "key": "prefix",
                  "value": "gebze",
                  "description": "optional tagPath prefix filter"
                }
              ]
            }
          }
        },
        {
          "name": "History",
          "request": {
            "method": "GET",
            "url": {
              "raw": "{{baseUrl}}/api/telemetry/history?tagPath=gebze/press-line-01/s7-1500-01/motor.current&limit=300",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "telemetry",
                "history"
              ],
              "query": [
                {
                  "key": "tagPath",
                  "value": "gebze/press-line-01/s7-1500-01/motor.current"
                },
                {
                  "key": "from",
                  "value": "",
                  "disabled": true,
                  "description": "ISO 8601"
                },
                {
                  "key": "to",
                  "value": "",
                  "disabled": true,
                  "description": "ISO 8601"
                },
                {
                  "key": "limit",
                  "value": "300"
                }
              ]
            }
          }
        }
      ]
    },
    {
      "name": "Dashboards",
      "item": [
        {
          "name": "List Dashboards",
          "request": {
            "method": "GET",
            "url": {
              "raw": "{{baseUrl}}/api/dashboards",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "dashboards"
              ]
            }
          }
        },
        {
          "name": "Get Dashboard",
          "request": {
            "method": "GET",
            "url": {
              "raw": "{{baseUrl}}/api/dashboards/1",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "dashboards",
                "1"
              ]
            }
          }
        },
        {
          "name": "Create Dashboard",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/dashboards",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "dashboards"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"name\": \"My Dashboard\",\n  \"description\": \"Custom view\",\n  \"widgets\": [\n    { \"id\": \"w1\", \"type\": \"stat\", \"title\": \"Motor Current\", \"tagPath\": \"gebze/press-line-01/s7-1500-01/motor.current\", \"span\": 1 },\n    { \"id\": \"w2\", \"type\": \"timeseries\", \"title\": \"Current Trend\", \"tagPath\": \"gebze/press-line-01/s7-1500-01/motor.current\", \"span\": 2, \"windowMinutes\": 15 },\n    { \"id\": \"w3\", \"type\": \"alarms\", \"title\": \"Recent Alarms\", \"span\": 1 }\n  ]\n}"
            }
          }
        },
        {
          "name": "Update Dashboard (widgets)",
          "request": {
            "method": "PATCH",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/dashboards/1",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "dashboards",
                "1"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"widgets\": [\n    { \"id\": \"w1\", \"type\": \"stat\", \"title\": \"Line Speed\", \"tagPath\": \"gebze/press-line-01/s7-1500-01/line.speed\", \"span\": 1 }\n  ]\n}"
            }
          }
        },
        {
          "name": "Delete Dashboard",
          "request": {
            "method": "DELETE",
            "url": {
              "raw": "{{baseUrl}}/api/dashboards/3",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "dashboards",
                "3"
              ]
            }
          }
        },
        {
          "name": "Create Share Link",
          "request": {
            "method": "POST",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/api/dashboards/1/share",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "dashboards",
                "1",
                "share"
              ]
            }
          }
        },
        {
          "name": "Revoke Share Link",
          "request": {
            "method": "DELETE",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/api/dashboards/1/share",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "dashboards",
                "1",
                "share"
              ]
            }
          }
        }
      ]
    },
    {
      "name": "Catalog",
      "item": [
        {
          "name": "List Machine Types",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/api/catalog/MACHINE_TYPE?includeInactive=false",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "catalog",
                "MACHINE_TYPE"
              ],
              "query": [
                {
                  "key": "includeInactive",
                  "value": "false"
                }
              ]
            }
          }
        },
        {
          "name": "List Device Types",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/api/catalog/DEVICE_TYPE",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "catalog",
                "DEVICE_TYPE"
              ]
            }
          }
        },
        {
          "name": "Create Catalog Option",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/catalog/MACHINE_TYPE",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "catalog",
                "MACHINE_TYPE"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"code\": \"PRODUCTION_LINE\",\n  \"label\": \"Production Line\",\n  \"sortOrder\": 10\n}"
            }
          }
        },
        {
          "name": "Update Catalog Option",
          "request": {
            "method": "PATCH",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/catalog/MACHINE_TYPE/1",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "catalog",
                "MACHINE_TYPE",
                "1"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"label\": \"Production Line (updated)\",\n  \"isActive\": true\n}"
            }
          }
        },
        {
          "name": "Delete Catalog Option",
          "request": {
            "method": "DELETE",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/api/catalog/MACHINE_TYPE/1",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "catalog",
                "MACHINE_TYPE",
                "1"
              ]
            }
          }
        }
      ]
    },
    {
      "name": "Production",
      "item": [
        {
          "name": "List Production Stations",
          "request": {
            "method": "GET",
            "url": {
              "raw": "{{baseUrl}}/api/production/stations",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "production",
                "stations"
              ]
            }
          }
        },
        {
          "name": "Get Production Station",
          "request": {
            "method": "GET",
            "url": {
              "raw": "{{baseUrl}}/api/production/stations/1",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "production",
                "stations",
                "1"
              ]
            }
          }
        },
        {
          "name": "Lookup Production Identity",
          "request": {
            "method": "GET",
            "url": {
              "raw": "{{baseUrl}}/api/production/identity?code=RAW-W6-001",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "production",
                "identity"
              ],
              "query": [
                {
                  "key": "code",
                  "value": "RAW-W6-001"
                }
              ]
            }
          }
        },
        {
          "name": "List Production Orders",
          "request": {
            "method": "GET",
            "url": {
              "raw": "{{baseUrl}}/api/production/orders",
              "host": ["{{baseUrl}}"],
              "path": ["api", "production", "orders"]
            }
          }
        },
        {
          "name": "List Inbound Receipts",
          "request": {
            "method": "GET",
            "description": "Requires wms.read — inbound is WMS, not production.create.",
            "url": {
              "raw": "{{baseUrl}}/api/production/inbound",
              "host": ["{{baseUrl}}"],
              "path": ["api", "production", "inbound"]
            }
          }
        },
        {
          "name": "Trace Production Lot",
          "request": {
            "method": "GET",
            "url": {
              "raw": "{{baseUrl}}/api/production/trace?code=FG-M120-001",
              "host": ["{{baseUrl}}"],
              "path": ["api", "production", "trace"],
              "query": [{ "key": "code", "value": "FG-M120-001" }]
            }
          }
        },
        {
          "name": "Station OEE",
          "request": {
            "method": "GET",
            "url": {
              "raw": "{{baseUrl}}/api/production/stations/1/oee",
              "host": ["{{baseUrl}}"],
              "path": ["api", "production", "stations", "1", "oee"]
            }
          }
        },
        {
          "name": "Shift Report",
          "request": {
            "method": "GET",
            "url": {
              "raw": "{{baseUrl}}/api/production/reports/shift",
              "host": ["{{baseUrl}}"],
              "path": ["api", "production", "reports", "shift"]
            }
          }
        },
        {
          "name": "ERP Schedule",
          "request": {
            "method": "POST",
            "header": [{ "key": "Content-Type", "value": "application/json" }],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"plantId\": 1,\n  \"routingCode\": \"wip-draw\",\n  \"qtyPlanned\": 10,\n  \"erpRef\": \"ERP-DEMO-1\"\n}"
            },
            "url": {
              "raw": "{{baseUrl}}/api/production/erp/schedule",
              "host": ["{{baseUrl}}"],
              "path": ["api", "production", "erp", "schedule"]
            }
          }
        },
        {
          "name": "Machine Live",
          "request": {
            "method": "GET",
            "url": {
              "raw": "{{baseUrl}}/api/production/machines/1/live",
              "host": ["{{baseUrl}}"],
              "path": ["api", "production", "machines", "1", "live"]
            }
          }
        },
        {
          "name": "Governed Permit Write",
          "request": {
            "method": "POST",
            "header": [{ "key": "Content-Type", "value": "application/json" }],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"value\": 1,\n  \"confirm\": true\n}"
            },
            "url": {
              "raw": "{{baseUrl}}/api/production/machines/1/permit",
              "host": ["{{baseUrl}}"],
              "path": ["api", "production", "machines", "1", "permit"]
            }
          }
        }
      ]
    },
    {
      "name": "Warehouses",
      "item": [
        {
          "name": "List Warehouses",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/api/warehouses?plantId=1",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "warehouses"
              ],
              "query": [
                {
                  "key": "plantId",
                  "value": "1"
                }
              ]
            }
          }
        },
        {
          "name": "Get Warehouse",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/api/warehouses/1",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "warehouses",
                "1"
              ]
            }
          }
        },
        {
          "name": "Create Warehouse",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/warehouses",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "warehouses"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"plantId\": 1,\n  \"code\": \"wh-main\",\n  \"name\": \"Main Warehouse\"\n}"
            }
          }
        },
        {
          "name": "Update Warehouse",
          "request": {
            "method": "PATCH",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/warehouses/1",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "warehouses",
                "1"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"name\": \"Main Warehouse (updated)\"\n}"
            }
          }
        },
        {
          "name": "Delete Warehouse",
          "request": {
            "method": "DELETE",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/api/warehouses/1",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "warehouses",
                "1"
              ]
            }
          }
        },
        {
          "name": "Create Location",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/warehouses/1/locations",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "warehouses",
                "1",
                "locations"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"code\": \"A-01\",\n  \"name\": \"Aisle A Rack 01\"\n}"
            }
          }
        },
        {
          "name": "Update Location",
          "request": {
            "method": "PATCH",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/warehouses/locations/1",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "warehouses",
                "locations",
                "1"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"name\": \"Aisle A Rack 01 (updated)\"\n}"
            }
          }
        },
        {
          "name": "Delete Location",
          "request": {
            "method": "DELETE",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/api/warehouses/locations/1",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "warehouses",
                "locations",
                "1"
              ]
            }
          }
        }
      ]
    },
    {
      "name": "Parts",
      "item": [
        {
          "name": "List Parts",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/api/parts?includeInactive=false",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "parts"
              ],
              "query": [
                {
                  "key": "includeInactive",
                  "value": "false"
                }
              ]
            }
          }
        },
        {
          "name": "Get Part",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/api/parts/1",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "parts",
                "1"
              ]
            }
          }
        },
        {
          "name": "Create Part",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/parts",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "parts"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"code\": \"bearing-6205\",\n  \"name\": \"Bearing 6205\",\n  \"unitId\": 1,\n  \"brandId\": null,\n  \"modelId\": null,\n  \"locationId\": 1,\n  \"quantity\": 10,\n  \"minQuantity\": 2\n}"
            }
          }
        },
        {
          "name": "Update Part",
          "request": {
            "method": "PATCH",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/parts/1",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "parts",
                "1"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"name\": \"Bearing 6205 ZZ\",\n  \"minQuantity\": 3\n}"
            }
          }
        },
        {
          "name": "Adjust Part Quantity",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/parts/1/adjust",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "parts",
                "1",
                "adjust"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"delta\": -1,\n  \"note\": \"Used on machine repair\"\n}"
            }
          }
        },
        {
          "name": "List Part Stock Events",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/api/parts/1/stock-events?limit=50",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "parts",
                "1",
                "stock-events"
              ],
              "query": [
                {
                  "key": "limit",
                  "value": "50"
                }
              ]
            }
          }
        },
        {
          "name": "List Stock Events",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/api/parts/stock-events?limit=50",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "parts",
                "stock-events"
              ],
              "query": [
                {
                  "key": "limit",
                  "value": "50"
                }
              ]
            }
          }
        },
        {
          "name": "Delete Part",
          "request": {
            "method": "DELETE",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/api/parts/1",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "parts",
                "1"
              ]
            }
          }
        }
      ]
    },
    {
      "name": "Part Units",
      "item": [
        {
          "name": "List Part Units",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/api/part-units",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "part-units"
              ]
            }
          }
        },
        {
          "name": "Create Part Unit",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/part-units",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "part-units"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"code\": \"PCS\",\n  \"label\": \"Pieces\",\n  \"symbol\": \"pcs\",\n  \"sortOrder\": 10\n}"
            }
          }
        },
        {
          "name": "Update Part Unit",
          "request": {
            "method": "PATCH",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/part-units/1",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "part-units",
                "1"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"label\": \"Pieces\",\n  \"isActive\": true\n}"
            }
          }
        },
        {
          "name": "Delete Part Unit",
          "request": {
            "method": "DELETE",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/api/part-units/1",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "part-units",
                "1"
              ]
            }
          }
        }
      ]
    },
    {
      "name": "Part Brands",
      "item": [
        {
          "name": "List Part Brands",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/api/part-brands",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "part-brands"
              ]
            }
          }
        },
        {
          "name": "Create Part Brand",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/part-brands",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "part-brands"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"name\": \"SKF\"\n}"
            }
          }
        },
        {
          "name": "Update Part Brand",
          "request": {
            "method": "PATCH",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/part-brands/1",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "part-brands",
                "1"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"name\": \"SKF Group\"\n}"
            }
          }
        },
        {
          "name": "Delete Part Brand",
          "request": {
            "method": "DELETE",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/api/part-brands/1",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "part-brands",
                "1"
              ]
            }
          }
        },
        {
          "name": "Create Brand Model",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/part-brands/1/models",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "part-brands",
                "1",
                "models"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"name\": \"Explorer\"\n}"
            }
          }
        },
        {
          "name": "Update Brand Model",
          "request": {
            "method": "PATCH",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/part-brands/models/1",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "part-brands",
                "models",
                "1"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"name\": \"Explorer (updated)\"\n}"
            }
          }
        },
        {
          "name": "Delete Brand Model",
          "request": {
            "method": "DELETE",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/api/part-brands/models/1",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "part-brands",
                "models",
                "1"
              ]
            }
          }
        }
      ]
    },
    {
      "name": "Maintenance",
      "item": [
        {
          "name": "Fleet Overview",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/api/maintenance/overview",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "maintenance",
                "overview"
              ]
            }
          }
        },
        {
          "name": "KPI (WO-based)",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/api/maintenance/kpi",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "maintenance",
                "kpi"
              ]
            }
          }
        },
        {
          "name": "List Work Orders",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/api/maintenance/work-orders",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "maintenance",
                "work-orders"
              ]
            }
          }
        },
        {
          "name": "Create Work Order from Alarm",
          "request": {
            "method": "POST",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/api/maintenance/work-orders/from-alarm/1",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "maintenance",
                "work-orders",
                "from-alarm",
                "1"
              ]
            }
          }
        },
        {
          "name": "Complete Work Order",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"notes\": \"Replaced bearing\",\n  \"parts\": []\n}"
            },
            "url": {
              "raw": "{{baseUrl}}/api/maintenance/work-orders/1/complete",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "maintenance",
                "work-orders",
                "1",
                "complete"
              ]
            }
          }
        },
        {
          "name": "List PM Schedules",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/api/maintenance/pm-schedules",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "maintenance",
                "pm-schedules"
              ]
            }
          }
        },
        {
          "name": "List Maintenance Hints",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/api/maintenance/hints?status=OPEN",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "maintenance",
                "hints"
              ],
              "query": [
                {
                  "key": "status",
                  "value": "OPEN"
                }
              ]
            }
          }
        },
        {
          "name": "List Records (fleet)",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/api/maintenance/records?limit=50",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "maintenance",
                "records"
              ],
              "query": [
                {
                  "key": "limit",
                  "value": "50"
                }
              ]
            }
          }
        },
        {
          "name": "List Records (machine)",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/api/maintenance/records?machineId=1",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "maintenance",
                "records"
              ],
              "query": [
                {
                  "key": "machineId",
                  "value": "1"
                }
              ]
            }
          }
        },
        {
          "name": "List Records (device)",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/api/maintenance/records?deviceId=1",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "maintenance",
                "records"
              ],
              "query": [
                {
                  "key": "deviceId",
                  "value": "1"
                }
              ]
            }
          }
        },
        {
          "name": "Create Record",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/maintenance/records",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "maintenance",
                "records"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"machineId\": 1,\n  \"kind\": \"INSPECTION\",\n  \"notes\": \"Quarterly check\",\n  \"performedBy\": \"tech-01\",\n  \"parts\": [{ \"partId\": 1, \"quantity\": 1 }]\n}"
            },
            "description": "kind: INSPECTION | REPAIR | CALIBRATION | NOTE. Provide machineId or deviceId (not both)."
          }
        },
        {
          "name": "Delete Record",
          "request": {
            "method": "DELETE",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/api/maintenance/records/1",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "maintenance",
                "records",
                "1"
              ]
            }
          }
        }
      ]
    },
    {
      "name": "Baselines",
      "item": [
        {
          "name": "List Baselines",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/api/baselines",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "baselines"
              ]
            }
          }
        },
        {
          "name": "Record Baseline",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/baselines",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "baselines"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"tagPath\": \"gebze/press-line-01/s7-1500-01/line.speed\",\n  \"hours\": 24\n}"
            },
            "description": "Builds a golden envelope from GOOD history (needs ≥30 samples)."
          }
        },
        {
          "name": "Delete Baseline",
          "request": {
            "method": "DELETE",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/api/baselines/1",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "baselines",
                "1"
              ]
            }
          }
        }
      ]
    },
    {
      "name": "Programs",
      "item": [
        {
          "name": "List Programs",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/api/programs",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "programs"
              ]
            }
          }
        },
        {
          "name": "Get Program",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/api/programs/1",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "programs",
                "1"
              ]
            }
          }
        },
        {
          "name": "Create Program",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/programs",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "programs"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"name\": \"Demo program\",\n  \"description\": \"example\",\n  \"source\": \"// js source\"\n}"
            }
          }
        },
        {
          "name": "Update Program",
          "request": {
            "method": "PATCH",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/programs/1",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "programs",
                "1"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"name\": \"Demo program (updated)\",\n  \"source\": \"// updated\"\n}"
            }
          }
        },
        {
          "name": "Start Program",
          "request": {
            "method": "POST",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/api/programs/1/start",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "programs",
                "1",
                "start"
              ]
            }
          }
        },
        {
          "name": "Stop Program",
          "request": {
            "method": "POST",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/api/programs/1/stop",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "programs",
                "1",
                "stop"
              ]
            }
          }
        },
        {
          "name": "Debug Program",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/programs/1/debug",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "programs",
                "1",
                "debug"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"input\": {}\n}"
            }
          }
        },
        {
          "name": "Program Logs",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/api/programs/1/logs",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "programs",
                "1",
                "logs"
              ]
            }
          }
        },
        {
          "name": "Delete Program",
          "request": {
            "method": "DELETE",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/api/programs/1",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "programs",
                "1"
              ]
            }
          }
        }
      ]
    },
    {
      "name": "Geo",
      "item": [
        {
          "name": "Search Places",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/api/geo/search?q=Istanbul",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "geo",
                "search"
              ],
              "query": [
                {
                  "key": "q",
                  "value": "Istanbul"
                }
              ]
            }
          }
        },
        {
          "name": "Reverse Geocode",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/api/geo/reverse?lat=41.0082&lon=28.9784",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "geo",
                "reverse"
              ],
              "query": [
                {
                  "key": "lat",
                  "value": "41.0082"
                },
                {
                  "key": "lon",
                  "value": "28.9784"
                }
              ]
            }
          }
        }
      ]
    },
    {
      "name": "Public Dashboards",
      "item": [
        {
          "name": "Get Shared Dashboard",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/api/public/dashboards/SHARE_TOKEN",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "public",
                "dashboards",
                "SHARE_TOKEN"
              ]
            },
            "auth": {
              "type": "noauth"
            }
          }
        },
        {
          "name": "Shared Latest",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/api/public/dashboards/SHARE_TOKEN/latest",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "public",
                "dashboards",
                "SHARE_TOKEN",
                "latest"
              ]
            },
            "auth": {
              "type": "noauth"
            }
          }
        },
        {
          "name": "Shared History",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/api/public/dashboards/SHARE_TOKEN/history?tagPath=gebze/press-line-01/s7-1500-01/line.speed&from=&to=",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "public",
                "dashboards",
                "SHARE_TOKEN",
                "history"
              ],
              "query": [
                {
                  "key": "tagPath",
                  "value": "gebze/press-line-01/s7-1500-01/line.speed"
                },
                {
                  "key": "from",
                  "value": ""
                },
                {
                  "key": "to",
                  "value": ""
                }
              ]
            },
            "auth": {
              "type": "noauth"
            }
          }
        },
        {
          "name": "Shared Alarms",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/api/public/dashboards/SHARE_TOKEN/alarms",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "public",
                "dashboards",
                "SHARE_TOKEN",
                "alarms"
              ]
            },
            "auth": {
              "type": "noauth"
            }
          }
        }
      ]
    },
    {
      "name": "Operations",
      "item": [
        {
          "name": "Ops Summary (KPI cards)",
          "request": {
            "method": "GET",
            "description": "Operations Center KPIs: connectivity, ingestTrend, alarmBySeverity, openWorkOrders, screens, programs, platform snapshot.",
            "url": {
              "raw": "{{baseUrl}}/api/ops/summary",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "ops",
                "summary"
              ]
            }
          }
        },
        {
          "name": "Ops Timeline",
          "request": {
            "method": "GET",
            "url": {
              "raw": "{{baseUrl}}/api/ops/timeline",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "ops",
                "timeline"
              ]
            }
          }
        }
      ]
    },
    {
      "name": "Quality",
      "item": [
        {
          "name": "Available stock",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/api/quality/available-stock",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "quality",
                "available-stock"
              ]
            }
          }
        },
        {
          "name": "List characteristics",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/api/quality/characteristics",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "quality",
                "characteristics"
              ]
            }
          }
        },
        {
          "name": "Create characteristic",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/quality/characteristics",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "quality",
                "characteristics"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"name\": \"pH\",\n  \"unit\": \"pH\",\n  \"valueType\": \"NUMERIC\",\n  \"lsl\": 6.5,\n  \"usl\": 8.5\n}"
            }
          }
        },
        {
          "name": "List plans",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/api/quality/plans",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "quality",
                "plans"
              ]
            }
          }
        },
        {
          "name": "Create plan",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/quality/plans",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "quality",
                "plans"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"name\": \"Incoming chemistry raw IQC\",\n  \"type\": \"IQC\",\n  \"decisionRule\": \"SIMPLE_ACCEPTANCE\",\n  \"characteristicIds\": [1]\n}"
            }
          }
        },
        {
          "name": "Submit to quality",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/quality/submissions",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "quality",
                "submissions"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"itemId\": 1,\n  \"sourceLocationId\": 1,\n  \"destLocationId\": 2,\n  \"qty\": 10,\n  \"lot\": \"LOT-HOAc-2408\",\n  \"planId\": 1\n}"
            }
          }
        },
        {
          "name": "List orders",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/api/quality/orders",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "quality",
                "orders"
              ]
            }
          }
        },
        {
          "name": "Get order",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/api/quality/orders/1",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "quality",
                "orders",
                "1"
              ]
            }
          }
        },
        {
          "name": "Start order",
          "request": {
            "method": "POST",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/api/quality/orders/1/start",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "quality",
                "orders",
                "1",
                "start"
              ]
            }
          }
        },
        {
          "name": "Live readings",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/api/quality/orders/1/live",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "quality",
                "orders",
                "1",
                "live"
              ]
            }
          }
        },
        {
          "name": "Capture live results",
          "request": {
            "method": "POST",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/api/quality/orders/1/capture-live",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "quality",
                "orders",
                "1",
                "capture-live"
              ]
            }
          }
        },
        {
          "name": "Record results",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/quality/orders/1/results",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "quality",
                "orders",
                "1",
                "results"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"results\": [\n    { \"planItemId\": 1, \"numericValue\": 7.1 }\n  ]\n}"
            }
          }
        },
        {
          "name": "Complete order",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/quality/orders/1/complete",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "quality",
                "orders",
                "1",
                "complete"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"outcomeLocationId\": 1\n}"
            }
          }
        },
        {
          "name": "Cancel order",
          "request": {
            "method": "POST",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/api/quality/orders/1/cancel",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "quality",
                "orders",
                "1",
                "cancel"
              ]
            }
          }
        },
        {
          "name": "Analysis report",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/api/quality/orders/1/report",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "quality",
                "orders",
                "1",
                "report"
              ]
            }
          }
        },
        {
          "name": "List NCRs",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/api/quality/ncrs",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "quality",
                "ncrs"
              ]
            }
          }
        },
        {
          "name": "Dispose NCR",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/quality/ncrs/1/dispose",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "quality",
                "ncrs",
                "1",
                "dispose"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"disposition\": \"CONTAIN\"\n}"
            }
          }
        },
        {
          "name": "List labs",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/api/quality/labs",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "quality",
                "labs"
              ]
            }
          }
        },
        {
          "name": "Create lab",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/quality/labs",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "quality",
                "labs"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"labName\": \"Gebze QC Lab\",\n  \"address\": \"Gebze, Kocaeli, Türkiye\",\n  \"testLocation\": \"Gebze, Kocaeli, Türkiye\"\n}"
            }
          }
        },
        {
          "name": "Update lab",
          "request": {
            "method": "PATCH",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/quality/labs/1",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "quality",
                "labs",
                "1"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"labName\": \"Gebze Plant QC Lab\",\n  \"isDefault\": true\n}"
            }
          }
        },
        {
          "name": "Get lab profile",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/api/quality/lab-profile",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "quality",
                "lab-profile"
              ]
            }
          }
        },
        {
          "name": "Upsert lab profile",
          "request": {
            "method": "PUT",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/quality/lab-profile",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "quality",
                "lab-profile"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"labName\": \"Gebze QC Lab\",\n  \"address\": \"Gebze, Kocaeli, Türkiye\"\n}"
            }
          }
        }
      ]
    },
    {
      "name": "System",
      "item": [
        {
          "name": "Health",
          "request": {
            "auth": {
              "type": "noauth"
            },
            "method": "GET",
            "url": {
              "raw": "{{baseUrl}}/api/health",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "health"
              ]
            }
          }
        },
        {
          "name": "Webhook Test Sink (POST)",
          "request": {
            "auth": {
              "type": "noauth"
            },
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/webhooks/test",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "webhooks",
                "test"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"hello\": \"world\"\n}"
            }
          }
        },
        {
          "name": "Webhook Test Sink Log",
          "request": {
            "method": "GET",
            "url": {
              "raw": "{{baseUrl}}/api/webhooks/test/log",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "webhooks",
                "test",
                "log"
              ]
            }
          }
        }
      ]
    }
  ]
}
