All command line actions can also be ran from the web API. The API is available at https://your.server/yunohost/api.
You must first retrieve a login cookie thanks to the /login route to perform the other actions.
# Login (with admin password)
curl -k -H "X-Requested-With: customscript" \
-d "credentials=supersecretpassword" \
-dump-header headers \
https://your.server/yunohost/api/login
# GET example
curl -k -i -H "Accept: application/json" \
-H "Content-Type: application/json" \
-H 'Cookie: yunohost.admin="XXXXXXXX"' \
-L -b headers -X GET https://your.server/yunohost/api/ROUTE \
| grep } | python -mjson.tool
Try it out
button on the API endpoint you want to testНашли ошибки? Думаете, что можете улучшить документацию? Simply click the Edit link at the top of the page, and then the icon on Github to suggest changes.
Powered by Grav + with by Trilby Media.