FASTPANEL API
Introduction
FASTPANEL® API gives you a flexible way to manage the control panel without relying on the web interface. It helps automate routine operations, integrate FASTPANEL® with external services, and build more efficient infrastructure management workflows.
Token management
At the moment, API token management is available only for FASTPANEL® installations running on Ubuntu 20.04.
To open the API token management section, click your username in the top-right corner of the FASTPANEL® interface and select "API tokens".
To create a new API token, click "Add API Token". A form will appear for you to fill out:
- Name — an arbitrary name for the token.
- Full API access — leave this enabled if full access is required.
- Constraint IP — restricts API access to the IP address specified in this field.
- Expires at — the token expiration date.
To complete the token creation, click "Add".
Be sure to save the token - you will not be able to access it again!
Using tokens
Detailed FASTPANEL® API documentation is available at the following link.
For example, to retrieve a list of control panel users, you can use the following command:
curl 'https://yourserverip.example/api/users?page=1&per_page=20' \
--header 'Authorization: YOUR_SECRET_TOKEN'
where
YOUR_SECRET_TOKEN— the token created earlieryourserverip.example— the IP address or domain name of your server