LandRegistry/organisation-api

Name: organisation-api

Owner: HM Land Registry

Description: null

Created: 2017-03-21 12:03:53.0

Updated: 2017-03-21 12:07:52.0

Pushed: 2017-03-21 12:07:51.0

Homepage: null

Size: 17

Language: Python

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Organisation-api

This service is responsible for organisation details and is connected to by deed-api when a Borrower has signed in and is viewing a deed.

See: deed-api at

Contents
Usage

In its current state, you can use the service to retrieve, post or delete an organisation name to a local database. This is used to display an organisation name on a deed in the Borrower Frontend that does not have any unnecessary information within it.

Available routes
    /organisation-name/<organisation_id>    # Get a friendly organisation name
    /organisation/                          # Create an organisation by posting a json object reflecting the schema in the organisation_name views module
te  /organisation/<organisation_id>         # Delete a friendly organisation name
Useful Curl commands
Get

curl localhost:9060/organisation-name/10.1.1

Post

curl -X POST -d '{“organisation_name”: “Bananas”, “organisation_id”: “10.1.1”}' -H “Content-Type: application/json” http://localhost:9060/organisation-name

Delete

curl -X “DELETE” localhost:9060/organisation-name/10.1.1

Quick start
For Flask CLI
rt FLASK_APP=organisation_api/main.py
rt FLASK_DEBUG=1
For Python
rt PYTHONUNBUFFERED=yes
For gunicorn
rt PORT=9060
For app's config.py
rt FLASK_LOG_LEVEL=DEBUG
rt COMMIT=LOCAL

Run the app
k run

or run the shell command:

 run
Unit tests

These bashin instructions apply only for our development environment

in organisation-api

 unittest

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.