GET
/
v2
/
usage
/
function
/
{owner_name}
/
{function_name}
/
versions
/
{version_slug}
Get Version Usage
curl --request GET \
  --url https://mango.sievedata.com/v2/usage/function/{owner_name}/{function_name}/versions/{version_slug} \
  --header 'X-API-Key: <api-key>'
{
  "total_compute_seconds": 123,
  "total_cost_dollars": 123,
  "cpu": {
    "compute_seconds": 123,
    "cost_dollars": 123
  },
  "a100": {
    "compute_seconds": 123,
    "cost_dollars": 123
  },
  "a100-20gb": {
    "compute_seconds": 123,
    "cost_dollars": 123
  },
  "v100": {
    "compute_seconds": 123,
    "cost_dollars": 123
  },
  "l4": {
    "compute_seconds": 123,
    "cost_dollars": 123
  },
  "t4": {
    "compute_seconds": 123,
    "cost_dollars": 123
  },
  "other": {
    "compute_seconds": 123,
    "cost_dollars": 123
  }
}

Authorizations

X-API-Key
string
header
required

The Sieve API key to authenticate with.

Path Parameters

owner_name
string
required

The owner of the function.

Examples:

"sieve"

function_name
string
required

The name of the function.

Examples:

"retalker"

version_slug
string
required

The ID or ID prefix of the function version, or 'latest'.

Examples:

"41b83e76-0a13-4d96-b0a0-7cd62c9977c3"

Query Parameters

start_timestamp
required

The POSIX timestamp in float seconds or int nanoseconds. If not specified, defaults to the start of the current billing period.

end_timestamp
required

The POSIX timestamp in float seconds or int nanoseconds. If not specified, defaults to the end of the current billing period.

Response

Successful Response

Output schema for detailed usage including machine types.

total_compute_seconds
number
required

Total amount of compute seconds accrued.

total_cost_dollars
number
required

Total amount of dollars spent.

cpu
object | null

Usage for CPU machines. Output schema for per machine type usage

a100
object | null

Usage for A100 machines. Output schema for per machine type usage

a100-20gb
object | null

Usage for A100 20GB machines. Output schema for per machine type usage

v100
object | null

Usage for V100 machines. Output schema for per machine type usage

l4
object | null

Usage for L4 machines. Output schema for per machine type usage

t4
object | null

Usage for T4 machines. Output schema for per machine type usage

other
object | null

Usage for functions billed with custom pricing. Output schema for per machine type usage