/go/api adds API keys for the GoAdmio panel. You describe the keys in an XML file, and the command: The command only adds or replaces keys. It does not list or delete them. Every admin action in GoAdmio has a matching /go/ command, so anything you can click you can also script.
Quick start
# Import the keys in an XML file
/go/api /root/api.xml
Arguments
| Argument | Required | Notes |
|---|---|---|
<file> |
Yes | The path of the XML file. It must be readable by the user running the command. |
Examples
# Import the keys
/go/api /root/api.xml
# Delete the file afterwards, because it holds the keys
rm /root/api.xml
# Review the log of past runs (the log shows the file name only)
tail -n 20 /var/log/go/api.log
Output
| Message | Meaning |
|---|---|
API URL: https://go.domain.com/api/api.php?Name=<name>&APIKey=<key> |
The key was saved. The name is URL-encoded. |
ERROR: API key length <n> must be either 16 or 50 characters |
The key is the wrong length, and it was not saved. See the note below. |
[!NOTE]
The error text says 16 or 50, but the check accepts 16 or 59 characters. A key of 50 characters is rejected.
The host in the printed URL is the literal text go.domain.com. Replace it with your panel’s address when you use the URL.
The command always finishes without an error status, even when a key is rejected.
See the full reference at /go/api and the GoAdmio command index.
GoAdmio is free and open source, with no license fees and no account limits. Read the GoAdmio docs, or see why it is a free cPanel alternative at goadmio.com.
