This is a specification for the nhs-website-content-api API.
specification/This Open API Specification describes the endpoints, methods and messages exchanged by the API. Use it to generate interactive documentation; the contract between the API and its consumers.sandbox/This NodeJS application implements a mock implementation of the service. Use it as a back-end service to the interactive documentation to illustrate interactions and concepts. It is not intended to provide an exhaustive/faithful environment suitable for full development and testing.scripts/Utilities helpful to developers of this specification.proxies/Live (connecting to another service) and sandbox (using the sandbox container) Apigee API Proxy definitions.
Consumers of the API will find developer documentation on the NHS Digital Developer Hub.
Contributions to this project are welcome from anyone, providing that they conform to the guidelines for contribution and the community code of conduct.
This code is dual licensed under the MIT license and the OGL (Open Government License). Any new work added to this repository must conform to the conditions of these licenses. In particular this means that this project may not depend on GPL-licensed or AGPL-licensed libraries, as these would violate the terms of those libraries' licenses.
The contents of this repository are protected by Crown Copyright (C).
- make
- nodejs + npm/yarn
- poetry
- Java 8+
Consider using a dev container. While this is in no way a requirement, you may find it more convenient.
- Make a new
.envfile in this directory, usingexample.envas a base. - Fill in the missing environmental variables:
- At the time of writing,
PROXY_NAMEshould be set tonhs-website-content-api-internal-dev. - You can get an
APIGEE_ACCESS_TOKENvia theget_tokencommand. If you don't already have access to theget_tokencommand, you can install it using these instructions. - You can get the latest
SOURCE_COMMIT_IDvia the/_pingendpoint of the proxy you're using. For example, withPROXY_NAMEset tonhs-website-content-api-internal-dev, we would want to access the URL https://internal-dev.api.service.nhs.uk/nhs-website-content/_ping - this should return some JSON, and the value we want has keycommitId.
- At the time of writing,
💡 The make token command provides a useful shorthand for calling get_token with all the right environmental variables.
- Install by running
make installfrom this directory. - Test this installation by running
make test, also from this directory. - Try out the preview server by running
make publishand thenmake serve; then visit the local URL printed in the console.