{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/trolie/json-schema/trolie-response-v2-schema.json",
  "title": "response_v2",
  "description": "See https://trolie.energy/concepts.html#monitoring-sets for info on the \nmonitoring set concept in TROLIE.  \n\nThis representation is intended to be enough for consumers to read it and tell where \nthe monitoring set came from, using metadata such as a source and an optional description.  \nIt also includes the list of resources included in the monitoring set, as well as all\ntheir known aliases.  \n",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/trolie-monitoring-sets-api-openapi.yml#/components/schemas/response_v2",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "A human-readable name for this monitoring set",
      "maxLength": 255,
      "minLength": 1,
      "pattern": "^[a-zA-Z0-9 _-]{1,255}$"
    },
    "description": {
      "type": "string",
      "format": "free-form",
      "description": "A description of this monitoring set",
      "maxLength": 1000
    },
    "power-system-resources": {
      "$ref": "#/$defs/named-power-system-resources"
    },
    "source": {
      "$ref": "#/$defs/data-provenance"
    },
    "id": {
      "$ref": "#/$defs/local"
    }
  },
  "required": [
    "source",
    "id",
    "name",
    "power-system-resources"
  ],
  "$defs": {
    "data-provenance": {
      "type": "object",
      "description": "\nProvides information about where the associated representation came from. *No\nfunctional aspects of the exchange are contingent upon this data.* However,\nthis information is meant to support debugging and application support use\ncases, so implementors are encouraged to provide\nmeaningful values.\n\n* `provider` identifies that entity, e.g., a Ratings Provider or Clearinghouse\n  Provider, that created the object. The `provider`'s NERC id is recommended.\n* `last-updated` indicates the wall-clock time at the `provider` when the\n  object was last modified. N.b. this is not when the message\n  describing the object was sent or received, i.e., implementors should not\n  simply insert the current timestamp here when preparing the object serialization.\n* `origin-id` is the identifier used by the `provider` to uniquely nominate\n  the object. It is recommended but not required that this be a URI.\n",
      "properties": {
        "provider": {
          "$ref": "#/$defs/entity"
        },
        "last-updated": {
          "$ref": "#/$defs/timestamp"
        },
        "origin-id": {
          "$ref": "#/$defs/local"
        }
      },
      "required": [
        "provider",
        "last-updated"
      ]
    },
    "entity": {
      "type": "string",
      "maxLength": 500,
      "pattern": "^(.){0,500}$",
      "description": "Contains a unique identifier for an entity, such as a grid operator or\norganization. This identifier is typically used in the context of data\nexchange between entities.\n"
    },
    "local": {
      "type": "string",
      "maxLength": 500,
      "pattern": "^(.){0,500}$",
      "description": "Contains a identifier that is unique for an object in the context of an\nexchange between two grid operators.\n"
    },
    "name-type": {
      "description": "Type of the name being referenced.  Corresponds to the IEC CIM `NameType` concept.",
      "type": "string",
      "maxLength": 20,
      "pattern": "^[A-Za-z0-9\\-]{3,20}$"
    },
    "named-power-system-resources": {
      "type": "array",
      "minItems": 1,
      "maxItems": 50000,
      "description": "Collection of power system resource names",
      "items": {
        "$ref": "#/$defs/names"
      }
    },
    "names": {
      "type": "object",
      "properties": {
        "resource-id": {
          "$ref": "#/$defs/resource-id"
        },
        "alternate-identifiers": {
          "type": "array",
          "maxItems": 10,
          "minItems": 1,
          "items": {
            "type": "object",
            "properties": {
              "name": {
                "$ref": "#/$defs/local"
              },
              "type": {
                "$ref": "#/$defs/name-type"
              },
              "authority": {
                "$ref": "#/$defs/entity"
              },
              "mrid": {
                "$ref": "#/$defs/local"
              }
            },
            "required": [
              "name"
            ]
          }
        }
      },
      "required": [
        "resource-id"
      ]
    },
    "resource-id": {
      "type": "string",
      "maxLength": 500,
      "pattern": "^(.){0,500}$",
      "description": "Contains a unique identifier for a power system resource, such as a\ntransmission facility, segment, interface, etc. This identifier is typically\nused between reliability coordinators in operations.\n"
    },
    "timestamp": {
      "description": "RFC 3339 date-time string with a maximum of 10 digits in the fractional seconds component, i.e., nanosecond precision.",
      "type": "string",
      "format": "date-time",
      "maxLength": 35
    }
  }
}