noms-digital-studio/new-nomis-api

Name: new-nomis-api

Owner: NOMS Digital Studio

Description: Spring Boot API over the Nomis data model

Created: 2018-03-05 13:41:20.0

Updated: 2018-05-23 16:43:32.0

Pushed: 2018-05-23 16:43:31.0

Homepage: null

Size: 4207

Language: Java

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

New Nomis API

New Tech Nomis: Offender API.

The service provides REST access to the Nomis Oracle DB offender information.

Continuous Integration

https://circleci.com/gh/noms-digital-studio/new-nomis-api

Gradle commands
Build and run tests
adlew build
Assessmble the app
adlew assemble

This makes the JAR executable by including a manifest.

Start the application dev profile

This profile starts the application additional configuration this mode uses an in memory H2 (empty) database and is populated with a sample data set

NG_PROFILES_ACTIVE=dev java -jar build/libs/new-nomis-api.jar
Start the application with Nomis Oracle db
NG_PROFILES_ACTIVE=oracle SPRING_DATASOURCE_URL=jdbc:oracle:thin:@<VM Oracle IP address>:1521:<sid> java -jar build/libs/new-nomis-api.jar
Additional configuration

The application is conigured 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

Default port

Starts the application on port '8080'. To override, set server.port (eg SERVER_PORT=8099 java -jar etc etc)

Documentation

http://localhost:8080/api/swagger-ui.html

Endpoints curl examples
List offenders details
 -X GET http://localhost:8080/offenders'
Application info
 -X GET http://localhost:8080/info
Application health
 -X GET http://localhost:8080/health

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.