Microservice serving configuration data as an HTTP API backed by MongoDB.
Returns the service health status.
None
Code | Description |
---|---|
204 | Service is healthy |
500 | Service in unhealthy |
Returns the configuration data for all the documents in the collection.
Name | Source | Description |
---|---|---|
collection |
path | MongoDB collection |
Code | Description |
---|---|
200 | JSON array of all documents in the collection |
500 | Internal server error |
Returns configuration data for a specific document.
Name | Source | Description |
---|---|---|
collection |
path | MongoDB collection |
id |
path | ID of the MongoDB document |
Code | Description |
---|---|
200 | Document in JSON format |
404 | Document not found |
500 | Internal server error |
If the MongoDB document found contains a _links
key with an ObjectId
value, the returned document will be the one with this index.
Applies changes on a configuration document.
Name | Source | Description |
---|---|---|
collection |
path | MongoDB collection |
id |
path | ID of the MongoDB document |
The expected body request is a JSON object with key(s) and value(s) corresponding with those of the database document.
The changes will be applied if all the following conditions are met:
- a document with
_authorization
primary key exists; - this document contains a
patchAllowedFields
field; - this field is an array;
- this array contains all of the keys of the request JSON body (as strings).
$ config-api --help
Usage: config-api [OPTIONS] --mongodb-database <MONGODB_DATABASE>
Options:
--listen-address <LISTEN_ADDRESS>
Address to listen on [env: LISTEN_ADDRESS=] [default: 0.0.0.0:8080]
--mongodb-uri <MONGODB_URI>
URI of MongoDB server [env: MONGODB_URI=] [default: mongodb://mongodb]
--mongodb-database <MONGODB_DATABASE>
MongoDB database [env: MONGODB_DATABASE=]
-v, --verbose...
Increase logging verbosity
-q, --quiet...
Decrease logging verbosity
-h, --help
Print help