Name: delius-offender-api
Owner: NOMS Digital Studio
Description: New Tech Delius: Offender API
Created: 2017-10-03 10:19:38.0
Updated: 2018-04-27 16:16:26.0
Pushed: 2018-04-27 16:22:10.0
Homepage: null
Size: 3990
Language: Java
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
New Tech Delius: Offender API.
The service provides REST access to the Delius Oracle DB offender information.
https://circleci.com/gh/noms-digital-studio/delius-offender-api
adlew build
adlew assemble
This makes the JAR executable by including a manifest.
Without additional configuration this mode uses an in memory H2 (empty) database and an in memory LDAP service which references a file resource in the JAR (schema.ldif).
-jar build/libs/delius-offender-api.jar
set SPRING_PROFILES_ACTIVE=oracle
NG_DATASOURCE_URL=jdbc:oracle:thin:@<VM Oracle IP address>:1521:DNDA SPRING_PROFILES_ACTIVE=oracle java -jar build/libs/delius-offender-api.jar
NG_LDAP_URLS=ldap://<ldap_addr>:<ldap_port> SPRING_LDAP_USERNAME=cn=orcladmin SPRING_LDAP_PASSWORD=<secret> java -jar build/libs/delius-offender-api.jar
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
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
The logon body must be a fully qualified LDAP distinguished name:
cn=nick.redshaw,cn=Users,dc=moj,dc=com
-X POST http://localhost:8080/api/logon -H 'Content-Type: text/plain' -d 'uid=jihn,ou=people,dc=memorynotfound,dc=com'
-X GET http://localhost:8080/api/offenders/12344568 -H 'Authorization: <token>'
-X GET http://localhost:8080/api/info
-X GET http://localhost:8080/api/health