This application provides an API to preview a dataset distribution. Currently this service only supports CSV (text/csv and application/vnd.ms-excel) to render as table.
For a broader understanding of the system’s context, refer to the architecture documentation wiki. For more specific context on this application, see the Portal subsystem section.
These instructions will give you a copy of the project up and running on your local machine for development and testing purposes.
Ensure you have the following installed:
- Java 21
- Maven
Clone the repository
git clone https://github.com/Informasjonsforvaltning/fdk-dataset-preview-service.git
cd fdk-dataset-preview-serviceAPI_KEY- API KEY used to access the endpointALLOWED_ORIGINS- ALLOWED_ORIGINS used to configure cors settings
mvn spring-boot:run -Dspring-boot.run.profiles=developAdd the X-API-KEY header to your requests and use the value configured for API_KEY.
Add the X-XSRF-TOKEN header to your requests and use the cookie value of DATASET-PREVIEW-CSRF-TOKEN.
Once the application is running locally, the API documentation can be accessed at http://localhost:8080/swagger-ui/index.html
mvn verify