{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/curtin/main/json-schema/curtin-coki-entity-schema.json",
  "title": "COKI Entity",
  "description": "An institution or country entity as returned by the Curtin Open Knowledge Initiative API at api.coki.ac. Derived from live keyless responses on 2026-08-30; Curtin publishes no schema for this API.",
  "x-provenance": {
    "generated": "2026-08-30",
    "method": "derived",
    "x-operator": "institution",
    "source": [
      "https://api.coki.ac/institution/02n415q13",
      "https://api.coki.ac/country/AUS"
    ],
    "x-evidence-method": "probed",
    "x-authorship": "Generated by API Evangelist from live unauthenticated probes. Curtin University publishes no schema for this API."
  },
  "type": "object",
  "required": [
    "id",
    "name",
    "entity_type",
    "stats"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "ROR identifier suffix for institutions, ISO 3166-1 alpha-3 for countries"
    },
    "name": {
      "type": "string"
    },
    "entity_type": {
      "type": "string",
      "enum": [
        "institution",
        "country"
      ]
    },
    "description": {
      "type": "object",
      "properties": {
        "text": {
          "type": "string"
        },
        "license": {
          "type": "string"
        },
        "url": {
          "type": "string",
          "format": "uri"
        }
      }
    },
    "logo_sm": {
      "type": "string"
    },
    "logo_md": {
      "type": "string"
    },
    "logo_lg": {
      "type": "string"
    },
    "url": {
      "type": "string",
      "format": "uri"
    },
    "wikipedia_url": {
      "type": "string",
      "format": "uri"
    },
    "region": {
      "type": "string"
    },
    "subregion": {
      "type": "string"
    },
    "country_code": {
      "type": "string"
    },
    "country_name": {
      "type": "string"
    },
    "institution_type": {
      "type": "string"
    },
    "start_year": {
      "type": "integer"
    },
    "end_year": {
      "type": "integer"
    },
    "acronyms": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "repositories": {
      "type": "array",
      "items": {
        "type": "object"
      }
    },
    "stats": {
      "$ref": "#/$defs/stats"
    },
    "years": {
      "type": "array",
      "description": "Per-year time series; 26 entries observed for Curtin University (02n415q13).",
      "items": {
        "type": "object",
        "required": [
          "year",
          "stats"
        ],
        "properties": {
          "year": {
            "type": "integer"
          },
          "date": {
            "type": "string"
          },
          "stats": {
            "$ref": "#/$defs/stats"
          }
        }
      }
    }
  },
  "$defs": {
    "stats": {
      "type": "object",
      "description": "Open-access counts (n_) and percentages (p_) for one entity and period.",
      "properties": {
        "n_citations": {
          "type": "integer"
        },
        "n_outputs": {
          "type": "integer"
        },
        "n_outputs_open": {
          "type": "integer"
        },
        "n_outputs_publisher_open": {
          "type": "integer"
        },
        "n_outputs_publisher_open_only": {
          "type": "integer"
        },
        "n_outputs_both": {
          "type": "integer"
        },
        "n_outputs_other_platform_open": {
          "type": "integer"
        },
        "n_outputs_other_platform_open_only": {
          "type": "integer"
        },
        "n_outputs_closed": {
          "type": "integer"
        },
        "n_outputs_oa_journal": {
          "type": "integer"
        },
        "n_outputs_hybrid": {
          "type": "integer"
        },
        "n_outputs_no_guarantees": {
          "type": "integer"
        },
        "n_outputs_preprint": {
          "type": "integer"
        },
        "n_outputs_domain": {
          "type": "integer"
        },
        "n_outputs_institution": {
          "type": "integer"
        },
        "n_outputs_public": {
          "type": "integer"
        },
        "n_outputs_other_internet": {
          "type": "integer"
        },
        "n_outputs_black": {
          "type": "integer"
        },
        "p_outputs_open": {
          "type": "number"
        },
        "p_outputs_publisher_open": {
          "type": "number"
        },
        "p_outputs_publisher_open_only": {
          "type": "number"
        },
        "p_outputs_both": {
          "type": "number"
        },
        "p_outputs_other_platform_open": {
          "type": "number"
        },
        "p_outputs_other_platform_open_only": {
          "type": "number"
        },
        "p_outputs_closed": {
          "type": "number"
        },
        "p_outputs_oa_journal": {
          "type": "number"
        },
        "p_outputs_hybrid": {
          "type": "number"
        },
        "p_outputs_no_guarantees": {
          "type": "number"
        },
        "p_outputs_preprint": {
          "type": "number"
        },
        "p_outputs_domain": {
          "type": "number"
        },
        "p_outputs_institution": {
          "type": "number"
        },
        "p_outputs_public": {
          "type": "number"
        },
        "p_outputs_other_internet": {
          "type": "number"
        },
        "p_outputs_black": {
          "type": "number"
        }
      }
    }
  }
}