{"id":23421434,"url":"https://github.com/nhsdigital/ambulance-analytics-api","last_synced_at":"2025-09-15T08:07:30.425Z","repository":{"id":37090004,"uuid":"268736629","full_name":"NHSDigital/ambulance-analytics-api","owner":"NHSDigital","description":null,"archived":false,"fork":false,"pushed_at":"2024-12-23T19:49:26.000Z","size":1376,"stargazers_count":2,"open_issues_count":5,"forks_count":2,"subscribers_count":44,"default_branch":"master","last_synced_at":"2025-04-19T18:10:56.129Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NHSDigital.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-06-02T07:53:32.000Z","updated_at":"2022-01-05T14:44:20.000Z","dependencies_parsed_at":"2024-01-16T11:40:37.710Z","dependency_job_id":"68d6a580-98a3-4ea7-9dd0-cd3ebcafcbc8","html_url":"https://github.com/NHSDigital/ambulance-analytics-api","commit_stats":null,"previous_names":[],"tags_count":93,"template":false,"template_full_name":"NHSDigital/api-management-service-template","purl":"pkg:github/NHSDigital/ambulance-analytics-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NHSDigital%2Fambulance-analytics-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NHSDigital%2Fambulance-analytics-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NHSDigital%2Fambulance-analytics-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NHSDigital%2Fambulance-analytics-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NHSDigital","download_url":"https://codeload.github.com/NHSDigital/ambulance-analytics-api/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NHSDigital%2Fambulance-analytics-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275225879,"owners_count":25427009,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-15T02:00:09.272Z","response_time":75,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-23T02:15:09.135Z","updated_at":"2025-09-15T08:07:30.378Z","avatar_url":"https://github.com/NHSDigital.png","language":"Python","readme":"# template-api\n\n![Build](https://github.com/NHSDigital/template-api/workflows/Build/badge.svg?branch=master)\n\nThis is a RESTful HL7® FHIR® API specification for the *Template API*.\n\n* `specification/` This [Open API Specification](https://swagger.io/docs/specification/about/) describes the endpoints, methods and messages exchanged by the API. Use it to generate interactive documentation; the contract between the API and its consumers.\n* `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.\n* `scripts/` Utilities helpful to developers of this specification.\n* `apiproxy/` The Apigee API Proxy\n\nConsumers of the API will find developer documentation on the [NHS Digital Developer Hub](https://emea-demo8-nhsdportal.apigee.io/).\n\n## Contributing\nContributions to this project are welcome from anyone, providing that they conform to the [guidelines for contribution](https://github.com/NHSDigital/template-api/blob/master/CONTRIBUTING.md) and the [community code of conduct](https://github.com/NHSDigital/template-api/blob/master/CODE_OF_CONDUCT.md).\n\n### Licensing\nThis 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.\n\nThe contents of this repository are protected by Crown Copyright (C).\n\n## Development\n\n### Requirements\n* make\n* nodejs + npm/yarn\n* [poetry](https://github.com/python-poetry/poetry)\n\n### Install\n```\n$ make install\n```\n\n#### Updating hooks\nYou can install some pre-commit hooks to ensure you can't commit invalid spec changes by accident. These are also run\nin CI, but it's useful to run them locally too.\n\n```\n$ make install-hooks\n```\n\n### Environment Variables\nVarious scripts and commands rely on environment variables being set. These are documented with the commands.\n\n:bulb: Consider using [direnv](https://direnv.net/) to manage your environment variables during development and maintaining your own `.envrc` file - the values of these variables will be specific to you and/or sensitive.\n\n### Make commands\nThere are `make` commands that alias some of this functionality:\n * `lint` -- Lints the spec and code\n * `publish` -- Outputs the specification as a **single file** into the `build/` directory\n * `serve` -- Serves a preview of the specification in human-readable format\n * `generate-examples` -- generate example objects from the specification\n * `validate` -- validate generated examples against FHIR R4\n\n### Running tests\n#### End-to-end tests\nTo run tests, you need to supply an environment. A `local` environment and an environment template are included under `tests/e2e/environments`.\n\nSet the following environment variables for local testing:\n * `ENVIRONMENT`: `local`\n * `API_TEST_ENV_FILE_PATH`: `tests/e2e/environments/local.postman_environment.json`\n * `API_TEST_URL`: `localhost:9000`\n\nIn order for local tests to work, you must have the sandbox server running locally.\n```\nmake sandbox\n```\n\nTo run local tests, use:\n```\nmake test\n```\n\nThere is a template environment file available at `tests/e2e/environments/postman_environment.json.template` useful for configuring different testing environments (such as on the CI server).\n\n### VS Code Plugins\n\n * [openapi-lint](https://marketplace.visualstudio.com/items?itemName=mermade.openapi-lint) resolves links and validates entire spec with the 'OpenAPI Resolve and Validate' command\n * [OpenAPI (Swagger) Editor](https://marketplace.visualstudio.com/items?itemName=42Crunch.vscode-openapi) provides sidebar navigation\n\n\n### Emacs Plugins\n\n * [**openapi-yaml-mode**](https://github.com/esc-emacs/openapi-yaml-mode) provides syntax highlighting, completion, and path help\n\n### Speccy\n\n\u003e [Speccy](http://speccy.io/) *A handy toolkit for OpenAPI, with a linter to enforce quality rules, documentation rendering, and resolution.*\n\nSpeccy does the lifting for the following npm scripts:\n\n * `test` -- Lints the definition\n * `publish` -- Outputs the specification as a **single file** into the `build/` directory\n * `serve` -- Serves a preview of the specification in human-readable format\n\n(Workflow detailed in a [post](https://developerjack.com/blog/2018/maintaining-large-design-first-api-specs/) on the *developerjack* blog.)\n\n:bulb: The `publish` command is useful when uploading to Apigee which requires the spec as a single file.\n\n### Caveats\n\n#### Swagger UI\nSwagger UI unfortunately doesn't correctly render `$ref`s in examples, so use `speccy serve` instead.\n\n#### Apigee Portal\nThe Apigee portal will not automatically pull examples from schemas, you must specify them manually.\n\n### Postman Collection\n\n`Patient Demographics Sandbox.postman_collection` must be kept in sync with the OAS and Sandbox manually.\n\nProcedure:\n * Import the collection into Postman\n * Update requests and export the collection back into the repo\n * Re-generate the [Run in Postman button](https://learning.getpostman.com/docs/postman-for-publishers/run-in-postman/creating-run-button/) Markdown button link and update the OAS\n\n## Deployment\n\n### Specification\nUpdate the API Specification and derived documentation in the Portal.\n\n`make deploy-spec` with environment variables:\n\n* `APIGEE_USERNAME`\n* `APIGEE_PASSWORD`\n* `APIGEE_SPEC_ID`\n* `APIGEE_PORTAL_API_ID`\n\n### API Proxy \u0026 Sandbox Service\nRedeploy the API Proxy and hosted Sandbox service.\n\n`make deploy-proxy` with environment variables:\n\n* `APIGEE_USERNAME`\n* `APIGEE_PASSWORD`\n* `APIGEE_ORGANIZATION`\n* `APIGEE_ENVIRONMENTS` - Comma-separated list of environments to deploy to (e.g. `test,prod`)\n* `APIGEE_APIPROXY` - Name of the API Proxy for deployment\n* `APIGEE_BASE_PATH` - The proxy's base path (must be unique)\n\n:bulb: Specify your own API Proxy (with base path) for use during development.\n\n#### Platform setup\n\nSuccessful deployment of the API Proxy requires:\n\n 1. A *Target Server* named `ig3`\n 2. A *Key-Value Map* named `pds-variables`, containing:\n    1. Key: `NHSD-ASID`, Value: Accredited System ID (ASID) identifying the API Gateway\n\n:bulb: For Sandbox-running environments (`test`) these need to be present for successful deployment but can be set to empty/dummy values.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnhsdigital%2Fambulance-analytics-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnhsdigital%2Fambulance-analytics-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnhsdigital%2Fambulance-analytics-api/lists"}