{"id":42334836,"url":"https://github.com/datacite/pekingese","last_synced_at":"2026-01-27T14:14:46.287Z","repository":{"id":316769394,"uuid":"1054256138","full_name":"datacite/pekingese","owner":"datacite","description":"API for the Metadata Completeness Dashboard","archived":false,"fork":false,"pushed_at":"2026-01-21T20:37:39.000Z","size":57,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-22T04:35:43.646Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","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/datacite.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-10T15:23:41.000Z","updated_at":"2026-01-21T17:39:04.000Z","dependencies_parsed_at":"2025-09-26T16:29:22.134Z","dependency_job_id":null,"html_url":"https://github.com/datacite/pekingese","commit_stats":null,"previous_names":["datacite/pekingese"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/datacite/pekingese","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datacite%2Fpekingese","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datacite%2Fpekingese/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datacite%2Fpekingese/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datacite%2Fpekingese/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/datacite","download_url":"https://codeload.github.com/datacite/pekingese/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datacite%2Fpekingese/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28814565,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-27T12:25:15.069Z","status":"ssl_error","status_checked_at":"2026-01-27T12:25:05.297Z","response_time":168,"last_error":"SSL_read: 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":"2026-01-27T14:14:45.600Z","updated_at":"2026-01-27T14:14:46.279Z","avatar_url":"https://github.com/datacite.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Metadata Completenesss API\n\nAPI for the Metadata Completeness Dashboard\n\n## Running Locally\n\n### Set up OpenSearch Tunnel\n\nThe API requires a tunnel into OpenSearch. This can be set up using the instructions here: https://datacite.atlassian.net/wiki/spaces/DAT/pages/1038811137/How+to+SSH+tunnel+to+ElasticSearch.\n\nYou may need to prepend `0.0.0.0` to your local forward in the `.ssh/config` to allow Docker to connect to OpenSearch:\n\n```\nHost es-stage\n    ...\n    LocalForward 0.0.0.0:9202 ...\n```\n\n### Start the API\n\n1. `ssh es-stage`\n2. `docker-compose --profile dev up` (in a separate terminal)\n\n### Using the API\n\nThe API is served on `http://localhost:8080/`\u003cbr\u003e\n_Currently there is only one endpoint at the root_\n\nExample URL that fetches `present` and `distribution` aggregations for DataCite, along with a test query:\u003cbr\u003e\nhttp://localhost:8080/?client_id=datacite.datacite\u0026present=creators,creators.name\u0026distribution=types.resourceTypeGeneral\u0026query=test\n\n**_Supported Query Parameters_**\n\n- `client_id`: string\n- `provider_id`: string\n- `consortium_id`: string\n- `query`: string\n- `present`: []string - _comma separated list of fields for which to fetch the present/absent counts_\n- `distribution`: []string - _comma separated list of fields for which to fetch the distribution values_\n- `distribution_size`: number - _specifies the number of top results to return for each distribution field_\n\n---\n\n## Design Choices\n\n### [net/http](https://pkg.go.dev/net/http) (Standard library for API routing)\n\nI chose to use the standard `net/http` library because the needs for thes project are minimal. If it needs more features in the future - such as middleware or auth - I would switch to the [Chi](https://go-chi.io/#/) framework\n\n### [defensestation/osquery](https://github.com/defensestation/osquery) (An idiomatic Go query builder for OpenSearch)\n\nWithout this package, writing OpenSearch queries in Go is quite tedious, especially if you need to do anything conditionally.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdatacite%2Fpekingese","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdatacite%2Fpekingese","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdatacite%2Fpekingese/lists"}