{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/usagemax-com/json-schema/usagemax-com-collector-status-schema.json",
  "title": "CollectorStatus",
  "x-generated": "2026-11-27",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/usagemax-com-openapi.json#/components/schemas/CollectorStatus",
  "type": "object",
  "required": [
    "ok",
    "status",
    "credentialType",
    "writeOnly",
    "activation",
    "expiresAt",
    "scopes",
    "scopeStatus",
    "ingestAuthorized",
    "deviceBinding"
  ],
  "properties": {
    "ok": {
      "type": "boolean"
    },
    "status": {
      "type": "string",
      "enum": [
        "active",
        "revoked",
        "workspace_disabled",
        "membership_inactive",
        "device_mismatch",
        "scope_missing"
      ]
    },
    "credentialType": {
      "const": "collector"
    },
    "writeOnly": {
      "const": true
    },
    "activation": {
      "const": "not_required"
    },
    "expiresAt": {
      "type": "null"
    },
    "scopes": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "scopeStatus": {
      "type": "string",
      "enum": [
        "valid",
        "missing_telemetry_write"
      ]
    },
    "ingestAuthorized": {
      "type": "boolean"
    },
    "deviceBinding": {
      "type": "string",
      "enum": [
        "unbound",
        "bound",
        "matched",
        "mismatch"
      ]
    },
    "profileHandle": {
      "type": [
        "string",
        "null"
      ]
    },
    "deviceName": {
      "type": [
        "string",
        "null"
      ]
    },
    "platform": {
      "type": [
        "string",
        "null"
      ]
    },
    "cliVersion": {
      "type": [
        "string",
        "null"
      ]
    },
    "createdAt": {
      "type": "integer"
    },
    "lastSeenAt": {
      "type": [
        "integer",
        "null"
      ]
    },
    "lastSuccessAt": {
      "type": [
        "integer",
        "null"
      ]
    },
    "lastFailureAt": {
      "type": [
        "integer",
        "null"
      ]
    },
    "lastFailureCode": {
      "type": [
        "string",
        "null"
      ]
    }
  }
}