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_scope": "input",
"error_ref": "ERR-12345",
"message": "<string>",
"status_code": 123,
"params": {},
"data": {}
}{
"error_label": "<string>",
"error_scope": "input",
"error_ref": "ERR-12345",
"message": "<string>",
"status_code": 123,
"params": {},
"data": {}
}Workspaces
Credit Consumption
Retrieve credit usage for the current billing period
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_scope": "input",
"error_ref": "ERR-12345",
"message": "<string>",
"status_code": 123,
"params": {},
"data": {}
}{
"error_label": "<string>",
"error_scope": "input",
"error_ref": "ERR-12345",
"message": "<string>",
"status_code": 123,
"params": {},
"data": {}
}⌘I

