{
  "openapi": "3.0.0",
  "info": {
    "title": "Geo-validatieservice",
    "description": "Ozon biedt een service om GML, meer in het algemeen Geometrische records, te valideren.\nDeze geovalidatieservice ontvangt een notificatie en verwerkt deze. De service wordt ook wel het geovalidatie aanlever koppelvlak genoemd.\nDe Geovalidatieservice API volgt de standaarden zoals beschreven in de DSO API-strategie versie 2.0.\n",
    "termsOfService": "https://aandeslagmetdeomgevingswet.nl/ontwikkelaarsportaal/services/fair-use-policy/",
    "contact": {
      "name": "Kadaster DSO - Team Ozon",
      "url": "https://aandeslagmetdeomgevingswet.nl/ontwikkelaarsportaal/services/contact/"
    },
    "version": "1.4.1"
  },
  "externalDocs": {
    "url": "https://aandeslagmetdeomgevingswet.nl/ontwikkelaarsportaal/api-register/api/geo-validatieservice/"
  },
  "servers": [
    {
      "url": "/publiek/geometrie/api/valideren/v1",
      "description": "de API op deze server"
    },
    {
      "url": "https://service.omgevingswet.overheid.nl/publiek/geometrie/api/valideren/v1",
      "description": "de API op de productieomgeving van DSO-LV"
    },
    {
      "url": "https://service.pre.omgevingswet.overheid.nl/publiek/geometrie/api/valideren/v1",
      "description": "de API op de pre-productieomgeving van DSO-LV"
    }
  ],
  "security": [
    {
      "apiKey": []
    }
  ],
  "tags": [
    {
      "name": "Geovalideren",
      "description": "Geovalideren is een proces dat geometrische records kan valideren."
    }
  ],
  "paths": {
    "/": {
      "post": {
        "tags": [
          "Geovalideren"
        ],
        "summary": "Een geovalidatieverzoek indienen",
        "operationId": "geovalideren",
        "parameters": [
          {
            "name": "correlationid",
            "in": "header",
            "required": false,
            "style": "simple",
            "explode": false,
            "schema": {
              "type": "string",
              "example": "00000001003214345000--00000001003214345000-opdracht_O_20220725_140247575_1"
            }
          }
        ],
        "requestBody": {
          "description": "Geovalidatieopdracht",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Geovalidatieopdracht"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "idLevering",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "Als de attributen invalide zijn",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "406": {
            "description": "Als de attributen invalide zijn",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Als de URL niet bereikbaar is, of de grootte niet in orde is",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "callbacks": {
          "verstuurGeovalidatieRapport": {
            "{$request.body#/responsurl}": {
              "put": {
                "operationId": "putGeovalidatieRapport",
                "requestBody": {
                  "content": {
                    "application/json": {
                      "schema": {
                        "$ref": "#/components/schemas/Rapport"
                      }
                    }
                  }
                },
                "responses": {
                  "200": {
                    "description": "GeovalidatieRapport geaccepteerd"
                  },
                  "400": {
                    "description": "GeovalidatieRapport niet geaccepteerd"
                  },
                  "500": {
                    "description": "Interne fout bij de verwerking van het GeovalidatieRapport"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/rapport/{identificatie}": {
      "get": {
        "tags": [
          "Geovalideren"
        ],
        "summary": "Een geovalidatierapport opvragen",
        "operationId": "validatierapport",
        "parameters": [
          {
            "name": "identificatie",
            "in": "path",
            "required": true,
            "style": "simple",
            "explode": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "correlationid",
            "in": "header",
            "required": false,
            "style": "simple",
            "explode": false,
            "schema": {
              "type": "string",
              "example": "00000001003214345000--00000001003214345000-opdracht_O_20220725_140247575_1"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Rapport",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Rapport"
                }
              }
            }
          },
          "404": {
            "description": "Rapport niet gevonden"
          }
        }
      }
    },
    "/health": {
      "get": {
        "tags": [
          "Meta"
        ],
        "summary": "Dit endpoint levert health informatie uit, maar volgt niet de DSO API-strategie en is daarom deprecated met /app-health als vervanger.",
        "operationId": "getHealth",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HealthResponse"
                }
              }
            }
          },
          "default": {
            "description": "Onverwacht probleem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "deprecated": true
      }
    },
    "/app-health": {
      "get": {
        "tags": [
          "Meta"
        ],
        "summary": "app-health info",
        "operationId": "getAppHealth",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppHealthResponse"
                },
                "example": {
                  "app-health": {
                    "status": "UP"
                  }
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppHealthResponse"
                },
                "example": {
                  "app-health": {
                    "status": "DOWN"
                  }
                }
              }
            }
          },
          "default": {
            "description": "Onverwacht probleem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/app-info": {
      "get": {
        "tags": [
          "Meta"
        ],
        "summary": "applicatie info",
        "operationId": "getInfo",
        "responses": {
          "200": {
            "description": "Info",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Info"
                }
              }
            }
          },
          "default": {
            "description": "Onverwacht probleem",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Geovalidatieopdracht": {
        "required": [
          "checksum",
          "grootte",
          "identificatie",
          "url"
        ],
        "type": "object",
        "properties": {
          "identificatie": {
            "pattern": "^[\\w\\._-]{0,100}$",
            "type": "string",
            "description": "referentie van de opdracht"
          },
          "checksum": {
            "pattern": "[A-Fa-f0-9]{64}",
            "type": "string",
            "description": "SHA256 checksum (64-hex chars)"
          },
          "grootte": {
            "maximum": 1000000000,
            "minimum": 1,
            "type": "integer",
            "description": "grootte bestand (Bytes)"
          },
          "url": {
            "$ref": "#/components/schemas/ZipLocatie"
          },
          "responsurl": {
            "$ref": "#/components/schemas/ResponsLocatie"
          }
        },
        "description": "Geovalidatieobject voor doorgevan van validatieattributen.",
        "example": {
          "identificatie": "referentie1234",
          "checksum": "7b7315b4918ad2e2b5d28859194be8d13ad0849f165458f06d670f07d8005f17",
          "grootte": 74260,
          "url": "http://lvbbod-test-omgeving.fto.kadaster.nl:80/document/beheer-upload/0aea977c-209d-407e-943e-cc9f2485edfc.zip",
          "responsurl": "https://overheid.nl/rapport"
        }
      },
      "ZipLocatie": {
        "type": "string",
        "description": "Locatie van de aangeboden ZIP (HTTPS URL).",
        "format": "url",
        "example": "https://filestore.gemeente.nl/te-valideren-geometrieen.zip"
      },
      "ResponsLocatie": {
        "type": "string",
        "description": "Naar deze HTTPS URL wordt het Rapport gestuurd wanneer verwerken van de Geovalidatieopdracht klaar is.",
        "format": "url",
        "example": "https://gemeente.nl/api/rapport"
      },
      "Rapport": {
        "required": [
          "identificatie"
        ],
        "type": "object",
        "properties": {
          "identificatie": {
            "type": "string",
            "description": "De identificatie die de service teruggaf na het plaatsen van de Geovalidatieopdracht. Met deze identificatie kan het Rapport opgehaald worden."
          },
          "referentie": {
            "type": "string",
            "description": "De referentie die meegegeven werd door de client bij het plaatsen van de Geovalidatieopdracht. Komt overeen met Geovalidatieopdracht.identificatie."
          },
          "status": {
            "type": "string",
            "description": "Het resultaat van de valiatieopdracht (OK/NOK)."
          },
          "meldingen": {
            "type": "array",
            "description": "De validatiemeldingen.",
            "items": {
              "$ref": "#/components/schemas/Melding"
            }
          }
        },
        "description": "rapport"
      },
      "Melding": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "description": "code"
          },
          "omschrijving": {
            "type": "string",
            "description": "omschrijving"
          },
          "detail": {
            "type": "string",
            "description": "detail"
          },
          "objectIdentificatie": {
            "type": "string",
            "description": "identificatie van het object waarover de melding gaat",
            "example": "0868A0B1-DA79-4C33-8305-1BDE0126FA9A"
          },
          "ernst": {
            "type": "string",
            "description": "ernst van de melding",
            "enum": [
              "INFO",
              "WARNING",
              "ERROR",
              "FATAL"
            ]
          }
        },
        "description": "Een validatiemelding in het Rapport."
      },
      "Error": {
        "type": "object",
        "properties": {
          "timestamp": {
            "type": "string"
          },
          "status": {
            "type": "integer"
          },
          "error": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "path": {
            "type": "string"
          }
        },
        "description": "Foutmelding"
      },
      "HealthResponse": {
        "required": [
          "status"
        ],
        "type": "object",
        "properties": {
          "status": {
            "$ref": "#/components/schemas/AppHealthStatus"
          }
        }
      },
      "AppHealthResponse": {
        "title": "AppHealthResponse",
        "required": [
          "app-health"
        ],
        "type": "object",
        "properties": {
          "app-health": {
            "title": "AppHealth",
            "required": [
              "status"
            ],
            "type": "object",
            "properties": {
              "status": {
                "$ref": "#/components/schemas/AppHealthStatus"
              }
            }
          }
        }
      },
      "AppHealthStatus": {
        "type": "string",
        "enum": [
          "UP",
          "DOWN"
        ]
      },
      "Info": {
        "required": [
          "app-info"
        ],
        "type": "object",
        "properties": {
          "app-info": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "description": "Mens-leesbare naam van deze API."
              },
              "version": {
                "type": "string",
                "description": "De versie van deze API zoals te lezen in de API spec en overeenkomende met de API-Version response header"
              },
              "description": {
                "type": "string",
                "description": "Mens-leesbare beschrijving van deze API"
              },
              "gmlVersion": {
                "type": "string",
                "description": "De versie van GML (http://www.opengeospatial.org/standards/gml) waarmee deze service valideert."
              }
            }
          }
        },
        "description": "Informatie over deze API, bijvoorbeeld de versie van de API en de versie van de gebruikte standaarden"
      }
    },
    "securitySchemes": {
      "apiKey": {
        "type": "apiKey",
        "description": "De API-key die je hebt gekregen dient bij elke request naar de\nAPI via de `x-api-key` request header meegestuurd te worden. Indien deze\nniet juist wordt meegestuurd, of het een ongeldige key betreft, zul je de\nfoutmelding `403 Forbidden` terugkrijgen.\n",
        "name": "x-api-key",
        "in": "header"
      }
    }
  }
}
