{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/mindcloud/json-schema/mindcloud-workflow-usage-schema.json",
  "title": "WorkflowUsage",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/mindcloud-usage-api-openapi.yml#/components/schemas/WorkflowUsage",
  "type": "object",
  "properties": {
    "workflowId": {
      "type": [
        "string",
        "null"
      ],
      "description": "The workflow."
    },
    "name": {
      "type": [
        "string",
        "null"
      ],
      "description": "Its name."
    },
    "tasks": {
      "type": [
        "integer",
        "null"
      ],
      "description": "Tasks it used in the window."
    },
    "installations": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": "object",
        "properties": {
          "installationId": {
            "type": [
              "string",
              "null"
            ],
            "description": "The installation."
          },
          "name": {
            "type": [
              "string",
              "null"
            ],
            "description": "The installation label: the integration label template when one is set, otherwise \"email - name\" of the end user, otherwise the raw id."
          },
          "integrationId": {
            "type": [
              "string",
              "null"
            ],
            "description": "The embedded integration the installation belongs to."
          },
          "integrationName": {
            "type": [
              "string",
              "null"
            ],
            "description": "That integration's name."
          },
          "tasks": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Tasks the installation used in the window."
          }
        }
      },
      "description": "Embedded usage per installation, highest first: installationId, name (the installation label), integrationId, integrationName, and tasks. Empty for workflows that did not run under an installation. Installation tasks add up to at most the workflow tasks; the remainder ran outside an installation or before meta.installationsFrom, the first day with installation detail."
    }
  },
  "required": [
    "workflowId",
    "name",
    "tasks",
    "installations"
  ]
}