Git Product home page Git Product logo

hub-content-feed's Introduction

hub-content-feed

REST microservice for the The Hub.

This service is responsible for content metadata delivery to the consumers.

Ministry of Justice. National Offender Management Service.

Build

./gradlew clean build

Run

./gradlew bootRun

Get Content Item for a given ID endpoint

GET /hub-content-feed/content-items/ Retrieve a ContentItem for a given ID which is currently made up of just a title and a media uri.

Examples

Request:

curl -v http://localhost:8080/hub-content-feed/content-items/<id>

Response:

Status: 200
{
  "title": "hub-feature-specs:Upload Course Prospectus",
  "uri": "http://<host>/content-items/hub-feature-specs-test-prospectus1.pdf",
  "id": "589c25c1d12d27267cc7b94a"
}

Get Content Item endpoint

GET /hub-content-feed/content-items Retrieve a single ContentItem which is currently made up of just a title and media uri.

Examples

Request:

curl -v http://localhost:8080/hub-content-feed/content-items

Response:

Status: 200

{
  "contentItems": [
    {
      "title": "hub-feature-specs:Upload Course Prospectus",
      "uri": "http://<host>/content-items/hub-feature-specs-test-prospectus1.pdf",
      "id": "589c25c1d12d27267cc7b94a"
    }
  ]
}

Monitoring endpoint

GET /hub-content-feed/health

e.g.

http://localhost:8080/hub-content-feed/health
http://hub-content-feed.herokuapp.com/hub-content-feed/health

Environment variable required by the application

hubcontentfeed.mongodb.connectionurl - The MongoDb connection string. Defaults to mongodb://localhost:27017
e.g. mongodb:foo:<key>[email protected]:10250/?ssl=true
hubcontentfeed.mongodb.database - The MongoDb connection database name.

Environment variable required by the functional tests

deployedURL - The hostname that the application is running on. Defaults to 'localhost'
e.g. hub-content_feed.herokuapp.com
mongoDbURL - The mongo database url for the application. Defaults to mongodb://localhost:27017
e.g. mongodb:<user>:<key>[email protected]:10250/?ssl=true

hub-content-feed's People

Contributors

amjadkl avatar retroredge avatar todderz avatar

Watchers

 avatar  avatar  avatar  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.