Giter Club home page Giter Club logo

ministryofjustice.custody-api's Introduction

Custody 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/custody-api

Gradle commands

Build and run tests

./gradlew build

Assemble the app

./gradlew 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

SPRING_PROFILES_ACTIVE=dev java -jar build/libs/custody-api.jar

Start the application with Nomis Oracle db

SPRING_PROFILES_ACTIVE=oracle SPRING_DATASOURCE_URL=jdbc:oracle:thin:@<VM Oracle IP address>:1521:<sid> java -jar build/libs/custody-api.jar

Additional configuration

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

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

Application health and info

  • /ping: will respond pong 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.

Endpoints curl examples

List offenders details

curl -X GET http://localhost:8080/offenders'

Application info

curl -X GET http://localhost:8080/info

Application health

curl -X GET http://localhost:8080/health

Application Ping Endpoint

curl -X GET http://localhost:8080/ping

ministryofjustice.custody-api's People

Contributors

llmikeyj avatar mattonfoot avatar mjwillis avatar petergphillips avatar retroredge avatar simonmitchellmoj avatar lbennett-moj avatar andymarke avatar mattops avatar steverendell avatar whitfield-mj avatar matt-crowson-moj avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.