{"id":23066964,"url":"https://github.com/dvsa/mot-public-api","last_synced_at":"2025-08-15T11:33:47.068Z","repository":{"id":22097558,"uuid":"92493533","full_name":"dvsa/mot-public-api","owner":"dvsa","description":"MOT Public API","archived":false,"fork":false,"pushed_at":"2024-06-12T15:34:00.000Z","size":693,"stargazers_count":7,"open_issues_count":5,"forks_count":4,"subscribers_count":38,"default_branch":"master","last_synced_at":"2024-06-12T21:35:14.318Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","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/dvsa.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":"2017-05-26T09:13:44.000Z","updated_at":"2024-06-12T15:34:05.000Z","dependencies_parsed_at":"2024-06-12T21:44:41.836Z","dependency_job_id":null,"html_url":"https://github.com/dvsa/mot-public-api","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dvsa%2Fmot-public-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dvsa%2Fmot-public-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dvsa%2Fmot-public-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dvsa%2Fmot-public-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dvsa","download_url":"https://codeload.github.com/dvsa/mot-public-api/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":229910956,"owners_count":18143229,"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","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-16T05:15:41.597Z","updated_at":"2024-12-16T05:15:42.041Z","avatar_url":"https://github.com/dvsa.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MOT Public API\n\nMOT Public API\n\nThis is the source code for an API which provides access to public MOT data.\n\nIt is written as a set of AWS Lambdas, intended to be connected to AWS API Gateway endpoints.\n\nThere is some unit test coverage, focussed on the most important code paths for frequently used endpoints.\n\nThis repository uses git-secrets to prevent secrets from being committed.\nPlease ensure you have git-secrets installed on your machine: https://github.com/awslabs/git-secrets#installing-git-secrets\n\n### Building and running TAPI Locally\n\n#### Prerequisite\n\n- Java 8/JDK8\n- AWS Sam CLI - https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-sam-cli-install-mac.html\n- MTS database up and running\n- MOTH running locally - https://github.com/dvsa/mot-history\n- Run ``` cp .env.example .env  ``` in the root directory - this will create a .env file using the example file.\n\n- In the ```.env```, change the following variables:-\n- ``` MOTH_API_URL: \"http://docker.for.mac.localhost:3010\"``` to use MOTH api locally  \n- ```MOTH_API_URL``` and the corresponding ```MOTH_API_KEY``` to use the MOTH api directly.\n\n#### Build\n \nTo build the application make sure you are in the root directory and then:\n\n``` sam build ```\n\n#### Run\n\nTo run the application locally make sure have a successful build whilst in the root directory and then:\n\n``` sam local start-api --env-vars .env```\n\nThis will start the application at ```http:://127.0.0.1:3000```.\n\n\u003e **_NOTE:_**\nIf you would like to change the port number to for example 3001, use ```-p \u003cport_number\u003e```.\n\u003e \u003e ```sam local start-api --env-vars .env -p 3001```\n\n\nAll paths and environments are listed in the ```template.yaml``` file.\nThe values of the environment variables are listed in the ```.env``` file.\n\nYou can add/edit environment variables and paths as shown below:\n\n```template.yaml:```\n```yaml\n Environment:\n        Variables:\n          MOTH_API_URL:\n          MOTH_API_KEY:\n```\n```.env:```\n```json\n{\n  \"Parameters\": {\n    \"MOTH_API_URL\": \"https://api.search.com\",\n    \"MOTH_API_KEY\": \"randomKey\"\n  }\n}\n```\nYou can edit/add endpoints:\n\n```template.yaml:```\n```yaml\nEvents:\n  VrmGet:\n    Type: Api\n    Properties:\n      Path: /trade/vehicles/mot-tests\n      Method: GET\n  VrmPost:\n    Type: Api\n    Properties:\n      Path: /trade/vehicles/annual-tests\n      Method: GET\n```\n\nEach time you edit the code or ```template.yaml```/```.env``` you will need to build: ```sam build``` and run the application: ``` sam local start-api --env-vars .env``` to see the changes.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdvsa%2Fmot-public-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdvsa%2Fmot-public-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdvsa%2Fmot-public-api/lists"}