{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/linkedin/json-schema/linkedin-learning-activity-report-response-schema.json",
  "title": "LearningActivityReportResponse",
  "x-generated": "2026-11-05",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/linkedin-learning-activity-reports-api-openapi.yml#/components/schemas/LearningActivityReportResponse",
  "type": "object",
  "properties": {
    "elements": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/LearningActivityReport"
      }
    },
    "paging": {
      "$ref": "#/$defs/Paging"
    }
  },
  "$defs": {
    "LearnerDetails": {
      "type": "object",
      "properties": {
        "entity": {
          "$ref": "#/$defs/LearnerEntity"
        }
      }
    },
    "LearnerEntity": {
      "type": "object",
      "properties": {
        "accountUrn": {
          "type": "string",
          "description": "URN of the enterprise account"
        },
        "groupUrn": {
          "type": "string",
          "description": "URN of the learner group (if grouped by group)"
        },
        "learnerUrn": {
          "type": "string",
          "description": "URN of the individual learner (if grouped by individual)"
        },
        "contentUrn": {
          "type": "string",
          "description": "URN of the content (if grouped by content)"
        }
      }
    },
    "LearningActivity": {
      "type": "object",
      "properties": {
        "engagementType": {
          "type": "string",
          "enum": [
            "LOGINS",
            "VIEWS",
            "SECONDS_VIEWED",
            "COMPLETIONS"
          ],
          "description": "Type of engagement activity"
        },
        "engagementValue": {
          "type": "integer",
          "description": "Numeric value of the engagement"
        },
        "engagementMetricQualifier": {
          "type": "string",
          "enum": [
            "UNIQUE",
            "TOTAL"
          ],
          "description": "Whether the metric is unique or total count"
        },
        "assetType": {
          "type": "string",
          "enum": [
            "VIDEO",
            "ARTICLE",
            "AUDIO",
            "BOOK",
            "LEARNING_COLLECTION",
            "COURSE",
            "DOCUMENT",
            "EVENT",
            "LEARNING_PATH"
          ],
          "description": "Type of learning asset"
        },
        "firstEngagedAt": {
          "type": "integer",
          "format": "int64",
          "description": "Timestamp of first engagement"
        },
        "lastEngagedAt": {
          "type": "integer",
          "format": "int64",
          "description": "Timestamp of last engagement"
        }
      },
      "required": [
        "engagementType",
        "engagementValue",
        "engagementMetricQualifier"
      ]
    },
    "LearningActivityReport": {
      "type": "object",
      "properties": {
        "latestDataAt": {
          "type": "integer",
          "format": "int64",
          "description": "Timestamp of the latest data included in this report"
        },
        "activities": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/LearningActivity"
          }
        },
        "learnerDetails": {
          "$ref": "#/$defs/LearnerDetails"
        }
      }
    },
    "Paging": {
      "type": "object",
      "properties": {
        "total": {
          "type": "integer",
          "description": "Total number of results"
        },
        "count": {
          "type": "integer",
          "description": "Number of results in this response"
        },
        "start": {
          "type": "integer",
          "description": "Starting index"
        },
        "links": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/PagingLink"
          }
        }
      }
    },
    "PagingLink": {
      "type": "object",
      "properties": {
        "rel": {
          "type": "string"
        },
        "href": {
          "type": "string"
        },
        "type": {
          "type": "string"
        }
      }
    }
  }
}