Public API
Learn how to programmatically interact with PerfectScale, enabling automation, data retrieval, and integration with your existing workflows.
The API is exclusively available for our paying customers, allowing them to interact with the platform programmatically. Check the following information to get acquainted with the PerfectScale rate-limiting policy and authentication process. To explore the API, use the attached Swagger documentation.
Exclusive Access
Rate Limiting
PerfectScale API implements a rate-limiting policy to ensure fair usage and maintain the quality of service. The rate limit is set at 10 requests per minute per client.
Authentication
To interact with the PerfectScale API, a token is required. To get the token, follow the steps below:
Retrieve Client Credentials:
Go to https://app.perfectscale.io.
Click on your user avatar located at the bottom left corner of the page.
Select Organization Settings from the menu.
In the pop-up window, navigate to the API Tokens tab.
Click on Generate Token.
Assign a Read Only Role to the new token.
Upon creation, you will be provided with a
client_id
(Client ID) andclient_secret
(Secret Key).
Obtain Access Token:
Make a POST request to the Authentication Endpoint with the following payload:
The API will respond with a token payload, which will contain your access token.
Access Other Endpoints:
With the obtained access token, you can make authorized requests to other endpoints of the PerfectScale API. Include the token in the Authorization header of your HTTP requests as follows:
Endpoints
Authentication Endpoint
Clusters Endpoint
Workloads Endpoint
Ensure that the following request includes the cluster_uid
parameter, as it is mandatory. Follow the instructions provided in order to obtain this value.
How to get cluster_uid
There are two options available to obtain the cluster_uid.
Get cluster_uid directly from PerfectScale UI:
Go to the
Overview
tabClick the three-dot button located next to the needed cluster
Click the
Copy Cluster UID
button -> now, your cluster_uid is copied.
Get cluster_uid with the following command:
Get the full list of clusters via API and extract cluster_uids from it.
Deleting an API Token
In certain situations, you may find it necessary to delete an API token.
Follow these easy steps:
Click on the
Profile
button in the bottom left corner and selectOrganization Settings
.In the pop-up window, navigate to the
API Tokens
tab.Click the hamburger on the right-hand side, select
Delete API Token
, and click theDelete
button.
Deleting a cluster
There may be situations where you need to remove a cluster from PerfectScale. You can seamlessly delete a cluster using Public API:
How to get cluster UID
To get a cluster UID with a few clicks, navigate to the Overview
tab, hover over the needed cluster, and click the three dots
button. Then click Copy Cluster UID
so that it will be automatically copied to the clipboard.
How to list all cluster UIDs
You can seamlessly list all the clusters' UIDs of the tenant by using the following API:
Last updated