New Tech Nomis: Offender API.
The service provides REST access to the Nomis Oracle DB offender information.
https://circleci.com/gh/noms-digital-studio/custody-api
./gradlew build
./gradlew assemble
This makes the JAR executable by including a manifest.
This profile starts the application additional configuration. This mode uses an in memory H2 (empty) database and is populated with a sample data set
SPRING_PROFILES_ACTIVE=dev java -jar build/libs/custody-api.jar
SPRING_PROFILES_ACTIVE=oracle SPRING_DATASOURCE_URL=jdbc:oracle:thin:@<VM Oracle IP address>:1521:<sid> java -jar build/libs/custody-api.jar
The application is configured with conventional Spring parameters. The Spring documentation can be found here:
https://docs.spring.io/spring-boot/docs/current/reference/html/common-application-properties.html
Starts the application on port '8080'. To override, set server.port (eg SERVER_PORT=8099 java -jar etc etc)
http://localhost:8080/api/swagger-ui.html
/ping
: will respondpong
to all requests. This should be used by dependent systems to check connectivity to custody, rather than calling the/health
endpoint./health
: provides information about the application health and its dependencies. This should only be used by custody health monitoring (e.g. pager duty) and not other systems who wish to find out the state of custody./info
: provides information about the version of deployed application.
curl -X GET http://localhost:8080/offenders'
curl -X GET http://localhost:8080/info
curl -X GET http://localhost:8080/health
curl -X GET http://localhost:8080/ping