Simplified and Cost-Efficient GKE Node Management with NAP:
Secure your spot!
LogoLogo
PerfectScale.ioStart for FreeYour Account
  • Kubernetes Optimization
  • Getting started
    • How to onboard a cluster
    • Onboarding clusters programmatically
    • Onboarding with ArgoCD
    • Updating PerfectScale Agent resources
    • Re-onboarding a cluster
  • Enable automation
    • Automation setup instruction
    • Including a cluster, namespace or workload to the Automation
      • Configuring Automation for a cluster
      • Configuring Automation for a namespace
      • Configuring Automation for a workload
    • Excluding a namespace or workload from the Automation
    • Automation customization
    • Verifying Automation status
    • Exploring Automation KPIs
    • Self-healing mechanism for unschedulable pods
    • Disable automation
    • Troubleshooting
    • Automation with GitOps
  • Cloud billing integration
    • Connecting AWS CUR
    • Connecting Azure Cost Management
  • Clusters' metrics overview
  • Podfit | vertical pod right-sizing
    • Understanding 'At Risk' indicators
    • LimitRange and ResourceQuota
  • Infrafit | node right-sizing
  • Configure alerts
    • Alerts acknowledgement
  • Trends monitoring
  • Revisions history log
  • Product overview
    • How to monitor PerfectScale Agent
    • PerfectScale data collected
    • PerfectScale Autoscaler Objects' Events
    • Outbound Request Ports used by the Exporter and Autoscaler
    • PerfectScale Weekly Report
    • Product architecture
  • Customizations
    • Alerting
      • Resiliency alerts
      • Financial alerts
    • Pricing
      • Custom Pricing configuration
      • AWS CUR configuration
      • Azure Cost Management configuration
    • Ticketing & Bug Tracking
    • Communication & Messaging
      • Slack Integration
        • How to configure slack_token
        • How to configure routings
      • MS Teams Integration
        • How to configure teams_webhook
      • Datadog Alerts Integration
    • Label customizations
    • Grouping
    • Observability
    • Podfit labels
    • Optimization Policy customization
  • Administration
    • Cluster settings
    • User management
    • Roles and permissions
    • Subscription details
    • Help Center
  • PerfectScale trial
    • How to find your allocated vCPU?
  • PerfectScale Prometheus Exporter
  • Security
    • MFA
    • SSO
    • ps-agent RBAC Permissions
    • psc-autoscaler RBAC Permissions
    • ps-exporter via Proxy Configuration
  • Public API
  • Help PerfectScale to improve
  • Go to your account
Powered by GitBook
LogoLogo

© PerfectScale 2025

On this page

Public API

Learn how to programmatically interact with PerfectScale, enabling automation, data retrieval, and integration with your existing workflows

Previousps-exporter via Proxy ConfigurationNextHelp PerfectScale to improve

Last updated 15 days ago

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 and . To explore the API, use the attached .

Exclusive Access

The PerfectScale public API is a premium feature available only with our EXPERT package for PerfectScale’s paying customers. Contact to learn more about how to gain access to this feature.

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:

  1. Retrieve Client Credentials:

    • Go to .

    • 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) and client_secret (Secret Key).

  2. Obtain Access Token:

    • Make a POST request to the with the following payload:

    {
      "client_id": "your_client_id",
      "client_secret": "your_client_secret"
    }
    • The API will respond with a token payload, which will contain your access token.

  3. 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:

    Authorization: Bearer your_access_token

Endpoints

Authentication Endpoint

Clusters Endpoint

Workloads Endpoint

How to get cluster_uid

There are two options available to obtain the cluster_uid.

  1. Get cluster_uid directly from PerfectScale UI:

    • Go to the Overview tab

    • Click the three-dot button located next to the needed cluster

    • Click the Copy Cluster UID button -> now, your cluster_uid is copied.

  2. Get cluster_uid with the following command:

kubectl get namespace kube-system -o=jsonpath='{.metadata.uid}'

Deleting an API Token

In certain situations, you may find it necessary to delete an API token.

Follow these easy steps:

  1. Click on the Profile button in the bottom left corner and select Organization Settings.

  2. In the pop-up window, navigate to the API Tokens tab.

  3. Click the hamburger on the right-hand side, select Delete API Token, and click the Delete button.

Deleting a cluster

The endpoint removes the cluster from PerfectScale without deleting the cluster itself.

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:

Ensure that the following request includes the cluster_uid parameter, as it is mandatory. Follow provided in order to obtain this value.

Get the full list of clusters via and extract cluster_uids from it.

sales@perfectscale.io
https://app.perfectscale.io
rate-limiting policy
authentication process
Swagger documentation
Authentication Endpoint
the instructions
API
Get cluster UID
Cluster UID copied
Delete API token
Get cluster UID

Public authentication for clients

post

This endpoint allows clients to authenticate using their client credentials.

Authorizations
Body
client_idstringRequired

The client identifier issued to the client during the registration process.

client_secretstringRequired

The client secret issued to the client during the registration process.

Responses
200
Authentication successful
application/json
400
Bad request, client credentials are missing or incorrect.
401
Unauthorized, client authentication failed.
500
Internal server error
post
POST /public/v1/auth/public_auth HTTP/1.1
Host: api.app.perfectscale.io
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 43

{
  "client_id": "text",
  "client_secret": "text"
}
{
  "access_token": "text",
  "expires_in": 1
}

List all clusters for a tenant

get
Authorizations
Responses
200
A list of all clusters
application/json
400
Bad Request
401
Unauthorized
500
Internal server error
get
GET /public/v1/clusters HTTP/1.1
Host: api.app.perfectscale.io
Authorization: Bearer JWT
Accept: */*
{
  "data": [
    {
      "cloud": "aws",
      "createdAt": "2023-04-10T16:29:16.257006Z",
      "lastTransmittedAt": "2024-06-27T18:14:31.033028Z",
      "name": "amazing-app1",
      "region": "us-east-1",
      "uid": "e6fa8a83-644a-457d-99ad-2887ead9346c"
    },
    {
      "cloud": "azure",
      "createdAt": "2023-05-07T12:13:19.440393Z",
      "lastTransmittedAt": "2024-06-27T18:13:47.909722Z",
      "name": "amazing-app2",
      "region": "West Europe",
      "uid": "561d0f72-ed93-4386-b6af-dc41973fc2ab"
    }
  ]
}
delete
Authorizations
Path parameters
cluster_uidstringRequired
Responses
204
OK
404
NotFound
delete
DELETE /clusters/{cluster_uid} HTTP/1.1
Host: api.app.perfectscale.io
Authorization: Bearer JWT
Accept: */*

No content

get
Authorizations
Responses
200
OK
application/json
get
GET /clusters HTTP/1.1
Host: api.app.perfectscale.io
Authorization: Bearer JWT
Accept: */*
200

OK

{
  "data": [
    {
      "uid": "text",
      "name": "text",
      "cloud": "aws",
      "region": "text",
      "createdAt": "2025-05-18T08:42:13.975Z",
      "lastTransmittedAt": "2025-05-18T08:42:13.975Z"
    }
  ]
}
get
Authorizations
Path parameters
cluster_uidstringRequired
Query parameters
periodstringOptional

The period for which carbon emission is calculated

Responses
200
OK
application/json
get
GET /clusters/{cluster_uid} HTTP/1.1
Host: api.app.perfectscale.io
Authorization: Bearer JWT
Accept: */*
200

OK

{
  "data": {
    "uid": "text",
    "name": "text",
    "cloud": "aws",
    "region": "text",
    "createdAt": "2025-05-18T08:42:13.975Z",
    "lastTransmittedAt": "2025-05-18T08:42:13.975Z",
    "emission": {
      "ANY_ADDITIONAL_PROPERTY": 1
    }
  }
}

List all workloads in a specified cluster

get
Authorizations
Path parameters
cluster_uidstringRequired

The unique identifier for the cluster

Responses
200
A list of workloads
application/json
404
Cluster not found
500
Internal server error
get
GET /clusters/{cluster_uid}/workloads HTTP/1.1
Host: api.app.perfectscale.io
Authorization: Bearer JWT
Accept: */*
{
  "meta": {
    "count": 10
  },
  "data": [
    {
      "id": "examplenamespace-deployment-example-test-workload",
      "name": "example-test-workload",
      "type": "Deployment",
      "namespace": "examplenamespace",
      "firstSeen": "2023-04-08T16:51:08Z",
      "lastSeen": "2023-10-22T15:23:22.9Z",
      "runningMinutes": 40265,
      "replicasCounts": {
        "maxCount": 3,
        "avgCount": 2
      },
      "resilienceLevel": "medium",
      "muteStatus": {
        "isMuted": false,
        "expires": null
      },
      "costAnalysis": {
        "past30Days": {
          "totalCost": 1.2111549136128001,
          "wastedCost": 0.370918634267412
        },
        "costIncrease": 1,
        "pricePerHour": 1,
        "pricePerHourAllReplicas": 1,
        "wastePerHourAllReplicas": 1
      },
      "workloadLabels": {
        "ANY_ADDITIONAL_PROPERTY": "text"
      },
      "indicators": [
        {
          "name": "OverProvisionedMemRequest",
          "type": "waste",
          "severityLevel": 1
        }
      ],
      "containers": {
        "ANY_ADDITIONAL_PROPERTY": {
          "name": "container-example-name",
          "runningMinutes": 40265,
          "indicators": [
            {
              "name": "OverProvisionedMemRequest",
              "type": "waste",
              "severityLevel": 1
            }
          ],
          "resources": {
            "current": {
              "memoryRequestMiB": 128,
              "memoryLimitMiB": 256,
              "cpuRequestCores": 128,
              "cpuLimitCores": 256
            },
            "recommended": {
              "memoryRequestMiB": 128,
              "memoryLimitMiB": 256,
              "cpuRequestCores": 128,
              "cpuLimitCores": 256
            }
          },
          "usage": {
            "cpuCores": {
              "p90": 0.0015262789745040441,
              "p95": 0.0015262789745040441,
              "p100": 0.07069631706099244
            },
            "memoryMiB": {
              "p90": 0.0015262789745040441,
              "p95": 0.0015262789745040441,
              "p100": 0.07069631706099244
            }
          }
        }
      }
    }
  ]
}
  • Exclusive Access
  • Rate Limiting
  • Authentication
  • Endpoints
  • POSTPublic authentication for clients
  • Clusters Endpoint
  • GET/clusters
  • GET/clusters/{cluster_uid}
  • Workloads Endpoint
  • GETList all workloads in a specified cluster
  • How to get cluster_uid
  • Deleting an API Token
  • Deleting a cluster
  • DELETE/clusters/{cluster_uid}
  • How to get cluster UID
  • How to list all cluster UIDs
  • GETList all clusters for a tenant