|
|
# Validatieservice #
|
|
|
|
|
|
## Usage ##
|
|
|
|
|
|
Start the docker image normally (e.g., using ``docker run -itp 8080:8080 registry.istandaarden.nl/modules/dvs`` or ``docker run -itp 8080:8080 registry.istandaarden.nl/modules/dvs:1.0.0``); on start-up, the image retrieves updates from the update server. Updates are subsequently fetched daily at 03:00. If updates cannot be fetched, the image will run with its own built-in XSLTs.
|
|
|
|
|
|
All requests **must** include a ``Content-Type`` header with value ``application/x-www-form-urlencoded`` and a correct ``Content-Length`` header.
|
|
|
|
|
|
### Health check ###
|
|
|
|
|
|
Endpoint: ``<host>:8080/status``
|
|
|
|
|
|
Method: ``GET``
|
|
|
|
|
|
Example:
|
|
|
```
|
|
|
curl localhost:8080/status
|
|
|
```
|
|
|
|
|
|
### Validate message ###
|
|
|
|
|
|
Endpoint: ``<host>:8080/validatie``
|
|
|
|
|
|
Method: ``POST``
|
|
|
|
|
|
Example:
|
|
|
```
|
|
|
curl -X POST --data-binary @bericht.xml localhost:8080/validatie
|
|
|
```
|
|
|
|
|
|
### Generate retourbericht ###
|
|
|
|
|
|
Endpoint: ``<host>:8080/retour``
|
|
|
|
|
|
Method: ``POST``
|
|
|
|
|
|
Example:
|
|
|
```
|
|
|
curl -X POST --data-binary @heenbericht.xml localhost:8080/retour
|
|
|
```
|
|
|
|
|
|
### Error codes ###
|
|
|
|
|
|
| Code | Reason |
|
|
|
| ------ | ------ |
|
|
|
| 200 | Message technically good, see response for any functional errors |
|
|
|
| 404 | Invalid request; request with wrong method to to wrong endpoint |
|
|
|
| 406 | Invalid request; message does not match any schema (unsupported type or technically invalid messsage) |
|
|
|
| 411 | Invalid request; must specify a Content-Length header |
|
|
|
| 415 | Invalid request; must use Content-Type exactly ``application/x-www-form-urlencoded`` (with no additional data like charset, etc.) |
|
|
|
| 500 | Something went wrong in the server | |