Skip to main content
POST
Estimate what a change to an application costs

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

x-ankra-organisation-id
string

PAT organisation override.

Path Parameters

application_id
string<uuid>
required

Body

application/json

A proposed change to an application. For replicas, resources, park and promote, cluster_id and namespace name the deployment it changes and are required. For new_environment and database, cluster_id names the cluster the new workload would run on; without it the answer is not known.

change
enum<string>
required

The kind of change.

Available options:
replicas,
resources,
park,
promote,
new_environment,
database
cluster_id
string<uuid> | null

The cluster the deployment runs on, or for new_environment and database the cluster the new workload would run on.

namespace
string | null

The namespace the deployment runs in.

replicas
integer | null

The proposed replica count, for replicas (0 to 1000); for new_environment (1 to 1000) it replaces the application's own.

cpu_request
string | null

The proposed CPU request per pod, for resources (a Kubernetes quantity such as 500m); for new_environment it replaces the application's own.

memory_request
string | null

The proposed memory request per pod, for resources (a Kubernetes quantity such as 512Mi); for new_environment it replaces the application's own.

service
string | null

For database, the managed service engine the preset installs, such as service-postgresql (the default).

parameters
object | null

For database, the preset's plan parameters, such as instances, cpu_millicores and memory_mib; the engine's defaults fill what is absent.

Response

Successful response

What a proposed change would do to the application's monthly cost. Priced false leaves monthly_delta_cents and confidence null and names why in unpriced_reason; a priced zero is a change that costs nothing.

change
string
required
application_id
string<uuid>
required
cluster_id
string<uuid> | null
required
namespace
string | null
required
currency
string
required

The reader's display currency; every *_cents figure is in its minor units.

priced
boolean
required
unpriced_reason
string | null
required
monthly_delta_cents
integer | null
required

How much more (positive) or less (negative) the application would cost a month after the change.

current_monthly_cents
integer | null
required

The deployment's cost a month today, compute and storage, as the object projection counts it; null when it is not known, and for a new environment or a database, which do not run yet.

confidence
string | null
required

The pricing coverage of the snapshot the figure is read from: high, medium or low.

coverage_incomplete
boolean | null
required

The figure is a floor: the snapshot left something unpriced, or, for a new environment or a database, storage it would claim is not included.

basis
string | null
required

How the figure was reached, in a sentence or two.