How To: List the Rate Cards

Prev Next

Rate cards define the rates RealTheory uses to calculate the cost of your Kubernetes clusters and their associated objects. Every RealTheory account includes the built-in On-Demand, Reserved 1 Year and Reserved 3 Year rate cards, along with any custom, discount or SKU rate cards created for the account.

Get Rate Cards

To get the list of available rate cards, call the method below on the K8sRates endpoint.

GET <endpoint>/theory/api/v1/k8srates/ratecards?index={index}&count={count}&order={order}&direction={direction}

where

  • {endpoint} - is the URL of the RealTheory SaaS portal for your account.
  • {index} - is the starting index of the rate cards to include in the list. This parameter is optional and defaults to 0 if not specified.
  • {count} - is the maximum number of rate cards to return, up to a limit of 500. This parameter is optional and defaults to 100 if not specified.
  • {order} - is a string containing the name of the attribute to sort on. This parameter is optional.
  • {direction} - is a number that controls the direction of the sort. A value equal to or greater than 0 indicates ascending order; a value less than 0 indicates descending order. This parameter is optional and defaults to 0 if not specified.

Notes:

  • All calls to RealTheory APIs must be authenticated and authorized. See Authentication for more details.
  • The total number of available rate cards is returned in the x-total-count response header.
  • To retrieve all rate cards, increment the {index} by the {count} on each subsequent call until a response returns fewer rate cards than the {count} requested. See Paging for more details on how to page through all results.

Example

GET theory/api/v1/k8srates/ratecards?index=0&count=100

which returns a list of the first 100 rate cards.

Output

Returns an array of rate card objects. The type attribute identifies the kind of rate card, and determines which additional attributes are included:

  • OnDemandRateCard - the built-in rate card that uses the public On-Demand pricing published by the cloud provider.
  • Reserved1YearRateCard- the built-in rate card that uses the cloud provider's pricing for a 1 year commitment.
  • Reserved3YearRateCard - the built-in rate card that uses the cloud provider's pricing for a 3 year commitment.
  • DiscountRateCard - a rate card that applies percentage discounts, expressed as a value between 0 and 1.0, to the public pricing published by the cloud provider.
  • SKURateCard - a rate card that applies discounts or fixed rates to specific cloud provider SKUs.
  • CustomRateCard - a rate card that defines explicit rates for Kubernetes, load balancer, node, storage, network and overhead costs.
[
    {
        "id": "39294680-b922-42b5-8675-3296af4ac12b",
        "name": "On-Demand",
        "description": "Represents the rate card for On-Demand (Public Cloud) pricing.",
        "type": "OnDemandRateCard"
    },
    {
        "id": "8b885286-775d-4ca8-b8d7-92f9432bc367",
        "name": "Reserved 1 Year",
        "description": "Represents the rate card for Reserved Instances (RIs) or Committed Use Discount Instances (CUDs) with a 1 year commitment.",
        "type": "Reserved1YearRateCard"
    },
    {
        "id": "39067e3f-825b-42b9-8d8f-2b9e6a89935f",
        "name": "Reserved 3 Year",
        "description": "Represents the rate card for Reserved Instances (RIs) or Committed Use Discount Instances (CUDs) with a 3 year commitment.",
        "type": "Reserved3YearRateCard"
    },
    {
        "id": "2f6c1d8e-4b7a-4c39-9e51-7a0d3b2c8f14",
        "name": "Enterprise Agreement",
        "description": "Represents the negotiated discounts for the enterprise agreement.",
        "type": "DiscountRateCard",
        "totalDiscount": null,
        "totalComment": "",
        "kubernetesDiscount": 0.1,
        "kubernetesComment": "",
        "loadBalancerDiscount": 0.1,
        "loadBalancerComment": "",
        "nodeDiscount": 0.22,
        "nodeComment": "Negotiated compute discount",
        "storageDiscount": 0.15,
        "storageComment": "",
        "networkDiscount": 0.05,
        "networkComment": ""
    },
    {
        "id": "d41a7c52-93e6-4f0b-a8c7-61e5f29b0d3a",
        "name": "Private Cloud",
        "description": "Represents the internal rates for the on-premises data center.",
        "type": "CustomRateCard",
        "node": {
            "cpuRate": 0.0316,
            "cpuComment": "",
            "cpuUnitOfMeasure": "1 Hour",
            "memoryRate": 0.0042,
            "memoryComment": "",
            "memoryUnitOfMeasure": "1 GB",
            "gpuRate": null,
            "gpuComment": "",
            "gpuUnitOfMeasure": "1 Hour",
            "licenseSurcharge": null,
            "licenseComment": "",
            "licenseUnitOfMeasure": "1 Hour",
            "currencyCode": "USD"
        },
        "overhead": {
            "rate": 0.25,
            "comment": "Data center facilities overhead",
            "unitOfMeasure": "1 Hour",
            "currencyCode": "USD"
        },
        ...
    }
]

Note: Content has been omitted from the JSON response above for brevity.

Get a Rate Card by Name

To get a single rate card by name, call the method below on the K8sRates endpoint.

GET <endpoint>/theory/api/v1/k8srates/ratecards/lookup/{name}

where

  • {endpoint} - is the URL of the RealTheory SaaS portal for your account.
  • {name} - is the name of the rate card to retrieve.

Note: The name should be URL encoded; otherwise, the request might be rejected.

Example

GET theory/api/v1/k8srates/ratecards/lookup/On-Demand

which returns the built-in On-Demand rate card.

Output

Returns a single rate card object:

{
    "id": "39294680-b922-42b5-8675-3296af4ac12b",
    "name": "On-Demand",
    "description": "Represents the rate card for On-Demand (Public Cloud) pricing.",
    "type": "OnDemandRateCard"
}

Get a Rate Card by ID

To get a single rate card by ID, call the method below on the K8sRates endpoint.

GET <endpoint>/theory/api/v1/k8srates/ratecards/{id}

where

  • {endpoint} - is the URL of the RealTheory SaaS portal for your account.
  • {id} - is the ID of the rate card to retrieve.

Example

GET theory/api/v1/k8srates/ratecards/8b885286-775d-4ca8-b8d7-92f9432bc367

which returns the built-in Reserved 1 Year rate card.

Output

Returns a single rate card object:

{
    "id": "8b885286-775d-4ca8-b8d7-92f9432bc367",
    "name": "Reserved 1 Year",
    "description": "Represents the rate card for Reserved Instances (RIs) or Committed Use Discount Instances (CUDs) with a 1 year commitment.",
    "type": "Reserved1YearRateCard"
}