Goal
Read memory, findings and sizes, and ask for changes, from the API.Prerequisites
- An API token. Read routes need project read access. POST and PUT routes need project write access.
Workflow
1
Call a read endpoint for the project.
2
Use the finding id from the list to call show, dismiss, reopen or apply.
3
Apply returns 202 with the approval request. Poll the finding for its state.
Conventions
- Responses are wrapped in {“success”:true,“data”:…}.
- Byte values are bytes, processor values are cores, rates are per second and times are RFC3339.
- An unknown metric is null, never 0. A null memory limit means no limit.
- Findings, sizes and leak endpoints take tz, an IANA zone such as Africa/Lagos, for times written in sentences.
- Money is whole naira and dollars.
Resources
- GET /api/v1/projects/{projectID}/resources?range=live|1h|24h|7d: services with status, summary, events, volumes, series per service and per copy, and chart markers. Default range is 1h. live reads the node now.
- GET /api/v1/projects/{projectID}/resources/status: the current state and 7-day summary of each deployment, and the project’s databases.
- GET /api/v1/resources/memory-ranking: your own services ranked by memory now.
- GET /api/v1/nodes/{nodeID}/resources: memory by project, other programs and machine charts for a server you own.
- GET /api/v1/compute/instances/{instanceID}/resources: the same for a VPS you own. StackShift’s shared nodes answer 404.
Findings
- GET /api/v1/projects/{projectID}/performance/findings: counts, ranked findings and a verdict per service.
- GET /api/v1/projects/{projectID}/performance/findings/{findingID}: one finding.
- POST /api/v1/projects/{projectID}/performance/findings/{findingID}/dismiss: body {“reason”:”…”}, required.
- POST /api/v1/projects/{projectID}/performance/findings/{findingID}/reopen: reopen a finding.
- POST /api/v1/projects/{projectID}/performance/findings/{findingID}/apply: returns 202 with the approval request and who it is waiting for.
- GET /api/v1/resources/findings: open findings per service across your own projects, and the ones that need attention.
Sizes and runtime caps
- GET /api/v1/projects/{projectID}/performance/sizes?process_type=&direction=raise|lower: the size options with the recommended size and price differences.
- POST /api/v1/projects/{projectID}/performance/resize: body {process_type, memory_mb, runtime_caps?}. memory_mb must be one of the listed options. Returns 202.
- GET /api/v1/projects/{projectID}/performance/runtime-caps: the cap in force.
- PUT /api/v1/projects/{projectID}/performance/runtime-caps: body {“enabled”: true|false}. Redeploys. Returns 202.
Leaks and snapshots
- GET /api/v1/projects/{projectID}/performance/leak/{processType}: the guides for Node.js, Go, Python, PHP, Java and Ruby, your snapshots and any reminder.
- POST /api/v1/projects/{projectID}/performance/leak/{processType}/snapshots: Node.js only. Body {instance?}. Returns 202 with a snapshot that is taking. Poll the leak endpoint.
- GET /api/v1/projects/{projectID}/performance/snapshots/{snapshotID}/download: downloads the file.
- POST /api/v1/projects/{projectID}/performance/leak/{processType}/reminders: a reminder in 1 hour.
Expected result
You can read the same data as the dashboard and request the same changes.
Related guides
CLI
See findings and memory from a terminal with stackshift perf and stackshift memory.
Stackie and MCP
Ask Stackie or your coding agent about a project’s memory and findings. It uses the same findings as the dashboard.
What to improve
A ranked list of findings for the project. Each says what is wrong, shows the evidence, says what fixing it is worth and gives the steps.