Matrix Admin-Api-Calls through abra? #45
Reference in New Issue
Block a user
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?
I thought of making it possible to make calls to the admin-api through abra.
They are already possible like this:
or more generalized
My idea would it to realize it more or less like this
in
abra.sh(with some validations....)
so that in the end API-Calls would be possible like this, without worrying for Admin-Token, Hostname or curl-Syntax
abra cmd $DOMAIN app admin_api_call /background_updates/start_job POST '{ "job_name": "regenerate_directory" }'and additionally we could easily make some more pre-defined commands for recurring admin tasks in the future.
Main questions:
<CONTAINER_NAME>in theabra.sh-Script?admin_tokengood idea?3.1 if so, where would we get the admin-token from automatically?
abra.shfunction in another?Thanks for discussions or ideas on any of the questions
Seems great!
I think
$STACK_NAME_appshould do it.Good question. I think "yes", although I wonder how the initial set-up would work – I guess this token wouldn't be available until the account is created, and I don't know if it's possible to pre-initialise one. Maybe we can look at how
synadminis generating admin users & tokens? https://codeberg.org/ahab/synadm#getting-an-admin-tokenYes,
abra.shfunctions are bash functions, so they should be callable from each other as normal; e.g. we're using this functionality in thehometownrecipe: https://git.coopcloud.tech/coop-cloud/hometown/src/branch/main/abra.sh#L39