Document ability to modify collections via API #215
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
orinoco/dump-things-service#215
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Per personal communication: it is presently not possible to "update" a collection (add an audit backend, change tags, change inbox location, etc). I'd argue that it is not uncommon to have to make adjustement at some point.
It should be documented how that is possible. My current understanding is that one needs to maintain a "shadow configuration" of a collection elsewhere, and delete and recreate a collection with adjusted configuration. This would be fairly complex and error prone.
At minimum there should be a way to retrieve the effective configuration for a collection, in order to alter that and be able to make an "incremental" change, without having to maintain editable configuration records in parallel.
That's a good point. Currently, the configuration can be read by
GET /collection,GET /tokens,GET /admin_tokens. The output is currently JSON, which can be used inPOST /collections,POST /tokens, andPOST /admin_tokensrespectively.The JSON object can be edited and POST-ed to create a modified configuration (it could also be used to create an identical configuration on another server). Because there is currently no PATCH-method support, POST-ing an updated configuration requires to DELETE the respective configuration first.
So an incremental update currently requires:
I will add:
/collections,/tokens,/admin_tokens.This will support incremental updates by reading the configuration from the server, editing it, and PUT-ing it.
The configuration object format is still JSON. To support "native" YAML-based configuration handling, I will add:
/collections,/tokens,/admin_tokens/collections,/tokens,/admin_tokensdump-things-upload-configshould be amended to support JSON and YAML input formats, as well as support for uploading individual collections, tokens, or admin_tokens instead of complete configurations.This sounds good!
I am not sure what the motivation for YAML support is. As far as I am concerned, this only plays a role in the configuration files that are a thing of the past. Any client can easily convert JSON to YAML (and back, if needed). No need to bloat the implementation, IMHO
I am happy with leaving YAML conversions to the client.