{"id":19504740,"url":"https://github.com/nice-digital/mocks-apis","last_synced_at":"2026-05-07T16:38:09.354Z","repository":{"id":79377769,"uuid":"438573351","full_name":"nice-digital/mocks-apis","owner":"nice-digital","description":"Mock APIs for running functional tests against NICE digital services","archived":false,"fork":false,"pushed_at":"2024-10-07T09:49:14.000Z","size":202,"stargazers_count":0,"open_issues_count":1,"forks_count":1,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-02-25T22:12:11.374Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nice-digital.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-12-15T09:39:49.000Z","updated_at":"2024-10-07T09:49:19.000Z","dependencies_parsed_at":"2024-09-13T00:57:29.280Z","dependency_job_id":"45262d8e-8a75-4077-9ff1-539d3af5e84a","html_url":"https://github.com/nice-digital/mocks-apis","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/nice-digital/mocks-apis","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nice-digital%2Fmocks-apis","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nice-digital%2Fmocks-apis/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nice-digital%2Fmocks-apis/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nice-digital%2Fmocks-apis/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nice-digital","download_url":"https://codeload.github.com/nice-digital/mocks-apis/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nice-digital%2Fmocks-apis/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32746165,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-07T02:14:30.463Z","status":"ssl_error","status_checked_at":"2026-05-07T02:14:29.405Z","response_time":62,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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-11-10T22:26:59.019Z","updated_at":"2026-05-07T16:38:09.337Z","avatar_url":"https://github.com/nice-digital.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Mock api\n\n\u003e Static mock API responses for various backend systems, for use in functional tests in Docker\n\n## Getting started\n\n- `cd` into a sub folder\n  - For example `cd search-apis` for the Single Search Endpoint (SSE)\n  - or `cd publications` for a mock Publications API\n- `npm ci`\n- `npm start` (if you need to a specify port set your env before running eg. `PORT=3000 npm start`)\n \n## Usage\n\nThe initial intended use for these mock responses is for any consuming application of these APIs to be able to have a stable response for functional testing.\n\nEach folder comes with a Dockerfile so that it can be built straight from from a subfolder in GitHub. For example:\n\n```\ndocker build https://github.com/nice-digital/mocks-apis.git#main:\u003cSUB_FOLDER\u003e -t \u003cSOME_IMAGE_TAG\u003e\n```\n\n### Single Search Endpoint\n\nBuild the docker image with:\n\n```\ndocker build https://github.com/nice-digital/mocks-apis.git#main:search-apis -t mock-search-api\n```\n\nThen run it with:\n\n```\ndocker run --publish 80:80 --name=mock-search-api -d mock-search-api\n```\n\nThe available endpoints will then be:\n\n- http://localhost:3000/api/typeahead?q=re\u0026index=cks (typeahead no results)\n- http://localhost:3000/api/typeahead?q=ast\u0026index=cks (typeahead results)\n- http://localhost:3000/api/search?q=asdfg\u0026index=cks (search no results)\n- http://localhost:3000/api/search?q=cancer\u0026index=cks (search results)\n\nSee the [search-apis/data](search-apis/data) folder for which indices and search terms are supported.\n\n### Publications\n\nBuild the docker image with:\n\n```\ndocker build https://github.com/nice-digital/mocks-apis.git#main:publications -t mock-publications\n```\n\nThen run it with:\n\n`docker run --publish 80:80 --name=mock-publications -d mock-publications`\n\nThe available endpoints will then be:\n\n- http://localhost:3000/feeds/product/ind63 (single Indicator product)\n\nSee the [publications/data](publications/data) folder for which products are supported.\n\n### Indev\n\nBuild the docker image with:\n\n```\ndocker build https://github.com/nice-digital/mocks-apis.git#main:indev -t mock-indev\n```\n\nThen run it with:\n\n`docker run --publish 80:80 --name=mock-indev -d mock-indev`\n\nThe available endpoints will then be:\n\n- http://localhost:3000/feeds/project/gid-ind10272 (single Indicator project)\n- http://localhost:3000/feeds/project/gid-hub10001 (single Hub project)\n\nSee the [indev/data](indev/data) folder for which products are supported.\n\n## Docker compose\n\nConsume one of the mock services (e.g. SSE) in Docker compose like this:\n\n```\n  mock-search-api:\n    build: https://github.com/nice-digital/mocks-apis.git#main:search-apis\n    container_name: mock-search-api\n    ports:\n      - \"80:80\"\n    networks:\n      default:\n        aliases:\n          - mock-search-api.nice.org.uk\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnice-digital%2Fmocks-apis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnice-digital%2Fmocks-apis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnice-digital%2Fmocks-apis/lists"}