{
  "openapi": "3.1.0",
  "info": {
    "title": "INDEC Public Data API",
    "version": "1.0.0",
    "summary": "Akses terbuka ke Indonesia Emas Progress Index (IEPI) dan Indonesia Pulse Monitor (IPM).",
    "description": "API publik INDEC menyajikan skor IEPI resmi per edisi bulanan, katalog pilar dan indikator, metodologi, serta snapshot Indonesia Pulse Monitor. Seluruh endpoint bersifat GET, tanpa autentikasi, dan mengizinkan CORS dari semua origin sehingga dapat dipanggil langsung dari browser situs mitra.",
    "contact": {
      "name": "INDEC — Indonesia Development Catalyst",
      "email": "engage@indec.id",
      "url": "https://indec.id"
    },
    "license": {
      "name": "Creative Commons Attribution 4.0 International",
      "url": "https://creativecommons.org/licenses/by/4.0/"
    }
  },
  "servers": [
    {
      "url": "https://indec.id/api/v1",
      "description": "Produksi"
    }
  ],
  "tags": [
    {
      "name": "IEPI",
      "description": "Indonesia Emas Progress Index"
    },
    {
      "name": "IPM",
      "description": "Indonesia Pulse Monitor"
    },
    {
      "name": "Service",
      "description": "Discovery & status"
    }
  ],
  "paths": {
    "/index.json": {
      "get": {
        "tags": [
          "Service"
        ],
        "operationId": "getServiceIndex",
        "summary": "Discovery seluruh endpoint",
        "responses": {
          "200": {
            "description": "Dokumen discovery",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/health": {
      "get": {
        "tags": [
          "Service"
        ],
        "operationId": "getHealth",
        "summary": "Status layanan",
        "responses": {
          "200": {
            "description": "Status layanan",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/iepi/current": {
      "get": {
        "tags": [
          "IEPI"
        ],
        "operationId": "getCurrentEdition",
        "summary": "Skor IEPI edisi terkini",
        "responses": {
          "200": {
            "description": "Edisi terkini, saat ini Sep 2026",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/iepi/editions": {
      "get": {
        "tags": [
          "IEPI"
        ],
        "operationId": "listEditions",
        "summary": "Seluruh edisi terpublikasi",
        "responses": {
          "200": {
            "description": "Koleksi edisi",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/iepi/editions/{period}": {
      "get": {
        "tags": [
          "IEPI"
        ],
        "operationId": "getEdition",
        "summary": "Satu edisi berdasarkan periode",
        "parameters": [
          {
            "name": "period",
            "in": "path",
            "required": true,
            "description": "Periode edisi, format YYYY-MM",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]{4}-[0-9]{2}$",
              "examples": [
                "2026-06",
                "2026-07",
                "2026-08",
                "2026-09"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Edisi yang diminta",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "Periode tidak ditemukan"
          }
        }
      }
    },
    "/iepi/pillars": {
      "get": {
        "tags": [
          "IEPI"
        ],
        "operationId": "listPillars",
        "summary": "Katalog enam pilar",
        "responses": {
          "200": {
            "description": "Koleksi pilar",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/iepi/indicators": {
      "get": {
        "tags": [
          "IEPI"
        ],
        "operationId": "listIndicators",
        "summary": "Worksheet 32 indikator",
        "responses": {
          "200": {
            "description": "Koleksi indikator",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/iepi/methodology": {
      "get": {
        "tags": [
          "IEPI"
        ],
        "operationId": "getMethodology",
        "summary": "Metodologi dan rumus",
        "responses": {
          "200": {
            "description": "Dokumen metodologi",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/iepi/badge.svg": {
      "get": {
        "tags": [
          "IEPI"
        ],
        "operationId": "getBadge",
        "summary": "Badge SVG skor terkini",
        "responses": {
          "200": {
            "description": "Badge SVG",
            "content": {
              "image/svg+xml": {}
            }
          }
        }
      }
    },
    "/ipm/current": {
      "get": {
        "tags": [
          "IPM"
        ],
        "operationId": "getIpmCurrent",
        "summary": "Snapshot IPM 30 hari terakhir",
        "responses": {
          "200": {
            "description": "Snapshot IPM",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    }
  }
}
