Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

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.

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

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:

    • 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:

    {
      "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

Authentication endpoint

Public authentication for clients

post

This endpoint allows clients to authenticate using their client credentials.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
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
access_tokenstringOptional

Access token to be used for subsequent requests.

expires_inintegerOptional

The number of seconds the token will be valid.

post/auth/public_auth
POST /public/v1/auth/public_auth HTTP/1.1
Host: api.app.perfectscale.io
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 43

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

Clusters endpoint

get
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Responses
200

OK

application/json
get/clusters
GET /public/v1/clusters HTTP/1.1
Host: api.app.perfectscale.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
200

OK

{
  "data": [
    {
      "uid": "text",
      "name": "text",
      "cloud": "aws",
      "region": "text",
      "createdAt": "2026-01-01T00:00:00.000Z",
      "lastTransmittedAt": "2026-01-01T00:00:00.000Z"
    }
  ]
}
get
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
cluster_uidstringRequired
Query parameters
periodstringOptional

The period for which carbon emission is calculated

Responses
200

OK

application/json
get/clusters/{cluster_uid}
GET /public/v1/clusters/{cluster_uid} HTTP/1.1
Host: api.app.perfectscale.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
200

OK

{
  "data": {
    "uid": "text",
    "name": "text",
    "cloud": "aws",
    "region": "text",
    "createdAt": "2026-01-01T00:00:00.000Z",
    "lastTransmittedAt": "2026-01-01T00:00:00.000Z",
    "emission": {
      "ANY_ADDITIONAL_PROPERTY": 1
    }
  }
}

Workloads endpoint

List all workloads in a specified cluster

get
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
cluster_uidstringRequired

The unique identifier for the cluster

Query parameters
periodstring · enumOptional

The time period for which the data is calculated (from 1h to 30d).

Example: 30dPossible values:
expandEphemeralWorkloadsbooleanOptional

By default, short-lived ephemeral workloads in large clusters are collapsed into a single aggregate row named "Collapsed Ephemeral Pods" (namespace "EphemeralPods", type "-") carrying their summed cost and no recommendations. The aggregate row has empty-string values for resilienceLevel, optimizationPolicy, cpuOptimizationPolicy, memoryOptimizationPolicy and optimizationPolicyTimeWindow, a single placeholder container named "-", and firstSeen/lastSeen spanning the collapsed workloads. Collapse eligibility is evaluated within the requested period's data window, so the same cluster may collapse for one period and not another. Set to true to return the full, uncollapsed workload list.

Default: false
Responses
200

A list of workloads

application/json
get/clusters/{cluster_uid}/workloads
GET /public/v1/clusters/{cluster_uid}/workloads HTTP/1.1
Host: api.app.perfectscale.io
Authorization: Bearer YOUR_SECRET_TOKEN
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
      },
      "optimizationPolicy": "balanced",
      "optimizationPolicyTimeWindow": "14d",
      "cpuOptimizationPolicy": "balanced",
      "memoryOptimizationPolicy": "balanced",
      "memoryRequestEqualsLimit": false,
      "muteStatus": {
        "isMuted": false,
        "expires": null
      },
      "costAnalysis": {
        "past30Days": {
          "totalCost": 1.2111549136128001,
          "wastedCost": 0.370918634267412,
          "costPerHour": 0.370918634267412
        },
        "pastPeriod": {
          "totalCost": 1.2111549136128001,
          "wastedCost": 0.370918634267412,
          "costPerHour": 0.370918634267412
        },
        "next30Days": {
          "costIncrease": 1.2111549136128001,
          "potentialSavings": 0.370918634267412
        },
        "nextPeriod": {
          "costIncrease": 1.2111549136128001,
          "potentialSavings": 0.370918634267412
        }
      },
      "workloadLabels": {
        "ANY_ADDITIONAL_PROPERTY": "text"
      },
      "indicators": [
        {
          "name": "OverProvisionedMemRequest",
          "type": "waste",
          "severityLevel": 1
        }
      ],
      "containers": [
        {
          "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
            }
          }
        }
      ]
    }
  ]
}

Infrafit endpoint

The InfraFit API turns PerfectScale recommendations into automation-ready JSON, making it easy to embed cost and resource optimization directly into engineering workflows.

You can seamlessly use it for scheduled optimization checks, pre-deployment CI/CD guardrails, automated PRs, and continuous remediation.

For Karpenter, the API can return a ready-to-apply NodePool configuration, enabling teams to move from recommendation to implementation without manually translating dashboard insights into infrastructure code.

List all node groups with infra-fit data and recommendations

get

Returns node groups for a cluster, each containing utilization metrics, cost data, risk indicators, and actionable recommendations (instance-type or Karpenter configuration changes). Tenant resolved from service token.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
clusterUidstringRequired

Cluster unique identifier

Query parameters
periodstring · enumOptional

Analysis time period for infra-fit data.

Default: P30DPossible values:
recommendationLimitinteger · min: 1 · max: 20Optional

Max recommended node types per regular group (Karpenter always returns full change set)

Default: 3
hasRecommendationsbooleanOptional

Filter: true=only groups with actionable recs, false=only without, omit=all

includeMutedbooleanOptional

Include muted recommendations

Default: false
autoscalerTypestring · enumOptional

Autoscaler managing a node group

Possible values:
pageSizeinteger · min: 1 · max: 500Optional

Number of items per page (default 50, max 500)

Default: 50
pageTokenstringOptional

Opaque cursor token for pagination

Responses
200

List of node groups

application/json
get/clusters/{clusterUid}/node-groups
GET /public/v1/clusters/{clusterUid}/node-groups HTTP/1.1
Host: api.app.perfectscale.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "data": [
    {
      "id": "my-node-pool",
      "architectures": [
        "amd64"
      ],
      "reservations": [
        "on_demand"
      ],
      "autoscalerType": "cluster_autoscaler",
      "nodes": {
        "min": 1,
        "max": 1,
        "avg": 1
      },
      "runningMinutes": 1,
      "pods": {
        "capacity": 1,
        "allocatable": 1,
        "avgCount": 1
      },
      "cost": {
        "hourly": {
          "amount": "text",
          "currency": "text"
        },
        "timeframe": {
          "amount": "text",
          "currency": "text"
        },
        "idle": {
          "total": {
            "amount": "text",
            "currency": "text"
          },
          "cpu": {
            "amount": "text",
            "currency": "text"
          },
          "gpu": {
            "amount": "text",
            "currency": "text"
          },
          "mem": {
            "amount": "text",
            "currency": "text"
          }
        }
      },
      "cpu": {
        "requested": {
          "minCores": 1,
          "maxCores": 1,
          "avgCores": 1,
          "p80Cores": 1,
          "p95Cores": 1,
          "p99Cores": 1,
          "p999Cores": 1
        },
        "used": {
          "minCores": 1,
          "maxCores": 1,
          "avgCores": 1,
          "p80Cores": 1,
          "p95Cores": 1,
          "p99Cores": 1,
          "p999Cores": 1
        },
        "idleCores": 1
      },
      "mem": {
        "requested": {
          "minMiB": 1,
          "maxMiB": 1,
          "avgMiB": 1,
          "p80MiB": 1,
          "p95MiB": 1,
          "p99MiB": 1,
          "p999MiB": 1
        },
        "used": {
          "minMiB": 1,
          "maxMiB": 1,
          "avgMiB": 1,
          "p80MiB": 1,
          "p95MiB": 1,
          "p99MiB": 1,
          "p999MiB": 1
        },
        "idleMiB": 1
      },
      "gpu": {
        "idle": {
          "units": 1,
          "memoryMiB": 1
        },
        "requested": {
          "avgUnits": 1,
          "minUnits": 1,
          "maxUnits": 1,
          "p80Units": 1,
          "p95Units": 1,
          "p99Units": 1,
          "p999Units": 1,
          "avgMemoryMiB": 1,
          "minMemoryMiB": 1,
          "maxMemoryMiB": 1,
          "p80MemoryMiB": 1,
          "p95MemoryMiB": 1,
          "p99MemoryMiB": 1,
          "p999MemoryMiB": 1
        },
        "used": {
          "avgUnits": 1,
          "minUnits": 1,
          "maxUnits": 1,
          "p80Units": 1,
          "p95Units": 1,
          "p99Units": 1,
          "p999Units": 1,
          "avgMemoryMiB": 1,
          "minMemoryMiB": 1,
          "maxMemoryMiB": 1,
          "p80MemoryMiB": 1,
          "p95MemoryMiB": 1,
          "p99MemoryMiB": 1,
          "p999MemoryMiB": 1
        },
        "architectures": [
          "text"
        ],
        "sharingType": [
          "text"
        ]
      },
      "seen": {
        "firstTime": "2026-01-01T00:00:00.000Z",
        "lastTime": "2026-01-01T00:00:00.000Z"
      },
      "labels": {
        "ANY_ADDITIONAL_PROPERTY": "text"
      },
      "nodeTypes": [
        {
          "id": "m5.2xlarge",
          "instance": {
            "type": "m5.2xlarge",
            "family": "m5",
            "architecture": "amd64",
            "cpu": {
              "capacityCores": 1,
              "allocatableCores": 1
            },
            "mem": {
              "capacityMiB": 1,
              "allocatableMiB": 1
            },
            "gpu": {
              "capacityUnits": 1,
              "allocatableUnits": 1,
              "memCapacityMiB": 1
            }
          },
          "isSpot": true,
          "nodes": {
            "min": 1,
            "max": 1,
            "avg": 1
          },
          "cost": {
            "hourly": {
              "amount": "text",
              "currency": "text"
            },
            "timeframe": {
              "amount": "text",
              "currency": "text"
            },
            "idle": {
              "total": {
                "amount": "text",
                "currency": "text"
              },
              "cpu": {
                "amount": "text",
                "currency": "text"
              },
              "gpu": {
                "amount": "text",
                "currency": "text"
              },
              "mem": {
                "amount": "text",
                "currency": "text"
              }
            }
          },
          "runningMinutes": 1,
          "pods": {
            "capacity": 1,
            "allocatable": 1,
            "avgCount": 1
          },
          "cpu": {
            "requested": {
              "minCores": 1,
              "maxCores": 1,
              "avgCores": 1,
              "p80Cores": 1,
              "p95Cores": 1,
              "p99Cores": 1,
              "p999Cores": 1
            },
            "used": {
              "minCores": 1,
              "maxCores": 1,
              "avgCores": 1,
              "p80Cores": 1,
              "p95Cores": 1,
              "p99Cores": 1,
              "p999Cores": 1
            },
            "idleCores": 1
          },
          "mem": {
            "requested": {
              "minMiB": 1,
              "maxMiB": 1,
              "avgMiB": 1,
              "p80MiB": 1,
              "p95MiB": 1,
              "p99MiB": 1,
              "p999MiB": 1
            },
            "used": {
              "minMiB": 1,
              "maxMiB": 1,
              "avgMiB": 1,
              "p80MiB": 1,
              "p95MiB": 1,
              "p99MiB": 1,
              "p999MiB": 1
            },
            "idleMiB": 1
          },
          "gpu": {
            "idle": {
              "units": 1,
              "memoryMiB": 1
            },
            "requested": {
              "avgUnits": 1,
              "minUnits": 1,
              "maxUnits": 1,
              "p80Units": 1,
              "p95Units": 1,
              "p99Units": 1,
              "p999Units": 1,
              "avgMemoryMiB": 1,
              "minMemoryMiB": 1,
              "maxMemoryMiB": 1,
              "p80MemoryMiB": 1,
              "p95MemoryMiB": 1,
              "p99MemoryMiB": 1,
              "p999MemoryMiB": 1
            },
            "used": {
              "avgUnits": 1,
              "minUnits": 1,
              "maxUnits": 1,
              "p80Units": 1,
              "p95Units": 1,
              "p99Units": 1,
              "p999Units": 1,
              "avgMemoryMiB": 1,
              "minMemoryMiB": 1,
              "maxMemoryMiB": 1,
              "p80MemoryMiB": 1,
              "p95MemoryMiB": 1,
              "p99MemoryMiB": 1,
              "p999MemoryMiB": 1
            },
            "architectures": [
              "text"
            ]
          },
          "seen": {
            "firstTime": "2026-01-01T00:00:00.000Z",
            "lastTime": "2026-01-01T00:00:00.000Z"
          }
        }
      ],
      "recommendations": {
        "type": "standard",
        "hasChanges": true,
        "nodeTypes": [
          {
            "id": "m6g.xlarge",
            "instanceType": "m6g.xlarge",
            "instanceFamily": "m6g",
            "hourlyCost": {
              "amount": "text",
              "currency": "text"
            },
            "estimatedSavings": {
              "amount": "text",
              "currency": "text"
            },
            "estimatedSavingsPct": 1,
            "nodeCount": 1
          }
        ]
      }
    }
  ],
  "meta": {
    "timeframe": "text",
    "pagination": {
      "next": null,
      "prev": null,
      "pageSize": 1
    }
  }
}

Get a single node group with infra-fit data and recommendations

get

Returns a single node group by name. Same shape as one item from the list endpoint. Returns 404 if the group does not exist in the cluster.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
clusterUidstringRequired

Cluster unique identifier

nodeGroupNamestringRequired

Node group name

Query parameters
periodstring · enumOptional

Analysis time period for infra-fit data.

Default: P30DPossible values:
recommendationLimitinteger · min: 1 · max: 20Optional

Max recommended node types per group (Karpenter always returns full change set)

Default: 3
Responses
200

Single node group

application/json
get/clusters/{clusterUid}/node-groups/{nodeGroupName}
GET /public/v1/clusters/{clusterUid}/node-groups/{nodeGroupName} HTTP/1.1
Host: api.app.perfectscale.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "data": {
    "id": "my-node-pool",
    "architectures": [
      "amd64"
    ],
    "reservations": [
      "on_demand"
    ],
    "autoscalerType": "cluster_autoscaler",
    "nodes": {
      "min": 1,
      "max": 1,
      "avg": 1
    },
    "runningMinutes": 1,
    "pods": {
      "capacity": 1,
      "allocatable": 1,
      "avgCount": 1
    },
    "cost": {
      "hourly": {
        "amount": "text",
        "currency": "text"
      },
      "timeframe": {
        "amount": "text",
        "currency": "text"
      },
      "idle": {
        "total": {
          "amount": "text",
          "currency": "text"
        },
        "cpu": {
          "amount": "text",
          "currency": "text"
        },
        "gpu": {
          "amount": "text",
          "currency": "text"
        },
        "mem": {
          "amount": "text",
          "currency": "text"
        }
      }
    },
    "cpu": {
      "requested": {
        "minCores": 1,
        "maxCores": 1,
        "avgCores": 1,
        "p80Cores": 1,
        "p95Cores": 1,
        "p99Cores": 1,
        "p999Cores": 1
      },
      "used": {
        "minCores": 1,
        "maxCores": 1,
        "avgCores": 1,
        "p80Cores": 1,
        "p95Cores": 1,
        "p99Cores": 1,
        "p999Cores": 1
      },
      "idleCores": 1
    },
    "mem": {
      "requested": {
        "minMiB": 1,
        "maxMiB": 1,
        "avgMiB": 1,
        "p80MiB": 1,
        "p95MiB": 1,
        "p99MiB": 1,
        "p999MiB": 1
      },
      "used": {
        "minMiB": 1,
        "maxMiB": 1,
        "avgMiB": 1,
        "p80MiB": 1,
        "p95MiB": 1,
        "p99MiB": 1,
        "p999MiB": 1
      },
      "idleMiB": 1
    },
    "gpu": {
      "idle": {
        "units": 1,
        "memoryMiB": 1
      },
      "requested": {
        "avgUnits": 1,
        "minUnits": 1,
        "maxUnits": 1,
        "p80Units": 1,
        "p95Units": 1,
        "p99Units": 1,
        "p999Units": 1,
        "avgMemoryMiB": 1,
        "minMemoryMiB": 1,
        "maxMemoryMiB": 1,
        "p80MemoryMiB": 1,
        "p95MemoryMiB": 1,
        "p99MemoryMiB": 1,
        "p999MemoryMiB": 1
      },
      "used": {
        "avgUnits": 1,
        "minUnits": 1,
        "maxUnits": 1,
        "p80Units": 1,
        "p95Units": 1,
        "p99Units": 1,
        "p999Units": 1,
        "avgMemoryMiB": 1,
        "minMemoryMiB": 1,
        "maxMemoryMiB": 1,
        "p80MemoryMiB": 1,
        "p95MemoryMiB": 1,
        "p99MemoryMiB": 1,
        "p999MemoryMiB": 1
      },
      "architectures": [
        "text"
      ],
      "sharingType": [
        "text"
      ]
    },
    "seen": {
      "firstTime": "2026-01-01T00:00:00.000Z",
      "lastTime": "2026-01-01T00:00:00.000Z"
    },
    "labels": {
      "ANY_ADDITIONAL_PROPERTY": "text"
    },
    "nodeTypes": [
      {
        "id": "m5.2xlarge",
        "instance": {
          "type": "m5.2xlarge",
          "family": "m5",
          "architecture": "amd64",
          "cpu": {
            "capacityCores": 1,
            "allocatableCores": 1
          },
          "mem": {
            "capacityMiB": 1,
            "allocatableMiB": 1
          },
          "gpu": {
            "capacityUnits": 1,
            "allocatableUnits": 1,
            "memCapacityMiB": 1
          }
        },
        "isSpot": true,
        "nodes": {
          "min": 1,
          "max": 1,
          "avg": 1
        },
        "cost": {
          "hourly": {
            "amount": "text",
            "currency": "text"
          },
          "timeframe": {
            "amount": "text",
            "currency": "text"
          },
          "idle": {
            "total": {
              "amount": "text",
              "currency": "text"
            },
            "cpu": {
              "amount": "text",
              "currency": "text"
            },
            "gpu": {
              "amount": "text",
              "currency": "text"
            },
            "mem": {
              "amount": "text",
              "currency": "text"
            }
          }
        },
        "runningMinutes": 1,
        "pods": {
          "capacity": 1,
          "allocatable": 1,
          "avgCount": 1
        },
        "cpu": {
          "requested": {
            "minCores": 1,
            "maxCores": 1,
            "avgCores": 1,
            "p80Cores": 1,
            "p95Cores": 1,
            "p99Cores": 1,
            "p999Cores": 1
          },
          "used": {
            "minCores": 1,
            "maxCores": 1,
            "avgCores": 1,
            "p80Cores": 1,
            "p95Cores": 1,
            "p99Cores": 1,
            "p999Cores": 1
          },
          "idleCores": 1
        },
        "mem": {
          "requested": {
            "minMiB": 1,
            "maxMiB": 1,
            "avgMiB": 1,
            "p80MiB": 1,
            "p95MiB": 1,
            "p99MiB": 1,
            "p999MiB": 1
          },
          "used": {
            "minMiB": 1,
            "maxMiB": 1,
            "avgMiB": 1,
            "p80MiB": 1,
            "p95MiB": 1,
            "p99MiB": 1,
            "p999MiB": 1
          },
          "idleMiB": 1
        },
        "gpu": {
          "idle": {
            "units": 1,
            "memoryMiB": 1
          },
          "requested": {
            "avgUnits": 1,
            "minUnits": 1,
            "maxUnits": 1,
            "p80Units": 1,
            "p95Units": 1,
            "p99Units": 1,
            "p999Units": 1,
            "avgMemoryMiB": 1,
            "minMemoryMiB": 1,
            "maxMemoryMiB": 1,
            "p80MemoryMiB": 1,
            "p95MemoryMiB": 1,
            "p99MemoryMiB": 1,
            "p999MemoryMiB": 1
          },
          "used": {
            "avgUnits": 1,
            "minUnits": 1,
            "maxUnits": 1,
            "p80Units": 1,
            "p95Units": 1,
            "p99Units": 1,
            "p999Units": 1,
            "avgMemoryMiB": 1,
            "minMemoryMiB": 1,
            "maxMemoryMiB": 1,
            "p80MemoryMiB": 1,
            "p95MemoryMiB": 1,
            "p99MemoryMiB": 1,
            "p999MemoryMiB": 1
          },
          "architectures": [
            "text"
          ]
        },
        "seen": {
          "firstTime": "2026-01-01T00:00:00.000Z",
          "lastTime": "2026-01-01T00:00:00.000Z"
        }
      }
    ],
    "recommendations": {
      "type": "standard",
      "hasChanges": true,
      "nodeTypes": [
        {
          "id": "m6g.xlarge",
          "instanceType": "m6g.xlarge",
          "instanceFamily": "m6g",
          "hourlyCost": {
            "amount": "text",
            "currency": "text"
          },
          "estimatedSavings": {
            "amount": "text",
            "currency": "text"
          },
          "estimatedSavingsPct": 1,
          "nodeCount": 1
        }
      ]
    }
  },
  "meta": {
    "timeframe": "text",
    "pagination": {
      "next": null,
      "prev": null,
      "pageSize": 1
    }
  }
}

List unevictable pods in a cluster

get

Returns the pods from the latest pre-computed unevictable-pods snapshot for the cluster (no request-time recompute). Tenant resolved from the auth token; a cluster belonging to another tenant returns 404.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
clusterUidstringRequired

Cluster unique identifier

Query parameters
filterstringOptional

Composite filter expression: clauses of the form key[:op]:value joined by | (AND); op is optional and defaults to eq; comma-separate values within a clause for an IN match, e.g. filter=namespace:payments|blockedCostHourly:gte:10. Supported keys for this endpoint: namespace (eq), blockedCostHourly (eq/gte/lte, compares numerically on the underlying cost value, not the serialized Money object), reasonCode (eq), nodeGroup (eq), labels.<key> (eq). labels.<key> matches against the pod's Kubernetes labels — for example filter=labels.team:payments matches pods labeled team=payments. An unsupported key returns 400 with code: "filter_key_not_supported". Mute-status filtering is handled by the separate mute parameter, not this filter.

mutestring · enumOptional

Muted-finding handling: exclude (default) hides pods whose workload has a dismissal rule; include returns all pods, flagging muted ones via mute/mutedByRule on each reason; only returns exclusively muted pods, for auditing what's been silenced.

Default: excludePossible values:
sortBystring · enumOptional

Field to sort results by. blockedCostHourly sorts numerically on the underlying cost value, not the serialized Money object. Unset falls back to a stable but unspecified order (currently pod UID). Ties are always broken by UID for stable pagination.

Possible values:
sortOrderstring · enumOptional

Sort direction, applied only when sortBy is set.

Default: descPossible values:
pageSizeinteger · min: 1 · max: 500Optional

Number of items per page (default 50, max 500)

Default: 50
pageTokenstringOptional

Opaque cursor token for pagination

Responses
200

List of unevictable pods

application/json
get/clusters/{clusterUid}/unevictable-pods
GET /public/v1/clusters/{clusterUid}/unevictable-pods HTTP/1.1
Host: api.app.perfectscale.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "data": [
    {
      "name": "text",
      "namespace": "text",
      "id": "text",
      "workload": {
        "id": "text",
        "name": "text",
        "type": "Deployment"
      },
      "reasons": [
        {
          "reason": "text",
          "reasonCode": "opt_out_annotation",
          "details": "text",
          "remediation": {
            "fixSummary": "text",
            "risk": "none",
            "confidence": "low",
            "currentSpec": null,
            "recommendedSpec": null,
            "yamlDiff": null
          },
          "mute": true,
          "mutedByRule": {
            "note": null,
            "createdBy": "text",
            "createTime": "2026-01-01T00:00:00.000Z"
          }
        }
      ],
      "phase": "text",
      "startTime": "2026-01-01T00:00:00.000Z",
      "labels": {
        "ANY_ADDITIONAL_PROPERTY": "text"
      },
      "annotations": {
        "ANY_ADDITIONAL_PROPERTY": "text"
      },
      "spec": {
        "node": null,
        "nodeGroup": "text",
        "priority": 1,
        "nodeSelector": {
          "ANY_ADDITIONAL_PROPERTY": "text"
        },
        "affinity": {
          "nodeAffinity": {
            "ANY_ADDITIONAL_PROPERTY": "anything"
          },
          "podAffinity": {
            "ANY_ADDITIONAL_PROPERTY": "anything"
          },
          "podAntiAffinity": {
            "ANY_ADDITIONAL_PROPERTY": "anything"
          }
        },
        "tolerations": [
          {
            "key": "text",
            "operator": "text",
            "value": "text",
            "effect": "text"
          }
        ],
        "containers": [
          {
            "name": "text",
            "image": "text",
            "cpuRequestCores": null,
            "cpuLimitCores": null,
            "memoryRequestMiB": null,
            "memoryLimitMiB": null,
            "gpuRequest": null,
            "gpuLimit": null
          }
        ],
        "volumes": [
          {
            "name": "text",
            "hostPath": "text",
            "emptyDir": "text",
            "pvcClaimName": "text"
          }
        ],
        "topologySpreadConstraints": [
          {
            "maxSkew": 1,
            "topologyKey": "text",
            "whenUnsatisfiable": "text",
            "labelSelector": {
              "ANY_ADDITIONAL_PROPERTY": "anything"
            }
          }
        ],
        "ownerReferences": [
          {
            "apiVersion": "text",
            "kind": "text",
            "name": "text",
            "controller": null
          }
        ]
      },
      "blockedNodeCount": 1,
      "blockedNodes": [
        "text"
      ],
      "blockedCostHourly": {
        "amount": "text",
        "currency": "text"
      },
      "clusterUid": "text",
      "mute": true,
      "siblingPodNames": [
        "text"
      ]
    }
  ],
  "meta": {
    "pagination": {
      "next": null,
      "prev": null,
      "pageSize": 1
    },
    "snapshotTime": "2026-01-01T00:00:00.000Z",
    "algorithmVersion": "text",
    "summary": {
      "totalPods": 1,
      "unevictablePods": 1,
      "mute": 1,
      "totalNodes": 1,
      "autoscalerType": "text"
    }
  }
}

Per-pod unevictable report — one row per pod, with all its reasons combined

get

Issues view — one row per pod, carrying all of that pod's unevictable reasons. Served from the latest pre-computed snapshot (no request-time recompute). Tenant resolved from the auth token; a cluster belonging to another tenant returns 404.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
clusterUidstringRequired

Cluster unique identifier

Query parameters
filterstringOptional

Composite filter expression: clauses of the form key[:op]:value joined by | (AND); op is optional and defaults to eq; comma-separate values within a clause for an IN match. Supported keys for this endpoint: namespace (eq), blockedCostHourly (eq/gte/lte, compares numerically on the underlying cost value, not the serialized Money object), nodeGroup (eq), labels.<key> (eq). labels.<key> matches against the pod's Kubernetes labels — for example filter=labels.team:payments matches pods labeled team=payments. An unsupported key returns 400 with code: "filter_key_not_supported". Mute-status filtering is handled by the separate mute parameter, not this filter.

mutestring · enumOptional

Muted-finding handling: exclude (default) hides rows whose workload has a dismissal rule; include returns all rows, flagged via mute; only returns exclusively muted rows, for auditing what's been silenced.

Default: excludePossible values:
sortBystring · enumOptional

Field to sort results by. blockedCostHourly sorts numerically on the underlying cost value, not the serialized Money object. Unset falls back to a stable but unspecified order (currently pod UID). Ties are always broken by UID for stable pagination.

Possible values:
sortOrderstring · enumOptional

Sort direction, applied only when sortBy is set.

Default: descPossible values:
pageSizeinteger · min: 1 · max: 500Optional

Number of items per page (default 50, max 500)

Default: 50
pageTokenstringOptional

Opaque cursor token for pagination

Responses
200

List of unevictable pod issue rows

application/json
get/clusters/{clusterUid}/unevictable-report
GET /public/v1/clusters/{clusterUid}/unevictable-report HTTP/1.1
Host: api.app.perfectscale.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "data": [
    {
      "name": "text",
      "id": "text",
      "workload": {
        "id": "text",
        "name": "text",
        "type": "Deployment"
      },
      "namespace": "text",
      "labels": {
        "ANY_ADDITIONAL_PROPERTY": "text"
      },
      "node": null,
      "nodeGroup": "text",
      "reasons": [
        {
          "reason": "text",
          "reasonCode": "opt_out_annotation",
          "details": "text",
          "remediation": {
            "fixSummary": "text",
            "risk": "none",
            "confidence": "low",
            "currentSpec": null,
            "recommendedSpec": null,
            "yamlDiff": null
          },
          "mute": true,
          "mutedByRule": {
            "note": null,
            "createdBy": "text",
            "createTime": "2026-01-01T00:00:00.000Z"
          }
        }
      ],
      "mute": true,
      "priority": 1,
      "blockedCostHourly": {
        "amount": "text",
        "currency": "text"
      }
    }
  ],
  "meta": {
    "pagination": {
      "next": null,
      "prev": null,
      "pageSize": 1
    },
    "snapshotTime": "2026-01-01T00:00:00.000Z",
    "algorithmVersion": "text",
    "summary": {
      "totalPods": 1,
      "unevictablePods": 1,
      "mute": 1,
      "totalNodes": 1,
      "autoscalerType": "text"
    }
  }
}

Get a single unevictable pod

get

Full detail for one pod (all reasons with the full remediation object), served from the latest pre-computed snapshot (no request-time recompute). Tenant resolved from the auth token; a cluster belonging to another tenant, or a pod not present in the latest snapshot, returns 404.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
clusterUidstringRequired

Cluster unique identifier

podUidstringRequired

Pod unique identifier

Responses
200

Single unevictable pod, returned directly (no envelope)

application/json

A single unevictable pod from the latest pre-computed snapshot for the cluster. Returned both as a list item and as the single-pod detail response — the detail response additionally populates siblingPodNames.

namestringRequired
namespacestringRequired
idstringRequired
phasestringRequired
startTimestring · date-timeRequired

Pod creation timestamp (RFC 3339 UTC).

blockedNodeCountintegerOptional

Number of nodes this pod blocks from scaling down.

blockedNodesstring[]Optional

Names of the nodes this pod pins.

clusterUidstringOptional
mutebooleanOptional

True when the pod's workload is muted by a dismissal rule, muting all of its reasons.

siblingPodNamesstring[]Optional

Names of other pods of the same workload id in this snapshot. Populated only by the single-pod detail endpoint.

get/clusters/{clusterUid}/unevictable-pods/{podUid}
GET /public/v1/clusters/{clusterUid}/unevictable-pods/{podUid} HTTP/1.1
Host: api.app.perfectscale.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "name": "text",
  "namespace": "text",
  "id": "text",
  "workload": {
    "id": "text",
    "name": "text",
    "type": "Deployment"
  },
  "reasons": [
    {
      "reason": "text",
      "reasonCode": "opt_out_annotation",
      "details": "text",
      "remediation": {
        "fixSummary": "text",
        "risk": "none",
        "confidence": "low",
        "currentSpec": null,
        "recommendedSpec": null,
        "yamlDiff": null
      },
      "mute": true,
      "mutedByRule": {
        "note": null,
        "createdBy": "text",
        "createTime": "2026-01-01T00:00:00.000Z"
      }
    }
  ],
  "phase": "text",
  "startTime": "2026-01-01T00:00:00.000Z",
  "labels": {
    "ANY_ADDITIONAL_PROPERTY": "text"
  },
  "annotations": {
    "ANY_ADDITIONAL_PROPERTY": "text"
  },
  "spec": {
    "node": null,
    "nodeGroup": "text",
    "priority": 1,
    "nodeSelector": {
      "ANY_ADDITIONAL_PROPERTY": "text"
    },
    "affinity": {
      "nodeAffinity": {
        "ANY_ADDITIONAL_PROPERTY": "anything"
      },
      "podAffinity": {
        "ANY_ADDITIONAL_PROPERTY": "anything"
      },
      "podAntiAffinity": {
        "ANY_ADDITIONAL_PROPERTY": "anything"
      }
    },
    "tolerations": [
      {
        "key": "text",
        "operator": "text",
        "value": "text",
        "effect": "text"
      }
    ],
    "containers": [
      {
        "name": "text",
        "image": "text",
        "cpuRequestCores": null,
        "cpuLimitCores": null,
        "memoryRequestMiB": null,
        "memoryLimitMiB": null,
        "gpuRequest": null,
        "gpuLimit": null
      }
    ],
    "volumes": [
      {
        "name": "text",
        "hostPath": "text",
        "emptyDir": "text",
        "pvcClaimName": "text"
      }
    ],
    "topologySpreadConstraints": [
      {
        "maxSkew": 1,
        "topologyKey": "text",
        "whenUnsatisfiable": "text",
        "labelSelector": {
          "ANY_ADDITIONAL_PROPERTY": "anything"
        }
      }
    ],
    "ownerReferences": [
      {
        "apiVersion": "text",
        "kind": "text",
        "name": "text",
        "controller": null
      }
    ]
  },
  "blockedNodeCount": 1,
  "blockedNodes": [
    "text"
  ],
  "blockedCostHourly": {
    "amount": "text",
    "currency": "text"
  },
  "clusterUid": "text",
  "mute": true,
  "siblingPodNames": [
    "text"
  ]
}

List unevictable muted workloads for a cluster

get

Read-only list of workloads that have an active mute (dismissal) rule for the cluster. Rules are created and removed via the web app / user API only; this endpoint does not expose write operations. Tenant resolved from the auth token; a cluster belonging to another tenant returns 404.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
clusterUidstringRequired

Cluster unique identifier

Query parameters
pageSizeinteger · min: 1 · max: 500Optional

Number of items per page (default 50, max 500)

Default: 50
pageTokenstringOptional

Opaque cursor token for pagination

Responses
200

List of muted workloads for the cluster

application/json
get/clusters/{clusterUid}/unevictable-muted-workloads
GET /public/v1/clusters/{clusterUid}/unevictable-muted-workloads HTTP/1.1
Host: api.app.perfectscale.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "data": [
    {
      "clusterUid": "text",
      "id": "text",
      "namespace": "text",
      "workloadName": "text",
      "note": "text",
      "createdBy": "text",
      "createTime": "2026-01-01T00:00:00.000Z",
      "updateTime": "2026-01-01T00:00:00.000Z"
    }
  ],
  "meta": {
    "pagination": {
      "next": null,
      "prev": null,
      "pageSize": 1
    }
  }
}

Infrafit GitHub actions

The InfraFit GitHub Action turns PerfectScale Karpenter NodePool recommendations into ready-to-review pull requests. It fetches recommendations from the PerfectScale API, maps them to the matching Karpenter YAML files in your repository, applies the changes, and opens a PR with the diff. You can create one PR per cluster or combine changes into a single PR.

If a recommendation cannot be applied automatically, the action creates a GitHub issue instead, so no recommendation is missed.

The action never changes a live cluster. All changes are proposed through pull requests, and your existing review and approval process remains the control point.

How it helps:

  • Reduces manual work. Recommendations are delivered as ready-to-review YAML changes instead of requiring engineers to update files by hand.

  • Keeps recommendations actionable. Changes appear directly in GitHub, where engineering teams already manage infrastructure work.

  • Fits GitOps workflows. Every change is reviewable, attributable, and recorded in git history. Engineers can approve, edit, or close each PR.

  • Requires no new infrastructure. The action runs on existing GitHub Actions runners and supports Anthropic, OpenAI, Amazon Bedrock, GitHub Copilot, Azure OpenAI, and OpenAI-compatible endpoints.

  • Keeps configuration aligned over time. Run the action on a schedule to continuously update Karpenter configuration as workload behavior changes.

Access more information about Infrafit GitHub actions here.

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

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

      Cluster UID copied
  2. Get cluster_uid with the following command:

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

Automation Audit Log Endpoint

The Automation Audit Log provides visibility into all actions performed by PerfectScale automation. This endpoint allows teams to programmatically access, retrieve, and filter audit logs and seamlessly integrate them into their existing systems or tools.

The Automation Audit Log shows data from the last 30 days.

Get Automation Audit Logs with Cursor Pagination

post

Retrieves a list of automation audit log entries within a specified time range, using cursor-based pagination.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Body
fromstring · date-timeOptional

The start of the time range in ISO 8601 format with UTC timezone (e.g., "2025-09-17T00:00:00Z"). If omitted, defaults to 00:00:00 UTC of the day that is 30 days ago from today.

Constraints:

  • Must be in UTC timezone (ends with 'Z' or has '+00:00' offset)
  • Cannot be in the future
  • Cannot be before 00:00:00 UTC of 30 days ago from today
  • Must be before 'to' date when both are provided
  • Must be different from 'to' date

Example: If today is 2025-10-17, the earliest allowed value is "2025-09-17T00:00:00Z"

tostring · date-timeOptional

The end of the time range in ISO 8601 format with UTC timezone (e.g., "2025-10-17T23:59:59Z"). If omitted, defaults to the current time in UTC.

Constraints:

  • Must be in UTC timezone (ends with 'Z' or has '+00:00' offset)
  • Cannot be in the future
  • Must be after 'from' date when both are provided
  • Must be different from 'from' date
page_sizeinteger · min: 1 · max: 5000Optional

The maximum number of items to return. Defaults to 1000. Must be between 1 and 5000.

Default: 1000
page_tokenstringOptional

An opaque token from the 'next' or 'prev' field in the response's pagination object, used to fetch the next/previous page. The token encodes both the boundary position and the page direction. Preferred over the deprecated 'after'/'before' fields.

afterstringOptionalDeprecated

Deprecated: use 'page_token' instead. An opaque token from the 'next' field in the response's pagination object, used to fetch the next page.

beforestringOptionalDeprecated

Deprecated: use 'page_token' instead. An opaque token from the 'prev' field in the response's pagination object, used to fetch the previous page.

cluster_uidsstring[]Optional

Filter by cluster UIDs. Accepts multiple cluster UIDs to filter the audit logs.

namespacesstring[]Optional

Filter by Kubernetes namespaces. Accepts multiple namespaces to filter the audit logs.

Responses
200

OK

application/json
post/automation/audit_logs
POST /public/v1/automation/audit_logs HTTP/1.1
Host: api.app.perfectscale.io
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 150

{
  "from": "2026-01-01T00:00:00.000Z",
  "to": "2026-01-01T00:00:00.000Z",
  "page_size": 1000,
  "page_token": "text",
  "cluster_uids": [
    "text"
  ],
  "namespaces": [
    "text"
  ]
}
200

OK

{
  "data": [
    {
      "started_at": "2024-03-08T12:00:00Z",
      "cluster_name": "cluster-1",
      "cluster_uid": "cluster_1",
      "workload_id": "workload_1",
      "workload_name": "workload-1",
      "workload_type": "deployment",
      "namespace": "default",
      "labels": {
        "ANY_ADDITIONAL_PROPERTY": "value"
      },
      "container": {
        "name": "test_name_1",
        "cpu": {
          "cpuCoresRequest": 2,
          "recommendCpuCoresRequest": 2,
          "cpuCoresLimits": 3,
          "recommendCpuCoresLimits": 5,
          "cpuRequestImpact": 3,
          "cpuLimitImpact": 3,
          "cpuRequestChangePercent": 50,
          "cpuLimitChangePercent": 50,
          "cpuRequestChangeAbsolute": 3,
          "cpuLimitChangeAbsolute": 3
        },
        "memory": {
          "memMiBRequest": 2,
          "recommendMemMiBRequest": 2,
          "memMiBLimits": 3,
          "recommendMemMiBLimits": 3,
          "memMiBRequestImpact": 3,
          "memMiBLimitImpact": 3,
          "memRequestChangePercent": 50,
          "memLimitChangePercent": 50,
          "memMiBRequestChangeAbsolute": 3,
          "memMiBLimitChangeAbsolute": 3
        },
        "indicators": [
          {
            "name": "UnderProvisionedCpuRequest",
            "type": "risk",
            "severity": 1
          }
        ]
      },
      "executed": "regular-eviction",
      "workload_indicators": [
        {
          "name": "UnderProvisionedCpuRequest",
          "type": "risk",
          "severity": 1
        }
      ]
    }
  ],
  "meta": {
    "pagination": {
      "next": "text",
      "prev": "text",
      "page_size": 1
    }
  }
}

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.

Delete API token

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:

delete
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
cluster_uidstringRequired
Responses
200

OK

No content

delete/clusters/{cluster_uid}
DELETE /public/v1/clusters/{cluster_uid} HTTP/1.1
Host: api.app.perfectscale.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*

No content

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.

Get cluster UID

How to list all cluster UIDs

You can seamlessly list all the clusters' UIDs of the tenant by using the following API:

List all clusters for a tenant

get
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Responses
200

A list of all clusters

application/json
get/clusters
GET /public/v1/clusters HTTP/1.1
Host: api.app.perfectscale.io
Authorization: Bearer YOUR_SECRET_TOKEN
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"
    }
  ]
}

Last updated

Was this helpful?