Neo4J backed Content By Concept public read api
10K+
A public API which returns an ordered list of the most recently annotated content about a given concept
go get -u github.com/Financial-Times/public-content-by-concept-apicd $GOPATH/src/github.com/Financial-Times/public-content-by-concept-apigo install$GOPATH/bin/public-content-by-concept-api --neo-url={neo4jUrl} --port={port} --log-level={DEBUG|INFO|WARN|ERROR}--cache-duration{e.g. 22h10m3s} --requestLoggingEnabled=false
Optional arguments are:
--neo-url defaults to http://localhost:7474/db/data, which is the out of box url for a local neo4j instance.
--port defaults to 8080.
--cache-duration defaults to 1 hour
--logLevel set level of app logging, request critical logs are info level with more helpful logs found at debug
--requestLoggingEnabled when true will toggle logging of both admin endpoints(health/gtg) as well as http endpointsUnit tests only: go test -race ./...
Unit and integration tests:
docker-compose -f docker-compose-tests.yml up -d --build && \
docker logs -f test-runner && \
docker-compose -f docker-compose-tests.yml down
curl http://localhost:8080/content?isAnnotatedBy=http://api.ft.com/things/dbb0bdae-1f0c-11e4-b0cb-b2227cce2b54 curl http://localhost:8080/content?isAnnotatedBy=http://api.ft.com/things/dbb0bdae-1f0c-11e4-b0cb-b2227cce2b54&fromDate=2016-01-02&toDate=2016-01-05&limit=200curl http://localhost:8080/content?isAnnotatedBy=http://api.ft.com/things/dbb0bdae-1f0c-11e4-b0cb-b2227cce2b54&fromDate=2016-01-02&toDate=2016-01-05&page=3&limit=200Note: Optional request params: limit (number of items to return), page, toDate, fromDate. isAnnotatedBy param accepts both full concept URI or just the UUID
Based on the following google doc
Healthcheck: http://localhost:8080/__health Gtg: http://localhost:8080/__gtg Build-Info: http://localhost:8080/__build-info
Content type
Image
Digest
sha256:fe6db220e…
Size
4.7 MB
Last updated
1 day ago
docker pull coco/public-content-by-concept-api