Internal Content API serves published content that includes the internal components beside the enriched content fields
For the first time:
go get -u github.com/Financial-Times/internal-content-api
cd $GOPATH/src/github.com/Financial-Times/internal-content-api
dep ensure
go build .
Run the tests and install the binary:
dep ensure
go test -race ./...
go install
Run the binary locally with properties set:
go install
$GOPATH/bin/internal-content-api \
--app-port "8084" \
--handler-path "internalcontent" \
--content-source-uri "http://localhost:8080/__enriched-content-read-api/enrichedcontent" \
--internal-components-source-uri "http://localhost:8080/__content-public-read/internalcontent" \
--content-source-app-name "Content Source Service" \
--internal-components-source-app-name "Internal Components Source Service" \
--content-source-app-health-uri "http://localhost:8080/__enriched-content-read-api/__health" \
--internal-components-source-app-health-uri "http://localhost:8080/__content-public-read/__health" \
--content-unroller-app-name "Content Unroller" \
--content-unroller-uri "http://localhost:8080/__content-unroller-api/internalcontent" \
--content-unroller-app-health-uri "http://localhost:8080/__content-unroller-api/__health" \
When deployed locally arguments are optional.
/internalcontent/{uuid}
Example
curl -v http://localhost:8084/internalcontent/9358ba1e-c07f-11e5-846f-79b0e3d20eaf
The read should return the internal content of an article (i.e. an aggregation of enriched content plus internal components).
unrollContent={boolean}, default false
When true dynamic content, main image, body embedded images, lead images and alternative images get expanded with the content as content-public-read service was called for that dynamic component. This service uses content-unroller which is responsible to get the requested dynamic components.
When false the response contains only the IDs of the dynamic content and images (main image, body embedded images, lead images and alternative images).
404 if article with given uuid does not exist.
503 when one of the collaborating mandatory services is inaccessible.
In case handler-path / HANDLER_PATH is set to something else other than internalcontent,
for example to internalcontent-preview, the endpoint will change accordingly to:
/internalcontent-preview/{uuid}
Example in this case will be:
curl -v http://localhost:8084/internalcontent-preview/9358ba1e-c07f-11e5-846f-79b0e3d20eaf
Healthchecks: http://localhost:8084/__health
good-to-go: http://localhost:8084/__gtg
Health and gtg are based on enriched-content-read-api and content-public-read's health endpoints availability.
Ping: http://localhost:8084/__ping
Build-info: http://localhost:8084/__build-info - [Documentation on how to generate build-info] (https://github.com/Financial-Times/service-status-go) Metrics: http://localhost:8084/__metrics
For the model spec please refer to:
enriched-content-read-api - returns enriched content (content + complementary content + annotations + relations)
content-public-read - it allows public access to content data provided by the platform
content-unroller - expands images and dynamic content of an article
unrolled-content-public-read - expands images and dynamic content of an article in preview mode
Content type
Image
Digest
sha256:054b5be9e…
Size
4.4 MB
Last updated
17 days ago
docker pull coco/internal-content-api