Run with Gradle
./gradlew bootRun
By default the port is 8080
You need to have a running MongoDB locally with default port
By default the port is 8888
./gradlew build
docker build --tag=iapps:latest .
docker-compose up
Upload XML file available at POST v1/files
A test XML file can be found at /src/test/resources/xml
curl --location --request POST 'http://localhost:8080/v1/files' \
--header 'Accept: application/xml' \
--form 'file=@"/path/to/file"'
Search files available at GET v1/files
Search all files
curl --location --request GET 'http://localhost:8080/v1/files' \
--header 'Accept: application/xml'
Search files with pagination using page
and size
curl --location --request GET 'http://localhost:8080/v1/files?page=0&size=2' \
--header 'Accept: application/xml'
Search files with example of payload. By any of this properties id
createdAt
filename
newspaperName
width
height
dpi
.
By id
curl --location --request GET 'http://localhost:8080/v1/files' \
--header 'Accept: application/xml' \
--header 'Content-Type: application/xml' \
--data-raw '
<content>
<id>639276670f2d05116daba03c</id>
</content>'
By filename
curl --location --request GET 'http://localhost:8080/v1/files' \
--header 'Accept: application/xml' \
--header 'Content-Type: application/xml' \
--data-raw '
<content>
<filename>Request.xml</filename>
</content>'
By width
and dpi
curl --location --request GET 'http://localhost:8080/v1/files' \
--header 'Accept: application/xml' \
--header 'Content-Type: application/xml' \
--data-raw '
<content>
<width>1280</width>
<dpi>300</dpi>
</content>'