{
  "openapi": "3.1.0",
  "info": {
    "title": "Tempussit open data API",
    "version": "1.0.0",
    "description": "Read-only JSON of everything published on Tempussit: courses, blog articles, terms and frequently asked questions. Only GET and HEAD. No key. Requests are rate limited per IP address (429 with Retry-After). Responses: Cache-Control: public, max-age=300, Access-Control-Allow-Origin: *. No drafts, purchases or personal data.",
    "contact": {
      "email": "support@tempussit.com"
    }
  },
  "servers": [
    {
      "url": "https://tempussit.com"
    }
  ],
  "paths": {
    "/data/v1/index.json": {
      "get": {
        "summary": "Table of contents: site languages, course catalogs and links to every data file.",
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "example": "public, max-age=300"
                }
              },
              "Access-Control-Allow-Origin": {
                "schema": {
                  "type": "string",
                  "example": "*"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OpenDataIndex"
                }
              }
            }
          },
          "404": {
            "description": "Not published, unknown or hidden."
          },
          "429": {
            "description": "Too many requests from this IP address.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                }
              }
            }
          }
        }
      }
    },
    "/data/v1/courses/{languageKey}.json": {
      "get": {
        "summary": "Published courses of one catalog language, 100 per page.",
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "example": "public, max-age=300"
                }
              },
              "Access-Control-Allow-Origin": {
                "schema": {
                  "type": "string",
                  "example": "*"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OpenCoursePage"
                }
              }
            }
          },
          "404": {
            "description": "Not published, unknown or hidden."
          },
          "429": {
            "description": "Too many requests from this IP address.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "languageKey",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ]
      }
    },
    "/data/v1/course/{slug}.json": {
      "get": {
        "summary": "Card of one published course: title, description, author, languages, price, programme, page address, cover 1200×630.",
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "example": "public, max-age=300"
                }
              },
              "Access-Control-Allow-Origin": {
                "schema": {
                  "type": "string",
                  "example": "*"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OpenCourseCard"
                }
              }
            }
          },
          "404": {
            "description": "Not published, unknown or hidden."
          },
          "429": {
            "description": "Too many requests from this IP address.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/data/v1/{languageCode}/{kind}.json": {
      "get": {
        "summary": "Terms (glossary), frequently asked questions (faq), blog sections (sections) or articles (articles, 100 per page) in one site language.",
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "example": "public, max-age=300"
                }
              },
              "Access-Control-Allow-Origin": {
                "schema": {
                  "type": "string",
                  "example": "*"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/OpenTerm"
                      }
                    },
                    {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/OpenQuestion"
                      }
                    },
                    {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/OpenSection"
                      }
                    },
                    {
                      "$ref": "#/components/schemas/OpenArticlePage"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not published, unknown or hidden."
          },
          "429": {
            "description": "Too many requests from this IP address.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "languageCode",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "kind",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "glossary",
                "faq",
                "sections",
                "articles"
              ]
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ]
      }
    },
    "/data/v1/openapi.json": {
      "get": {
        "summary": "This document.",
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "example": "public, max-age=300"
                }
              },
              "Access-Control-Allow-Origin": {
                "schema": {
                  "type": "string",
                  "example": "*"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "Not published, unknown or hidden."
          },
          "429": {
            "description": "Too many requests from this IP address.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "OpenDataIndex": {
        "type": "object",
        "properties": {
          "site": {
            "type": "string"
          },
          "llmsTxt": {
            "type": "string"
          },
          "languages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OpenDataLanguage"
            }
          },
          "catalogs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OpenDataCatalog"
            }
          },
          "openApi": {
            "type": [
              "string",
              "null"
            ]
          },
          "course": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "site",
          "llmsTxt",
          "languages",
          "catalogs"
        ],
        "additionalProperties": false
      },
      "OpenDataLanguage": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "home": {
            "type": "string"
          },
          "markdown": {
            "type": "string"
          },
          "llmsFull": {
            "type": "string"
          },
          "glossary": {
            "type": "string"
          },
          "faq": {
            "type": "string"
          },
          "sections": {
            "type": "string"
          },
          "articles": {
            "type": "string"
          }
        },
        "required": [
          "code",
          "name",
          "home",
          "markdown",
          "llmsFull",
          "glossary",
          "faq",
          "sections",
          "articles"
        ],
        "additionalProperties": false
      },
      "OpenDataCatalog": {
        "type": "object",
        "properties": {
          "language": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "markdown": {
            "type": "string"
          },
          "courses": {
            "type": "string"
          }
        },
        "required": [
          "language",
          "name",
          "url",
          "markdown",
          "courses"
        ],
        "additionalProperties": false
      },
      "OpenCoursePage": {
        "type": "object",
        "properties": {
          "page": {
            "type": "integer"
          },
          "pageSize": {
            "type": "integer"
          },
          "total": {
            "type": "integer"
          },
          "next": {
            "type": [
              "string",
              "null"
            ]
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OpenCourse"
            }
          }
        },
        "required": [
          "page",
          "pageSize",
          "total",
          "items"
        ],
        "additionalProperties": false
      },
      "OpenCourse": {
        "type": "object",
        "properties": {
          "slug": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "markdown": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "author": {
            "type": [
              "string",
              "null"
            ]
          },
          "language": {
            "type": [
              "string",
              "null"
            ]
          },
          "price": {
            "type": "string"
          },
          "topic": {
            "type": [
              "string",
              "null"
            ]
          },
          "lessons": {
            "type": [
              "integer",
              "null"
            ]
          },
          "cover": {
            "type": [
              "string",
              "null"
            ]
          },
          "dateModified": {
            "type": [
              "string",
              "null"
            ]
          },
          "data": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "slug",
          "url",
          "markdown",
          "title",
          "price"
        ],
        "additionalProperties": false
      },
      "OpenCourseCard": {
        "type": "object",
        "properties": {
          "slug": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "markdown": {
            "type": "string"
          },
          "data": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "author": {
            "type": [
              "string",
              "null"
            ]
          },
          "language": {
            "type": "string"
          },
          "languages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OpenVersion"
            }
          },
          "packages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OpenCoursePackage"
            }
          },
          "program": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OpenCourseModule"
            }
          },
          "cover": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/OpenCourseCover"
              },
              {
                "type": "null"
              }
            ]
          },
          "dateModified": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "slug",
          "url",
          "markdown",
          "data",
          "title",
          "language",
          "languages",
          "packages",
          "program"
        ],
        "additionalProperties": false
      },
      "OpenVersion": {
        "type": "object",
        "properties": {
          "language": {
            "type": "string"
          },
          "url": {
            "type": "string"
          }
        },
        "required": [
          "language",
          "url"
        ],
        "additionalProperties": false
      },
      "OpenCoursePackage": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string"
          },
          "price": {
            "type": "number"
          },
          "currency": {
            "type": [
              "string",
              "null"
            ]
          },
          "access": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "title",
          "price"
        ],
        "additionalProperties": false
      },
      "OpenCourseModule": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "lessons": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OpenCourseLesson"
            }
          }
        },
        "required": [
          "title",
          "lessons"
        ],
        "additionalProperties": false
      },
      "OpenCourseLesson": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "duration": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "title"
        ],
        "additionalProperties": false
      },
      "OpenCourseCover": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string"
          },
          "width": {
            "type": "integer"
          },
          "height": {
            "type": "integer"
          },
          "type": {
            "type": "string"
          }
        },
        "required": [
          "url",
          "width",
          "height",
          "type"
        ],
        "additionalProperties": false
      },
      "OpenTerm": {
        "type": "object",
        "properties": {
          "anchor": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "definition": {
            "type": "string"
          }
        },
        "required": [
          "anchor",
          "url",
          "name",
          "definition"
        ],
        "additionalProperties": false
      },
      "OpenQuestion": {
        "type": "object",
        "properties": {
          "group": {
            "type": "string"
          },
          "question": {
            "type": "string"
          },
          "answer": {
            "type": "string"
          },
          "url": {
            "type": "string"
          }
        },
        "required": [
          "group",
          "question",
          "answer",
          "url"
        ],
        "additionalProperties": false
      },
      "OpenSection": {
        "type": "object",
        "properties": {
          "slug": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "markdown": {
            "type": "string"
          },
          "articles": {
            "type": "integer"
          }
        },
        "required": [
          "slug",
          "name",
          "url",
          "markdown",
          "articles"
        ],
        "additionalProperties": false
      },
      "OpenArticlePage": {
        "type": "object",
        "properties": {
          "page": {
            "type": "integer"
          },
          "pageSize": {
            "type": "integer"
          },
          "total": {
            "type": "integer"
          },
          "next": {
            "type": [
              "string",
              "null"
            ]
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OpenArticle"
            }
          }
        },
        "required": [
          "page",
          "pageSize",
          "total",
          "items"
        ],
        "additionalProperties": false
      },
      "OpenArticle": {
        "type": "object",
        "properties": {
          "language": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "markdown": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "lead": {
            "type": "string"
          },
          "audience": {
            "type": "string"
          },
          "section": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/OpenSectionRef"
              },
              {
                "type": "null"
              }
            ]
          },
          "datePublished": {
            "type": "string"
          },
          "dateModified": {
            "type": "string"
          },
          "readingTime": {
            "type": "string"
          },
          "cover": {
            "type": [
              "string",
              "null"
            ]
          },
          "versions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OpenVersion"
            }
          }
        },
        "required": [
          "language",
          "slug",
          "url",
          "markdown",
          "title",
          "lead",
          "audience",
          "datePublished",
          "dateModified",
          "readingTime",
          "versions"
        ],
        "additionalProperties": false
      },
      "OpenSectionRef": {
        "type": "object",
        "properties": {
          "slug": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "url": {
            "type": "string"
          }
        },
        "required": [
          "slug",
          "name",
          "url"
        ],
        "additionalProperties": false
      }
    }
  }
}