{"id":19707618,"url":"https://github.com/cailloumajor/config-api","last_synced_at":"2026-04-11T21:02:31.717Z","repository":{"id":37020329,"uuid":"495741323","full_name":"cailloumajor/config-api","owner":"cailloumajor","description":"Configuration data HTTP API","archived":false,"fork":false,"pushed_at":"2025-02-20T06:05:20.000Z","size":748,"stargazers_count":1,"open_issues_count":6,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-02-20T07:22:32.088Z","etag":null,"topics":["json-api","microservice","mongodb","rust","toml"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/cailloumajor.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2022-05-24T08:48:38.000Z","updated_at":"2024-12-28T12:06:53.000Z","dependencies_parsed_at":"2023-10-16T04:09:18.965Z","dependency_job_id":"6b5e163b-2ad6-4224-bdde-9d5bda11f6b8","html_url":"https://github.com/cailloumajor/config-api","commit_stats":null,"previous_names":[],"tags_count":43,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cailloumajor%2Fconfig-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cailloumajor%2Fconfig-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cailloumajor%2Fconfig-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cailloumajor%2Fconfig-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cailloumajor","download_url":"https://codeload.github.com/cailloumajor/config-api/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241024197,"owners_count":19896189,"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":["json-api","microservice","mongodb","rust","toml"],"created_at":"2024-11-11T21:39:24.150Z","updated_at":"2026-04-11T21:02:31.711Z","avatar_url":"https://github.com/cailloumajor.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!-- markdownlint-configure-file\n{\n    \"no-duplicate-header\": {\n        \"siblings_only\": true\n    }\n}\n--\u003e\n\n# Configuration API microservice\n\n[![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg)](https://conventionalcommits.org)\n\nMicroservice serving configuration data as an HTTP API backed by MongoDB.\n\n## Routes\n\n### Health\n\n#### `GET` `/health`\n\nReturns the service health status.\n\n##### Parameters\n\nNone\n\n##### Response\n\n| Code | Description          |\n| ---- | -------------------- |\n| 204  | Service is healthy   |\n| 500  | Service in unhealthy |\n\n### Get configuration data (all documents in a collection)\n\n#### `GET` `/config/{collection}`\n\nReturns the configuration data for all the documents in the collection.\n\n##### Parameters\n\n| Name         | Source | Description        |\n| ------------ | ------ | ------------------ |\n| `collection` | _path_ | MongoDB collection |\n\n##### Response\n\n| Code | Description                                   |\n| ---- | --------------------------------------------- |\n| 200  | JSON array of all documents in the collection |\n| 500  | Internal server error                         |\n\n###### Note: the array returned in case of success will be sorted by primary key\n\n### Get configuration data (one document)\n\n#### `GET` `/config/{collection}/{id}`\n\nReturns configuration data for a specific document.\n\n##### Parameters\n\n| Name         | Source | Description                |\n| ------------ | ------ | -------------------------- |\n| `collection` | _path_ | MongoDB collection         |\n| `id`         | _path_ | ID of the MongoDB document |\n\n##### Response\n\n| Code | Description             |\n| ---- | ----------------------- |\n| 200  | Document in JSON format |\n| 404  | Document not found      |\n| 500  | Internal server error   |\n\n##### Linked document\n\nIf the MongoDB document found contains a `_links` key with an [`ObjectId`][BSON ObjectId] value, the returned document will be the one with this index.\n\n[BSON ObjectId]: https://www.mongodb.com/docs/v6.0/reference/bson-types/#objectid\n\n### Patch configuration data\n\n#### `PATCH` `/config/{collection}/{id}`\n\nApplies changes on a configuration document.\n\n##### Parameters\n\n| Name         | Source | Description                |\n| ------------ | ------ | -------------------------- |\n| `collection` | _path_ | MongoDB collection         |\n| `id`         | _path_ | ID of the MongoDB document |\n\n##### Request body\n\nThe expected body request is a JSON object with key(s) and value(s) corresponding with those of the database document.\n\n##### Authorization\n\nThe changes will be applied if all the following conditions are met:\n\n* a document with `_authorization` primary key exists;\n* this document contains a `patchAllowedFields` field;\n* this field is an array;\n* this array contains all of the keys of the request JSON body (as strings).\n\n## Usage\n\n```console\n$ config-api --help\nUsage: config-api [OPTIONS] --mongodb-database \u003cMONGODB_DATABASE\u003e\n\nOptions:\n      --listen-address \u003cLISTEN_ADDRESS\u003e\n          Address to listen on [env: LISTEN_ADDRESS=] [default: 0.0.0.0:8080]\n      --mongodb-uri \u003cMONGODB_URI\u003e\n          URI of MongoDB server [env: MONGODB_URI=] [default: mongodb://mongodb]\n      --mongodb-database \u003cMONGODB_DATABASE\u003e\n          MongoDB database [env: MONGODB_DATABASE=]\n  -v, --verbose...\n          Increase logging verbosity\n  -q, --quiet...\n          Decrease logging verbosity\n  -h, --help\n          Print help\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcailloumajor%2Fconfig-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcailloumajor%2Fconfig-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcailloumajor%2Fconfig-api/lists"}