{
  "openapi": "3.1.0",
  "info": {
    "title": "I2IDL Glossary of Digital Learning REST API",
    "version": "1.0.0",
    "description": "Public read-only JSON projections of the canonical I2IDL Glossary. API contract version is separate from glossary publication version. Canonical Linked Data remains authoritative."
  },
  "servers": [
    {
      "url": "https://id.i2idl.org"
    }
  ],
  "tags": [
    {
      "name": "Concepts"
    },
    {
      "name": "Semantic graph"
    }
  ],
  "paths": {
    "/api/v1/concepts": {
      "get": {
        "tags": [
          "Concepts"
        ],
        "summary": "List concepts",
        "operationId": "listConcepts",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "field",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "source",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "collection",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 100000,
              "default": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful JSON response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "apiVersion": {
                      "const": "v1"
                    },
                    "publicationVersion": {
                      "type": "string"
                    },
                    "total": {
                      "type": "integer"
                    },
                    "limit": {
                      "type": "integer"
                    },
                    "offset": {
                      "type": "integer"
                    },
                    "nextOffset": {
                      "type": [
                        "integer",
                        "null"
                      ]
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ConceptSummary"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource or route not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "503": {
            "description": "Data temporarily unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "head": {
        "summary": "List concepts (headers only)",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "field",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "source",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "collection",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 100000,
              "default": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Headers only"
          }
        }
      },
      "options": {
        "summary": "CORS preflight",
        "responses": {
          "204": {
            "description": "CORS preflight"
          }
        }
      }
    },
    "/api/v1/concepts/{id}": {
      "get": {
        "tags": [
          "Concepts"
        ],
        "summary": "Retrieve concept",
        "operationId": "retrieveConcept",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
              "maxLength": 160
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful JSON response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "apiVersion": {
                      "const": "v1"
                    },
                    "publicationVersion": {
                      "type": "string"
                    },
                    "concept": {
                      "$ref": "#/components/schemas/ConceptDetail"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource or route not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "503": {
            "description": "Data temporarily unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "head": {
        "summary": "Retrieve concept (headers only)",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
              "maxLength": 160
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Headers only"
          }
        }
      },
      "options": {
        "summary": "CORS preflight",
        "responses": {
          "204": {
            "description": "CORS preflight"
          }
        }
      }
    },
    "/api/v1/concepts/{id}/relationships": {
      "get": {
        "tags": [
          "Semantic graph"
        ],
        "summary": "Concept relationships",
        "operationId": "conceptRelationships",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
              "maxLength": 160
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful JSON response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "apiVersion": {
                      "const": "v1"
                    },
                    "publicationVersion": {
                      "type": "string"
                    },
                    "concept": {
                      "type": "object"
                    },
                    "relationships": {
                      "type": "object",
                      "properties": {
                        "broader": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/Link"
                          }
                        },
                        "narrower": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/Link"
                          }
                        },
                        "related": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/Link"
                          }
                        }
                      }
                    },
                    "externalMappings": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource or route not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "503": {
            "description": "Data temporarily unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "head": {
        "summary": "Concept relationships (headers only)",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
              "maxLength": 160
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Headers only"
          }
        }
      },
      "options": {
        "summary": "CORS preflight",
        "responses": {
          "204": {
            "description": "CORS preflight"
          }
        }
      }
    },
    "/api/v1/concepts/{id}/versions": {
      "get": {
        "tags": [
          "Semantic graph"
        ],
        "summary": "Concept revision history",
        "operationId": "conceptRevisionHistory",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
              "maxLength": 160
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful JSON response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "apiVersion": {
                      "const": "v1"
                    },
                    "publicationVersion": {
                      "type": "string"
                    },
                    "conceptId": {
                      "type": "string"
                    },
                    "uri": {
                      "type": "string"
                    },
                    "currentRevision": {
                      "type": "string"
                    },
                    "revisions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "revision": {
                            "type": "integer"
                          },
                          "uri": {
                            "type": "string"
                          },
                          "sha256": {
                            "type": "string"
                          },
                          "firstObservedRelease": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource or route not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "503": {
            "description": "Data temporarily unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "head": {
        "summary": "Concept revision history (headers only)",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
              "maxLength": 160
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Headers only"
          }
        }
      },
      "options": {
        "summary": "CORS preflight",
        "responses": {
          "204": {
            "description": "CORS preflight"
          }
        }
      }
    },
    "/api/v1/collections": {
      "get": {
        "tags": [
          "Semantic graph"
        ],
        "summary": "List collections",
        "operationId": "listCollections",
        "parameters": [
          {
            "name": "type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "field",
                "type",
                "curated"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 100000,
              "default": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful JSON response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "apiVersion": {
                      "const": "v1"
                    },
                    "publicationVersion": {
                      "type": "string"
                    },
                    "total": {
                      "type": "integer"
                    },
                    "limit": {
                      "type": "integer"
                    },
                    "offset": {
                      "type": "integer"
                    },
                    "nextOffset": {
                      "type": [
                        "integer",
                        "null"
                      ]
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource or route not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "503": {
            "description": "Data temporarily unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "head": {
        "summary": "List collections (headers only)",
        "parameters": [
          {
            "name": "type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "field",
                "type",
                "curated"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 100000,
              "default": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Headers only"
          }
        }
      },
      "options": {
        "summary": "CORS preflight",
        "responses": {
          "204": {
            "description": "CORS preflight"
          }
        }
      }
    },
    "/api/v1/collections/{type}/{id}": {
      "get": {
        "tags": [
          "Semantic graph"
        ],
        "summary": "Collection members",
        "operationId": "collectionMembers",
        "parameters": [
          {
            "name": "type",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "field",
                "type",
                "curated"
              ]
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
              "maxLength": 160
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 100000,
              "default": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful JSON response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "apiVersion": {
                      "const": "v1"
                    },
                    "publicationVersion": {
                      "type": "string"
                    },
                    "collection": {
                      "type": "object"
                    },
                    "total": {
                      "type": "integer"
                    },
                    "limit": {
                      "type": "integer"
                    },
                    "offset": {
                      "type": "integer"
                    },
                    "nextOffset": {
                      "type": [
                        "integer",
                        "null"
                      ]
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Link"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource or route not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "503": {
            "description": "Data temporarily unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "head": {
        "summary": "Collection members (headers only)",
        "parameters": [
          {
            "name": "type",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "field",
                "type",
                "curated"
              ]
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
              "maxLength": 160
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 100000,
              "default": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Headers only"
          }
        }
      },
      "options": {
        "summary": "CORS preflight",
        "responses": {
          "204": {
            "description": "CORS preflight"
          }
        }
      }
    },
    "/api/v1/sources": {
      "get": {
        "tags": [
          "Semantic graph"
        ],
        "summary": "List sources",
        "operationId": "listSources",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful JSON response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "apiVersion": {
                      "const": "v1"
                    },
                    "publicationVersion": {
                      "type": "string"
                    },
                    "total": {
                      "type": "integer"
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource or route not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "503": {
            "description": "Data temporarily unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "head": {
        "summary": "List sources (headers only)",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Headers only"
          }
        }
      },
      "options": {
        "summary": "CORS preflight",
        "responses": {
          "204": {
            "description": "CORS preflight"
          }
        }
      }
    },
    "/api/v1/sources/{id}": {
      "get": {
        "tags": [
          "Semantic graph"
        ],
        "summary": "Retrieve source",
        "operationId": "retrieveSource",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
              "maxLength": 160
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful JSON response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "apiVersion": {
                      "const": "v1"
                    },
                    "publicationVersion": {
                      "type": "string"
                    },
                    "source": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource or route not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "503": {
            "description": "Data temporarily unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "head": {
        "summary": "Retrieve source (headers only)",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
              "maxLength": 160
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Headers only"
          }
        }
      },
      "options": {
        "summary": "CORS preflight",
        "responses": {
          "204": {
            "description": "CORS preflight"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "ApiError": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "required": [
              "code",
              "message"
            ],
            "properties": {
              "code": {
                "type": "string"
              },
              "message": {
                "type": "string"
              }
            }
          }
        }
      },
      "ConceptSummary": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "uri": {
            "type": "string"
          },
          "term": {
            "type": "string"
          },
          "definition": {
            "type": "string"
          },
          "field": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "aka": {
            "type": "string"
          }
        }
      },
      "Link": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "uri": {
            "type": "string",
            "format": "uri"
          },
          "term": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "ConceptDetail": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "uri": {
            "type": "string"
          },
          "term": {
            "type": "string"
          },
          "definition": {
            "type": "string"
          },
          "relationships": {
            "type": "object"
          },
          "sources": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "externalMappings": {
            "type": "array",
            "items": {
              "type": "object"
            }
          }
        }
      }
    }
  }
}
