Skip to content

This is a replacement API for the existing Book a video link service which in turn will allow court and probation pilot users book video link hearings in prison for court hearings and probation meetings accordingly.

License

Notifications You must be signed in to change notification settings

ministryofjustice/hmpps-book-a-video-link-api

Repository files navigation

hmpps-book-a-video-link-api

repo standards badge CircleCI Docker Repository on Quay API docs

API to support the front end service allowing court and probation users to book and manage video link hearings/appointments with people in prison.

Building the project

Tools required:

  • JDK v21+
  • Kotlin (Intellij)
  • docker
  • docker-compose

Useful tools but not essential:

  • KUBECTL not essential for building the project but will be needed for other tasks. Can be installed with brew.
  • k9s a terminal based UI to interact with your Kubernetes clusters. Can be installed with brew.
  • jq a lightweight and flexible command-line JSON processor. Can be installed with brew.

Install gradle and build the project

./gradlew
./gradlew clean build

Running the service

There are two key environment variables needed to run the service. The system client id and secret used to retrieve the OAuth 2.0 access token needed for service to service API calls can be set as local environment variables. This allows API calls made from this service that do not use the caller's token to successfully authenticate.

Add the following to a local .env file in the root folder of this project (you can extract the credentials from the dev k8s project namespace).

N.B. you must escape any '$' characters with '\$'

SYSTEM_CLIENT_ID=<system.client.id>
SYSTEM_CLIENT_SECRET=<system.client.secret>

Start up the docker dependencies using the docker-compose file.

docker-compose up --remove-orphans

There is a script to help, which sets local profiles, port and DB connection properties to the values required.

./run-local.sh

Testing GOV Notify locally

To test Gov Notify emails locally, you just need to add one more variable to your .env file.

export NOTIFY_API_KEY=<gov.notify.api.key>

If you have added it correctly, you will see the log on startup with the following output:

Gov Notify emails are enabled

About

This is a replacement API for the existing Book a video link service which in turn will allow court and probation pilot users book video link hearings in prison for court hearings and probation meetings accordingly.

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages