Environment
Your execution environment is the container for your team's UDFs, files, and attached resources. A service account token always resolves to an environment, which makes these endpoints the natural starting point for automation.
Get your environment
GET /execution-env/self
Scope: environment
Returns the environment the credentials resolve to. Useful fields:
| Field | Type | Description |
|---|---|---|
id | string | Environment id |
name | string | Environment name |
users | array | Members of the environment |
buckets | array | Attached cloud buckets |
github_repos | array | Linked GitHub repositories |
Get real-time usage
GET /execution-env/self/realtime/usage
Scope: environment
Call counters for the real-time engine.
Query parameters
| Parameter | Type | Description |
|---|---|---|
date_prefix | string | Restrict to a date, as YYYY, YYYY-MM, or YYYY-MM-DD. Omit for cumulative totals. |
Response
| Field | Type | Description |
|---|---|---|
calls_total | integer | All calls |
calls_success | integer | Successful calls |
calls_error | integer | Failed calls |
calls_cached | integer | Calls served from cache |
calls_total_time | integer | Total execution time, in milliseconds |
calls_success_time | integer | Execution time of successful calls, in milliseconds |
calls_error_time | integer | Execution time of failed calls, in milliseconds |
ai_calls | integer | AI calls made |
date_prefix | string | null | The date filter applied |
curl -H "Authorization: Fused-Service-Token $FUSED_SERVICE_ACCOUNT_TOKEN" \
"https://www.fused.io/server/v1/execution-env/self/realtime/usage?date_prefix=2026-08"
Service accounts
Service accounts are the long-lived machine credentials for your environment. See Service Accounts for the concepts and usage.
All four endpoints are user-scoped — they require a Bearer token. A service account token cannot manage service accounts, including its own.
List service accounts
GET /execution-env/self/service-account
Scope: user
Returns an array of service account objects — id, execution_environment_id, name, created_at. Tokens are never included.
Get a service account
GET /execution-env/self/service-account/by-id/{id}
Scope: user
Returns one service account object, without its token.
Create a service account
POST /execution-env/self/service-account/new
Scope: user
Body
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Name for the service account |
curl -X POST \
-H "Authorization: Bearer $FUSED_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name": "ci-deploy"}' \
"https://www.fused.io/server/v1/execution-env/self/service-account/new"
Response
| Field | Type | Description |
|---|---|---|
id | string | Service account id |
execution_environment_id | string | Owning environment |
name | string | Name |
created_at | string | Creation timestamp |
token | string | The service account token |
token is returned only in this response. Store it immediately — no endpoint can retrieve it later.
Delete a service account
DELETE /execution-env/self/service-account/by-id/{id}
Scope: user
Revokes the service account and returns the deleted record.
The token stops working immediately. Anything still authenticating with it begins failing.
See also
- Service Accounts — creating and using machine credentials
- Batch jobs — submitting and tracking long-running jobs
- Account — the signed-in user rather than the environment