{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/certifyos/main/json-schema/certifyos-get-monitoring-workflow-response-schema.json",
  "title": "GetMonitoringWorkflowResponse",
  "description": "Response containing a single monitoring workflow",
  "x-generated": "2026-10-20",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/certifyos-monitoringworkflow-api-openapi.yml#/components/schemas/GetMonitoringWorkflowResponse",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Unique identifier for the monitoring workflow"
    },
    "tenantId": {
      "type": "string",
      "description": "ID of the tenant"
    },
    "tenantPractitionerId": {
      "type": "string",
      "description": "ID of the tenant practitioner"
    },
    "certifyPractitionerId": {
      "type": "string",
      "description": "Certify practitioner ID"
    },
    "data": {
      "$ref": "https://schemas.certifyos.com/api-contracts/response/MonitoringWorkflowResponse.schema.json",
      "description": "Monitoring workflow data including practitioner information, flags array, and computed fields"
    },
    "createdBy": {
      "type": "string",
      "description": "ID of the user who created the monitoring workflow"
    },
    "updatedBy": {
      "type": "string",
      "description": "ID of the user who updated the monitoring workflow"
    },
    "createdAt": {
      "$ref": "#/$defs/Instant",
      "type": "string",
      "description": "Timestamp of the monitoring workflow creation"
    },
    "updatedAt": {
      "$ref": "#/$defs/Instant",
      "type": "string",
      "description": "Timestamp of the monitoring workflow update"
    },
    "newFlags": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/JsonNode"
      },
      "description": "Array of new flags detected for this monitoring workflow"
    },
    "sectionFlags": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/JsonNode"
      },
      "description": "Array of section-level flags for this monitoring workflow"
    },
    "allFlags": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/JsonNode"
      },
      "description": "Array of all existing flags (excluding new flags)"
    },
    "allFlagsCount": {
      "type": "integer",
      "format": "int32",
      "description": "Total count of all existing flags (excluding new flags)"
    },
    "otherWorkflows": {
      "$ref": "#/$defs/JsonNode",
      "type": "object",
      "description": "Map of other workflow IDs to their display labels (e.g. period name)"
    }
  },
  "$defs": {
    "Instant": {
      "type": "string",
      "format": "date-time"
    },
    "JsonNode": {
      "type": "object",
      "properties": {
        "empty": {
          "type": "boolean"
        },
        "valueNode": {
          "type": "boolean"
        },
        "containerNode": {
          "type": "boolean"
        },
        "missingNode": {
          "type": "boolean"
        },
        "array": {
          "type": "boolean"
        },
        "object": {
          "type": "boolean"
        },
        "nodeType": {
          "$ref": "#/$defs/JsonNodeType"
        },
        "pojo": {
          "type": "boolean"
        },
        "number": {
          "type": "boolean"
        },
        "integralNumber": {
          "type": "boolean"
        },
        "floatingPointNumber": {
          "type": "boolean"
        },
        "short": {
          "type": "boolean"
        },
        "int": {
          "type": "boolean"
        },
        "long": {
          "type": "boolean"
        },
        "float": {
          "type": "boolean"
        },
        "double": {
          "type": "boolean"
        },
        "bigDecimal": {
          "type": "boolean"
        },
        "bigInteger": {
          "type": "boolean"
        },
        "textual": {
          "type": "boolean"
        },
        "boolean": {
          "type": "boolean"
        },
        "null": {
          "type": "boolean"
        },
        "binary": {
          "type": "boolean"
        }
      }
    },
    "JsonNodeType": {
      "type": "string",
      "enum": [
        "ARRAY",
        "BINARY",
        "BOOLEAN",
        "MISSING",
        "NULL",
        "NUMBER",
        "OBJECT",
        "POJO",
        "STRING"
      ]
    }
  }
}