Skip to main content
POST
/
fastedge
/
v1
/
admin
/
prebilling
Get prebilling data
curl --request POST \
  --url https://api.gcore.com/fastedge/v1/admin/prebilling \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "from": "2022-01-01T00:00:00Z",
  "metrics": [
    "number_of_calls",
    "total_runtime_mms"
  ],
  "service": "FAST_EDGE",
  "to": "2024-12-31T23:59:59Z",
  "clients": [
    141309,
    1111
  ],
  "flat": true,
  "group_by": [
    "client",
    "region",
    "billing_plan"
  ],
  "networks": [
    "gcore"
  ]
}
'
[
  {
    "metrics": {
      "number_of_calls": 123,
      "exec_time": 123,
      "total_runtime_mms": 123,
      "kv_read_count": 123,
      "kv_write_size": 123,
      "kv_storage_size": 123,
      "kv_del_count": 123
    },
    "client": 123,
    "billing_plan": "<string>",
    "region": "<string>"
  }
]

Authorizations

Authorization
string
header
required

API key for authentication. Make sure to include the word apikey, followed by a single space and then your token. Example: apikey 1234$abcdef

Body

application/json

Prebilling request

from
string<date-time>
required

Start date-time in RFC3339 format

Example:

"2022-01-01T00:00:00Z"

metrics
enum<string>[]
required
Available options:
number_of_calls,
total_runtime_mms,
exec_time,
kv_storage_size,
kv_read_count,
kv_write_size,
kv_del_count
Example:
["number_of_calls", "total_runtime_mms"]
service
string
required

Must containt FAST_EDGE value

Example:

"FAST_EDGE"

to
string<date-time>
required

End date-time in RFC3339 format

Example:

"2024-12-31T23:59:59Z"

clients
integer<int64>[]
Example:
[141309, 1111]
flat
boolean

This field is not actually used, it is here only to comply with Billing API. If specified, it must be set to true.

group_by
enum<string>[]
Available options:
client,
region,
billing_plan
Example:
["client", "region", "billing_plan"]
networks
string[]
Example:
["gcore"]

Response

Ok

metrics
object
required
client
integer<int64>
billing_plan
string
region
string