Skip to main content
GET
/
workspaces
/
consumption
Get current workspace stats
curl --request GET \
  --url https://api.edges.run/v1/workspaces/consumption \
  --header 'X-API-Key: <api-key>'
const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};

fetch('https://api.edges.run/v1/workspaces/consumption', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
import requests

url = "https://api.edges.run/v1/workspaces/consumption"

headers = {"X-API-Key": "<api-key>"}

response = requests.get(url, headers=headers)

print(response.text)
{
  "credits_left": 123,
  "credits_used": 123,
  "credits_max": 123,
  "current_month_start": "2023-11-07T05:31:56Z",
  "current_month_end": "2023-11-07T05:31:56Z",
  "consumptions": [
    {
      "action_slug": "<string>",
      "credits_used": 123,
      "runs_count": 123
    }
  ]
}
{
"error_label": "<string>",
"error_ref": "ERR-12345",
"message": "<string>",
"status_code": 123,
"params": {},
"data": {}
}
{
"error_label": "<string>",
"error_ref": "ERR-12345",
"message": "<string>",
"status_code": 123,
"params": {},
"data": {}
}

Authorizations

X-API-Key
string
header
required

Response

Consumed credits

Consumed credits

credits_left
number
credits_used
number
credits_max
number
current_month_start
string<date-time>
current_month_end
string<date-time>
consumptions
object[] | null