{"id":19440483,"url":"https://github.com/devinit/ddw-external-api","last_synced_at":"2025-10-08T14:12:53.048Z","repository":{"id":33740932,"uuid":"161200719","full_name":"devinit/ddw-external-api","owner":"devinit","description":"External API for DDW","archived":false,"fork":false,"pushed_at":"2023-04-25T08:20:24.000Z","size":855,"stargazers_count":1,"open_issues_count":6,"forks_count":1,"subscribers_count":5,"default_branch":"dev","last_synced_at":"2025-02-25T07:29:28.360Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/devinit.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2018-12-10T16:06:11.000Z","updated_at":"2022-04-28T06:37:33.000Z","dependencies_parsed_at":"2024-11-10T15:41:32.291Z","dependency_job_id":null,"html_url":"https://github.com/devinit/ddw-external-api","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/devinit/ddw-external-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devinit%2Fddw-external-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devinit%2Fddw-external-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devinit%2Fddw-external-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devinit%2Fddw-external-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devinit","download_url":"https://codeload.github.com/devinit/ddw-external-api/tar.gz/refs/heads/dev","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devinit%2Fddw-external-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278956366,"owners_count":26075227,"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-10-08T02:00:06.501Z","response_time":56,"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-11-10T15:29:28.823Z","updated_at":"2025-10-08T14:12:53.005Z","avatar_url":"https://github.com/devinit.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DDW API\n\nBase URL: - https://api.devinit.org\n\n### Endpoints\n- /all_tables\n- /meta_data (just serves di_concept_in_dh, not too useful at the moment)\n- /single_table\n- /multi_table\n\n\n### Parameters for /single_table\n|Parameter|Description|Usage Example|\n|----------|-------------------------|------------------------------|\n|indicator| The table ID from which to retrieve the data | ?indicator=population_total|\n|entities| Country code | ?entities=UG,KE,NA|\n|start_year| Lower year limit for the returned data | ?start_year=2000|\n|end_year| Upper year limit for the returned data | ?end_year=2001|\n|limit| Number of rows returned | ?limit=100|\n|offset| The results page to return e.g. if the limit is 10 out 30 rows, an offset of 2 will return the second 10 records | ?offset=2|\n|format| The data format of the returned results | ?format=xml (available options are xml, json, or csv)|\n\n#### Example query\n\u003cpre\u003e\n/single_table?indicator=population_total\u0026entities=UG,KE\u0026start_year=2000\u0026end_year=2000\u0026limit=2\u0026offset=0\u0026format=xml\n\u003c/pre\u003e\n\n### Parameters for /multi_table\n|Parameter|Description|Usage Example|\n|----------|-------------------------|------------------------------|\n|indicator| The table name from which to retrieve the data | ?indicators=population_total,govt_revenue_pc_gdp|\n|entities| Country code | ?entities=UG,KE,NA|\n|start_year| Lower year limit for the returned data | ?start_year=2000|\n|end_year| Upper year limit for the returned data | ?end_year=2001|\n|limit| Number of rows returned | ?limit=100|\n|offset| The results page to return e.g. if the limit is 10 out 30 rows, an offset of 2 will return the second 10 records | ?offset=2|\n|format| The data format of the returned results | ?format=xml (available options are xml, json, or csv)|\n\n#### Example query\n/multi_table?indicators=population_total,govt_revenue_pc_gdp\u0026entities=UG\u0026start_year=2015\u0026format=xml\n\n## Usage\n\n### Data Hub\nThis section documents how to retrieve data from the API partaining to common Data Hub (DDH) visualisations\n\n- [Global Picture](docs/global-picture.md)\n- [Spotlight on Uganda](docs/spotlight-on-uganda.md)\n- [Spotlight on Kenya](docs/spotlight-on-kenya.md)\n\n## Certificates\n\nCertificates are renewed with a certbot.sh run on a Cronjob like so:\n```\n#!/bin/bash\nrenewal_result=\"$(command certbot renew  --webroot -w /home/alex/ddw-external-api/letsencrypt)\"\n#Check if successful result is received\nresult=\"$(echo $renewal_result | grep -o Congratulations )\"\n\n#If successful copy certs to the correct folder and refresh nginx docker node\nif [ $result ]; then\n        cd /home/alex/ddw-external-api/\n        cp -f  /etc/letsencrypt/live/api.devinit.org/privkey.pem /home/alex/ddw-external-api/ssl/\n        cp -f /etc/letsencrypt/live/api.devinit.org/fullchain.pem /home/alex/ddw-external-api/ssl/\n\n        command docker-compose restart nginx\nfi\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevinit%2Fddw-external-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevinit%2Fddw-external-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevinit%2Fddw-external-api/lists"}