{"id":18596132,"url":"https://github.com/resource-watch/download-dataset","last_synced_at":"2025-11-02T06:30:20.617Z","repository":{"id":72463104,"uuid":"66855428","full_name":"resource-watch/download-dataset","owner":"resource-watch","description":null,"archived":false,"fork":false,"pushed_at":"2017-03-09T12:48:32.000Z","size":17,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"develop","last_synced_at":"2024-12-26T21:08:46.961Z","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/resource-watch.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}},"created_at":"2016-08-29T15:22:05.000Z","updated_at":"2016-08-29T15:27:56.000Z","dependencies_parsed_at":null,"dependency_job_id":"b9206279-24df-4a26-bad1-17981e698e62","html_url":"https://github.com/resource-watch/download-dataset","commit_stats":{"total_commits":7,"total_committers":2,"mean_commits":3.5,"dds":0.4285714285714286,"last_synced_commit":"60ad2cca66eddc7d3c00a64aa84185a6ea02f4e2"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/resource-watch%2Fdownload-dataset","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/resource-watch%2Fdownload-dataset/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/resource-watch%2Fdownload-dataset/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/resource-watch%2Fdownload-dataset/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/resource-watch","download_url":"https://codeload.github.com/resource-watch/download-dataset/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239379324,"owners_count":19628684,"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-11-07T01:23:12.250Z","updated_at":"2025-11-02T06:30:20.557Z","avatar_url":"https://github.com/resource-watch.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Download Dataset API\n\n\nThis repository is the microservice that it implement the download query funcionality and exposed the /download endpoint in the api-gateway\n\n\n## First time user\nPerform the following steps:\n* [Install docker](https://docs.docker.com/engine/installation/)\n* Clone this repository: ```git clone git@github.com:resource-watch/download-dataset.git```\n* Enter in the directory (cd download-dataset-api)\n* After, you open a terminal (if you have mac or windows, open a terminal with the 'Docker Quickstart Terminal') and execute the next command:\n\n```bash\n    docker-compose -f docker-compose-develop.yml build\n\n```\n\n## Run in develop mode (Watch mode)\nRemember: In windows and Mac, open the terminal with 'Docker Quickstart Terminal'\n\n```bash\ndocker-compose -f docker-compose-develop.yml build\n//this command up the machine. If you want up in background mode, you add the -d option\n```\n\n\n## Execute test\nRemember: In windows and Mac, open the terminal with 'Docker Quickstart Terminal'\n```\ndocker-compose -f docker-compose-test.yml run test\n```\n\n## Install in heroku\n\nIs necessary define the next environment variables:\n* API_GATEWAY_URI =\u003e Url the register of the API Gateway. Remember: If the authentication is active in API Gateway, add the username and password in the url\n* NODE_ENV =\u003e Environment (prod, staging, dev)\n\nIs necessary the pem file of Google Earth Engine authentication in the root of the project\n\n\n\n# Config\n\n## register.json\nThis file contain the configuration about the endpoints that public the microservice. This json will send to the apigateway. it can contain variables:\n* #(service.id) =\u003e Id of the service setted in the config file by environment\n* #(service.name) =\u003e Name of the service setted in the config file by environment\n* #(service.uri) =\u003e Base uri of the service setted in the config file by environment\n\nExample:\n````\n{\n    \"id\": \"#(service.id)\",\n    \"name\": \"#(service.name)\",\n    \"urls\": [{\n        \"url\": \"/story\",\n        \"method\": \"POST\",\n        \"endpoints\": [{\n            \"method\": \"POST\",\n            \"baseUrl\": \"#(service.uri)\",\n            \"path\": \"/api/v1/story\",\n            \"data\": [\"loggedUser\"]\n        }]\n    }, {\n        \"url\": \"/story/:id\",\n        \"method\": \"GET\",\n        \"endpoints\": [{\n            \"method\": \"GET\",\n            \"baseUrl\": \"#(service.uri)\",\n            \"path\": \"/api/v1/story/:id\"\n        }]\n    }, {\n        \"url\": \"/user\",\n        \"method\": \"GET\",\n        \"endpoints\": [{\n            \"method\": \"GET\",\n            \"baseUrl\": \"#(service.uri)\",\n            \"path\": \"/api/v1/story\"\n        }]\n    }]\n}\n\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fresource-watch%2Fdownload-dataset","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fresource-watch%2Fdownload-dataset","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fresource-watch%2Fdownload-dataset/lists"}